diff --git a/nuon/api/accounts/complete_user_journey.py b/nuon/api/accounts/complete_user_journey.py index f5dd7ded..a0b83166 100644 --- a/nuon/api/accounts/complete_user_journey.py +++ b/nuon/api/accounts/complete_user_journey.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( journey_name: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Complete all steps in a specific user journey Mark all remaining steps in the specified user journey as complete @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( journey_name: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Complete all steps in a specific user journey Mark all remaining steps in the specified user journey as complete @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( journey_name: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Complete all steps in a specific user journey Mark all remaining steps in the specified user journey as complete @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( journey_name: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Complete all steps in a specific user journey Mark all remaining steps in the specified user journey as complete @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/accounts/create_user_journey.py b/nuon/api/accounts/create_user_journey.py index 3d91f21c..b0d343a5 100644 --- a/nuon/api/accounts/create_user_journey.py +++ b/nuon/api/accounts/create_user_journey.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateUserJourneyRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Create a new user journey for account Add a new user journey with steps to track user progress @@ -91,7 +97,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -109,7 +115,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateUserJourneyRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Create a new user journey for account Add a new user journey with steps to track user progress @@ -122,7 +128,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -135,7 +141,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateUserJourneyRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Create a new user journey for account Add a new user journey with steps to track user progress @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -164,7 +170,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateUserJourneyRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Create a new user journey for account Add a new user journey with steps to track user progress @@ -177,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/accounts/get_current_account.py b/nuon/api/accounts/get_current_account.py index b66fbe3c..38e59e87 100644 --- a/nuon/api/accounts/get_current_account.py +++ b/nuon/api/accounts/get_current_account.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -20,24 +20,28 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -45,8 +49,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -58,7 +62,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Get current account Get the current account with user journeys and other data @@ -68,7 +72,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs() @@ -83,7 +87,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Get current account Get the current account with user journeys and other data @@ -93,7 +97,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -104,7 +108,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Get current account Get the current account with user journeys and other data @@ -114,7 +118,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs() @@ -127,7 +131,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Get current account Get the current account with user journeys and other data @@ -137,7 +141,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/accounts/get_user_journeys.py b/nuon/api/accounts/get_user_journeys.py index 47ef0efa..11c614d6 100644 --- a/nuon/api/accounts/get_user_journeys.py +++ b/nuon/api/accounts/get_user_journeys.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -20,8 +20,8 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppUserJourney] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -31,26 +31,32 @@ def _parse_response( 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: @@ -58,8 +64,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppUserJourney]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: +) -> Response[StderrErrResponse | list[AppUserJourney]]: """Get user journeys Get all user journeys for the current user account @@ -81,7 +87,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppUserJourney']]] + Response[StderrErrResponse | list[AppUserJourney]] """ kwargs = _get_kwargs() @@ -96,7 +102,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: +) -> StderrErrResponse | list[AppUserJourney] | None: """Get user journeys Get all user journeys for the current user account @@ -106,7 +112,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppUserJourney']] + StderrErrResponse | list[AppUserJourney] """ return sync_detailed( @@ -117,7 +123,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppUserJourney"]]]: +) -> Response[StderrErrResponse | list[AppUserJourney]]: """Get user journeys Get all user journeys for the current user account @@ -127,7 +133,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppUserJourney']]] + Response[StderrErrResponse | list[AppUserJourney]] """ kwargs = _get_kwargs() @@ -140,7 +146,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppUserJourney"]]]: +) -> StderrErrResponse | list[AppUserJourney] | None: """Get user journeys Get all user journeys for the current user account @@ -150,7 +156,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppUserJourney']] + StderrErrResponse | list[AppUserJourney] """ return ( diff --git a/nuon/api/accounts/reset_user_journey.py b/nuon/api/accounts/reset_user_journey.py index 8c50d2db..bd35a5e2 100644 --- a/nuon/api/accounts/reset_user_journey.py +++ b/nuon/api/accounts/reset_user_journey.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( journey_name: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Reset user journey steps Reset all steps in a specified user journey by setting their completion status to false @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( journey_name: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Reset user journey steps Reset all steps in a specified user journey by setting their completion status to false @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( journey_name: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Reset user journey steps Reset all steps in a specified user journey by setting their completion status to false @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( journey_name: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Reset user journey steps Reset all steps in a specified user journey by setting their completion status to false @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/accounts/update_user_journey_step.py b/nuon/api/accounts/update_user_journey_step.py index 79d77ea1..0d990734 100644 --- a/nuon/api/accounts/update_user_journey_step.py +++ b/nuon/api/accounts/update_user_journey_step.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateUserJourneyStepRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Update user journey step completion status Mark a user journey step as complete or incomplete @@ -97,7 +103,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -119,7 +125,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateUserJourneyStepRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Update user journey step completion status Mark a user journey step as complete or incomplete @@ -134,7 +140,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -151,7 +157,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateUserJourneyStepRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Update user journey step completion status Mark a user journey step as complete or incomplete @@ -166,7 +172,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -186,7 +192,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateUserJourneyStepRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Update user journey step completion status Mark a user journey step as complete or incomplete @@ -201,7 +207,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/actions/create_action_config.py b/nuon/api/actions/create_action_config.py index 9b35b245..b1956961 100644 --- a/nuon/api/actions/create_action_config.py +++ b/nuon/api/actions/create_action_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflowConfig | StderrErrResponse | None: 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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateActionWorkflowConfigRequest, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """create action config Args: @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateActionWorkflowConfigRequest, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """create action config Args: @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateActionWorkflowConfigRequest, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """create action config Args: @@ -160,7 +166,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -180,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateActionWorkflowConfigRequest, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """create action config Args: @@ -193,7 +199,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return ( diff --git a/nuon/api/actions/create_action_workflow_config.py b/nuon/api/actions/create_action_workflow_config.py index 1f8e6777..3f2fa79f 100644 --- a/nuon/api/actions/create_action_workflow_config.py +++ b/nuon/api/actions/create_action_workflow_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflowConfig | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateActionWorkflowConfigRequest, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """create action workflow config Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateActionWorkflowConfigRequest, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """create action workflow config Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateActionWorkflowConfigRequest, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """create action workflow config Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateActionWorkflowConfigRequest, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """create action workflow config Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return ( diff --git a/nuon/api/actions/create_app_action.py b/nuon/api/actions/create_app_action.py index ff5b1fb0..7bbf180d 100644 --- a/nuon/api/actions/create_app_action.py +++ b/nuon/api/actions/create_app_action.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflow | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppActionRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """create an app action Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppActionRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """create an app action Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppActionRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """create an app action Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppActionRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """create an app action Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/actions/create_app_action_workflow.py b/nuon/api/actions/create_app_action_workflow.py index 26dbb267..2060acc5 100644 --- a/nuon/api/actions/create_app_action_workflow.py +++ b/nuon/api/actions/create_app_action_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflow | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """create an app action workflow Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """create an app action workflow Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """create an app action workflow Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """create an app action workflow Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/actions/create_install_action_run.py b/nuon/api/actions/create_install_action_run.py index 64df569e..92537fdb 100644 --- a/nuon/api/actions/create_install_action_run.py +++ b/nuon/api/actions/create_install_action_run.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """create an action workflow run for an install AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses @@ -93,7 +99,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -113,7 +119,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """create an action workflow run for an install AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """create an action workflow run for an install AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses @@ -158,7 +164,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -176,7 +182,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """create an action workflow run for an install AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses @@ -191,7 +197,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/actions/create_install_action_workflow_run.py b/nuon/api/actions/create_install_action_workflow_run.py index 15e959ce..e49393da 100644 --- a/nuon/api/actions/create_install_action_workflow_run.py +++ b/nuon/api/actions/create_install_action_workflow_run.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """create an action workflow run for an install AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses @@ -93,7 +99,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -113,7 +119,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """create an action workflow run for an install AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """create an action workflow run for an install AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses @@ -158,7 +164,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -176,7 +182,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateInstallActionWorkflowRunRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """create an action workflow run for an install AppWorkflowConfigId param has been deprecated and is no longer being consumed, the api uses @@ -191,7 +197,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/actions/delete_action.py b/nuon/api/actions/delete_action.py index ef684ab7..d6e68ab2 100644 --- a/nuon/api/actions/delete_action.py +++ b/nuon/api/actions/delete_action.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( action_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an action Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( action_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an action Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( action_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an action Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( action_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an action Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/actions/delete_action_workflow.py b/nuon/api/actions/delete_action_workflow.py index 45d874f3..cddf6813 100644 --- a/nuon/api/actions/delete_action_workflow.py +++ b/nuon/api/actions/delete_action_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an action workflow Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an action workflow Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an action workflow Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an action workflow Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/actions/get_action_latest_config.py b/nuon/api/actions/get_action_latest_config.py index dae854db..11e628bf 100644 --- a/nuon/api/actions/get_action_latest_config.py +++ b/nuon/api/actions/get_action_latest_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflowConfig | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( action_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """get an app action workflow's latest config Return the latest config for an action workflow. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( action_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """get an app action workflow's latest config Return the latest config for an action workflow. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( action_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """get an app action workflow's latest config Return the latest config for an action workflow. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( action_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """get an app action workflow's latest config Return the latest config for an action workflow. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_action_workflow.py b/nuon/api/actions/get_action_workflow.py index 0f9bf8cb..8d5d39b7 100644 --- a/nuon/api/actions/get_action_workflow.py +++ b/nuon/api/actions/get_action_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflow | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """get an app action workflow by action workflow id Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """get an app action workflow by action workflow id Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """get an app action workflow by action workflow id Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """get an app action workflow by action workflow id Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_action_workflow_config.py b/nuon/api/actions/get_action_workflow_config.py index f0b24d8c..dfbc28f0 100644 --- a/nuon/api/actions/get_action_workflow_config.py +++ b/nuon/api/actions/get_action_workflow_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflowConfig | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( action_workflow_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """get an app action workflow config Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( action_workflow_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """get an app action workflow config Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( action_workflow_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """get an app action workflow config Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( action_workflow_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """get an app action workflow config Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_action_workflow_configs.py b/nuon/api/actions/get_action_workflow_configs.py index b99c8a57..d78bde09 100644 --- a/nuon/api/actions/get_action_workflow_configs.py +++ b/nuon/api/actions/get_action_workflow_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( action_workflow_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppActionWorkflowConfig] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppActionWorkflowConfig]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( action_workflow_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppActionWorkflowConfig]]: """get action workflow for an app Args: action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppActionWorkflowConfig]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( action_workflow_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppActionWorkflowConfig] | None: """get action workflow for an app Args: action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppActionWorkflowConfig] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( action_workflow_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppActionWorkflowConfig]]: """get action workflow for an app Args: action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppActionWorkflowConfig]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( action_workflow_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppActionWorkflowConfig] | None: """get action workflow for an app Args: action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppActionWorkflowConfig] """ return ( diff --git a/nuon/api/actions/get_action_workflow_latest_config.py b/nuon/api/actions/get_action_workflow_latest_config.py index 74f7599e..a4024fe5 100644 --- a/nuon/api/actions/get_action_workflow_latest_config.py +++ b/nuon/api/actions/get_action_workflow_latest_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflowConfig | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """get an app action workflow's latest config Return the latest config for an action workflow. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """get an app action workflow's latest config Return the latest config for an action workflow. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """get an app action workflow's latest config Return the latest config for an action workflow. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """get an app action workflow's latest config Return the latest config for an action workflow. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_action_workflows.py b/nuon/api/actions/get_action_workflows.py index 12db8f94..70ae62ce 100644 --- a/nuon/api/actions/get_action_workflows.py +++ b/nuon/api/actions/get_action_workflows.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( app_id: str, *, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -40,8 +40,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppActionWorkflow] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -51,26 +51,32 @@ def _parse_response( 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: @@ -78,8 +84,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppActionWorkflow]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -92,26 +98,26 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppActionWorkflow]]: """get action workflows for an app Args: app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppActionWorkflow']]] + Response[StderrErrResponse | list[AppActionWorkflow]] """ kwargs = _get_kwargs( @@ -133,26 +139,26 @@ def sync( app_id: str, *, client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppActionWorkflow] | None: """get action workflows for an app Args: app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppActionWorkflow']] + StderrErrResponse | list[AppActionWorkflow] """ return sync_detailed( @@ -169,26 +175,26 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppActionWorkflow]]: """get action workflows for an app Args: app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppActionWorkflow']]] + Response[StderrErrResponse | list[AppActionWorkflow]] """ kwargs = _get_kwargs( @@ -208,26 +214,26 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflow"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppActionWorkflow] | None: """get action workflows for an app Args: app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppActionWorkflow']] + StderrErrResponse | list[AppActionWorkflow] """ return ( diff --git a/nuon/api/actions/get_app_action.py b/nuon/api/actions/get_app_action.py index 38f697c4..61172286 100644 --- a/nuon/api/actions/get_app_action.py +++ b/nuon/api/actions/get_app_action.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflow | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( action_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """get an app action workflow by action workflow id Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( action_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """get an app action workflow by action workflow id Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( action_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """get an app action workflow by action workflow id Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( action_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """get an app action workflow by action workflow id Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_app_action_config.py b/nuon/api/actions/get_app_action_config.py index 8041e30a..a5d9e309 100644 --- a/nuon/api/actions/get_app_action_config.py +++ b/nuon/api/actions/get_app_action_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -24,32 +24,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflowConfig | StderrErrResponse | None: 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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( action_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """get an app action config Args: @@ -86,7 +92,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -108,7 +114,7 @@ def sync( action_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """get an app action config Args: @@ -121,7 +127,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return sync_detailed( @@ -138,7 +144,7 @@ async def asyncio_detailed( action_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> Response[AppActionWorkflowConfig | StderrErrResponse]: """get an app action config Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflowConfig, StderrErrResponse]] + Response[AppActionWorkflowConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -171,7 +177,7 @@ async def asyncio( action_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflowConfig, StderrErrResponse]]: +) -> AppActionWorkflowConfig | StderrErrResponse | None: """get an app action config Args: @@ -184,7 +190,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflowConfig, StderrErrResponse] + AppActionWorkflowConfig | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_app_action_configs.py b/nuon/api/actions/get_app_action_configs.py index 66a76acf..a92e3329 100644 --- a/nuon/api/actions/get_app_action_configs.py +++ b/nuon/api/actions/get_app_action_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -14,9 +14,9 @@ def _get_kwargs( app_id: str, action_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -38,8 +38,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppActionWorkflowConfig] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,26 +49,32 @@ def _parse_response( 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: @@ -76,8 +82,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppActionWorkflowConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppActionWorkflowConfig]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,25 +97,25 @@ def sync_detailed( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppActionWorkflowConfig]] """ kwargs = _get_kwargs( @@ -132,25 +138,25 @@ def sync( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppActionWorkflowConfig] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppActionWorkflowConfig] """ return sync_detailed( @@ -168,25 +174,25 @@ async def asyncio_detailed( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppActionWorkflowConfig]] """ kwargs = _get_kwargs( @@ -207,25 +213,25 @@ async def asyncio( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppActionWorkflowConfig] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppActionWorkflowConfig] """ return ( diff --git a/nuon/api/actions/get_app_action_workflow.py b/nuon/api/actions/get_app_action_workflow.py index 00a47b9a..2d135f50 100644 --- a/nuon/api/actions/get_app_action_workflow.py +++ b/nuon/api/actions/get_app_action_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflow | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """get an app action workflow Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """get an app action workflow Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """get an app action workflow Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """get an app action workflow Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_install_action_recent_runs.py b/nuon/api/actions/get_install_action_recent_runs.py index 6e5f6992..b0bc64fb 100644 --- a/nuon/api/actions/get_install_action_recent_runs.py +++ b/nuon/api/actions/get_install_action_recent_runs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -14,9 +14,9 @@ def _get_kwargs( install_id: str, action_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -38,32 +38,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallActionWorkflow | StderrErrResponse | None: 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: @@ -71,8 +77,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -86,25 +92,25 @@ def sync_detailed( action_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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]] + Response[AppInstallActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -127,25 +133,25 @@ def sync( action_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> AppInstallActionWorkflow | StderrErrResponse | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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] + AppInstallActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -163,25 +169,25 @@ async def asyncio_detailed( action_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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]] + Response[AppInstallActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -202,25 +208,25 @@ async def asyncio( action_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> AppInstallActionWorkflow | StderrErrResponse | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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] + AppInstallActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_install_action_run.py b/nuon/api/actions/get_install_action_run.py index 517a693e..a78d38e4 100644 --- a/nuon/api/actions/get_install_action_run.py +++ b/nuon/api/actions/get_install_action_run.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallActionWorkflowRun | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallActionWorkflowRun | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflowRun | StderrErrResponse]: """get action workflow runs by install id and run id Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + Response[AppInstallActionWorkflowRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( run_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: +) -> AppInstallActionWorkflowRun | StderrErrResponse | None: """get action workflow runs by install id and run id Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflowRun, StderrErrResponse] + AppInstallActionWorkflowRun | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflowRun | StderrErrResponse]: """get action workflow runs by install id and run id Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + Response[AppInstallActionWorkflowRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: +) -> AppInstallActionWorkflowRun | StderrErrResponse | None: """get action workflow runs by install id and run id Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflowRun, StderrErrResponse] + AppInstallActionWorkflowRun | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_install_action_run_step.py b/nuon/api/actions/get_install_action_run_step.py index 17655826..af23367a 100644 --- a/nuon/api/actions/get_install_action_run_step.py +++ b/nuon/api/actions/get_install_action_run_step.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -24,32 +24,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallActionWorkflowRunStep | StderrErrResponse | None: 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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallActionWorkflowRunStep | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( step_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflowRunStep | StderrErrResponse]: """get action workflow run step by install id and step id Get an install action workflow run step. @@ -88,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + Response[AppInstallActionWorkflowRunStep | StderrErrResponse] """ kwargs = _get_kwargs( @@ -110,7 +116,7 @@ def sync( step_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: +) -> AppInstallActionWorkflowRunStep | StderrErrResponse | None: """get action workflow run step by install id and step id Get an install action workflow run step. @@ -125,7 +131,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + AppInstallActionWorkflowRunStep | StderrErrResponse """ return sync_detailed( @@ -142,7 +148,7 @@ async def asyncio_detailed( step_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflowRunStep | StderrErrResponse]: """get action workflow run step by install id and step id Get an install action workflow run step. @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + Response[AppInstallActionWorkflowRunStep | StderrErrResponse] """ kwargs = _get_kwargs( @@ -177,7 +183,7 @@ async def asyncio( step_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: +) -> AppInstallActionWorkflowRunStep | StderrErrResponse | None: """get action workflow run step by install id and step id Get an install action workflow run step. @@ -192,7 +198,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + AppInstallActionWorkflowRunStep | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_install_action_runs.py b/nuon/api/actions/get_install_action_runs.py index a1093e94..d7306997 100644 --- a/nuon/api/actions/get_install_action_runs.py +++ b/nuon/api/actions/get_install_action_runs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallActionWorkflowRun] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallActionWorkflowRun]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflowRun]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallActionWorkflowRun] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflowRun] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflowRun]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallActionWorkflowRun] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflowRun] """ return ( 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 d25957c0..9dfe6daf 100644 --- a/nuon/api/actions/get_install_action_workflow_recent_runs.py +++ b/nuon/api/actions/get_install_action_workflow_recent_runs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -14,9 +14,9 @@ def _get_kwargs( install_id: str, action_workflow_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -38,32 +38,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallActionWorkflow | StderrErrResponse | None: 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: @@ -71,8 +77,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -86,25 +92,25 @@ def sync_detailed( action_workflow_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: """get recent runs for an action workflow by install id Args: install_id (str): action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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]] + Response[AppInstallActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -127,25 +133,25 @@ def sync( action_workflow_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> AppInstallActionWorkflow | StderrErrResponse | None: """get recent runs for an action workflow by install id Args: install_id (str): action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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] + AppInstallActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -163,25 +169,25 @@ async def asyncio_detailed( action_workflow_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: """get recent runs for an action workflow by install id Args: install_id (str): action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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]] + Response[AppInstallActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -202,25 +208,25 @@ async def asyncio( action_workflow_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> AppInstallActionWorkflow | StderrErrResponse | None: """get recent runs for an action workflow by install id Args: install_id (str): action_workflow_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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] + AppInstallActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_install_action_workflow_run.py b/nuon/api/actions/get_install_action_workflow_run.py index 9fdb3a42..cf010ecb 100644 --- a/nuon/api/actions/get_install_action_workflow_run.py +++ b/nuon/api/actions/get_install_action_workflow_run.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallActionWorkflowRun | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallActionWorkflowRun | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflowRun | StderrErrResponse]: """get action workflow runs by install id and run id Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + Response[AppInstallActionWorkflowRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( run_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: +) -> AppInstallActionWorkflowRun | StderrErrResponse | None: """get action workflow runs by install id and run id Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflowRun, StderrErrResponse] + AppInstallActionWorkflowRun | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflowRun | StderrErrResponse]: """get action workflow runs by install id and run id Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflowRun, StderrErrResponse]] + Response[AppInstallActionWorkflowRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRun, StderrErrResponse]]: +) -> AppInstallActionWorkflowRun | StderrErrResponse | None: """get action workflow runs by install id and run id Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflowRun, StderrErrResponse] + AppInstallActionWorkflowRun | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_install_action_workflow_run_step.py b/nuon/api/actions/get_install_action_workflow_run_step.py index c0607d91..c60dc3f2 100644 --- a/nuon/api/actions/get_install_action_workflow_run_step.py +++ b/nuon/api/actions/get_install_action_workflow_run_step.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -24,32 +24,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallActionWorkflowRunStep | StderrErrResponse | None: 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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallActionWorkflowRunStep | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( step_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflowRunStep | StderrErrResponse]: """get action workflow run step by install id and step id Get an install action workflow run step. @@ -88,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + Response[AppInstallActionWorkflowRunStep | StderrErrResponse] """ kwargs = _get_kwargs( @@ -110,7 +116,7 @@ def sync( step_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: +) -> AppInstallActionWorkflowRunStep | StderrErrResponse | None: """get action workflow run step by install id and step id Get an install action workflow run step. @@ -125,7 +131,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + AppInstallActionWorkflowRunStep | StderrErrResponse """ return sync_detailed( @@ -142,7 +148,7 @@ async def asyncio_detailed( step_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflowRunStep | StderrErrResponse]: """get action workflow run step by install id and step id Get an install action workflow run step. @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]] + Response[AppInstallActionWorkflowRunStep | StderrErrResponse] """ kwargs = _get_kwargs( @@ -177,7 +183,7 @@ async def asyncio( step_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflowRunStep, StderrErrResponse]]: +) -> AppInstallActionWorkflowRunStep | StderrErrResponse | None: """get action workflow run step by install id and step id Get an install action workflow run step. @@ -192,7 +198,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflowRunStep, StderrErrResponse] + AppInstallActionWorkflowRunStep | StderrErrResponse """ return ( diff --git a/nuon/api/actions/get_install_action_workflow_runs.py b/nuon/api/actions/get_install_action_workflow_runs.py index b0a18fb3..4a25ad1c 100644 --- a/nuon/api/actions/get_install_action_workflow_runs.py +++ b/nuon/api/actions/get_install_action_workflow_runs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallActionWorkflowRun] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflowRun"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallActionWorkflowRun]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflowRun]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallActionWorkflowRun] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflowRun] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflowRun]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallActionWorkflowRun] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflowRun] """ return ( 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 ecb5c9c7..88afe048 100644 --- a/nuon/api/actions/get_install_action_workflows_latest_runs.py +++ b/nuon/api/actions/get_install_action_workflows_latest_runs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,11 +13,11 @@ 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, + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -43,8 +43,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -54,26 +54,32 @@ def _parse_response( 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: @@ -81,8 +87,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallActionWorkflow]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -95,28 +101,28 @@ 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"]]]: + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> Response[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]): + trigger_types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflow]] """ kwargs = _get_kwargs( @@ -139,28 +145,28 @@ 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"]]]: + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: """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]): + trigger_types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflow] """ return sync_detailed( @@ -178,28 +184,28 @@ 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"]]]: + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> Response[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]): + trigger_types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflow]] """ kwargs = _get_kwargs( @@ -220,28 +226,28 @@ 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"]]]: + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: """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]): + trigger_types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflow] """ return ( diff --git a/nuon/api/actions/get_install_actions_latest_runs.py b/nuon/api/actions/get_install_actions_latest_runs.py index 947a37d4..51455204 100644 --- a/nuon/api/actions/get_install_actions_latest_runs.py +++ b/nuon/api/actions/get_install_actions_latest_runs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,11 +13,11 @@ 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, + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -43,8 +43,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -54,26 +54,32 @@ def _parse_response( 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: @@ -81,8 +87,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallActionWorkflow]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -95,28 +101,28 @@ 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"]]]: + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> Response[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]): + trigger_types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflow]] """ kwargs = _get_kwargs( @@ -139,28 +145,28 @@ 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"]]]: + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: """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]): + trigger_types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflow] """ return sync_detailed( @@ -178,28 +184,28 @@ 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"]]]: + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> Response[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]): + trigger_types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflow]] """ kwargs = _get_kwargs( @@ -220,28 +226,28 @@ 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"]]]: + trigger_types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: """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]): + trigger_types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflow] """ return ( diff --git a/nuon/api/actions/update_app_action.py b/nuon/api/actions/update_app_action.py index 503c7b26..2105c771 100644 --- a/nuon/api/actions/update_app_action.py +++ b/nuon/api/actions/update_app_action.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflow | StderrErrResponse | None: 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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """patch an app action Args: @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """patch an app action Args: @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """patch an app action Args: @@ -160,7 +166,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -180,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """patch an app action Args: @@ -193,7 +199,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/actions/update_app_action_workflow.py b/nuon/api/actions/update_app_action_workflow.py index a43f36df..99084305 100644 --- a/nuon/api/actions/update_app_action_workflow.py +++ b/nuon/api/actions/update_app_action_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppActionWorkflow | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """patch an app Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """patch an app Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateActionWorkflowRequest, -) -> Response[Union[AppActionWorkflow, StderrErrResponse]]: +) -> Response[AppActionWorkflow | StderrErrResponse]: """patch an app Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppActionWorkflow, StderrErrResponse]] + Response[AppActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateActionWorkflowRequest, -) -> Optional[Union[AppActionWorkflow, StderrErrResponse]]: +) -> AppActionWorkflow | StderrErrResponse | None: """patch an app Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppActionWorkflow, StderrErrResponse] + AppActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app.py b/nuon/api/apps/create_app.py index 0dbc8296..7118d467 100644 --- a/nuon/api/apps/create_app.py +++ b/nuon/api/apps/create_app.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppApp, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppApp | StderrErrResponse | None: if response.status_code == 201: response_201 = AppApp.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppApp, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppApp | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppRequest, -) -> Response[Union[AppApp, StderrErrResponse]]: +) -> Response[AppApp | StderrErrResponse]: """create an app Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppApp, StderrErrResponse]] + Response[AppApp | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppRequest, -) -> Optional[Union[AppApp, StderrErrResponse]]: +) -> AppApp | StderrErrResponse | None: """create an app Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppApp, StderrErrResponse] + AppApp | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppRequest, -) -> Response[Union[AppApp, StderrErrResponse]]: +) -> Response[AppApp | StderrErrResponse]: """create an app Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppApp, StderrErrResponse]] + Response[AppApp | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppRequest, -) -> Optional[Union[AppApp, StderrErrResponse]]: +) -> AppApp | StderrErrResponse | None: """create an app Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppApp, StderrErrResponse] + AppApp | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_branch.py b/nuon/api/apps/create_app_branch.py index d5333471..df6e5aea 100644 --- a/nuon/api/apps/create_app_branch.py +++ b/nuon/api/apps/create_app_branch.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppBranch, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppBranch | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppBranch.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppBranch, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppBranch | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppBranchRequest, -) -> Response[Union[AppAppBranch, StderrErrResponse]]: +) -> Response[AppAppBranch | StderrErrResponse]: """Cancel a runner job. Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppBranch, StderrErrResponse]] + Response[AppAppBranch | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppBranchRequest, -) -> Optional[Union[AppAppBranch, StderrErrResponse]]: +) -> AppAppBranch | StderrErrResponse | None: """Cancel a runner job. Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppBranch, StderrErrResponse] + AppAppBranch | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppBranchRequest, -) -> Response[Union[AppAppBranch, StderrErrResponse]]: +) -> Response[AppAppBranch | StderrErrResponse]: """Cancel a runner job. Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppBranch, StderrErrResponse]] + Response[AppAppBranch | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppBranchRequest, -) -> Optional[Union[AppAppBranch, StderrErrResponse]]: +) -> AppAppBranch | StderrErrResponse | None: """Cancel a runner job. Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppBranch, StderrErrResponse] + AppAppBranch | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_break_glass_config.py b/nuon/api/apps/create_app_break_glass_config.py index 6e505528..8357bb0e 100644 --- a/nuon/api/apps/create_app_break_glass_config.py +++ b/nuon/api/apps/create_app_break_glass_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppBreakGlassConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppBreakGlassConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppBreakGlassConfigRequest, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: """Create a break glass config for an app. Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + Response[AppAppBreakGlassConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppBreakGlassConfigRequest, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> AppAppBreakGlassConfig | StderrErrResponse | None: """Create a break glass config for an app. Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] + AppAppBreakGlassConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppBreakGlassConfigRequest, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: """Create a break glass config for an app. Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + Response[AppAppBreakGlassConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppBreakGlassConfigRequest, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> AppAppBreakGlassConfig | StderrErrResponse | None: """Create a break glass config for an app. Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] + AppAppBreakGlassConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_config.py b/nuon/api/apps/create_app_config.py index dc44563f..b9762af7 100644 --- a/nuon/api/apps/create_app_config.py +++ b/nuon/api/apps/create_app_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppConfigRequest, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: +) -> Response[AppAppConfig | StderrErrResponse]: """Create an app config, by pushing the contents of a config file. The API will automatically configure the app according to the config file in the background. @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppConfig, StderrErrResponse]] + Response[AppAppConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppConfigRequest, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: +) -> AppAppConfig | StderrErrResponse | None: """Create an app config, by pushing the contents of a config file. The API will automatically configure the app according to the config file in the background. @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppConfig, StderrErrResponse] + AppAppConfig | StderrErrResponse """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppConfigRequest, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: +) -> Response[AppAppConfig | StderrErrResponse]: """Create an app config, by pushing the contents of a config file. The API will automatically configure the app according to the config file in the background. @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppConfig, StderrErrResponse]] + Response[AppAppConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -175,7 +181,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppConfigRequest, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: +) -> AppAppConfig | StderrErrResponse | None: """Create an app config, by pushing the contents of a config file. The API will automatically configure the app according to the config file in the background. @@ -189,7 +195,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppConfig, StderrErrResponse] + AppAppConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_config_v2.py b/nuon/api/apps/create_app_config_v2.py new file mode 100644 index 00000000..2faea51f --- /dev/null +++ b/nuon/api/apps/create_app_config_v2.py @@ -0,0 +1,207 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_config import AppAppConfig +from ...models.service_create_app_config_request import ServiceCreateAppConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppConfig | StderrErrResponse | None: + if response.status_code == 201: + response_201 = AppAppConfig.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: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppConfig | 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: ServiceCreateAppConfigRequest, +) -> Response[AppAppConfig | StderrErrResponse]: + """Create an app config, by pushing the contents of a config file. + + The API will automatically configure the app according to the config file in the background. + + Args: + app_id (str): + body (ServiceCreateAppConfigRequest): + + 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[AppAppConfig | 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: ServiceCreateAppConfigRequest, +) -> AppAppConfig | StderrErrResponse | None: + """Create an app config, by pushing the contents of a config file. + + The API will automatically configure the app according to the config file in the background. + + Args: + app_id (str): + body (ServiceCreateAppConfigRequest): + + 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: + AppAppConfig | StderrErrResponse + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppConfigRequest, +) -> Response[AppAppConfig | StderrErrResponse]: + """Create an app config, by pushing the contents of a config file. + + The API will automatically configure the app according to the config file in the background. + + Args: + app_id (str): + body (ServiceCreateAppConfigRequest): + + 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[AppAppConfig | 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: ServiceCreateAppConfigRequest, +) -> AppAppConfig | StderrErrResponse | None: + """Create an app config, by pushing the contents of a config file. + + The API will automatically configure the app according to the config file in the background. + + Args: + app_id (str): + body (ServiceCreateAppConfigRequest): + + 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: + AppAppConfig | StderrErrResponse + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_input_config.py b/nuon/api/apps/create_app_input_config.py index ea97c5a5..9dbc683f 100644 --- a/nuon/api/apps/create_app_input_config.py +++ b/nuon/api/apps/create_app_input_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppInputConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppInputConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppInputConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppInputConfigRequest, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: +) -> Response[AppAppInputConfig | StderrErrResponse]: """App input configs allow you to declare the inputs for your application, and do things such as require customer inputs or expose configuration knobs in your application. @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] + Response[AppAppInputConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppInputConfigRequest, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: +) -> AppAppInputConfig | StderrErrResponse | None: """App input configs allow you to declare the inputs for your application, and do things such as require customer inputs or expose configuration knobs in your application. @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppInputConfig, StderrErrResponse] + AppAppInputConfig | StderrErrResponse """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppInputConfigRequest, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: +) -> Response[AppAppInputConfig | StderrErrResponse]: """App input configs allow you to declare the inputs for your application, and do things such as require customer inputs or expose configuration knobs in your application. @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] + Response[AppAppInputConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -175,7 +181,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppInputConfigRequest, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: +) -> AppAppInputConfig | StderrErrResponse | None: """App input configs allow you to declare the inputs for your application, and do things such as require customer inputs or expose configuration knobs in your application. @@ -189,7 +195,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppInputConfig, StderrErrResponse] + AppAppInputConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_permissions_config.py b/nuon/api/apps/create_app_permissions_config.py index 36207c5f..782b4c60 100644 --- a/nuon/api/apps/create_app_permissions_config.py +++ b/nuon/api/apps/create_app_permissions_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppPermissionsConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppPermissionsConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppPermissionsConfigRequest, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: """Create app permissions config. Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + Response[AppAppPermissionsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppPermissionsConfigRequest, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> AppAppPermissionsConfig | StderrErrResponse | None: """Create app permissions config. Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] + AppAppPermissionsConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppPermissionsConfigRequest, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: """Create app permissions config. Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + Response[AppAppPermissionsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppPermissionsConfigRequest, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> AppAppPermissionsConfig | StderrErrResponse | None: """Create app permissions config. Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] + AppAppPermissionsConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_policies_config.py b/nuon/api/apps/create_app_policies_config.py index 48b21955..8b1d643a 100644 --- a/nuon/api/apps/create_app_policies_config.py +++ b/nuon/api/apps/create_app_policies_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppPoliciesConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppPoliciesConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppPoliciesConfigRequest, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: """Create app policies config. Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + Response[AppAppPoliciesConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppPoliciesConfigRequest, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> AppAppPoliciesConfig | StderrErrResponse | None: """Create app policies config. Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] + AppAppPoliciesConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppPoliciesConfigRequest, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: """Create app policies config. Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + Response[AppAppPoliciesConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppPoliciesConfigRequest, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> AppAppPoliciesConfig | StderrErrResponse | None: """Create app policies config. Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] + AppAppPoliciesConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_runner_config.py b/nuon/api/apps/create_app_runner_config.py index 053e48ec..22f5327b 100644 --- a/nuon/api/apps/create_app_runner_config.py +++ b/nuon/api/apps/create_app_runner_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppRunnerConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppRunnerConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppRunnerConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppRunnerConfigRequest, -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: +) -> Response[AppAppRunnerConfig | StderrErrResponse]: """create an app runner config Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppRunnerConfig, StderrErrResponse]] + Response[AppAppRunnerConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppRunnerConfigRequest, -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: +) -> AppAppRunnerConfig | StderrErrResponse | None: """create an app runner config Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppRunnerConfig, StderrErrResponse] + AppAppRunnerConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppRunnerConfigRequest, -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: +) -> Response[AppAppRunnerConfig | StderrErrResponse]: """create an app runner config Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppRunnerConfig, StderrErrResponse]] + Response[AppAppRunnerConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppRunnerConfigRequest, -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: +) -> AppAppRunnerConfig | StderrErrResponse | None: """create an app runner config Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppRunnerConfig, StderrErrResponse] + AppAppRunnerConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_sandbox_config.py b/nuon/api/apps/create_app_sandbox_config.py index dfe904ec..d0b5f09a 100644 --- a/nuon/api/apps/create_app_sandbox_config.py +++ b/nuon/api/apps/create_app_sandbox_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppSandboxConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppSandboxConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppSandboxConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppSandboxConfigRequest, -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: +) -> Response[AppAppSandboxConfig | StderrErrResponse]: """create an app sandbox config Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSandboxConfig, StderrErrResponse]] + Response[AppAppSandboxConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppSandboxConfigRequest, -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: +) -> AppAppSandboxConfig | StderrErrResponse | None: """create an app sandbox config Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSandboxConfig, StderrErrResponse] + AppAppSandboxConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppSandboxConfigRequest, -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: +) -> Response[AppAppSandboxConfig | StderrErrResponse]: """create an app sandbox config Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSandboxConfig, StderrErrResponse]] + Response[AppAppSandboxConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppSandboxConfigRequest, -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: +) -> AppAppSandboxConfig | StderrErrResponse | None: """create an app sandbox config Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSandboxConfig, StderrErrResponse] + AppAppSandboxConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_sandbox_config_v2.py b/nuon/api/apps/create_app_sandbox_config_v2.py new file mode 100644 index 00000000..dea1b776 --- /dev/null +++ b/nuon/api/apps/create_app_sandbox_config_v2.py @@ -0,0 +1,199 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_sandbox_config import AppAppSandboxConfig +from ...models.service_create_app_sandbox_config_request import ServiceCreateAppSandboxConfigRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppSandboxConfigRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/sandbox-configs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppSandboxConfig | StderrErrResponse | None: + if response.status_code == 201: + response_201 = AppAppSandboxConfig.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: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppSandboxConfig | 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: ServiceCreateAppSandboxConfigRequest, +) -> Response[AppAppSandboxConfig | StderrErrResponse]: + """create an app sandbox config + + Args: + app_id (str): + body (ServiceCreateAppSandboxConfigRequest): + + 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[AppAppSandboxConfig | 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: ServiceCreateAppSandboxConfigRequest, +) -> AppAppSandboxConfig | StderrErrResponse | None: + """create an app sandbox config + + Args: + app_id (str): + body (ServiceCreateAppSandboxConfigRequest): + + 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: + AppAppSandboxConfig | StderrErrResponse + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSandboxConfigRequest, +) -> Response[AppAppSandboxConfig | StderrErrResponse]: + """create an app sandbox config + + Args: + app_id (str): + body (ServiceCreateAppSandboxConfigRequest): + + 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[AppAppSandboxConfig | 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: ServiceCreateAppSandboxConfigRequest, +) -> AppAppSandboxConfig | StderrErrResponse | None: + """create an app sandbox config + + Args: + app_id (str): + body (ServiceCreateAppSandboxConfigRequest): + + 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: + AppAppSandboxConfig | StderrErrResponse + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_secret.py b/nuon/api/apps/create_app_secret.py index c34d0203..f26a6b0c 100644 --- a/nuon/api/apps/create_app_secret.py +++ b/nuon/api/apps/create_app_secret.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSecret, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppSecret | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppSecret.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSecret, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppSecret | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppSecretRequest, -) -> Response[Union[AppAppSecret, StderrErrResponse]]: +) -> Response[AppAppSecret | StderrErrResponse]: """create an app secret Create an app secret that can be used to configure components. To reference an app secret, use @@ -97,7 +103,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSecret, StderrErrResponse]] + Response[AppAppSecret | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppSecretRequest, -) -> Optional[Union[AppAppSecret, StderrErrResponse]]: +) -> AppAppSecret | StderrErrResponse | None: """create an app secret Create an app secret that can be used to configure components. To reference an app secret, use @@ -134,7 +140,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSecret, StderrErrResponse] + AppAppSecret | StderrErrResponse """ return sync_detailed( @@ -149,7 +155,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppSecretRequest, -) -> Response[Union[AppAppSecret, StderrErrResponse]]: +) -> Response[AppAppSecret | StderrErrResponse]: """create an app secret Create an app secret that can be used to configure components. To reference an app secret, use @@ -166,7 +172,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSecret, StderrErrResponse]] + Response[AppAppSecret | StderrErrResponse] """ kwargs = _get_kwargs( @@ -184,7 +190,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppSecretRequest, -) -> Optional[Union[AppAppSecret, StderrErrResponse]]: +) -> AppAppSecret | StderrErrResponse | None: """create an app secret Create an app secret that can be used to configure components. To reference an app secret, use @@ -201,7 +207,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSecret, StderrErrResponse] + AppAppSecret | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_secret_v2.py b/nuon/api/apps/create_app_secret_v2.py new file mode 100644 index 00000000..aaad1a24 --- /dev/null +++ b/nuon/api/apps/create_app_secret_v2.py @@ -0,0 +1,219 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_secret import AppAppSecret +from ...models.service_create_app_secret_request import ServiceCreateAppSecretRequest +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + app_id: str, + *, + body: ServiceCreateAppSecretRequest, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": f"/v1/apps/{app_id}/secrets", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppSecret | StderrErrResponse | None: + if response.status_code == 201: + response_201 = AppAppSecret.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: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppSecret | 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: ServiceCreateAppSecretRequest, +) -> Response[AppAppSecret | StderrErrResponse]: + """create an app secret + + Create an app secret that can be used to configure components. To reference an app secret, use + `.nuon.secrets.`. + + **NOTE** secrets can only be written, or deleted, not read. + + Args: + app_id (str): + body (ServiceCreateAppSecretRequest): + + 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[AppAppSecret | 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: ServiceCreateAppSecretRequest, +) -> AppAppSecret | StderrErrResponse | None: + """create an app secret + + Create an app secret that can be used to configure components. To reference an app secret, use + `.nuon.secrets.`. + + **NOTE** secrets can only be written, or deleted, not read. + + Args: + app_id (str): + body (ServiceCreateAppSecretRequest): + + 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: + AppAppSecret | StderrErrResponse + """ + + return sync_detailed( + app_id=app_id, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + app_id: str, + *, + client: AuthenticatedClient, + body: ServiceCreateAppSecretRequest, +) -> Response[AppAppSecret | StderrErrResponse]: + """create an app secret + + Create an app secret that can be used to configure components. To reference an app secret, use + `.nuon.secrets.`. + + **NOTE** secrets can only be written, or deleted, not read. + + Args: + app_id (str): + body (ServiceCreateAppSecretRequest): + + 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[AppAppSecret | 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: ServiceCreateAppSecretRequest, +) -> AppAppSecret | StderrErrResponse | None: + """create an app secret + + Create an app secret that can be used to configure components. To reference an app secret, use + `.nuon.secrets.`. + + **NOTE** secrets can only be written, or deleted, not read. + + Args: + app_id (str): + body (ServiceCreateAppSecretRequest): + + 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: + AppAppSecret | StderrErrResponse + """ + + return ( + await asyncio_detailed( + app_id=app_id, + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/apps/create_app_secrets_config.py b/nuon/api/apps/create_app_secrets_config.py index a95f8faf..0d73a525 100644 --- a/nuon/api/apps/create_app_secrets_config.py +++ b/nuon/api/apps/create_app_secrets_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppSecretsConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppSecretsConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppSecretsConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppSecretsConfigRequest, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> Response[AppAppSecretsConfig | StderrErrResponse]: """Create an app secrets config. Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] + Response[AppAppSecretsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppSecretsConfigRequest, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> AppAppSecretsConfig | StderrErrResponse | None: """Create an app secrets config. Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSecretsConfig, StderrErrResponse] + AppAppSecretsConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppSecretsConfigRequest, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> Response[AppAppSecretsConfig | StderrErrResponse]: """Create an app secrets config. Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] + Response[AppAppSecretsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppSecretsConfigRequest, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> AppAppSecretsConfig | StderrErrResponse | None: """Create an app secrets config. Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSecretsConfig, StderrErrResponse] + AppAppSecretsConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/create_app_stack_config.py b/nuon/api/apps/create_app_stack_config.py index b0a2d884..d8222fa8 100644 --- a/nuon/api/apps/create_app_stack_config.py +++ b/nuon/api/apps/create_app_stack_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppStackConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppStackConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppStackConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppStackConfigRequest, -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: +) -> Response[AppAppStackConfig | StderrErrResponse]: """create an app stack config Create a cloudformation stack config @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppStackConfig, StderrErrResponse]] + Response[AppAppStackConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateAppStackConfigRequest, -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: +) -> AppAppStackConfig | StderrErrResponse | None: """create an app stack config Create a cloudformation stack config @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppStackConfig, StderrErrResponse] + AppAppStackConfig | StderrErrResponse """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateAppStackConfigRequest, -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: +) -> Response[AppAppStackConfig | StderrErrResponse]: """create an app stack config Create a cloudformation stack config @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppStackConfig, StderrErrResponse]] + Response[AppAppStackConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -175,7 +181,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateAppStackConfigRequest, -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: +) -> AppAppStackConfig | StderrErrResponse | None: """create an app stack config Create a cloudformation stack config @@ -189,7 +195,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppStackConfig, StderrErrResponse] + AppAppStackConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/delete_app.py b/nuon/api/apps/delete_app.py index 6f11884e..58dbeb4c 100644 --- a/nuon/api/apps/delete_app.py +++ b/nuon/api/apps/delete_app.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an app Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an app Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an app Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an app Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/apps/delete_app_secret.py b/nuon/api/apps/delete_app_secret.py index 7dba5f5a..42e30135 100644 --- a/nuon/api/apps/delete_app_secret.py +++ b/nuon/api/apps/delete_app_secret.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -22,31 +22,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -54,8 +60,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( secret_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an app secret Delete an app secret. @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( secret_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an app secret Delete an app secret. @@ -117,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -132,7 +138,7 @@ async def asyncio_detailed( secret_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an app secret Delete an app secret. @@ -146,7 +152,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -164,7 +170,7 @@ async def asyncio( secret_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an app secret Delete an app secret. @@ -178,7 +184,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/apps/delete_app_secret_v2.py b/nuon/api/apps/delete_app_secret_v2.py new file mode 100644 index 00000000..6f4c023b --- /dev/null +++ b/nuon/api/apps/delete_app_secret_v2.py @@ -0,0 +1,196 @@ +from http import HTTPStatus +from typing import Any, 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, + secret_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "delete", + "url": f"/v1/apps/{app_id}/secrets/{secret_id}", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: + 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: AuthenticatedClient | Client, response: httpx.Response +) -> Response[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, + secret_id: str, + *, + client: AuthenticatedClient, +) -> Response[StderrErrResponse | bool]: + """delete an app secret + + Delete an app secret. + + Args: + app_id (str): + secret_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[StderrErrResponse | bool] + """ + + kwargs = _get_kwargs( + app_id=app_id, + secret_id=secret_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + secret_id: str, + *, + client: AuthenticatedClient, +) -> StderrErrResponse | bool | None: + """delete an app secret + + Delete an app secret. + + Args: + app_id (str): + secret_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: + StderrErrResponse | bool + """ + + return sync_detailed( + app_id=app_id, + secret_id=secret_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + secret_id: str, + *, + client: AuthenticatedClient, +) -> Response[StderrErrResponse | bool]: + """delete an app secret + + Delete an app secret. + + Args: + app_id (str): + secret_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[StderrErrResponse | bool] + """ + + kwargs = _get_kwargs( + app_id=app_id, + secret_id=secret_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + secret_id: str, + *, + client: AuthenticatedClient, +) -> StderrErrResponse | bool | None: + """delete an app secret + + Delete an app secret. + + Args: + app_id (str): + secret_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: + StderrErrResponse | bool + """ + + return ( + await asyncio_detailed( + app_id=app_id, + secret_id=secret_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app.py b/nuon/api/apps/get_app.py index 078fc2ba..a3dc1f5e 100644 --- a/nuon/api/apps/get_app.py +++ b/nuon/api/apps/get_app.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppApp, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppApp | StderrErrResponse | None: if response.status_code == 200: response_200 = AppApp.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppApp, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppApp | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppApp, StderrErrResponse]]: +) -> Response[AppApp | StderrErrResponse]: """get an app Return an app. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppApp, StderrErrResponse]] + Response[AppApp | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppApp, StderrErrResponse]]: +) -> AppApp | StderrErrResponse | None: """get an app Return an app. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppApp, StderrErrResponse] + AppApp | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppApp, StderrErrResponse]]: +) -> Response[AppApp | StderrErrResponse]: """get an app Return an app. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppApp, StderrErrResponse]] + Response[AppApp | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppApp, StderrErrResponse]]: +) -> AppApp | StderrErrResponse | None: """get an app Return an app. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppApp, StderrErrResponse] + AppApp | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_branch_app_configs.py b/nuon/api/apps/get_app_branch_app_configs.py index b7a9f756..991e49c7 100644 --- a/nuon/api/apps/get_app_branch_app_configs.py +++ b/nuon/api/apps/get_app_branch_app_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -14,9 +14,9 @@ def _get_kwargs( app_id: str, app_branch_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -38,8 +38,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppAppConfig] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,26 +49,32 @@ def _parse_response( 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: @@ -76,8 +82,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppAppConfig]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,25 +97,25 @@ def sync_detailed( app_branch_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppConfig]]: """get app branch app configs Args: app_id (str): app_branch_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppConfig']]] + Response[StderrErrResponse | list[AppAppConfig]] """ kwargs = _get_kwargs( @@ -132,25 +138,25 @@ def sync( app_branch_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppConfig] | None: """get app branch app configs Args: app_id (str): app_branch_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppConfig']] + StderrErrResponse | list[AppAppConfig] """ return sync_detailed( @@ -168,25 +174,25 @@ async def asyncio_detailed( app_branch_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppConfig]]: """get app branch app configs Args: app_id (str): app_branch_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppConfig']]] + Response[StderrErrResponse | list[AppAppConfig]] """ kwargs = _get_kwargs( @@ -207,25 +213,25 @@ async def asyncio( app_branch_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppConfig] | None: """get app branch app configs Args: app_id (str): app_branch_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppConfig']] + StderrErrResponse | list[AppAppConfig] """ return ( diff --git a/nuon/api/apps/get_app_branches.py b/nuon/api/apps/get_app_branches.py index 83687a65..c1bcdf51 100644 --- a/nuon/api/apps/get_app_branches.py +++ b/nuon/api/apps/get_app_branches.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( app_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppAppBranch] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppAppBranch]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppBranch]]: """get app branches Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppBranch']]] + Response[StderrErrResponse | list[AppAppBranch]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppBranch] | None: """get app branches Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppBranch']] + StderrErrResponse | list[AppAppBranch] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppBranch"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppBranch]]: """get app branches Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppBranch']]] + Response[StderrErrResponse | list[AppAppBranch]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppBranch"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppBranch] | None: """get app branches Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppBranch']] + StderrErrResponse | list[AppAppBranch] """ return ( diff --git a/nuon/api/apps/get_app_break_glass_config.py b/nuon/api/apps/get_app_break_glass_config.py index 8e79b418..9c63dc4c 100644 --- a/nuon/api/apps/get_app_break_glass_config.py +++ b/nuon/api/apps/get_app_break_glass_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppBreakGlassConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppBreakGlassConfig.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( break_glass_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: """get app break_glass config Return an app break glass config by id. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + Response[AppAppBreakGlassConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( break_glass_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> AppAppBreakGlassConfig | StderrErrResponse | None: """get app break_glass config Return an app break glass config by id. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] + AppAppBreakGlassConfig | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( break_glass_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: """get app break_glass config Return an app break glass config by id. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + Response[AppAppBreakGlassConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( break_glass_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> AppAppBreakGlassConfig | StderrErrResponse | None: """get app break_glass config Return an app break glass config by id. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] + AppAppBreakGlassConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_config.py b/nuon/api/apps/get_app_config.py index 238c0515..4c575ca1 100644 --- a/nuon/api/apps/get_app_config.py +++ b/nuon/api/apps/get_app_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -14,7 +14,7 @@ def _get_kwargs( app_id: str, app_config_id: str, *, - recurse: Union[Unset, bool] = False, + recurse: bool | Unset = False, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,8 +86,8 @@ def sync_detailed( app_config_id: str, *, client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: + recurse: bool | Unset = False, +) -> Response[AppAppConfig | StderrErrResponse]: """get an app config Fetch an app config by id. @@ -89,14 +95,14 @@ def sync_detailed( Args: app_id (str): app_config_id (str): - recurse (Union[Unset, bool]): Default: False. + recurse (bool | Unset): Default: False. 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[AppAppConfig, StderrErrResponse]] + Response[AppAppConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,8 +123,8 @@ def sync( app_config_id: str, *, client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + recurse: bool | Unset = False, +) -> AppAppConfig | StderrErrResponse | None: """get an app config Fetch an app config by id. @@ -126,14 +132,14 @@ def sync( Args: app_id (str): app_config_id (str): - recurse (Union[Unset, bool]): Default: False. + recurse (bool | Unset): Default: False. 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[AppAppConfig, StderrErrResponse] + AppAppConfig | StderrErrResponse """ return sync_detailed( @@ -149,8 +155,8 @@ async def asyncio_detailed( app_config_id: str, *, client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: + recurse: bool | Unset = False, +) -> Response[AppAppConfig | StderrErrResponse]: """get an app config Fetch an app config by id. @@ -158,14 +164,14 @@ async def asyncio_detailed( Args: app_id (str): app_config_id (str): - recurse (Union[Unset, bool]): Default: False. + recurse (bool | Unset): Default: False. 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[AppAppConfig, StderrErrResponse]] + Response[AppAppConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -184,8 +190,8 @@ async def asyncio( app_config_id: str, *, client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + recurse: bool | Unset = False, +) -> AppAppConfig | StderrErrResponse | None: """get an app config Fetch an app config by id. @@ -193,14 +199,14 @@ async def asyncio( Args: app_id (str): app_config_id (str): - recurse (Union[Unset, bool]): Default: False. + recurse (bool | Unset): Default: False. 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[AppAppConfig, StderrErrResponse] + AppAppConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_config_graph.py b/nuon/api/apps/get_app_config_graph.py index 5ae1791a..d16a464b 100644 --- a/nuon/api/apps/get_app_config_graph.py +++ b/nuon/api/apps/get_app_config_graph.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -22,31 +22,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -54,8 +60,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """get an app config graph Return raw graphviz data as a string that can be used to visualize a graph for an app. @@ -86,7 +92,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -106,7 +112,7 @@ def sync( app_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """get an app config graph Return raw graphviz data as a string that can be used to visualize a graph for an app. @@ -123,7 +129,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -138,7 +144,7 @@ async def asyncio_detailed( app_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """get an app config graph Return raw graphviz data as a string that can be used to visualize a graph for an app. @@ -155,7 +161,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -173,7 +179,7 @@ async def asyncio( app_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """get an app config graph Return raw graphviz data as a string that can be used to visualize a graph for an app. @@ -190,7 +196,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/apps/get_app_config_graph_v2.py b/nuon/api/apps/get_app_config_graph_v2.py new file mode 100644 index 00000000..f14b3b94 --- /dev/null +++ b/nuon/api/apps/get_app_config_graph_v2.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, 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, + app_config_id: str, +) -> dict[str, Any]: + _kwargs: dict[str, Any] = { + "method": "get", + "url": f"/v1/apps/{app_id}/configs/{app_config_id}/graph", + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: + 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: AuthenticatedClient | Client, response: httpx.Response +) -> Response[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( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[StderrErrResponse | str]: + """get an app config graph + + Return raw graphviz data as a string that can be used to visualize a graph for an app. + + Note, for more complex viewing recommend to copy this output directly into [Graphviz + viewer](https://dreampuf.github.io/GraphvizOnline). + + Args: + app_id (str): + app_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[StderrErrResponse | str] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, +) -> StderrErrResponse | str | None: + """get an app config graph + + Return raw graphviz data as a string that can be used to visualize a graph for an app. + + Note, for more complex viewing recommend to copy this output directly into [Graphviz + viewer](https://dreampuf.github.io/GraphvizOnline). + + Args: + app_id (str): + app_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: + StderrErrResponse | str + """ + + return sync_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + ).parsed + + +async def asyncio_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, +) -> Response[StderrErrResponse | str]: + """get an app config graph + + Return raw graphviz data as a string that can be used to visualize a graph for an app. + + Note, for more complex viewing recommend to copy this output directly into [Graphviz + viewer](https://dreampuf.github.io/GraphvizOnline). + + Args: + app_id (str): + app_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[StderrErrResponse | str] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, +) -> StderrErrResponse | str | None: + """get an app config graph + + Return raw graphviz data as a string that can be used to visualize a graph for an app. + + Note, for more complex viewing recommend to copy this output directly into [Graphviz + viewer](https://dreampuf.github.io/GraphvizOnline). + + Args: + app_id (str): + app_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: + StderrErrResponse | str + """ + + return ( + await asyncio_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + ) + ).parsed diff --git a/nuon/api/apps/get_app_config_template.py b/nuon/api/apps/get_app_config_template.py index c512cc6c..5e3a8b83 100644 --- a/nuon/api/apps/get_app_config_template.py +++ b/nuon/api/apps/get_app_config_template.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceAppConfigTemplate | StderrErrResponse | None: if response.status_code == 201: response_201 = ServiceAppConfigTemplate.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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceAppConfigTemplate | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,7 +87,7 @@ def sync_detailed( *, client: AuthenticatedClient, type_: GetAppConfigTemplateType, -) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: +) -> Response[ServiceAppConfigTemplate | StderrErrResponse]: """get an app config template Create an application template which provides a fully rendered config that can be modified and used @@ -96,7 +102,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceAppConfigTemplate, StderrErrResponse]] + Response[ServiceAppConfigTemplate | StderrErrResponse] """ kwargs = _get_kwargs( @@ -116,7 +122,7 @@ def sync( *, client: AuthenticatedClient, type_: GetAppConfigTemplateType, -) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: +) -> ServiceAppConfigTemplate | StderrErrResponse | None: """get an app config template Create an application template which provides a fully rendered config that can be modified and used @@ -131,7 +137,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceAppConfigTemplate, StderrErrResponse] + ServiceAppConfigTemplate | StderrErrResponse """ return sync_detailed( @@ -146,7 +152,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, type_: GetAppConfigTemplateType, -) -> Response[Union[ServiceAppConfigTemplate, StderrErrResponse]]: +) -> Response[ServiceAppConfigTemplate | StderrErrResponse]: """get an app config template Create an application template which provides a fully rendered config that can be modified and used @@ -161,7 +167,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceAppConfigTemplate, StderrErrResponse]] + Response[ServiceAppConfigTemplate | StderrErrResponse] """ kwargs = _get_kwargs( @@ -179,7 +185,7 @@ async def asyncio( *, client: AuthenticatedClient, type_: GetAppConfigTemplateType, -) -> Optional[Union[ServiceAppConfigTemplate, StderrErrResponse]]: +) -> ServiceAppConfigTemplate | StderrErrResponse | None: """get an app config template Create an application template which provides a fully rendered config that can be modified and used @@ -194,7 +200,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceAppConfigTemplate, StderrErrResponse] + ServiceAppConfigTemplate | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_configs.py b/nuon/api/apps/get_app_configs.py index 86fd623d..16ecc6f7 100644 --- a/nuon/api/apps/get_app_configs.py +++ b/nuon/api/apps/get_app_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( app_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppAppConfig] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppAppConfig]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,26 +95,26 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppConfig]]: """get app configs Returns all configs for the app. Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppConfig']]] + Response[StderrErrResponse | list[AppAppConfig]] """ kwargs = _get_kwargs( @@ -129,26 +135,26 @@ def sync( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppConfig] | None: """get app configs Returns all configs for the app. Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppConfig']] + StderrErrResponse | list[AppAppConfig] """ return sync_detailed( @@ -164,26 +170,26 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppConfig]]: """get app configs Returns all configs for the app. Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppConfig']]] + Response[StderrErrResponse | list[AppAppConfig]] """ kwargs = _get_kwargs( @@ -202,26 +208,26 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppConfig] | None: """get app configs Returns all configs for the app. Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppConfig']] + StderrErrResponse | list[AppAppConfig] """ return ( diff --git a/nuon/api/apps/get_app_conflg_v2.py b/nuon/api/apps/get_app_conflg_v2.py new file mode 100644 index 00000000..3f7baa8a --- /dev/null +++ b/nuon/api/apps/get_app_conflg_v2.py @@ -0,0 +1,219 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_app_config import AppAppConfig +from ...models.stderr_err_response import StderrErrResponse +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + app_id: str, + app_config_id: str, + *, + recurse: bool | Unset = False, +) -> dict[str, Any]: + params: dict[str, Any] = {} + + params["recurse"] = recurse + + 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}/configs/{app_config_id}", + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppConfig | StderrErrResponse | None: + if response.status_code == 200: + response_200 = AppAppConfig.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: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppConfig | 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, + app_config_id: str, + *, + client: AuthenticatedClient, + recurse: bool | Unset = False, +) -> Response[AppAppConfig | StderrErrResponse]: + """get an app config + + Fetch an app config by id. + + Args: + app_id (str): + app_config_id (str): + recurse (bool | Unset): Default: False. + + 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[AppAppConfig | StderrErrResponse] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + recurse=recurse, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + recurse: bool | Unset = False, +) -> AppAppConfig | StderrErrResponse | None: + """get an app config + + Fetch an app config by id. + + Args: + app_id (str): + app_config_id (str): + recurse (bool | Unset): Default: False. + + 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: + AppAppConfig | StderrErrResponse + """ + + return sync_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + recurse=recurse, + ).parsed + + +async def asyncio_detailed( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + recurse: bool | Unset = False, +) -> Response[AppAppConfig | StderrErrResponse]: + """get an app config + + Fetch an app config by id. + + Args: + app_id (str): + app_config_id (str): + recurse (bool | Unset): Default: False. + + 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[AppAppConfig | StderrErrResponse] + """ + + kwargs = _get_kwargs( + app_id=app_id, + app_config_id=app_config_id, + recurse=recurse, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + app_id: str, + app_config_id: str, + *, + client: AuthenticatedClient, + recurse: bool | Unset = False, +) -> AppAppConfig | StderrErrResponse | None: + """get an app config + + Fetch an app config by id. + + Args: + app_id (str): + app_config_id (str): + recurse (bool | Unset): Default: False. + + 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: + AppAppConfig | StderrErrResponse + """ + + return ( + await asyncio_detailed( + app_id=app_id, + app_config_id=app_config_id, + client=client, + recurse=recurse, + ) + ).parsed diff --git a/nuon/api/apps/get_app_input_config.py b/nuon/api/apps/get_app_input_config.py index 2f1983e3..a9f22364 100644 --- a/nuon/api/apps/get_app_input_config.py +++ b/nuon/api/apps/get_app_input_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppInputConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppInputConfig.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppInputConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( input_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: +) -> Response[AppAppInputConfig | StderrErrResponse]: """get app input config Return an input config by id. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] + Response[AppAppInputConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( input_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: +) -> AppAppInputConfig | StderrErrResponse | None: """get app input config Return an input config by id. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppInputConfig, StderrErrResponse] + AppAppInputConfig | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( input_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: +) -> Response[AppAppInputConfig | StderrErrResponse]: """get app input config Return an input config by id. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] + Response[AppAppInputConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( input_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: +) -> AppAppInputConfig | StderrErrResponse | None: """get app input config Return an input config by id. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppInputConfig, StderrErrResponse] + AppAppInputConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_input_configs.py b/nuon/api/apps/get_app_input_configs.py index d6326fba..2c0515f3 100644 --- a/nuon/api/apps/get_app_input_configs.py +++ b/nuon/api/apps/get_app_input_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( app_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppAppInputConfig] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppAppInputConfig]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppInputConfig]]: """get app input configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppInputConfig']]] + Response[StderrErrResponse | list[AppAppInputConfig]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppInputConfig] | None: """get app input configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppInputConfig']] + StderrErrResponse | list[AppAppInputConfig] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppInputConfig]]: """get app input configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppInputConfig']]] + Response[StderrErrResponse | list[AppAppInputConfig]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppInputConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppInputConfig] | None: """get app input configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppInputConfig']] + StderrErrResponse | list[AppAppInputConfig] """ return ( diff --git a/nuon/api/apps/get_app_input_latest_config.py b/nuon/api/apps/get_app_input_latest_config.py index 48bd7d5b..958eef0d 100644 --- a/nuon/api/apps/get_app_input_latest_config.py +++ b/nuon/api/apps/get_app_input_latest_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppInputConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppInputConfig.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppInputConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: +) -> Response[AppAppInputConfig | StderrErrResponse]: """get latest app input config Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] + Response[AppAppInputConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: +) -> AppAppInputConfig | StderrErrResponse | None: """get latest app input config Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppInputConfig, StderrErrResponse] + AppAppInputConfig | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppInputConfig, StderrErrResponse]]: +) -> Response[AppAppInputConfig | StderrErrResponse]: """get latest app input config Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppInputConfig, StderrErrResponse]] + Response[AppAppInputConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppInputConfig, StderrErrResponse]]: +) -> AppAppInputConfig | StderrErrResponse | None: """get latest app input config Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppInputConfig, StderrErrResponse] + AppAppInputConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_latest_config.py b/nuon/api/apps/get_app_latest_config.py index 4c808e04..4fe6bbde 100644 --- a/nuon/api/apps/get_app_latest_config.py +++ b/nuon/api/apps/get_app_latest_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,7 +13,7 @@ def _get_kwargs( app_id: str, *, - recurse: Union[Unset, bool] = False, + recurse: bool | Unset = False, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppConfig.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,22 +84,22 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: + recurse: bool | Unset = False, +) -> Response[AppAppConfig | StderrErrResponse]: """get latest app config Returns the most recent config for the provided app. Args: app_id (str): - recurse (Union[Unset, bool]): Default: False. + recurse (bool | Unset): Default: False. 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[AppAppConfig, StderrErrResponse]] + Response[AppAppConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,22 +118,22 @@ def sync( app_id: str, *, client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + recurse: bool | Unset = False, +) -> AppAppConfig | StderrErrResponse | None: """get latest app config Returns the most recent config for the provided app. Args: app_id (str): - recurse (Union[Unset, bool]): Default: False. + recurse (bool | Unset): Default: False. 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[AppAppConfig, StderrErrResponse] + AppAppConfig | StderrErrResponse """ return sync_detailed( @@ -141,22 +147,22 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: + recurse: bool | Unset = False, +) -> Response[AppAppConfig | StderrErrResponse]: """get latest app config Returns the most recent config for the provided app. Args: app_id (str): - recurse (Union[Unset, bool]): Default: False. + recurse (bool | Unset): Default: False. 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[AppAppConfig, StderrErrResponse]] + Response[AppAppConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -173,22 +179,22 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - recurse: Union[Unset, bool] = False, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + recurse: bool | Unset = False, +) -> AppAppConfig | StderrErrResponse | None: """get latest app config Returns the most recent config for the provided app. Args: app_id (str): - recurse (Union[Unset, bool]): Default: False. + recurse (bool | Unset): Default: False. 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[AppAppConfig, StderrErrResponse] + AppAppConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_permissions_config.py b/nuon/api/apps/get_app_permissions_config.py index bd60e37f..affbca1f 100644 --- a/nuon/api/apps/get_app_permissions_config.py +++ b/nuon/api/apps/get_app_permissions_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppPermissionsConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppPermissionsConfig.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( permissions_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: """get app permissions config Return an app permissions config by id. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + Response[AppAppPermissionsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( permissions_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> AppAppPermissionsConfig | StderrErrResponse | None: """get app permissions config Return an app permissions config by id. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] + AppAppPermissionsConfig | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( permissions_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: """get app permissions config Return an app permissions config by id. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + Response[AppAppPermissionsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( permissions_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> AppAppPermissionsConfig | StderrErrResponse | None: """get app permissions config Return an app permissions config by id. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] + AppAppPermissionsConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_policies_config.py b/nuon/api/apps/get_app_policies_config.py index ae67f9b6..f19b647b 100644 --- a/nuon/api/apps/get_app_policies_config.py +++ b/nuon/api/apps/get_app_policies_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppPoliciesConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppPoliciesConfig.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( policies_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: """get app policies config Return an app policy config by id. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + Response[AppAppPoliciesConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( policies_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> AppAppPoliciesConfig | StderrErrResponse | None: """get app policies config Return an app policy config by id. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] + AppAppPoliciesConfig | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( policies_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: """get app policies config Return an app policy config by id. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + Response[AppAppPoliciesConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( policies_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> AppAppPoliciesConfig | StderrErrResponse | None: """get app policies config Return an app policy config by id. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] + AppAppPoliciesConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_runner_configs.py b/nuon/api/apps/get_app_runner_configs.py index dbc0f9e8..7481b47e 100644 --- a/nuon/api/apps/get_app_runner_configs.py +++ b/nuon/api/apps/get_app_runner_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( app_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppAppRunnerConfig] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppAppRunnerConfig]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppRunnerConfig]]: """get app runner configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppRunnerConfig']]] + Response[StderrErrResponse | list[AppAppRunnerConfig]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppRunnerConfig] | None: """get app runner configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppRunnerConfig']] + StderrErrResponse | list[AppAppRunnerConfig] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppRunnerConfig]]: """get app runner configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppRunnerConfig']]] + Response[StderrErrResponse | list[AppAppRunnerConfig]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppRunnerConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppRunnerConfig] | None: """get app runner configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppRunnerConfig']] + StderrErrResponse | list[AppAppRunnerConfig] """ return ( diff --git a/nuon/api/apps/get_app_runner_latest_config.py b/nuon/api/apps/get_app_runner_latest_config.py index 10b13fb0..219aa2c8 100644 --- a/nuon/api/apps/get_app_runner_latest_config.py +++ b/nuon/api/apps/get_app_runner_latest_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppRunnerConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppRunnerConfig.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppRunnerConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: +) -> Response[AppAppRunnerConfig | StderrErrResponse]: """get latest app runner config Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppRunnerConfig, StderrErrResponse]] + Response[AppAppRunnerConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: +) -> AppAppRunnerConfig | StderrErrResponse | None: """get latest app runner config Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppRunnerConfig, StderrErrResponse] + AppAppRunnerConfig | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppRunnerConfig, StderrErrResponse]]: +) -> Response[AppAppRunnerConfig | StderrErrResponse]: """get latest app runner config Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppRunnerConfig, StderrErrResponse]] + Response[AppAppRunnerConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppRunnerConfig, StderrErrResponse]]: +) -> AppAppRunnerConfig | StderrErrResponse | None: """get latest app runner config Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppRunnerConfig, StderrErrResponse] + AppAppRunnerConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_sandbox_configs.py b/nuon/api/apps/get_app_sandbox_configs.py index 0f52ba44..18500f8b 100644 --- a/nuon/api/apps/get_app_sandbox_configs.py +++ b/nuon/api/apps/get_app_sandbox_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( app_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppAppSandboxConfig] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppAppSandboxConfig]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppSandboxConfig]]: """get app sandbox configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppSandboxConfig']]] + Response[StderrErrResponse | list[AppAppSandboxConfig]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppSandboxConfig] | None: """get app sandbox configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppSandboxConfig']] + StderrErrResponse | list[AppAppSandboxConfig] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppSandboxConfig]]: """get app sandbox configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppSandboxConfig']]] + Response[StderrErrResponse | list[AppAppSandboxConfig]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppSandboxConfig"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppSandboxConfig] | None: """get app sandbox configs Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppSandboxConfig']] + StderrErrResponse | list[AppAppSandboxConfig] """ return ( diff --git a/nuon/api/apps/get_app_sandbox_latest_config.py b/nuon/api/apps/get_app_sandbox_latest_config.py index 52e1db1c..5c98621a 100644 --- a/nuon/api/apps/get_app_sandbox_latest_config.py +++ b/nuon/api/apps/get_app_sandbox_latest_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppSandboxConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppSandboxConfig.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppSandboxConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: +) -> Response[AppAppSandboxConfig | StderrErrResponse]: """get latest app sandbox config Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSandboxConfig, StderrErrResponse]] + Response[AppAppSandboxConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: +) -> AppAppSandboxConfig | StderrErrResponse | None: """get latest app sandbox config Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSandboxConfig, StderrErrResponse] + AppAppSandboxConfig | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppSandboxConfig, StderrErrResponse]]: +) -> Response[AppAppSandboxConfig | StderrErrResponse]: """get latest app sandbox config Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSandboxConfig, StderrErrResponse]] + Response[AppAppSandboxConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppSandboxConfig, StderrErrResponse]]: +) -> AppAppSandboxConfig | StderrErrResponse | None: """get latest app sandbox config Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSandboxConfig, StderrErrResponse] + AppAppSandboxConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_secrets.py b/nuon/api/apps/get_app_secrets.py index 28f49914..ebd2d6ba 100644 --- a/nuon/api/apps/get_app_secrets.py +++ b/nuon/api/apps/get_app_secrets.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( app_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppAppSecret] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppAppSecret]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,10 +95,10 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppSecret]]: """get app secrets List all secrets for an app. @@ -101,16 +107,16 @@ def sync_detailed( Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppSecret']]] + Response[StderrErrResponse | list[AppAppSecret]] """ kwargs = _get_kwargs( @@ -131,10 +137,10 @@ def sync( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppSecret] | None: """get app secrets List all secrets for an app. @@ -143,16 +149,16 @@ def sync( Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppSecret']] + StderrErrResponse | list[AppAppSecret] """ return sync_detailed( @@ -168,10 +174,10 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppAppSecret"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppAppSecret]]: """get app secrets List all secrets for an app. @@ -180,16 +186,16 @@ async def asyncio_detailed( Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppSecret']]] + Response[StderrErrResponse | list[AppAppSecret]] """ kwargs = _get_kwargs( @@ -208,10 +214,10 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppAppSecret"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppAppSecret] | None: """get app secrets List all secrets for an app. @@ -220,16 +226,16 @@ async def asyncio( Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppAppSecret']] + StderrErrResponse | list[AppAppSecret] """ return ( diff --git a/nuon/api/apps/get_app_secrets_config.py b/nuon/api/apps/get_app_secrets_config.py index 63dd6441..e8a0b71b 100644 --- a/nuon/api/apps/get_app_secrets_config.py +++ b/nuon/api/apps/get_app_secrets_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppSecretsConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppSecretsConfig.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppSecretsConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( app_secrets_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> Response[AppAppSecretsConfig | StderrErrResponse]: """get app secrets config Return an app secrets config by id. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] + Response[AppAppSecretsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( app_secrets_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> AppAppSecretsConfig | StderrErrResponse | None: """get app secrets config Return an app secrets config by id. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSecretsConfig, StderrErrResponse] + AppAppSecretsConfig | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( app_secrets_config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> Response[AppAppSecretsConfig | StderrErrResponse]: """get app secrets config Return an app secrets config by id. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] + Response[AppAppSecretsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( app_secrets_config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> AppAppSecretsConfig | StderrErrResponse | None: """get app secrets config Return an app secrets config by id. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSecretsConfig, StderrErrResponse] + AppAppSecretsConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_app_stack_config.py b/nuon/api/apps/get_app_stack_config.py index f0f1c315..f1ea0af4 100644 --- a/nuon/api/apps/get_app_stack_config.py +++ b/nuon/api/apps/get_app_stack_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppStackConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppStackConfig.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppStackConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: +) -> Response[AppAppStackConfig | StderrErrResponse]: """get app stack config Return a cloudformation stack config @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppStackConfig, StderrErrResponse]] + Response[AppAppStackConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: +) -> AppAppStackConfig | StderrErrResponse | None: """get app stack config Return a cloudformation stack config @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppStackConfig, StderrErrResponse] + AppAppStackConfig | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppStackConfig, StderrErrResponse]]: +) -> Response[AppAppStackConfig | StderrErrResponse]: """get app stack config Return a cloudformation stack config @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppStackConfig, StderrErrResponse]] + Response[AppAppStackConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppStackConfig, StderrErrResponse]]: +) -> AppAppStackConfig | StderrErrResponse | None: """get app stack config Return a cloudformation stack config @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppStackConfig, StderrErrResponse] + AppAppStackConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_apps.py b/nuon/api/apps/get_apps.py index b4fff9ff..5e6c03bf 100644 --- a/nuon/api/apps/get_apps.py +++ b/nuon/api/apps/get_apps.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -39,8 +39,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppApp] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -50,26 +50,32 @@ def _parse_response( 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: @@ -77,8 +83,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppApp"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppApp]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -90,25 +96,25 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppApp"]]]: + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppApp]]: """get all apps for the current org Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + q (str | Unset): + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppApp']]] + Response[StderrErrResponse | list[AppApp]] """ kwargs = _get_kwargs( @@ -128,25 +134,25 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppApp] | None: """get all apps for the current org Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + q (str | Unset): + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppApp']] + StderrErrResponse | list[AppApp] """ return sync_detailed( @@ -161,25 +167,25 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppApp"]]]: + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppApp]]: """get all apps for the current org Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + q (str | Unset): + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppApp']]] + Response[StderrErrResponse | list[AppApp]] """ kwargs = _get_kwargs( @@ -197,25 +203,25 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppApp"]]]: + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppApp] | None: """get all apps for the current org Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + q (str | Unset): + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppApp']] + StderrErrResponse | list[AppApp] """ return ( 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 237425b2..b1bf815b 100644 --- a/nuon/api/apps/get_latest_app_break_glass_config.py +++ b/nuon/api/apps/get_latest_app_break_glass_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppBreakGlassConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppBreakGlassConfig.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: """get latest app break glass config Get the latest break glass config for an app. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + Response[AppAppBreakGlassConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> AppAppBreakGlassConfig | StderrErrResponse | None: """get latest app break glass config Get the latest break glass config for an app. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] + AppAppBreakGlassConfig | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> Response[AppAppBreakGlassConfig | StderrErrResponse]: """get latest app break glass config Get the latest break glass config for an app. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppBreakGlassConfig, StderrErrResponse]] + Response[AppAppBreakGlassConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppBreakGlassConfig, StderrErrResponse]]: +) -> AppAppBreakGlassConfig | StderrErrResponse | None: """get latest app break glass config Get the latest break glass config for an app. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppBreakGlassConfig, StderrErrResponse] + AppAppBreakGlassConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_latest_app_permissions_config.py b/nuon/api/apps/get_latest_app_permissions_config.py index 3dcd61e0..6af9699f 100644 --- a/nuon/api/apps/get_latest_app_permissions_config.py +++ b/nuon/api/apps/get_latest_app_permissions_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppPermissionsConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppPermissionsConfig.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: """get latest app permissions config Get the latest app permissions config. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + Response[AppAppPermissionsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> AppAppPermissionsConfig | StderrErrResponse | None: """get latest app permissions config Get the latest app permissions config. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] + AppAppPermissionsConfig | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> Response[AppAppPermissionsConfig | StderrErrResponse]: """get latest app permissions config Get the latest app permissions config. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPermissionsConfig, StderrErrResponse]] + Response[AppAppPermissionsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppPermissionsConfig, StderrErrResponse]]: +) -> AppAppPermissionsConfig | StderrErrResponse | None: """get latest app permissions config Get the latest app permissions config. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPermissionsConfig, StderrErrResponse] + AppAppPermissionsConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_latest_app_policies_config.py b/nuon/api/apps/get_latest_app_policies_config.py index ace2571b..f8a22af2 100644 --- a/nuon/api/apps/get_latest_app_policies_config.py +++ b/nuon/api/apps/get_latest_app_policies_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppPoliciesConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppPoliciesConfig.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: """get latest app policies config Get latest app policies config. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + Response[AppAppPoliciesConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> AppAppPoliciesConfig | StderrErrResponse | None: """get latest app policies config Get latest app policies config. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] + AppAppPoliciesConfig | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> Response[AppAppPoliciesConfig | StderrErrResponse]: """get latest app policies config Get latest app policies config. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppPoliciesConfig, StderrErrResponse]] + Response[AppAppPoliciesConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppPoliciesConfig, StderrErrResponse]]: +) -> AppAppPoliciesConfig | StderrErrResponse | None: """get latest app policies config Get latest app policies config. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppPoliciesConfig, StderrErrResponse] + AppAppPoliciesConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/get_latest_app_secrets_config.py b/nuon/api/apps/get_latest_app_secrets_config.py index 49ac7897..616a58b2 100644 --- a/nuon/api/apps/get_latest_app_secrets_config.py +++ b/nuon/api/apps/get_latest_app_secrets_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppSecretsConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = AppAppSecretsConfig.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppSecretsConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> Response[AppAppSecretsConfig | StderrErrResponse]: """get latest app secrets config Get the latest app secrets config. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] + Response[AppAppSecretsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> AppAppSecretsConfig | StderrErrResponse | None: """get latest app secrets config Get the latest app secrets config. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSecretsConfig, StderrErrResponse] + AppAppSecretsConfig | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> Response[AppAppSecretsConfig | StderrErrResponse]: """get latest app secrets config Get the latest app secrets config. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppSecretsConfig, StderrErrResponse]] + Response[AppAppSecretsConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppAppSecretsConfig, StderrErrResponse]]: +) -> AppAppSecretsConfig | StderrErrResponse | None: """get latest app secrets config Get the latest app secrets config. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppSecretsConfig, StderrErrResponse] + AppAppSecretsConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/update_app.py b/nuon/api/apps/update_app.py index c86fa855..45eed23a 100644 --- a/nuon/api/apps/update_app.py +++ b/nuon/api/apps/update_app.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppApp, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppApp | StderrErrResponse | None: if response.status_code == 200: response_200 = AppApp.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppApp, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppApp | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateAppRequest, -) -> Response[Union[AppApp, StderrErrResponse]]: +) -> Response[AppApp | StderrErrResponse]: """update an app Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppApp, StderrErrResponse]] + Response[AppApp | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateAppRequest, -) -> Optional[Union[AppApp, StderrErrResponse]]: +) -> AppApp | StderrErrResponse | None: """update an app Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppApp, StderrErrResponse] + AppApp | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateAppRequest, -) -> Response[Union[AppApp, StderrErrResponse]]: +) -> Response[AppApp | StderrErrResponse]: """update an app Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppApp, StderrErrResponse]] + Response[AppApp | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateAppRequest, -) -> Optional[Union[AppApp, StderrErrResponse]]: +) -> AppApp | StderrErrResponse | None: """update an app Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppApp, StderrErrResponse] + AppApp | StderrErrResponse """ return ( diff --git a/nuon/api/apps/update_app_config.py b/nuon/api/apps/update_app_config.py index b0656c1a..fb417296 100644 --- a/nuon/api/apps/update_app_config.py +++ b/nuon/api/apps/update_app_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAppConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppAppConfig.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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAppConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAppConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateAppConfigRequest, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: +) -> Response[AppAppConfig | StderrErrResponse]: """Update an app config, setting status and state. Args: @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppConfig, StderrErrResponse]] + Response[AppAppConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateAppConfigRequest, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: +) -> AppAppConfig | StderrErrResponse | None: """Update an app config, setting status and state. Args: @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppConfig, StderrErrResponse] + AppAppConfig | StderrErrResponse """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateAppConfigRequest, -) -> Response[Union[AppAppConfig, StderrErrResponse]]: +) -> Response[AppAppConfig | StderrErrResponse]: """Update an app config, setting status and state. Args: @@ -160,7 +166,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAppConfig, StderrErrResponse]] + Response[AppAppConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -180,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateAppConfigRequest, -) -> Optional[Union[AppAppConfig, StderrErrResponse]]: +) -> AppAppConfig | StderrErrResponse | None: """Update an app config, setting status and state. Args: @@ -193,7 +199,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAppConfig, StderrErrResponse] + AppAppConfig | StderrErrResponse """ return ( diff --git a/nuon/api/apps/update_app_config_installs.py b/nuon/api/apps/update_app_config_installs.py index 2a245d8f..28ea76e7 100644 --- a/nuon/api/apps/update_app_config_installs.py +++ b/nuon/api/apps/update_app_config_installs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -32,31 +32,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateAppConfigInstallsRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """ Args: app_id (str): @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateAppConfigInstallsRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """ Args: app_id (str): @@ -126,7 +132,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateAppConfigInstallsRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """ Args: app_id (str): @@ -155,7 +161,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -175,7 +181,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateAppConfigInstallsRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """ Args: app_id (str): @@ -187,7 +193,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/components/build_all_components.py b/nuon/api/components/build_all_components.py index e7a1cc36..11c93aee 100644 --- a/nuon/api/components/build_all_components.py +++ b/nuon/api/components/build_all_components.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,8 +32,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponentBuild] | None: if response.status_code == 201: response_201 = [] _response_201 = response.json() @@ -43,26 +43,32 @@ def _parse_response( 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: @@ -70,8 +76,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponentBuild]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -85,7 +91,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceBuildAllComponentsRequest, -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: +) -> Response[StderrErrResponse | list[AppComponentBuild]]: """create component build Args: @@ -97,7 +103,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppComponentBuild']]] + Response[StderrErrResponse | list[AppComponentBuild]] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceBuildAllComponentsRequest, -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: +) -> StderrErrResponse | list[AppComponentBuild] | None: """create component build Args: @@ -129,7 +135,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppComponentBuild']] + StderrErrResponse | list[AppComponentBuild] """ return sync_detailed( @@ -144,7 +150,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceBuildAllComponentsRequest, -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: +) -> Response[StderrErrResponse | list[AppComponentBuild]]: """create component build Args: @@ -156,7 +162,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppComponentBuild']]] + Response[StderrErrResponse | list[AppComponentBuild]] """ kwargs = _get_kwargs( @@ -174,7 +180,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceBuildAllComponentsRequest, -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: +) -> StderrErrResponse | list[AppComponentBuild] | None: """create component build Args: @@ -186,7 +192,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppComponentBuild']] + StderrErrResponse | list[AppComponentBuild] """ return ( diff --git a/nuon/api/components/create_app_component_build.py b/nuon/api/components/create_app_component_build.py index 4fbfa030..87031014 100644 --- a/nuon/api/components/create_app_component_build.py +++ b/nuon/api/components/create_app_component_build.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentBuild | StderrErrResponse | None: 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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentBuild | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateComponentBuildRequest, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """create component build Args: @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateComponentBuildRequest, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """create component build Args: @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateComponentBuildRequest, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """create component build Args: @@ -160,7 +166,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -180,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateComponentBuildRequest, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """create component build Args: @@ -193,7 +199,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_app_docker_build_component_config.py b/nuon/api/components/create_app_docker_build_component_config.py index d0f4c067..07f172d1 100644 --- a/nuon/api/components/create_app_docker_build_component_config.py +++ b/nuon/api/components/create_app_docker_build_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -35,32 +35,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppDockerBuildComponentConfig | StderrErrResponse | None: 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: @@ -68,8 +74,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppDockerBuildComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -84,7 +90,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: +) -> Response[AppDockerBuildComponentConfig | StderrErrResponse]: """create a docker build component config Args: @@ -97,7 +103,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + Response[AppDockerBuildComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -119,7 +125,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: +) -> AppDockerBuildComponentConfig | StderrErrResponse | None: """create a docker build component config Args: @@ -132,7 +138,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppDockerBuildComponentConfig, StderrErrResponse] + AppDockerBuildComponentConfig | StderrErrResponse """ return sync_detailed( @@ -149,7 +155,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: +) -> Response[AppDockerBuildComponentConfig | StderrErrResponse]: """create a docker build component config Args: @@ -162,7 +168,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + Response[AppDockerBuildComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -182,7 +188,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: +) -> AppDockerBuildComponentConfig | StderrErrResponse | None: """create a docker build component config Args: @@ -195,7 +201,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppDockerBuildComponentConfig, StderrErrResponse] + AppDockerBuildComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_app_helm_component_config.py b/nuon/api/components/create_app_helm_component_config.py index 9ffc2ee4..68d46c6d 100644 --- a/nuon/api/components/create_app_helm_component_config.py +++ b/nuon/api/components/create_app_helm_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppHelmComponentConfig | StderrErrResponse | None: 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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppHelmComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateHelmComponentConfigRequest, -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: +) -> Response[AppHelmComponentConfig | StderrErrResponse]: """create a helm component config Create a helm component config. @@ -97,7 +103,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppHelmComponentConfig, StderrErrResponse]] + Response[AppHelmComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -119,7 +125,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateHelmComponentConfigRequest, -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: +) -> AppHelmComponentConfig | StderrErrResponse | None: """create a helm component config Create a helm component config. @@ -134,7 +140,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppHelmComponentConfig, StderrErrResponse] + AppHelmComponentConfig | StderrErrResponse """ return sync_detailed( @@ -151,7 +157,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateHelmComponentConfigRequest, -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: +) -> Response[AppHelmComponentConfig | StderrErrResponse]: """create a helm component config Create a helm component config. @@ -166,7 +172,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppHelmComponentConfig, StderrErrResponse]] + Response[AppHelmComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -186,7 +192,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateHelmComponentConfigRequest, -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: +) -> AppHelmComponentConfig | StderrErrResponse | None: """create a helm component config Create a helm component config. @@ -201,7 +207,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppHelmComponentConfig, StderrErrResponse] + AppHelmComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_app_kubernetes_manifest_component_config.py b/nuon/api/components/create_app_kubernetes_manifest_component_config.py index 383bbf42..865431fb 100644 --- a/nuon/api/components/create_app_kubernetes_manifest_component_config.py +++ b/nuon/api/components/create_app_kubernetes_manifest_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -35,32 +35,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppKubernetesManifestComponentConfig | StderrErrResponse | None: 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: @@ -68,8 +74,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppKubernetesManifestComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -84,7 +90,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: +) -> Response[AppKubernetesManifestComponentConfig | StderrErrResponse]: """create a kubernetes manifest component config Args: @@ -97,7 +103,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + Response[AppKubernetesManifestComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -119,7 +125,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: +) -> AppKubernetesManifestComponentConfig | StderrErrResponse | None: """create a kubernetes manifest component config Args: @@ -132,7 +138,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + AppKubernetesManifestComponentConfig | StderrErrResponse """ return sync_detailed( @@ -149,7 +155,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: +) -> Response[AppKubernetesManifestComponentConfig | StderrErrResponse]: """create a kubernetes manifest component config Args: @@ -162,7 +168,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + Response[AppKubernetesManifestComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -182,7 +188,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: +) -> AppKubernetesManifestComponentConfig | StderrErrResponse | None: """create a kubernetes manifest component config Args: @@ -195,7 +201,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + AppKubernetesManifestComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_app_terraform_module_component_config.py b/nuon/api/components/create_app_terraform_module_component_config.py index 90d82ed0..df2d4449 100644 --- a/nuon/api/components/create_app_terraform_module_component_config.py +++ b/nuon/api/components/create_app_terraform_module_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -35,32 +35,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformModuleComponentConfig | StderrErrResponse | None: 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: @@ -68,8 +74,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformModuleComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -84,7 +90,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: +) -> Response[AppTerraformModuleComponentConfig | StderrErrResponse]: """create a terraform component config Create a terraform component config. @@ -99,7 +105,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + Response[AppTerraformModuleComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -121,7 +127,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: +) -> AppTerraformModuleComponentConfig | StderrErrResponse | None: """create a terraform component config Create a terraform component config. @@ -136,7 +142,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformModuleComponentConfig, StderrErrResponse] + AppTerraformModuleComponentConfig | StderrErrResponse """ return sync_detailed( @@ -153,7 +159,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: +) -> Response[AppTerraformModuleComponentConfig | StderrErrResponse]: """create a terraform component config Create a terraform component config. @@ -168,7 +174,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + Response[AppTerraformModuleComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -188,7 +194,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: +) -> AppTerraformModuleComponentConfig | StderrErrResponse | None: """create a terraform component config Create a terraform component config. @@ -203,7 +209,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformModuleComponentConfig, StderrErrResponse] + AppTerraformModuleComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_component.py b/nuon/api/components/create_component.py index 86c12e3d..fe8f08bf 100644 --- a/nuon/api/components/create_component.py +++ b/nuon/api/components/create_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponent | StderrErrResponse | None: if response.status_code == 201: response_201 = AppComponent.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponent | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """create a component Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """create a component Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """create a component Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """create a component Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_component_build.py b/nuon/api/components/create_component_build.py index 73661cf0..8626d2af 100644 --- a/nuon/api/components/create_component_build.py +++ b/nuon/api/components/create_component_build.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentBuild | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentBuild | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateComponentBuildRequest, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """create component build Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateComponentBuildRequest, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """create component build Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateComponentBuildRequest, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """create component build Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateComponentBuildRequest, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """create component build Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_docker_build_component_config.py b/nuon/api/components/create_docker_build_component_config.py index 28030383..6bd15a24 100644 --- a/nuon/api/components/create_docker_build_component_config.py +++ b/nuon/api/components/create_docker_build_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -34,32 +34,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppDockerBuildComponentConfig | StderrErrResponse | None: 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: @@ -67,8 +73,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppDockerBuildComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: +) -> Response[AppDockerBuildComponentConfig | StderrErrResponse]: """create a docker build component config Args: @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + Response[AppDockerBuildComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: +) -> AppDockerBuildComponentConfig | StderrErrResponse | None: """create a docker build component config Args: @@ -126,7 +132,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppDockerBuildComponentConfig, StderrErrResponse] + AppDockerBuildComponentConfig | StderrErrResponse """ return sync_detailed( @@ -141,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: +) -> Response[AppDockerBuildComponentConfig | StderrErrResponse]: """create a docker build component config Args: @@ -153,7 +159,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppDockerBuildComponentConfig, StderrErrResponse]] + Response[AppDockerBuildComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -171,7 +177,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateDockerBuildComponentConfigRequest, -) -> Optional[Union[AppDockerBuildComponentConfig, StderrErrResponse]]: +) -> AppDockerBuildComponentConfig | StderrErrResponse | None: """create a docker build component config Args: @@ -183,7 +189,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppDockerBuildComponentConfig, StderrErrResponse] + AppDockerBuildComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_external_image_component_config.py b/nuon/api/components/create_external_image_component_config.py index 7fc500d1..dea4b2c8 100644 --- a/nuon/api/components/create_external_image_component_config.py +++ b/nuon/api/components/create_external_image_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -34,32 +34,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppExternalImageComponentConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppExternalImageComponentConfig.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: @@ -67,8 +73,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppExternalImageComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateExternalImageComponentConfigRequest, -) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: +) -> Response[AppExternalImageComponentConfig | StderrErrResponse]: """create an external image component config Args: @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppExternalImageComponentConfig, StderrErrResponse]] + Response[AppExternalImageComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateExternalImageComponentConfigRequest, -) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: +) -> AppExternalImageComponentConfig | StderrErrResponse | None: """create an external image component config Args: @@ -126,7 +132,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppExternalImageComponentConfig, StderrErrResponse] + AppExternalImageComponentConfig | StderrErrResponse """ return sync_detailed( @@ -141,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateExternalImageComponentConfigRequest, -) -> Response[Union[AppExternalImageComponentConfig, StderrErrResponse]]: +) -> Response[AppExternalImageComponentConfig | StderrErrResponse]: """create an external image component config Args: @@ -153,7 +159,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppExternalImageComponentConfig, StderrErrResponse]] + Response[AppExternalImageComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -171,7 +177,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateExternalImageComponentConfigRequest, -) -> Optional[Union[AppExternalImageComponentConfig, StderrErrResponse]]: +) -> AppExternalImageComponentConfig | StderrErrResponse | None: """create an external image component config Args: @@ -183,7 +189,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppExternalImageComponentConfig, StderrErrResponse] + AppExternalImageComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_helm_component_config.py b/nuon/api/components/create_helm_component_config.py index 28ff8ea2..141d5b4b 100644 --- a/nuon/api/components/create_helm_component_config.py +++ b/nuon/api/components/create_helm_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppHelmComponentConfig | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppHelmComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateHelmComponentConfigRequest, -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: +) -> Response[AppHelmComponentConfig | StderrErrResponse]: """create a helm component config Create a helm component config. @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppHelmComponentConfig, StderrErrResponse]] + Response[AppHelmComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateHelmComponentConfigRequest, -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: +) -> AppHelmComponentConfig | StderrErrResponse | None: """create a helm component config Create a helm component config. @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppHelmComponentConfig, StderrErrResponse] + AppHelmComponentConfig | StderrErrResponse """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateHelmComponentConfigRequest, -) -> Response[Union[AppHelmComponentConfig, StderrErrResponse]]: +) -> Response[AppHelmComponentConfig | StderrErrResponse]: """create a helm component config Create a helm component config. @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppHelmComponentConfig, StderrErrResponse]] + Response[AppHelmComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -175,7 +181,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateHelmComponentConfigRequest, -) -> Optional[Union[AppHelmComponentConfig, StderrErrResponse]]: +) -> AppHelmComponentConfig | StderrErrResponse | None: """create a helm component config Create a helm component config. @@ -189,7 +195,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppHelmComponentConfig, StderrErrResponse] + AppHelmComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_job_component_config.py b/nuon/api/components/create_job_component_config.py index db32eab2..c8df20b9 100644 --- a/nuon/api/components/create_job_component_config.py +++ b/nuon/api/components/create_job_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppJobComponentConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppJobComponentConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppJobComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateJobComponentConfigRequest, -) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: +) -> Response[AppJobComponentConfig | StderrErrResponse]: """create a job component config Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppJobComponentConfig, StderrErrResponse]] + Response[AppJobComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateJobComponentConfigRequest, -) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: +) -> AppJobComponentConfig | StderrErrResponse | None: """create a job component config Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppJobComponentConfig, StderrErrResponse] + AppJobComponentConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateJobComponentConfigRequest, -) -> Response[Union[AppJobComponentConfig, StderrErrResponse]]: +) -> Response[AppJobComponentConfig | StderrErrResponse]: """create a job component config Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppJobComponentConfig, StderrErrResponse]] + Response[AppJobComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateJobComponentConfigRequest, -) -> Optional[Union[AppJobComponentConfig, StderrErrResponse]]: +) -> AppJobComponentConfig | StderrErrResponse | None: """create a job component config Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppJobComponentConfig, StderrErrResponse] + AppJobComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_kubernetes_manifest_component_config.py b/nuon/api/components/create_kubernetes_manifest_component_config.py index 5ae46a12..966bdc0d 100644 --- a/nuon/api/components/create_kubernetes_manifest_component_config.py +++ b/nuon/api/components/create_kubernetes_manifest_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -34,32 +34,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppKubernetesManifestComponentConfig | StderrErrResponse | None: 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: @@ -67,8 +73,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppKubernetesManifestComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: +) -> Response[AppKubernetesManifestComponentConfig | StderrErrResponse]: """create a kubernetes manifest component config Args: @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + Response[AppKubernetesManifestComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: +) -> AppKubernetesManifestComponentConfig | StderrErrResponse | None: """create a kubernetes manifest component config Args: @@ -126,7 +132,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + AppKubernetesManifestComponentConfig | StderrErrResponse """ return sync_detailed( @@ -141,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: +) -> Response[AppKubernetesManifestComponentConfig | StderrErrResponse]: """create a kubernetes manifest component config Args: @@ -153,7 +159,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]] + Response[AppKubernetesManifestComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -171,7 +177,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateKubernetesManifestComponentConfigRequest, -) -> Optional[Union[AppKubernetesManifestComponentConfig, StderrErrResponse]]: +) -> AppKubernetesManifestComponentConfig | StderrErrResponse | None: """create a kubernetes manifest component config Args: @@ -183,7 +189,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppKubernetesManifestComponentConfig, StderrErrResponse] + AppKubernetesManifestComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/create_terraform_module_component_config.py b/nuon/api/components/create_terraform_module_component_config.py index 7953122c..9e322ae9 100644 --- a/nuon/api/components/create_terraform_module_component_config.py +++ b/nuon/api/components/create_terraform_module_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -34,32 +34,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformModuleComponentConfig | StderrErrResponse | None: 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: @@ -67,8 +73,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformModuleComponentConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: +) -> Response[AppTerraformModuleComponentConfig | StderrErrResponse]: """create a terraform component config Create a terraform component config. @@ -96,7 +102,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + Response[AppTerraformModuleComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -116,7 +122,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: +) -> AppTerraformModuleComponentConfig | StderrErrResponse | None: """create a terraform component config Create a terraform component config. @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformModuleComponentConfig, StderrErrResponse] + AppTerraformModuleComponentConfig | StderrErrResponse """ return sync_detailed( @@ -145,7 +151,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: +) -> Response[AppTerraformModuleComponentConfig | StderrErrResponse]: """create a terraform component config Create a terraform component config. @@ -159,7 +165,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformModuleComponentConfig, StderrErrResponse]] + Response[AppTerraformModuleComponentConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -177,7 +183,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateTerraformModuleComponentConfigRequest, -) -> Optional[Union[AppTerraformModuleComponentConfig, StderrErrResponse]]: +) -> AppTerraformModuleComponentConfig | StderrErrResponse | None: """create a terraform component config Create a terraform component config. @@ -191,7 +197,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformModuleComponentConfig, StderrErrResponse] + AppTerraformModuleComponentConfig | StderrErrResponse """ return ( diff --git a/nuon/api/components/delete_app_component.py b/nuon/api/components/delete_app_component.py index 902bc99c..db154ca6 100644 --- a/nuon/api/components/delete_app_component.py +++ b/nuon/api/components/delete_app_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -22,31 +22,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -54,8 +60,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete a component Args: @@ -81,7 +87,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -101,7 +107,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete a component Args: @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -128,7 +134,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete a component Args: @@ -140,7 +146,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete a component Args: @@ -170,7 +176,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/components/delete_component.py b/nuon/api/components/delete_component.py index 814015cd..d4867948 100644 --- a/nuon/api/components/delete_component.py +++ b/nuon/api/components/delete_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete a component Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete a component Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete a component Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete a component Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/components/get_app_component.py b/nuon/api/components/get_app_component.py index 80b0a5aa..1e7dff60 100644 --- a/nuon/api/components/get_app_component.py +++ b/nuon/api/components/get_app_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponent | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponent | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( component_name_or_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """get a components for a specific app Return an app component by id or name. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( component_name_or_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """get a components for a specific app Return an app component by id or name. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( component_name_or_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """get a components for a specific app Return an app component by id or name. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( component_name_or_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """get a components for a specific app Return an app component by id or name. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_app_component_build.py b/nuon/api/components/get_app_component_build.py index d2e3b574..e9411e0e 100644 --- a/nuon/api/components/get_app_component_build.py +++ b/nuon/api/components/get_app_component_build.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -24,32 +24,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentBuild | StderrErrResponse | None: 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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentBuild | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( build_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get a build for a component Returns builds for one or all components in an app. @@ -88,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -110,7 +116,7 @@ def sync( build_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get a build for a component Returns builds for one or all components in an app. @@ -125,7 +131,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return sync_detailed( @@ -142,7 +148,7 @@ async def asyncio_detailed( build_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get a build for a component Returns builds for one or all components in an app. @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -177,7 +183,7 @@ async def asyncio( build_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get a build for a component Returns builds for one or all components in an app. @@ -192,7 +198,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_app_component_builds.py b/nuon/api/components/get_app_component_builds.py index 4d4d13a4..48466b82 100644 --- a/nuon/api/components/get_app_component_builds.py +++ b/nuon/api/components/get_app_component_builds.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -14,9 +14,9 @@ def _get_kwargs( app_id: str, component_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -38,8 +38,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponentBuild] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,26 +49,32 @@ def _parse_response( 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: @@ -76,8 +82,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponentBuild]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,25 +97,25 @@ def sync_detailed( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppComponentBuild]] """ kwargs = _get_kwargs( @@ -132,25 +138,25 @@ def sync( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentBuild] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppComponentBuild] """ return sync_detailed( @@ -168,25 +174,25 @@ async def asyncio_detailed( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppComponentBuild]] """ kwargs = _get_kwargs( @@ -207,25 +213,25 @@ async def asyncio( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentBuild] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppComponentBuild] """ return ( diff --git a/nuon/api/components/get_app_component_config.py b/nuon/api/components/get_app_component_config.py index f0bed02f..66f93354 100644 --- a/nuon/api/components/get_app_component_config.py +++ b/nuon/api/components/get_app_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -24,32 +24,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentConfigConnection | StderrErrResponse | None: 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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentConfigConnection | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> Response[AppComponentConfigConnection | StderrErrResponse]: """get a config for a component Args: @@ -86,7 +92,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] + Response[AppComponentConfigConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -108,7 +114,7 @@ def sync( config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> AppComponentConfigConnection | StderrErrResponse | None: """get a config for a component Args: @@ -121,7 +127,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentConfigConnection, StderrErrResponse] + AppComponentConfigConnection | StderrErrResponse """ return sync_detailed( @@ -138,7 +144,7 @@ async def asyncio_detailed( config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> Response[AppComponentConfigConnection | StderrErrResponse]: """get a config for a component Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] + Response[AppComponentConfigConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -171,7 +177,7 @@ async def asyncio( config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> AppComponentConfigConnection | StderrErrResponse | None: """get a config for a component Args: @@ -184,7 +190,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentConfigConnection, StderrErrResponse] + AppComponentConfigConnection | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_app_component_configs.py b/nuon/api/components/get_app_component_configs.py index 055dad5c..1e8114a9 100644 --- a/nuon/api/components/get_app_component_configs.py +++ b/nuon/api/components/get_app_component_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -14,9 +14,9 @@ def _get_kwargs( app_id: str, component_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -38,8 +38,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponentConfigConnection] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,26 +49,32 @@ def _parse_response( 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: @@ -76,8 +82,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponentConfigConnection]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,25 +97,25 @@ def sync_detailed( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppComponentConfigConnection]] """ kwargs = _get_kwargs( @@ -132,25 +138,25 @@ def sync( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentConfigConnection] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppComponentConfigConnection] """ return sync_detailed( @@ -168,25 +174,25 @@ async def asyncio_detailed( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppComponentConfigConnection]] """ kwargs = _get_kwargs( @@ -207,25 +213,25 @@ async def asyncio( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentConfigConnection] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppComponentConfigConnection] """ return ( diff --git a/nuon/api/components/get_app_component_dependencies.py b/nuon/api/components/get_app_component_dependencies.py index fd92e74c..930dd227 100644 --- a/nuon/api/components/get_app_component_dependencies.py +++ b/nuon/api/components/get_app_component_dependencies.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,8 +23,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponent] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -34,26 +34,32 @@ def _parse_response( 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: @@ -61,8 +67,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponent]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,7 +82,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: +) -> Response[StderrErrResponse | list[AppComponent]]: """get a component's dependencies Args: @@ -88,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] + Response[StderrErrResponse | list[AppComponent]] """ kwargs = _get_kwargs( @@ -108,7 +114,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: +) -> StderrErrResponse | list[AppComponent] | None: """get a component's dependencies Args: @@ -120,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppComponent']] + StderrErrResponse | list[AppComponent] """ return sync_detailed( @@ -135,7 +141,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: +) -> Response[StderrErrResponse | list[AppComponent]]: """get a component's dependencies Args: @@ -147,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] + Response[StderrErrResponse | list[AppComponent]] """ kwargs = _get_kwargs( @@ -165,7 +171,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: +) -> StderrErrResponse | list[AppComponent] | None: """get a component's dependencies Args: @@ -177,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppComponent']] + StderrErrResponse | list[AppComponent] """ return ( diff --git a/nuon/api/components/get_app_component_dependents.py b/nuon/api/components/get_app_component_dependents.py index d5d2d5b8..2db0ba61 100644 --- a/nuon/api/components/get_app_component_dependents.py +++ b/nuon/api/components/get_app_component_dependents.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceComponentChildren | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceComponentChildren | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: +) -> Response[ServiceComponentChildren | StderrErrResponse]: """get a component's children Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceComponentChildren, StderrErrResponse]] + Response[ServiceComponentChildren | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: +) -> ServiceComponentChildren | StderrErrResponse | None: """get a component's children Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceComponentChildren, StderrErrResponse] + ServiceComponentChildren | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: +) -> Response[ServiceComponentChildren | StderrErrResponse]: """get a component's children Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceComponentChildren, StderrErrResponse]] + Response[ServiceComponentChildren | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: +) -> ServiceComponentChildren | StderrErrResponse | None: """get a component's children Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceComponentChildren, StderrErrResponse] + ServiceComponentChildren | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_app_component_latest_build.py b/nuon/api/components/get_app_component_latest_build.py index aba730b2..aa497930 100644 --- a/nuon/api/components/get_app_component_latest_build.py +++ b/nuon/api/components/get_app_component_latest_build.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentBuild | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentBuild | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get latest build for a component Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get latest build for a component Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get latest build for a component Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get latest build for a component Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_app_component_latest_config.py b/nuon/api/components/get_app_component_latest_config.py index dc35db41..31dea0e1 100644 --- a/nuon/api/components/get_app_component_latest_config.py +++ b/nuon/api/components/get_app_component_latest_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentConfigConnection | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentConfigConnection | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> Response[AppComponentConfigConnection | StderrErrResponse]: """get latest config for a component Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] + Response[AppComponentConfigConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> AppComponentConfigConnection | StderrErrResponse | None: """get latest config for a component Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentConfigConnection, StderrErrResponse] + AppComponentConfigConnection | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> Response[AppComponentConfigConnection | StderrErrResponse]: """get latest config for a component Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] + Response[AppComponentConfigConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> AppComponentConfigConnection | StderrErrResponse | None: """get latest config for a component Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentConfigConnection, StderrErrResponse] + AppComponentConfigConnection | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_app_components.py b/nuon/api/components/get_app_components.py index 4df2ea92..9e8d2e49 100644 --- a/nuon/api/components/get_app_components.py +++ b/nuon/api/components/get_app_components.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,12 +13,12 @@ def _get_kwargs( app_id: str, *, - 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, + q: str | Unset = UNSET, + types: str | Unset = UNSET, + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -46,8 +46,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponent] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -57,26 +57,32 @@ def _parse_response( 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: @@ -84,8 +90,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponent]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -98,30 +104,30 @@ def sync_detailed( app_id: str, *, 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, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + q: str | Unset = UNSET, + types: str | Unset = UNSET, + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponent]]: """get all components for an app Args: 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. + q (str | Unset): + types (str | Unset): + component_ids (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponent']]] + Response[StderrErrResponse | list[AppComponent]] """ kwargs = _get_kwargs( @@ -145,30 +151,30 @@ def sync( app_id: str, *, 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, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + q: str | Unset = UNSET, + types: str | Unset = UNSET, + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponent] | None: """get all components for an app Args: 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. + q (str | Unset): + types (str | Unset): + component_ids (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponent']] + StderrErrResponse | list[AppComponent] """ return sync_detailed( @@ -187,30 +193,30 @@ async def asyncio_detailed( app_id: str, *, 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, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + q: str | Unset = UNSET, + types: str | Unset = UNSET, + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponent]]: """get all components for an app Args: 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. + q (str | Unset): + types (str | Unset): + component_ids (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponent']]] + Response[StderrErrResponse | list[AppComponent]] """ kwargs = _get_kwargs( @@ -232,30 +238,30 @@ async def asyncio( app_id: str, *, 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, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + q: str | Unset = UNSET, + types: str | Unset = UNSET, + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponent] | None: """get all components for an app Args: 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. + q (str | Unset): + types (str | Unset): + component_ids (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponent']] + StderrErrResponse | list[AppComponent] """ return ( diff --git a/nuon/api/components/get_build.py b/nuon/api/components/get_build.py index 3cc314dc..770a8777 100644 --- a/nuon/api/components/get_build.py +++ b/nuon/api/components/get_build.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentBuild | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentBuild | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( build_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get a build Returns builds for one or all components in an app. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( build_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get a build Returns builds for one or all components in an app. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( build_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get a build Returns builds for one or all components in an app. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( build_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get a build Returns builds for one or all components in an app. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_component.py b/nuon/api/components/get_component.py index db82cb83..ec2ace38 100644 --- a/nuon/api/components/get_component.py +++ b/nuon/api/components/get_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponent | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponent | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """get a component Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """get a component Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """get a component Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """get a component Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_component_build.py b/nuon/api/components/get_component_build.py index 592e9cf8..f695e30a 100644 --- a/nuon/api/components/get_component_build.py +++ b/nuon/api/components/get_component_build.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentBuild | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentBuild | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( build_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get a build for a component Returns builds for one or all components in an app. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( build_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get a build for a component Returns builds for one or all components in an app. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( build_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get a build for a component Returns builds for one or all components in an app. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( build_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get a build for a component Returns builds for one or all components in an app. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_component_builds.py b/nuon/api/components/get_component_builds.py index 40405cc3..ef5e90d4 100644 --- a/nuon/api/components/get_component_builds.py +++ b/nuon/api/components/get_component_builds.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,11 +12,11 @@ def _get_kwargs( *, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + component_id: str | Unset = UNSET, + app_id: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -42,8 +42,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponentBuild] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -53,26 +53,32 @@ def _parse_response( 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: @@ -80,8 +86,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponentBuild]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -93,27 +99,27 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + component_id: str | Unset = UNSET, + app_id: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentBuild]]: """get builds for components Args: - component_id (Union[Unset, str]): - app_id (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + component_id (str | Unset): + app_id (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppComponentBuild]] """ kwargs = _get_kwargs( @@ -134,27 +140,27 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + component_id: str | Unset = UNSET, + app_id: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentBuild] | None: """get builds for components Args: - component_id (Union[Unset, str]): - app_id (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + component_id (str | Unset): + app_id (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppComponentBuild] """ return sync_detailed( @@ -170,27 +176,27 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppComponentBuild"]]]: + component_id: str | Unset = UNSET, + app_id: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentBuild]]: """get builds for components Args: - component_id (Union[Unset, str]): - app_id (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + component_id (str | Unset): + app_id (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppComponentBuild]] """ kwargs = _get_kwargs( @@ -209,27 +215,27 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - component_id: Union[Unset, str] = UNSET, - app_id: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppComponentBuild"]]]: + component_id: str | Unset = UNSET, + app_id: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentBuild] | None: """get builds for components Args: - component_id (Union[Unset, str]): - app_id (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + component_id (str | Unset): + app_id (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppComponentBuild] """ return ( diff --git a/nuon/api/components/get_component_config.py b/nuon/api/components/get_component_config.py index 6de96fb6..6d62e7b1 100644 --- a/nuon/api/components/get_component_config.py +++ b/nuon/api/components/get_component_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentConfigConnection | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentConfigConnection | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> Response[AppComponentConfigConnection | StderrErrResponse]: """get a config for a component Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] + Response[AppComponentConfigConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> AppComponentConfigConnection | StderrErrResponse | None: """get a config for a component Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentConfigConnection, StderrErrResponse] + AppComponentConfigConnection | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( config_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> Response[AppComponentConfigConnection | StderrErrResponse]: """get a config for a component Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] + Response[AppComponentConfigConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( config_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> AppComponentConfigConnection | StderrErrResponse | None: """get a config for a component Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentConfigConnection, StderrErrResponse] + AppComponentConfigConnection | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_component_configs.py b/nuon/api/components/get_component_configs.py index 7b1d1e03..5d28487c 100644 --- a/nuon/api/components/get_component_configs.py +++ b/nuon/api/components/get_component_configs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( component_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponentConfigConnection] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentConfigConnection"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponentConfigConnection]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentConfigConnection]]: """get all configs for a component Args: component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppComponentConfigConnection]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentConfigConnection] | None: """get all configs for a component Args: component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppComponentConfigConnection] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentConfigConnection]]: """get all configs for a component Args: component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppComponentConfigConnection]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentConfigConnection] | None: """get all configs for a component Args: component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppComponentConfigConnection] """ return ( diff --git a/nuon/api/components/get_component_dependencies.py b/nuon/api/components/get_component_dependencies.py index 385846ff..54c6ef77 100644 --- a/nuon/api/components/get_component_dependencies.py +++ b/nuon/api/components/get_component_dependencies.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,8 +22,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponent] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -33,26 +33,32 @@ def _parse_response( 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: @@ -60,8 +66,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponent]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,7 +80,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: +) -> Response[StderrErrResponse | list[AppComponent]]: """get a component's dependencies Args: @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] + Response[StderrErrResponse | list[AppComponent]] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: +) -> StderrErrResponse | list[AppComponent] | None: """get a component's dependencies Args: @@ -114,7 +120,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppComponent']] + StderrErrResponse | list[AppComponent] """ return sync_detailed( @@ -127,7 +133,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: +) -> Response[StderrErrResponse | list[AppComponent]]: """get a component's dependencies Args: @@ -138,7 +144,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppComponent']]] + Response[StderrErrResponse | list[AppComponent]] """ kwargs = _get_kwargs( @@ -154,7 +160,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: +) -> StderrErrResponse | list[AppComponent] | None: """get a component's dependencies Args: @@ -165,7 +171,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppComponent']] + StderrErrResponse | list[AppComponent] """ return ( diff --git a/nuon/api/components/get_component_dependents.py b/nuon/api/components/get_component_dependents.py index b334df5e..a6b3fabd 100644 --- a/nuon/api/components/get_component_dependents.py +++ b/nuon/api/components/get_component_dependents.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceComponentChildren | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceComponentChildren | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: +) -> Response[ServiceComponentChildren | StderrErrResponse]: """get a component's children Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceComponentChildren, StderrErrResponse]] + Response[ServiceComponentChildren | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: +) -> ServiceComponentChildren | StderrErrResponse | None: """get a component's children Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceComponentChildren, StderrErrResponse] + ServiceComponentChildren | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceComponentChildren, StderrErrResponse]]: +) -> Response[ServiceComponentChildren | StderrErrResponse]: """get a component's children Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceComponentChildren, StderrErrResponse]] + Response[ServiceComponentChildren | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceComponentChildren, StderrErrResponse]]: +) -> ServiceComponentChildren | StderrErrResponse | None: """get a component's children Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceComponentChildren, StderrErrResponse] + ServiceComponentChildren | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_component_latest_build.py b/nuon/api/components/get_component_latest_build.py index a4c515ed..563fa5d7 100644 --- a/nuon/api/components/get_component_latest_build.py +++ b/nuon/api/components/get_component_latest_build.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentBuild | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentBuild | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get latest build for a component Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get latest build for a component Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentBuild, StderrErrResponse]]: +) -> Response[AppComponentBuild | StderrErrResponse]: """get latest build for a component Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentBuild, StderrErrResponse]] + Response[AppComponentBuild | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentBuild, StderrErrResponse]]: +) -> AppComponentBuild | StderrErrResponse | None: """get latest build for a component Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentBuild, StderrErrResponse] + AppComponentBuild | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_component_latest_config.py b/nuon/api/components/get_component_latest_config.py index 5288f255..b1ceca8a 100644 --- a/nuon/api/components/get_component_latest_config.py +++ b/nuon/api/components/get_component_latest_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentConfigConnection | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentConfigConnection | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> Response[AppComponentConfigConnection | StderrErrResponse]: """get latest config for a component Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] + Response[AppComponentConfigConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> AppComponentConfigConnection | StderrErrResponse | None: """get latest config for a component Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentConfigConnection, StderrErrResponse] + AppComponentConfigConnection | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> Response[AppComponentConfigConnection | StderrErrResponse]: """get latest config for a component Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentConfigConnection, StderrErrResponse]] + Response[AppComponentConfigConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentConfigConnection, StderrErrResponse]]: +) -> AppComponentConfigConnection | StderrErrResponse | None: """get latest config for a component Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentConfigConnection, StderrErrResponse] + AppComponentConfigConnection | StderrErrResponse """ return ( diff --git a/nuon/api/components/get_org_components.py b/nuon/api/components/get_org_components.py index 953dd651..a85fb9c9 100644 --- a/nuon/api/components/get_org_components.py +++ b/nuon/api/components/get_org_components.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, - component_ids: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -39,8 +39,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponent] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -50,26 +50,32 @@ def _parse_response( 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: @@ -77,8 +83,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponent]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -90,25 +96,25 @@ 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, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + component_ids (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponent']]] + Response[StderrErrResponse | list[AppComponent]] """ kwargs = _get_kwargs( @@ -128,25 +134,25 @@ 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, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponent] | None: """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. + component_ids (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponent']] + StderrErrResponse | list[AppComponent] """ return sync_detailed( @@ -161,25 +167,25 @@ def sync( 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, -) -> Response[Union[StderrErrResponse, list["AppComponent"]]]: + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + component_ids (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponent']]] + Response[StderrErrResponse | list[AppComponent]] """ kwargs = _get_kwargs( @@ -197,25 +203,25 @@ 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, -) -> Optional[Union[StderrErrResponse, list["AppComponent"]]]: + component_ids: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponent] | None: """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. + component_ids (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponent']] + StderrErrResponse | list[AppComponent] """ return ( diff --git a/nuon/api/components/update_app_component.py b/nuon/api/components/update_app_component.py index 3e48bf9f..bb8607e5 100644 --- a/nuon/api/components/update_app_component.py +++ b/nuon/api/components/update_app_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponent | StderrErrResponse | None: 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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponent | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """update a component Args: @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """update a component Args: @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """update a component Args: @@ -160,7 +166,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -180,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """update a component Args: @@ -193,7 +199,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return ( diff --git a/nuon/api/components/update_component.py b/nuon/api/components/update_component.py index 2fe7c69a..4551ed92 100644 --- a/nuon/api/components/update_component.py +++ b/nuon/api/components/update_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponent | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponent | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """update a component Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """update a component Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateComponentRequest, -) -> Response[Union[AppComponent, StderrErrResponse]]: +) -> Response[AppComponent | StderrErrResponse]: """update a component Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponent, StderrErrResponse]] + Response[AppComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateComponentRequest, -) -> Optional[Union[AppComponent, StderrErrResponse]]: +) -> AppComponent | StderrErrResponse | None: """update a component Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponent, StderrErrResponse] + AppComponent | StderrErrResponse """ return ( diff --git a/nuon/api/general/create_waitlist.py b/nuon/api/general/create_waitlist.py index d8fca277..d150292d 100644 --- a/nuon/api/general/create_waitlist.py +++ b/nuon/api/general/create_waitlist.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -29,18 +29,19 @@ def _get_kwargs( return _kwargs -def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[AppWaitlist]: +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AppWaitlist | None: if response.status_code == 200: response_200 = AppWaitlist.from_dict(response.json()) return response_200 + 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[AppWaitlist]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AppWaitlist]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +83,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceWaitlistRequest, -) -> Optional[AppWaitlist]: +) -> AppWaitlist | None: """Allow user to be added to an org waitlist. Args: @@ -133,7 +134,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceWaitlistRequest, -) -> Optional[AppWaitlist]: +) -> AppWaitlist | None: """Allow user to be added to an org waitlist. Args: diff --git a/nuon/api/general/get_cli_config.py b/nuon/api/general/get_cli_config.py index 1f6083c4..99a7bd5c 100644 --- a/nuon/api/general/get_cli_config.py +++ b/nuon/api/general/get_cli_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -20,32 +20,38 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceCLIConfig | StderrErrResponse | None: if response.status_code == 200: response_200 = ServiceCLIConfig.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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceCLIConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,8 +71,8 @@ def _build_response( def sync_detailed( *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: + client: AuthenticatedClient | Client, +) -> Response[ServiceCLIConfig | StderrErrResponse]: """Get config for cli Raises: @@ -74,7 +80,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceCLIConfig, StderrErrResponse]] + Response[ServiceCLIConfig | StderrErrResponse] """ kwargs = _get_kwargs() @@ -88,8 +94,8 @@ def sync_detailed( def sync( *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: + client: AuthenticatedClient | Client, +) -> ServiceCLIConfig | StderrErrResponse | None: """Get config for cli Raises: @@ -97,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceCLIConfig, StderrErrResponse] + ServiceCLIConfig | StderrErrResponse """ return sync_detailed( @@ -107,8 +113,8 @@ def sync( async def asyncio_detailed( *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ServiceCLIConfig, StderrErrResponse]]: + client: AuthenticatedClient | Client, +) -> Response[ServiceCLIConfig | StderrErrResponse]: """Get config for cli Raises: @@ -116,7 +122,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceCLIConfig, StderrErrResponse]] + Response[ServiceCLIConfig | StderrErrResponse] """ kwargs = _get_kwargs() @@ -128,8 +134,8 @@ async def asyncio_detailed( async def asyncio( *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ServiceCLIConfig, StderrErrResponse]]: + client: AuthenticatedClient | Client, +) -> ServiceCLIConfig | StderrErrResponse | None: """Get config for cli Raises: @@ -137,7 +143,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceCLIConfig, StderrErrResponse] + ServiceCLIConfig | StderrErrResponse """ return ( diff --git a/nuon/api/general/get_cloud_platform_regions.py b/nuon/api/general/get_cloud_platform_regions.py index 3d37ba95..98dbf1fd 100644 --- a/nuon/api/general/get_cloud_platform_regions.py +++ b/nuon/api/general/get_cloud_platform_regions.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,8 +22,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppCloudPlatformRegion] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -33,26 +33,32 @@ def _parse_response( 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: @@ -60,8 +66,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppCloudPlatformRegion]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,8 +79,8 @@ def _build_response( def sync_detailed( cloud_platform: str, *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + client: AuthenticatedClient | Client, +) -> Response[StderrErrResponse | list[AppCloudPlatformRegion]]: """Get regions for a cloud platform Return region metadata for the Nuon supported cloud platforms. @@ -87,7 +93,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppCloudPlatformRegion']]] + Response[StderrErrResponse | list[AppCloudPlatformRegion]] """ kwargs = _get_kwargs( @@ -104,8 +110,8 @@ def sync_detailed( def sync( cloud_platform: str, *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + client: AuthenticatedClient | Client, +) -> StderrErrResponse | list[AppCloudPlatformRegion] | None: """Get regions for a cloud platform Return region metadata for the Nuon supported cloud platforms. @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppCloudPlatformRegion']] + StderrErrResponse | list[AppCloudPlatformRegion] """ return sync_detailed( @@ -130,8 +136,8 @@ def sync( async def asyncio_detailed( cloud_platform: str, *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + client: AuthenticatedClient | Client, +) -> Response[StderrErrResponse | list[AppCloudPlatformRegion]]: """Get regions for a cloud platform Return region metadata for the Nuon supported cloud platforms. @@ -144,7 +150,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppCloudPlatformRegion']]] + Response[StderrErrResponse | list[AppCloudPlatformRegion]] """ kwargs = _get_kwargs( @@ -159,8 +165,8 @@ async def asyncio_detailed( async def asyncio( cloud_platform: str, *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[StderrErrResponse, list["AppCloudPlatformRegion"]]]: + client: AuthenticatedClient | Client, +) -> StderrErrResponse | list[AppCloudPlatformRegion] | None: """Get regions for a cloud platform Return region metadata for the Nuon supported cloud platforms. @@ -173,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppCloudPlatformRegion']] + StderrErrResponse | list[AppCloudPlatformRegion] """ return ( diff --git a/nuon/api/general/get_config_schema.py b/nuon/api/general/get_config_schema.py index 80485829..10633ba7 100644 --- a/nuon/api/general/get_config_schema.py +++ b/nuon/api/general/get_config_schema.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,7 +12,7 @@ def _get_kwargs( *, - type_: Union[Unset, str] = UNSET, + type_: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -30,32 +30,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetConfigSchemaResponse200 | StderrErrResponse | None: if response.status_code == 200: response_200 = GetConfigSchemaResponse200.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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetConfigSchemaResponse200 | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +81,9 @@ def _build_response( def sync_detailed( *, - client: Union[AuthenticatedClient, Client], - type_: Union[Unset, str] = UNSET, -) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + client: AuthenticatedClient | Client, + type_: str | Unset = UNSET, +) -> Response[GetConfigSchemaResponse200 | StderrErrResponse]: r"""Get jsonschema for config file Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a @@ -104,14 +110,14 @@ def sync_detailed( - job Args: - type_ (Union[Unset, str]): + type_ (str | Unset): 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[GetConfigSchemaResponse200, StderrErrResponse]] + Response[GetConfigSchemaResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -127,9 +133,9 @@ def sync_detailed( def sync( *, - client: Union[AuthenticatedClient, Client], - type_: Union[Unset, str] = UNSET, -) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + client: AuthenticatedClient | Client, + type_: str | Unset = UNSET, +) -> GetConfigSchemaResponse200 | StderrErrResponse | None: r"""Get jsonschema for config file Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a @@ -156,14 +162,14 @@ def sync( - job Args: - type_ (Union[Unset, str]): + type_ (str | Unset): 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[GetConfigSchemaResponse200, StderrErrResponse] + GetConfigSchemaResponse200 | StderrErrResponse """ return sync_detailed( @@ -174,9 +180,9 @@ def sync( async def asyncio_detailed( *, - client: Union[AuthenticatedClient, Client], - type_: Union[Unset, str] = UNSET, -) -> Response[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + client: AuthenticatedClient | Client, + type_: str | Unset = UNSET, +) -> Response[GetConfigSchemaResponse200 | StderrErrResponse]: r"""Get jsonschema for config file Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a @@ -203,14 +209,14 @@ async def asyncio_detailed( - job Args: - type_ (Union[Unset, str]): + type_ (str | Unset): 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[GetConfigSchemaResponse200, StderrErrResponse]] + Response[GetConfigSchemaResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -224,9 +230,9 @@ async def asyncio_detailed( async def asyncio( *, - client: Union[AuthenticatedClient, Client], - type_: Union[Unset, str] = UNSET, -) -> Optional[Union[GetConfigSchemaResponse200, StderrErrResponse]]: + client: AuthenticatedClient | Client, + type_: str | Unset = UNSET, +) -> GetConfigSchemaResponse200 | StderrErrResponse | None: r"""Get jsonschema for config file Return jsonschemas for Nuon configs. These can be used in frontmatter in most editors that have a @@ -253,14 +259,14 @@ async def asyncio( - job Args: - type_ (Union[Unset, str]): + type_ (str | Unset): 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[GetConfigSchemaResponse200, StderrErrResponse] + GetConfigSchemaResponse200 | StderrErrResponse """ return ( diff --git a/nuon/api/general/get_current_user.py b/nuon/api/general/get_current_user.py index b88806ce..c5bc192e 100644 --- a/nuon/api/general/get_current_user.py +++ b/nuon/api/general/get_current_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -20,32 +20,38 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +72,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Get current user Raises: @@ -74,7 +80,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs() @@ -89,7 +95,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Get current user Raises: @@ -97,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -108,7 +114,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Get current user Raises: @@ -116,7 +122,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs() @@ -129,7 +135,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Get current user Raises: @@ -137,7 +143,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/installers/create_installer.py b/nuon/api/installers/create_installer.py index 4142f89e..3c01ac29 100644 --- a/nuon/api/installers/create_installer.py +++ b/nuon/api/installers/create_installer.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstaller, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstaller | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstaller.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstaller, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstaller | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallerRequest, -) -> Response[Union[AppInstaller, StderrErrResponse]]: +) -> Response[AppInstaller | StderrErrResponse]: """create an installer Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstaller, StderrErrResponse]] + Response[AppInstaller | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateInstallerRequest, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: +) -> AppInstaller | StderrErrResponse | None: """create an installer Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstaller, StderrErrResponse] + AppInstaller | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallerRequest, -) -> Response[Union[AppInstaller, StderrErrResponse]]: +) -> Response[AppInstaller | StderrErrResponse]: """create an installer Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstaller, StderrErrResponse]] + Response[AppInstaller | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateInstallerRequest, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: +) -> AppInstaller | StderrErrResponse | None: """create an installer Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstaller, StderrErrResponse] + AppInstaller | StderrErrResponse """ return ( diff --git a/nuon/api/installers/delete_installer.py b/nuon/api/installers/delete_installer.py index 2599263d..ae97243c 100644 --- a/nuon/api/installers/delete_installer.py +++ b/nuon/api/installers/delete_installer.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( installer_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an installer Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( installer_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an installer Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( installer_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an installer Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( installer_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an installer Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/installers/get_installer.py b/nuon/api/installers/get_installer.py index 37330757..ea5bdff1 100644 --- a/nuon/api/installers/get_installer.py +++ b/nuon/api/installers/get_installer.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstaller, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstaller | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstaller.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstaller, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstaller | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( installer_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstaller, StderrErrResponse]]: +) -> Response[AppInstaller | StderrErrResponse]: """get an installer Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstaller, StderrErrResponse]] + Response[AppInstaller | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( installer_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: +) -> AppInstaller | StderrErrResponse | None: """get an installer Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstaller, StderrErrResponse] + AppInstaller | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( installer_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstaller, StderrErrResponse]]: +) -> Response[AppInstaller | StderrErrResponse]: """get an installer Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstaller, StderrErrResponse]] + Response[AppInstaller | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( installer_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: +) -> AppInstaller | StderrErrResponse | None: """get an installer Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstaller, StderrErrResponse] + AppInstaller | StderrErrResponse """ return ( diff --git a/nuon/api/installers/get_installers.py b/nuon/api/installers/get_installers.py index a9546faa..8baf6922 100644 --- a/nuon/api/installers/get_installers.py +++ b/nuon/api/installers/get_installers.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,9 +12,9 @@ def _get_kwargs( *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -36,8 +36,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstaller] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -47,26 +47,32 @@ def _parse_response( 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: @@ -74,8 +80,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstaller]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -87,25 +93,25 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstaller]]: """get installers for current org Return all installers for the current org. Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstaller']]] + Response[StderrErrResponse | list[AppInstaller]] """ kwargs = _get_kwargs( @@ -124,25 +130,25 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstaller] | None: """get installers for current org Return all installers for the current org. Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstaller']] + StderrErrResponse | list[AppInstaller] """ return sync_detailed( @@ -156,25 +162,25 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppInstaller"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstaller]]: """get installers for current org Return all installers for the current org. Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstaller']]] + Response[StderrErrResponse | list[AppInstaller]] """ kwargs = _get_kwargs( @@ -191,25 +197,25 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppInstaller"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstaller] | None: """get installers for current org Return all installers for the current org. Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstaller']] + StderrErrResponse | list[AppInstaller] """ return ( diff --git a/nuon/api/installers/render_installer.py b/nuon/api/installers/render_installer.py index 9c03a533..6bfcbb4a 100644 --- a/nuon/api/installers/render_installer.py +++ b/nuon/api/installers/render_installer.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceRenderedInstaller | StderrErrResponse | None: if response.status_code == 200: response_200 = ServiceRenderedInstaller.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceRenderedInstaller | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -68,8 +74,8 @@ def _build_response( def sync_detailed( installer_id: str, *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: + client: AuthenticatedClient | Client, +) -> Response[ServiceRenderedInstaller | StderrErrResponse]: """render an installer Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceRenderedInstaller, StderrErrResponse]] + Response[ServiceRenderedInstaller | StderrErrResponse] """ kwargs = _get_kwargs( @@ -97,8 +103,8 @@ def sync_detailed( def sync( installer_id: str, *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: + client: AuthenticatedClient | Client, +) -> ServiceRenderedInstaller | StderrErrResponse | None: """render an installer Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceRenderedInstaller, StderrErrResponse] + ServiceRenderedInstaller | StderrErrResponse """ return sync_detailed( @@ -121,8 +127,8 @@ def sync( async def asyncio_detailed( installer_id: str, *, - client: Union[AuthenticatedClient, Client], -) -> Response[Union[ServiceRenderedInstaller, StderrErrResponse]]: + client: AuthenticatedClient | Client, +) -> Response[ServiceRenderedInstaller | StderrErrResponse]: """render an installer Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceRenderedInstaller, StderrErrResponse]] + Response[ServiceRenderedInstaller | StderrErrResponse] """ kwargs = _get_kwargs( @@ -148,8 +154,8 @@ async def asyncio_detailed( async def asyncio( installer_id: str, *, - client: Union[AuthenticatedClient, Client], -) -> Optional[Union[ServiceRenderedInstaller, StderrErrResponse]]: + client: AuthenticatedClient | Client, +) -> ServiceRenderedInstaller | StderrErrResponse | None: """render an installer Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceRenderedInstaller, StderrErrResponse] + ServiceRenderedInstaller | StderrErrResponse """ return ( diff --git a/nuon/api/installers/update_installer.py b/nuon/api/installers/update_installer.py index 456bf056..a1098f87 100644 --- a/nuon/api/installers/update_installer.py +++ b/nuon/api/installers/update_installer.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstaller, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstaller | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstaller.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstaller, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstaller | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateInstallerRequest, -) -> Response[Union[AppInstaller, StderrErrResponse]]: +) -> Response[AppInstaller | StderrErrResponse]: """update an installer Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstaller, StderrErrResponse]] + Response[AppInstaller | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateInstallerRequest, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: +) -> AppInstaller | StderrErrResponse | None: """update an installer Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstaller, StderrErrResponse] + AppInstaller | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateInstallerRequest, -) -> Response[Union[AppInstaller, StderrErrResponse]]: +) -> Response[AppInstaller | StderrErrResponse]: """update an installer Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstaller, StderrErrResponse]] + Response[AppInstaller | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateInstallerRequest, -) -> Optional[Union[AppInstaller, StderrErrResponse]]: +) -> AppInstaller | StderrErrResponse | None: """update an installer Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstaller, StderrErrResponse] + AppInstaller | StderrErrResponse """ return ( diff --git a/nuon/api/installs/cancel_install_workflow.py b/nuon/api/installs/cancel_install_workflow.py index 9b01f25d..6a442a47 100644 --- a/nuon/api/installs/cancel_install_workflow.py +++ b/nuon/api/installs/cancel_install_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: if response.status_code == 202: response_202 = cast(bool, response.json()) return response_202 + 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """cancel an ongoing install workflow Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """cancel an ongoing install workflow Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """cancel an ongoing install workflow Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """cancel an ongoing install workflow Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/installs/cancel_workflow.py b/nuon/api/installs/cancel_workflow.py index a5c4ff92..9c8cd09a 100644 --- a/nuon/api/installs/cancel_workflow.py +++ b/nuon/api/installs/cancel_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: if response.status_code == 202: response_202 = cast(bool, response.json()) return response_202 + 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """cancel an ongoing workflow Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """cancel an ongoing workflow Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """cancel an ongoing workflow Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """cancel an ongoing workflow Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/installs/create_install.py b/nuon/api/installs/create_install.py index a3d8d66e..7a777121 100644 --- a/nuon/api/installs/create_install.py +++ b/nuon/api/installs/create_install.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstall, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstall | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstall.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstall, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstall | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallRequest, -) -> Response[Union[AppInstall, StderrErrResponse]]: +) -> Response[AppInstall | StderrErrResponse]: """create an app install Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstall, StderrErrResponse]] + Response[AppInstall | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateInstallRequest, -) -> Optional[Union[AppInstall, StderrErrResponse]]: +) -> AppInstall | StderrErrResponse | None: """create an app install Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstall, StderrErrResponse] + AppInstall | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallRequest, -) -> Response[Union[AppInstall, StderrErrResponse]]: +) -> Response[AppInstall | StderrErrResponse]: """create an app install Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstall, StderrErrResponse]] + Response[AppInstall | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateInstallRequest, -) -> Optional[Union[AppInstall, StderrErrResponse]]: +) -> AppInstall | StderrErrResponse | None: """create an app install Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstall, StderrErrResponse] + AppInstall | StderrErrResponse """ return ( diff --git a/nuon/api/installs/create_install_component_deploy.py b/nuon/api/installs/create_install_component_deploy.py index 68af65a2..b9a14e71 100644 --- a/nuon/api/installs/create_install_component_deploy.py +++ b/nuon/api/installs/create_install_component_deploy.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallDeploy | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstallDeploy.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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallDeploy | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallComponentDeployRequest, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """deploy a build to an install Args: @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateInstallComponentDeployRequest, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """deploy a build to an install Args: @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallComponentDeployRequest, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """deploy a build to an install Args: @@ -160,7 +166,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -180,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateInstallComponentDeployRequest, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """deploy a build to an install Args: @@ -193,7 +199,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return ( diff --git a/nuon/api/installs/create_install_config.py b/nuon/api/installs/create_install_config.py index 43358269..f4f8d9ea 100644 --- a/nuon/api/installs/create_install_config.py +++ b/nuon/api/installs/create_install_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstallConfig.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallConfigRequest, -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: +) -> Response[AppInstallConfig | StderrErrResponse]: """create an install config Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallConfig, StderrErrResponse]] + Response[AppInstallConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateInstallConfigRequest, -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: +) -> AppInstallConfig | StderrErrResponse | None: """create an install config Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallConfig, StderrErrResponse] + AppInstallConfig | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallConfigRequest, -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: +) -> Response[AppInstallConfig | StderrErrResponse]: """create an install config Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallConfig, StderrErrResponse]] + Response[AppInstallConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateInstallConfigRequest, -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: +) -> AppInstallConfig | StderrErrResponse | None: """create an install config Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallConfig, StderrErrResponse] + AppInstallConfig | StderrErrResponse """ return ( diff --git a/nuon/api/installs/create_install_deploy.py b/nuon/api/installs/create_install_deploy.py index e595c1a0..cb37897c 100644 --- a/nuon/api/installs/create_install_deploy.py +++ b/nuon/api/installs/create_install_deploy.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallDeploy | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstallDeploy.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallDeploy | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallDeployRequest, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """deploy a build to an install Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateInstallDeployRequest, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """deploy a build to an install Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallDeployRequest, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """deploy a build to an install Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateInstallDeployRequest, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """deploy a build to an install Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return ( diff --git a/nuon/api/installs/create_install_inputs.py b/nuon/api/installs/create_install_inputs.py index 112c32e8..3b3ca97b 100644 --- a/nuon/api/installs/create_install_inputs.py +++ b/nuon/api/installs/create_install_inputs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallInputs | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstallInputs.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallInputs | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallInputsRequest, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: +) -> Response[AppInstallInputs | StderrErrResponse]: """create install inputs Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] + Response[AppInstallInputs | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateInstallInputsRequest, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: +) -> AppInstallInputs | StderrErrResponse | None: """create install inputs Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallInputs, StderrErrResponse] + AppInstallInputs | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateInstallInputsRequest, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: +) -> Response[AppInstallInputs | StderrErrResponse]: """create install inputs Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] + Response[AppInstallInputs | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateInstallInputsRequest, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: +) -> AppInstallInputs | StderrErrResponse | None: """create install inputs Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallInputs, StderrErrResponse] + AppInstallInputs | StderrErrResponse """ return ( diff --git a/nuon/api/installs/create_install_v2.py b/nuon/api/installs/create_install_v2.py new file mode 100644 index 00000000..43af4670 --- /dev/null +++ b/nuon/api/installs/create_install_v2.py @@ -0,0 +1,186 @@ +from http import HTTPStatus +from typing import Any + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.app_install import AppInstall +from ...models.service_create_install_v2_request import ServiceCreateInstallV2Request +from ...models.stderr_err_response import StderrErrResponse +from ...types import Response + + +def _get_kwargs( + *, + body: ServiceCreateInstallV2Request, +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/installs", + } + + _kwargs["json"] = body.to_dict() + + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstall | StderrErrResponse | None: + if response.status_code == 201: + response_201 = AppInstall.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: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstall | 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: ServiceCreateInstallV2Request, +) -> Response[AppInstall | StderrErrResponse]: + """create an app install + + Args: + body (ServiceCreateInstallV2Request): + + 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[AppInstall | 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: ServiceCreateInstallV2Request, +) -> AppInstall | StderrErrResponse | None: + """create an app install + + Args: + body (ServiceCreateInstallV2Request): + + 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: + AppInstall | StderrErrResponse + """ + + return sync_detailed( + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: ServiceCreateInstallV2Request, +) -> Response[AppInstall | StderrErrResponse]: + """create an app install + + Args: + body (ServiceCreateInstallV2Request): + + 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[AppInstall | 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: ServiceCreateInstallV2Request, +) -> AppInstall | StderrErrResponse | None: + """create an app install + + Args: + body (ServiceCreateInstallV2Request): + + 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: + AppInstall | StderrErrResponse + """ + + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/nuon/api/installs/create_workflow_step_approval_response.py b/nuon/api/installs/create_workflow_step_approval_response.py index 732da53e..dcf7ac76 100644 --- a/nuon/api/installs/create_workflow_step_approval_response.py +++ b/nuon/api/installs/create_workflow_step_approval_response.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -17,7 +17,7 @@ def _get_kwargs( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, body: ServiceCreateWorkflowStepApprovalResponseRequest, @@ -26,7 +26,7 @@ def _get_kwargs( _kwargs: dict[str, Any] = { "method": "post", - "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}/response", + "url": f"/v1/workflows/{workflow_id}/steps/{step_id}/approvals/{approval_id}/response", } _kwargs["json"] = body.to_dict() @@ -38,32 +38,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceCreateWorkflowStepApprovalResponseResponse | StderrErrResponse | None: if response.status_code == 201: response_201 = ServiceCreateWorkflowStepApprovalResponseResponse.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: @@ -71,8 +77,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceCreateWorkflowStepApprovalResponseResponse | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -83,19 +89,19 @@ def _build_response( def sync_detailed( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: +) -> Response[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): - workflow_step_id (str): + step_id (str): approval_id (str): body (ServiceCreateWorkflowStepApprovalResponseRequest): @@ -104,12 +110,12 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]] + Response[ServiceCreateWorkflowStepApprovalResponseResponse | StderrErrResponse] """ kwargs = _get_kwargs( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, body=body, ) @@ -123,19 +129,19 @@ def sync_detailed( def sync( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: +) -> ServiceCreateWorkflowStepApprovalResponseResponse | StderrErrResponse | None: """Create an approval response for a workflow step. Create a response for an approval for an action workflow step. Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): body (ServiceCreateWorkflowStepApprovalResponseRequest): @@ -144,12 +150,12 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse] + ServiceCreateWorkflowStepApprovalResponseResponse | StderrErrResponse """ return sync_detailed( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, client=client, body=body, @@ -158,19 +164,19 @@ def sync( async def asyncio_detailed( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: +) -> Response[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): - workflow_step_id (str): + step_id (str): approval_id (str): body (ServiceCreateWorkflowStepApprovalResponseRequest): @@ -179,12 +185,12 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]] + Response[ServiceCreateWorkflowStepApprovalResponseResponse | StderrErrResponse] """ kwargs = _get_kwargs( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, body=body, ) @@ -196,19 +202,19 @@ async def asyncio_detailed( async def asyncio( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, body: ServiceCreateWorkflowStepApprovalResponseRequest, -) -> Optional[Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse]]: +) -> ServiceCreateWorkflowStepApprovalResponseResponse | StderrErrResponse | None: """Create an approval response for a workflow step. Create a response for an approval for an action workflow step. Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): body (ServiceCreateWorkflowStepApprovalResponseRequest): @@ -217,13 +223,13 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceCreateWorkflowStepApprovalResponseResponse, StderrErrResponse] + ServiceCreateWorkflowStepApprovalResponseResponse | StderrErrResponse """ return ( await asyncio_detailed( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, client=client, body=body, diff --git a/nuon/api/installs/delete_install.py b/nuon/api/installs/delete_install.py index f740da9c..904794aa 100644 --- a/nuon/api/installs/delete_install.py +++ b/nuon/api/installs/delete_install.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an install Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an install Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """delete an install Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """delete an install Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/installs/deploy_install_components.py b/nuon/api/installs/deploy_install_components.py index 018fb2aa..21584d75 100644 --- a/nuon/api/installs/deploy_install_components.py +++ b/nuon/api/installs/deploy_install_components.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceDeployInstallComponentsRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """deploy all components on an install Deploy all components to an install. @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -115,7 +121,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceDeployInstallComponentsRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """deploy all components on an install Deploy all components to an install. @@ -132,7 +138,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceDeployInstallComponentsRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """deploy all components on an install Deploy all components to an install. @@ -164,7 +170,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -182,7 +188,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceDeployInstallComponentsRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """deploy all components on an install Deploy all components to an install. @@ -199,7 +205,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/deprovision_install.py b/nuon/api/installs/deprovision_install.py index b72ee735..e62d4068 100644 --- a/nuon/api/installs/deprovision_install.py +++ b/nuon/api/installs/deprovision_install.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceDeprovisionInstallRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """deprovision an install Deprovision an install sandbox. @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceDeprovisionInstallRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """deprovision an install Deprovision an install sandbox. @@ -126,7 +132,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -141,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceDeprovisionInstallRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """deprovision an install Deprovision an install sandbox. @@ -155,7 +161,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -173,7 +179,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceDeprovisionInstallRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """deprovision an install Deprovision an install sandbox. @@ -187,7 +193,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/deprovision_install_sandbox.py b/nuon/api/installs/deprovision_install_sandbox.py index 7c452297..c980f72f 100644 --- a/nuon/api/installs/deprovision_install_sandbox.py +++ b/nuon/api/installs/deprovision_install_sandbox.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceDeprovisionInstallSandboxRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """deprovision an install Args: @@ -90,7 +96,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -110,7 +116,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceDeprovisionInstallSandboxRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """deprovision an install Args: @@ -122,7 +128,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -137,7 +143,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceDeprovisionInstallSandboxRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """deprovision an install Args: @@ -149,7 +155,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -167,7 +173,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceDeprovisionInstallSandboxRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """deprovision an install Args: @@ -179,7 +185,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/forget_install.py b/nuon/api/installs/forget_install.py index ef7ec65f..8855adaf 100644 --- a/nuon/api/installs/forget_install.py +++ b/nuon/api/installs/forget_install.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,23 +31,27 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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 == 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: @@ -55,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,7 +74,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceForgetInstallRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """forget an install Forget an install that has been deleted outside of nuon. @@ -87,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -107,7 +111,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceForgetInstallRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """forget an install Forget an install that has been deleted outside of nuon. @@ -124,7 +128,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -139,7 +143,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceForgetInstallRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """forget an install Forget an install that has been deleted outside of nuon. @@ -156,7 +160,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -174,7 +178,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceForgetInstallRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """forget an install Forget an install that has been deleted outside of nuon. @@ -191,7 +195,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/installs/generate_cli_install_config.py b/nuon/api/installs/generate_cli_install_config.py index 356d3b00..ce7d0b18 100644 --- a/nuon/api/installs/generate_cli_install_config.py +++ b/nuon/api/installs/generate_cli_install_config.py @@ -1,6 +1,6 @@ from http import HTTPStatus from io import BytesIO -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[File, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> File | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[File, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[File | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[File, StderrErrResponse]]: +) -> Response[File | StderrErrResponse]: """generate an install config to be used with CLI Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[File, StderrErrResponse]] + Response[File | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[File, StderrErrResponse]]: +) -> File | StderrErrResponse | None: """generate an install config to be used with CLI Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[File, StderrErrResponse] + File | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[File, StderrErrResponse]]: +) -> Response[File | StderrErrResponse]: """generate an install config to be used with CLI Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[File, StderrErrResponse]] + Response[File | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[File, StderrErrResponse]]: +) -> File | StderrErrResponse | None: """generate an install config to be used with CLI Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[File, StderrErrResponse] + File | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_app_installs.py b/nuon/api/installs/get_app_installs.py index 12061b3b..8180ebe1 100644 --- a/nuon/api/installs/get_app_installs.py +++ b/nuon/api/installs/get_app_installs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( app_id: str, *, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -40,8 +40,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstall] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -51,26 +51,32 @@ def _parse_response( 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: @@ -78,8 +84,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstall]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -92,26 +98,26 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstall]]: """get all installs for an app Args: app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstall']]] + Response[StderrErrResponse | list[AppInstall]] """ kwargs = _get_kwargs( @@ -133,26 +139,26 @@ def sync( app_id: str, *, client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstall] | None: """get all installs for an app Args: app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstall']] + StderrErrResponse | list[AppInstall] """ return sync_detailed( @@ -169,26 +175,26 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstall]]: """get all installs for an app Args: app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstall']]] + Response[StderrErrResponse | list[AppInstall]] """ kwargs = _get_kwargs( @@ -208,26 +214,26 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstall] | None: """get all installs for an app Args: app_id (str): - q (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstall']] + StderrErrResponse | list[AppInstall] """ return ( diff --git a/nuon/api/installs/get_current_install_inputs.py b/nuon/api/installs/get_current_install_inputs.py index 50c178de..b4feda0f 100644 --- a/nuon/api/installs/get_current_install_inputs.py +++ b/nuon/api/installs/get_current_install_inputs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallInputs | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallInputs.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallInputs | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: +) -> Response[AppInstallInputs | StderrErrResponse]: """get an installs current inputs Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] + Response[AppInstallInputs | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: +) -> AppInstallInputs | StderrErrResponse | None: """get an installs current inputs Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallInputs, StderrErrResponse] + AppInstallInputs | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: +) -> Response[AppInstallInputs | StderrErrResponse]: """get an installs current inputs Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] + Response[AppInstallInputs | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: +) -> AppInstallInputs | StderrErrResponse | None: """get an installs current inputs Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallInputs, StderrErrResponse] + AppInstallInputs | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_drifted_objects.py b/nuon/api/installs/get_drifted_objects.py index 90ff5242..1fd7f912 100644 --- a/nuon/api/installs/get_drifted_objects.py +++ b/nuon/api/installs/get_drifted_objects.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,8 +22,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppDriftedObject] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -33,26 +33,32 @@ def _parse_response( 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: @@ -60,8 +66,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppDriftedObject]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,7 +80,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: +) -> Response[StderrErrResponse | list[AppDriftedObject]]: """get drifted objects for an install Args: @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppDriftedObject']]] + Response[StderrErrResponse | list[AppDriftedObject]] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: +) -> StderrErrResponse | list[AppDriftedObject] | None: """get drifted objects for an install Args: @@ -114,7 +120,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppDriftedObject']] + StderrErrResponse | list[AppDriftedObject] """ return sync_detailed( @@ -127,7 +133,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppDriftedObject"]]]: +) -> Response[StderrErrResponse | list[AppDriftedObject]]: """get drifted objects for an install Args: @@ -138,7 +144,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppDriftedObject']]] + Response[StderrErrResponse | list[AppDriftedObject]] """ kwargs = _get_kwargs( @@ -154,7 +160,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppDriftedObject"]]]: +) -> StderrErrResponse | list[AppDriftedObject] | None: """get drifted objects for an install Args: @@ -165,7 +171,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppDriftedObject']] + StderrErrResponse | list[AppDriftedObject] """ return ( diff --git a/nuon/api/installs/get_install.py b/nuon/api/installs/get_install.py index d66ee92c..d2cb04b7 100644 --- a/nuon/api/installs/get_install.py +++ b/nuon/api/installs/get_install.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,7 +13,7 @@ def _get_kwargs( install_id: str, *, - include_drifted_objects: Union[Unset, bool] = False, + include_drifted_objects: bool | Unset = False, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstall, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstall | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstall.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstall, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstall | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,8 +84,8 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, - include_drifted_objects: Union[Unset, bool] = False, -) -> Response[Union[AppInstall, StderrErrResponse]]: + include_drifted_objects: bool | Unset = False, +) -> Response[AppInstall | StderrErrResponse]: """get an install Forget an install that has been deleted outside of nuon. @@ -89,14 +95,14 @@ def sync_detailed( Args: install_id (str): - include_drifted_objects (Union[Unset, bool]): Default: False. + include_drifted_objects (bool | Unset): Default: False. 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[AppInstall, StderrErrResponse]] + Response[AppInstall | StderrErrResponse] """ kwargs = _get_kwargs( @@ -115,8 +121,8 @@ def sync( install_id: str, *, client: AuthenticatedClient, - include_drifted_objects: Union[Unset, bool] = False, -) -> Optional[Union[AppInstall, StderrErrResponse]]: + include_drifted_objects: bool | Unset = False, +) -> AppInstall | StderrErrResponse | None: """get an install Forget an install that has been deleted outside of nuon. @@ -126,14 +132,14 @@ def sync( Args: install_id (str): - include_drifted_objects (Union[Unset, bool]): Default: False. + include_drifted_objects (bool | Unset): Default: False. 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[AppInstall, StderrErrResponse] + AppInstall | StderrErrResponse """ return sync_detailed( @@ -147,8 +153,8 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, - include_drifted_objects: Union[Unset, bool] = False, -) -> Response[Union[AppInstall, StderrErrResponse]]: + include_drifted_objects: bool | Unset = False, +) -> Response[AppInstall | StderrErrResponse]: """get an install Forget an install that has been deleted outside of nuon. @@ -158,14 +164,14 @@ async def asyncio_detailed( Args: install_id (str): - include_drifted_objects (Union[Unset, bool]): Default: False. + include_drifted_objects (bool | Unset): Default: False. 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[AppInstall, StderrErrResponse]] + Response[AppInstall | StderrErrResponse] """ kwargs = _get_kwargs( @@ -182,8 +188,8 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, - include_drifted_objects: Union[Unset, bool] = False, -) -> Optional[Union[AppInstall, StderrErrResponse]]: + include_drifted_objects: bool | Unset = False, +) -> AppInstall | StderrErrResponse | None: """get an install Forget an install that has been deleted outside of nuon. @@ -193,14 +199,14 @@ async def asyncio( Args: install_id (str): - include_drifted_objects (Union[Unset, bool]): Default: False. + include_drifted_objects (bool | Unset): Default: False. 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[AppInstall, StderrErrResponse] + AppInstall | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_action.py b/nuon/api/installs/get_install_action.py index 6113b2f4..697e1c99 100644 --- a/nuon/api/installs/get_install_action.py +++ b/nuon/api/installs/get_install_action.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallActionWorkflow | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( action_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: """get an install action Get an install action workflow. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + Response[AppInstallActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( action_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: +) -> AppInstallActionWorkflow | StderrErrResponse | None: """get an install action Get an install action workflow. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflow, StderrErrResponse] + AppInstallActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( action_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: """get an install action Get an install action workflow. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + Response[AppInstallActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( action_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: +) -> AppInstallActionWorkflow | StderrErrResponse | None: """get an install action Get an install action workflow. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflow, StderrErrResponse] + AppInstallActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_action_workflow.py b/nuon/api/installs/get_install_action_workflow.py index ae21ad96..1d731afe 100644 --- a/nuon/api/installs/get_install_action_workflow.py +++ b/nuon/api/installs/get_install_action_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallActionWorkflow | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: """get an install action workflow Get an install action workflow. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + Response[AppInstallActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: +) -> AppInstallActionWorkflow | StderrErrResponse | None: """get an install action workflow Get an install action workflow. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflow, StderrErrResponse] + AppInstallActionWorkflow | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallActionWorkflow, StderrErrResponse]]: +) -> Response[AppInstallActionWorkflow | StderrErrResponse]: """get an install action workflow Get an install action workflow. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallActionWorkflow, StderrErrResponse]] + Response[AppInstallActionWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( action_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallActionWorkflow, StderrErrResponse]]: +) -> AppInstallActionWorkflow | StderrErrResponse | None: """get an install action workflow Get an install action workflow. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallActionWorkflow, StderrErrResponse] + AppInstallActionWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_action_workflows.py b/nuon/api/installs/get_install_action_workflows.py index dc61bab3..2c4ab1a4 100644 --- a/nuon/api/installs/get_install_action_workflows.py +++ b/nuon/api/installs/get_install_action_workflows.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallActionWorkflow]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,26 +95,26 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflow]] """ kwargs = _get_kwargs( @@ -129,26 +135,26 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflow] """ return sync_detailed( @@ -164,26 +170,26 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflow]] """ kwargs = _get_kwargs( @@ -202,26 +208,26 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflow] """ return ( diff --git a/nuon/api/installs/get_install_actions.py b/nuon/api/installs/get_install_actions.py index 5c1be6da..9e2e9391 100644 --- a/nuon/api/installs/get_install_actions.py +++ b/nuon/api/installs/get_install_actions.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallActionWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallActionWorkflow]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,26 +95,26 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflow]] """ kwargs = _get_kwargs( @@ -129,26 +135,26 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflow] """ return sync_detailed( @@ -164,26 +170,26 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallActionWorkflow]] """ kwargs = _get_kwargs( @@ -202,26 +208,26 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallActionWorkflow] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallActionWorkflow] """ return ( diff --git a/nuon/api/installs/get_install_audit_logs.py b/nuon/api/installs/get_install_audit_logs.py index bbed757e..85097191 100644 --- a/nuon/api/installs/get_install_audit_logs.py +++ b/nuon/api/installs/get_install_audit_logs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -34,8 +34,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallAuditLog] | None: if response.status_code == 200: response_200 = [] _response_200 = response.text @@ -45,26 +45,32 @@ def _parse_response( response_200.append(response_200_item) return response_200 + if response.status_code == 400: response_400 = StderrErrResponse.from_dict(response.text) return response_400 + if response.status_code == 401: response_401 = StderrErrResponse.from_dict(response.text) return response_401 + if response.status_code == 403: response_403 = StderrErrResponse.from_dict(response.text) return response_403 + if response.status_code == 404: response_404 = StderrErrResponse.from_dict(response.text) return response_404 + if response.status_code == 500: response_500 = StderrErrResponse.from_dict(response.text) return response_500 + if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) else: @@ -72,8 +78,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallAuditLog]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -88,7 +94,7 @@ def sync_detailed( client: AuthenticatedClient, start: str, end: str, -) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: +) -> Response[StderrErrResponse | list[AppInstallAuditLog]]: """get install audit logs Args: @@ -101,7 +107,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppInstallAuditLog']]] + Response[StderrErrResponse | list[AppInstallAuditLog]] """ kwargs = _get_kwargs( @@ -123,7 +129,7 @@ def sync( client: AuthenticatedClient, start: str, end: str, -) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: +) -> StderrErrResponse | list[AppInstallAuditLog] | None: """get install audit logs Args: @@ -136,7 +142,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppInstallAuditLog']] + StderrErrResponse | list[AppInstallAuditLog] """ return sync_detailed( @@ -153,7 +159,7 @@ async def asyncio_detailed( client: AuthenticatedClient, start: str, end: str, -) -> Response[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: +) -> Response[StderrErrResponse | list[AppInstallAuditLog]]: """get install audit logs Args: @@ -166,7 +172,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppInstallAuditLog']]] + Response[StderrErrResponse | list[AppInstallAuditLog]] """ kwargs = _get_kwargs( @@ -186,7 +192,7 @@ async def asyncio( client: AuthenticatedClient, start: str, end: str, -) -> Optional[Union[StderrErrResponse, list["AppInstallAuditLog"]]]: +) -> StderrErrResponse | list[AppInstallAuditLog] | None: """get install audit logs Args: @@ -199,7 +205,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppInstallAuditLog']] + StderrErrResponse | list[AppInstallAuditLog] """ return ( diff --git a/nuon/api/installs/get_install_component.py b/nuon/api/installs/get_install_component.py index 8790eaee..faceeaa0 100644 --- a/nuon/api/installs/get_install_component.py +++ b/nuon/api/installs/get_install_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallComponent | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallComponent.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallComponent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallComponent | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallComponent, StderrErrResponse]]: +) -> Response[AppInstallComponent | StderrErrResponse]: """get an install component Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallComponent, StderrErrResponse]] + Response[AppInstallComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: +) -> AppInstallComponent | StderrErrResponse | None: """get an install component Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallComponent, StderrErrResponse] + AppInstallComponent | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallComponent, StderrErrResponse]]: +) -> Response[AppInstallComponent | StderrErrResponse]: """get an install component Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallComponent, StderrErrResponse]] + Response[AppInstallComponent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallComponent, StderrErrResponse]]: +) -> AppInstallComponent | StderrErrResponse | None: """get an install component Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallComponent, StderrErrResponse] + AppInstallComponent | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_component_deploy.py b/nuon/api/installs/get_install_component_deploy.py index d2465153..b2ddb48c 100644 --- a/nuon/api/installs/get_install_component_deploy.py +++ b/nuon/api/installs/get_install_component_deploy.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -24,32 +24,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallDeploy | StderrErrResponse | None: 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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallDeploy | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( deploy_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """get an install deploy Args: @@ -86,7 +92,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -108,7 +114,7 @@ def sync( deploy_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """get an install deploy Args: @@ -121,7 +127,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return sync_detailed( @@ -138,7 +144,7 @@ async def asyncio_detailed( deploy_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """get an install deploy Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -171,7 +177,7 @@ async def asyncio( deploy_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """get an install deploy Args: @@ -184,7 +190,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_component_deploys.py b/nuon/api/installs/get_install_component_deploys.py index 1646368d..0c5c9b49 100644 --- a/nuon/api/installs/get_install_component_deploys.py +++ b/nuon/api/installs/get_install_component_deploys.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -14,9 +14,9 @@ def _get_kwargs( install_id: str, component_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -38,8 +38,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallDeploy] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -49,26 +49,32 @@ def _parse_response( 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: @@ -76,8 +82,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallDeploy]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,25 +97,25 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstallDeploy]]: """get an install components deploys Args: install_id (str): component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallDeploy]] """ kwargs = _get_kwargs( @@ -132,25 +138,25 @@ def sync( component_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallDeploy] | None: """get an install components deploys Args: install_id (str): component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallDeploy] """ return sync_detailed( @@ -168,25 +174,25 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstallDeploy]]: """get an install components deploys Args: install_id (str): component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallDeploy]] """ kwargs = _get_kwargs( @@ -207,25 +213,25 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallDeploy] | None: """get an install components deploys Args: install_id (str): component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallDeploy] """ return ( diff --git a/nuon/api/installs/get_install_component_latest_deploy.py b/nuon/api/installs/get_install_component_latest_deploy.py index 7282d2e7..e7db518e 100644 --- a/nuon/api/installs/get_install_component_latest_deploy.py +++ b/nuon/api/installs/get_install_component_latest_deploy.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallDeploy | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallDeploy | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """get the latest deploy for an install component Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """get the latest deploy for an install component Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """get the latest deploy for an install component Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """get the latest deploy for an install component Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_component_outputs.py b/nuon/api/installs/get_install_component_outputs.py index 44d5b26b..d6e983f4 100644 --- a/nuon/api/installs/get_install_component_outputs.py +++ b/nuon/api/installs/get_install_component_outputs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetInstallComponentOutputsResponse200 | StderrErrResponse | None: if response.status_code == 200: response_200 = GetInstallComponentOutputsResponse200.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetInstallComponentOutputsResponse200 | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: +) -> Response[GetInstallComponentOutputsResponse200 | StderrErrResponse]: """get an install component outputs Return the latest outputs for a component. @@ -87,7 +93,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]] + Response[GetInstallComponentOutputsResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: +) -> GetInstallComponentOutputsResponse200 | StderrErrResponse | None: """get an install component outputs Return the latest outputs for a component. @@ -123,7 +129,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetInstallComponentOutputsResponse200, StderrErrResponse] + GetInstallComponentOutputsResponse200 | StderrErrResponse """ return sync_detailed( @@ -138,7 +144,7 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: +) -> Response[GetInstallComponentOutputsResponse200 | StderrErrResponse]: """get an install component outputs Return the latest outputs for a component. @@ -154,7 +160,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]] + Response[GetInstallComponentOutputsResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -172,7 +178,7 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetInstallComponentOutputsResponse200, StderrErrResponse]]: +) -> GetInstallComponentOutputsResponse200 | StderrErrResponse | None: """get an install component outputs Return the latest outputs for a component. @@ -188,7 +194,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetInstallComponentOutputsResponse200, StderrErrResponse] + GetInstallComponentOutputsResponse200 | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_components.py b/nuon/api/installs/get_install_components.py index 1c99fc90..51c2c844 100644 --- a/nuon/api/installs/get_install_components.py +++ b/nuon/api/installs/get_install_components.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,10 +13,10 @@ 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, + types: str | Unset = UNSET, + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -40,8 +40,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallComponent] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -51,26 +51,32 @@ def _parse_response( 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: @@ -78,8 +84,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallComponent]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -92,26 +98,26 @@ 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, -) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: + types: str | Unset = UNSET, + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, +) -> Response[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. + types (str | Unset): + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. 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['AppInstallComponent']]] + Response[StderrErrResponse | list[AppInstallComponent]] """ kwargs = _get_kwargs( @@ -133,26 +139,26 @@ 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, -) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: + types: str | Unset = UNSET, + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, +) -> StderrErrResponse | list[AppInstallComponent] | None: """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. + types (str | Unset): + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. 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['AppInstallComponent']] + StderrErrResponse | list[AppInstallComponent] """ return sync_detailed( @@ -169,26 +175,26 @@ 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, -) -> Response[Union[StderrErrResponse, list["AppInstallComponent"]]]: + types: str | Unset = UNSET, + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, +) -> Response[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. + types (str | Unset): + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. 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['AppInstallComponent']]] + Response[StderrErrResponse | list[AppInstallComponent]] """ kwargs = _get_kwargs( @@ -208,26 +214,26 @@ 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, -) -> Optional[Union[StderrErrResponse, list["AppInstallComponent"]]]: + types: str | Unset = UNSET, + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, +) -> StderrErrResponse | list[AppInstallComponent] | None: """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. + types (str | Unset): + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. 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['AppInstallComponent']] + StderrErrResponse | list[AppInstallComponent] """ return ( diff --git a/nuon/api/installs/get_install_components_deploys.py b/nuon/api/installs/get_install_components_deploys.py index 00356438..fb60e4e4 100644 --- a/nuon/api/installs/get_install_components_deploys.py +++ b/nuon/api/installs/get_install_components_deploys.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallDeploy] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallDeploy]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallDeploy]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallDeploy] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallDeploy] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallDeploy]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallDeploy] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallDeploy] """ return ( diff --git a/nuon/api/installs/get_install_components_summary.py b/nuon/api/installs/get_install_components_summary.py index dd101822..8ec802a3 100644 --- a/nuon/api/installs/get_install_components_summary.py +++ b/nuon/api/installs/get_install_components_summary.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,11 +13,11 @@ def _get_kwargs( install_id: str, *, - 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, + types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -43,8 +43,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallComponentSummary] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -54,26 +54,32 @@ def _parse_response( 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: @@ -81,8 +87,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallComponentSummary"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallComponentSummary]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -95,28 +101,28 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, - 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["AppInstallComponentSummary"]]]: + types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> Response[StderrErrResponse | list[AppInstallComponentSummary]]: """get an installs components summary Args: install_id (str): - 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]): + types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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['AppInstallComponentSummary']]] + Response[StderrErrResponse | list[AppInstallComponentSummary]] """ kwargs = _get_kwargs( @@ -139,28 +145,28 @@ def sync( install_id: str, *, client: AuthenticatedClient, - 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["AppInstallComponentSummary"]]]: + types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> StderrErrResponse | list[AppInstallComponentSummary] | None: """get an installs components summary Args: install_id (str): - 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]): + types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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['AppInstallComponentSummary']] + StderrErrResponse | list[AppInstallComponentSummary] """ return sync_detailed( @@ -178,28 +184,28 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, - 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["AppInstallComponentSummary"]]]: + types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> Response[StderrErrResponse | list[AppInstallComponentSummary]]: """get an installs components summary Args: install_id (str): - 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]): + types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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['AppInstallComponentSummary']]] + Response[StderrErrResponse | list[AppInstallComponentSummary]] """ kwargs = _get_kwargs( @@ -220,28 +226,28 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, - 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["AppInstallComponentSummary"]]]: + types: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + q: str | Unset = UNSET, +) -> StderrErrResponse | list[AppInstallComponentSummary] | None: """get an installs components summary Args: install_id (str): - 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]): + types (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + q (str | Unset): 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['AppInstallComponentSummary']] + StderrErrResponse | list[AppInstallComponentSummary] """ return ( diff --git a/nuon/api/installs/get_install_deploy.py b/nuon/api/installs/get_install_deploy.py index b086ff60..07d23c74 100644 --- a/nuon/api/installs/get_install_deploy.py +++ b/nuon/api/installs/get_install_deploy.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallDeploy | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallDeploy | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( deploy_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """get an install deploy Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( deploy_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """get an install deploy Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( deploy_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """get an install deploy Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( deploy_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """get an install deploy Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_deploys.py b/nuon/api/installs/get_install_deploys.py index 19c01b2c..c2c04ba8 100644 --- a/nuon/api/installs/get_install_deploys.py +++ b/nuon/api/installs/get_install_deploys.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallDeploy] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallDeploy"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallDeploy]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallDeploy]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallDeploy] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallDeploy] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallDeploy]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallDeploy] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallDeploy] """ return ( diff --git a/nuon/api/installs/get_install_event.py b/nuon/api/installs/get_install_event.py index efc795f4..b73acf16 100644 --- a/nuon/api/installs/get_install_event.py +++ b/nuon/api/installs/get_install_event.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallEvent | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallEvent.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallEvent, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallEvent | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( event_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallEvent, StderrErrResponse]]: +) -> Response[AppInstallEvent | StderrErrResponse]: """get an install event Get a single install event. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallEvent, StderrErrResponse]] + Response[AppInstallEvent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( event_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: +) -> AppInstallEvent | StderrErrResponse | None: """get an install event Get a single install event. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallEvent, StderrErrResponse] + AppInstallEvent | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( event_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallEvent, StderrErrResponse]]: +) -> Response[AppInstallEvent | StderrErrResponse]: """get an install event Get a single install event. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallEvent, StderrErrResponse]] + Response[AppInstallEvent | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( event_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallEvent, StderrErrResponse]]: +) -> AppInstallEvent | StderrErrResponse | None: """get an install event Get a single install event. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallEvent, StderrErrResponse] + AppInstallEvent | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_events.py b/nuon/api/installs/get_install_events.py index d9813009..d7a2e98f 100644 --- a/nuon/api/installs/get_install_events.py +++ b/nuon/api/installs/get_install_events.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallEvent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallEvent] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallEvent"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallEvent]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,10 +95,10 @@ 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["AppInstallEvent"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstallEvent]]: """get events for an install # Get Install Events @@ -101,16 +107,16 @@ def sync_detailed( Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallEvent']]] + Response[StderrErrResponse | list[AppInstallEvent]] """ kwargs = _get_kwargs( @@ -131,10 +137,10 @@ 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["AppInstallEvent"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallEvent] | None: """get events for an install # Get Install Events @@ -143,16 +149,16 @@ def sync( Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallEvent']] + StderrErrResponse | list[AppInstallEvent] """ return sync_detailed( @@ -168,10 +174,10 @@ 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["AppInstallEvent"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstallEvent]]: """get events for an install # Get Install Events @@ -180,16 +186,16 @@ async def asyncio_detailed( Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallEvent']]] + Response[StderrErrResponse | list[AppInstallEvent]] """ kwargs = _get_kwargs( @@ -208,10 +214,10 @@ 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["AppInstallEvent"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallEvent] | None: """get events for an install # Get Install Events @@ -220,16 +226,16 @@ async def asyncio( Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallEvent']] + StderrErrResponse | list[AppInstallEvent] """ return ( diff --git a/nuon/api/installs/get_install_inputs.py b/nuon/api/installs/get_install_inputs.py index 76d652fb..14bb20df 100644 --- a/nuon/api/installs/get_install_inputs.py +++ b/nuon/api/installs/get_install_inputs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallInputs"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallInputs] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallInputs"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallInputs]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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["AppInstallInputs"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstallInputs]]: """get an installs inputs Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallInputs']]] + Response[StderrErrResponse | list[AppInstallInputs]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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["AppInstallInputs"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallInputs] | None: """get an installs inputs Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallInputs']] + StderrErrResponse | list[AppInstallInputs] """ return sync_detailed( @@ -160,24 +166,24 @@ 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["AppInstallInputs"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstallInputs]]: """get an installs inputs Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallInputs']]] + Response[StderrErrResponse | list[AppInstallInputs]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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["AppInstallInputs"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallInputs] | None: """get an installs inputs Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallInputs']] + StderrErrResponse | list[AppInstallInputs] """ return ( diff --git a/nuon/api/installs/get_install_latest_deploy.py b/nuon/api/installs/get_install_latest_deploy.py index 40c74881..56a85093 100644 --- a/nuon/api/installs/get_install_latest_deploy.py +++ b/nuon/api/installs/get_install_latest_deploy.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallDeploy | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallDeploy | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """get an install's latest deploy Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """get an install's latest deploy Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallDeploy, StderrErrResponse]]: +) -> Response[AppInstallDeploy | StderrErrResponse]: """get an install's latest deploy Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallDeploy, StderrErrResponse]] + Response[AppInstallDeploy | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallDeploy, StderrErrResponse]]: +) -> AppInstallDeploy | StderrErrResponse | None: """get an install's latest deploy Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallDeploy, StderrErrResponse] + AppInstallDeploy | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_readme.py b/nuon/api/installs/get_install_readme.py index 60737b67..d9b00d77 100644 --- a/nuon/api/installs/get_install_readme.py +++ b/nuon/api/installs/get_install_readme.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,36 +22,43 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceReadme, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceReadme | StderrErrResponse | None: if response.status_code == 200: response_200 = ServiceReadme.from_dict(response.json()) return response_200 + if response.status_code == 206: response_206 = ServiceReadme.from_dict(response.json()) return response_206 + 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: @@ -59,8 +66,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceReadme, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceReadme | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +80,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceReadme, StderrErrResponse]]: +) -> Response[ServiceReadme | StderrErrResponse]: """get install readme rendered with Returns the `app.readme` markdown with the values interpolated from the install @@ -87,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceReadme, StderrErrResponse]] + Response[ServiceReadme | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +112,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceReadme, StderrErrResponse]]: +) -> ServiceReadme | StderrErrResponse | None: """get install readme rendered with Returns the `app.readme` markdown with the values interpolated from the install @@ -119,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceReadme, StderrErrResponse] + ServiceReadme | StderrErrResponse """ return sync_detailed( @@ -132,7 +139,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceReadme, StderrErrResponse]]: +) -> Response[ServiceReadme | StderrErrResponse]: """get install readme rendered with Returns the `app.readme` markdown with the values interpolated from the install @@ -146,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceReadme, StderrErrResponse]] + Response[ServiceReadme | StderrErrResponse] """ kwargs = _get_kwargs( @@ -162,7 +169,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceReadme, StderrErrResponse]]: +) -> ServiceReadme | StderrErrResponse | None: """get install readme rendered with Returns the `app.readme` markdown with the values interpolated from the install @@ -176,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceReadme, StderrErrResponse] + ServiceReadme | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_runner_group.py b/nuon/api/installs/get_install_runner_group.py index f34cfd2e..c9b2b2f0 100644 --- a/nuon/api/installs/get_install_runner_group.py +++ b/nuon/api/installs/get_install_runner_group.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunnerGroup | StderrErrResponse | None: if response.status_code == 200: response_200 = AppRunnerGroup.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunnerGroup | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: +) -> Response[AppRunnerGroup | StderrErrResponse]: """Get an install's runner group Return the runner group, including runners and settings for the provided install. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerGroup, StderrErrResponse]] + Response[AppRunnerGroup | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: +) -> AppRunnerGroup | StderrErrResponse | None: """Get an install's runner group Return the runner group, including runners and settings for the provided install. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerGroup, StderrErrResponse] + AppRunnerGroup | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: +) -> Response[AppRunnerGroup | StderrErrResponse]: """Get an install's runner group Return the runner group, including runners and settings for the provided install. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerGroup, StderrErrResponse]] + Response[AppRunnerGroup | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: +) -> AppRunnerGroup | StderrErrResponse | None: """Get an install's runner group Return the runner group, including runners and settings for the provided install. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerGroup, StderrErrResponse] + AppRunnerGroup | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_sandbox_run.py b/nuon/api/installs/get_install_sandbox_run.py index d81eac16..d83515da 100644 --- a/nuon/api/installs/get_install_sandbox_run.py +++ b/nuon/api/installs/get_install_sandbox_run.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallSandboxRun | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallSandboxRun | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: +) -> Response[AppInstallSandboxRun | StderrErrResponse]: """get an install sandbox run Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallSandboxRun, StderrErrResponse]] + Response[AppInstallSandboxRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( run_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: +) -> AppInstallSandboxRun | StderrErrResponse | None: """get an install sandbox run Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallSandboxRun, StderrErrResponse] + AppInstallSandboxRun | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: +) -> Response[AppInstallSandboxRun | StderrErrResponse]: """get an install sandbox run Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallSandboxRun, StderrErrResponse]] + Response[AppInstallSandboxRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: +) -> AppInstallSandboxRun | StderrErrResponse | None: """get an install sandbox run Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallSandboxRun, StderrErrResponse] + AppInstallSandboxRun | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_sandbox_run_v2.py b/nuon/api/installs/get_install_sandbox_run_v2.py index a0b8ac3c..178c2ec9 100644 --- a/nuon/api/installs/get_install_sandbox_run_v2.py +++ b/nuon/api/installs/get_install_sandbox_run_v2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallSandboxRun | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallSandboxRun | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: +) -> Response[AppInstallSandboxRun | StderrErrResponse]: """get an install sandbox run Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallSandboxRun, StderrErrResponse]] + Response[AppInstallSandboxRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( run_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: +) -> AppInstallSandboxRun | StderrErrResponse | None: """get an install sandbox run Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallSandboxRun, StderrErrResponse] + AppInstallSandboxRun | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( run_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallSandboxRun, StderrErrResponse]]: +) -> Response[AppInstallSandboxRun | StderrErrResponse]: """get an install sandbox run Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallSandboxRun, StderrErrResponse]] + Response[AppInstallSandboxRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( run_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallSandboxRun, StderrErrResponse]]: +) -> AppInstallSandboxRun | StderrErrResponse | None: """get an install sandbox run Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallSandboxRun, StderrErrResponse] + AppInstallSandboxRun | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_sandbox_runs.py b/nuon/api/installs/get_install_sandbox_runs.py index 05680687..08c01827 100644 --- a/nuon/api/installs/get_install_sandbox_runs.py +++ b/nuon/api/installs/get_install_sandbox_runs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallSandboxRun] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallSandboxRun"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallSandboxRun]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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["AppInstallSandboxRun"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstallSandboxRun]]: """get an installs sandbox runs Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallSandboxRun']]] + Response[StderrErrResponse | list[AppInstallSandboxRun]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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["AppInstallSandboxRun"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallSandboxRun] | None: """get an installs sandbox runs Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallSandboxRun']] + StderrErrResponse | list[AppInstallSandboxRun] """ return sync_detailed( @@ -160,24 +166,24 @@ 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["AppInstallSandboxRun"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstallSandboxRun]]: """get an installs sandbox runs Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallSandboxRun']]] + Response[StderrErrResponse | list[AppInstallSandboxRun]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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["AppInstallSandboxRun"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallSandboxRun] | None: """get an installs sandbox runs Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstallSandboxRun']] + StderrErrResponse | list[AppInstallSandboxRun] """ return ( diff --git a/nuon/api/installs/get_install_stack.py b/nuon/api/installs/get_install_stack.py index e4218cf7..83ac4585 100644 --- a/nuon/api/installs/get_install_stack.py +++ b/nuon/api/installs/get_install_stack.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallStack | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallStack.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallStack, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallStack | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( stack_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallStack, StderrErrResponse]]: +) -> Response[AppInstallStack | StderrErrResponse]: """get an install stack by stack ID Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallStack, StderrErrResponse]] + Response[AppInstallStack | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( stack_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: +) -> AppInstallStack | StderrErrResponse | None: """get an install stack by stack ID Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallStack, StderrErrResponse] + AppInstallStack | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( stack_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallStack, StderrErrResponse]]: +) -> Response[AppInstallStack | StderrErrResponse]: """get an install stack by stack ID Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallStack, StderrErrResponse]] + Response[AppInstallStack | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( stack_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: +) -> AppInstallStack | StderrErrResponse | None: """get an install stack by stack ID Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallStack, StderrErrResponse] + AppInstallStack | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_stack_by_install_id.py b/nuon/api/installs/get_install_stack_by_install_id.py index 519195aa..0a5d493c 100644 --- a/nuon/api/installs/get_install_stack_by_install_id.py +++ b/nuon/api/installs/get_install_stack_by_install_id.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallStack | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallStack.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallStack, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallStack | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallStack, StderrErrResponse]]: +) -> Response[AppInstallStack | StderrErrResponse]: """get an install stack by install ID Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallStack, StderrErrResponse]] + Response[AppInstallStack | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: +) -> AppInstallStack | StderrErrResponse | None: """get an install stack by install ID Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallStack, StderrErrResponse] + AppInstallStack | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallStack, StderrErrResponse]]: +) -> Response[AppInstallStack | StderrErrResponse]: """get an install stack by install ID Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallStack, StderrErrResponse]] + Response[AppInstallStack | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallStack, StderrErrResponse]]: +) -> AppInstallStack | StderrErrResponse | None: """get an install stack by install ID Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallStack, StderrErrResponse] + AppInstallStack | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_stack_runs.py b/nuon/api/installs/get_install_stack_runs.py index a7bfad6a..5f23864f 100644 --- a/nuon/api/installs/get_install_stack_runs.py +++ b/nuon/api/installs/get_install_stack_runs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallStackVersionRun | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallStackVersionRun.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallStackVersionRun | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: +) -> Response[AppInstallStackVersionRun | StderrErrResponse]: """get an install's stack runs get install stack runs @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallStackVersionRun, StderrErrResponse]] + Response[AppInstallStackVersionRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: +) -> AppInstallStackVersionRun | StderrErrResponse | None: """get an install's stack runs get install stack runs @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallStackVersionRun, StderrErrResponse] + AppInstallStackVersionRun | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppInstallStackVersionRun, StderrErrResponse]]: +) -> Response[AppInstallStackVersionRun | StderrErrResponse]: """get an install's stack runs get install stack runs @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallStackVersionRun, StderrErrResponse]] + Response[AppInstallStackVersionRun | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppInstallStackVersionRun, StderrErrResponse]]: +) -> AppInstallStackVersionRun | StderrErrResponse | None: """get an install's stack runs get install stack runs @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallStackVersionRun, StderrErrResponse] + AppInstallStackVersionRun | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_state.py b/nuon/api/installs/get_install_state.py index 73e08c5c..e3462612 100644 --- a/nuon/api/installs/get_install_state.py +++ b/nuon/api/installs/get_install_state.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse | None: if response.status_code == 200: response_200 = GithubComPowertoolsdevMonoPkgTypesStateState.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: +) -> Response[GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse]: """Get the current state of an install. Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]] + Response[GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: +) -> GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse | None: """Get the current state of an install. Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse] + GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: +) -> Response[GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse]: """Get the current state of an install. Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]] + Response[GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse]]: +) -> GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse | None: """Get the current state of an install. Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GithubComPowertoolsdevMonoPkgTypesStateState, StderrErrResponse] + GithubComPowertoolsdevMonoPkgTypesStateState | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_state_history.py b/nuon/api/installs/get_install_state_history.py index a9bfc30a..374f98f5 100644 --- a/nuon/api/installs/get_install_state_history.py +++ b/nuon/api/installs/get_install_state_history.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstallState"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstallState] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstallState"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstallState]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallState]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallState] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallState] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppInstallState]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstallState] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppInstallState] """ return ( diff --git a/nuon/api/installs/get_install_workflow.py b/nuon/api/installs/get_install_workflow.py index 7add3a78..fc7e6cf9 100644 --- a/nuon/api/installs/get_install_workflow.py +++ b/nuon/api/installs/get_install_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppWorkflow | StderrErrResponse | None: if response.status_code == 200: response_200 = AppWorkflow.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: +) -> Response[AppWorkflow | StderrErrResponse]: """get an install workflow Return a workflow. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflow, StderrErrResponse]] + Response[AppWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: +) -> AppWorkflow | StderrErrResponse | None: """get an install workflow Return a workflow. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflow, StderrErrResponse] + AppWorkflow | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: +) -> Response[AppWorkflow | StderrErrResponse]: """get an install workflow Return a workflow. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflow, StderrErrResponse]] + Response[AppWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: +) -> AppWorkflow | StderrErrResponse | None: """get an install workflow Return a workflow. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflow, StderrErrResponse] + AppWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_workflow_step.py b/nuon/api/installs/get_install_workflow_step.py index 7ceb6b78..76eda400 100644 --- a/nuon/api/installs/get_install_workflow_step.py +++ b/nuon/api/installs/get_install_workflow_step.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppWorkflowStep | StderrErrResponse | None: if response.status_code == 200: response_200 = AppWorkflowStep.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppWorkflowStep | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( install_workflow_step_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: +) -> Response[AppWorkflowStep | StderrErrResponse]: """get an install workflow step Return a single workflow step. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStep, StderrErrResponse]] + Response[AppWorkflowStep | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( install_workflow_step_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: +) -> AppWorkflowStep | StderrErrResponse | None: """get an install workflow step Return a single workflow step. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStep, StderrErrResponse] + AppWorkflowStep | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( install_workflow_step_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: +) -> Response[AppWorkflowStep | StderrErrResponse]: """get an install workflow step Return a single workflow step. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStep, StderrErrResponse]] + Response[AppWorkflowStep | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( install_workflow_step_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: +) -> AppWorkflowStep | StderrErrResponse | None: """get an install workflow step Return a single workflow step. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStep, StderrErrResponse] + AppWorkflowStep | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_workflow_step_approval.py b/nuon/api/installs/get_install_workflow_step_approval.py index dfd267d6..cae498c0 100644 --- a/nuon/api/installs/get_install_workflow_step_approval.py +++ b/nuon/api/installs/get_install_workflow_step_approval.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -24,32 +24,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppWorkflowStepApproval | StderrErrResponse | None: if response.status_code == 200: response_200 = AppWorkflowStepApproval.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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppWorkflowStepApproval | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( approval_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: +) -> Response[AppWorkflowStepApproval | StderrErrResponse]: """get an install workflow step approval Args: @@ -86,7 +92,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStepApproval, StderrErrResponse]] + Response[AppWorkflowStepApproval | StderrErrResponse] """ kwargs = _get_kwargs( @@ -108,7 +114,7 @@ def sync( approval_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: +) -> AppWorkflowStepApproval | StderrErrResponse | None: """get an install workflow step approval Args: @@ -121,7 +127,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStepApproval, StderrErrResponse] + AppWorkflowStepApproval | StderrErrResponse """ return sync_detailed( @@ -138,7 +144,7 @@ async def asyncio_detailed( approval_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: +) -> Response[AppWorkflowStepApproval | StderrErrResponse]: """get an install workflow step approval Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStepApproval, StderrErrResponse]] + Response[AppWorkflowStepApproval | StderrErrResponse] """ kwargs = _get_kwargs( @@ -171,7 +177,7 @@ async def asyncio( approval_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: +) -> AppWorkflowStepApproval | StderrErrResponse | None: """get an install workflow step approval Args: @@ -184,7 +190,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStepApproval, StderrErrResponse] + AppWorkflowStepApproval | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_install_workflow_steps.py b/nuon/api/installs/get_install_workflow_steps.py index 7cdd4868..25a1cdb6 100644 --- a/nuon/api/installs/get_install_workflow_steps.py +++ b/nuon/api/installs/get_install_workflow_steps.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,8 +22,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppWorkflowStep] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -33,26 +33,32 @@ def _parse_response( 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: @@ -60,8 +66,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppWorkflowStep]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,7 +80,7 @@ def sync_detailed( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: +) -> Response[StderrErrResponse | list[AppWorkflowStep]]: """get all of the steps for a given install workflow Return all steps for a workflow. @@ -87,7 +93,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppWorkflowStep']]] + Response[StderrErrResponse | list[AppWorkflowStep]] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: +) -> StderrErrResponse | list[AppWorkflowStep] | None: """get all of the steps for a given install workflow Return all steps for a workflow. @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppWorkflowStep']] + StderrErrResponse | list[AppWorkflowStep] """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: +) -> Response[StderrErrResponse | list[AppWorkflowStep]]: """get all of the steps for a given install workflow Return all steps for a workflow. @@ -144,7 +150,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppWorkflowStep']]] + Response[StderrErrResponse | list[AppWorkflowStep]] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( install_workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: +) -> StderrErrResponse | list[AppWorkflowStep] | None: """get all of the steps for a given install workflow Return all steps for a workflow. @@ -173,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppWorkflowStep']] + StderrErrResponse | list[AppWorkflowStep] """ return ( diff --git a/nuon/api/installs/get_org_installs.py b/nuon/api/installs/get_org_installs.py index 254ab42a..d15a914e 100644 --- a/nuon/api/installs/get_org_installs.py +++ b/nuon/api/installs/get_org_installs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -39,8 +39,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppInstall] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -50,26 +50,32 @@ def _parse_response( 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: @@ -77,8 +83,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppInstall]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -90,25 +96,25 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstall]]: """get all installs for an org Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + q (str | Unset): + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstall']]] + Response[StderrErrResponse | list[AppInstall]] """ kwargs = _get_kwargs( @@ -128,25 +134,25 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstall] | None: """get all installs for an org Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + q (str | Unset): + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstall']] + StderrErrResponse | list[AppInstall] """ return sync_detailed( @@ -161,25 +167,25 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppInstall"]]]: + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppInstall]]: """get all installs for an org Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + q (str | Unset): + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstall']]] + Response[StderrErrResponse | list[AppInstall]] """ kwargs = _get_kwargs( @@ -197,25 +203,25 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - q: Union[Unset, str] = UNSET, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppInstall"]]]: + offset: int | Unset = 0, + q: str | Unset = UNSET, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppInstall] | None: """get all installs for an org Args: - offset (Union[Unset, int]): Default: 0. - q (Union[Unset, str]): - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + q (str | Unset): + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppInstall']] + StderrErrResponse | list[AppInstall] """ return ( diff --git a/nuon/api/installs/get_workflow.py b/nuon/api/installs/get_workflow.py index 8b645bf3..1fc29ebb 100644 --- a/nuon/api/installs/get_workflow.py +++ b/nuon/api/installs/get_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppWorkflow | StderrErrResponse | None: if response.status_code == 200: response_200 = AppWorkflow.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: +) -> Response[AppWorkflow | StderrErrResponse]: """get a workflow Return a workflow. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflow, StderrErrResponse]] + Response[AppWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: +) -> AppWorkflow | StderrErrResponse | None: """get a workflow Return a workflow. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflow, StderrErrResponse] + AppWorkflow | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: +) -> Response[AppWorkflow | StderrErrResponse]: """get a workflow Return a workflow. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflow, StderrErrResponse]] + Response[AppWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: +) -> AppWorkflow | StderrErrResponse | None: """get a workflow Return a workflow. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflow, StderrErrResponse] + AppWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/installs/get_workflow_step.py b/nuon/api/installs/get_workflow_step.py index 176943fb..9623c60f 100644 --- a/nuon/api/installs/get_workflow_step.py +++ b/nuon/api/installs/get_workflow_step.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,43 +12,49 @@ def _get_kwargs( workflow_id: str, - workflow_step_id: str, + step_id: str, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}", + "url": f"/v1/workflows/{workflow_id}/steps/{step_id}", } return _kwargs def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppWorkflowStep | StderrErrResponse | None: if response.status_code == 200: response_200 = AppWorkflowStep.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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppWorkflowStep | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -68,29 +74,29 @@ def _build_response( def sync_detailed( workflow_id: str, - workflow_step_id: str, + step_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: +) -> Response[AppWorkflowStep | StderrErrResponse]: """get a workflow step Return a single workflow step. Args: workflow_id (str): - workflow_step_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[AppWorkflowStep, StderrErrResponse]] + Response[AppWorkflowStep | StderrErrResponse] """ kwargs = _get_kwargs( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, ) response = client.get_httpx_client().request( @@ -102,58 +108,58 @@ def sync_detailed( def sync( workflow_id: str, - workflow_step_id: str, + step_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: +) -> AppWorkflowStep | StderrErrResponse | None: """get a workflow step Return a single workflow step. Args: workflow_id (str): - workflow_step_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[AppWorkflowStep, StderrErrResponse] + AppWorkflowStep | StderrErrResponse """ return sync_detailed( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, client=client, ).parsed async def asyncio_detailed( workflow_id: str, - workflow_step_id: str, + step_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStep, StderrErrResponse]]: +) -> Response[AppWorkflowStep | StderrErrResponse]: """get a workflow step Return a single workflow step. Args: workflow_id (str): - workflow_step_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[AppWorkflowStep, StderrErrResponse]] + Response[AppWorkflowStep | StderrErrResponse] """ kwargs = _get_kwargs( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -163,30 +169,30 @@ async def asyncio_detailed( async def asyncio( workflow_id: str, - workflow_step_id: str, + step_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStep, StderrErrResponse]]: +) -> AppWorkflowStep | StderrErrResponse | None: """get a workflow step Return a single workflow step. Args: workflow_id (str): - workflow_step_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[AppWorkflowStep, StderrErrResponse] + AppWorkflowStep | StderrErrResponse """ return ( await asyncio_detailed( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, client=client, ) ).parsed diff --git a/nuon/api/installs/get_workflow_step_approval.py b/nuon/api/installs/get_workflow_step_approval.py index f616442f..ea7eae27 100644 --- a/nuon/api/installs/get_workflow_step_approval.py +++ b/nuon/api/installs/get_workflow_step_approval.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,44 +12,50 @@ def _get_kwargs( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}", + "url": f"/v1/workflows/{workflow_id}/steps/{step_id}/approvals/{approval_id}", } return _kwargs def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppWorkflowStepApproval | StderrErrResponse | None: if response.status_code == 200: response_200 = AppWorkflowStepApproval.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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppWorkflowStepApproval | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,16 +75,16 @@ def _build_response( def sync_detailed( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: +) -> Response[AppWorkflowStepApproval | StderrErrResponse]: """get an workflow step approval Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): Raises: @@ -86,12 +92,12 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStepApproval, StderrErrResponse]] + Response[AppWorkflowStepApproval | StderrErrResponse] """ kwargs = _get_kwargs( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, ) @@ -104,16 +110,16 @@ def sync_detailed( def sync( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: +) -> AppWorkflowStepApproval | StderrErrResponse | None: """get an workflow step approval Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): Raises: @@ -121,12 +127,12 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStepApproval, StderrErrResponse] + AppWorkflowStepApproval | StderrErrResponse """ return sync_detailed( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, client=client, ).parsed @@ -134,16 +140,16 @@ def sync( async def asyncio_detailed( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppWorkflowStepApproval, StderrErrResponse]]: +) -> Response[AppWorkflowStepApproval | StderrErrResponse]: """get an workflow step approval Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): Raises: @@ -151,12 +157,12 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflowStepApproval, StderrErrResponse]] + Response[AppWorkflowStepApproval | StderrErrResponse] """ kwargs = _get_kwargs( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, ) @@ -167,16 +173,16 @@ async def asyncio_detailed( async def asyncio( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppWorkflowStepApproval, StderrErrResponse]]: +) -> AppWorkflowStepApproval | StderrErrResponse | None: """get an workflow step approval Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): Raises: @@ -184,13 +190,13 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflowStepApproval, StderrErrResponse] + AppWorkflowStepApproval | StderrErrResponse """ return ( await asyncio_detailed( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, client=client, ) diff --git a/nuon/api/installs/get_workflow_step_approval_contents.py b/nuon/api/installs/get_workflow_step_approval_contents.py index 75ffeb3b..2fff07ee 100644 --- a/nuon/api/installs/get_workflow_step_approval_contents.py +++ b/nuon/api/installs/get_workflow_step_approval_contents.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,44 +12,50 @@ def _get_kwargs( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, ) -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", - "url": f"/v1/workflows/{workflow_id}/steps/{workflow_step_id}/approvals/{approval_id}/contents", + "url": f"/v1/workflows/{workflow_id}/steps/{step_id}/approvals/{approval_id}/contents", } return _kwargs def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse | None: if response.status_code == 200: response_200 = GetWorkflowStepApprovalContentsResponse200.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: @@ -57,8 +63,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,18 +75,18 @@ def _build_response( def sync_detailed( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: +) -> Response[GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse]: """get a workflow step approval contents Return the contents of a json plan for an approval (compressed). Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): Raises: @@ -88,12 +94,12 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]] + Response[GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, ) @@ -106,18 +112,18 @@ def sync_detailed( def sync( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: +) -> GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse | None: """get a workflow step approval contents Return the contents of a json plan for an approval (compressed). Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): Raises: @@ -125,12 +131,12 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse] + GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse """ return sync_detailed( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, client=client, ).parsed @@ -138,18 +144,18 @@ def sync( async def asyncio_detailed( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: +) -> Response[GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse]: """get a workflow step approval contents Return the contents of a json plan for an approval (compressed). Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): Raises: @@ -157,12 +163,12 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]] + Response[GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, ) @@ -173,18 +179,18 @@ async def asyncio_detailed( async def asyncio( workflow_id: str, - workflow_step_id: str, + step_id: str, approval_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse]]: +) -> GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse | None: """get a workflow step approval contents Return the contents of a json plan for an approval (compressed). Args: workflow_id (str): - workflow_step_id (str): + step_id (str): approval_id (str): Raises: @@ -192,13 +198,13 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetWorkflowStepApprovalContentsResponse200, StderrErrResponse] + GetWorkflowStepApprovalContentsResponse200 | StderrErrResponse """ return ( await asyncio_detailed( workflow_id=workflow_id, - workflow_step_id=workflow_step_id, + step_id=step_id, approval_id=approval_id, client=client, ) diff --git a/nuon/api/installs/get_workflow_steps.py b/nuon/api/installs/get_workflow_steps.py index c1f3f49c..4d6a2d95 100644 --- a/nuon/api/installs/get_workflow_steps.py +++ b/nuon/api/installs/get_workflow_steps.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,8 +22,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppWorkflowStep] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -33,26 +33,32 @@ def _parse_response( 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: @@ -60,8 +66,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppWorkflowStep]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,7 +80,7 @@ def sync_detailed( workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: +) -> Response[StderrErrResponse | list[AppWorkflowStep]]: """get all of the steps for a given workflow Return all steps for a workflow. @@ -87,7 +93,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppWorkflowStep']]] + Response[StderrErrResponse | list[AppWorkflowStep]] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: +) -> StderrErrResponse | list[AppWorkflowStep] | None: """get all of the steps for a given workflow Return all steps for a workflow. @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppWorkflowStep']] + StderrErrResponse | list[AppWorkflowStep] """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppWorkflowStep"]]]: +) -> Response[StderrErrResponse | list[AppWorkflowStep]]: """get all of the steps for a given workflow Return all steps for a workflow. @@ -144,7 +150,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppWorkflowStep']]] + Response[StderrErrResponse | list[AppWorkflowStep]] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( workflow_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppWorkflowStep"]]]: +) -> StderrErrResponse | list[AppWorkflowStep] | None: """get all of the steps for a given workflow Return all steps for a workflow. @@ -173,7 +179,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppWorkflowStep']] + StderrErrResponse | list[AppWorkflowStep] """ return ( diff --git a/nuon/api/installs/get_workflows.py b/nuon/api/installs/get_workflows.py index f4622fe1..0546e2b7 100644 --- a/nuon/api/installs/get_workflows.py +++ b/nuon/api/installs/get_workflows.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,13 +13,13 @@ def _get_kwargs( install_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - planonly: Union[Unset, bool] = True, - type_: Union[Unset, str] = UNSET, - created_at_gte: Union[Unset, str] = UNSET, - created_at_lte: Union[Unset, str] = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + planonly: bool | Unset = True, + type_: str | Unset = UNSET, + created_at_gte: str | Unset = UNSET, + created_at_lte: str | Unset = UNSET, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -49,8 +49,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppWorkflow] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -60,26 +60,32 @@ def _parse_response( 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: @@ -87,8 +93,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppWorkflow"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppWorkflow]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -101,34 +107,34 @@ def sync_detailed( install_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + planonly: bool | Unset = True, + type_: str | Unset = UNSET, + created_at_gte: str | Unset = UNSET, + created_at_lte: str | Unset = UNSET, +) -> Response[StderrErrResponse | list[AppWorkflow]]: """get workflows Return workflows for an install. Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - planonly (Union[Unset, bool]): Default: True. - type_ (Union[Unset, str]): - created_at_gte (Union[Unset, str]): - created_at_lte (Union[Unset, str]): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + planonly (bool | Unset): Default: True. + type_ (str | Unset): + created_at_gte (str | Unset): + created_at_lte (str | Unset): 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['AppWorkflow']]] + Response[StderrErrResponse | list[AppWorkflow]] """ kwargs = _get_kwargs( @@ -153,34 +159,34 @@ def sync( install_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + planonly: bool | Unset = True, + type_: str | Unset = UNSET, + created_at_gte: str | Unset = UNSET, + created_at_lte: str | Unset = UNSET, +) -> StderrErrResponse | list[AppWorkflow] | None: """get workflows Return workflows for an install. Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - planonly (Union[Unset, bool]): Default: True. - type_ (Union[Unset, str]): - created_at_gte (Union[Unset, str]): - created_at_lte (Union[Unset, str]): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + planonly (bool | Unset): Default: True. + type_ (str | Unset): + created_at_gte (str | Unset): + created_at_lte (str | Unset): 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['AppWorkflow']] + StderrErrResponse | list[AppWorkflow] """ return sync_detailed( @@ -200,34 +206,34 @@ async def asyncio_detailed( install_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + planonly: bool | Unset = True, + type_: str | Unset = UNSET, + created_at_gte: str | Unset = UNSET, + created_at_lte: str | Unset = UNSET, +) -> Response[StderrErrResponse | list[AppWorkflow]]: """get workflows Return workflows for an install. Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - planonly (Union[Unset, bool]): Default: True. - type_ (Union[Unset, str]): - created_at_gte (Union[Unset, str]): - created_at_lte (Union[Unset, str]): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + planonly (bool | Unset): Default: True. + type_ (str | Unset): + created_at_gte (str | Unset): + created_at_lte (str | Unset): 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['AppWorkflow']]] + Response[StderrErrResponse | list[AppWorkflow]] """ kwargs = _get_kwargs( @@ -250,34 +256,34 @@ async def asyncio( install_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, - 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, + planonly: bool | Unset = True, + type_: str | Unset = UNSET, + created_at_gte: str | Unset = UNSET, + created_at_lte: str | Unset = UNSET, +) -> StderrErrResponse | list[AppWorkflow] | None: """get workflows Return workflows for an install. Args: install_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. - planonly (Union[Unset, bool]): Default: True. - type_ (Union[Unset, str]): - created_at_gte (Union[Unset, str]): - created_at_lte (Union[Unset, str]): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): Default: 0. + planonly (bool | Unset): Default: True. + type_ (str | Unset): + created_at_gte (str | Unset): + created_at_lte (str | Unset): 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['AppWorkflow']] + StderrErrResponse | list[AppWorkflow] """ return ( diff --git a/nuon/api/installs/phone_home.py b/nuon/api/installs/phone_home.py index 205c89fb..c8ac2999 100644 --- a/nuon/api/installs/phone_home.py +++ b/nuon/api/installs/phone_home.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -32,31 +32,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceInstallPhoneHomeRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """phone home for an install A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully @@ -96,7 +102,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -118,7 +124,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceInstallPhoneHomeRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """phone home for an install A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully @@ -134,7 +140,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -151,7 +157,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceInstallPhoneHomeRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """phone home for an install A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully @@ -167,7 +173,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -187,7 +193,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceInstallPhoneHomeRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """phone home for an install A public endpoint for phoning home from a runner AWS cloudformation stack upon successfully @@ -203,7 +209,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/reprovision_install.py b/nuon/api/installs/reprovision_install.py index 2aee9b9f..769a3028 100644 --- a/nuon/api/installs/reprovision_install.py +++ b/nuon/api/installs/reprovision_install.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceReprovisionInstallRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """reprovision an install Reprovision an install sandbox. @@ -93,7 +99,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -113,7 +119,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceReprovisionInstallRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """reprovision an install Reprovision an install sandbox. @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceReprovisionInstallRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """reprovision an install Reprovision an install sandbox. @@ -158,7 +164,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -176,7 +182,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceReprovisionInstallRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """reprovision an install Reprovision an install sandbox. @@ -191,7 +197,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/reprovision_install_sandbox.py b/nuon/api/installs/reprovision_install_sandbox.py index ccc4f94b..3cd0e1b4 100644 --- a/nuon/api/installs/reprovision_install_sandbox.py +++ b/nuon/api/installs/reprovision_install_sandbox.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceReprovisionInstallSandboxRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """reprovision an install sandbox Reprovision an install sandbox and redeploy all components on top. @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceReprovisionInstallSandboxRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """reprovision an install sandbox Reprovision an install sandbox and redeploy all components on top. @@ -126,7 +132,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -141,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceReprovisionInstallSandboxRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """reprovision an install sandbox Reprovision an install sandbox and redeploy all components on top. @@ -155,7 +161,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -173,7 +179,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceReprovisionInstallSandboxRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """reprovision an install sandbox Reprovision an install sandbox and redeploy all components on top. @@ -187,7 +193,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/retry_owner_workflow_by_id.py b/nuon/api/installs/retry_owner_workflow_by_id.py index 4214cd1f..5ad796bf 100644 --- a/nuon/api/installs/retry_owner_workflow_by_id.py +++ b/nuon/api/installs/retry_owner_workflow_by_id.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceRetryWorkflowByIDResponse | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceRetryWorkflowByIDResponse | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceRetryWorkflowByIDRequest, -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: +) -> Response[ServiceRetryWorkflowByIDResponse | StderrErrResponse]: """rerun the workflow steps starting from input step id, can be used to retry a failed step Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] + Response[ServiceRetryWorkflowByIDResponse | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceRetryWorkflowByIDRequest, -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: +) -> ServiceRetryWorkflowByIDResponse | StderrErrResponse | None: """rerun the workflow steps starting from input step id, can be used to retry a failed step Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] + ServiceRetryWorkflowByIDResponse | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceRetryWorkflowByIDRequest, -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: +) -> Response[ServiceRetryWorkflowByIDResponse | StderrErrResponse]: """rerun the workflow steps starting from input step id, can be used to retry a failed step Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]] + Response[ServiceRetryWorkflowByIDResponse | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceRetryWorkflowByIDRequest, -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: +) -> ServiceRetryWorkflowByIDResponse | StderrErrResponse | None: """rerun the workflow steps starting from input step id, can be used to retry a failed step Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse] + ServiceRetryWorkflowByIDResponse | StderrErrResponse """ return ( diff --git a/nuon/api/installs/retry_workflow.py b/nuon/api/installs/retry_workflow.py index a116384e..2e12a5e0 100644 --- a/nuon/api/installs/retry_workflow.py +++ b/nuon/api/installs/retry_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceRetryWorkflowResponse | StderrErrResponse | None: if response.status_code == 201: response_201 = ServiceRetryWorkflowResponse.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceRetryWorkflowResponse | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceRetryWorkflowRequest, -) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: +) -> Response[ServiceRetryWorkflowResponse | StderrErrResponse]: """rerun the workflow steps starting from input step id, can be used to retry a failed step Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]] + Response[ServiceRetryWorkflowResponse | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceRetryWorkflowRequest, -) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: +) -> ServiceRetryWorkflowResponse | StderrErrResponse | None: """rerun the workflow steps starting from input step id, can be used to retry a failed step Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceRetryWorkflowResponse, StderrErrResponse] + ServiceRetryWorkflowResponse | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceRetryWorkflowRequest, -) -> Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: +) -> Response[ServiceRetryWorkflowResponse | StderrErrResponse]: """rerun the workflow steps starting from input step id, can be used to retry a failed step Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceRetryWorkflowResponse, StderrErrResponse]] + Response[ServiceRetryWorkflowResponse | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceRetryWorkflowRequest, -) -> Optional[Union[ServiceRetryWorkflowResponse, StderrErrResponse]]: +) -> ServiceRetryWorkflowResponse | StderrErrResponse | None: """rerun the workflow steps starting from input step id, can be used to retry a failed step Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceRetryWorkflowResponse, StderrErrResponse] + ServiceRetryWorkflowResponse | StderrErrResponse """ return ( diff --git a/nuon/api/installs/retry_workflow_step.py b/nuon/api/installs/retry_workflow_step.py index e80c977d..58ad56bb 100644 --- a/nuon/api/installs/retry_workflow_step.py +++ b/nuon/api/installs/retry_workflow_step.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any 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.service_retry_workflow_step_request import ServiceRetryWorkflowStepRequest from ...models.stderr_err_response import StderrErrResponse from ...types import Response @@ -15,7 +15,7 @@ def _get_kwargs( workflow_id: str, step_id: str, *, - body: ServiceRetryWorkflowStepResponse, + body: ServiceRetryWorkflowStepRequest, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceRetryWorkflowByIDResponse | StderrErrResponse | None: 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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceRetryWorkflowByIDResponse | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,21 +87,21 @@ def sync_detailed( step_id: str, *, client: AuthenticatedClient, - body: ServiceRetryWorkflowStepResponse, -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + body: ServiceRetryWorkflowStepRequest, +) -> Response[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): + body (ServiceRetryWorkflowStepRequest): 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]] + Response[ServiceRetryWorkflowByIDResponse | StderrErrResponse] """ kwargs = _get_kwargs( @@ -116,21 +122,21 @@ def sync( step_id: str, *, client: AuthenticatedClient, - body: ServiceRetryWorkflowStepResponse, -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + body: ServiceRetryWorkflowStepRequest, +) -> ServiceRetryWorkflowByIDResponse | StderrErrResponse | None: """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): + body (ServiceRetryWorkflowStepRequest): 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] + ServiceRetryWorkflowByIDResponse | StderrErrResponse """ return sync_detailed( @@ -146,21 +152,21 @@ async def asyncio_detailed( step_id: str, *, client: AuthenticatedClient, - body: ServiceRetryWorkflowStepResponse, -) -> Response[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + body: ServiceRetryWorkflowStepRequest, +) -> Response[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): + body (ServiceRetryWorkflowStepRequest): 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]] + Response[ServiceRetryWorkflowByIDResponse | StderrErrResponse] """ kwargs = _get_kwargs( @@ -179,21 +185,21 @@ async def asyncio( step_id: str, *, client: AuthenticatedClient, - body: ServiceRetryWorkflowStepResponse, -) -> Optional[Union[ServiceRetryWorkflowByIDResponse, StderrErrResponse]]: + body: ServiceRetryWorkflowStepRequest, +) -> ServiceRetryWorkflowByIDResponse | StderrErrResponse | None: """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): + body (ServiceRetryWorkflowStepRequest): 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] + ServiceRetryWorkflowByIDResponse | StderrErrResponse """ return ( diff --git a/nuon/api/installs/sync_secrets.py b/nuon/api/installs/sync_secrets.py index 6eccb51c..8b33dcf1 100644 --- a/nuon/api/installs/sync_secrets.py +++ b/nuon/api/installs/sync_secrets.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceSyncSecretsRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """sync secrets install Execute the sync secrets workflow. @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceSyncSecretsRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """sync secrets install Execute the sync secrets workflow. @@ -126,7 +132,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -141,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceSyncSecretsRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """sync secrets install Execute the sync secrets workflow. @@ -155,7 +161,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -173,7 +179,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceSyncSecretsRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """sync secrets install Execute the sync secrets workflow. @@ -187,7 +193,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/teardown_install_component.py b/nuon/api/installs/teardown_install_component.py index a80fe254..87f0f0c6 100644 --- a/nuon/api/installs/teardown_install_component.py +++ b/nuon/api/installs/teardown_install_component.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -32,31 +32,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceTeardownInstallComponentRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """teardown an install component Args: @@ -93,7 +99,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -115,7 +121,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceTeardownInstallComponentRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """teardown an install component Args: @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -145,7 +151,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceTeardownInstallComponentRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """teardown an install component Args: @@ -158,7 +164,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -178,7 +184,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceTeardownInstallComponentRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """teardown an install component Args: @@ -191,7 +197,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/teardown_install_components.py b/nuon/api/installs/teardown_install_components.py index 37d607fa..6e26b9f3 100644 --- a/nuon/api/installs/teardown_install_components.py +++ b/nuon/api/installs/teardown_install_components.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceTeardownInstallComponentsRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """teardown an install's components Teardown all components on an install. @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceTeardownInstallComponentsRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """teardown an install's components Teardown all components on an install. @@ -126,7 +132,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -141,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceTeardownInstallComponentsRequest, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """teardown an install's components Teardown all components on an install. @@ -155,7 +161,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -173,7 +179,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceTeardownInstallComponentsRequest, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """teardown an install's components Teardown all components on an install. @@ -187,7 +193,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/installs/update_install.py b/nuon/api/installs/update_install.py index d5b78e80..7ac3a314 100644 --- a/nuon/api/installs/update_install.py +++ b/nuon/api/installs/update_install.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstall, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstall | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstall.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstall, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstall | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateInstallRequest, -) -> Response[Union[AppInstall, StderrErrResponse]]: +) -> Response[AppInstall | StderrErrResponse]: """update an install Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstall, StderrErrResponse]] + Response[AppInstall | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateInstallRequest, -) -> Optional[Union[AppInstall, StderrErrResponse]]: +) -> AppInstall | StderrErrResponse | None: """update an install Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstall, StderrErrResponse] + AppInstall | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateInstallRequest, -) -> Response[Union[AppInstall, StderrErrResponse]]: +) -> Response[AppInstall | StderrErrResponse]: """update an install Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstall, StderrErrResponse]] + Response[AppInstall | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateInstallRequest, -) -> Optional[Union[AppInstall, StderrErrResponse]]: +) -> AppInstall | StderrErrResponse | None: """update an install Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstall, StderrErrResponse] + AppInstall | StderrErrResponse """ return ( diff --git a/nuon/api/installs/update_install_config.py b/nuon/api/installs/update_install_config.py index 3e126ef2..7997d98a 100644 --- a/nuon/api/installs/update_install_config.py +++ b/nuon/api/installs/update_install_config.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -33,32 +33,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallConfig | StderrErrResponse | None: if response.status_code == 201: response_201 = AppInstallConfig.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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallConfig | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,7 +88,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateInstallConfigRequest, -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: +) -> Response[AppInstallConfig | StderrErrResponse]: """update an install config Args: @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallConfig, StderrErrResponse]] + Response[AppInstallConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,7 +123,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateInstallConfigRequest, -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: +) -> AppInstallConfig | StderrErrResponse | None: """update an install config Args: @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallConfig, StderrErrResponse] + AppInstallConfig | StderrErrResponse """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateInstallConfigRequest, -) -> Response[Union[AppInstallConfig, StderrErrResponse]]: +) -> Response[AppInstallConfig | StderrErrResponse]: """update an install config Args: @@ -160,7 +166,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallConfig, StderrErrResponse]] + Response[AppInstallConfig | StderrErrResponse] """ kwargs = _get_kwargs( @@ -180,7 +186,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateInstallConfigRequest, -) -> Optional[Union[AppInstallConfig, StderrErrResponse]]: +) -> AppInstallConfig | StderrErrResponse | None: """update an install config Args: @@ -193,7 +199,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallConfig, StderrErrResponse] + AppInstallConfig | StderrErrResponse """ return ( diff --git a/nuon/api/installs/update_install_inputs.py b/nuon/api/installs/update_install_inputs.py index 0f84c650..f1264b7c 100644 --- a/nuon/api/installs/update_install_inputs.py +++ b/nuon/api/installs/update_install_inputs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppInstallInputs | StderrErrResponse | None: if response.status_code == 200: response_200 = AppInstallInputs.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppInstallInputs | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateInstallInputsRequest, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: +) -> Response[AppInstallInputs | StderrErrResponse]: """Updates install input config for app Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] + Response[AppInstallInputs | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateInstallInputsRequest, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: +) -> AppInstallInputs | StderrErrResponse | None: """Updates install input config for app Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallInputs, StderrErrResponse] + AppInstallInputs | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateInstallInputsRequest, -) -> Response[Union[AppInstallInputs, StderrErrResponse]]: +) -> Response[AppInstallInputs | StderrErrResponse]: """Updates install input config for app Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppInstallInputs, StderrErrResponse]] + Response[AppInstallInputs | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateInstallInputsRequest, -) -> Optional[Union[AppInstallInputs, StderrErrResponse]]: +) -> AppInstallInputs | StderrErrResponse | None: """Updates install input config for app Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppInstallInputs, StderrErrResponse] + AppInstallInputs | StderrErrResponse """ return ( diff --git a/nuon/api/installs/update_install_workflow.py b/nuon/api/installs/update_install_workflow.py index 52e2d3a2..94b37893 100644 --- a/nuon/api/installs/update_install_workflow.py +++ b/nuon/api/installs/update_install_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppWorkflow | StderrErrResponse | None: if response.status_code == 200: response_200 = AppWorkflow.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateWorkflowRequest, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: +) -> Response[AppWorkflow | StderrErrResponse]: """update an install workflow Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflow, StderrErrResponse]] + Response[AppWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateWorkflowRequest, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: +) -> AppWorkflow | StderrErrResponse | None: """update an install workflow Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflow, StderrErrResponse] + AppWorkflow | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateWorkflowRequest, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: +) -> Response[AppWorkflow | StderrErrResponse]: """update an install workflow Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflow, StderrErrResponse]] + Response[AppWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateWorkflowRequest, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: +) -> AppWorkflow | StderrErrResponse | None: """update an install workflow Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflow, StderrErrResponse] + AppWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/installs/update_workflow.py b/nuon/api/installs/update_workflow.py index b24b2cf3..e9648b61 100644 --- a/nuon/api/installs/update_workflow.py +++ b/nuon/api/installs/update_workflow.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppWorkflow | StderrErrResponse | None: if response.status_code == 200: response_200 = AppWorkflow.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppWorkflow, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppWorkflow | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateWorkflowRequest, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: +) -> Response[AppWorkflow | StderrErrResponse]: """update a workflow Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflow, StderrErrResponse]] + Response[AppWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateWorkflowRequest, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: +) -> AppWorkflow | StderrErrResponse | None: """update a workflow Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflow, StderrErrResponse] + AppWorkflow | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateWorkflowRequest, -) -> Response[Union[AppWorkflow, StderrErrResponse]]: +) -> Response[AppWorkflow | StderrErrResponse]: """update a workflow Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppWorkflow, StderrErrResponse]] + Response[AppWorkflow | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateWorkflowRequest, -) -> Optional[Union[AppWorkflow, StderrErrResponse]]: +) -> AppWorkflow | StderrErrResponse | None: """update a workflow Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppWorkflow, StderrErrResponse] + AppWorkflow | StderrErrResponse """ return ( diff --git a/nuon/api/orgs/add_user.py b/nuon/api/orgs/add_user.py index 1ce904e6..7ff3a903 100644 --- a/nuon/api/orgs/add_user.py +++ b/nuon/api/orgs/add_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateOrgUserRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Add a user to the current org Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateOrgUserRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Add a user to the current org Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateOrgUserRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Add a user to the current org Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateOrgUserRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Add a user to the current org Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/orgs/create_org.py b/nuon/api/orgs/create_org.py index 2552c2b0..5fcb53a5 100644 --- a/nuon/api/orgs/create_org.py +++ b/nuon/api/orgs/create_org.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppOrg, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppOrg | StderrErrResponse | None: if response.status_code == 201: response_201 = AppOrg.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppOrg, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppOrg | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateOrgRequest, -) -> Response[Union[AppOrg, StderrErrResponse]]: +) -> Response[AppOrg | StderrErrResponse]: """create a new org Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppOrg, StderrErrResponse]] + Response[AppOrg | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateOrgRequest, -) -> Optional[Union[AppOrg, StderrErrResponse]]: +) -> AppOrg | StderrErrResponse | None: """create a new org Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppOrg, StderrErrResponse] + AppOrg | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateOrgRequest, -) -> Response[Union[AppOrg, StderrErrResponse]]: +) -> Response[AppOrg | StderrErrResponse]: """create a new org Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppOrg, StderrErrResponse]] + Response[AppOrg | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateOrgRequest, -) -> Optional[Union[AppOrg, StderrErrResponse]]: +) -> AppOrg | StderrErrResponse | None: """create a new org Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppOrg, StderrErrResponse] + AppOrg | StderrErrResponse """ return ( diff --git a/nuon/api/orgs/create_org_invite.py b/nuon/api/orgs/create_org_invite.py index 0a7f3135..aea15061 100644 --- a/nuon/api/orgs/create_org_invite.py +++ b/nuon/api/orgs/create_org_invite.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppOrgInvite | StderrErrResponse | None: if response.status_code == 201: response_201 = AppOrgInvite.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppOrgInvite, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppOrgInvite | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateOrgInviteRequest, -) -> Response[Union[AppOrgInvite, StderrErrResponse]]: +) -> Response[AppOrgInvite | StderrErrResponse]: """Invite a user to the current org Invite a user (by email) to an org. @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppOrgInvite, StderrErrResponse]] + Response[AppOrgInvite | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateOrgInviteRequest, -) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: +) -> AppOrgInvite | StderrErrResponse | None: """Invite a user to the current org Invite a user (by email) to an org. @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppOrgInvite, StderrErrResponse] + AppOrgInvite | StderrErrResponse """ return sync_detailed( @@ -141,7 +147,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateOrgInviteRequest, -) -> Response[Union[AppOrgInvite, StderrErrResponse]]: +) -> Response[AppOrgInvite | StderrErrResponse]: """Invite a user to the current org Invite a user (by email) to an org. @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppOrgInvite, StderrErrResponse]] + Response[AppOrgInvite | StderrErrResponse] """ kwargs = _get_kwargs( @@ -173,7 +179,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateOrgInviteRequest, -) -> Optional[Union[AppOrgInvite, StderrErrResponse]]: +) -> AppOrgInvite | StderrErrResponse | None: """Invite a user to the current org Invite a user (by email) to an org. @@ -189,7 +195,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppOrgInvite, StderrErrResponse] + AppOrgInvite | StderrErrResponse """ return ( diff --git a/nuon/api/orgs/delete_org.py b/nuon/api/orgs/delete_org.py index 9996fbff..8e3c4475 100644 --- a/nuon/api/orgs/delete_org.py +++ b/nuon/api/orgs/delete_org.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -19,31 +19,37 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: 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: @@ -51,8 +57,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,7 +70,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """Delete an org Raises: @@ -72,7 +78,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs() @@ -87,7 +93,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """Delete an org Raises: @@ -95,7 +101,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -106,7 +112,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """Delete an org Raises: @@ -114,7 +120,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs() @@ -127,7 +133,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """Delete an org Raises: @@ -135,7 +141,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/orgs/get_org.py b/nuon/api/orgs/get_org.py index 89f03789..c85d6372 100644 --- a/nuon/api/orgs/get_org.py +++ b/nuon/api/orgs/get_org.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -20,32 +20,38 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppOrg, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppOrg | StderrErrResponse | None: if response.status_code == 200: response_200 = AppOrg.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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppOrg, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppOrg | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +72,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppOrg, StderrErrResponse]]: +) -> Response[AppOrg | StderrErrResponse]: """Get an org Raises: @@ -74,7 +80,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppOrg, StderrErrResponse]] + Response[AppOrg | StderrErrResponse] """ kwargs = _get_kwargs() @@ -89,7 +95,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[Union[AppOrg, StderrErrResponse]]: +) -> AppOrg | StderrErrResponse | None: """Get an org Raises: @@ -97,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppOrg, StderrErrResponse] + AppOrg | StderrErrResponse """ return sync_detailed( @@ -108,7 +114,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppOrg, StderrErrResponse]]: +) -> Response[AppOrg | StderrErrResponse]: """Get an org Raises: @@ -116,7 +122,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppOrg, StderrErrResponse]] + Response[AppOrg | StderrErrResponse] """ kwargs = _get_kwargs() @@ -129,7 +135,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Union[AppOrg, StderrErrResponse]]: +) -> AppOrg | StderrErrResponse | None: """Get an org Raises: @@ -137,7 +143,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppOrg, StderrErrResponse] + AppOrg | StderrErrResponse """ return ( diff --git a/nuon/api/orgs/get_org_acounts.py b/nuon/api/orgs/get_org_acounts.py index 0e366525..9cb1cb57 100644 --- a/nuon/api/orgs/get_org_acounts.py +++ b/nuon/api/orgs/get_org_acounts.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,9 +12,9 @@ def _get_kwargs( *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -36,32 +36,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -69,8 +75,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,23 +88,23 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[AppAccount, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[AppAccount | StderrErrResponse]: """Get user accounts for current org Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -117,23 +123,23 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[AppAccount, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> AppAccount | StderrErrResponse | None: """Get user accounts for current org Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -147,23 +153,23 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[AppAccount, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[AppAccount | StderrErrResponse]: """Get user accounts for current org Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -180,23 +186,23 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[AppAccount, StderrErrResponse]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> AppAccount | StderrErrResponse | None: """Get user accounts for current org Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/orgs/get_org_invites.py b/nuon/api/orgs/get_org_invites.py index 48e369d3..036a5bac 100644 --- a/nuon/api/orgs/get_org_invites.py +++ b/nuon/api/orgs/get_org_invites.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,9 +12,9 @@ def _get_kwargs( *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -36,8 +36,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppOrgInvite] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -47,26 +47,32 @@ def _parse_response( 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: @@ -74,8 +80,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppOrgInvite]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -87,25 +93,25 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppOrgInvite]]: """Return org invites Returns a list of all invites to the org. Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppOrgInvite']]] + Response[StderrErrResponse | list[AppOrgInvite]] """ kwargs = _get_kwargs( @@ -124,25 +130,25 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppOrgInvite] | None: """Return org invites Returns a list of all invites to the org. Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppOrgInvite']] + StderrErrResponse | list[AppOrgInvite] """ return sync_detailed( @@ -156,25 +162,25 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppOrgInvite"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppOrgInvite]]: """Return org invites Returns a list of all invites to the org. Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppOrgInvite']]] + Response[StderrErrResponse | list[AppOrgInvite]] """ kwargs = _get_kwargs( @@ -191,25 +197,25 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppOrgInvite"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppOrgInvite] | None: """Return org invites Returns a list of all invites to the org. Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppOrgInvite']] + StderrErrResponse | list[AppOrgInvite] """ return ( diff --git a/nuon/api/orgs/get_org_runner_group.py b/nuon/api/orgs/get_org_runner_group.py index ff2f648b..6b84f4d4 100644 --- a/nuon/api/orgs/get_org_runner_group.py +++ b/nuon/api/orgs/get_org_runner_group.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -20,32 +20,38 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunnerGroup | StderrErrResponse | None: if response.status_code == 200: response_200 = AppRunnerGroup.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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunnerGroup | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +72,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: +) -> Response[AppRunnerGroup | StderrErrResponse]: """Get an org's runner group Get the current org's runner group, which includes the runners and their settings. @@ -76,7 +82,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerGroup, StderrErrResponse]] + Response[AppRunnerGroup | StderrErrResponse] """ kwargs = _get_kwargs() @@ -91,7 +97,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: +) -> AppRunnerGroup | StderrErrResponse | None: """Get an org's runner group Get the current org's runner group, which includes the runners and their settings. @@ -101,7 +107,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerGroup, StderrErrResponse] + AppRunnerGroup | StderrErrResponse """ return sync_detailed( @@ -112,7 +118,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroup, StderrErrResponse]]: +) -> Response[AppRunnerGroup | StderrErrResponse]: """Get an org's runner group Get the current org's runner group, which includes the runners and their settings. @@ -122,7 +128,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerGroup, StderrErrResponse]] + Response[AppRunnerGroup | StderrErrResponse] """ kwargs = _get_kwargs() @@ -135,7 +141,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroup, StderrErrResponse]]: +) -> AppRunnerGroup | StderrErrResponse | None: """Get an org's runner group Get the current org's runner group, which includes the runners and their settings. @@ -145,7 +151,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerGroup, StderrErrResponse] + AppRunnerGroup | StderrErrResponse """ return ( diff --git a/nuon/api/orgs/get_orgs.py b/nuon/api/orgs/get_orgs.py index 28903731..a86fca0f 100644 --- a/nuon/api/orgs/get_orgs.py +++ b/nuon/api/orgs/get_orgs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,10 +12,10 @@ def _get_kwargs( *, - q: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -39,8 +39,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppOrg] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -50,26 +50,32 @@ def _parse_response( 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: @@ -77,8 +83,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppOrg]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -90,25 +96,25 @@ 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, -) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppOrg']]] + Response[StderrErrResponse | list[AppOrg]] """ kwargs = _get_kwargs( @@ -128,25 +134,25 @@ 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, -) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppOrg] | None: """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. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppOrg']] + StderrErrResponse | list[AppOrg] """ return sync_detailed( @@ -161,25 +167,25 @@ def sync( 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, -) -> Response[Union[StderrErrResponse, list["AppOrg"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppOrg']]] + Response[StderrErrResponse | list[AppOrg]] """ kwargs = _get_kwargs( @@ -197,25 +203,25 @@ 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, -) -> Optional[Union[StderrErrResponse, list["AppOrg"]]]: + q: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppOrg] | None: """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. + q (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppOrg']] + StderrErrResponse | list[AppOrg] """ return ( diff --git a/nuon/api/orgs/remove_user.py b/nuon/api/orgs/remove_user.py index 6dcfa533..679a09f9 100644 --- a/nuon/api/orgs/remove_user.py +++ b/nuon/api/orgs/remove_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppAccount | StderrErrResponse | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppAccount, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppAccount | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceRemoveOrgUserRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Remove a user from the current org Remove a user from an org. @@ -91,7 +97,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -109,7 +115,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceRemoveOrgUserRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Remove a user from the current org Remove a user from an org. @@ -122,7 +128,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return sync_detailed( @@ -135,7 +141,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceRemoveOrgUserRequest, -) -> Response[Union[AppAccount, StderrErrResponse]]: +) -> Response[AppAccount | StderrErrResponse]: """Remove a user from the current org Remove a user from an org. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppAccount, StderrErrResponse]] + Response[AppAccount | StderrErrResponse] """ kwargs = _get_kwargs( @@ -164,7 +170,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceRemoveOrgUserRequest, -) -> Optional[Union[AppAccount, StderrErrResponse]]: +) -> AppAccount | StderrErrResponse | None: """Remove a user from the current org Remove a user from an org. @@ -177,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppAccount, StderrErrResponse] + AppAccount | StderrErrResponse """ return ( diff --git a/nuon/api/orgs/update_org.py b/nuon/api/orgs/update_org.py index c2f197cb..15554bc6 100644 --- a/nuon/api/orgs/update_org.py +++ b/nuon/api/orgs/update_org.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppOrg, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppOrg | StderrErrResponse | None: if response.status_code == 200: response_200 = AppOrg.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppOrg, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppOrg | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateOrgRequest, -) -> Response[Union[AppOrg, StderrErrResponse]]: +) -> Response[AppOrg | StderrErrResponse]: """Update current org Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppOrg, StderrErrResponse]] + Response[AppOrg | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateOrgRequest, -) -> Optional[Union[AppOrg, StderrErrResponse]]: +) -> AppOrg | StderrErrResponse | None: """Update current org Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppOrg, StderrErrResponse] + AppOrg | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateOrgRequest, -) -> Response[Union[AppOrg, StderrErrResponse]]: +) -> Response[AppOrg | StderrErrResponse]: """Update current org Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppOrg, StderrErrResponse]] + Response[AppOrg | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateOrgRequest, -) -> Optional[Union[AppOrg, StderrErrResponse]]: +) -> AppOrg | StderrErrResponse | None: """Update current org Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppOrg, StderrErrResponse] + AppOrg | StderrErrResponse """ return ( diff --git a/nuon/api/releases/create_component_release.py b/nuon/api/releases/create_component_release.py index fbba32aa..0591b98f 100644 --- a/nuon/api/releases/create_component_release.py +++ b/nuon/api/releases/create_component_release.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentRelease | StderrErrResponse | None: if response.status_code == 201: response_201 = AppComponentRelease.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentRelease | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateComponentReleaseRequest, -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: +) -> Response[AppComponentRelease | StderrErrResponse]: """create a release Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentRelease, StderrErrResponse]] + Response[AppComponentRelease | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateComponentReleaseRequest, -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: +) -> AppComponentRelease | StderrErrResponse | None: """create a release Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentRelease, StderrErrResponse] + AppComponentRelease | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateComponentReleaseRequest, -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: +) -> Response[AppComponentRelease | StderrErrResponse]: """create a release Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentRelease, StderrErrResponse]] + Response[AppComponentRelease | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateComponentReleaseRequest, -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: +) -> AppComponentRelease | StderrErrResponse | None: """create a release Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentRelease, StderrErrResponse] + AppComponentRelease | StderrErrResponse """ return ( diff --git a/nuon/api/releases/get_app_releases.py b/nuon/api/releases/get_app_releases.py index 356b612c..107c7357 100644 --- a/nuon/api/releases/get_app_releases.py +++ b/nuon/api/releases/get_app_releases.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( app_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponentRelease] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponentRelease]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentRelease]]: """get all releases for an app Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentRelease']]] + Response[StderrErrResponse | list[AppComponentRelease]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentRelease] | None: """get all releases for an app Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentRelease']] + StderrErrResponse | list[AppComponentRelease] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentRelease]]: """get all releases for an app Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentRelease']]] + Response[StderrErrResponse | list[AppComponentRelease]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( app_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentRelease] | None: """get all releases for an app Args: app_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentRelease']] + StderrErrResponse | list[AppComponentRelease] """ return ( diff --git a/nuon/api/releases/get_component_releases.py b/nuon/api/releases/get_component_releases.py index 71e84513..7a30a83a 100644 --- a/nuon/api/releases/get_component_releases.py +++ b/nuon/api/releases/get_component_releases.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( component_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponentRelease] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponentRelease]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( component_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentRelease]]: """get all releases for a component Args: component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentRelease']]] + Response[StderrErrResponse | list[AppComponentRelease]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( component_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentRelease] | None: """get all releases for a component Args: component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentRelease']] + StderrErrResponse | list[AppComponentRelease] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( component_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppComponentRelease"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentRelease]]: """get all releases for a component Args: component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentRelease']]] + Response[StderrErrResponse | list[AppComponentRelease]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( component_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppComponentRelease"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentRelease] | None: """get all releases for a component Args: component_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentRelease']] + StderrErrResponse | list[AppComponentRelease] """ return ( diff --git a/nuon/api/releases/get_release.py b/nuon/api/releases/get_release.py index 21bf24a0..cc35e3e2 100644 --- a/nuon/api/releases/get_release.py +++ b/nuon/api/releases/get_release.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppComponentRelease | StderrErrResponse | None: if response.status_code == 200: response_200 = AppComponentRelease.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppComponentRelease | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( release_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: +) -> Response[AppComponentRelease | StderrErrResponse]: """get a release Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentRelease, StderrErrResponse]] + Response[AppComponentRelease | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( release_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: +) -> AppComponentRelease | StderrErrResponse | None: """get a release Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentRelease, StderrErrResponse] + AppComponentRelease | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( release_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppComponentRelease, StderrErrResponse]]: +) -> Response[AppComponentRelease | StderrErrResponse]: """get a release Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppComponentRelease, StderrErrResponse]] + Response[AppComponentRelease | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( release_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppComponentRelease, StderrErrResponse]]: +) -> AppComponentRelease | StderrErrResponse | None: """get a release Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppComponentRelease, StderrErrResponse] + AppComponentRelease | StderrErrResponse """ return ( diff --git a/nuon/api/releases/get_release_steps.py b/nuon/api/releases/get_release_steps.py index 8cde182a..67355624 100644 --- a/nuon/api/releases/get_release_steps.py +++ b/nuon/api/releases/get_release_steps.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( release_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppComponentReleaseStep] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppComponentReleaseStep]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ def sync_detailed( release_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentReleaseStep]]: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentReleaseStep']]] + Response[StderrErrResponse | list[AppComponentReleaseStep]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ def sync( release_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentReleaseStep] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentReleaseStep']] + StderrErrResponse | list[AppComponentReleaseStep] """ return sync_detailed( @@ -160,24 +166,24 @@ async def asyncio_detailed( release_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppComponentReleaseStep]]: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentReleaseStep']]] + Response[StderrErrResponse | list[AppComponentReleaseStep]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ async def asyncio( release_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppComponentReleaseStep"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppComponentReleaseStep] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppComponentReleaseStep']] + StderrErrResponse | list[AppComponentReleaseStep] """ return ( diff --git a/nuon/api/runners/cancel_runner_job.py b/nuon/api/runners/cancel_runner_job.py index a3c2d5e0..780b84b3 100644 --- a/nuon/api/runners/cancel_runner_job.py +++ b/nuon/api/runners/cancel_runner_job.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunnerJob | StderrErrResponse | None: if response.status_code == 202: response_202 = AppRunnerJob.from_dict(response.json()) return response_202 + 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunnerJob | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCancelRunnerJobRequest, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: +) -> Response[AppRunnerJob | StderrErrResponse]: """cancel runner job Cancel a runner job. @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] + Response[AppRunnerJob | StderrErrResponse] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCancelRunnerJobRequest, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: +) -> AppRunnerJob | StderrErrResponse | None: """cancel runner job Cancel a runner job. @@ -128,7 +134,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerJob, StderrErrResponse] + AppRunnerJob | StderrErrResponse """ return sync_detailed( @@ -143,7 +149,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCancelRunnerJobRequest, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: +) -> Response[AppRunnerJob | StderrErrResponse]: """cancel runner job Cancel a runner job. @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] + Response[AppRunnerJob | StderrErrResponse] """ kwargs = _get_kwargs( @@ -175,7 +181,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCancelRunnerJobRequest, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: +) -> AppRunnerJob | StderrErrResponse | None: """cancel runner job Cancel a runner job. @@ -189,7 +195,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerJob, StderrErrResponse] + AppRunnerJob | StderrErrResponse """ return ( diff --git a/nuon/api/runners/create_terraform_workspace.py b/nuon/api/runners/create_terraform_workspace.py index 89a3d3b4..31e8301c 100644 --- a/nuon/api/runners/create_terraform_workspace.py +++ b/nuon/api/runners/create_terraform_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspace | StderrErrResponse | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspace | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateTerraformWorkspaceRequest, -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: +) -> Response[AppTerraformWorkspace | StderrErrResponse]: """create terraform workspace Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspace, StderrErrResponse]] + Response[AppTerraformWorkspace | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateTerraformWorkspaceRequest, -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: +) -> AppTerraformWorkspace | StderrErrResponse | None: """create terraform workspace Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspace, StderrErrResponse] + AppTerraformWorkspace | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateTerraformWorkspaceRequest, -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: +) -> Response[AppTerraformWorkspace | StderrErrResponse]: """create terraform workspace Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspace, StderrErrResponse]] + Response[AppTerraformWorkspace | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateTerraformWorkspaceRequest, -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: +) -> AppTerraformWorkspace | StderrErrResponse | None: """create terraform workspace Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspace, StderrErrResponse] + AppTerraformWorkspace | StderrErrResponse """ return ( diff --git a/nuon/api/runners/create_terraform_workspace_v2.py b/nuon/api/runners/create_terraform_workspace_v2.py index fa8d3ab3..8ead6a7a 100644 --- a/nuon/api/runners/create_terraform_workspace_v2.py +++ b/nuon/api/runners/create_terraform_workspace_v2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspace | StderrErrResponse | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspace | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateTerraformWorkspaceRequest, -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: +) -> Response[AppTerraformWorkspace | StderrErrResponse]: """create terraform workspace Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspace, StderrErrResponse]] + Response[AppTerraformWorkspace | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateTerraformWorkspaceRequest, -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: +) -> AppTerraformWorkspace | StderrErrResponse | None: """create terraform workspace Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspace, StderrErrResponse] + AppTerraformWorkspace | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateTerraformWorkspaceRequest, -) -> Response[Union[AppTerraformWorkspace, StderrErrResponse]]: +) -> Response[AppTerraformWorkspace | StderrErrResponse]: """create terraform workspace Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspace, StderrErrResponse]] + Response[AppTerraformWorkspace | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateTerraformWorkspaceRequest, -) -> Optional[Union[AppTerraformWorkspace, StderrErrResponse]]: +) -> AppTerraformWorkspace | StderrErrResponse | None: """create terraform workspace Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspace, StderrErrResponse] + AppTerraformWorkspace | StderrErrResponse """ return ( diff --git a/nuon/api/runners/delete_terraform_workspace.py b/nuon/api/runners/delete_terraform_workspace.py index b9118fe7..16b3bef3 100644 --- a/nuon/api/runners/delete_terraform_workspace.py +++ b/nuon/api/runners/delete_terraform_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,8 +22,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -33,26 +33,32 @@ def _parse_response( 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: @@ -60,8 +66,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,7 +80,7 @@ def sync_detailed( workspace_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: """delete terraform workspace Args: @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + Response[StderrErrResponse | list[AppTerraformWorkspace]] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( workspace_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: """delete terraform workspace Args: @@ -114,7 +120,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] + StderrErrResponse | list[AppTerraformWorkspace] """ return sync_detailed( @@ -127,7 +133,7 @@ async def asyncio_detailed( workspace_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: """delete terraform workspace Args: @@ -138,7 +144,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + Response[StderrErrResponse | list[AppTerraformWorkspace]] """ kwargs = _get_kwargs( @@ -154,7 +160,7 @@ async def asyncio( workspace_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: """delete terraform workspace Args: @@ -165,7 +171,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] + StderrErrResponse | list[AppTerraformWorkspace] """ return ( diff --git a/nuon/api/runners/force_shut_down_runner.py b/nuon/api/runners/force_shut_down_runner.py index f077148a..05827190 100644 --- a/nuon/api/runners/force_shut_down_runner.py +++ b/nuon/api/runners/force_shut_down_runner.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: if response.status_code == 201: response_201 = cast(bool, 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceForceShutdownRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """force shut down a runner Force shutdown a runner. @@ -94,7 +100,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -114,7 +120,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceForceShutdownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """force shut down a runner Force shutdown a runner. @@ -130,7 +136,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -145,7 +151,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceForceShutdownRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """force shut down a runner Force shutdown a runner. @@ -161,7 +167,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -179,7 +185,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceForceShutdownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """force shut down a runner Force shutdown a runner. @@ -195,7 +201,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/runners/get_latest_runner_heart_beat.py b/nuon/api/runners/get_latest_runner_heart_beat.py index a46d615f..5592580b 100644 --- a/nuon/api/runners/get_latest_runner_heart_beat.py +++ b/nuon/api/runners/get_latest_runner_heart_beat.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceLatestRunnerHeartBeats | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceLatestRunnerHeartBeats | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: +) -> Response[ServiceLatestRunnerHeartBeats | StderrErrResponse]: """get a runner @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]] + Response[ServiceLatestRunnerHeartBeats | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: +) -> ServiceLatestRunnerHeartBeats | StderrErrResponse | None: """get a runner @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceLatestRunnerHeartBeats, StderrErrResponse] + ServiceLatestRunnerHeartBeats | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: +) -> Response[ServiceLatestRunnerHeartBeats | StderrErrResponse]: """get a runner @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]] + Response[ServiceLatestRunnerHeartBeats | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceLatestRunnerHeartBeats, StderrErrResponse]]: +) -> ServiceLatestRunnerHeartBeats | StderrErrResponse | None: """get a runner @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceLatestRunnerHeartBeats, StderrErrResponse] + ServiceLatestRunnerHeartBeats | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_log_stream.py b/nuon/api/runners/get_log_stream.py index 83c47701..c982379c 100644 --- a/nuon/api/runners/get_log_stream.py +++ b/nuon/api/runners/get_log_stream.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppLogStream, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppLogStream | StderrErrResponse | None: if response.status_code == 200: response_200 = AppLogStream.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppLogStream, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppLogStream | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( log_stream_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppLogStream, StderrErrResponse]]: +) -> Response[AppLogStream | StderrErrResponse]: """get a log stream Return a log stream. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppLogStream, StderrErrResponse]] + Response[AppLogStream | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( log_stream_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppLogStream, StderrErrResponse]]: +) -> AppLogStream | StderrErrResponse | None: """get a log stream Return a log stream. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppLogStream, StderrErrResponse] + AppLogStream | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( log_stream_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppLogStream, StderrErrResponse]]: +) -> Response[AppLogStream | StderrErrResponse]: """get a log stream Return a log stream. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppLogStream, StderrErrResponse]] + Response[AppLogStream | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( log_stream_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppLogStream, StderrErrResponse]]: +) -> AppLogStream | StderrErrResponse | None: """get a log stream Return a log stream. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppLogStream, StderrErrResponse] + AppLogStream | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_runner_connect_status.py b/nuon/api/runners/get_runner_connect_status.py index 730477b0..e1f067a5 100644 --- a/nuon/api/runners/get_runner_connect_status.py +++ b/nuon/api/runners/get_runner_connect_status.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ServiceRunnerConnectionStatus | StderrErrResponse | None: if response.status_code == 200: response_200 = ServiceRunnerConnectionStatus.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ServiceRunnerConnectionStatus | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: +) -> Response[ServiceRunnerConnectionStatus | StderrErrResponse]: """get a runner connection satus based on heartbeat # get runner connect status @@ -88,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]] + Response[ServiceRunnerConnectionStatus | StderrErrResponse] """ kwargs = _get_kwargs( @@ -106,7 +112,7 @@ def sync( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: +) -> ServiceRunnerConnectionStatus | StderrErrResponse | None: """get a runner connection satus based on heartbeat # get runner connect status @@ -125,7 +131,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceRunnerConnectionStatus, StderrErrResponse] + ServiceRunnerConnectionStatus | StderrErrResponse """ return sync_detailed( @@ -138,7 +144,7 @@ async def asyncio_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: +) -> Response[ServiceRunnerConnectionStatus | StderrErrResponse]: """get a runner connection satus based on heartbeat # get runner connect status @@ -157,7 +163,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[ServiceRunnerConnectionStatus, StderrErrResponse]] + Response[ServiceRunnerConnectionStatus | StderrErrResponse] """ kwargs = _get_kwargs( @@ -173,7 +179,7 @@ async def asyncio( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[ServiceRunnerConnectionStatus, StderrErrResponse]]: +) -> ServiceRunnerConnectionStatus | StderrErrResponse | None: """get a runner connection satus based on heartbeat # get runner connect status @@ -192,7 +198,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[ServiceRunnerConnectionStatus, StderrErrResponse] + ServiceRunnerConnectionStatus | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_runner_job.py b/nuon/api/runners/get_runner_job.py index 787f6d51..9d1b14ce 100644 --- a/nuon/api/runners/get_runner_job.py +++ b/nuon/api/runners/get_runner_job.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunnerJob | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunnerJob | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( runner_job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: +) -> Response[AppRunnerJob | StderrErrResponse]: """get runner job Return a runner job. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] + Response[AppRunnerJob | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( runner_job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: +) -> AppRunnerJob | StderrErrResponse | None: """get runner job Return a runner job. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerJob, StderrErrResponse] + AppRunnerJob | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( runner_job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: +) -> Response[AppRunnerJob | StderrErrResponse]: """get runner job Return a runner job. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] + Response[AppRunnerJob | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( runner_job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: +) -> AppRunnerJob | StderrErrResponse | None: """get runner job Return a runner job. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerJob, StderrErrResponse] + AppRunnerJob | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_runner_job_composite_plan.py b/nuon/api/runners/get_runner_job_composite_plan.py index 724a7761..01727512 100644 --- a/nuon/api/runners/get_runner_job_composite_plan.py +++ b/nuon/api/runners/get_runner_job_composite_plan.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> PlantypesCompositePlan | StderrErrResponse | None: 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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[PlantypesCompositePlan | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( runner_job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: +) -> Response[PlantypesCompositePlan | StderrErrResponse]: """get runner job composite plan Return a plan for a runner job. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[PlantypesCompositePlan, StderrErrResponse]] + Response[PlantypesCompositePlan | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( runner_job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: +) -> PlantypesCompositePlan | StderrErrResponse | None: """get runner job composite plan Return a plan for a runner job. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[PlantypesCompositePlan, StderrErrResponse] + PlantypesCompositePlan | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( runner_job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[PlantypesCompositePlan, StderrErrResponse]]: +) -> Response[PlantypesCompositePlan | StderrErrResponse]: """get runner job composite plan Return a plan for a runner job. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[PlantypesCompositePlan, StderrErrResponse]] + Response[PlantypesCompositePlan | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( runner_job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[PlantypesCompositePlan, StderrErrResponse]]: +) -> PlantypesCompositePlan | StderrErrResponse | None: """get runner job composite plan Return a plan for a runner job. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[PlantypesCompositePlan, StderrErrResponse] + PlantypesCompositePlan | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_runner_job_plan.py b/nuon/api/runners/get_runner_job_plan.py index 86b42871..52ffb6b2 100644 --- a/nuon/api/runners/get_runner_job_plan.py +++ b/nuon/api/runners/get_runner_job_plan.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( runner_job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """get runner job plan Return a plan for a runner job. @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( runner_job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """get runner job plan Return a plan for a runner job. @@ -111,7 +117,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -124,7 +130,7 @@ async def asyncio_detailed( runner_job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """get runner job plan Return a plan for a runner job. @@ -137,7 +143,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -153,7 +159,7 @@ async def asyncio( runner_job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """get runner job plan Return a plan for a runner job. @@ -166,7 +172,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/runners/get_runner_job_plan_v2.py b/nuon/api/runners/get_runner_job_plan_v2.py index a2e13ea5..f4cf2b5a 100644 --- a/nuon/api/runners/get_runner_job_plan_v2.py +++ b/nuon/api/runners/get_runner_job_plan_v2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -22,31 +22,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | str | None: 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: @@ -54,8 +60,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, str]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | str]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """get runner job plan Return a plan for a runner job. @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """get runner job plan Return a plan for a runner job. @@ -117,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return sync_detailed( @@ -132,7 +138,7 @@ async def asyncio_detailed( job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, str]]: +) -> Response[StderrErrResponse | str]: """get runner job plan Return a plan for a runner job. @@ -146,7 +152,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, str]] + Response[StderrErrResponse | str] """ kwargs = _get_kwargs( @@ -164,7 +170,7 @@ async def asyncio( job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, str]]: +) -> StderrErrResponse | str | None: """get runner job plan Return a plan for a runner job. @@ -178,7 +184,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, str] + StderrErrResponse | str """ return ( diff --git a/nuon/api/runners/get_runner_job_v2.py b/nuon/api/runners/get_runner_job_v2.py index acafd0f5..a1197c73 100644 --- a/nuon/api/runners/get_runner_job_v2.py +++ b/nuon/api/runners/get_runner_job_v2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunnerJob | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunnerJob | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: +) -> Response[AppRunnerJob | StderrErrResponse]: """get runner job Return a runner job. @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] + Response[AppRunnerJob | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: +) -> AppRunnerJob | StderrErrResponse | None: """get runner job Return a runner job. @@ -119,7 +125,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerJob, StderrErrResponse] + AppRunnerJob | StderrErrResponse """ return sync_detailed( @@ -134,7 +140,7 @@ async def asyncio_detailed( job_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerJob, StderrErrResponse]]: +) -> Response[AppRunnerJob | StderrErrResponse]: """get runner job Return a runner job. @@ -148,7 +154,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerJob, StderrErrResponse]] + Response[AppRunnerJob | StderrErrResponse] """ kwargs = _get_kwargs( @@ -166,7 +172,7 @@ async def asyncio( job_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerJob, StderrErrResponse]]: +) -> AppRunnerJob | StderrErrResponse | None: """get runner job Return a runner job. @@ -180,7 +186,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerJob, StderrErrResponse] + AppRunnerJob | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_runner_jobs.py b/nuon/api/runners/get_runner_jobs.py index 043b5017..1f77fa65 100644 --- a/nuon/api/runners/get_runner_jobs.py +++ b/nuon/api/runners/get_runner_jobs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,13 +13,13 @@ def _get_kwargs( runner_id: str, *, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + group: str | Unset = UNSET, + groups: str | Unset = UNSET, + status: str | Unset = UNSET, + statuses: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -49,8 +49,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppRunnerJob] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -60,26 +60,32 @@ def _parse_response( 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: @@ -87,8 +93,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppRunnerJob]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -101,34 +107,34 @@ def sync_detailed( runner_id: str, *, client: AuthenticatedClient, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: + group: str | Unset = UNSET, + groups: str | Unset = UNSET, + status: str | Unset = UNSET, + statuses: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppRunnerJob]]: """get runner jobs Return runner jobs. Args: runner_id (str): - group (Union[Unset, str]): - groups (Union[Unset, str]): - status (Union[Unset, str]): - statuses (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + group (str | Unset): + groups (str | Unset): + status (str | Unset): + statuses (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppRunnerJob']]] + Response[StderrErrResponse | list[AppRunnerJob]] """ kwargs = _get_kwargs( @@ -153,34 +159,34 @@ def sync( runner_id: str, *, client: AuthenticatedClient, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: + group: str | Unset = UNSET, + groups: str | Unset = UNSET, + status: str | Unset = UNSET, + statuses: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppRunnerJob] | None: """get runner jobs Return runner jobs. Args: runner_id (str): - group (Union[Unset, str]): - groups (Union[Unset, str]): - status (Union[Unset, str]): - statuses (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + group (str | Unset): + groups (str | Unset): + status (str | Unset): + statuses (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppRunnerJob']] + StderrErrResponse | list[AppRunnerJob] """ return sync_detailed( @@ -200,34 +206,34 @@ async def asyncio_detailed( runner_id: str, *, client: AuthenticatedClient, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppRunnerJob"]]]: + group: str | Unset = UNSET, + groups: str | Unset = UNSET, + status: str | Unset = UNSET, + statuses: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppRunnerJob]]: """get runner jobs Return runner jobs. Args: runner_id (str): - group (Union[Unset, str]): - groups (Union[Unset, str]): - status (Union[Unset, str]): - statuses (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + group (str | Unset): + groups (str | Unset): + status (str | Unset): + statuses (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppRunnerJob']]] + Response[StderrErrResponse | list[AppRunnerJob]] """ kwargs = _get_kwargs( @@ -250,34 +256,34 @@ async def asyncio( runner_id: str, *, client: AuthenticatedClient, - group: Union[Unset, str] = UNSET, - groups: Union[Unset, str] = UNSET, - status: Union[Unset, str] = UNSET, - statuses: Union[Unset, str] = UNSET, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppRunnerJob"]]]: + group: str | Unset = UNSET, + groups: str | Unset = UNSET, + status: str | Unset = UNSET, + statuses: str | Unset = UNSET, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppRunnerJob] | None: """get runner jobs Return runner jobs. Args: runner_id (str): - group (Union[Unset, str]): - groups (Union[Unset, str]): - status (Union[Unset, str]): - statuses (Union[Unset, str]): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + group (str | Unset): + groups (str | Unset): + status (str | Unset): + statuses (str | Unset): + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppRunnerJob']] + StderrErrResponse | list[AppRunnerJob] """ return ( diff --git a/nuon/api/runners/get_runner_latest_heart_beat.py b/nuon/api/runners/get_runner_latest_heart_beat.py index 61170a4b..d0bd12fe 100644 --- a/nuon/api/runners/get_runner_latest_heart_beat.py +++ b/nuon/api/runners/get_runner_latest_heart_beat.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunnerHeartBeat | StderrErrResponse | None: if response.status_code == 200: response_200 = AppRunnerHeartBeat.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunnerHeartBeat | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: +) -> Response[AppRunnerHeartBeat | StderrErrResponse]: """get the latest heartbeats for a runner @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerHeartBeat, StderrErrResponse]] + Response[AppRunnerHeartBeat | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: +) -> AppRunnerHeartBeat | StderrErrResponse | None: """get the latest heartbeats for a runner @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerHeartBeat, StderrErrResponse] + AppRunnerHeartBeat | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerHeartBeat, StderrErrResponse]]: +) -> Response[AppRunnerHeartBeat | StderrErrResponse]: """get the latest heartbeats for a runner @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerHeartBeat, StderrErrResponse]] + Response[AppRunnerHeartBeat | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerHeartBeat, StderrErrResponse]]: +) -> AppRunnerHeartBeat | StderrErrResponse | None: """get the latest heartbeats for a runner @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerHeartBeat, StderrErrResponse] + AppRunnerHeartBeat | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_runner_recent_health_checks.py b/nuon/api/runners/get_runner_recent_health_checks.py index d90e7f88..3cd48b29 100644 --- a/nuon/api/runners/get_runner_recent_health_checks.py +++ b/nuon/api/runners/get_runner_recent_health_checks.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,10 +13,10 @@ def _get_kwargs( runner_id: str, *, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, + window: str | Unset = "1h", + offset: int | Unset = 0, + limit: int | Unset = 10, + x_nuon_pagination_enabled: bool | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} if not isinstance(x_nuon_pagination_enabled, Unset): @@ -43,8 +43,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppRunnerHealthCheck] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -54,26 +54,32 @@ def _parse_response( 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: @@ -81,8 +87,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppRunnerHealthCheck]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -95,28 +101,28 @@ def sync_detailed( runner_id: str, *, client: AuthenticatedClient, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + window: str | Unset = "1h", + offset: int | Unset = 0, + limit: int | Unset = 10, + x_nuon_pagination_enabled: bool | Unset = UNSET, +) -> Response[StderrErrResponse | list[AppRunnerHealthCheck]]: """get recent health checks Args: runner_id (str): - window (Union[Unset, str]): Default: '1h'. - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): + window (str | Unset): Default: '1h'. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + x_nuon_pagination_enabled (bool | Unset): 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['AppRunnerHealthCheck']]] + Response[StderrErrResponse | list[AppRunnerHealthCheck]] """ kwargs = _get_kwargs( @@ -138,28 +144,28 @@ def sync( runner_id: str, *, client: AuthenticatedClient, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + window: str | Unset = "1h", + offset: int | Unset = 0, + limit: int | Unset = 10, + x_nuon_pagination_enabled: bool | Unset = UNSET, +) -> StderrErrResponse | list[AppRunnerHealthCheck] | None: """get recent health checks Args: runner_id (str): - window (Union[Unset, str]): Default: '1h'. - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): + window (str | Unset): Default: '1h'. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + x_nuon_pagination_enabled (bool | Unset): 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['AppRunnerHealthCheck']] + StderrErrResponse | list[AppRunnerHealthCheck] """ return sync_detailed( @@ -176,28 +182,28 @@ async def asyncio_detailed( runner_id: str, *, client: AuthenticatedClient, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Response[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + window: str | Unset = "1h", + offset: int | Unset = 0, + limit: int | Unset = 10, + x_nuon_pagination_enabled: bool | Unset = UNSET, +) -> Response[StderrErrResponse | list[AppRunnerHealthCheck]]: """get recent health checks Args: runner_id (str): - window (Union[Unset, str]): Default: '1h'. - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): + window (str | Unset): Default: '1h'. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + x_nuon_pagination_enabled (bool | Unset): 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['AppRunnerHealthCheck']]] + Response[StderrErrResponse | list[AppRunnerHealthCheck]] """ kwargs = _get_kwargs( @@ -217,28 +223,28 @@ async def asyncio( runner_id: str, *, client: AuthenticatedClient, - window: Union[Unset, str] = "1h", - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - x_nuon_pagination_enabled: Union[Unset, bool] = UNSET, -) -> Optional[Union[StderrErrResponse, list["AppRunnerHealthCheck"]]]: + window: str | Unset = "1h", + offset: int | Unset = 0, + limit: int | Unset = 10, + x_nuon_pagination_enabled: bool | Unset = UNSET, +) -> StderrErrResponse | list[AppRunnerHealthCheck] | None: """get recent health checks Args: runner_id (str): - window (Union[Unset, str]): Default: '1h'. - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - x_nuon_pagination_enabled (Union[Unset, bool]): + window (str | Unset): Default: '1h'. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + x_nuon_pagination_enabled (bool | Unset): 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['AppRunnerHealthCheck']] + StderrErrResponse | list[AppRunnerHealthCheck] """ return ( diff --git a/nuon/api/runners/get_runner_settings.py b/nuon/api/runners/get_runner_settings.py index 3162b948..b7bb70fb 100644 --- a/nuon/api/runners/get_runner_settings.py +++ b/nuon/api/runners/get_runner_settings.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunnerGroupSettings | StderrErrResponse | None: if response.status_code == 200: response_200 = AppRunnerGroupSettings.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunnerGroupSettings | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: +) -> Response[AppRunnerGroupSettings | StderrErrResponse]: """get runner settings Return runner settings for the provided runner. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerGroupSettings, StderrErrResponse]] + Response[AppRunnerGroupSettings | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: +) -> AppRunnerGroupSettings | StderrErrResponse | None: """get runner settings Return runner settings for the provided runner. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerGroupSettings, StderrErrResponse] + AppRunnerGroupSettings | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunnerGroupSettings, StderrErrResponse]]: +) -> Response[AppRunnerGroupSettings | StderrErrResponse]: """get runner settings Return runner settings for the provided runner. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerGroupSettings, StderrErrResponse]] + Response[AppRunnerGroupSettings | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunnerGroupSettings, StderrErrResponse]]: +) -> AppRunnerGroupSettings | StderrErrResponse | None: """get runner settings Return runner settings for the provided runner. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerGroupSettings, StderrErrResponse] + AppRunnerGroupSettings | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_terraform_current_state_data.py b/nuon/api/runners/get_terraform_current_state_data.py index ba6ffec3..155e8ce4 100644 --- a/nuon/api/runners/get_terraform_current_state_data.py +++ b/nuon/api/runners/get_terraform_current_state_data.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -20,32 +20,38 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspaceState | StderrErrResponse | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,7 +72,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """get current terraform Raises: @@ -74,7 +80,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs() @@ -89,7 +95,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """get current terraform Raises: @@ -97,7 +103,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return sync_detailed( @@ -108,7 +114,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """get current terraform Raises: @@ -116,7 +122,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs() @@ -129,7 +135,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """get current terraform Raises: @@ -137,7 +143,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_terraform_states.py b/nuon/api/runners/get_terraform_states.py index a4afc9b5..c31b4d7c 100644 --- a/nuon/api/runners/get_terraform_states.py +++ b/nuon/api/runners/get_terraform_states.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( workspace_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppTerraformWorkspaceState] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppTerraformWorkspaceState]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppTerraformWorkspaceState]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppTerraformWorkspaceState] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppTerraformWorkspaceState] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppTerraformWorkspaceState]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppTerraformWorkspaceState] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppTerraformWorkspaceState] """ return ( diff --git a/nuon/api/runners/get_terraform_states_v2.py b/nuon/api/runners/get_terraform_states_v2.py index 4e4b7231..637db000 100644 --- a/nuon/api/runners/get_terraform_states_v2.py +++ b/nuon/api/runners/get_terraform_states_v2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( workspace_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppTerraformWorkspaceState] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceState"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppTerraformWorkspaceState]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppTerraformWorkspaceState]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppTerraformWorkspaceState] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppTerraformWorkspaceState] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppTerraformWorkspaceState]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppTerraformWorkspaceState] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppTerraformWorkspaceState] """ return ( diff --git a/nuon/api/runners/get_terraform_workspace.py b/nuon/api/runners/get_terraform_workspace.py index 9751df34..a43274a2 100644 --- a/nuon/api/runners/get_terraform_workspace.py +++ b/nuon/api/runners/get_terraform_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,8 +22,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -33,26 +33,32 @@ def _parse_response( 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: @@ -60,8 +66,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,7 +80,7 @@ def sync_detailed( workspace_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: """get terraform workspace Args: @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + Response[StderrErrResponse | list[AppTerraformWorkspace]] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( workspace_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: """get terraform workspace Args: @@ -114,7 +120,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] + StderrErrResponse | list[AppTerraformWorkspace] """ return sync_detailed( @@ -127,7 +133,7 @@ async def asyncio_detailed( workspace_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: """get terraform workspace Args: @@ -138,7 +144,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + Response[StderrErrResponse | list[AppTerraformWorkspace]] """ kwargs = _get_kwargs( @@ -154,7 +160,7 @@ async def asyncio( workspace_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: """get terraform workspace Args: @@ -165,7 +171,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] + StderrErrResponse | list[AppTerraformWorkspace] """ return ( diff --git a/nuon/api/runners/get_terraform_workspace_lock.py b/nuon/api/runners/get_terraform_workspace_lock.py index 348e0a9e..f41cfc1b 100644 --- a/nuon/api/runners/get_terraform_workspace_lock.py +++ b/nuon/api/runners/get_terraform_workspace_lock.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspaceLock | StderrErrResponse | None: if response.status_code == 200: response_200 = AppTerraformWorkspaceLock.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspaceLock | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( workspace_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceLock | StderrErrResponse]: """get terraform workspace lock Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]] + Response[AppTerraformWorkspaceLock | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( workspace_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: +) -> AppTerraformWorkspaceLock | StderrErrResponse | None: """get terraform workspace lock Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceLock, StderrErrResponse] + AppTerraformWorkspaceLock | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( workspace_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceLock | StderrErrResponse]: """get terraform workspace lock Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceLock, StderrErrResponse]] + Response[AppTerraformWorkspaceLock | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( workspace_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceLock, StderrErrResponse]]: +) -> AppTerraformWorkspaceLock | StderrErrResponse | None: """get terraform workspace lock Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceLock, StderrErrResponse] + AppTerraformWorkspaceLock | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_terraform_workspace_state_by_id.py b/nuon/api/runners/get_terraform_workspace_state_by_id.py index 8a65653e..55875497 100644 --- a/nuon/api/runners/get_terraform_workspace_state_by_id.py +++ b/nuon/api/runners/get_terraform_workspace_state_by_id.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspaceState | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """get terraform state by ID Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """get terraform state by ID Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """get terraform state by ID Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """get terraform state by ID Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_terraform_workspace_state_by_idv2.py b/nuon/api/runners/get_terraform_workspace_state_by_idv2.py index 1a9b84e6..b81a01a3 100644 --- a/nuon/api/runners/get_terraform_workspace_state_by_idv2.py +++ b/nuon/api/runners/get_terraform_workspace_state_by_idv2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,32 +23,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspaceState | StderrErrResponse | None: 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: @@ -56,8 +62,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def sync_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """get terraform state by ID Args: @@ -83,7 +89,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -103,7 +109,7 @@ def sync( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """get terraform state by ID Args: @@ -115,7 +121,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return sync_detailed( @@ -130,7 +136,7 @@ async def asyncio_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """get terraform state by ID Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -160,7 +166,7 @@ async def asyncio( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """get terraform state by ID Args: @@ -172,7 +178,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_terraform_workspace_state_json_resources.py b/nuon/api/runners/get_terraform_workspace_state_json_resources.py index 35bd283e..19e6b7d0 100644 --- a/nuon/api/runners/get_terraform_workspace_state_json_resources.py +++ b/nuon/api/runners/get_terraform_workspace_state_json_resources.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -25,32 +25,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse | None: if response.status_code == 200: response_200 = GetTerraformWorkspaceStateJSONResourcesResponse200.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: @@ -58,8 +64,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: +) -> Response[GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse]: r"""get terraform state resources. This output is similar to \"terraform state list\" Args: @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]] + Response[GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: +) -> GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse | None: r"""get terraform state resources. This output is similar to \"terraform state list\" Args: @@ -117,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse] + GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse """ return sync_detailed( @@ -132,7 +138,7 @@ async def asyncio_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: +) -> Response[GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse]: r"""get terraform state resources. This output is similar to \"terraform state list\" Args: @@ -144,7 +150,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]] + Response[GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -162,7 +168,7 @@ async def asyncio( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse]]: +) -> GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse | None: r"""get terraform state resources. This output is similar to \"terraform state list\" Args: @@ -174,7 +180,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetTerraformWorkspaceStateJSONResourcesResponse200, StderrErrResponse] + GetTerraformWorkspaceStateJSONResourcesResponse200 | StderrErrResponse """ return ( 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 index 2a987421..b62ef8fb 100644 --- a/nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py +++ b/nuon/api/runners/get_terraform_workspace_state_json_resources_v2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -25,32 +25,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse | None: 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: @@ -58,8 +64,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: +) -> Response[GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse]: r"""get terraform state resources. This output is similar to \"terraform state list\" Args: @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]] + Response[GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: +) -> GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse | None: r"""get terraform state resources. This output is similar to \"terraform state list\" Args: @@ -117,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse] + GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse """ return sync_detailed( @@ -132,7 +138,7 @@ async def asyncio_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: +) -> Response[GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse]: r"""get terraform state resources. This output is similar to \"terraform state list\" Args: @@ -144,7 +150,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]] + Response[GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -162,7 +168,7 @@ async def asyncio( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse]]: +) -> GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse | None: r"""get terraform state resources. This output is similar to \"terraform state list\" Args: @@ -174,7 +180,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetTerraformWorkspaceStateJSONResourcesV2Response200, StderrErrResponse] + GetTerraformWorkspaceStateJSONResourcesV2Response200 | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_terraform_workspace_state_resources.py b/nuon/api/runners/get_terraform_workspace_state_resources.py index aa5c74ee..3045ed6c 100644 --- a/nuon/api/runners/get_terraform_workspace_state_resources.py +++ b/nuon/api/runners/get_terraform_workspace_state_resources.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -23,8 +23,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppTerraformStateResource] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -34,26 +34,32 @@ def _parse_response( 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: @@ -61,8 +67,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppTerraformStateResource]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,7 +82,7 @@ def sync_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: +) -> Response[StderrErrResponse | list[AppTerraformStateResource]]: """get terraform state resources Args: @@ -88,7 +94,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppTerraformStateResource']]] + Response[StderrErrResponse | list[AppTerraformStateResource]] """ kwargs = _get_kwargs( @@ -108,7 +114,7 @@ def sync( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: +) -> StderrErrResponse | list[AppTerraformStateResource] | None: """get terraform state resources Args: @@ -120,7 +126,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppTerraformStateResource']] + StderrErrResponse | list[AppTerraformStateResource] """ return sync_detailed( @@ -135,7 +141,7 @@ async def asyncio_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: +) -> Response[StderrErrResponse | list[AppTerraformStateResource]]: """get terraform state resources Args: @@ -147,7 +153,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppTerraformStateResource']]] + Response[StderrErrResponse | list[AppTerraformStateResource]] """ kwargs = _get_kwargs( @@ -165,7 +171,7 @@ async def asyncio( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformStateResource"]]]: +) -> StderrErrResponse | list[AppTerraformStateResource] | None: """get terraform state resources Args: @@ -177,7 +183,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppTerraformStateResource']] + StderrErrResponse | list[AppTerraformStateResource] """ return ( diff --git a/nuon/api/runners/get_terraform_workspace_states_json.py b/nuon/api/runners/get_terraform_workspace_states_json.py index 6f5ba956..1d8f626d 100644 --- a/nuon/api/runners/get_terraform_workspace_states_json.py +++ b/nuon/api/runners/get_terraform_workspace_states_json.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( workspace_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppTerraformWorkspaceStateJSON] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppTerraformWorkspaceStateJSON]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppTerraformWorkspaceStateJSON]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppTerraformWorkspaceStateJSON] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppTerraformWorkspaceStateJSON] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppTerraformWorkspaceStateJSON]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppTerraformWorkspaceStateJSON] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppTerraformWorkspaceStateJSON] """ return ( diff --git a/nuon/api/runners/get_terraform_workspace_states_json_by_id.py b/nuon/api/runners/get_terraform_workspace_states_json_by_id.py index 186a8991..4ccbf8b0 100644 --- a/nuon/api/runners/get_terraform_workspace_states_json_by_id.py +++ b/nuon/api/runners/get_terraform_workspace_states_json_by_id.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -25,32 +25,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse | None: if response.status_code == 200: response_200 = GetTerraformWorkspaceStatesJSONByIDResponse200.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: @@ -58,8 +64,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: +) -> Response[GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse]: r"""get terraform state json by id. This output is same as \"terraform show --json\" Args: @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]] + Response[GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: +) -> GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse | None: r"""get terraform state json by id. This output is same as \"terraform show --json\" Args: @@ -117,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse] + GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse """ return sync_detailed( @@ -132,7 +138,7 @@ async def asyncio_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: +) -> Response[GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse]: r"""get terraform state json by id. This output is same as \"terraform show --json\" Args: @@ -144,7 +150,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]] + Response[GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -162,7 +168,7 @@ async def asyncio( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse]]: +) -> GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse | None: r"""get terraform state json by id. This output is same as \"terraform show --json\" Args: @@ -174,7 +180,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetTerraformWorkspaceStatesJSONByIDResponse200, StderrErrResponse] + GetTerraformWorkspaceStatesJSONByIDResponse200 | StderrErrResponse """ return ( 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 index ce9ec0b3..124f4f0d 100644 --- a/nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py +++ b/nuon/api/runners/get_terraform_workspace_states_json_by_idv2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -25,32 +25,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse | None: 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: @@ -58,8 +64,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,7 +79,7 @@ def sync_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: +) -> Response[GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse]: r"""get terraform state json by id. This output is same as \"terraform show --json\" Args: @@ -85,7 +91,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]] + Response[GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,7 +111,7 @@ def sync( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: +) -> GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse | None: r"""get terraform state json by id. This output is same as \"terraform show --json\" Args: @@ -117,7 +123,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse] + GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse """ return sync_detailed( @@ -132,7 +138,7 @@ async def asyncio_detailed( state_id: str, *, client: AuthenticatedClient, -) -> Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: +) -> Response[GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse]: r"""get terraform state json by id. This output is same as \"terraform show --json\" Args: @@ -144,7 +150,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]] + Response[GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse] """ kwargs = _get_kwargs( @@ -162,7 +168,7 @@ async def asyncio( state_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse]]: +) -> GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse | None: r"""get terraform state json by id. This output is same as \"terraform show --json\" Args: @@ -174,7 +180,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[GetTerraformWorkspaceStatesJSONByIDV2Response200, StderrErrResponse] + GetTerraformWorkspaceStatesJSONByIDV2Response200 | StderrErrResponse """ return ( diff --git a/nuon/api/runners/get_terraform_workspace_states_jsonv2.py b/nuon/api/runners/get_terraform_workspace_states_jsonv2.py index e476f0be..9c810609 100644 --- a/nuon/api/runners/get_terraform_workspace_states_jsonv2.py +++ b/nuon/api/runners/get_terraform_workspace_states_jsonv2.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( workspace_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppTerraformWorkspaceStateJSON] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspaceStateJSON"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppTerraformWorkspaceStateJSON]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,24 +95,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppTerraformWorkspaceStateJSON]] """ kwargs = _get_kwargs( @@ -127,24 +133,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppTerraformWorkspaceStateJSON] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppTerraformWorkspaceStateJSON] """ return sync_detailed( @@ -160,24 +166,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']]] + Response[StderrErrResponse | list[AppTerraformWorkspaceStateJSON]] """ kwargs = _get_kwargs( @@ -196,24 +202,24 @@ 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"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppTerraformWorkspaceStateJSON] | None: """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. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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']] + StderrErrResponse | list[AppTerraformWorkspaceStateJSON] """ return ( diff --git a/nuon/api/runners/get_terraform_workspaces.py b/nuon/api/runners/get_terraform_workspaces.py index 164a0685..93461c31 100644 --- a/nuon/api/runners/get_terraform_workspaces.py +++ b/nuon/api/runners/get_terraform_workspaces.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -20,8 +20,8 @@ def _get_kwargs() -> dict[str, Any]: def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -31,26 +31,32 @@ def _parse_response( 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: @@ -58,8 +64,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,7 +77,7 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: """get terraform workspaces Raises: @@ -79,7 +85,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + Response[StderrErrResponse | list[AppTerraformWorkspace]] """ kwargs = _get_kwargs() @@ -94,7 +100,7 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: """get terraform workspaces Raises: @@ -102,7 +108,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] + StderrErrResponse | list[AppTerraformWorkspace] """ return sync_detailed( @@ -113,7 +119,7 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, -) -> Response[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> Response[StderrErrResponse | list[AppTerraformWorkspace]]: """get terraform workspaces Raises: @@ -121,7 +127,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppTerraformWorkspace']]] + Response[StderrErrResponse | list[AppTerraformWorkspace]] """ kwargs = _get_kwargs() @@ -134,7 +140,7 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, -) -> Optional[Union[StderrErrResponse, list["AppTerraformWorkspace"]]]: +) -> StderrErrResponse | list[AppTerraformWorkspace] | None: """get terraform workspaces Raises: @@ -142,7 +148,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppTerraformWorkspace']] + StderrErrResponse | list[AppTerraformWorkspace] """ return ( diff --git a/nuon/api/runners/graceful_shut_down_runner.py b/nuon/api/runners/graceful_shut_down_runner.py index e618548c..761949ea 100644 --- a/nuon/api/runners/graceful_shut_down_runner.py +++ b/nuon/api/runners/graceful_shut_down_runner.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: if response.status_code == 201: response_201 = cast(bool, 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceGracefulShutdownRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """shut down a runner Gracefully shut down a runner. @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -115,7 +121,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceGracefulShutdownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """shut down a runner Gracefully shut down a runner. @@ -132,7 +138,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -147,7 +153,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceGracefulShutdownRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """shut down a runner Gracefully shut down a runner. @@ -164,7 +170,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -182,7 +188,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceGracefulShutdownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """shut down a runner Gracefully shut down a runner. @@ -199,7 +205,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/runners/lock_terraform_workspace.py b/nuon/api/runners/lock_terraform_workspace.py index 2222adb9..c95b0f8b 100644 --- a/nuon/api/runners/lock_terraform_workspace.py +++ b/nuon/api/runners/lock_terraform_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -15,7 +15,7 @@ def _get_kwargs( workspace_id: str, *, body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, + job_id: str | Unset = UNSET, ) -> dict[str, Any]: headers: dict[str, Any] = {} @@ -40,32 +40,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspaceState | StderrErrResponse | None: 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: @@ -73,8 +79,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -88,13 +94,13 @@ def sync_detailed( *, client: AuthenticatedClient, body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + job_id: str | Unset = UNSET, +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """lock terraform state Args: workspace_id (str): - job_id (Union[Unset, str]): + job_id (str | Unset): body (LockTerraformWorkspaceBody): Raises: @@ -102,7 +108,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -123,13 +129,13 @@ def sync( *, client: AuthenticatedClient, body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + job_id: str | Unset = UNSET, +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """lock terraform state Args: workspace_id (str): - job_id (Union[Unset, str]): + job_id (str | Unset): body (LockTerraformWorkspaceBody): Raises: @@ -137,7 +143,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return sync_detailed( @@ -153,13 +159,13 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + job_id: str | Unset = UNSET, +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """lock terraform state Args: workspace_id (str): - job_id (Union[Unset, str]): + job_id (str | Unset): body (LockTerraformWorkspaceBody): Raises: @@ -167,7 +173,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -186,13 +192,13 @@ async def asyncio( *, client: AuthenticatedClient, body: LockTerraformWorkspaceBody, - job_id: Union[Unset, str] = UNSET, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + job_id: str | Unset = UNSET, +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """lock terraform state Args: workspace_id (str): - job_id (Union[Unset, str]): + job_id (str | Unset): body (LockTerraformWorkspaceBody): Raises: @@ -200,7 +206,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return ( diff --git a/nuon/api/runners/log_stream_read_logs.py b/nuon/api/runners/log_stream_read_logs.py index 568ee913..eb267131 100644 --- a/nuon/api/runners/log_stream_read_logs.py +++ b/nuon/api/runners/log_stream_read_logs.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -28,8 +28,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppOtelLogRecord] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -39,26 +39,32 @@ def _parse_response( 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: @@ -66,8 +72,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppOtelLogRecord]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,7 +87,7 @@ def sync_detailed( *, client: AuthenticatedClient, x_nuon_api_offset: str, -) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: +) -> Response[StderrErrResponse | list[AppOtelLogRecord]]: """read a log stream's logs Read OTEL formatted logs for a log stream. @@ -95,7 +101,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppOtelLogRecord']]] + Response[StderrErrResponse | list[AppOtelLogRecord]] """ kwargs = _get_kwargs( @@ -115,7 +121,7 @@ def sync( *, client: AuthenticatedClient, x_nuon_api_offset: str, -) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: +) -> StderrErrResponse | list[AppOtelLogRecord] | None: """read a log stream's logs Read OTEL formatted logs for a log stream. @@ -129,7 +135,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppOtelLogRecord']] + StderrErrResponse | list[AppOtelLogRecord] """ return sync_detailed( @@ -144,7 +150,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, x_nuon_api_offset: str, -) -> Response[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: +) -> Response[StderrErrResponse | list[AppOtelLogRecord]]: """read a log stream's logs Read OTEL formatted logs for a log stream. @@ -158,7 +164,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, list['AppOtelLogRecord']]] + Response[StderrErrResponse | list[AppOtelLogRecord]] """ kwargs = _get_kwargs( @@ -176,7 +182,7 @@ async def asyncio( *, client: AuthenticatedClient, x_nuon_api_offset: str, -) -> Optional[Union[StderrErrResponse, list["AppOtelLogRecord"]]]: +) -> StderrErrResponse | list[AppOtelLogRecord] | None: """read a log stream's logs Read OTEL formatted logs for a log stream. @@ -190,7 +196,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, list['AppOtelLogRecord']] + StderrErrResponse | list[AppOtelLogRecord] """ return ( diff --git a/nuon/api/runners/mng_vm_shut_down.py b/nuon/api/runners/mng_vm_shut_down.py index 42758447..924644a1 100644 --- a/nuon/api/runners/mng_vm_shut_down.py +++ b/nuon/api/runners/mng_vm_shut_down.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: if response.status_code == 201: response_201 = cast(bool, 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceMngVMShutDownRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """shut down an install runner VM Args: @@ -90,7 +96,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -110,7 +116,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceMngVMShutDownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """shut down an install runner VM Args: @@ -122,7 +128,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -137,7 +143,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceMngVMShutDownRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """shut down an install runner VM Args: @@ -149,7 +155,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -167,7 +173,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceMngVMShutDownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """shut down an install runner VM Args: @@ -179,7 +185,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/runners/shut_down_runner_mng.py b/nuon/api/runners/shut_down_runner_mng.py index 441dfe1f..8d624ae8 100644 --- a/nuon/api/runners/shut_down_runner_mng.py +++ b/nuon/api/runners/shut_down_runner_mng.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: if response.status_code == 201: response_201 = cast(bool, 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceMngShutDownRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """shut down an install runner management process Args: @@ -90,7 +96,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -110,7 +116,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceMngShutDownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """shut down an install runner management process Args: @@ -122,7 +128,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -137,7 +143,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceMngShutDownRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """shut down an install runner management process Args: @@ -149,7 +155,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -167,7 +173,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceMngShutDownRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """shut down an install runner management process Args: @@ -179,7 +185,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/runners/unlock_terraform_workspace.py b/nuon/api/runners/unlock_terraform_workspace.py index ee194f3e..85b37e33 100644 --- a/nuon/api/runners/unlock_terraform_workspace.py +++ b/nuon/api/runners/unlock_terraform_workspace.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspaceState | StderrErrResponse | None: 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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: UnlockTerraformWorkspaceBody, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """unlock terraform workspace Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: UnlockTerraformWorkspaceBody, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """unlock terraform workspace Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UnlockTerraformWorkspaceBody, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """unlock terraform workspace Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: UnlockTerraformWorkspaceBody, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """unlock terraform workspace Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return ( diff --git a/nuon/api/runners/update_runner_mng.py b/nuon/api/runners/update_runner_mng.py index ea7aa5f7..b1e833fe 100644 --- a/nuon/api/runners/update_runner_mng.py +++ b/nuon/api/runners/update_runner_mng.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -31,31 +31,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | bool | None: if response.status_code == 201: response_201 = cast(bool, 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: @@ -63,8 +69,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, bool]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | bool]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceMngUpdateRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """update an install runner via the mng process Args: @@ -90,7 +96,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -110,7 +116,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceMngUpdateRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """update an install runner via the mng process Args: @@ -122,7 +128,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return sync_detailed( @@ -137,7 +143,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceMngUpdateRequest, -) -> Response[Union[StderrErrResponse, bool]]: +) -> Response[StderrErrResponse | bool]: """update an install runner via the mng process Args: @@ -149,7 +155,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[StderrErrResponse, bool]] + Response[StderrErrResponse | bool] """ kwargs = _get_kwargs( @@ -167,7 +173,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceMngUpdateRequest, -) -> Optional[Union[StderrErrResponse, bool]]: +) -> StderrErrResponse | bool | None: """update an install runner via the mng process Args: @@ -179,7 +185,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[StderrErrResponse, bool] + StderrErrResponse | bool """ return ( diff --git a/nuon/api/runners/update_runner_settings.py b/nuon/api/runners/update_runner_settings.py index 7d6a7d1e..954c3f40 100644 --- a/nuon/api/runners/update_runner_settings.py +++ b/nuon/api/runners/update_runner_settings.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -32,32 +32,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunnerJobExecution | StderrErrResponse | None: if response.status_code == 200: response_200 = AppRunnerJobExecution.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: @@ -65,8 +71,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunnerJobExecution | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,7 +86,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceUpdateRunnerSettingsRequest, -) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: +) -> Response[AppRunnerJobExecution | StderrErrResponse]: """update a runner's settings via its runner settings group Args: @@ -92,7 +98,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerJobExecution, StderrErrResponse]] + Response[AppRunnerJobExecution | StderrErrResponse] """ kwargs = _get_kwargs( @@ -112,7 +118,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceUpdateRunnerSettingsRequest, -) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: +) -> AppRunnerJobExecution | StderrErrResponse | None: """update a runner's settings via its runner settings group Args: @@ -124,7 +130,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerJobExecution, StderrErrResponse] + AppRunnerJobExecution | StderrErrResponse """ return sync_detailed( @@ -139,7 +145,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceUpdateRunnerSettingsRequest, -) -> Response[Union[AppRunnerJobExecution, StderrErrResponse]]: +) -> Response[AppRunnerJobExecution | StderrErrResponse]: """update a runner's settings via its runner settings group Args: @@ -151,7 +157,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunnerJobExecution, StderrErrResponse]] + Response[AppRunnerJobExecution | StderrErrResponse] """ kwargs = _get_kwargs( @@ -169,7 +175,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceUpdateRunnerSettingsRequest, -) -> Optional[Union[AppRunnerJobExecution, StderrErrResponse]]: +) -> AppRunnerJobExecution | StderrErrResponse | None: """update a runner's settings via its runner settings group Args: @@ -181,7 +187,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunnerJobExecution, StderrErrResponse] + AppRunnerJobExecution | StderrErrResponse """ return ( diff --git a/nuon/api/runners/update_terraform_state.py b/nuon/api/runners/update_terraform_state.py index 31f4178a..9e13f592 100644 --- a/nuon/api/runners/update_terraform_state.py +++ b/nuon/api/runners/update_terraform_state.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppTerraformWorkspaceState | StderrErrResponse | None: 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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateTerraformStateBody, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """update terraform state Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: UpdateTerraformStateBody, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """update terraform state Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateTerraformStateBody, -) -> Response[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> Response[AppTerraformWorkspaceState | StderrErrResponse]: """update terraform state Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppTerraformWorkspaceState, StderrErrResponse]] + Response[AppTerraformWorkspaceState | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: UpdateTerraformStateBody, -) -> Optional[Union[AppTerraformWorkspaceState, StderrErrResponse]]: +) -> AppTerraformWorkspaceState | StderrErrResponse | None: """update terraform state Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppTerraformWorkspaceState, StderrErrResponse] + AppTerraformWorkspaceState | StderrErrResponse """ return ( diff --git a/nuon/api/runnersrunner/get_runner.py b/nuon/api/runnersrunner/get_runner.py index 8e7e2463..17c25177 100644 --- a/nuon/api/runnersrunner/get_runner.py +++ b/nuon/api/runnersrunner/get_runner.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppRunner, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppRunner | StderrErrResponse | None: if response.status_code == 200: response_200 = AppRunner.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppRunner, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppRunner | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunner, StderrErrResponse]]: +) -> Response[AppRunner | StderrErrResponse]: """get a runner by id Return a runner. @@ -82,7 +88,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunner, StderrErrResponse]] + Response[AppRunner | StderrErrResponse] """ kwargs = _get_kwargs( @@ -100,7 +106,7 @@ def sync( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunner, StderrErrResponse]]: +) -> AppRunner | StderrErrResponse | None: """get a runner by id Return a runner. @@ -113,7 +119,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunner, StderrErrResponse] + AppRunner | StderrErrResponse """ return sync_detailed( @@ -126,7 +132,7 @@ async def asyncio_detailed( runner_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppRunner, StderrErrResponse]]: +) -> Response[AppRunner | StderrErrResponse]: """get a runner by id Return a runner. @@ -139,7 +145,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppRunner, StderrErrResponse]] + Response[AppRunner | StderrErrResponse] """ kwargs = _get_kwargs( @@ -155,7 +161,7 @@ async def asyncio( runner_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppRunner, StderrErrResponse]]: +) -> AppRunner | StderrErrResponse | None: """get a runner by id Return a runner. @@ -168,7 +174,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppRunner, StderrErrResponse] + AppRunner | StderrErrResponse """ return ( diff --git a/nuon/api/runnersrunner/get_runner_job_executions.py b/nuon/api/runnersrunner/get_runner_job_executions.py index 7042efcc..9413ef93 100644 --- a/nuon/api/runnersrunner/get_runner_job_executions.py +++ b/nuon/api/runnersrunner/get_runner_job_executions.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -13,9 +13,9 @@ def _get_kwargs( runner_job_id: str, *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -37,8 +37,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppRunnerJobExecution] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -48,26 +48,32 @@ def _parse_response( 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: @@ -75,8 +81,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppRunnerJobExecution]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,26 +95,26 @@ def sync_detailed( runner_job_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppRunnerJobExecution]]: """get runner job executions Return executions for a runner job. Args: runner_job_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppRunnerJobExecution']]] + Response[StderrErrResponse | list[AppRunnerJobExecution]] """ kwargs = _get_kwargs( @@ -129,26 +135,26 @@ def sync( runner_job_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppRunnerJobExecution] | None: """get runner job executions Return executions for a runner job. Args: runner_job_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppRunnerJobExecution']] + StderrErrResponse | list[AppRunnerJobExecution] """ return sync_detailed( @@ -164,26 +170,26 @@ async def asyncio_detailed( runner_job_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppRunnerJobExecution]]: """get runner job executions Return executions for a runner job. Args: runner_job_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppRunnerJobExecution']]] + Response[StderrErrResponse | list[AppRunnerJobExecution]] """ kwargs = _get_kwargs( @@ -202,26 +208,26 @@ async def asyncio( runner_job_id: str, *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppRunnerJobExecution"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppRunnerJobExecution] | None: """get runner job executions Return executions for a runner job. Args: runner_job_id (str): - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppRunnerJobExecution']] + StderrErrResponse | list[AppRunnerJobExecution] """ return ( diff --git a/nuon/api/vcs/create_vcs_connection.py b/nuon/api/vcs/create_vcs_connection.py index ff9e9513..8825e508 100644 --- a/nuon/api/vcs/create_vcs_connection.py +++ b/nuon/api/vcs/create_vcs_connection.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppVCSConnection | StderrErrResponse | None: if response.status_code == 201: response_201 = AppVCSConnection.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppVCSConnection | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,7 +84,7 @@ def sync_detailed( *, client: AuthenticatedClient, body: ServiceCreateConnectionRequest, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: +) -> Response[AppVCSConnection | StderrErrResponse]: """create a vcs connection for Github Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] + Response[AppVCSConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -107,7 +113,7 @@ def sync( *, client: AuthenticatedClient, body: ServiceCreateConnectionRequest, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: +) -> AppVCSConnection | StderrErrResponse | None: """create a vcs connection for Github Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppVCSConnection, StderrErrResponse] + AppVCSConnection | StderrErrResponse """ return sync_detailed( @@ -131,7 +137,7 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: ServiceCreateConnectionRequest, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: +) -> Response[AppVCSConnection | StderrErrResponse]: """create a vcs connection for Github Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] + Response[AppVCSConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -158,7 +164,7 @@ async def asyncio( *, client: AuthenticatedClient, body: ServiceCreateConnectionRequest, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: +) -> AppVCSConnection | StderrErrResponse | None: """create a vcs connection for Github Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppVCSConnection, StderrErrResponse] + AppVCSConnection | StderrErrResponse """ return ( diff --git a/nuon/api/vcs/create_vcs_connection_callback.py b/nuon/api/vcs/create_vcs_connection_callback.py index a894d2ba..f3fe1714 100644 --- a/nuon/api/vcs/create_vcs_connection_callback.py +++ b/nuon/api/vcs/create_vcs_connection_callback.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -31,32 +31,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppVCSConnection | StderrErrResponse | None: if response.status_code == 201: response_201 = AppVCSConnection.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: @@ -64,8 +70,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppVCSConnection | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +82,9 @@ def _build_response( def sync_detailed( *, - client: Union[AuthenticatedClient, Client], + client: AuthenticatedClient | Client, body: ServiceCreateConnectionCallbackRequest, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: +) -> Response[AppVCSConnection | StderrErrResponse]: """public connection to create a vcs connection via a callback Args: @@ -89,7 +95,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] + Response[AppVCSConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -105,9 +111,9 @@ def sync_detailed( def sync( *, - client: Union[AuthenticatedClient, Client], + client: AuthenticatedClient | Client, body: ServiceCreateConnectionCallbackRequest, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: +) -> AppVCSConnection | StderrErrResponse | None: """public connection to create a vcs connection via a callback Args: @@ -118,7 +124,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppVCSConnection, StderrErrResponse] + AppVCSConnection | StderrErrResponse """ return sync_detailed( @@ -129,9 +135,9 @@ def sync( async def asyncio_detailed( *, - client: Union[AuthenticatedClient, Client], + client: AuthenticatedClient | Client, body: ServiceCreateConnectionCallbackRequest, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: +) -> Response[AppVCSConnection | StderrErrResponse]: """public connection to create a vcs connection via a callback Args: @@ -142,7 +148,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] + Response[AppVCSConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -156,9 +162,9 @@ async def asyncio_detailed( async def asyncio( *, - client: Union[AuthenticatedClient, Client], + client: AuthenticatedClient | Client, body: ServiceCreateConnectionCallbackRequest, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: +) -> AppVCSConnection | StderrErrResponse | None: """public connection to create a vcs connection via a callback Args: @@ -169,7 +175,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppVCSConnection, StderrErrResponse] + AppVCSConnection | StderrErrResponse """ return ( diff --git a/nuon/api/vcs/delete_vcs_connection.py b/nuon/api/vcs/delete_vcs_connection.py index ba41ab77..dabfd592 100644 --- a/nuon/api/vcs/delete_vcs_connection.py +++ b/nuon/api/vcs/delete_vcs_connection.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union, cast +from typing import Any, cast import httpx @@ -21,31 +21,37 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[Any, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | StderrErrResponse | None: 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: @@ -53,8 +59,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[Any, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,7 +73,7 @@ def sync_detailed( connection_id: str, *, client: AuthenticatedClient, -) -> Response[Union[Any, StderrErrResponse]]: +) -> Response[Any | StderrErrResponse]: """Deletes a VCS connection Args: @@ -78,7 +84,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, StderrErrResponse]] + Response[Any | StderrErrResponse] """ kwargs = _get_kwargs( @@ -96,7 +102,7 @@ def sync( connection_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[Any, StderrErrResponse]]: +) -> Any | StderrErrResponse | None: """Deletes a VCS connection Args: @@ -107,7 +113,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, StderrErrResponse] + Any | StderrErrResponse """ return sync_detailed( @@ -120,7 +126,7 @@ async def asyncio_detailed( connection_id: str, *, client: AuthenticatedClient, -) -> Response[Union[Any, StderrErrResponse]]: +) -> Response[Any | StderrErrResponse]: """Deletes a VCS connection Args: @@ -131,7 +137,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[Any, StderrErrResponse]] + Response[Any | StderrErrResponse] """ kwargs = _get_kwargs( @@ -147,7 +153,7 @@ async def asyncio( connection_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[Any, StderrErrResponse]]: +) -> Any | StderrErrResponse | None: """Deletes a VCS connection Args: @@ -158,7 +164,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[Any, StderrErrResponse] + Any | StderrErrResponse """ return ( diff --git a/nuon/api/vcs/get_org_vcs_connections.py b/nuon/api/vcs/get_org_vcs_connections.py index 7c2ab538..bcce403d 100644 --- a/nuon/api/vcs/get_org_vcs_connections.py +++ b/nuon/api/vcs/get_org_vcs_connections.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -12,9 +12,9 @@ def _get_kwargs( *, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, ) -> dict[str, Any]: params: dict[str, Any] = {} @@ -36,8 +36,8 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> StderrErrResponse | list[AppVCSConnection] | None: if response.status_code == 200: response_200 = [] _response_200 = response.json() @@ -47,26 +47,32 @@ def _parse_response( 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: @@ -74,8 +80,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StderrErrResponse | list[AppVCSConnection]]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -87,23 +93,23 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppVCSConnection]]: """get vcs connection for an org Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppVCSConnection']]] + Response[StderrErrResponse | list[AppVCSConnection]] """ kwargs = _get_kwargs( @@ -122,23 +128,23 @@ def sync_detailed( def sync( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppVCSConnection] | None: """get vcs connection for an org Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppVCSConnection']] + StderrErrResponse | list[AppVCSConnection] """ return sync_detailed( @@ -152,23 +158,23 @@ def sync( async def asyncio_detailed( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Response[Union[StderrErrResponse, list["AppVCSConnection"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> Response[StderrErrResponse | list[AppVCSConnection]]: """get vcs connection for an org Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppVCSConnection']]] + Response[StderrErrResponse | list[AppVCSConnection]] """ kwargs = _get_kwargs( @@ -185,23 +191,23 @@ async def asyncio_detailed( async def asyncio( *, client: AuthenticatedClient, - offset: Union[Unset, int] = 0, - limit: Union[Unset, int] = 10, - page: Union[Unset, int] = 0, -) -> Optional[Union[StderrErrResponse, list["AppVCSConnection"]]]: + offset: int | Unset = 0, + limit: int | Unset = 10, + page: int | Unset = 0, +) -> StderrErrResponse | list[AppVCSConnection] | None: """get vcs connection for an org Args: - offset (Union[Unset, int]): Default: 0. - limit (Union[Unset, int]): Default: 10. - page (Union[Unset, int]): Default: 0. + offset (int | Unset): Default: 0. + limit (int | Unset): Default: 10. + page (int | Unset): 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['AppVCSConnection']] + StderrErrResponse | list[AppVCSConnection] """ return ( diff --git a/nuon/api/vcs/get_vcs_connection.py b/nuon/api/vcs/get_vcs_connection.py index 6d162eaa..5cfcfa65 100644 --- a/nuon/api/vcs/get_vcs_connection.py +++ b/nuon/api/vcs/get_vcs_connection.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Optional, Union +from typing import Any import httpx @@ -22,32 +22,38 @@ def _get_kwargs( def _parse_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AppVCSConnection | StderrErrResponse | None: if response.status_code == 200: response_200 = AppVCSConnection.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: @@ -55,8 +61,8 @@ def _parse_response( def _build_response( - *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AppVCSConnection | StderrErrResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,7 +75,7 @@ def sync_detailed( connection_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: +) -> Response[AppVCSConnection | StderrErrResponse]: """returns a vcs connection for an org Args: @@ -80,7 +86,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] + Response[AppVCSConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -98,7 +104,7 @@ def sync( connection_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: +) -> AppVCSConnection | StderrErrResponse | None: """returns a vcs connection for an org Args: @@ -109,7 +115,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppVCSConnection, StderrErrResponse] + AppVCSConnection | StderrErrResponse """ return sync_detailed( @@ -122,7 +128,7 @@ async def asyncio_detailed( connection_id: str, *, client: AuthenticatedClient, -) -> Response[Union[AppVCSConnection, StderrErrResponse]]: +) -> Response[AppVCSConnection | StderrErrResponse]: """returns a vcs connection for an org Args: @@ -133,7 +139,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Union[AppVCSConnection, StderrErrResponse]] + Response[AppVCSConnection | StderrErrResponse] """ kwargs = _get_kwargs( @@ -149,7 +155,7 @@ async def asyncio( connection_id: str, *, client: AuthenticatedClient, -) -> Optional[Union[AppVCSConnection, StderrErrResponse]]: +) -> AppVCSConnection | StderrErrResponse | None: """returns a vcs connection for an org Args: @@ -160,7 +166,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Union[AppVCSConnection, StderrErrResponse] + AppVCSConnection | StderrErrResponse """ return ( diff --git a/nuon/client.py b/nuon/client.py index e80446f1..3f312fb1 100644 --- a/nuon/client.py +++ b/nuon/client.py @@ -1,5 +1,5 @@ import ssl -from typing import Any, Optional, Union +from typing import Any import httpx from attrs import define, evolve, field @@ -38,12 +38,12 @@ class Client: _base_url: str = field(alias="base_url") _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") + _timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + _client: httpx.Client | None = field(default=None, init=False) + _async_client: httpx.AsyncClient | None = field(default=None, init=False) def with_headers(self, headers: dict[str, str]) -> "Client": """Get a new client matching this one with additional headers""" @@ -168,12 +168,12 @@ class AuthenticatedClient: _base_url: str = field(alias="base_url") _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") _headers: dict[str, str] = field(factory=dict, kw_only=True, alias="headers") - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") + _timeout: httpx.Timeout | None = field(default=None, kw_only=True, alias="timeout") + _verify_ssl: str | bool | ssl.SSLContext = field(default=True, kw_only=True, alias="verify_ssl") _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") _httpx_args: dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") - _client: Optional[httpx.Client] = field(default=None, init=False) - _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) + _client: httpx.Client | None = field(default=None, init=False) + _async_client: httpx.AsyncClient | None = field(default=None, init=False) token: str prefix: str = "Bearer" diff --git a/nuon/models/__init__.py b/nuon/models/__init__.py index 8caa8bc0..d9c002f4 100644 --- a/nuon/models/__init__.py +++ b/nuon/models/__init__.py @@ -19,6 +19,7 @@ from .app_app_input import AppAppInput from .app_app_input_config import AppAppInputConfig from .app_app_input_group import AppAppInputGroup +from .app_app_input_source import AppAppInputSource from .app_app_links import AppAppLinks from .app_app_permissions_config import AppAppPermissionsConfig from .app_app_policies_config import AppAppPoliciesConfig @@ -36,6 +37,7 @@ 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_aws_stack_outputs_install_inputs import AppAWSStackOutputsInstallInputs from .app_awsecr_image_config import AppAWSECRImageConfig from .app_awsiam_role_type import AppAWSIAMRoleType from .app_azure_account import AppAzureAccount @@ -342,6 +344,10 @@ from .service_create_install_request_aws_account import ServiceCreateInstallRequestAwsAccount from .service_create_install_request_azure_account import ServiceCreateInstallRequestAzureAccount from .service_create_install_request_inputs import ServiceCreateInstallRequestInputs +from .service_create_install_v2_request import ServiceCreateInstallV2Request +from .service_create_install_v2_request_aws_account import ServiceCreateInstallV2RequestAwsAccount +from .service_create_install_v2_request_azure_account import ServiceCreateInstallV2RequestAzureAccount +from .service_create_install_v2_request_inputs import ServiceCreateInstallV2RequestInputs from .service_create_installer_request import ServiceCreateInstallerRequest from .service_create_installer_request_metadata import ServiceCreateInstallerRequestMetadata from .service_create_job_component_config_request import ServiceCreateJobComponentConfigRequest @@ -388,7 +394,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_retry_workflow_step_request import ServiceRetryWorkflowStepRequest from .service_runner_connection_status import ServiceRunnerConnectionStatus from .service_sync_secrets_request import ServiceSyncSecretsRequest from .service_teardown_install_component_request import ServiceTeardownInstallComponentRequest @@ -455,6 +461,7 @@ "AppAppInput", "AppAppInputConfig", "AppAppInputGroup", + "AppAppInputSource", "AppAppLinks", "AppAppPermissionsConfig", "AppAppPoliciesConfig", @@ -474,6 +481,7 @@ "AppAWSIAMRoleType", "AppAWSStackOutputs", "AppAWSStackOutputsBreakGlassRoleArns", + "AppAWSStackOutputsInstallInputs", "AppAzureAccount", "AppAzureStackOutputs", "AppCloudPlatform", @@ -760,6 +768,10 @@ "ServiceCreateInstallRequestAwsAccount", "ServiceCreateInstallRequestAzureAccount", "ServiceCreateInstallRequestInputs", + "ServiceCreateInstallV2Request", + "ServiceCreateInstallV2RequestAwsAccount", + "ServiceCreateInstallV2RequestAzureAccount", + "ServiceCreateInstallV2RequestInputs", "ServiceCreateJobComponentConfigRequest", "ServiceCreateJobComponentConfigRequestEnvVars", "ServiceCreateKubernetesManifestComponentConfigRequest", @@ -798,7 +810,7 @@ "ServiceRetryWorkflowByIDResponse", "ServiceRetryWorkflowRequest", "ServiceRetryWorkflowResponse", - "ServiceRetryWorkflowStepResponse", + "ServiceRetryWorkflowStepRequest", "ServiceRunnerConnectionStatus", "ServiceSyncSecretsRequest", "ServiceTeardownInstallComponentRequest", diff --git a/nuon/models/app_account.py b/nuon/models/app_account.py index 1ed0c67e..d2c0a920 100644 --- a/nuon/models/app_account.py +++ b/nuon/models/app_account.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,32 +22,32 @@ class AppAccount: """ Attributes: - account_type (Union[Unset, AppAccountType]): - created_at (Union[Unset, str]): - email (Union[Unset, str]): - id (Union[Unset, str]): - org_ids (Union[Unset, list[str]]): ReadOnly Fields - permissions (Union[Unset, PermissionsSet]): - roles (Union[Unset, list['AppRole']]): - subject (Union[Unset, str]): - updated_at (Union[Unset, str]): - user_journeys (Union[Unset, list['AppUserJourney']]): + account_type (AppAccountType | Unset): + created_at (str | Unset): + email (str | Unset): + id (str | Unset): + org_ids (list[str] | Unset): ReadOnly Fields + permissions (PermissionsSet | Unset): + roles (list[AppRole] | Unset): + subject (str | Unset): + updated_at (str | Unset): + user_journeys (list[AppUserJourney] | Unset): """ - account_type: Union[Unset, AppAccountType] = UNSET - created_at: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_ids: Union[Unset, list[str]] = UNSET - permissions: Union[Unset, "PermissionsSet"] = UNSET - roles: Union[Unset, list["AppRole"]] = UNSET - subject: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - user_journeys: Union[Unset, list["AppUserJourney"]] = UNSET + account_type: AppAccountType | Unset = UNSET + created_at: str | Unset = UNSET + email: str | Unset = UNSET + id: str | Unset = UNSET + org_ids: list[str] | Unset = UNSET + permissions: PermissionsSet | Unset = UNSET + roles: list[AppRole] | Unset = UNSET + subject: str | Unset = UNSET + updated_at: str | Unset = UNSET + user_journeys: list[AppUserJourney] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - account_type: Union[Unset, str] = UNSET + account_type: str | Unset = UNSET if not isinstance(self.account_type, Unset): account_type = self.account_type.value @@ -55,15 +57,15 @@ def to_dict(self) -> dict[str, Any]: id = self.id - org_ids: Union[Unset, list[str]] = UNSET + org_ids: list[str] | Unset = UNSET if not isinstance(self.org_ids, Unset): org_ids = self.org_ids - permissions: Union[Unset, dict[str, Any]] = UNSET + permissions: dict[str, Any] | Unset = UNSET if not isinstance(self.permissions, Unset): permissions = self.permissions.to_dict() - roles: Union[Unset, list[dict[str, Any]]] = UNSET + roles: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.roles, Unset): roles = [] for roles_item_data in self.roles: @@ -74,7 +76,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - user_journeys: Union[Unset, list[dict[str, Any]]] = UNSET + user_journeys: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.user_journeys, Unset): user_journeys = [] for user_journeys_item_data in self.user_journeys: @@ -115,7 +117,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _account_type = d.pop("account_type", UNSET) - account_type: Union[Unset, AppAccountType] + account_type: AppAccountType | Unset if isinstance(_account_type, Unset): account_type = UNSET else: @@ -130,7 +132,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_ids = cast(list[str], d.pop("org_ids", UNSET)) _permissions = d.pop("permissions", UNSET) - permissions: Union[Unset, PermissionsSet] + permissions: PermissionsSet | Unset if isinstance(_permissions, Unset): permissions = UNSET else: diff --git a/nuon/models/app_action_workflow.py b/nuon/models/app_action_workflow.py index bd2dc6b8..5328b482 100644 --- a/nuon/models/app_action_workflow.py +++ b/nuon/models/app_action_workflow.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,28 +19,28 @@ class AppActionWorkflow: """ Attributes: - app_id (Union[Unset, str]): - config_count (Union[Unset, int]): - configs (Union[Unset, list['AppActionWorkflowConfig']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, str]): metadata - status (Union[Unset, str]): TODO: change to default null after migration & after initial pr - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_id (str | Unset): + config_count (int | Unset): + configs (list[AppActionWorkflowConfig] | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + name (str | Unset): metadata + status (str | Unset): TODO: change to default null after migration & after initial pr + status_description (str | Unset): + updated_at (str | Unset): """ - app_id: Union[Unset, str] = UNSET - config_count: Union[Unset, int] = UNSET - configs: Union[Unset, list["AppActionWorkflowConfig"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_id: str | Unset = UNSET + config_count: int | Unset = UNSET + configs: list[AppActionWorkflowConfig] | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: config_count = self.config_count - configs: Union[Unset, list[dict[str, Any]]] = UNSET + configs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.configs, Unset): configs = [] for configs_item_data in self.configs: diff --git a/nuon/models/app_action_workflow_config.py b/nuon/models/app_action_workflow_config.py index 7a3bf90e..fa9b2571 100644 --- a/nuon/models/app_action_workflow_config.py +++ b/nuon/models/app_action_workflow_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,37 +21,37 @@ class AppActionWorkflowConfig: """ Attributes: - 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]): - id (Union[Unset, str]): - references (Union[Unset, list[str]]): - refs (Union[Unset, list['RefsRef']]): - steps (Union[Unset, list['AppActionWorkflowStepConfig']]): - timeout (Union[Unset, int]): - triggers (Union[Unset, list['AppActionWorkflowTriggerConfig']]): INFO: if adding new associations here, ensure - they are added to the batch delete activity - updated_at (Union[Unset, str]): + action_workflow_id (str | Unset): + app_config_id (str | Unset): + app_id (str | Unset): + break_glass_role_arn (str | Unset): + component_dependency_ids (list[str] | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + references (list[str] | Unset): + refs (list[RefsRef] | Unset): + steps (list[AppActionWorkflowStepConfig] | Unset): + timeout (int | Unset): + triggers (list[AppActionWorkflowTriggerConfig] | Unset): INFO: if adding new associations here, ensure they are + added to the batch delete activity + updated_at (str | Unset): """ - 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 - id: Union[Unset, str] = UNSET - references: Union[Unset, list[str]] = UNSET - refs: Union[Unset, list["RefsRef"]] = UNSET - steps: Union[Unset, list["AppActionWorkflowStepConfig"]] = UNSET - timeout: Union[Unset, int] = UNSET - triggers: Union[Unset, list["AppActionWorkflowTriggerConfig"]] = UNSET - updated_at: Union[Unset, str] = UNSET + action_workflow_id: str | Unset = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + break_glass_role_arn: str | Unset = UNSET + component_dependency_ids: list[str] | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + references: list[str] | Unset = UNSET + refs: list[RefsRef] | Unset = UNSET + steps: list[AppActionWorkflowStepConfig] | Unset = UNSET + timeout: int | Unset = UNSET + triggers: list[AppActionWorkflowTriggerConfig] | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -61,7 +63,7 @@ def to_dict(self) -> dict[str, Any]: break_glass_role_arn = self.break_glass_role_arn - component_dependency_ids: Union[Unset, list[str]] = UNSET + component_dependency_ids: list[str] | Unset = UNSET if not isinstance(self.component_dependency_ids, Unset): component_dependency_ids = self.component_dependency_ids @@ -71,18 +73,18 @@ def to_dict(self) -> dict[str, Any]: id = self.id - references: Union[Unset, list[str]] = UNSET + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references - refs: Union[Unset, list[dict[str, Any]]] = UNSET + refs: list[dict[str, Any]] | Unset = 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) - steps: Union[Unset, list[dict[str, Any]]] = UNSET + steps: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.steps, Unset): steps = [] for steps_item_data in self.steps: @@ -91,7 +93,7 @@ def to_dict(self) -> dict[str, Any]: timeout = self.timeout - triggers: Union[Unset, list[dict[str, Any]]] = UNSET + triggers: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.triggers, Unset): triggers = [] for triggers_item_data in self.triggers: diff --git a/nuon/models/app_action_workflow_step_config.py b/nuon/models/app_action_workflow_step_config.py index 1fc2ec3e..5b03d8db 100644 --- a/nuon/models/app_action_workflow_step_config.py +++ b/nuon/models/app_action_workflow_step_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,40 +21,40 @@ class AppActionWorkflowStepConfig: """ Attributes: - action_workflow_config_id (Union[Unset, str]): - app_config_id (Union[Unset, str]): this belongs to an app config id - app_id (Union[Unset, str]): - command (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppActionWorkflowStepConfigEnvVars]): - id (Union[Unset, str]): - idx (Union[Unset, int]): - inline_contents (Union[Unset, str]): - name (Union[Unset, str]): metadata - previous_step_id (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - references (Union[Unset, list[str]]): - updated_at (Union[Unset, str]): + action_workflow_config_id (str | Unset): + app_config_id (str | Unset): this belongs to an app config id + app_id (str | Unset): + command (str | Unset): + connected_github_vcs_config (AppConnectedGithubVCSConfig | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + env_vars (AppActionWorkflowStepConfigEnvVars | Unset): + id (str | Unset): + idx (int | Unset): + inline_contents (str | Unset): + name (str | Unset): metadata + previous_step_id (str | Unset): + public_git_vcs_config (AppPublicGitVCSConfig | Unset): + references (list[str] | Unset): + updated_at (str | Unset): """ - action_workflow_config_id: Union[Unset, str] = UNSET - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - command: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppActionWorkflowStepConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - idx: Union[Unset, int] = UNSET - inline_contents: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - previous_step_id: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - references: Union[Unset, list[str]] = UNSET - updated_at: Union[Unset, str] = UNSET + action_workflow_config_id: str | Unset = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + command: str | Unset = UNSET + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + env_vars: AppActionWorkflowStepConfigEnvVars | Unset = UNSET + id: str | Unset = UNSET + idx: int | Unset = UNSET + inline_contents: str | Unset = UNSET + name: str | Unset = UNSET + previous_step_id: str | Unset = UNSET + public_git_vcs_config: AppPublicGitVCSConfig | Unset = UNSET + references: list[str] | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -64,7 +66,7 @@ def to_dict(self) -> dict[str, Any]: command = self.command - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() @@ -72,7 +74,7 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() @@ -86,11 +88,11 @@ def to_dict(self) -> dict[str, Any]: previous_step_id = self.previous_step_id - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = 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 + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references @@ -150,7 +152,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: command = d.pop("command", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -161,7 +163,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppActionWorkflowStepConfigEnvVars] + env_vars: AppActionWorkflowStepConfigEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: @@ -178,7 +180,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: previous_step_id = d.pop("previous_step_id", UNSET) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + public_git_vcs_config: AppPublicGitVCSConfig | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: diff --git a/nuon/models/app_action_workflow_step_config_env_vars.py b/nuon/models/app_action_workflow_step_config_env_vars.py index c11fba66..07f1acfd 100644 --- a/nuon/models/app_action_workflow_step_config_env_vars.py +++ b/nuon/models/app_action_workflow_step_config_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_action_workflow_trigger_config.py b/nuon/models/app_action_workflow_trigger_config.py index 12faeda8..5193e90a 100644 --- a/nuon/models/app_action_workflow_trigger_config.py +++ b/nuon/models/app_action_workflow_trigger_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,32 +19,32 @@ class AppActionWorkflowTriggerConfig: """ Attributes: - action_workflow_config_id (Union[Unset, str]): - app_config_id (Union[Unset, str]): this belongs to an app config id - app_id (Union[Unset, str]): - component (Union[Unset, AppComponent]): - component_id (Union[Unset, str]): - created_at (Union[Unset, str]): - 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]): + action_workflow_config_id (str | Unset): + app_config_id (str | Unset): this belongs to an app config id + app_id (str | Unset): + component (AppComponent | Unset): + component_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + cron_schedule (str | Unset): + id (str | Unset): + index (int | Unset): + type_ (str | Unset): + updated_at (str | Unset): """ - action_workflow_config_id: Union[Unset, str] = UNSET - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - component: Union[Unset, "AppComponent"] = UNSET - component_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - 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 + action_workflow_config_id: str | Unset = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + component: AppComponent | Unset = UNSET + component_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + cron_schedule: str | Unset = UNSET + id: str | Unset = UNSET + index: int | Unset = UNSET + type_: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,7 +54,7 @@ def to_dict(self) -> dict[str, Any]: app_id = self.app_id - component: Union[Unset, dict[str, Any]] = UNSET + component: dict[str, Any] | Unset = UNSET if not isinstance(self.component, Unset): component = self.component.to_dict() @@ -114,7 +116,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_id = d.pop("app_id", UNSET) _component = d.pop("component", UNSET) - component: Union[Unset, AppComponent] + component: AppComponent | Unset if isinstance(_component, Unset): component = UNSET else: diff --git a/nuon/models/app_app.py b/nuon/models/app_app.py index 4da12f71..7093495e 100644 --- a/nuon/models/app_app.py +++ b/nuon/models/app_app.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,52 +24,52 @@ class AppApp: """ Attributes: - app_configs (Union[Unset, list['AppAppConfig']]): - cloud_platform (Union[Unset, str]): - config_directory (Union[Unset, str]): - config_repo (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - id (Union[Unset, str]): - input_config (Union[Unset, AppAppInputConfig]): - links (Union[Unset, AppAppLinks]): - name (Union[Unset, str]): - notifications_config (Union[Unset, AppNotificationsConfig]): - org_id (Union[Unset, str]): - runner_config (Union[Unset, AppAppRunnerConfig]): - runner_type (Union[Unset, str]): - sandbox_config (Union[Unset, AppAppSandboxConfig]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_configs (list[AppAppConfig] | Unset): + cloud_platform (str | Unset): + config_directory (str | Unset): + config_repo (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + description (str | Unset): + display_name (str | Unset): + id (str | Unset): + input_config (AppAppInputConfig | Unset): + links (AppAppLinks | Unset): + name (str | Unset): + notifications_config (AppNotificationsConfig | Unset): + org_id (str | Unset): + runner_config (AppAppRunnerConfig | Unset): + runner_type (str | Unset): + sandbox_config (AppAppSandboxConfig | Unset): + status (str | Unset): + status_description (str | Unset): + updated_at (str | Unset): """ - 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 - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input_config: Union[Unset, "AppAppInputConfig"] = UNSET - links: Union[Unset, "AppAppLinks"] = UNSET - name: Union[Unset, str] = UNSET - notifications_config: Union[Unset, "AppNotificationsConfig"] = UNSET - org_id: Union[Unset, str] = UNSET - runner_config: Union[Unset, "AppAppRunnerConfig"] = UNSET - runner_type: Union[Unset, str] = UNSET - sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_configs: list[AppAppConfig] | Unset = UNSET + cloud_platform: str | Unset = UNSET + config_directory: str | Unset = UNSET + config_repo: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + description: str | Unset = UNSET + display_name: str | Unset = UNSET + id: str | Unset = UNSET + input_config: AppAppInputConfig | Unset = UNSET + links: AppAppLinks | Unset = UNSET + name: str | Unset = UNSET + notifications_config: AppNotificationsConfig | Unset = UNSET + org_id: str | Unset = UNSET + runner_config: AppAppRunnerConfig | Unset = UNSET + runner_type: str | Unset = UNSET + sandbox_config: AppAppSandboxConfig | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + updated_at: str | Unset = UNSET 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 + app_configs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.app_configs, Unset): app_configs = [] for app_configs_item_data in self.app_configs: @@ -90,29 +92,29 @@ def to_dict(self) -> dict[str, Any]: id = self.id - input_config: Union[Unset, dict[str, Any]] = UNSET + input_config: dict[str, Any] | Unset = UNSET if not isinstance(self.input_config, Unset): input_config = self.input_config.to_dict() - links: Union[Unset, dict[str, Any]] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() name = self.name - notifications_config: Union[Unset, dict[str, Any]] = UNSET + notifications_config: dict[str, Any] | Unset = UNSET if not isinstance(self.notifications_config, Unset): notifications_config = self.notifications_config.to_dict() org_id = self.org_id - runner_config: Union[Unset, dict[str, Any]] = UNSET + runner_config: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_config, Unset): runner_config = self.runner_config.to_dict() runner_type = self.runner_type - sandbox_config: Union[Unset, dict[str, Any]] = UNSET + sandbox_config: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox_config, Unset): sandbox_config = self.sandbox_config.to_dict() @@ -202,14 +204,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _input_config = d.pop("input_config", UNSET) - input_config: Union[Unset, AppAppInputConfig] + input_config: AppAppInputConfig | Unset if isinstance(_input_config, Unset): input_config = UNSET else: input_config = AppAppInputConfig.from_dict(_input_config) _links = d.pop("links", UNSET) - links: Union[Unset, AppAppLinks] + links: AppAppLinks | Unset if isinstance(_links, Unset): links = UNSET else: @@ -218,7 +220,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _notifications_config = d.pop("notifications_config", UNSET) - notifications_config: Union[Unset, AppNotificationsConfig] + notifications_config: AppNotificationsConfig | Unset if isinstance(_notifications_config, Unset): notifications_config = UNSET else: @@ -227,7 +229,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _runner_config = d.pop("runner_config", UNSET) - runner_config: Union[Unset, AppAppRunnerConfig] + runner_config: AppAppRunnerConfig | Unset if isinstance(_runner_config, Unset): runner_config = UNSET else: @@ -236,7 +238,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_type = d.pop("runner_type", UNSET) _sandbox_config = d.pop("sandbox_config", UNSET) - sandbox_config: Union[Unset, AppAppSandboxConfig] + sandbox_config: AppAppSandboxConfig | Unset if isinstance(_sandbox_config, Unset): sandbox_config = UNSET else: diff --git a/nuon/models/app_app_awsiam_policy_config.py b/nuon/models/app_app_awsiam_policy_config.py index 53ac6bea..c5730b6d 100644 --- a/nuon/models/app_app_awsiam_policy_config.py +++ b/nuon/models/app_app_awsiam_policy_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,30 +15,30 @@ class AppAppAWSIAMPolicyConfig: """ Attributes: - app_aws_iam_role_config_id (Union[Unset, str]): - app_config_id (Union[Unset, str]): - cloudformation_stack_name (Union[Unset, str]): - contents (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - managed_policy_name (Union[Unset, str]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_aws_iam_role_config_id (str | Unset): + app_config_id (str | Unset): + cloudformation_stack_name (str | Unset): + contents (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + managed_policy_name (str | Unset): + name (str | Unset): + org_id (str | Unset): + updated_at (str | Unset): """ - app_aws_iam_role_config_id: Union[Unset, str] = UNSET - app_config_id: Union[Unset, str] = UNSET - cloudformation_stack_name: Union[Unset, str] = UNSET - contents: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - managed_policy_name: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_aws_iam_role_config_id: str | Unset = UNSET + app_config_id: str | Unset = UNSET + cloudformation_stack_name: str | Unset = UNSET + contents: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + managed_policy_name: str | Unset = UNSET + name: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_app_awsiam_role_config.py b/nuon/models/app_app_awsiam_role_config.py index f9d84b72..9fea3d66 100644 --- a/nuon/models/app_app_awsiam_role_config.py +++ b/nuon/models/app_app_awsiam_role_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,40 +20,40 @@ class AppAppAWSIAMRoleConfig: """ Attributes: - app_config_id (Union[Unset, str]): - cloudformation_param_name (Union[Unset, str]): - cloudformation_stack_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - permissions_boundary (Union[Unset, str]): - policies (Union[Unset, list['AppAppAWSIAMPolicyConfig']]): - type_ (Union[Unset, AppAWSIAMRoleType]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + cloudformation_param_name (str | Unset): + cloudformation_stack_name (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + description (str | Unset): + display_name (str | Unset): + id (str | Unset): + name (str | Unset): + org_id (str | Unset): + owner_id (str | Unset): + owner_type (str | Unset): + permissions_boundary (str | Unset): + policies (list[AppAppAWSIAMPolicyConfig] | Unset): + type_ (AppAWSIAMRoleType | Unset): + updated_at (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - cloudformation_param_name: Union[Unset, str] = UNSET - cloudformation_stack_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - permissions_boundary: Union[Unset, str] = UNSET - policies: Union[Unset, list["AppAppAWSIAMPolicyConfig"]] = UNSET - type_: Union[Unset, AppAWSIAMRoleType] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + cloudformation_param_name: str | Unset = UNSET + cloudformation_stack_name: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + description: str | Unset = UNSET + display_name: str | Unset = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET + org_id: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + permissions_boundary: str | Unset = UNSET + policies: list[AppAppAWSIAMPolicyConfig] | Unset = UNSET + type_: AppAWSIAMRoleType | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -81,14 +83,14 @@ def to_dict(self) -> dict[str, Any]: permissions_boundary = self.permissions_boundary - policies: Union[Unset, list[dict[str, Any]]] = UNSET + policies: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.policies, Unset): policies = [] for policies_item_data in self.policies: policies_item = policies_item_data.to_dict() policies.append(policies_item) - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -171,7 +173,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: policies.append(policies_item) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppAWSIAMRoleType] + type_: AppAWSIAMRoleType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/app_app_branch.py b/nuon/models/app_app_branch.py index 13815906..ee14de50 100644 --- a/nuon/models/app_app_branch.py +++ b/nuon/models/app_app_branch.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,26 +19,26 @@ class AppAppBranch: """ Attributes: - app_id (Union[Unset, str]): - connected_github_vcs_config_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - workflows (Union[Unset, list['AppWorkflow']]): + app_id (str | Unset): + connected_github_vcs_config_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + name (str | Unset): + org_id (str | Unset): + updated_at (str | Unset): + workflows (list[AppWorkflow] | Unset): """ - app_id: Union[Unset, str] = UNSET - connected_github_vcs_config_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workflows: Union[Unset, list["AppWorkflow"]] = UNSET + app_id: str | Unset = UNSET + connected_github_vcs_config_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET + workflows: list[AppWorkflow] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -56,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - workflows: Union[Unset, list[dict[str, Any]]] = UNSET + workflows: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.workflows, Unset): workflows = [] for workflows_item_data in self.workflows: diff --git a/nuon/models/app_app_break_glass_config.py b/nuon/models/app_app_break_glass_config.py index b632a801..7aa66224 100644 --- a/nuon/models/app_app_break_glass_config.py +++ b/nuon/models/app_app_break_glass_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,24 +19,24 @@ class AppAppBreakGlassConfig: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - aws_iam_roles (Union[Unset, list['AppAppAWSIAMRoleConfig']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + app_id (str | Unset): + aws_iam_roles (list[AppAppAWSIAMRoleConfig] | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + updated_at (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - aws_iam_roles: Union[Unset, list["AppAppAWSIAMRoleConfig"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + aws_iam_roles: list[AppAppAWSIAMRoleConfig] | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: app_id = self.app_id - aws_iam_roles: Union[Unset, list[dict[str, Any]]] = UNSET + aws_iam_roles: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.aws_iam_roles, Unset): aws_iam_roles = [] for aws_iam_roles_item_data in self.aws_iam_roles: diff --git a/nuon/models/app_app_config.py b/nuon/models/app_app_config.py index 7a4f328a..4a458938 100644 --- a/nuon/models/app_app_config.py +++ b/nuon/models/app_app_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,73 +31,73 @@ class AppAppConfig: """ Attributes: - action_workflow_configs (Union[Unset, list['AppActionWorkflowConfig']]): - app_branch (Union[Unset, AppAppBranch]): - app_branch_id (Union[Unset, str]): - app_id (Union[Unset, str]): - break_glass (Union[Unset, AppAppBreakGlassConfig]): - checksum (Union[Unset, str]): - cli_version (Union[Unset, str]): - component_config_connections (Union[Unset, list['AppComponentConfigConnection']]): - component_ids (Union[Unset, list[str]]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - input_ (Union[Unset, AppAppInputConfig]): - org_id (Union[Unset, str]): - permissions (Union[Unset, AppAppPermissionsConfig]): - policies (Union[Unset, AppAppPoliciesConfig]): - readme (Union[Unset, str]): - runner (Union[Unset, AppAppRunnerConfig]): - sandbox (Union[Unset, AppAppSandboxConfig]): - secrets (Union[Unset, AppAppSecretsConfig]): - stack (Union[Unset, AppAppStackConfig]): - state (Union[Unset, str]): - status (Union[Unset, AppAppConfigStatus]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connection_commit (Union[Unset, AppVCSConnectionCommit]): - version (Union[Unset, int]): fields that are filled in via after query or views + action_workflow_configs (list[AppActionWorkflowConfig] | Unset): + app_branch (AppAppBranch | Unset): + app_branch_id (str | Unset): + app_id (str | Unset): + break_glass (AppAppBreakGlassConfig | Unset): + checksum (str | Unset): + cli_version (str | Unset): + component_config_connections (list[AppComponentConfigConnection] | Unset): + component_ids (list[str] | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + input_ (AppAppInputConfig | Unset): + org_id (str | Unset): + permissions (AppAppPermissionsConfig | Unset): + policies (AppAppPoliciesConfig | Unset): + readme (str | Unset): + runner (AppAppRunnerConfig | Unset): + sandbox (AppAppSandboxConfig | Unset): + secrets (AppAppSecretsConfig | Unset): + stack (AppAppStackConfig | Unset): + state (str | Unset): + status (AppAppConfigStatus | Unset): + status_description (str | Unset): + updated_at (str | Unset): + vcs_connection_commit (AppVCSConnectionCommit | Unset): + version (int | Unset): fields that are filled in via after query or views """ - action_workflow_configs: Union[Unset, list["AppActionWorkflowConfig"]] = UNSET - app_branch: Union[Unset, "AppAppBranch"] = UNSET - app_branch_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - break_glass: Union[Unset, "AppAppBreakGlassConfig"] = UNSET - checksum: Union[Unset, str] = UNSET - cli_version: Union[Unset, str] = UNSET - component_config_connections: Union[Unset, list["AppComponentConfigConnection"]] = UNSET - component_ids: Union[Unset, list[str]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input_: Union[Unset, "AppAppInputConfig"] = UNSET - org_id: Union[Unset, str] = UNSET - permissions: Union[Unset, "AppAppPermissionsConfig"] = UNSET - policies: Union[Unset, "AppAppPoliciesConfig"] = UNSET - readme: Union[Unset, str] = UNSET - runner: Union[Unset, "AppAppRunnerConfig"] = UNSET - sandbox: Union[Unset, "AppAppSandboxConfig"] = UNSET - secrets: Union[Unset, "AppAppSecretsConfig"] = UNSET - stack: Union[Unset, "AppAppStackConfig"] = UNSET - state: Union[Unset, str] = UNSET - status: Union[Unset, AppAppConfigStatus] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection_commit: Union[Unset, "AppVCSConnectionCommit"] = UNSET - version: Union[Unset, int] = UNSET + action_workflow_configs: list[AppActionWorkflowConfig] | Unset = UNSET + app_branch: AppAppBranch | Unset = UNSET + app_branch_id: str | Unset = UNSET + app_id: str | Unset = UNSET + break_glass: AppAppBreakGlassConfig | Unset = UNSET + checksum: str | Unset = UNSET + cli_version: str | Unset = UNSET + component_config_connections: list[AppComponentConfigConnection] | Unset = UNSET + component_ids: list[str] | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + input_: AppAppInputConfig | Unset = UNSET + org_id: str | Unset = UNSET + permissions: AppAppPermissionsConfig | Unset = UNSET + policies: AppAppPoliciesConfig | Unset = UNSET + readme: str | Unset = UNSET + runner: AppAppRunnerConfig | Unset = UNSET + sandbox: AppAppSandboxConfig | Unset = UNSET + secrets: AppAppSecretsConfig | Unset = UNSET + stack: AppAppStackConfig | Unset = UNSET + state: str | Unset = UNSET + status: AppAppConfigStatus | Unset = UNSET + status_description: str | Unset = UNSET + updated_at: str | Unset = UNSET + vcs_connection_commit: AppVCSConnectionCommit | Unset = UNSET + version: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - action_workflow_configs: Union[Unset, list[dict[str, Any]]] = UNSET + action_workflow_configs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.action_workflow_configs, Unset): action_workflow_configs = [] for action_workflow_configs_item_data in self.action_workflow_configs: action_workflow_configs_item = action_workflow_configs_item_data.to_dict() action_workflow_configs.append(action_workflow_configs_item) - app_branch: Union[Unset, dict[str, Any]] = UNSET + app_branch: dict[str, Any] | Unset = UNSET if not isinstance(self.app_branch, Unset): app_branch = self.app_branch.to_dict() @@ -103,7 +105,7 @@ def to_dict(self) -> dict[str, Any]: app_id = self.app_id - break_glass: Union[Unset, dict[str, Any]] = UNSET + break_glass: dict[str, Any] | Unset = UNSET if not isinstance(self.break_glass, Unset): break_glass = self.break_glass.to_dict() @@ -111,14 +113,14 @@ def to_dict(self) -> dict[str, Any]: cli_version = self.cli_version - component_config_connections: Union[Unset, list[dict[str, Any]]] = UNSET + component_config_connections: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.component_config_connections, Unset): component_config_connections = [] for component_config_connections_item_data in self.component_config_connections: component_config_connections_item = component_config_connections_item_data.to_dict() component_config_connections.append(component_config_connections_item) - component_ids: Union[Unset, list[str]] = UNSET + component_ids: list[str] | Unset = UNSET if not isinstance(self.component_ids, Unset): component_ids = self.component_ids @@ -128,41 +130,41 @@ def to_dict(self) -> dict[str, Any]: id = self.id - input_: Union[Unset, dict[str, Any]] = UNSET + input_: dict[str, Any] | Unset = UNSET if not isinstance(self.input_, Unset): input_ = self.input_.to_dict() org_id = self.org_id - permissions: Union[Unset, dict[str, Any]] = UNSET + permissions: dict[str, Any] | Unset = UNSET if not isinstance(self.permissions, Unset): permissions = self.permissions.to_dict() - policies: Union[Unset, dict[str, Any]] = UNSET + policies: dict[str, Any] | Unset = UNSET if not isinstance(self.policies, Unset): policies = self.policies.to_dict() readme = self.readme - runner: Union[Unset, dict[str, Any]] = UNSET + runner: dict[str, Any] | Unset = UNSET if not isinstance(self.runner, Unset): runner = self.runner.to_dict() - sandbox: Union[Unset, dict[str, Any]] = UNSET + sandbox: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox, Unset): sandbox = self.sandbox.to_dict() - secrets: Union[Unset, dict[str, Any]] = UNSET + secrets: dict[str, Any] | Unset = UNSET if not isinstance(self.secrets, Unset): secrets = self.secrets.to_dict() - stack: Union[Unset, dict[str, Any]] = UNSET + stack: dict[str, Any] | Unset = UNSET if not isinstance(self.stack, Unset): stack = self.stack.to_dict() state = self.state - status: Union[Unset, str] = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.value @@ -170,7 +172,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - vcs_connection_commit: Union[Unset, dict[str, Any]] = UNSET + vcs_connection_commit: dict[str, Any] | Unset = UNSET if not isinstance(self.vcs_connection_commit, Unset): vcs_connection_commit = self.vcs_connection_commit.to_dict() @@ -260,7 +262,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: action_workflow_configs.append(action_workflow_configs_item) _app_branch = d.pop("app_branch", UNSET) - app_branch: Union[Unset, AppAppBranch] + app_branch: AppAppBranch | Unset if isinstance(_app_branch, Unset): app_branch = UNSET else: @@ -271,7 +273,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_id = d.pop("app_id", UNSET) _break_glass = d.pop("break_glass", UNSET) - break_glass: Union[Unset, AppAppBreakGlassConfig] + break_glass: AppAppBreakGlassConfig | Unset if isinstance(_break_glass, Unset): break_glass = UNSET else: @@ -299,7 +301,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _input_ = d.pop("input", UNSET) - input_: Union[Unset, AppAppInputConfig] + input_: AppAppInputConfig | Unset if isinstance(_input_, Unset): input_ = UNSET else: @@ -308,14 +310,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _permissions = d.pop("permissions", UNSET) - permissions: Union[Unset, AppAppPermissionsConfig] + permissions: AppAppPermissionsConfig | Unset if isinstance(_permissions, Unset): permissions = UNSET else: permissions = AppAppPermissionsConfig.from_dict(_permissions) _policies = d.pop("policies", UNSET) - policies: Union[Unset, AppAppPoliciesConfig] + policies: AppAppPoliciesConfig | Unset if isinstance(_policies, Unset): policies = UNSET else: @@ -324,28 +326,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: readme = d.pop("readme", UNSET) _runner = d.pop("runner", UNSET) - runner: Union[Unset, AppAppRunnerConfig] + runner: AppAppRunnerConfig | Unset if isinstance(_runner, Unset): runner = UNSET else: runner = AppAppRunnerConfig.from_dict(_runner) _sandbox = d.pop("sandbox", UNSET) - sandbox: Union[Unset, AppAppSandboxConfig] + sandbox: AppAppSandboxConfig | Unset if isinstance(_sandbox, Unset): sandbox = UNSET else: sandbox = AppAppSandboxConfig.from_dict(_sandbox) _secrets = d.pop("secrets", UNSET) - secrets: Union[Unset, AppAppSecretsConfig] + secrets: AppAppSecretsConfig | Unset if isinstance(_secrets, Unset): secrets = UNSET else: secrets = AppAppSecretsConfig.from_dict(_secrets) _stack = d.pop("stack", UNSET) - stack: Union[Unset, AppAppStackConfig] + stack: AppAppStackConfig | Unset if isinstance(_stack, Unset): stack = UNSET else: @@ -354,7 +356,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: state = d.pop("state", UNSET) _status = d.pop("status", UNSET) - status: Union[Unset, AppAppConfigStatus] + status: AppAppConfigStatus | Unset if isinstance(_status, Unset): status = UNSET else: @@ -365,7 +367,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _vcs_connection_commit = d.pop("vcs_connection_commit", UNSET) - vcs_connection_commit: Union[Unset, AppVCSConnectionCommit] + vcs_connection_commit: AppVCSConnectionCommit | Unset if isinstance(_vcs_connection_commit, Unset): vcs_connection_commit = UNSET else: diff --git a/nuon/models/app_app_input.py b/nuon/models/app_app_input.py index cc3a5161..653f58bc 100644 --- a/nuon/models/app_app_input.py +++ b/nuon/models/app_app_input.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,47 +19,57 @@ class AppAppInput: """ Attributes: - app_input_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - default (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - group (Union[Unset, AppAppInputGroup]): - group_id (Union[Unset, str]): - id (Union[Unset, str]): - index (Union[Unset, int]): - internal (Union[Unset, bool]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - required (Union[Unset, bool]): - sensitive (Union[Unset, bool]): - type_ (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_input_id (str | Unset): + cloudformation_stack_name (str | Unset): CloudFormation configuration (computed fields, not stored in DB) + cloudformation_stack_parameter_name (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + default (str | Unset): + description (str | Unset): + display_name (str | Unset): + group (AppAppInputGroup | Unset): + group_id (str | Unset): + id (str | Unset): + index (int | Unset): + internal (bool | Unset): + name (str | Unset): + org_id (str | Unset): + required (bool | Unset): + sensitive (bool | Unset): + source (str | Unset): + type_ (str | Unset): + updated_at (str | Unset): """ - app_input_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - default: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - group: Union[Unset, "AppAppInputGroup"] = UNSET - group_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - index: Union[Unset, int] = UNSET - internal: Union[Unset, bool] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - required: Union[Unset, bool] = UNSET - sensitive: Union[Unset, bool] = UNSET - type_: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_input_id: str | Unset = UNSET + cloudformation_stack_name: str | Unset = UNSET + cloudformation_stack_parameter_name: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + default: str | Unset = UNSET + description: str | Unset = UNSET + display_name: str | Unset = UNSET + group: AppAppInputGroup | Unset = UNSET + group_id: str | Unset = UNSET + id: str | Unset = UNSET + index: int | Unset = UNSET + internal: bool | Unset = UNSET + name: str | Unset = UNSET + org_id: str | Unset = UNSET + required: bool | Unset = UNSET + sensitive: bool | Unset = UNSET + source: str | Unset = UNSET + type_: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: app_input_id = self.app_input_id + cloudformation_stack_name = self.cloudformation_stack_name + + cloudformation_stack_parameter_name = self.cloudformation_stack_parameter_name + created_at = self.created_at created_by_id = self.created_by_id @@ -68,7 +80,7 @@ def to_dict(self) -> dict[str, Any]: display_name = self.display_name - group: Union[Unset, dict[str, Any]] = UNSET + group: dict[str, Any] | Unset = UNSET if not isinstance(self.group, Unset): group = self.group.to_dict() @@ -88,6 +100,8 @@ def to_dict(self) -> dict[str, Any]: sensitive = self.sensitive + source = self.source + type_ = self.type_ updated_at = self.updated_at @@ -97,6 +111,10 @@ def to_dict(self) -> dict[str, Any]: field_dict.update({}) if app_input_id is not UNSET: field_dict["app_input_id"] = app_input_id + if cloudformation_stack_name is not UNSET: + field_dict["cloudformation_stack_name"] = cloudformation_stack_name + if cloudformation_stack_parameter_name is not UNSET: + field_dict["cloudformation_stack_parameter_name"] = cloudformation_stack_parameter_name if created_at is not UNSET: field_dict["created_at"] = created_at if created_by_id is not UNSET: @@ -125,6 +143,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if sensitive is not UNSET: field_dict["sensitive"] = sensitive + if source is not UNSET: + field_dict["source"] = source if type_ is not UNSET: field_dict["type"] = type_ if updated_at is not UNSET: @@ -139,6 +159,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) app_input_id = d.pop("app_input_id", UNSET) + cloudformation_stack_name = d.pop("cloudformation_stack_name", UNSET) + + cloudformation_stack_parameter_name = d.pop("cloudformation_stack_parameter_name", UNSET) + created_at = d.pop("created_at", UNSET) created_by_id = d.pop("created_by_id", UNSET) @@ -150,7 +174,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: display_name = d.pop("display_name", UNSET) _group = d.pop("group", UNSET) - group: Union[Unset, AppAppInputGroup] + group: AppAppInputGroup | Unset if isinstance(_group, Unset): group = UNSET else: @@ -172,12 +196,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: sensitive = d.pop("sensitive", UNSET) + source = d.pop("source", UNSET) + type_ = d.pop("type", UNSET) updated_at = d.pop("updated_at", UNSET) app_app_input = cls( app_input_id=app_input_id, + cloudformation_stack_name=cloudformation_stack_name, + cloudformation_stack_parameter_name=cloudformation_stack_parameter_name, created_at=created_at, created_by_id=created_by_id, default=default, @@ -192,6 +220,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id=org_id, required=required, sensitive=sensitive, + source=source, type_=type_, updated_at=updated_at, ) diff --git a/nuon/models/app_app_input_config.py b/nuon/models/app_app_input_config.py index 0f9459f9..40e8afb4 100644 --- a/nuon/models/app_app_input_config.py +++ b/nuon/models/app_app_input_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,28 +21,28 @@ class AppAppInputConfig: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - input_groups (Union[Unset, list['AppAppInputGroup']]): - inputs (Union[Unset, list['AppAppInput']]): - install_inputs (Union[Unset, list['AppInstallInputs']]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + app_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + input_groups (list[AppAppInputGroup] | Unset): + inputs (list[AppAppInput] | Unset): + install_inputs (list[AppInstallInputs] | Unset): + org_id (str | Unset): + updated_at (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input_groups: Union[Unset, list["AppAppInputGroup"]] = UNSET - inputs: Union[Unset, list["AppAppInput"]] = UNSET - install_inputs: Union[Unset, list["AppInstallInputs"]] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + input_groups: list[AppAppInputGroup] | Unset = UNSET + inputs: list[AppAppInput] | Unset = UNSET + install_inputs: list[AppInstallInputs] | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -54,21 +56,21 @@ def to_dict(self) -> dict[str, Any]: id = self.id - input_groups: Union[Unset, list[dict[str, Any]]] = UNSET + input_groups: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.input_groups, Unset): input_groups = [] for input_groups_item_data in self.input_groups: input_groups_item = input_groups_item_data.to_dict() input_groups.append(input_groups_item) - inputs: Union[Unset, list[dict[str, Any]]] = UNSET + inputs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.inputs, Unset): inputs = [] for inputs_item_data in self.inputs: inputs_item = inputs_item_data.to_dict() inputs.append(inputs_item) - install_inputs: Union[Unset, list[dict[str, Any]]] = UNSET + install_inputs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_inputs, Unset): install_inputs = [] for install_inputs_item_data in self.install_inputs: diff --git a/nuon/models/app_app_input_group.py b/nuon/models/app_app_input_group.py index b8997f65..b63627c6 100644 --- a/nuon/models/app_app_input_group.py +++ b/nuon/models/app_app_input_group.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,36 +19,36 @@ class AppAppInputGroup: """ Attributes: - app_input_id (Union[Unset, str]): - app_inputs (Union[Unset, list['AppAppInput']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - id (Union[Unset, str]): - index (Union[Unset, int]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_input_id (str | Unset): + app_inputs (list[AppAppInput] | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + description (str | Unset): + display_name (str | Unset): + id (str | Unset): + index (int | Unset): + name (str | Unset): + org_id (str | Unset): + updated_at (str | Unset): """ - app_input_id: Union[Unset, str] = UNSET - app_inputs: Union[Unset, list["AppAppInput"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - index: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_input_id: str | Unset = UNSET + app_inputs: list[AppAppInput] | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + description: str | Unset = UNSET + display_name: str | Unset = UNSET + id: str | Unset = UNSET + index: int | Unset = UNSET + name: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: app_input_id = self.app_input_id - app_inputs: Union[Unset, list[dict[str, Any]]] = UNSET + app_inputs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.app_inputs, Unset): app_inputs = [] for app_inputs_item_data in self.app_inputs: diff --git a/nuon/models/app_app_input_source.py b/nuon/models/app_app_input_source.py new file mode 100644 index 00000000..a8dd6abb --- /dev/null +++ b/nuon/models/app_app_input_source.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class AppAppInputSource(str, Enum): + CUSTOMER = "customer" + VENDOR = "vendor" + + def __str__(self) -> str: + return str(self.value) diff --git a/nuon/models/app_app_links.py b/nuon/models/app_app_links.py index ee945edf..6d08bc6d 100644 --- a/nuon/models/app_app_links.py +++ b/nuon/models/app_app_links.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_app_permissions_config.py b/nuon/models/app_app_permissions_config.py index 3e2827d2..edf0a82a 100644 --- a/nuon/models/app_app_permissions_config.py +++ b/nuon/models/app_app_permissions_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,32 +19,32 @@ class AppAppPermissionsConfig: """ Attributes: - 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]): - id (Union[Unset, str]): - maintenance_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): - org_id (Union[Unset, str]): - provision_aws_iam_role (Union[Unset, AppAppAWSIAMRoleConfig]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + app_id (str | Unset): + aws_iam_roles (list[AppAppAWSIAMRoleConfig] | Unset): + break_glass_aws_iam_role (AppAppAWSIAMRoleConfig | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + deprovision_aws_iam_role (AppAppAWSIAMRoleConfig | Unset): + id (str | Unset): + maintenance_aws_iam_role (AppAppAWSIAMRoleConfig | Unset): + org_id (str | Unset): + provision_aws_iam_role (AppAppAWSIAMRoleConfig | Unset): + updated_at (str | Unset): """ - 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 - id: Union[Unset, str] = UNSET - maintenance_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET - org_id: Union[Unset, str] = UNSET - provision_aws_iam_role: Union[Unset, "AppAppAWSIAMRoleConfig"] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + aws_iam_roles: list[AppAppAWSIAMRoleConfig] | Unset = UNSET + break_glass_aws_iam_role: AppAppAWSIAMRoleConfig | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + deprovision_aws_iam_role: AppAppAWSIAMRoleConfig | Unset = UNSET + id: str | Unset = UNSET + maintenance_aws_iam_role: AppAppAWSIAMRoleConfig | Unset = UNSET + org_id: str | Unset = UNSET + provision_aws_iam_role: AppAppAWSIAMRoleConfig | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,14 +52,14 @@ def to_dict(self) -> dict[str, Any]: app_id = self.app_id - aws_iam_roles: Union[Unset, list[dict[str, Any]]] = UNSET + aws_iam_roles: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.aws_iam_roles, Unset): aws_iam_roles = [] for aws_iam_roles_item_data in self.aws_iam_roles: 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 + break_glass_aws_iam_role: dict[str, Any] | Unset = UNSET if not isinstance(self.break_glass_aws_iam_role, Unset): break_glass_aws_iam_role = self.break_glass_aws_iam_role.to_dict() @@ -65,19 +67,19 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - deprovision_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET + deprovision_aws_iam_role: dict[str, Any] | Unset = UNSET if not isinstance(self.deprovision_aws_iam_role, Unset): deprovision_aws_iam_role = self.deprovision_aws_iam_role.to_dict() id = self.id - maintenance_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET + maintenance_aws_iam_role: dict[str, Any] | Unset = UNSET if not isinstance(self.maintenance_aws_iam_role, Unset): maintenance_aws_iam_role = self.maintenance_aws_iam_role.to_dict() org_id = self.org_id - provision_aws_iam_role: Union[Unset, dict[str, Any]] = UNSET + provision_aws_iam_role: dict[str, Any] | Unset = UNSET if not isinstance(self.provision_aws_iam_role, Unset): provision_aws_iam_role = self.provision_aws_iam_role.to_dict() @@ -130,7 +132,7 @@ 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] + break_glass_aws_iam_role: AppAppAWSIAMRoleConfig | Unset if isinstance(_break_glass_aws_iam_role, Unset): break_glass_aws_iam_role = UNSET else: @@ -141,7 +143,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _deprovision_aws_iam_role = d.pop("deprovision_aws_iam_role", UNSET) - deprovision_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] + deprovision_aws_iam_role: AppAppAWSIAMRoleConfig | Unset if isinstance(_deprovision_aws_iam_role, Unset): deprovision_aws_iam_role = UNSET else: @@ -150,7 +152,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _maintenance_aws_iam_role = d.pop("maintenance_aws_iam_role", UNSET) - maintenance_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] + maintenance_aws_iam_role: AppAppAWSIAMRoleConfig | Unset if isinstance(_maintenance_aws_iam_role, Unset): maintenance_aws_iam_role = UNSET else: @@ -159,7 +161,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _provision_aws_iam_role = d.pop("provision_aws_iam_role", UNSET) - provision_aws_iam_role: Union[Unset, AppAppAWSIAMRoleConfig] + provision_aws_iam_role: AppAppAWSIAMRoleConfig | Unset if isinstance(_provision_aws_iam_role, Unset): provision_aws_iam_role = UNSET else: diff --git a/nuon/models/app_app_policies_config.py b/nuon/models/app_app_policies_config.py index e065f49d..11b7f360 100644 --- a/nuon/models/app_app_policies_config.py +++ b/nuon/models/app_app_policies_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,22 +15,22 @@ class AppAppPoliciesConfig: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + app_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + updated_at (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_app_runner_config.py b/nuon/models/app_app_runner_config.py index 0603a6c2..a4644fbf 100644 --- a/nuon/models/app_app_runner_config.py +++ b/nuon/models/app_app_runner_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,33 +21,33 @@ class AppAppRunnerConfig: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - app_runner_type (Union[Unset, AppAppRunnerType]): - cloud_platform (Union[Unset, AppCloudPlatform]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppAppRunnerConfigEnvVars]): - helm_driver (Union[Unset, str]): - id (Union[Unset, str]): - init_script (Union[Unset, str]): takes a URL to a bash script ⤵ which will be `curl | bash`-ed on the VM. - usually via user-data or equivalent. - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + app_id (str | Unset): + app_runner_type (AppAppRunnerType | Unset): + cloud_platform (AppCloudPlatform | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + env_vars (AppAppRunnerConfigEnvVars | Unset): + helm_driver (str | Unset): + id (str | Unset): + init_script (str | Unset): takes a URL to a bash script ⤵ which will be `curl | bash`-ed on the VM. usually via + user-data or equivalent. + org_id (str | Unset): + updated_at (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - app_runner_type: Union[Unset, AppAppRunnerType] = UNSET - cloud_platform: Union[Unset, AppCloudPlatform] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppAppRunnerConfigEnvVars"] = UNSET - helm_driver: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - init_script: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + app_runner_type: AppAppRunnerType | Unset = UNSET + cloud_platform: AppCloudPlatform | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + env_vars: AppAppRunnerConfigEnvVars | Unset = UNSET + helm_driver: str | Unset = UNSET + id: str | Unset = UNSET + init_script: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -53,11 +55,11 @@ def to_dict(self) -> dict[str, Any]: app_id = self.app_id - app_runner_type: Union[Unset, str] = UNSET + app_runner_type: str | Unset = UNSET if not isinstance(self.app_runner_type, Unset): app_runner_type = self.app_runner_type.value - cloud_platform: Union[Unset, str] = UNSET + cloud_platform: str | Unset = UNSET if not isinstance(self.cloud_platform, Unset): cloud_platform = self.cloud_platform.value @@ -65,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() @@ -119,14 +121,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_id = d.pop("app_id", UNSET) _app_runner_type = d.pop("app_runner_type", UNSET) - app_runner_type: Union[Unset, AppAppRunnerType] + app_runner_type: AppAppRunnerType | Unset if isinstance(_app_runner_type, Unset): app_runner_type = UNSET else: app_runner_type = AppAppRunnerType(_app_runner_type) _cloud_platform = d.pop("cloud_platform", UNSET) - cloud_platform: Union[Unset, AppCloudPlatform] + cloud_platform: AppCloudPlatform | Unset if isinstance(_cloud_platform, Unset): cloud_platform = UNSET else: @@ -137,7 +139,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppAppRunnerConfigEnvVars] + env_vars: AppAppRunnerConfigEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: diff --git a/nuon/models/app_app_runner_config_env_vars.py b/nuon/models/app_app_runner_config_env_vars.py index d03223c0..f11b17ca 100644 --- a/nuon/models/app_app_runner_config_env_vars.py +++ b/nuon/models/app_app_runner_config_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_app_sandbox_config.py b/nuon/models/app_app_sandbox_config.py index c924955e..87b07604 100644 --- a/nuon/models/app_app_sandbox_config.py +++ b/nuon/models/app_app_sandbox_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,44 +23,44 @@ class AppAppSandboxConfig: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - aws_region_type (Union[Unset, str]): cloud specific fields - cloud_platform (Union[Unset, str]): fields set via after query - 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]): - variables_files (Union[Unset, list[str]]): + app_config_id (str | Unset): + app_id (str | Unset): + aws_region_type (str | Unset): cloud specific fields + cloud_platform (str | Unset): fields set via after query + connected_github_vcs_config (AppConnectedGithubVCSConfig | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + drift_schedule (str | Unset): + env_vars (AppAppSandboxConfigEnvVars | Unset): + id (str | Unset): + org_id (str | Unset): + public_git_vcs_config (AppPublicGitVCSConfig | Unset): + references (list[str] | Unset): + refs (list[RefsRef] | Unset): + terraform_version (str | Unset): + updated_at (str | Unset): + variables (AppAppSandboxConfigVariables | Unset): + variables_files (list[str] | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - aws_region_type: Union[Unset, str] = UNSET - cloud_platform: Union[Unset, str] = UNSET - 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 - variables_files: Union[Unset, list[str]] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + aws_region_type: str | Unset = UNSET + cloud_platform: str | Unset = UNSET + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + drift_schedule: str | Unset = UNSET + env_vars: AppAppSandboxConfigEnvVars | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + public_git_vcs_config: AppPublicGitVCSConfig | Unset = UNSET + references: list[str] | Unset = UNSET + refs: list[RefsRef] | Unset = UNSET + terraform_version: str | Unset = UNSET + updated_at: str | Unset = UNSET + variables: AppAppSandboxConfigVariables | Unset = UNSET + variables_files: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -70,7 +72,7 @@ def to_dict(self) -> dict[str, Any]: cloud_platform = self.cloud_platform - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() @@ -80,7 +82,7 @@ def to_dict(self) -> dict[str, Any]: drift_schedule = self.drift_schedule - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() @@ -88,15 +90,15 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = 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 + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references - refs: Union[Unset, list[dict[str, Any]]] = UNSET + refs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.refs, Unset): refs = [] for refs_item_data in self.refs: @@ -107,11 +109,11 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - variables: Union[Unset, dict[str, Any]] = UNSET + variables: dict[str, Any] | Unset = UNSET if not isinstance(self.variables, Unset): variables = self.variables.to_dict() - variables_files: Union[Unset, list[str]] = UNSET + variables_files: list[str] | Unset = UNSET if not isinstance(self.variables_files, Unset): variables_files = self.variables_files @@ -175,7 +177,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: cloud_platform = d.pop("cloud_platform", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -188,7 +190,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: drift_schedule = d.pop("drift_schedule", UNSET) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppAppSandboxConfigEnvVars] + env_vars: AppAppSandboxConfigEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: @@ -199,7 +201,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + public_git_vcs_config: AppPublicGitVCSConfig | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: @@ -219,7 +221,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _variables = d.pop("variables", UNSET) - variables: Union[Unset, AppAppSandboxConfigVariables] + variables: AppAppSandboxConfigVariables | Unset if isinstance(_variables, Unset): variables = UNSET else: diff --git a/nuon/models/app_app_sandbox_config_env_vars.py b/nuon/models/app_app_sandbox_config_env_vars.py index 814a5d9e..92f021b0 100644 --- a/nuon/models/app_app_sandbox_config_env_vars.py +++ b/nuon/models/app_app_sandbox_config_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_app_sandbox_config_variables.py b/nuon/models/app_app_sandbox_config_variables.py index 9b2cb808..c85b47ff 100644 --- a/nuon/models/app_app_sandbox_config_variables.py +++ b/nuon/models/app_app_sandbox_config_variables.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_app_secret.py b/nuon/models/app_app_secret.py index 916eb156..82594ba1 100644 --- a/nuon/models/app_app_secret.py +++ b/nuon/models/app_app_secret.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,24 +15,24 @@ class AppAppSecret: """ Attributes: - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - length (Union[Unset, int]): after query fields - name (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + length (int | Unset): after query fields + name (str | Unset): + org_id (str | Unset): + updated_at (str | Unset): """ - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - length: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + length: int | Unset = UNSET + name: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_app_secret_config.py b/nuon/models/app_app_secret_config.py index 9a509027..b5b913a7 100644 --- a/nuon/models/app_app_secret_config.py +++ b/nuon/models/app_app_secret_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,48 +15,48 @@ class AppAppSecretConfig: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - app_secrets_config_id (Union[Unset, str]): - auto_generate (Union[Unset, bool]): - cloudformation_param_name (Union[Unset, str]): - cloudformation_stack_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - default (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - format_ (Union[Unset, str]): - id (Union[Unset, str]): - kubernetes_secret_name (Union[Unset, str]): - kubernetes_secret_namespace (Union[Unset, str]): - kubernetes_sync (Union[Unset, bool]): for syncing into kubernetes - name (Union[Unset, str]): - org_id (Union[Unset, str]): - required (Union[Unset, bool]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + app_id (str | Unset): + app_secrets_config_id (str | Unset): + auto_generate (bool | Unset): + cloudformation_param_name (str | Unset): + cloudformation_stack_name (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + default (str | Unset): + description (str | Unset): + display_name (str | Unset): + format_ (str | Unset): + id (str | Unset): + kubernetes_secret_name (str | Unset): + kubernetes_secret_namespace (str | Unset): + kubernetes_sync (bool | Unset): for syncing into kubernetes + name (str | Unset): + org_id (str | Unset): + required (bool | Unset): + updated_at (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - app_secrets_config_id: Union[Unset, str] = UNSET - auto_generate: Union[Unset, bool] = UNSET - cloudformation_param_name: Union[Unset, str] = UNSET - cloudformation_stack_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - default: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - format_: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - kubernetes_secret_name: Union[Unset, str] = UNSET - kubernetes_secret_namespace: Union[Unset, str] = UNSET - kubernetes_sync: Union[Unset, bool] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - required: Union[Unset, bool] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + app_secrets_config_id: str | Unset = UNSET + auto_generate: bool | Unset = UNSET + cloudformation_param_name: str | Unset = UNSET + cloudformation_stack_name: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + default: str | Unset = UNSET + description: str | Unset = UNSET + display_name: str | Unset = UNSET + format_: str | Unset = UNSET + id: str | Unset = UNSET + kubernetes_secret_name: str | Unset = UNSET + kubernetes_secret_namespace: str | Unset = UNSET + kubernetes_sync: bool | Unset = UNSET + name: str | Unset = UNSET + org_id: str | Unset = UNSET + required: bool | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_app_secrets_config.py b/nuon/models/app_app_secrets_config.py index 0a665de8..48afc676 100644 --- a/nuon/models/app_app_secrets_config.py +++ b/nuon/models/app_app_secrets_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,24 +19,24 @@ class AppAppSecretsConfig: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - secrets (Union[Unset, list['AppAppSecretConfig']]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + app_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + secrets (list[AppAppSecretConfig] | Unset): + updated_at (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - secrets: Union[Unset, list["AppAppSecretConfig"]] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + secrets: list[AppAppSecretConfig] | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id - secrets: Union[Unset, list[dict[str, Any]]] = UNSET + secrets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.secrets, Unset): secrets = [] for secrets_item_data in self.secrets: diff --git a/nuon/models/app_app_stack_config.py b/nuon/models/app_app_stack_config.py index 452a0005..da4f31f8 100644 --- a/nuon/models/app_app_stack_config.py +++ b/nuon/models/app_app_stack_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,32 +16,32 @@ class AppAppStackConfig: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - description (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, str]): - org_id (Union[Unset, str]): - runner_nested_template_url (Union[Unset, str]): - type_ (Union[Unset, AppStackType]): - updated_at (Union[Unset, str]): - vpc_nested_template_url (Union[Unset, str]): + app_config_id (str | Unset): + app_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + description (str | Unset): + id (str | Unset): + name (str | Unset): + org_id (str | Unset): + runner_nested_template_url (str | Unset): + type_ (AppStackType | Unset): + updated_at (str | Unset): + vpc_nested_template_url (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - runner_nested_template_url: Union[Unset, str] = UNSET - type_: Union[Unset, AppStackType] = UNSET - updated_at: Union[Unset, str] = UNSET - vpc_nested_template_url: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + description: str | Unset = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET + org_id: str | Unset = UNSET + runner_nested_template_url: str | Unset = UNSET + type_: AppStackType | Unset = UNSET + updated_at: str | Unset = UNSET + vpc_nested_template_url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -61,7 +63,7 @@ def to_dict(self) -> dict[str, Any]: runner_nested_template_url = self.runner_nested_template_url - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -121,7 +123,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_nested_template_url = d.pop("runner_nested_template_url", UNSET) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppStackType] + type_: AppStackType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/app_aws_account.py b/nuon/models/app_aws_account.py index 2fb97953..50f892f6 100644 --- a/nuon/models/app_aws_account.py +++ b/nuon/models/app_aws_account.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,20 +15,20 @@ class AppAWSAccount: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - iam_role_arn (Union[Unset, str]): - id (Union[Unset, str]): - region (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + iam_role_arn (str | Unset): + id (str | Unset): + region (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - iam_role_arn: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - region: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + iam_role_arn: str | Unset = UNSET + id: str | Unset = UNSET + region: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_aws_stack_outputs.py b/nuon/models/app_aws_stack_outputs.py index ec97efd1..8d9eb111 100644 --- a/nuon/models/app_aws_stack_outputs.py +++ b/nuon/models/app_aws_stack_outputs.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -8,6 +10,7 @@ if TYPE_CHECKING: from ..models.app_aws_stack_outputs_break_glass_role_arns import AppAWSStackOutputsBreakGlassRoleArns + from ..models.app_aws_stack_outputs_install_inputs import AppAWSStackOutputsInstallInputs T = TypeVar("T", bound="AppAWSStackOutputs") @@ -17,50 +20,56 @@ 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]]): - provision_iam_role_arn (Union[Unset, str]): - public_subnets (Union[Unset, list[str]]): - region (Union[Unset, str]): - runner_iam_role_arn (Union[Unset, str]): - runner_subnet (Union[Unset, str]): - vpc_id (Union[Unset, str]): + account_id (str | Unset): + break_glass_role_arns (AppAWSStackOutputsBreakGlassRoleArns | Unset): + deprovision_iam_role_arn (str | Unset): + install_inputs (AppAWSStackOutputsInstallInputs | Unset): + maintenance_iam_role_arn (str | Unset): + private_subnets (list[str] | Unset): + provision_iam_role_arn (str | Unset): + public_subnets (list[str] | Unset): + region (str | Unset): + runner_iam_role_arn (str | Unset): + runner_subnet (str | Unset): + vpc_id (str | Unset): """ - 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 - provision_iam_role_arn: Union[Unset, str] = UNSET - public_subnets: Union[Unset, list[str]] = UNSET - region: Union[Unset, str] = UNSET - runner_iam_role_arn: Union[Unset, str] = UNSET - runner_subnet: Union[Unset, str] = UNSET - vpc_id: Union[Unset, str] = UNSET + account_id: str | Unset = UNSET + break_glass_role_arns: AppAWSStackOutputsBreakGlassRoleArns | Unset = UNSET + deprovision_iam_role_arn: str | Unset = UNSET + install_inputs: AppAWSStackOutputsInstallInputs | Unset = UNSET + maintenance_iam_role_arn: str | Unset = UNSET + private_subnets: list[str] | Unset = UNSET + provision_iam_role_arn: str | Unset = UNSET + public_subnets: list[str] | Unset = UNSET + region: str | Unset = UNSET + runner_iam_role_arn: str | Unset = UNSET + runner_subnet: str | Unset = UNSET + vpc_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: account_id = self.account_id - break_glass_role_arns: Union[Unset, dict[str, Any]] = UNSET + break_glass_role_arns: dict[str, Any] | Unset = 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 + install_inputs: dict[str, Any] | Unset = UNSET + if not isinstance(self.install_inputs, Unset): + install_inputs = self.install_inputs.to_dict() + maintenance_iam_role_arn = self.maintenance_iam_role_arn - private_subnets: Union[Unset, list[str]] = UNSET + private_subnets: list[str] | Unset = UNSET if not isinstance(self.private_subnets, Unset): private_subnets = self.private_subnets provision_iam_role_arn = self.provision_iam_role_arn - public_subnets: Union[Unset, list[str]] = UNSET + public_subnets: list[str] | Unset = UNSET if not isinstance(self.public_subnets, Unset): public_subnets = self.public_subnets @@ -81,6 +90,8 @@ def to_dict(self) -> dict[str, Any]: 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 install_inputs is not UNSET: + field_dict["install_inputs"] = install_inputs if maintenance_iam_role_arn is not UNSET: field_dict["maintenance_iam_role_arn"] = maintenance_iam_role_arn if private_subnets is not UNSET: @@ -103,12 +114,13 @@ 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 + from ..models.app_aws_stack_outputs_install_inputs import AppAWSStackOutputsInstallInputs 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] + break_glass_role_arns: AppAWSStackOutputsBreakGlassRoleArns | Unset if isinstance(_break_glass_role_arns, Unset): break_glass_role_arns = UNSET else: @@ -116,6 +128,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: deprovision_iam_role_arn = d.pop("deprovision_iam_role_arn", UNSET) + _install_inputs = d.pop("install_inputs", UNSET) + install_inputs: AppAWSStackOutputsInstallInputs | Unset + if isinstance(_install_inputs, Unset): + install_inputs = UNSET + else: + install_inputs = AppAWSStackOutputsInstallInputs.from_dict(_install_inputs) + maintenance_iam_role_arn = d.pop("maintenance_iam_role_arn", UNSET) private_subnets = cast(list[str], d.pop("private_subnets", UNSET)) @@ -136,6 +155,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: account_id=account_id, break_glass_role_arns=break_glass_role_arns, deprovision_iam_role_arn=deprovision_iam_role_arn, + install_inputs=install_inputs, maintenance_iam_role_arn=maintenance_iam_role_arn, private_subnets=private_subnets, provision_iam_role_arn=provision_iam_role_arn, 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 index 8df2d2ef..02650d43 100644 --- a/nuon/models/app_aws_stack_outputs_break_glass_role_arns.py +++ b/nuon/models/app_aws_stack_outputs_break_glass_role_arns.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_aws_stack_outputs_install_inputs.py b/nuon/models/app_aws_stack_outputs_install_inputs.py new file mode 100644 index 00000000..0a3ccaaf --- /dev/null +++ b/nuon/models/app_aws_stack_outputs_install_inputs.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="AppAWSStackOutputsInstallInputs") + + +@_attrs_define +class AppAWSStackOutputsInstallInputs: + """ """ + + 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_install_inputs = cls() + + app_aws_stack_outputs_install_inputs.additional_properties = d + return app_aws_stack_outputs_install_inputs + + @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_awsecr_image_config.py b/nuon/models/app_awsecr_image_config.py index 13a111f7..b0c7d000 100644 --- a/nuon/models/app_awsecr_image_config.py +++ b/nuon/models/app_awsecr_image_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,24 +15,24 @@ class AppAWSECRImageConfig: """ Attributes: - aws_region (Union[Unset, str]): - component_config_id (Union[Unset, str]): connection to parent model - component_config_type (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - iam_role_arn (Union[Unset, str]): actual configuration - id (Union[Unset, str]): - updated_at (Union[Unset, str]): + aws_region (str | Unset): + component_config_id (str | Unset): connection to parent model + component_config_type (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + iam_role_arn (str | Unset): actual configuration + id (str | Unset): + updated_at (str | Unset): """ - aws_region: Union[Unset, str] = UNSET - component_config_id: Union[Unset, str] = UNSET - component_config_type: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - iam_role_arn: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + aws_region: str | Unset = UNSET + component_config_id: str | Unset = UNSET + component_config_type: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + iam_role_arn: str | Unset = UNSET + id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_azure_account.py b/nuon/models/app_azure_account.py index 61d5d03b..ddd01906 100644 --- a/nuon/models/app_azure_account.py +++ b/nuon/models/app_azure_account.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,26 +15,26 @@ class AppAzureAccount: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - 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]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + location (str | Unset): + service_principal_app_id (str | Unset): + service_principal_password (str | Unset): + subscription_id (str | Unset): + subscription_tenant_id (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - 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 - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + location: str | Unset = UNSET + service_principal_app_id: str | Unset = UNSET + service_principal_password: str | Unset = UNSET + subscription_id: str | Unset = UNSET + subscription_tenant_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_azure_stack_outputs.py b/nuon/models/app_azure_stack_outputs.py index 5dacd8c5..66408542 100644 --- a/nuon/models/app_azure_stack_outputs.py +++ b/nuon/models/app_azure_stack_outputs.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,34 +15,34 @@ class AppAzureStackOutputs: """ Attributes: - key_vault_id (Union[Unset, str]): - key_vault_name (Union[Unset, str]): - network_id (Union[Unset, str]): - network_name (Union[Unset, str]): - private_subnet_ids (Union[Unset, list[str]]): - private_subnet_names (Union[Unset, list[str]]): - public_subnet_ids (Union[Unset, list[str]]): - public_subnet_names (Union[Unset, list[str]]): - resource_group_id (Union[Unset, str]): - resource_group_location (Union[Unset, str]): - resource_group_name (Union[Unset, str]): - subscription_id (Union[Unset, str]): - subscription_tenant_id (Union[Unset, str]): + key_vault_id (str | Unset): + key_vault_name (str | Unset): + network_id (str | Unset): + network_name (str | Unset): + private_subnet_ids (list[str] | Unset): + private_subnet_names (list[str] | Unset): + public_subnet_ids (list[str] | Unset): + public_subnet_names (list[str] | Unset): + resource_group_id (str | Unset): + resource_group_location (str | Unset): + resource_group_name (str | Unset): + subscription_id (str | Unset): + subscription_tenant_id (str | Unset): """ - key_vault_id: Union[Unset, str] = UNSET - key_vault_name: Union[Unset, str] = UNSET - network_id: Union[Unset, str] = UNSET - network_name: Union[Unset, str] = UNSET - private_subnet_ids: Union[Unset, list[str]] = UNSET - private_subnet_names: Union[Unset, list[str]] = UNSET - public_subnet_ids: Union[Unset, list[str]] = UNSET - public_subnet_names: Union[Unset, list[str]] = UNSET - resource_group_id: Union[Unset, str] = UNSET - resource_group_location: Union[Unset, str] = UNSET - resource_group_name: Union[Unset, str] = UNSET - subscription_id: Union[Unset, str] = UNSET - subscription_tenant_id: Union[Unset, str] = UNSET + key_vault_id: str | Unset = UNSET + key_vault_name: str | Unset = UNSET + network_id: str | Unset = UNSET + network_name: str | Unset = UNSET + private_subnet_ids: list[str] | Unset = UNSET + private_subnet_names: list[str] | Unset = UNSET + public_subnet_ids: list[str] | Unset = UNSET + public_subnet_names: list[str] | Unset = UNSET + resource_group_id: str | Unset = UNSET + resource_group_location: str | Unset = UNSET + resource_group_name: str | Unset = UNSET + subscription_id: str | Unset = UNSET + subscription_tenant_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,19 +54,19 @@ def to_dict(self) -> dict[str, Any]: network_name = self.network_name - private_subnet_ids: Union[Unset, list[str]] = UNSET + private_subnet_ids: list[str] | Unset = UNSET if not isinstance(self.private_subnet_ids, Unset): private_subnet_ids = self.private_subnet_ids - private_subnet_names: Union[Unset, list[str]] = UNSET + private_subnet_names: list[str] | Unset = UNSET if not isinstance(self.private_subnet_names, Unset): private_subnet_names = self.private_subnet_names - public_subnet_ids: Union[Unset, list[str]] = UNSET + public_subnet_ids: list[str] | Unset = UNSET if not isinstance(self.public_subnet_ids, Unset): public_subnet_ids = self.public_subnet_ids - public_subnet_names: Union[Unset, list[str]] = UNSET + public_subnet_names: list[str] | Unset = UNSET if not isinstance(self.public_subnet_names, Unset): public_subnet_names = self.public_subnet_names diff --git a/nuon/models/app_cloud_platform_region.py b/nuon/models/app_cloud_platform_region.py index 29c5696c..6d9389d2 100644 --- a/nuon/models/app_cloud_platform_region.py +++ b/nuon/models/app_cloud_platform_region.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,16 +15,16 @@ class AppCloudPlatformRegion: """ Attributes: - display_name (Union[Unset, str]): - icon (Union[Unset, str]): - name (Union[Unset, str]): - value (Union[Unset, str]): + display_name (str | Unset): + icon (str | Unset): + name (str | Unset): + value (str | Unset): """ - display_name: Union[Unset, str] = UNSET - icon: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - value: Union[Unset, str] = UNSET + display_name: str | Unset = UNSET + icon: str | Unset = UNSET + name: str | Unset = UNSET + value: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_component.py b/nuon/models/app_component.py index 55e6ab11..8ebbbc50 100644 --- a/nuon/models/app_component.py +++ b/nuon/models/app_component.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,36 +20,36 @@ class AppComponent: """ Attributes: - app_id (Union[Unset, str]): - config_versions (Union[Unset, int]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - dependencies (Union[Unset, list[str]]): - id (Union[Unset, str]): - links (Union[Unset, AppComponentLinks]): - name (Union[Unset, str]): - resolved_var_name (Union[Unset, str]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - type_ (Union[Unset, AppComponentType]): - updated_at (Union[Unset, str]): - var_name (Union[Unset, str]): + app_id (str | Unset): + config_versions (int | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + dependencies (list[str] | Unset): + id (str | Unset): + links (AppComponentLinks | Unset): + name (str | Unset): + resolved_var_name (str | Unset): + status (str | Unset): + status_description (str | Unset): + type_ (AppComponentType | Unset): + updated_at (str | Unset): + var_name (str | Unset): """ - app_id: Union[Unset, str] = UNSET - config_versions: Union[Unset, int] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - id: Union[Unset, str] = UNSET - links: Union[Unset, "AppComponentLinks"] = UNSET - name: Union[Unset, str] = UNSET - resolved_var_name: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - type_: Union[Unset, AppComponentType] = UNSET - updated_at: Union[Unset, str] = UNSET - var_name: Union[Unset, str] = UNSET + app_id: str | Unset = UNSET + config_versions: int | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + dependencies: list[str] | Unset = UNSET + id: str | Unset = UNSET + links: AppComponentLinks | Unset = UNSET + name: str | Unset = UNSET + resolved_var_name: str | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + type_: AppComponentType | Unset = UNSET + updated_at: str | Unset = UNSET + var_name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -59,13 +61,13 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies id = self.id - links: Union[Unset, dict[str, Any]] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() @@ -77,7 +79,7 @@ def to_dict(self) -> dict[str, Any]: status_description = self.status_description - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -137,7 +139,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _links = d.pop("links", UNSET) - links: Union[Unset, AppComponentLinks] + links: AppComponentLinks | Unset if isinstance(_links, Unset): links = UNSET else: @@ -152,7 +154,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_description = d.pop("status_description", UNSET) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppComponentType] + type_: AppComponentType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/app_component_build.py b/nuon/models/app_component_build.py index 429a8e47..99b1a83e 100644 --- a/nuon/models/app_component_build.py +++ b/nuon/models/app_component_build.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,55 +26,55 @@ class AppComponentBuild: """ Attributes: - checksum (Union[Unset, str]): checksum of our intermediate component config - component_config_connection (Union[Unset, AppComponentConfigConnection]): - component_config_connection_id (Union[Unset, str]): DEPRECATED: will retain the field to connect against the - last component config connection that set this build - component_config_version (Union[Unset, int]): - component_id (Union[Unset, str]): Read-only fields set on the object to de-nest data - component_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - git_ref (Union[Unset, str]): - id (Union[Unset, str]): - install_deploys (Union[Unset, list['AppInstallDeploy']]): - log_stream (Union[Unset, AppLogStream]): - releases (Union[Unset, list['AppComponentRelease']]): - runner_job (Union[Unset, AppRunnerJob]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - updated_at (Union[Unset, str]): - vcs_connection_commit (Union[Unset, AppVCSConnectionCommit]): + checksum (str | Unset): checksum of our intermediate component config + component_config_connection (AppComponentConfigConnection | Unset): + component_config_connection_id (str | Unset): DEPRECATED: will retain the field to connect against the last + component config connection that set this build + component_config_version (int | Unset): + component_id (str | Unset): Read-only fields set on the object to de-nest data + component_name (str | Unset): + created_at (str | Unset): + created_by (AppAccount | Unset): + created_by_id (str | Unset): + git_ref (str | Unset): + id (str | Unset): + install_deploys (list[AppInstallDeploy] | Unset): + log_stream (AppLogStream | Unset): + releases (list[AppComponentRelease] | Unset): + runner_job (AppRunnerJob | Unset): + status (str | Unset): + status_description (str | Unset): + status_v2 (AppCompositeStatus | Unset): + updated_at (str | Unset): + vcs_connection_commit (AppVCSConnectionCommit | Unset): """ - checksum: Union[Unset, str] = UNSET - component_config_connection: Union[Unset, "AppComponentConfigConnection"] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - component_config_version: Union[Unset, int] = UNSET - component_id: Union[Unset, str] = UNSET - component_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - git_ref: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET - log_stream: Union[Unset, "AppLogStream"] = UNSET - releases: Union[Unset, list["AppComponentRelease"]] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection_commit: Union[Unset, "AppVCSConnectionCommit"] = UNSET + checksum: str | Unset = UNSET + component_config_connection: AppComponentConfigConnection | Unset = UNSET + component_config_connection_id: str | Unset = UNSET + component_config_version: int | Unset = UNSET + component_id: str | Unset = UNSET + component_name: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by: AppAccount | Unset = UNSET + created_by_id: str | Unset = UNSET + git_ref: str | Unset = UNSET + id: str | Unset = UNSET + install_deploys: list[AppInstallDeploy] | Unset = UNSET + log_stream: AppLogStream | Unset = UNSET + releases: list[AppComponentRelease] | Unset = UNSET + runner_job: AppRunnerJob | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + status_v2: AppCompositeStatus | Unset = UNSET + updated_at: str | Unset = UNSET + vcs_connection_commit: AppVCSConnectionCommit | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: checksum = self.checksum - component_config_connection: Union[Unset, dict[str, Any]] = UNSET + component_config_connection: dict[str, Any] | Unset = UNSET if not isinstance(self.component_config_connection, Unset): component_config_connection = self.component_config_connection.to_dict() @@ -86,7 +88,7 @@ def to_dict(self) -> dict[str, Any]: created_at = self.created_at - created_by: Union[Unset, dict[str, Any]] = UNSET + created_by: dict[str, Any] | Unset = UNSET if not isinstance(self.created_by, Unset): created_by = self.created_by.to_dict() @@ -96,25 +98,25 @@ def to_dict(self) -> dict[str, Any]: id = self.id - install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET + install_deploys: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_deploys, Unset): install_deploys = [] for install_deploys_item_data in self.install_deploys: install_deploys_item = install_deploys_item_data.to_dict() install_deploys.append(install_deploys_item) - log_stream: Union[Unset, dict[str, Any]] = UNSET + log_stream: dict[str, Any] | Unset = UNSET if not isinstance(self.log_stream, Unset): log_stream = self.log_stream.to_dict() - releases: Union[Unset, list[dict[str, Any]]] = UNSET + releases: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.releases, Unset): releases = [] for releases_item_data in self.releases: releases_item = releases_item_data.to_dict() releases.append(releases_item) - runner_job: Union[Unset, dict[str, Any]] = UNSET + runner_job: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_job, Unset): runner_job = self.runner_job.to_dict() @@ -122,13 +124,13 @@ def to_dict(self) -> dict[str, Any]: status_description = self.status_description - status_v2: Union[Unset, dict[str, Any]] = UNSET + status_v2: dict[str, Any] | Unset = UNSET if not isinstance(self.status_v2, Unset): status_v2 = self.status_v2.to_dict() updated_at = self.updated_at - vcs_connection_commit: Union[Unset, dict[str, Any]] = UNSET + vcs_connection_commit: dict[str, Any] | Unset = UNSET if not isinstance(self.vcs_connection_commit, Unset): vcs_connection_commit = self.vcs_connection_commit.to_dict() @@ -193,7 +195,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: checksum = d.pop("checksum", UNSET) _component_config_connection = d.pop("component_config_connection", UNSET) - component_config_connection: Union[Unset, AppComponentConfigConnection] + component_config_connection: AppComponentConfigConnection | Unset if isinstance(_component_config_connection, Unset): component_config_connection = UNSET else: @@ -210,7 +212,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at = d.pop("created_at", UNSET) _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] + created_by: AppAccount | Unset if isinstance(_created_by, Unset): created_by = UNSET else: @@ -230,7 +232,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_deploys.append(install_deploys_item) _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] + log_stream: AppLogStream | Unset if isinstance(_log_stream, Unset): log_stream = UNSET else: @@ -244,7 +246,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: releases.append(releases_item) _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] + runner_job: AppRunnerJob | Unset if isinstance(_runner_job, Unset): runner_job = UNSET else: @@ -255,7 +257,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_description = d.pop("status_description", UNSET) _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] + status_v2: AppCompositeStatus | Unset if isinstance(_status_v2, Unset): status_v2 = UNSET else: @@ -264,7 +266,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _vcs_connection_commit = d.pop("vcs_connection_commit", UNSET) - vcs_connection_commit: Union[Unset, AppVCSConnectionCommit] + vcs_connection_commit: AppVCSConnectionCommit | Unset if isinstance(_vcs_connection_commit, Unset): vcs_connection_commit = UNSET else: diff --git a/nuon/models/app_component_config_connection.py b/nuon/models/app_component_config_connection.py index 27aa75dd..72b0f467 100644 --- a/nuon/models/app_component_config_connection.py +++ b/nuon/models/app_component_config_connection.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,50 +26,50 @@ class AppComponentConfigConnection: """ Attributes: - app_config_id (Union[Unset, str]): - app_config_version (Union[Unset, int]): - checksum (Union[Unset, str]): - component_dependency_ids (Union[Unset, list[str]]): - component_id (Union[Unset, str]): - component_name (Union[Unset, str]): - 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]): - job (Union[Unset, AppJobComponentConfig]): - kubernetes_manifest (Union[Unset, AppKubernetesManifestComponentConfig]): - references (Union[Unset, list[str]]): - refs (Union[Unset, list['RefsRef']]): - terraform_module (Union[Unset, AppTerraformModuleComponentConfig]): - type_ (Union[Unset, AppComponentType]): - updated_at (Union[Unset, str]): - version (Union[Unset, int]): + app_config_id (str | Unset): + app_config_version (int | Unset): + checksum (str | Unset): + component_dependency_ids (list[str] | Unset): + component_id (str | Unset): + component_name (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + docker_build (AppDockerBuildComponentConfig | Unset): + drift_schedule (str | Unset): + external_image (AppExternalImageComponentConfig | Unset): + helm (AppHelmComponentConfig | Unset): + id (str | Unset): + job (AppJobComponentConfig | Unset): + kubernetes_manifest (AppKubernetesManifestComponentConfig | Unset): + references (list[str] | Unset): + refs (list[RefsRef] | Unset): + terraform_module (AppTerraformModuleComponentConfig | Unset): + type_ (AppComponentType | Unset): + updated_at (str | Unset): + version (int | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_config_version: Union[Unset, int] = UNSET - checksum: Union[Unset, str] = UNSET - component_dependency_ids: Union[Unset, list[str]] = UNSET - component_id: Union[Unset, str] = UNSET - component_name: Union[Unset, str] = UNSET - 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 - job: Union[Unset, "AppJobComponentConfig"] = UNSET - kubernetes_manifest: Union[Unset, "AppKubernetesManifestComponentConfig"] = UNSET - references: Union[Unset, list[str]] = UNSET - refs: Union[Unset, list["RefsRef"]] = UNSET - terraform_module: Union[Unset, "AppTerraformModuleComponentConfig"] = UNSET - type_: Union[Unset, AppComponentType] = UNSET - updated_at: Union[Unset, str] = UNSET - version: Union[Unset, int] = UNSET + app_config_id: str | Unset = UNSET + app_config_version: int | Unset = UNSET + checksum: str | Unset = UNSET + component_dependency_ids: list[str] | Unset = UNSET + component_id: str | Unset = UNSET + component_name: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + docker_build: AppDockerBuildComponentConfig | Unset = UNSET + drift_schedule: str | Unset = UNSET + external_image: AppExternalImageComponentConfig | Unset = UNSET + helm: AppHelmComponentConfig | Unset = UNSET + id: str | Unset = UNSET + job: AppJobComponentConfig | Unset = UNSET + kubernetes_manifest: AppKubernetesManifestComponentConfig | Unset = UNSET + references: list[str] | Unset = UNSET + refs: list[RefsRef] | Unset = UNSET + terraform_module: AppTerraformModuleComponentConfig | Unset = UNSET + type_: AppComponentType | Unset = UNSET + updated_at: str | Unset = UNSET + version: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -77,7 +79,7 @@ def to_dict(self) -> dict[str, Any]: checksum = self.checksum - component_dependency_ids: Union[Unset, list[str]] = UNSET + component_dependency_ids: list[str] | Unset = UNSET if not isinstance(self.component_dependency_ids, Unset): component_dependency_ids = self.component_dependency_ids @@ -89,46 +91,46 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - docker_build: Union[Unset, dict[str, Any]] = UNSET + docker_build: dict[str, Any] | Unset = UNSET 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 + external_image: dict[str, Any] | Unset = UNSET if not isinstance(self.external_image, Unset): external_image = self.external_image.to_dict() - helm: Union[Unset, dict[str, Any]] = UNSET + helm: dict[str, Any] | Unset = UNSET if not isinstance(self.helm, Unset): helm = self.helm.to_dict() id = self.id - job: Union[Unset, dict[str, Any]] = UNSET + job: dict[str, Any] | Unset = UNSET if not isinstance(self.job, Unset): job = self.job.to_dict() - kubernetes_manifest: Union[Unset, dict[str, Any]] = UNSET + kubernetes_manifest: dict[str, Any] | Unset = UNSET if not isinstance(self.kubernetes_manifest, Unset): kubernetes_manifest = self.kubernetes_manifest.to_dict() - references: Union[Unset, list[str]] = UNSET + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references - refs: Union[Unset, list[dict[str, Any]]] = UNSET + refs: list[dict[str, Any]] | Unset = 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_module: Union[Unset, dict[str, Any]] = UNSET + terraform_module: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform_module, Unset): terraform_module = self.terraform_module.to_dict() - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -212,7 +214,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _docker_build = d.pop("docker_build", UNSET) - docker_build: Union[Unset, AppDockerBuildComponentConfig] + docker_build: AppDockerBuildComponentConfig | Unset if isinstance(_docker_build, Unset): docker_build = UNSET else: @@ -221,14 +223,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: drift_schedule = d.pop("drift_schedule", UNSET) _external_image = d.pop("external_image", UNSET) - external_image: Union[Unset, AppExternalImageComponentConfig] + external_image: AppExternalImageComponentConfig | Unset if isinstance(_external_image, Unset): external_image = UNSET else: external_image = AppExternalImageComponentConfig.from_dict(_external_image) _helm = d.pop("helm", UNSET) - helm: Union[Unset, AppHelmComponentConfig] + helm: AppHelmComponentConfig | Unset if isinstance(_helm, Unset): helm = UNSET else: @@ -237,14 +239,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _job = d.pop("job", UNSET) - job: Union[Unset, AppJobComponentConfig] + job: AppJobComponentConfig | Unset if isinstance(_job, Unset): job = UNSET else: job = AppJobComponentConfig.from_dict(_job) _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) - kubernetes_manifest: Union[Unset, AppKubernetesManifestComponentConfig] + kubernetes_manifest: AppKubernetesManifestComponentConfig | Unset if isinstance(_kubernetes_manifest, Unset): kubernetes_manifest = UNSET else: @@ -260,14 +262,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: refs.append(refs_item) _terraform_module = d.pop("terraform_module", UNSET) - terraform_module: Union[Unset, AppTerraformModuleComponentConfig] + terraform_module: AppTerraformModuleComponentConfig | Unset if isinstance(_terraform_module, Unset): terraform_module = UNSET else: terraform_module = AppTerraformModuleComponentConfig.from_dict(_terraform_module) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppComponentType] + type_: AppComponentType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/app_component_links.py b/nuon/models/app_component_links.py index cc8a64db..11698bb5 100644 --- a/nuon/models/app_component_links.py +++ b/nuon/models/app_component_links.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_component_release.py b/nuon/models/app_component_release.py index 586260b5..8daac64b 100644 --- a/nuon/models/app_component_release.py +++ b/nuon/models/app_component_release.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,26 +19,26 @@ class AppComponentRelease: """ Attributes: - build_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - release_steps (Union[Unset, list['AppComponentReleaseStep']]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - total_release_steps (Union[Unset, int]): - updated_at (Union[Unset, str]): + build_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + release_steps (list[AppComponentReleaseStep] | Unset): + status (str | Unset): + status_description (str | Unset): + total_release_steps (int | Unset): + updated_at (str | Unset): """ - build_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - release_steps: Union[Unset, list["AppComponentReleaseStep"]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - total_release_steps: Union[Unset, int] = UNSET - updated_at: Union[Unset, str] = UNSET + build_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + release_steps: list[AppComponentReleaseStep] | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + total_release_steps: int | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -48,7 +50,7 @@ def to_dict(self) -> dict[str, Any]: id = self.id - release_steps: Union[Unset, list[dict[str, Any]]] = UNSET + release_steps: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.release_steps, Unset): release_steps = [] for release_steps_item_data in self.release_steps: diff --git a/nuon/models/app_component_release_step.py b/nuon/models/app_component_release_step.py index 85a466e2..75722858 100644 --- a/nuon/models/app_component_release_step.py +++ b/nuon/models/app_component_release_step.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,31 +19,31 @@ class AppComponentReleaseStep: """ Attributes: - component_release_id (Union[Unset, str]): parent release ID - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - delay (Union[Unset, str]): fields to control the delay of the individual step, as this is set based on the - parent strategy - id (Union[Unset, str]): - install_deploys (Union[Unset, list['AppInstallDeploy']]): - requested_install_ids (Union[Unset, list[str]]): When a step is created, a set of installs are targeted. - However, by the time the release step goes out, the + component_release_id (str | Unset): parent release ID + created_at (str | Unset): + created_by_id (str | Unset): + delay (str | Unset): fields to control the delay of the individual step, as this is set based on the parent + strategy + id (str | Unset): + install_deploys (list[AppInstallDeploy] | Unset): + requested_install_ids (list[str] | Unset): When a step is created, a set of installs are targeted. However, by + the time the release step goes out, the install might have been setup in any order of ways. - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): + status (str | Unset): + status_description (str | Unset): + updated_at (str | Unset): """ - component_release_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - delay: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET - requested_install_ids: Union[Unset, list[str]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + component_release_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + delay: str | Unset = UNSET + id: str | Unset = UNSET + install_deploys: list[AppInstallDeploy] | Unset = UNSET + requested_install_ids: list[str] | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,14 +57,14 @@ def to_dict(self) -> dict[str, Any]: id = self.id - install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET + install_deploys: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_deploys, Unset): install_deploys = [] for install_deploys_item_data in self.install_deploys: install_deploys_item = install_deploys_item_data.to_dict() install_deploys.append(install_deploys_item) - requested_install_ids: Union[Unset, list[str]] = UNSET + requested_install_ids: list[str] | Unset = UNSET if not isinstance(self.requested_install_ids, Unset): requested_install_ids = self.requested_install_ids diff --git a/nuon/models/app_composite_status.py b/nuon/models/app_composite_status.py index ad3b2ae0..aec9bdbc 100644 --- a/nuon/models/app_composite_status.py +++ b/nuon/models/app_composite_status.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,20 +20,20 @@ class AppCompositeStatus: """ Attributes: - created_at_ts (Union[Unset, int]): - created_by_id (Union[Unset, str]): - history (Union[Unset, list['AppCompositeStatus']]): - metadata (Union[Unset, AppCompositeStatusMetadata]): - status (Union[Unset, AppStatus]): - status_human_description (Union[Unset, str]): + created_at_ts (int | Unset): + created_by_id (str | Unset): + history (list[AppCompositeStatus] | Unset): + metadata (AppCompositeStatusMetadata | Unset): + status (AppStatus | Unset): + status_human_description (str | Unset): """ - created_at_ts: Union[Unset, int] = UNSET - created_by_id: Union[Unset, str] = UNSET - history: Union[Unset, list["AppCompositeStatus"]] = UNSET - metadata: Union[Unset, "AppCompositeStatusMetadata"] = UNSET - status: Union[Unset, AppStatus] = UNSET - status_human_description: Union[Unset, str] = UNSET + created_at_ts: int | Unset = UNSET + created_by_id: str | Unset = UNSET + history: list[AppCompositeStatus] | Unset = UNSET + metadata: AppCompositeStatusMetadata | Unset = UNSET + status: AppStatus | Unset = UNSET + status_human_description: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -39,18 +41,18 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - history: Union[Unset, list[dict[str, Any]]] = UNSET + history: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.history, Unset): history = [] for history_item_data in self.history: history_item = history_item_data.to_dict() history.append(history_item) - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() - status: Union[Unset, str] = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.value @@ -91,14 +93,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: history.append(history_item) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppCompositeStatusMetadata] + metadata: AppCompositeStatusMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: metadata = AppCompositeStatusMetadata.from_dict(_metadata) _status = d.pop("status", UNSET) - status: Union[Unset, AppStatus] + status: AppStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/nuon/models/app_composite_status_metadata.py b/nuon/models/app_composite_status_metadata.py index 1c73c829..ea2c10e3 100644 --- a/nuon/models/app_composite_status_metadata.py +++ b/nuon/models/app_composite_status_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_connected_github_vcs_config.py b/nuon/models/app_connected_github_vcs_config.py index 97f09815..e8225654 100644 --- a/nuon/models/app_connected_github_vcs_config.py +++ b/nuon/models/app_connected_github_vcs_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,34 +19,34 @@ class AppConnectedGithubVCSConfig: """ Attributes: - branch (Union[Unset, str]): - component_config_id (Union[Unset, str]): parent component - component_config_type (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - directory (Union[Unset, str]): - id (Union[Unset, str]): - repo (Union[Unset, str]): - repo_name (Union[Unset, str]): - repo_owner (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connection (Union[Unset, AppVCSConnection]): - vcs_connection_id (Union[Unset, str]): + branch (str | Unset): + component_config_id (str | Unset): parent component + component_config_type (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + directory (str | Unset): + id (str | Unset): + repo (str | Unset): + repo_name (str | Unset): + repo_owner (str | Unset): + updated_at (str | Unset): + vcs_connection (AppVCSConnection | Unset): + vcs_connection_id (str | Unset): """ - branch: Union[Unset, str] = UNSET - component_config_id: Union[Unset, str] = UNSET - component_config_type: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - directory: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - repo: Union[Unset, str] = UNSET - repo_name: Union[Unset, str] = UNSET - repo_owner: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection: Union[Unset, "AppVCSConnection"] = UNSET - vcs_connection_id: Union[Unset, str] = UNSET + branch: str | Unset = UNSET + component_config_id: str | Unset = UNSET + component_config_type: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + directory: str | Unset = UNSET + id: str | Unset = UNSET + repo: str | Unset = UNSET + repo_name: str | Unset = UNSET + repo_owner: str | Unset = UNSET + updated_at: str | Unset = UNSET + vcs_connection: AppVCSConnection | Unset = UNSET + vcs_connection_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -70,7 +72,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - vcs_connection: Union[Unset, dict[str, Any]] = UNSET + vcs_connection: dict[str, Any] | Unset = UNSET if not isinstance(self.vcs_connection, Unset): vcs_connection = self.vcs_connection.to_dict() @@ -136,7 +138,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _vcs_connection = d.pop("vcs_connection", UNSET) - vcs_connection: Union[Unset, AppVCSConnection] + vcs_connection: AppVCSConnection | Unset if isinstance(_vcs_connection, Unset): vcs_connection = UNSET else: diff --git a/nuon/models/app_docker_build_component_config.py b/nuon/models/app_docker_build_component_config.py index 21ad522b..b58a784a 100644 --- a/nuon/models/app_docker_build_component_config.py +++ b/nuon/models/app_docker_build_component_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,40 +21,40 @@ class AppDockerBuildComponentConfig: """ Attributes: - build_args (Union[Unset, list[str]]): - component_config_connection_id (Union[Unset, str]): value - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - dockerfile (Union[Unset, str]): - env_vars (Union[Unset, AppDockerBuildComponentConfigEnvVars]): - id (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - target (Union[Unset, str]): - updated_at (Union[Unset, str]): + build_args (list[str] | Unset): + component_config_connection_id (str | Unset): value + connected_github_vcs_config (AppConnectedGithubVCSConfig | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + dockerfile (str | Unset): + env_vars (AppDockerBuildComponentConfigEnvVars | Unset): + id (str | Unset): + public_git_vcs_config (AppPublicGitVCSConfig | Unset): + target (str | Unset): + updated_at (str | Unset): """ - build_args: Union[Unset, list[str]] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - dockerfile: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppDockerBuildComponentConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - target: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + build_args: list[str] | Unset = UNSET + component_config_connection_id: str | Unset = UNSET + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + dockerfile: str | Unset = UNSET + env_vars: AppDockerBuildComponentConfigEnvVars | Unset = UNSET + id: str | Unset = UNSET + public_git_vcs_config: AppPublicGitVCSConfig | Unset = UNSET + target: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - build_args: Union[Unset, list[str]] = UNSET + build_args: list[str] | Unset = UNSET if not isinstance(self.build_args, Unset): build_args = self.build_args component_config_connection_id = self.component_config_connection_id - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() @@ -62,13 +64,13 @@ def to_dict(self) -> dict[str, Any]: dockerfile = self.dockerfile - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() id = self.id - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.public_git_vcs_config, Unset): public_git_vcs_config = self.public_git_vcs_config.to_dict() @@ -116,7 +118,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: component_config_connection_id = d.pop("component_config_connection_id", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -129,7 +131,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dockerfile = d.pop("dockerfile", UNSET) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppDockerBuildComponentConfigEnvVars] + env_vars: AppDockerBuildComponentConfigEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: @@ -138,7 +140,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + public_git_vcs_config: AppPublicGitVCSConfig | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: diff --git a/nuon/models/app_docker_build_component_config_env_vars.py b/nuon/models/app_docker_build_component_config_env_vars.py index f38c7ac6..352131b8 100644 --- a/nuon/models/app_docker_build_component_config_env_vars.py +++ b/nuon/models/app_docker_build_component_config_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_drifted_object.py b/nuon/models/app_drifted_object.py index 980fe74e..8d55305b 100644 --- a/nuon/models/app_drifted_object.py +++ b/nuon/models/app_drifted_object.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,28 +15,28 @@ 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 (str | Unset): + component_build_id (str | Unset): + component_name (str | Unset): + install_component_id (str | Unset): + install_id (str | Unset): + install_sandbox_id (str | Unset): + install_workflow_id (str | Unset): + org_id (str | Unset): + target_id (str | Unset): + target_type (str | Unset): 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 + app_sandbox_config_id: str | Unset = UNSET + component_build_id: str | Unset = UNSET + component_name: str | Unset = UNSET + install_component_id: str | Unset = UNSET + install_id: str | Unset = UNSET + install_sandbox_id: str | Unset = UNSET + install_workflow_id: str | Unset = UNSET + org_id: str | Unset = UNSET + target_id: str | Unset = UNSET + target_type: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_external_image_component_config.py b/nuon/models/app_external_image_component_config.py index fd74a815..4d022b88 100644 --- a/nuon/models/app_external_image_component_config.py +++ b/nuon/models/app_external_image_component_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,28 +19,28 @@ class AppExternalImageComponentConfig: """ Attributes: - aws_ecr_image_config (Union[Unset, AppAWSECRImageConfig]): - component_config_connection_id (Union[Unset, str]): value - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - image_url (Union[Unset, str]): - tag (Union[Unset, str]): - updated_at (Union[Unset, str]): + aws_ecr_image_config (AppAWSECRImageConfig | Unset): + component_config_connection_id (str | Unset): value + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + image_url (str | Unset): + tag (str | Unset): + updated_at (str | Unset): """ - aws_ecr_image_config: Union[Unset, "AppAWSECRImageConfig"] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - image_url: Union[Unset, str] = UNSET - tag: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + aws_ecr_image_config: AppAWSECRImageConfig | Unset = UNSET + component_config_connection_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + image_url: str | Unset = UNSET + tag: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - aws_ecr_image_config: Union[Unset, dict[str, Any]] = UNSET + aws_ecr_image_config: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_ecr_image_config, Unset): aws_ecr_image_config = self.aws_ecr_image_config.to_dict() @@ -84,7 +86,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _aws_ecr_image_config = d.pop("aws_ecr_image_config", UNSET) - aws_ecr_image_config: Union[Unset, AppAWSECRImageConfig] + aws_ecr_image_config: AppAWSECRImageConfig | Unset if isinstance(_aws_ecr_image_config, Unset): aws_ecr_image_config = UNSET else: diff --git a/nuon/models/app_helm_chart.py b/nuon/models/app_helm_chart.py index ac081a0a..a862082a 100644 --- a/nuon/models/app_helm_chart.py +++ b/nuon/models/app_helm_chart.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,24 +19,24 @@ class AppHelmChart: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - helm_releases (Union[Unset, list['AppHelmRelease']]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + helm_releases (list[AppHelmRelease] | Unset): + id (str | Unset): + org_id (str | Unset): + owner_id (str | Unset): + owner_type (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - helm_releases: Union[Unset, list["AppHelmRelease"]] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + helm_releases: list[AppHelmRelease] | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,7 +44,7 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - helm_releases: Union[Unset, list[dict[str, Any]]] = UNSET + helm_releases: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.helm_releases, Unset): helm_releases = [] for helm_releases_item_data in self.helm_releases: diff --git a/nuon/models/app_helm_component_config.py b/nuon/models/app_helm_component_config.py index e348bea4..597954be 100644 --- a/nuon/models/app_helm_component_config.py +++ b/nuon/models/app_helm_component_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,36 +22,36 @@ class AppHelmComponentConfig: """ Attributes: - chart_name (Union[Unset, str]): Helm specific configurations - component_config_connection_id (Union[Unset, str]): parent reference - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - helm_config_json (Union[Unset, AppHelmConfig]): - id (Union[Unset, str]): - namespace (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - storage_driver (Union[Unset, str]): - take_ownership (Union[Unset, bool]): Newer config fields that we don't need a column for - updated_at (Union[Unset, str]): - values (Union[Unset, AppHelmComponentConfigValues]): - values_files (Union[Unset, list[str]]): + chart_name (str | Unset): Helm specific configurations + component_config_connection_id (str | Unset): parent reference + connected_github_vcs_config (AppConnectedGithubVCSConfig | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + helm_config_json (AppHelmConfig | Unset): + id (str | Unset): + namespace (str | Unset): + public_git_vcs_config (AppPublicGitVCSConfig | Unset): + storage_driver (str | Unset): + take_ownership (bool | Unset): Newer config fields that we don't need a column for + updated_at (str | Unset): + values (AppHelmComponentConfigValues | Unset): + values_files (list[str] | Unset): """ - chart_name: Union[Unset, str] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - helm_config_json: Union[Unset, "AppHelmConfig"] = UNSET - id: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - storage_driver: Union[Unset, str] = UNSET - take_ownership: Union[Unset, bool] = UNSET - updated_at: Union[Unset, str] = UNSET - values: Union[Unset, "AppHelmComponentConfigValues"] = UNSET - values_files: Union[Unset, list[str]] = UNSET + chart_name: str | Unset = UNSET + component_config_connection_id: str | Unset = UNSET + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + helm_config_json: AppHelmConfig | Unset = UNSET + id: str | Unset = UNSET + namespace: str | Unset = UNSET + public_git_vcs_config: AppPublicGitVCSConfig | Unset = UNSET + storage_driver: str | Unset = UNSET + take_ownership: bool | Unset = UNSET + updated_at: str | Unset = UNSET + values: AppHelmComponentConfigValues | Unset = UNSET + values_files: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -57,7 +59,7 @@ def to_dict(self) -> dict[str, Any]: component_config_connection_id = self.component_config_connection_id - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() @@ -65,7 +67,7 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - helm_config_json: Union[Unset, dict[str, Any]] = UNSET + helm_config_json: dict[str, Any] | Unset = UNSET if not isinstance(self.helm_config_json, Unset): helm_config_json = self.helm_config_json.to_dict() @@ -73,7 +75,7 @@ def to_dict(self) -> dict[str, Any]: namespace = self.namespace - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.public_git_vcs_config, Unset): public_git_vcs_config = self.public_git_vcs_config.to_dict() @@ -83,11 +85,11 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - values: Union[Unset, dict[str, Any]] = UNSET + values: dict[str, Any] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values.to_dict() - values_files: Union[Unset, list[str]] = UNSET + values_files: list[str] | Unset = UNSET if not isinstance(self.values_files, Unset): values_files = self.values_files @@ -138,7 +140,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: component_config_connection_id = d.pop("component_config_connection_id", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -149,7 +151,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _helm_config_json = d.pop("helm_config_json", UNSET) - helm_config_json: Union[Unset, AppHelmConfig] + helm_config_json: AppHelmConfig | Unset if isinstance(_helm_config_json, Unset): helm_config_json = UNSET else: @@ -160,7 +162,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: namespace = d.pop("namespace", UNSET) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + public_git_vcs_config: AppPublicGitVCSConfig | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: @@ -173,7 +175,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _values = d.pop("values", UNSET) - values: Union[Unset, AppHelmComponentConfigValues] + values: AppHelmComponentConfigValues | Unset if isinstance(_values, Unset): values = UNSET else: diff --git a/nuon/models/app_helm_component_config_values.py b/nuon/models/app_helm_component_config_values.py index 03bfdc78..f86cdd49 100644 --- a/nuon/models/app_helm_component_config_values.py +++ b/nuon/models/app_helm_component_config_values.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_helm_config.py b/nuon/models/app_helm_config.py index 3c804fc6..16b30aae 100644 --- a/nuon/models/app_helm_config.py +++ b/nuon/models/app_helm_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,20 +19,20 @@ class AppHelmConfig: """ Attributes: - chart_name (Union[Unset, str]): - namespace (Union[Unset, str]): - storage_driver (Union[Unset, str]): - take_ownership (Union[Unset, bool]): Newer fields that we don't need to store as columns in the database - values (Union[Unset, AppHelmConfigValues]): - values_files (Union[Unset, list[str]]): + chart_name (str | Unset): + namespace (str | Unset): + storage_driver (str | Unset): + take_ownership (bool | Unset): Newer fields that we don't need to store as columns in the database + values (AppHelmConfigValues | Unset): + values_files (list[str] | Unset): """ - chart_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, "AppHelmConfigValues"] = UNSET - values_files: Union[Unset, list[str]] = UNSET + chart_name: str | Unset = UNSET + namespace: str | Unset = UNSET + storage_driver: str | Unset = UNSET + take_ownership: bool | Unset = UNSET + values: AppHelmConfigValues | Unset = UNSET + values_files: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,11 +44,11 @@ def to_dict(self) -> dict[str, Any]: take_ownership = self.take_ownership - values: Union[Unset, dict[str, Any]] = UNSET + values: dict[str, Any] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values.to_dict() - values_files: Union[Unset, list[str]] = UNSET + values_files: list[str] | Unset = UNSET if not isinstance(self.values_files, Unset): values_files = self.values_files @@ -82,7 +84,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: take_ownership = d.pop("take_ownership", UNSET) _values = d.pop("values", UNSET) - values: Union[Unset, AppHelmConfigValues] + values: AppHelmConfigValues | Unset if isinstance(_values, Unset): values = UNSET else: diff --git a/nuon/models/app_helm_config_values.py b/nuon/models/app_helm_config_values.py index 6852c63b..c12a783d 100644 --- a/nuon/models/app_helm_config_values.py +++ b/nuon/models/app_helm_config_values.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_helm_release.py b/nuon/models/app_helm_release.py index 08d72543..9f51dcbe 100644 --- a/nuon/models/app_helm_release.py +++ b/nuon/models/app_helm_release.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,42 +20,41 @@ class AppHelmRelease: """ Attributes: - body (Union[Unset, str]): The rspb.Release body, as a base64-encoded string - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - helm_chart (Union[Unset, AppHelmChart]): - helm_chart_id (Union[Unset, str]): - key (Union[Unset, str]): - labels (Union[Unset, AppJSONMap]): - name (Union[Unset, str]): Release "labels" that can be used as filters in the storage.Query(labels - map[string]string) + body (str | Unset): The rspb.Release body, as a base64-encoded string + created_at (str | Unset): + created_by_id (str | Unset): + helm_chart (AppHelmChart | Unset): + helm_chart_id (str | Unset): + key (str | Unset): + labels (AppJSONMap | Unset): + name (str | Unset): Release "labels" that can be used as filters in the storage.Query(labels map[string]string) we implemented. Note that allowing Helm users to filter against new dimensions will require a new migration to be added, and the Create and/or update functions to be updated accordingly. - namespace (Union[Unset, str]): - org_id (Union[Unset, str]): - owner (Union[Unset, str]): - status (Union[Unset, str]): - type_ (Union[Unset, str]): See + namespace (str | Unset): + org_id (str | Unset): + owner (str | Unset): + status (str | Unset): + type_ (str | Unset): See https://github.com/helm/helm/blob/c9fe3d118caec699eb2565df9838673af379ce12/pkg/storage/driver/secrets.go#L231 - updated_at (Union[Unset, str]): - version (Union[Unset, int]): + updated_at (str | Unset): + version (int | Unset): """ - body: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - helm_chart: Union[Unset, "AppHelmChart"] = UNSET - helm_chart_id: Union[Unset, str] = UNSET - key: Union[Unset, str] = UNSET - labels: Union[Unset, "AppJSONMap"] = UNSET - name: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - version: Union[Unset, int] = UNSET + body: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + helm_chart: AppHelmChart | Unset = UNSET + helm_chart_id: str | Unset = UNSET + key: str | Unset = UNSET + labels: AppJSONMap | Unset = UNSET + name: str | Unset = UNSET + namespace: str | Unset = UNSET + org_id: str | Unset = UNSET + owner: str | Unset = UNSET + status: str | Unset = UNSET + type_: str | Unset = UNSET + updated_at: str | Unset = UNSET + version: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -63,7 +64,7 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - helm_chart: Union[Unset, dict[str, Any]] = UNSET + helm_chart: dict[str, Any] | Unset = UNSET if not isinstance(self.helm_chart, Unset): helm_chart = self.helm_chart.to_dict() @@ -71,7 +72,7 @@ def to_dict(self) -> dict[str, Any]: key = self.key - labels: Union[Unset, dict[str, Any]] = UNSET + labels: dict[str, Any] | Unset = UNSET if not isinstance(self.labels, Unset): labels = self.labels.to_dict() @@ -140,7 +141,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _helm_chart = d.pop("helmChart", UNSET) - helm_chart: Union[Unset, AppHelmChart] + helm_chart: AppHelmChart | Unset if isinstance(_helm_chart, Unset): helm_chart = UNSET else: @@ -151,7 +152,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: key = d.pop("key", UNSET) _labels = d.pop("labels", UNSET) - labels: Union[Unset, AppJSONMap] + labels: AppJSONMap | Unset if isinstance(_labels, Unset): labels = UNSET else: diff --git a/nuon/models/app_install.py b/nuon/models/app_install.py index 99685c8a..22378692 100644 --- a/nuon/models/app_install.py +++ b/nuon/models/app_install.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -34,82 +36,82 @@ class AppInstall: """ Attributes: - app_config_id (Union[Unset, str]): - app_id (Union[Unset, str]): - app_runner_config (Union[Unset, AppAppRunnerConfig]): - app_sandbox_config (Union[Unset, AppAppSandboxConfig]): - aws_account (Union[Unset, AppAWSAccount]): - azure_account (Union[Unset, AppAzureAccount]): - cloud_platform (Union[Unset, str]): - component_statuses (Union[Unset, AppInstallComponentStatuses]): - composite_component_status (Union[Unset, str]): - 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']]): - install_config (Union[Unset, AppInstallConfig]): - install_events (Union[Unset, list['AppInstallEvent']]): - install_inputs (Union[Unset, list['AppInstallInputs']]): - install_number (Union[Unset, int]): - install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): - 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]): - runner_status_description (Union[Unset, str]): - runner_type (Union[Unset, str]): - sandbox (Union[Unset, AppInstallSandbox]): - sandbox_status (Union[Unset, str]): - sandbox_status_description (Union[Unset, str]): - status (Union[Unset, str]): TODO(jm): deprecate these fields once the terraform provider has been updated - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - workflows (Union[Unset, list['AppWorkflow']]): + app_config_id (str | Unset): + app_id (str | Unset): + app_runner_config (AppAppRunnerConfig | Unset): + app_sandbox_config (AppAppSandboxConfig | Unset): + aws_account (AppAWSAccount | Unset): + azure_account (AppAzureAccount | Unset): + cloud_platform (str | Unset): + component_statuses (AppInstallComponentStatuses | Unset): + composite_component_status (str | Unset): + composite_component_status_description (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + drifted_objects (list[AppDriftedObject] | Unset): + id (str | Unset): + install_action_workflows (list[AppInstallActionWorkflow] | Unset): + install_components (list[AppInstallComponent] | Unset): + install_config (AppInstallConfig | Unset): + install_events (list[AppInstallEvent] | Unset): + install_inputs (list[AppInstallInputs] | Unset): + install_number (int | Unset): + install_sandbox_runs (list[AppInstallSandboxRun] | Unset): + install_stack (AppInstallStack | Unset): + install_states (list[AppInstallState] | Unset): + links (AppInstallLinks | Unset): + metadata (AppInstallMetadata | Unset): + name (str | Unset): + runner_id (str | Unset): + runner_status (str | Unset): + runner_status_description (str | Unset): + runner_type (str | Unset): + sandbox (AppInstallSandbox | Unset): + sandbox_status (str | Unset): + sandbox_status_description (str | Unset): + status (str | Unset): TODO(jm): deprecate these fields once the terraform provider has been updated + status_description (str | Unset): + updated_at (str | Unset): + workflows (list[AppWorkflow] | Unset): """ - app_config_id: Union[Unset, str] = UNSET - app_id: Union[Unset, str] = UNSET - app_runner_config: Union[Unset, "AppAppRunnerConfig"] = UNSET - app_sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET - aws_account: Union[Unset, "AppAWSAccount"] = UNSET - azure_account: Union[Unset, "AppAzureAccount"] = UNSET - cloud_platform: Union[Unset, str] = UNSET - component_statuses: Union[Unset, "AppInstallComponentStatuses"] = UNSET - composite_component_status: Union[Unset, str] = UNSET - 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 - install_config: Union[Unset, "AppInstallConfig"] = UNSET - install_events: Union[Unset, list["AppInstallEvent"]] = UNSET - install_inputs: Union[Unset, list["AppInstallInputs"]] = UNSET - install_number: Union[Unset, int] = UNSET - install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET - 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 - runner_status_description: Union[Unset, str] = UNSET - runner_type: Union[Unset, str] = UNSET - sandbox: Union[Unset, "AppInstallSandbox"] = UNSET - sandbox_status: Union[Unset, str] = UNSET - sandbox_status_description: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workflows: Union[Unset, list["AppWorkflow"]] = UNSET + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + app_runner_config: AppAppRunnerConfig | Unset = UNSET + app_sandbox_config: AppAppSandboxConfig | Unset = UNSET + aws_account: AppAWSAccount | Unset = UNSET + azure_account: AppAzureAccount | Unset = UNSET + cloud_platform: str | Unset = UNSET + component_statuses: AppInstallComponentStatuses | Unset = UNSET + composite_component_status: str | Unset = UNSET + composite_component_status_description: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + drifted_objects: list[AppDriftedObject] | Unset = UNSET + id: str | Unset = UNSET + install_action_workflows: list[AppInstallActionWorkflow] | Unset = UNSET + install_components: list[AppInstallComponent] | Unset = UNSET + install_config: AppInstallConfig | Unset = UNSET + install_events: list[AppInstallEvent] | Unset = UNSET + install_inputs: list[AppInstallInputs] | Unset = UNSET + install_number: int | Unset = UNSET + install_sandbox_runs: list[AppInstallSandboxRun] | Unset = UNSET + install_stack: AppInstallStack | Unset = UNSET + install_states: list[AppInstallState] | Unset = UNSET + links: AppInstallLinks | Unset = UNSET + metadata: AppInstallMetadata | Unset = UNSET + name: str | Unset = UNSET + runner_id: str | Unset = UNSET + runner_status: str | Unset = UNSET + runner_status_description: str | Unset = UNSET + runner_type: str | Unset = UNSET + sandbox: AppInstallSandbox | Unset = UNSET + sandbox_status: str | Unset = UNSET + sandbox_status_description: str | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + updated_at: str | Unset = UNSET + workflows: list[AppWorkflow] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -117,25 +119,25 @@ def to_dict(self) -> dict[str, Any]: app_id = self.app_id - app_runner_config: Union[Unset, dict[str, Any]] = UNSET + app_runner_config: dict[str, Any] | Unset = UNSET if not isinstance(self.app_runner_config, Unset): app_runner_config = self.app_runner_config.to_dict() - app_sandbox_config: Union[Unset, dict[str, Any]] = UNSET + app_sandbox_config: dict[str, Any] | Unset = UNSET if not isinstance(self.app_sandbox_config, Unset): app_sandbox_config = self.app_sandbox_config.to_dict() - aws_account: Union[Unset, dict[str, Any]] = UNSET + aws_account: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_account, Unset): aws_account = self.aws_account.to_dict() - azure_account: Union[Unset, dict[str, Any]] = UNSET + azure_account: dict[str, Any] | Unset = UNSET if not isinstance(self.azure_account, Unset): azure_account = self.azure_account.to_dict() cloud_platform = self.cloud_platform - component_statuses: Union[Unset, dict[str, Any]] = UNSET + component_statuses: dict[str, Any] | Unset = UNSET if not isinstance(self.component_statuses, Unset): component_statuses = self.component_statuses.to_dict() @@ -147,7 +149,7 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - drifted_objects: Union[Unset, list[dict[str, Any]]] = UNSET + drifted_objects: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.drifted_objects, Unset): drifted_objects = [] for drifted_objects_item_data in self.drifted_objects: @@ -156,32 +158,32 @@ def to_dict(self) -> dict[str, Any]: id = self.id - install_action_workflows: Union[Unset, list[dict[str, Any]]] = UNSET + install_action_workflows: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_action_workflows, Unset): install_action_workflows = [] for install_action_workflows_item_data in self.install_action_workflows: install_action_workflows_item = install_action_workflows_item_data.to_dict() install_action_workflows.append(install_action_workflows_item) - install_components: Union[Unset, list[dict[str, Any]]] = UNSET + install_components: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_components, Unset): install_components = [] for install_components_item_data in self.install_components: install_components_item = install_components_item_data.to_dict() install_components.append(install_components_item) - install_config: Union[Unset, dict[str, Any]] = UNSET + install_config: dict[str, Any] | Unset = UNSET if not isinstance(self.install_config, Unset): install_config = self.install_config.to_dict() - install_events: Union[Unset, list[dict[str, Any]]] = UNSET + install_events: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_events, Unset): install_events = [] for install_events_item_data in self.install_events: install_events_item = install_events_item_data.to_dict() install_events.append(install_events_item) - install_inputs: Union[Unset, list[dict[str, Any]]] = UNSET + install_inputs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_inputs, Unset): install_inputs = [] for install_inputs_item_data in self.install_inputs: @@ -190,29 +192,29 @@ def to_dict(self) -> dict[str, Any]: install_number = self.install_number - install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET + install_sandbox_runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_sandbox_runs, Unset): install_sandbox_runs = [] for install_sandbox_runs_item_data in self.install_sandbox_runs: install_sandbox_runs_item = install_sandbox_runs_item_data.to_dict() install_sandbox_runs.append(install_sandbox_runs_item) - install_stack: Union[Unset, dict[str, Any]] = UNSET + install_stack: dict[str, Any] | Unset = UNSET if not isinstance(self.install_stack, Unset): install_stack = self.install_stack.to_dict() - install_states: Union[Unset, list[dict[str, Any]]] = UNSET + install_states: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_states, Unset): install_states = [] for install_states_item_data in self.install_states: install_states_item = install_states_item_data.to_dict() install_states.append(install_states_item) - links: Union[Unset, dict[str, Any]] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -226,7 +228,7 @@ def to_dict(self) -> dict[str, Any]: runner_type = self.runner_type - sandbox: Union[Unset, dict[str, Any]] = UNSET + sandbox: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox, Unset): sandbox = self.sandbox.to_dict() @@ -240,7 +242,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - workflows: Union[Unset, list[dict[str, Any]]] = UNSET + workflows: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.workflows, Unset): workflows = [] for workflows_item_data in self.workflows: @@ -354,28 +356,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_id = d.pop("app_id", UNSET) _app_runner_config = d.pop("app_runner_config", UNSET) - app_runner_config: Union[Unset, AppAppRunnerConfig] + app_runner_config: AppAppRunnerConfig | Unset if isinstance(_app_runner_config, Unset): app_runner_config = UNSET else: app_runner_config = AppAppRunnerConfig.from_dict(_app_runner_config) _app_sandbox_config = d.pop("app_sandbox_config", UNSET) - app_sandbox_config: Union[Unset, AppAppSandboxConfig] + app_sandbox_config: AppAppSandboxConfig | Unset if isinstance(_app_sandbox_config, Unset): app_sandbox_config = UNSET else: app_sandbox_config = AppAppSandboxConfig.from_dict(_app_sandbox_config) _aws_account = d.pop("aws_account", UNSET) - aws_account: Union[Unset, AppAWSAccount] + aws_account: AppAWSAccount | Unset if isinstance(_aws_account, Unset): aws_account = UNSET else: aws_account = AppAWSAccount.from_dict(_aws_account) _azure_account = d.pop("azure_account", UNSET) - azure_account: Union[Unset, AppAzureAccount] + azure_account: AppAzureAccount | Unset if isinstance(_azure_account, Unset): azure_account = UNSET else: @@ -384,7 +386,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: cloud_platform = d.pop("cloud_platform", UNSET) _component_statuses = d.pop("component_statuses", UNSET) - component_statuses: Union[Unset, AppInstallComponentStatuses] + component_statuses: AppInstallComponentStatuses | Unset if isinstance(_component_statuses, Unset): component_statuses = UNSET else: @@ -422,7 +424,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_components.append(install_components_item) _install_config = d.pop("install_config", UNSET) - install_config: Union[Unset, AppInstallConfig] + install_config: AppInstallConfig | Unset if isinstance(_install_config, Unset): install_config = UNSET else: @@ -452,7 +454,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_sandbox_runs.append(install_sandbox_runs_item) _install_stack = d.pop("install_stack", UNSET) - install_stack: Union[Unset, AppInstallStack] + install_stack: AppInstallStack | Unset if isinstance(_install_stack, Unset): install_stack = UNSET else: @@ -466,14 +468,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_states.append(install_states_item) _links = d.pop("links", UNSET) - links: Union[Unset, AppInstallLinks] + links: AppInstallLinks | Unset if isinstance(_links, Unset): links = UNSET else: links = AppInstallLinks.from_dict(_links) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppInstallMetadata] + metadata: AppInstallMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: @@ -490,7 +492,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_type = d.pop("runner_type", UNSET) _sandbox = d.pop("sandbox", UNSET) - sandbox: Union[Unset, AppInstallSandbox] + sandbox: AppInstallSandbox | Unset if isinstance(_sandbox, Unset): sandbox = UNSET else: diff --git a/nuon/models/app_install_action_workflow.py b/nuon/models/app_install_action_workflow.py index 29244516..28fd13c2 100644 --- a/nuon/models/app_install_action_workflow.py +++ b/nuon/models/app_install_action_workflow.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,30 +20,30 @@ class AppInstallActionWorkflow: """ Attributes: - action_workflow (Union[Unset, AppActionWorkflow]): - action_workflow_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - runs (Union[Unset, list['AppInstallActionWorkflowRun']]): - status (Union[Unset, str]): after query fields filled in after querying - updated_at (Union[Unset, str]): + action_workflow (AppActionWorkflow | Unset): + action_workflow_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + runs (list[AppInstallActionWorkflowRun] | Unset): + status (str | Unset): after query fields filled in after querying + updated_at (str | Unset): """ - action_workflow: Union[Unset, "AppActionWorkflow"] = UNSET - action_workflow_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET - status: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + action_workflow: AppActionWorkflow | Unset = UNSET + action_workflow_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + runs: list[AppInstallActionWorkflowRun] | Unset = UNSET + status: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - action_workflow: Union[Unset, dict[str, Any]] = UNSET + action_workflow: dict[str, Any] | Unset = UNSET if not isinstance(self.action_workflow, Unset): action_workflow = self.action_workflow.to_dict() @@ -55,7 +57,7 @@ def to_dict(self) -> dict[str, Any]: install_id = self.install_id - runs: Union[Unset, list[dict[str, Any]]] = UNSET + runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.runs, Unset): runs = [] for runs_item_data in self.runs: @@ -97,7 +99,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _action_workflow = d.pop("action_workflow", UNSET) - action_workflow: Union[Unset, AppActionWorkflow] + action_workflow: AppActionWorkflow | Unset if isinstance(_action_workflow, Unset): action_workflow = UNSET else: diff --git a/nuon/models/app_install_action_workflow_run.py b/nuon/models/app_install_action_workflow_run.py index 34951381..071b8c65 100644 --- a/nuon/models/app_install_action_workflow_run.py +++ b/nuon/models/app_install_action_workflow_run.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,70 +29,70 @@ class AppInstallActionWorkflowRun: """ Attributes: - action_workflow_config_id (Union[Unset, str]): - config (Union[Unset, AppActionWorkflowConfig]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - execution_time (Union[Unset, int]): after query - id (Union[Unset, str]): - install_action_workflow (Union[Unset, AppInstallActionWorkflow]): - install_action_workflow_id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_workflow_id (Union[Unset, str]): - log_stream (Union[Unset, AppLogStream]): - outputs (Union[Unset, AppInstallActionWorkflowRunOutputs]): - run_env_vars (Union[Unset, AppInstallActionWorkflowRunRunEnvVars]): - runner_job (Union[Unset, AppRunnerJob]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - steps (Union[Unset, list['AppInstallActionWorkflowRunStep']]): - trigger_type (Union[Unset, AppActionWorkflowTriggerType]): - triggered_by_id (Union[Unset, str]): - triggered_by_type (Union[Unset, str]): - updated_at (Union[Unset, str]): - workflow (Union[Unset, AppWorkflow]): - workflow_id (Union[Unset, str]): + action_workflow_config_id (str | Unset): + config (AppActionWorkflowConfig | Unset): + created_at (str | Unset): + created_by (AppAccount | Unset): + created_by_id (str | Unset): + execution_time (int | Unset): after query + id (str | Unset): + install_action_workflow (AppInstallActionWorkflow | Unset): + install_action_workflow_id (str | Unset): + install_id (str | Unset): + install_workflow_id (str | Unset): + log_stream (AppLogStream | Unset): + outputs (AppInstallActionWorkflowRunOutputs | Unset): + run_env_vars (AppInstallActionWorkflowRunRunEnvVars | Unset): + runner_job (AppRunnerJob | Unset): + status (str | Unset): + status_description (str | Unset): + status_v2 (AppCompositeStatus | Unset): + steps (list[AppInstallActionWorkflowRunStep] | Unset): + trigger_type (AppActionWorkflowTriggerType | Unset): + triggered_by_id (str | Unset): + triggered_by_type (str | Unset): + updated_at (str | Unset): + workflow (AppWorkflow | Unset): + workflow_id (str | Unset): """ - action_workflow_config_id: Union[Unset, str] = UNSET - config: Union[Unset, "AppActionWorkflowConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_time: Union[Unset, int] = UNSET - id: Union[Unset, str] = UNSET - install_action_workflow: Union[Unset, "AppInstallActionWorkflow"] = UNSET - install_action_workflow_id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_workflow_id: Union[Unset, str] = UNSET - log_stream: Union[Unset, "AppLogStream"] = UNSET - outputs: Union[Unset, "AppInstallActionWorkflowRunOutputs"] = UNSET - run_env_vars: Union[Unset, "AppInstallActionWorkflowRunRunEnvVars"] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - steps: Union[Unset, list["AppInstallActionWorkflowRunStep"]] = UNSET - trigger_type: Union[Unset, AppActionWorkflowTriggerType] = UNSET - triggered_by_id: Union[Unset, str] = UNSET - triggered_by_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow: Union[Unset, "AppWorkflow"] = UNSET - workflow_id: Union[Unset, str] = UNSET + action_workflow_config_id: str | Unset = UNSET + config: AppActionWorkflowConfig | Unset = UNSET + created_at: str | Unset = UNSET + created_by: AppAccount | Unset = UNSET + created_by_id: str | Unset = UNSET + execution_time: int | Unset = UNSET + id: str | Unset = UNSET + install_action_workflow: AppInstallActionWorkflow | Unset = UNSET + install_action_workflow_id: str | Unset = UNSET + install_id: str | Unset = UNSET + install_workflow_id: str | Unset = UNSET + log_stream: AppLogStream | Unset = UNSET + outputs: AppInstallActionWorkflowRunOutputs | Unset = UNSET + run_env_vars: AppInstallActionWorkflowRunRunEnvVars | Unset = UNSET + runner_job: AppRunnerJob | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + status_v2: AppCompositeStatus | Unset = UNSET + steps: list[AppInstallActionWorkflowRunStep] | Unset = UNSET + trigger_type: AppActionWorkflowTriggerType | Unset = UNSET + triggered_by_id: str | Unset = UNSET + triggered_by_type: str | Unset = UNSET + updated_at: str | Unset = UNSET + workflow: AppWorkflow | Unset = UNSET + workflow_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: action_workflow_config_id = self.action_workflow_config_id - config: Union[Unset, dict[str, Any]] = UNSET + config: dict[str, Any] | Unset = UNSET if not isinstance(self.config, Unset): config = self.config.to_dict() created_at = self.created_at - created_by: Union[Unset, dict[str, Any]] = UNSET + created_by: dict[str, Any] | Unset = UNSET if not isinstance(self.created_by, Unset): created_by = self.created_by.to_dict() @@ -100,7 +102,7 @@ def to_dict(self) -> dict[str, Any]: id = self.id - install_action_workflow: Union[Unset, dict[str, Any]] = UNSET + install_action_workflow: dict[str, Any] | Unset = UNSET if not isinstance(self.install_action_workflow, Unset): install_action_workflow = self.install_action_workflow.to_dict() @@ -110,19 +112,19 @@ def to_dict(self) -> dict[str, Any]: install_workflow_id = self.install_workflow_id - log_stream: Union[Unset, dict[str, Any]] = UNSET + log_stream: dict[str, Any] | Unset = UNSET if not isinstance(self.log_stream, Unset): log_stream = self.log_stream.to_dict() - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() - run_env_vars: Union[Unset, dict[str, Any]] = UNSET + run_env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.run_env_vars, Unset): run_env_vars = self.run_env_vars.to_dict() - runner_job: Union[Unset, dict[str, Any]] = UNSET + runner_job: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_job, Unset): runner_job = self.runner_job.to_dict() @@ -130,18 +132,18 @@ def to_dict(self) -> dict[str, Any]: status_description = self.status_description - status_v2: Union[Unset, dict[str, Any]] = UNSET + status_v2: dict[str, Any] | Unset = UNSET if not isinstance(self.status_v2, Unset): status_v2 = self.status_v2.to_dict() - steps: Union[Unset, list[dict[str, Any]]] = UNSET + steps: list[dict[str, Any]] | Unset = 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) - trigger_type: Union[Unset, str] = UNSET + trigger_type: str | Unset = UNSET if not isinstance(self.trigger_type, Unset): trigger_type = self.trigger_type.value @@ -151,7 +153,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - workflow: Union[Unset, dict[str, Any]] = UNSET + workflow: dict[str, Any] | Unset = UNSET if not isinstance(self.workflow, Unset): workflow = self.workflow.to_dict() @@ -230,7 +232,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) _config = d.pop("config", UNSET) - config: Union[Unset, AppActionWorkflowConfig] + config: AppActionWorkflowConfig | Unset if isinstance(_config, Unset): config = UNSET else: @@ -239,7 +241,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at = d.pop("created_at", UNSET) _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] + created_by: AppAccount | Unset if isinstance(_created_by, Unset): created_by = UNSET else: @@ -252,7 +254,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _install_action_workflow = d.pop("install_action_workflow", UNSET) - install_action_workflow: Union[Unset, AppInstallActionWorkflow] + install_action_workflow: AppInstallActionWorkflow | Unset if isinstance(_install_action_workflow, Unset): install_action_workflow = UNSET else: @@ -265,28 +267,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_workflow_id = d.pop("install_workflow_id", UNSET) _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] + log_stream: AppLogStream | Unset if isinstance(_log_stream, Unset): log_stream = UNSET else: log_stream = AppLogStream.from_dict(_log_stream) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppInstallActionWorkflowRunOutputs] + outputs: AppInstallActionWorkflowRunOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: outputs = AppInstallActionWorkflowRunOutputs.from_dict(_outputs) _run_env_vars = d.pop("run_env_vars", UNSET) - run_env_vars: Union[Unset, AppInstallActionWorkflowRunRunEnvVars] + run_env_vars: AppInstallActionWorkflowRunRunEnvVars | Unset if isinstance(_run_env_vars, Unset): run_env_vars = UNSET else: run_env_vars = AppInstallActionWorkflowRunRunEnvVars.from_dict(_run_env_vars) _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] + runner_job: AppRunnerJob | Unset if isinstance(_runner_job, Unset): runner_job = UNSET else: @@ -297,7 +299,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_description = d.pop("status_description", UNSET) _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] + status_v2: AppCompositeStatus | Unset if isinstance(_status_v2, Unset): status_v2 = UNSET else: @@ -311,7 +313,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: steps.append(steps_item) _trigger_type = d.pop("trigger_type", UNSET) - trigger_type: Union[Unset, AppActionWorkflowTriggerType] + trigger_type: AppActionWorkflowTriggerType | Unset if isinstance(_trigger_type, Unset): trigger_type = UNSET else: @@ -324,7 +326,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _workflow = d.pop("workflow", UNSET) - workflow: Union[Unset, AppWorkflow] + workflow: AppWorkflow | Unset if isinstance(_workflow, Unset): workflow = UNSET else: diff --git a/nuon/models/app_install_action_workflow_run_outputs.py b/nuon/models/app_install_action_workflow_run_outputs.py index f43cd7eb..b2e1f9c4 100644 --- a/nuon/models/app_install_action_workflow_run_outputs.py +++ b/nuon/models/app_install_action_workflow_run_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_action_workflow_run_run_env_vars.py b/nuon/models/app_install_action_workflow_run_run_env_vars.py index d901645e..c7ee98c0 100644 --- a/nuon/models/app_install_action_workflow_run_run_env_vars.py +++ b/nuon/models/app_install_action_workflow_run_run_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_action_workflow_run_step.py b/nuon/models/app_install_action_workflow_run_step.py index dce05586..e71365b9 100644 --- a/nuon/models/app_install_action_workflow_run_step.py +++ b/nuon/models/app_install_action_workflow_run_step.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,24 +16,24 @@ class AppInstallActionWorkflowRunStep: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - execution_duration (Union[Unset, int]): - id (Union[Unset, str]): - install_action_workflow_run_id (Union[Unset, str]): - status (Union[Unset, AppInstallActionWorkflowRunStepStatus]): - step_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + execution_duration (int | Unset): + id (str | Unset): + install_action_workflow_run_id (str | Unset): + status (AppInstallActionWorkflowRunStepStatus | Unset): + step_id (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_duration: Union[Unset, int] = UNSET - id: Union[Unset, str] = UNSET - install_action_workflow_run_id: Union[Unset, str] = UNSET - status: Union[Unset, AppInstallActionWorkflowRunStepStatus] = UNSET - step_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + execution_duration: int | Unset = UNSET + id: str | Unset = UNSET + install_action_workflow_run_id: str | Unset = UNSET + status: AppInstallActionWorkflowRunStepStatus | Unset = UNSET + step_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -45,7 +47,7 @@ def to_dict(self) -> dict[str, Any]: install_action_workflow_run_id = self.install_action_workflow_run_id - status: Union[Unset, str] = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.value @@ -89,7 +91,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_action_workflow_run_id = d.pop("install_action_workflow_run_id", UNSET) _status = d.pop("status", UNSET) - status: Union[Unset, AppInstallActionWorkflowRunStepStatus] + status: AppInstallActionWorkflowRunStepStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/nuon/models/app_install_audit_log.py b/nuon/models/app_install_audit_log.py index ebeacd34..e307b08e 100644 --- a/nuon/models/app_install_audit_log.py +++ b/nuon/models/app_install_audit_log.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,16 +15,16 @@ class AppInstallAuditLog: """ Attributes: - install_id (Union[Unset, str]): - log_line (Union[Unset, str]): - time_stamp (Union[Unset, str]): - type_ (Union[Unset, str]): + install_id (str | Unset): + log_line (str | Unset): + time_stamp (str | Unset): + type_ (str | Unset): """ - install_id: Union[Unset, str] = UNSET - log_line: Union[Unset, str] = UNSET - time_stamp: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET + install_id: str | Unset = UNSET + log_line: str | Unset = UNSET + time_stamp: str | Unset = UNSET + type_: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_install_component.py b/nuon/models/app_install_component.py index 786a6439..eef202ec 100644 --- a/nuon/models/app_install_component.py +++ b/nuon/models/app_install_component.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,42 +25,42 @@ class AppInstallComponent: """ Attributes: - component (Union[Unset, AppComponent]): - 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']]): - install_id (Union[Unset, str]): - links (Union[Unset, AppInstallComponentLinks]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - terraform_workspace (Union[Unset, AppTerraformWorkspace]): - updated_at (Union[Unset, str]): + component (AppComponent | Unset): + component_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + drifted_object (AppDriftedObject | Unset): + helm_chart (AppHelmChart | Unset): + id (str | Unset): + install_deploys (list[AppInstallDeploy] | Unset): + install_id (str | Unset): + links (AppInstallComponentLinks | Unset): + status (str | Unset): + status_description (str | Unset): + status_v2 (AppCompositeStatus | Unset): + terraform_workspace (AppTerraformWorkspace | Unset): + updated_at (str | Unset): """ - component: Union[Unset, "AppComponent"] = UNSET - 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 - install_id: Union[Unset, str] = UNSET - links: Union[Unset, "AppInstallComponentLinks"] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET - updated_at: Union[Unset, str] = UNSET + component: AppComponent | Unset = UNSET + component_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + drifted_object: AppDriftedObject | Unset = UNSET + helm_chart: AppHelmChart | Unset = UNSET + id: str | Unset = UNSET + install_deploys: list[AppInstallDeploy] | Unset = UNSET + install_id: str | Unset = UNSET + links: AppInstallComponentLinks | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + status_v2: AppCompositeStatus | Unset = UNSET + terraform_workspace: AppTerraformWorkspace | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - component: Union[Unset, dict[str, Any]] = UNSET + component: dict[str, Any] | Unset = UNSET if not isinstance(self.component, Unset): component = self.component.to_dict() @@ -68,17 +70,17 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - drifted_object: Union[Unset, dict[str, Any]] = UNSET + drifted_object: dict[str, Any] | Unset = UNSET if not isinstance(self.drifted_object, Unset): drifted_object = self.drifted_object.to_dict() - helm_chart: Union[Unset, dict[str, Any]] = UNSET + helm_chart: dict[str, Any] | Unset = UNSET if not isinstance(self.helm_chart, Unset): helm_chart = self.helm_chart.to_dict() id = self.id - install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET + install_deploys: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_deploys, Unset): install_deploys = [] for install_deploys_item_data in self.install_deploys: @@ -87,7 +89,7 @@ def to_dict(self) -> dict[str, Any]: install_id = self.install_id - links: Union[Unset, dict[str, Any]] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() @@ -95,11 +97,11 @@ def to_dict(self) -> dict[str, Any]: status_description = self.status_description - status_v2: Union[Unset, dict[str, Any]] = UNSET + status_v2: dict[str, Any] | Unset = UNSET if not isinstance(self.status_v2, Unset): status_v2 = self.status_v2.to_dict() - terraform_workspace: Union[Unset, dict[str, Any]] = UNSET + terraform_workspace: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform_workspace, Unset): terraform_workspace = self.terraform_workspace.to_dict() @@ -153,7 +155,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _component = d.pop("component", UNSET) - component: Union[Unset, AppComponent] + component: AppComponent | Unset if isinstance(_component, Unset): component = UNSET else: @@ -166,14 +168,14 @@ 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] + drifted_object: AppDriftedObject | Unset 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] + helm_chart: AppHelmChart | Unset if isinstance(_helm_chart, Unset): helm_chart = UNSET else: @@ -191,7 +193,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_id = d.pop("install_id", UNSET) _links = d.pop("links", UNSET) - links: Union[Unset, AppInstallComponentLinks] + links: AppInstallComponentLinks | Unset if isinstance(_links, Unset): links = UNSET else: @@ -202,14 +204,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_description = d.pop("status_description", UNSET) _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] + status_v2: AppCompositeStatus | Unset if isinstance(_status_v2, Unset): status_v2 = UNSET else: status_v2 = AppCompositeStatus.from_dict(_status_v2) _terraform_workspace = d.pop("terraform_workspace", UNSET) - terraform_workspace: Union[Unset, AppTerraformWorkspace] + terraform_workspace: AppTerraformWorkspace | Unset if isinstance(_terraform_workspace, Unset): terraform_workspace = UNSET else: diff --git a/nuon/models/app_install_component_links.py b/nuon/models/app_install_component_links.py index f581acfb..9792cbdf 100644 --- a/nuon/models/app_install_component_links.py +++ b/nuon/models/app_install_component_links.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_component_statuses.py b/nuon/models/app_install_component_statuses.py index 15e94f1b..caa051d3 100644 --- a/nuon/models/app_install_component_statuses.py +++ b/nuon/models/app_install_component_statuses.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_component_summary.py b/nuon/models/app_install_component_summary.py index ba10fa89..a2b70fa8 100644 --- a/nuon/models/app_install_component_summary.py +++ b/nuon/models/app_install_component_summary.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,38 +22,38 @@ class AppInstallComponentSummary: """ Attributes: - build_status (Union[Unset, AppComponentBuildStatus]): - build_status_description (Union[Unset, str]): - component_config (Union[Unset, AppComponentConfigConnection]): - component_id (Union[Unset, str]): - component_name (Union[Unset, str]): - 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]): + build_status (AppComponentBuildStatus | Unset): + build_status_description (str | Unset): + component_config (AppComponentConfigConnection | Unset): + component_id (str | Unset): + component_name (str | Unset): + dependencies (list[AppComponent] | Unset): + deploy_status (AppInstallDeployStatus | Unset): + deploy_status_description (str | Unset): + drifted_status (bool | Unset): + id (str | Unset): """ - build_status: Union[Unset, AppComponentBuildStatus] = UNSET - build_status_description: Union[Unset, str] = UNSET - component_config: Union[Unset, "AppComponentConfigConnection"] = UNSET - component_id: Union[Unset, str] = UNSET - component_name: Union[Unset, str] = UNSET - 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 + build_status: AppComponentBuildStatus | Unset = UNSET + build_status_description: str | Unset = UNSET + component_config: AppComponentConfigConnection | Unset = UNSET + component_id: str | Unset = UNSET + component_name: str | Unset = UNSET + dependencies: list[AppComponent] | Unset = UNSET + deploy_status: AppInstallDeployStatus | Unset = UNSET + deploy_status_description: str | Unset = UNSET + drifted_status: bool | Unset = UNSET + id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - build_status: Union[Unset, str] = UNSET + build_status: str | Unset = UNSET if not isinstance(self.build_status, Unset): build_status = self.build_status.value build_status_description = self.build_status_description - component_config: Union[Unset, dict[str, Any]] = UNSET + component_config: dict[str, Any] | Unset = UNSET if not isinstance(self.component_config, Unset): component_config = self.component_config.to_dict() @@ -59,14 +61,14 @@ def to_dict(self) -> dict[str, Any]: component_name = self.component_name - dependencies: Union[Unset, list[dict[str, Any]]] = UNSET + dependencies: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = [] for dependencies_item_data in self.dependencies: dependencies_item = dependencies_item_data.to_dict() dependencies.append(dependencies_item) - deploy_status: Union[Unset, str] = UNSET + deploy_status: str | Unset = UNSET if not isinstance(self.deploy_status, Unset): deploy_status = self.deploy_status.value @@ -109,7 +111,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _build_status = d.pop("build_status", UNSET) - build_status: Union[Unset, AppComponentBuildStatus] + build_status: AppComponentBuildStatus | Unset if isinstance(_build_status, Unset): build_status = UNSET else: @@ -118,7 +120,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: build_status_description = d.pop("build_status_description", UNSET) _component_config = d.pop("component_config", UNSET) - component_config: Union[Unset, AppComponentConfigConnection] + component_config: AppComponentConfigConnection | Unset if isinstance(_component_config, Unset): component_config = UNSET else: @@ -136,7 +138,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dependencies.append(dependencies_item) _deploy_status = d.pop("deploy_status", UNSET) - deploy_status: Union[Unset, AppInstallDeployStatus] + deploy_status: AppInstallDeployStatus | Unset if isinstance(_deploy_status, Unset): deploy_status = UNSET else: diff --git a/nuon/models/app_install_config.py b/nuon/models/app_install_config.py index 5b804f90..4210061c 100644 --- a/nuon/models/app_install_config.py +++ b/nuon/models/app_install_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,26 +16,26 @@ class AppInstallConfig: """ Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + approval_option (AppInstallApprovalOption | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + org_id (str | Unset): + updated_at (str | Unset): """ - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + approval_option: AppInstallApprovalOption | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = 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 + approval_option: str | Unset = UNSET if not isinstance(self.approval_option, Unset): approval_option = self.approval_option.value @@ -73,7 +75,7 @@ def to_dict(self) -> dict[str, Any]: 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] + approval_option: AppInstallApprovalOption | Unset if isinstance(_approval_option, Unset): approval_option = UNSET else: diff --git a/nuon/models/app_install_deploy.py b/nuon/models/app_install_deploy.py index e511236e..800c25e6 100644 --- a/nuon/models/app_install_deploy.py +++ b/nuon/models/app_install_deploy.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,64 +28,64 @@ class AppInstallDeploy: """ Attributes: - action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): - build_id (Union[Unset, str]): - component_build (Union[Unset, AppComponentBuild]): - component_config_version (Union[Unset, int]): - component_id (Union[Unset, str]): - component_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_component_id (Union[Unset, str]): - install_deploy_type (Union[Unset, AppInstallDeployType]): - install_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery - install_workflow_id (Union[Unset, str]): DEPRECATED: use WorkflowID - 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]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - updated_at (Union[Unset, str]): - workflow (Union[Unset, AppWorkflow]): - workflow_id (Union[Unset, str]): + action_workflow_runs (list[AppInstallActionWorkflowRun] | Unset): + build_id (str | Unset): + component_build (AppComponentBuild | Unset): + component_config_version (int | Unset): + component_id (str | Unset): + component_name (str | Unset): + created_at (str | Unset): + created_by (AppAccount | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_component_id (str | Unset): + install_deploy_type (AppInstallDeployType | Unset): + install_id (str | Unset): Fields that are de-nested at read time using AfterQuery + install_workflow_id (str | Unset): DEPRECATED: use WorkflowID + log_stream (AppLogStream | Unset): + oci_artifact (AppOCIArtifact | Unset): + outputs (AppInstallDeployOutputs | Unset): + plan_only (bool | Unset): + release_id (str | Unset): + runner_jobs (list[AppRunnerJob] | Unset): runner details + status (str | Unset): + status_description (str | Unset): + status_v2 (AppCompositeStatus | Unset): + updated_at (str | Unset): + workflow (AppWorkflow | Unset): + workflow_id (str | Unset): """ - action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET - build_id: Union[Unset, str] = UNSET - component_build: Union[Unset, "AppComponentBuild"] = UNSET - component_config_version: Union[Unset, int] = UNSET - component_id: Union[Unset, str] = UNSET - component_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_component_id: Union[Unset, str] = UNSET - install_deploy_type: Union[Unset, AppInstallDeployType] = UNSET - install_id: Union[Unset, str] = UNSET - install_workflow_id: Union[Unset, str] = UNSET - 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 - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow: Union[Unset, "AppWorkflow"] = UNSET - workflow_id: Union[Unset, str] = UNSET + action_workflow_runs: list[AppInstallActionWorkflowRun] | Unset = UNSET + build_id: str | Unset = UNSET + component_build: AppComponentBuild | Unset = UNSET + component_config_version: int | Unset = UNSET + component_id: str | Unset = UNSET + component_name: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by: AppAccount | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_component_id: str | Unset = UNSET + install_deploy_type: AppInstallDeployType | Unset = UNSET + install_id: str | Unset = UNSET + install_workflow_id: str | Unset = UNSET + log_stream: AppLogStream | Unset = UNSET + oci_artifact: AppOCIArtifact | Unset = UNSET + outputs: AppInstallDeployOutputs | Unset = UNSET + plan_only: bool | Unset = UNSET + release_id: str | Unset = UNSET + runner_jobs: list[AppRunnerJob] | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + status_v2: AppCompositeStatus | Unset = UNSET + updated_at: str | Unset = UNSET + workflow: AppWorkflow | Unset = UNSET + workflow_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET + action_workflow_runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.action_workflow_runs, Unset): action_workflow_runs = [] for action_workflow_runs_item_data in self.action_workflow_runs: @@ -92,7 +94,7 @@ def to_dict(self) -> dict[str, Any]: build_id = self.build_id - component_build: Union[Unset, dict[str, Any]] = UNSET + component_build: dict[str, Any] | Unset = UNSET if not isinstance(self.component_build, Unset): component_build = self.component_build.to_dict() @@ -104,7 +106,7 @@ def to_dict(self) -> dict[str, Any]: created_at = self.created_at - created_by: Union[Unset, dict[str, Any]] = UNSET + created_by: dict[str, Any] | Unset = UNSET if not isinstance(self.created_by, Unset): created_by = self.created_by.to_dict() @@ -114,7 +116,7 @@ def to_dict(self) -> dict[str, Any]: install_component_id = self.install_component_id - install_deploy_type: Union[Unset, str] = UNSET + install_deploy_type: str | Unset = UNSET if not isinstance(self.install_deploy_type, Unset): install_deploy_type = self.install_deploy_type.value @@ -122,15 +124,15 @@ def to_dict(self) -> dict[str, Any]: install_workflow_id = self.install_workflow_id - log_stream: Union[Unset, dict[str, Any]] = UNSET + log_stream: dict[str, Any] | Unset = UNSET if not isinstance(self.log_stream, Unset): log_stream = self.log_stream.to_dict() - oci_artifact: Union[Unset, dict[str, Any]] = UNSET + oci_artifact: dict[str, Any] | Unset = UNSET if not isinstance(self.oci_artifact, Unset): oci_artifact = self.oci_artifact.to_dict() - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() @@ -138,7 +140,7 @@ def to_dict(self) -> dict[str, Any]: release_id = self.release_id - runner_jobs: Union[Unset, list[dict[str, Any]]] = UNSET + runner_jobs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.runner_jobs, Unset): runner_jobs = [] for runner_jobs_item_data in self.runner_jobs: @@ -149,13 +151,13 @@ def to_dict(self) -> dict[str, Any]: status_description = self.status_description - status_v2: Union[Unset, dict[str, Any]] = UNSET + status_v2: dict[str, Any] | Unset = UNSET if not isinstance(self.status_v2, Unset): status_v2 = self.status_v2.to_dict() updated_at = self.updated_at - workflow: Union[Unset, dict[str, Any]] = UNSET + workflow: dict[str, Any] | Unset = UNSET if not isinstance(self.workflow, Unset): workflow = self.workflow.to_dict() @@ -242,7 +244,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: build_id = d.pop("build_id", UNSET) _component_build = d.pop("component_build", UNSET) - component_build: Union[Unset, AppComponentBuild] + component_build: AppComponentBuild | Unset if isinstance(_component_build, Unset): component_build = UNSET else: @@ -257,7 +259,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at = d.pop("created_at", UNSET) _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] + created_by: AppAccount | Unset if isinstance(_created_by, Unset): created_by = UNSET else: @@ -270,7 +272,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_component_id = d.pop("install_component_id", UNSET) _install_deploy_type = d.pop("install_deploy_type", UNSET) - install_deploy_type: Union[Unset, AppInstallDeployType] + install_deploy_type: AppInstallDeployType | Unset if isinstance(_install_deploy_type, Unset): install_deploy_type = UNSET else: @@ -281,21 +283,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_workflow_id = d.pop("install_workflow_id", UNSET) _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] + log_stream: AppLogStream | Unset if isinstance(_log_stream, Unset): log_stream = UNSET else: log_stream = AppLogStream.from_dict(_log_stream) _oci_artifact = d.pop("oci_artifact", UNSET) - oci_artifact: Union[Unset, AppOCIArtifact] + oci_artifact: AppOCIArtifact | Unset if isinstance(_oci_artifact, Unset): oci_artifact = UNSET else: oci_artifact = AppOCIArtifact.from_dict(_oci_artifact) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppInstallDeployOutputs] + outputs: AppInstallDeployOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: @@ -317,7 +319,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_description = d.pop("status_description", UNSET) _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] + status_v2: AppCompositeStatus | Unset if isinstance(_status_v2, Unset): status_v2 = UNSET else: @@ -326,7 +328,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _workflow = d.pop("workflow", UNSET) - workflow: Union[Unset, AppWorkflow] + workflow: AppWorkflow | Unset if isinstance(_workflow, Unset): workflow = UNSET else: diff --git a/nuon/models/app_install_deploy_outputs.py b/nuon/models/app_install_deploy_outputs.py index 5c32635c..eb9e531f 100644 --- a/nuon/models/app_install_deploy_outputs.py +++ b/nuon/models/app_install_deploy_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_event.py b/nuon/models/app_install_event.py index 76c84931..6ad6de08 100644 --- a/nuon/models/app_install_event.py +++ b/nuon/models/app_install_event.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,28 +20,28 @@ class AppInstallEvent: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - operation (Union[Unset, str]): - operation_name (Union[Unset, str]): - operation_status (Union[Unset, AppOperationStatus]): - org_id (Union[Unset, str]): - payload (Union[Unset, AppInstallEventPayload]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + operation (str | Unset): + operation_name (str | Unset): + operation_status (AppOperationStatus | Unset): + org_id (str | Unset): + payload (AppInstallEventPayload | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - operation: Union[Unset, str] = UNSET - operation_name: Union[Unset, str] = UNSET - operation_status: Union[Unset, AppOperationStatus] = UNSET - org_id: Union[Unset, str] = UNSET - payload: Union[Unset, "AppInstallEventPayload"] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + operation: str | Unset = UNSET + operation_name: str | Unset = UNSET + operation_status: AppOperationStatus | Unset = UNSET + org_id: str | Unset = UNSET + payload: AppInstallEventPayload | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,13 +57,13 @@ def to_dict(self) -> dict[str, Any]: operation_name = self.operation_name - operation_status: Union[Unset, str] = UNSET + operation_status: str | Unset = UNSET if not isinstance(self.operation_status, Unset): operation_status = self.operation_status.value org_id = self.org_id - payload: Union[Unset, dict[str, Any]] = UNSET + payload: dict[str, Any] | Unset = UNSET if not isinstance(self.payload, Unset): payload = self.payload.to_dict() @@ -111,7 +113,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: operation_name = d.pop("operation_name", UNSET) _operation_status = d.pop("operation_status", UNSET) - operation_status: Union[Unset, AppOperationStatus] + operation_status: AppOperationStatus | Unset if isinstance(_operation_status, Unset): operation_status = UNSET else: @@ -120,7 +122,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _payload = d.pop("payload", UNSET) - payload: Union[Unset, AppInstallEventPayload] + payload: AppInstallEventPayload | Unset if isinstance(_payload, Unset): payload = UNSET else: diff --git a/nuon/models/app_install_event_payload.py b/nuon/models/app_install_event_payload.py index c9ca4b40..4ce5ee0a 100644 --- a/nuon/models/app_install_event_payload.py +++ b/nuon/models/app_install_event_payload.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_inputs.py b/nuon/models/app_install_inputs.py index 953fe32d..b5e14b1a 100644 --- a/nuon/models/app_install_inputs.py +++ b/nuon/models/app_install_inputs.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,26 +20,26 @@ class AppInstallInputs: """ Attributes: - app_input_config_id (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - org_id (Union[Unset, str]): - redacted_values (Union[Unset, AppInstallInputsRedactedValues]): - updated_at (Union[Unset, str]): - values (Union[Unset, AppInstallInputsValues]): + app_input_config_id (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + org_id (str | Unset): + redacted_values (AppInstallInputsRedactedValues | Unset): + updated_at (str | Unset): + values (AppInstallInputsValues | Unset): """ - app_input_config_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - redacted_values: Union[Unset, "AppInstallInputsRedactedValues"] = UNSET - updated_at: Union[Unset, str] = UNSET - values: Union[Unset, "AppInstallInputsValues"] = UNSET + app_input_config_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + org_id: str | Unset = UNSET + redacted_values: AppInstallInputsRedactedValues | Unset = UNSET + updated_at: str | Unset = UNSET + values: AppInstallInputsValues | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -53,13 +55,13 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id - redacted_values: Union[Unset, dict[str, Any]] = UNSET + redacted_values: dict[str, Any] | Unset = UNSET if not isinstance(self.redacted_values, Unset): redacted_values = self.redacted_values.to_dict() updated_at = self.updated_at - values: Union[Unset, dict[str, Any]] = UNSET + values: dict[str, Any] | Unset = UNSET if not isinstance(self.values, Unset): values = self.values.to_dict() @@ -106,7 +108,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _redacted_values = d.pop("redacted_values", UNSET) - redacted_values: Union[Unset, AppInstallInputsRedactedValues] + redacted_values: AppInstallInputsRedactedValues | Unset if isinstance(_redacted_values, Unset): redacted_values = UNSET else: @@ -115,7 +117,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _values = d.pop("values", UNSET) - values: Union[Unset, AppInstallInputsValues] + values: AppInstallInputsValues | Unset if isinstance(_values, Unset): values = UNSET else: diff --git a/nuon/models/app_install_inputs_redacted_values.py b/nuon/models/app_install_inputs_redacted_values.py index a1a9a94c..f80a7a6e 100644 --- a/nuon/models/app_install_inputs_redacted_values.py +++ b/nuon/models/app_install_inputs_redacted_values.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_inputs_values.py b/nuon/models/app_install_inputs_values.py index 0f61048a..1024f23f 100644 --- a/nuon/models/app_install_inputs_values.py +++ b/nuon/models/app_install_inputs_values.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_links.py b/nuon/models/app_install_links.py index 5daf3145..ee8f16ce 100644 --- a/nuon/models/app_install_links.py +++ b/nuon/models/app_install_links.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_metadata.py b/nuon/models/app_install_metadata.py index ca9b4c85..7351da3b 100644 --- a/nuon/models/app_install_metadata.py +++ b/nuon/models/app_install_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_sandbox.py b/nuon/models/app_install_sandbox.py index 33c2d2db..6a61fdcf 100644 --- a/nuon/models/app_install_sandbox.py +++ b/nuon/models/app_install_sandbox.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,28 +21,28 @@ class AppInstallSandbox: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - terraform_workspace (Union[Unset, AppTerraformWorkspace]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + install_sandbox_runs (list[AppInstallSandboxRun] | Unset): + status (str | Unset): + status_description (str | Unset): + status_v2 (AppCompositeStatus | Unset): + terraform_workspace (AppTerraformWorkspace | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + install_sandbox_runs: list[AppInstallSandboxRun] | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + status_v2: AppCompositeStatus | Unset = UNSET + terraform_workspace: AppTerraformWorkspace | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,7 +54,7 @@ def to_dict(self) -> dict[str, Any]: install_id = self.install_id - install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET + install_sandbox_runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_sandbox_runs, Unset): install_sandbox_runs = [] for install_sandbox_runs_item_data in self.install_sandbox_runs: @@ -63,11 +65,11 @@ def to_dict(self) -> dict[str, Any]: status_description = self.status_description - status_v2: Union[Unset, dict[str, Any]] = UNSET + status_v2: dict[str, Any] | Unset = UNSET if not isinstance(self.status_v2, Unset): status_v2 = self.status_v2.to_dict() - terraform_workspace: Union[Unset, dict[str, Any]] = UNSET + terraform_workspace: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform_workspace, Unset): terraform_workspace = self.terraform_workspace.to_dict() @@ -126,14 +128,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_description = d.pop("status_description", UNSET) _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] + status_v2: AppCompositeStatus | Unset if isinstance(_status_v2, Unset): status_v2 = UNSET else: status_v2 = AppCompositeStatus.from_dict(_status_v2) _terraform_workspace = d.pop("terraform_workspace", UNSET) - terraform_workspace: Union[Unset, AppTerraformWorkspace] + terraform_workspace: AppTerraformWorkspace | Unset if isinstance(_terraform_workspace, Unset): terraform_workspace = UNSET else: diff --git a/nuon/models/app_install_sandbox_run.py b/nuon/models/app_install_sandbox_run.py index c0de2d52..82d927f3 100644 --- a/nuon/models/app_install_sandbox_run.py +++ b/nuon/models/app_install_sandbox_run.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,63 +27,63 @@ class AppInstallSandboxRun: """ Attributes: - action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): - app_sandbox_config (Union[Unset, AppAppSandboxConfig]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_sandbox_id (Union[Unset, str]): TODO: once we run a backfill we can make this non pointer - install_workflow_id (Union[Unset, str]): - log_stream (Union[Unset, AppLogStream]): - outputs (Union[Unset, AppInstallSandboxRunOutputs]): - run_type (Union[Unset, AppSandboxRunType]): - runner_jobs (Union[Unset, list['AppRunnerJob']]): runner details - status (Union[Unset, str]): - status_description (Union[Unset, str]): - status_v2 (Union[Unset, AppCompositeStatus]): - updated_at (Union[Unset, str]): - workflow (Union[Unset, AppWorkflow]): - workflow_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery + action_workflow_runs (list[AppInstallActionWorkflowRun] | Unset): + app_sandbox_config (AppAppSandboxConfig | Unset): + created_at (str | Unset): + created_by (AppAccount | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + install_sandbox_id (str | Unset): TODO: once we run a backfill we can make this non pointer + install_workflow_id (str | Unset): + log_stream (AppLogStream | Unset): + outputs (AppInstallSandboxRunOutputs | Unset): + run_type (AppSandboxRunType | Unset): + runner_jobs (list[AppRunnerJob] | Unset): runner details + status (str | Unset): + status_description (str | Unset): + status_v2 (AppCompositeStatus | Unset): + updated_at (str | Unset): + workflow (AppWorkflow | Unset): + workflow_id (str | Unset): Fields that are de-nested at read time using AfterQuery """ - action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET - app_sandbox_config: Union[Unset, "AppAppSandboxConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - 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 - log_stream: Union[Unset, "AppLogStream"] = UNSET - outputs: Union[Unset, "AppInstallSandboxRunOutputs"] = UNSET - run_type: Union[Unset, AppSandboxRunType] = UNSET - runner_jobs: Union[Unset, list["AppRunnerJob"]] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - status_v2: Union[Unset, "AppCompositeStatus"] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow: Union[Unset, "AppWorkflow"] = UNSET - workflow_id: Union[Unset, str] = UNSET + action_workflow_runs: list[AppInstallActionWorkflowRun] | Unset = UNSET + app_sandbox_config: AppAppSandboxConfig | Unset = UNSET + created_at: str | Unset = UNSET + created_by: AppAccount | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + install_sandbox_id: str | Unset = UNSET + install_workflow_id: str | Unset = UNSET + log_stream: AppLogStream | Unset = UNSET + outputs: AppInstallSandboxRunOutputs | Unset = UNSET + run_type: AppSandboxRunType | Unset = UNSET + runner_jobs: list[AppRunnerJob] | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + status_v2: AppCompositeStatus | Unset = UNSET + updated_at: str | Unset = UNSET + workflow: AppWorkflow | Unset = UNSET + workflow_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET + action_workflow_runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.action_workflow_runs, Unset): action_workflow_runs = [] for action_workflow_runs_item_data in self.action_workflow_runs: action_workflow_runs_item = action_workflow_runs_item_data.to_dict() action_workflow_runs.append(action_workflow_runs_item) - app_sandbox_config: Union[Unset, dict[str, Any]] = UNSET + app_sandbox_config: dict[str, Any] | Unset = UNSET if not isinstance(self.app_sandbox_config, Unset): app_sandbox_config = self.app_sandbox_config.to_dict() created_at = self.created_at - created_by: Union[Unset, dict[str, Any]] = UNSET + created_by: dict[str, Any] | Unset = UNSET if not isinstance(self.created_by, Unset): created_by = self.created_by.to_dict() @@ -95,19 +97,19 @@ def to_dict(self) -> dict[str, Any]: install_workflow_id = self.install_workflow_id - log_stream: Union[Unset, dict[str, Any]] = UNSET + log_stream: dict[str, Any] | Unset = UNSET if not isinstance(self.log_stream, Unset): log_stream = self.log_stream.to_dict() - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() - run_type: Union[Unset, str] = UNSET + run_type: str | Unset = UNSET if not isinstance(self.run_type, Unset): run_type = self.run_type.value - runner_jobs: Union[Unset, list[dict[str, Any]]] = UNSET + runner_jobs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.runner_jobs, Unset): runner_jobs = [] for runner_jobs_item_data in self.runner_jobs: @@ -118,13 +120,13 @@ def to_dict(self) -> dict[str, Any]: status_description = self.status_description - status_v2: Union[Unset, dict[str, Any]] = UNSET + status_v2: dict[str, Any] | Unset = UNSET if not isinstance(self.status_v2, Unset): status_v2 = self.status_v2.to_dict() updated_at = self.updated_at - workflow: Union[Unset, dict[str, Any]] = UNSET + workflow: dict[str, Any] | Unset = UNSET if not isinstance(self.workflow, Unset): workflow = self.workflow.to_dict() @@ -194,7 +196,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: action_workflow_runs.append(action_workflow_runs_item) _app_sandbox_config = d.pop("app_sandbox_config", UNSET) - app_sandbox_config: Union[Unset, AppAppSandboxConfig] + app_sandbox_config: AppAppSandboxConfig | Unset if isinstance(_app_sandbox_config, Unset): app_sandbox_config = UNSET else: @@ -203,7 +205,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at = d.pop("created_at", UNSET) _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] + created_by: AppAccount | Unset if isinstance(_created_by, Unset): created_by = UNSET else: @@ -220,21 +222,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_workflow_id = d.pop("install_workflow_id", UNSET) _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] + log_stream: AppLogStream | Unset if isinstance(_log_stream, Unset): log_stream = UNSET else: log_stream = AppLogStream.from_dict(_log_stream) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppInstallSandboxRunOutputs] + outputs: AppInstallSandboxRunOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: outputs = AppInstallSandboxRunOutputs.from_dict(_outputs) _run_type = d.pop("run_type", UNSET) - run_type: Union[Unset, AppSandboxRunType] + run_type: AppSandboxRunType | Unset if isinstance(_run_type, Unset): run_type = UNSET else: @@ -252,7 +254,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_description = d.pop("status_description", UNSET) _status_v2 = d.pop("status_v2", UNSET) - status_v2: Union[Unset, AppCompositeStatus] + status_v2: AppCompositeStatus | Unset if isinstance(_status_v2, Unset): status_v2 = UNSET else: @@ -261,7 +263,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _workflow = d.pop("workflow", UNSET) - workflow: Union[Unset, AppWorkflow] + workflow: AppWorkflow | Unset if isinstance(_workflow, Unset): workflow = UNSET else: diff --git a/nuon/models/app_install_sandbox_run_outputs.py b/nuon/models/app_install_sandbox_run_outputs.py index 7eb0d92a..60a8e6f6 100644 --- a/nuon/models/app_install_sandbox_run_outputs.py +++ b/nuon/models/app_install_sandbox_run_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_stack.py b/nuon/models/app_install_stack.py index 9b8ac9f4..cdf8d501 100644 --- a/nuon/models/app_install_stack.py +++ b/nuon/models/app_install_stack.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,24 +20,24 @@ class AppInstallStack: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_stack_outputs (Union[Unset, AppInstallStackOutputs]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - versions (Union[Unset, list['AppInstallStackVersion']]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + install_stack_outputs (AppInstallStackOutputs | Unset): + org_id (str | Unset): + updated_at (str | Unset): + versions (list[AppInstallStackVersion] | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_stack_outputs: Union[Unset, "AppInstallStackOutputs"] = UNSET - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - versions: Union[Unset, list["AppInstallStackVersion"]] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + install_stack_outputs: AppInstallStackOutputs | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET + versions: list[AppInstallStackVersion] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -47,7 +49,7 @@ def to_dict(self) -> dict[str, Any]: install_id = self.install_id - install_stack_outputs: Union[Unset, dict[str, Any]] = UNSET + install_stack_outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.install_stack_outputs, Unset): install_stack_outputs = self.install_stack_outputs.to_dict() @@ -55,7 +57,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - versions: Union[Unset, list[dict[str, Any]]] = UNSET + versions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.versions, Unset): versions = [] for versions_item_data in self.versions: @@ -99,7 +101,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_id = d.pop("install_id", UNSET) _install_stack_outputs = d.pop("install_stack_outputs", UNSET) - install_stack_outputs: Union[Unset, AppInstallStackOutputs] + install_stack_outputs: AppInstallStackOutputs | Unset if isinstance(_install_stack_outputs, Unset): install_stack_outputs = UNSET else: diff --git a/nuon/models/app_install_stack_outputs.py b/nuon/models/app_install_stack_outputs.py index abceb687..fa950954 100644 --- a/nuon/models/app_install_stack_outputs.py +++ b/nuon/models/app_install_stack_outputs.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,38 +22,38 @@ class AppInstallStackOutputs: """ Attributes: - aws (Union[Unset, AppAWSStackOutputs]): - azure (Union[Unset, AppAzureStackOutputs]): - 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]): - org_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + aws (AppAWSStackOutputs | Unset): + azure (AppAzureStackOutputs | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + data (AppInstallStackOutputsData | Unset): + data_contents (AppInstallStackOutputsDataContents | Unset): + id (str | Unset): + install_stack_id (str | Unset): + install_version_run_id (str | Unset): + org_id (str | Unset): + updated_at (str | Unset): """ - aws: Union[Unset, "AppAWSStackOutputs"] = UNSET - azure: Union[Unset, "AppAzureStackOutputs"] = UNSET - 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 - org_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + aws: AppAWSStackOutputs | Unset = UNSET + azure: AppAzureStackOutputs | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + data: AppInstallStackOutputsData | Unset = UNSET + data_contents: AppInstallStackOutputsDataContents | Unset = UNSET + id: str | Unset = UNSET + install_stack_id: str | Unset = UNSET + install_version_run_id: str | Unset = UNSET + org_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - aws: Union[Unset, dict[str, Any]] = UNSET + aws: dict[str, Any] | Unset = UNSET if not isinstance(self.aws, Unset): aws = self.aws.to_dict() - azure: Union[Unset, dict[str, Any]] = UNSET + azure: dict[str, Any] | Unset = UNSET if not isinstance(self.azure, Unset): azure = self.azure.to_dict() @@ -59,11 +61,11 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - data: Union[Unset, dict[str, Any]] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() - data_contents: Union[Unset, dict[str, Any]] = UNSET + data_contents: dict[str, Any] | Unset = UNSET if not isinstance(self.data_contents, Unset): data_contents = self.data_contents.to_dict() @@ -114,14 +116,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _aws = d.pop("aws", UNSET) - aws: Union[Unset, AppAWSStackOutputs] + aws: AppAWSStackOutputs | Unset if isinstance(_aws, Unset): aws = UNSET else: aws = AppAWSStackOutputs.from_dict(_aws) _azure = d.pop("azure", UNSET) - azure: Union[Unset, AppAzureStackOutputs] + azure: AppAzureStackOutputs | Unset if isinstance(_azure, Unset): azure = UNSET else: @@ -132,14 +134,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _data = d.pop("data", UNSET) - data: Union[Unset, AppInstallStackOutputsData] + data: AppInstallStackOutputsData | Unset if isinstance(_data, Unset): data = UNSET else: data = AppInstallStackOutputsData.from_dict(_data) _data_contents = d.pop("data_contents", UNSET) - data_contents: Union[Unset, AppInstallStackOutputsDataContents] + data_contents: AppInstallStackOutputsDataContents | Unset if isinstance(_data_contents, Unset): data_contents = UNSET else: diff --git a/nuon/models/app_install_stack_outputs_data.py b/nuon/models/app_install_stack_outputs_data.py index 2246ce36..1478e5fa 100644 --- a/nuon/models/app_install_stack_outputs_data.py +++ b/nuon/models/app_install_stack_outputs_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_stack_outputs_data_contents.py b/nuon/models/app_install_stack_outputs_data_contents.py index cf60adf7..9848e83f 100644 --- a/nuon/models/app_install_stack_outputs_data_contents.py +++ b/nuon/models/app_install_stack_outputs_data_contents.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_stack_version.py b/nuon/models/app_install_stack_version.py index 5b744cc2..0394bb01 100644 --- a/nuon/models/app_install_stack_version.py +++ b/nuon/models/app_install_stack_version.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,44 +20,44 @@ class AppInstallStackVersion: """ Attributes: - app_config_id (Union[Unset, str]): - aws_bucket_key (Union[Unset, str]): - aws_bucket_name (Union[Unset, str]): aws configuration parameters - checksum (Union[Unset, str]): - composite_status (Union[Unset, AppCompositeStatus]): - contents (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_id (Union[Unset, str]): - install_stack_id (Union[Unset, str]): - org_id (Union[Unset, str]): - phone_home_id (Union[Unset, str]): - phone_home_url (Union[Unset, str]): - quick_link_url (Union[Unset, str]): - runs (Union[Unset, list['AppInstallStackVersionRun']]): - template_url (Union[Unset, str]): - updated_at (Union[Unset, str]): + app_config_id (str | Unset): + aws_bucket_key (str | Unset): + aws_bucket_name (str | Unset): aws configuration parameters + checksum (str | Unset): + composite_status (AppCompositeStatus | Unset): + contents (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + install_stack_id (str | Unset): + org_id (str | Unset): + phone_home_id (str | Unset): + phone_home_url (str | Unset): + quick_link_url (str | Unset): + runs (list[AppInstallStackVersionRun] | Unset): + template_url (str | Unset): + updated_at (str | Unset): """ - app_config_id: Union[Unset, str] = UNSET - aws_bucket_key: Union[Unset, str] = UNSET - aws_bucket_name: Union[Unset, str] = UNSET - checksum: Union[Unset, str] = UNSET - composite_status: Union[Unset, "AppCompositeStatus"] = UNSET - contents: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_id: Union[Unset, str] = UNSET - install_stack_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - phone_home_id: Union[Unset, str] = UNSET - phone_home_url: Union[Unset, str] = UNSET - quick_link_url: Union[Unset, str] = UNSET - runs: Union[Unset, list["AppInstallStackVersionRun"]] = UNSET - template_url: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + aws_bucket_key: str | Unset = UNSET + aws_bucket_name: str | Unset = UNSET + checksum: str | Unset = UNSET + composite_status: AppCompositeStatus | Unset = UNSET + contents: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + install_stack_id: str | Unset = UNSET + org_id: str | Unset = UNSET + phone_home_id: str | Unset = UNSET + phone_home_url: str | Unset = UNSET + quick_link_url: str | Unset = UNSET + runs: list[AppInstallStackVersionRun] | Unset = UNSET + template_url: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -67,7 +69,7 @@ def to_dict(self) -> dict[str, Any]: checksum = self.checksum - composite_status: Union[Unset, dict[str, Any]] = UNSET + composite_status: dict[str, Any] | Unset = UNSET if not isinstance(self.composite_status, Unset): composite_status = self.composite_status.to_dict() @@ -91,7 +93,7 @@ def to_dict(self) -> dict[str, Any]: quick_link_url = self.quick_link_url - runs: Union[Unset, list[dict[str, Any]]] = UNSET + runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.runs, Unset): runs = [] for runs_item_data in self.runs: @@ -159,7 +161,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: checksum = d.pop("checksum", UNSET) _composite_status = d.pop("composite_status", UNSET) - composite_status: Union[Unset, AppCompositeStatus] + composite_status: AppCompositeStatus | Unset if isinstance(_composite_status, Unset): composite_status = UNSET else: diff --git a/nuon/models/app_install_stack_version_run.py b/nuon/models/app_install_stack_version_run.py index 9ced1e0b..197efe1c 100644 --- a/nuon/models/app_install_stack_version_run.py +++ b/nuon/models/app_install_stack_version_run.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,20 +20,20 @@ class AppInstallStackVersionRun: """ Attributes: - 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]): + created_at (str | Unset): + created_by_id (str | Unset): + data (AppInstallStackVersionRunData | Unset): + data_contents (AppInstallStackVersionRunDataContents | Unset): + id (str | Unset): + updated_at (str | Unset): """ - 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 + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + data: AppInstallStackVersionRunData | Unset = UNSET + data_contents: AppInstallStackVersionRunDataContents | Unset = UNSET + id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -39,11 +41,11 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - data: Union[Unset, dict[str, Any]] = UNSET + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() - data_contents: Union[Unset, dict[str, Any]] = UNSET + data_contents: dict[str, Any] | Unset = UNSET if not isinstance(self.data_contents, Unset): data_contents = self.data_contents.to_dict() @@ -80,14 +82,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _data = d.pop("data", UNSET) - data: Union[Unset, AppInstallStackVersionRunData] + data: AppInstallStackVersionRunData | Unset if isinstance(_data, Unset): data = UNSET else: data = AppInstallStackVersionRunData.from_dict(_data) _data_contents = d.pop("data_contents", UNSET) - data_contents: Union[Unset, AppInstallStackVersionRunDataContents] + data_contents: AppInstallStackVersionRunDataContents | Unset if isinstance(_data_contents, Unset): data_contents = UNSET else: diff --git a/nuon/models/app_install_stack_version_run_data.py b/nuon/models/app_install_stack_version_run_data.py index 5da3fe66..a4d12b69 100644 --- a/nuon/models/app_install_stack_version_run_data.py +++ b/nuon/models/app_install_stack_version_run_data.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_stack_version_run_data_contents.py b/nuon/models/app_install_stack_version_run_data_contents.py index 90c4f8f8..cfec833e 100644 --- a/nuon/models/app_install_stack_version_run_data_contents.py +++ b/nuon/models/app_install_stack_version_run_data_contents.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_install_state.py b/nuon/models/app_install_state.py index 692ab245..c68b4a78 100644 --- a/nuon/models/app_install_state.py +++ b/nuon/models/app_install_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,30 +19,30 @@ class AppInstallState: """ Attributes: - archived (Union[Unset, bool]): - contents (Union[Unset, str]): - created_at (Union[Unset, str]): - 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]): - version (Union[Unset, int]): + archived (bool | Unset): + contents (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_id (str | Unset): + stale_at (GenericsNullTime | Unset): + triggered_by_id (str | Unset): + triggered_by_type (str | Unset): + updated_at (str | Unset): + version (int | Unset): """ - archived: Union[Unset, bool] = UNSET - contents: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - 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 - version: Union[Unset, int] = UNSET + archived: bool | Unset = UNSET + contents: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + stale_at: GenericsNullTime | Unset = UNSET + triggered_by_id: str | Unset = UNSET + triggered_by_type: str | Unset = UNSET + updated_at: str | Unset = UNSET + version: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -56,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: install_id = self.install_id - stale_at: Union[Unset, dict[str, Any]] = UNSET + stale_at: dict[str, Any] | Unset = UNSET if not isinstance(self.stale_at, Unset): stale_at = self.stale_at.to_dict() @@ -114,7 +116,7 @@ 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] + stale_at: GenericsNullTime | Unset if isinstance(_stale_at, Unset): stale_at = UNSET else: diff --git a/nuon/models/app_installer.py b/nuon/models/app_installer.py index fa309ba5..8e10c839 100644 --- a/nuon/models/app_installer.py +++ b/nuon/models/app_installer.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,28 +21,28 @@ class AppInstaller: """ Attributes: - apps (Union[Unset, list['AppApp']]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - metadata (Union[Unset, AppInstallerMetadata]): - org_id (Union[Unset, str]): - type_ (Union[Unset, AppInstallerType]): - updated_at (Union[Unset, str]): + apps (list[AppApp] | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + metadata (AppInstallerMetadata | Unset): + org_id (str | Unset): + type_ (AppInstallerType | Unset): + updated_at (str | Unset): """ - apps: Union[Unset, list["AppApp"]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - metadata: Union[Unset, "AppInstallerMetadata"] = UNSET - org_id: Union[Unset, str] = UNSET - type_: Union[Unset, AppInstallerType] = UNSET - updated_at: Union[Unset, str] = UNSET + apps: list[AppApp] | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + metadata: AppInstallerMetadata | Unset = UNSET + org_id: str | Unset = UNSET + type_: AppInstallerType | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - apps: Union[Unset, list[dict[str, Any]]] = UNSET + apps: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.apps, Unset): apps = [] for apps_item_data in self.apps: @@ -53,13 +55,13 @@ def to_dict(self) -> dict[str, Any]: id = self.id - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() org_id = self.org_id - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -107,7 +109,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppInstallerMetadata] + metadata: AppInstallerMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: @@ -116,7 +118,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppInstallerType] + type_: AppInstallerType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/app_installer_metadata.py b/nuon/models/app_installer_metadata.py index 3d62b45e..03d1ff52 100644 --- a/nuon/models/app_installer_metadata.py +++ b/nuon/models/app_installer_metadata.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,46 +15,46 @@ class AppInstallerMetadata: """ Attributes: - community_url (Union[Unset, str]): - copyright_markdown (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - demo_url (Union[Unset, str]): - description (Union[Unset, str]): - documentation_url (Union[Unset, str]): - favicon_url (Union[Unset, str]): - footer_markdown (Union[Unset, str]): - formatted_demo_url (Union[Unset, str]): - github_url (Union[Unset, str]): - homepage_url (Union[Unset, str]): - id (Union[Unset, str]): - installer_id (Union[Unset, str]): - logo_url (Union[Unset, str]): - name (Union[Unset, str]): - og_image_url (Union[Unset, str]): - post_install_markdown (Union[Unset, str]): - updated_at (Union[Unset, str]): + community_url (str | Unset): + copyright_markdown (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + demo_url (str | Unset): + description (str | Unset): + documentation_url (str | Unset): + favicon_url (str | Unset): + footer_markdown (str | Unset): + formatted_demo_url (str | Unset): + github_url (str | Unset): + homepage_url (str | Unset): + id (str | Unset): + installer_id (str | Unset): + logo_url (str | Unset): + name (str | Unset): + og_image_url (str | Unset): + post_install_markdown (str | Unset): + updated_at (str | Unset): """ - community_url: Union[Unset, str] = UNSET - copyright_markdown: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - demo_url: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - documentation_url: Union[Unset, str] = UNSET - favicon_url: Union[Unset, str] = UNSET - footer_markdown: Union[Unset, str] = UNSET - formatted_demo_url: Union[Unset, str] = UNSET - github_url: Union[Unset, str] = UNSET - homepage_url: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - installer_id: Union[Unset, str] = UNSET - logo_url: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - og_image_url: Union[Unset, str] = UNSET - post_install_markdown: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + community_url: str | Unset = UNSET + copyright_markdown: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + demo_url: str | Unset = UNSET + description: str | Unset = UNSET + documentation_url: str | Unset = UNSET + favicon_url: str | Unset = UNSET + footer_markdown: str | Unset = UNSET + formatted_demo_url: str | Unset = UNSET + github_url: str | Unset = UNSET + homepage_url: str | Unset = UNSET + id: str | Unset = UNSET + installer_id: str | Unset = UNSET + logo_url: str | Unset = UNSET + name: str | Unset = UNSET + og_image_url: str | Unset = UNSET + post_install_markdown: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_job_component_config.py b/nuon/models/app_job_component_config.py index f3072908..fde60ac8 100644 --- a/nuon/models/app_job_component_config.py +++ b/nuon/models/app_job_component_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,36 +19,36 @@ class AppJobComponentConfig: """ Attributes: - args (Union[Unset, list[str]]): - cmd (Union[Unset, list[str]]): - component_config_connection_id (Union[Unset, str]): value - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppJobComponentConfigEnvVars]): - id (Union[Unset, str]): - image_url (Union[Unset, str]): Image attributes, copied from a docker_buid or external_image component. - tag (Union[Unset, str]): - updated_at (Union[Unset, str]): + args (list[str] | Unset): + cmd (list[str] | Unset): + component_config_connection_id (str | Unset): value + created_at (str | Unset): + created_by_id (str | Unset): + env_vars (AppJobComponentConfigEnvVars | Unset): + id (str | Unset): + image_url (str | Unset): Image attributes, copied from a docker_buid or external_image component. + tag (str | Unset): + updated_at (str | Unset): """ - args: Union[Unset, list[str]] = UNSET - cmd: Union[Unset, list[str]] = UNSET - component_config_connection_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppJobComponentConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - image_url: Union[Unset, str] = UNSET - tag: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + args: list[str] | Unset = UNSET + cmd: list[str] | Unset = UNSET + component_config_connection_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + env_vars: AppJobComponentConfigEnvVars | Unset = UNSET + id: str | Unset = UNSET + image_url: str | Unset = UNSET + tag: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - args: Union[Unset, list[str]] = UNSET + args: list[str] | Unset = UNSET if not isinstance(self.args, Unset): args = self.args - cmd: Union[Unset, list[str]] = UNSET + cmd: list[str] | Unset = UNSET if not isinstance(self.cmd, Unset): cmd = self.cmd @@ -56,7 +58,7 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() @@ -110,7 +112,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppJobComponentConfigEnvVars] + env_vars: AppJobComponentConfigEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: diff --git a/nuon/models/app_job_component_config_env_vars.py b/nuon/models/app_job_component_config_env_vars.py index d9e22238..bc86b155 100644 --- a/nuon/models/app_job_component_config_env_vars.py +++ b/nuon/models/app_job_component_config_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_json_map.py b/nuon/models/app_json_map.py index 7a5e56ba..3d9e3b83 100644 --- a/nuon/models/app_json_map.py +++ b/nuon/models/app_json_map.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_kubernetes_manifest_component_config.py b/nuon/models/app_kubernetes_manifest_component_config.py index c3f334eb..f81355e2 100644 --- a/nuon/models/app_kubernetes_manifest_component_config.py +++ b/nuon/models/app_kubernetes_manifest_component_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,22 +15,22 @@ class AppKubernetesManifestComponentConfig: """ Attributes: - component_config_connection_id (Union[Unset, str]): value - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - manifest (Union[Unset, str]): - namespace (Union[Unset, str]): - updated_at (Union[Unset, str]): + component_config_connection_id (str | Unset): value + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + manifest (str | Unset): + namespace (str | Unset): + updated_at (str | Unset): """ - component_config_connection_id: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - manifest: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + component_config_connection_id: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + manifest: str | Unset = UNSET + namespace: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_latest_runner_heart_beat.py b/nuon/models/app_latest_runner_heart_beat.py index 605c82fc..0df45cd5 100644 --- a/nuon/models/app_latest_runner_heart_beat.py +++ b/nuon/models/app_latest_runner_heart_beat.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,20 +15,20 @@ 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 (int | Unset): + created_at (str | Unset): + process (str | Unset): + runner_id (str | Unset): + started_at (str | Unset): + version (str | Unset): """ - 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 + alive_time: int | Unset = UNSET + created_at: str | Unset = UNSET + process: str | Unset = UNSET + runner_id: str | Unset = UNSET + started_at: str | Unset = UNSET + version: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_log_stream.py b/nuon/models/app_log_stream.py index 91252074..318a70fa 100644 --- a/nuon/models/app_log_stream.py +++ b/nuon/models/app_log_stream.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,34 +19,34 @@ class AppLogStream: """ Attributes: - attrs (Union[Unset, AppLogStreamAttrs]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - open_ (Union[Unset, bool]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - runner_api_url (Union[Unset, str]): - updated_at (Union[Unset, str]): - write_token (Union[Unset, str]): + attrs (AppLogStreamAttrs | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + open_ (bool | Unset): + org_id (str | Unset): + owner_id (str | Unset): + owner_type (str | Unset): + runner_api_url (str | Unset): + updated_at (str | Unset): + write_token (str | Unset): """ - attrs: Union[Unset, "AppLogStreamAttrs"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - open_: Union[Unset, bool] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - runner_api_url: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - write_token: Union[Unset, str] = UNSET + attrs: AppLogStreamAttrs | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + open_: bool | Unset = UNSET + org_id: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + runner_api_url: str | Unset = UNSET + updated_at: str | Unset = UNSET + write_token: str | Unset = 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 + attrs: dict[str, Any] | Unset = UNSET if not isinstance(self.attrs, Unset): attrs = self.attrs.to_dict() @@ -102,7 +104,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _attrs = d.pop("attrs", UNSET) - attrs: Union[Unset, AppLogStreamAttrs] + attrs: AppLogStreamAttrs | Unset if isinstance(_attrs, Unset): attrs = UNSET else: diff --git a/nuon/models/app_log_stream_attrs.py b/nuon/models/app_log_stream_attrs.py index 01b8718e..d1cc47f7 100644 --- a/nuon/models/app_log_stream_attrs.py +++ b/nuon/models/app_log_stream_attrs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_notifications_config.py b/nuon/models/app_notifications_config.py index 7826cfc4..bd8bb7b9 100644 --- a/nuon/models/app_notifications_config.py +++ b/nuon/models/app_notifications_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,24 +15,24 @@ class AppNotificationsConfig: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - slack_webhook_url (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + owner_id (str | Unset): + owner_type (str | Unset): + slack_webhook_url (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - slack_webhook_url: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + slack_webhook_url: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_oci_artifact.py b/nuon/models/app_oci_artifact.py index b1e95392..99112afa 100644 --- a/nuon/models/app_oci_artifact.py +++ b/nuon/models/app_oci_artifact.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,52 +19,52 @@ class AppOCIArtifact: """ Attributes: - annotations (Union[Unset, AppOCIArtifactAnnotations]): - architecture (Union[Unset, str]): - artifact_type (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - digest (Union[Unset, str]): - id (Union[Unset, str]): - media_type (Union[Unset, str]): - org_id (Union[Unset, str]): - os (Union[Unset, str]): Platform fields - os_features (Union[Unset, list[str]]): - os_version (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - repository (Union[Unset, str]): - size (Union[Unset, int]): - tag (Union[Unset, str]): - updated_at (Union[Unset, str]): - urls (Union[Unset, list[str]]): - variant (Union[Unset, str]): + annotations (AppOCIArtifactAnnotations | Unset): + architecture (str | Unset): + artifact_type (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + digest (str | Unset): + id (str | Unset): + media_type (str | Unset): + org_id (str | Unset): + os (str | Unset): Platform fields + os_features (list[str] | Unset): + os_version (str | Unset): + owner_id (str | Unset): + owner_type (str | Unset): + repository (str | Unset): + size (int | Unset): + tag (str | Unset): + updated_at (str | Unset): + urls (list[str] | Unset): + variant (str | Unset): """ - annotations: Union[Unset, "AppOCIArtifactAnnotations"] = UNSET - architecture: Union[Unset, str] = UNSET - artifact_type: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - digest: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - media_type: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - os: Union[Unset, str] = UNSET - os_features: Union[Unset, list[str]] = UNSET - os_version: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - repository: Union[Unset, str] = UNSET - size: Union[Unset, int] = UNSET - tag: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - urls: Union[Unset, list[str]] = UNSET - variant: Union[Unset, str] = UNSET + annotations: AppOCIArtifactAnnotations | Unset = UNSET + architecture: str | Unset = UNSET + artifact_type: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + digest: str | Unset = UNSET + id: str | Unset = UNSET + media_type: str | Unset = UNSET + org_id: str | Unset = UNSET + os: str | Unset = UNSET + os_features: list[str] | Unset = UNSET + os_version: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + repository: str | Unset = UNSET + size: int | Unset = UNSET + tag: str | Unset = UNSET + updated_at: str | Unset = UNSET + urls: list[str] | Unset = UNSET + variant: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - annotations: Union[Unset, dict[str, Any]] = UNSET + annotations: dict[str, Any] | Unset = UNSET if not isinstance(self.annotations, Unset): annotations = self.annotations.to_dict() @@ -84,7 +86,7 @@ def to_dict(self) -> dict[str, Any]: os = self.os - os_features: Union[Unset, list[str]] = UNSET + os_features: list[str] | Unset = UNSET if not isinstance(self.os_features, Unset): os_features = self.os_features @@ -102,7 +104,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - urls: Union[Unset, list[str]] = UNSET + urls: list[str] | Unset = UNSET if not isinstance(self.urls, Unset): urls = self.urls @@ -160,7 +162,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _annotations = d.pop("annotations", UNSET) - annotations: Union[Unset, AppOCIArtifactAnnotations] + annotations: AppOCIArtifactAnnotations | Unset if isinstance(_annotations, Unset): annotations = UNSET else: diff --git a/nuon/models/app_oci_artifact_annotations.py b/nuon/models/app_oci_artifact_annotations.py index 5cb6ae6d..e032d149 100644 --- a/nuon/models/app_oci_artifact_annotations.py +++ b/nuon/models/app_oci_artifact_annotations.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_org.py b/nuon/models/app_org.py index 833cbce6..df05a5b9 100644 --- a/nuon/models/app_org.py +++ b/nuon/models/app_org.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,36 +23,36 @@ class AppOrg: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - features (Union[Unset, TypesStringBoolMap]): - id (Union[Unset, str]): - links (Union[Unset, AppOrgLinks]): - logo_url (Union[Unset, str]): - name (Union[Unset, str]): - notifications_config (Union[Unset, AppNotificationsConfig]): - runner_group (Union[Unset, AppRunnerGroup]): - sandbox_mode (Union[Unset, bool]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connections (Union[Unset, list['AppVCSConnection']]): + created_at (str | Unset): + created_by_id (str | Unset): + features (TypesStringBoolMap | Unset): + id (str | Unset): + links (AppOrgLinks | Unset): + logo_url (str | Unset): + name (str | Unset): + notifications_config (AppNotificationsConfig | Unset): + runner_group (AppRunnerGroup | Unset): + sandbox_mode (bool | Unset): + status (str | Unset): + status_description (str | Unset): + updated_at (str | Unset): + vcs_connections (list[AppVCSConnection] | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - features: Union[Unset, "TypesStringBoolMap"] = UNSET - id: Union[Unset, str] = UNSET - links: Union[Unset, "AppOrgLinks"] = UNSET - logo_url: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - notifications_config: Union[Unset, "AppNotificationsConfig"] = UNSET - runner_group: Union[Unset, "AppRunnerGroup"] = UNSET - sandbox_mode: Union[Unset, bool] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connections: Union[Unset, list["AppVCSConnection"]] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + features: TypesStringBoolMap | Unset = UNSET + id: str | Unset = UNSET + links: AppOrgLinks | Unset = UNSET + logo_url: str | Unset = UNSET + name: str | Unset = UNSET + notifications_config: AppNotificationsConfig | Unset = UNSET + runner_group: AppRunnerGroup | Unset = UNSET + sandbox_mode: bool | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + updated_at: str | Unset = UNSET + vcs_connections: list[AppVCSConnection] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -58,13 +60,13 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - features: Union[Unset, dict[str, Any]] = UNSET + features: dict[str, Any] | Unset = UNSET if not isinstance(self.features, Unset): features = self.features.to_dict() id = self.id - links: Union[Unset, dict[str, Any]] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() @@ -72,11 +74,11 @@ def to_dict(self) -> dict[str, Any]: name = self.name - notifications_config: Union[Unset, dict[str, Any]] = UNSET + notifications_config: dict[str, Any] | Unset = UNSET if not isinstance(self.notifications_config, Unset): notifications_config = self.notifications_config.to_dict() - runner_group: Union[Unset, dict[str, Any]] = UNSET + runner_group: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_group, Unset): runner_group = self.runner_group.to_dict() @@ -88,7 +90,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - vcs_connections: Union[Unset, list[dict[str, Any]]] = UNSET + vcs_connections: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.vcs_connections, Unset): vcs_connections = [] for vcs_connections_item_data in self.vcs_connections: @@ -143,7 +145,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _features = d.pop("features", UNSET) - features: Union[Unset, TypesStringBoolMap] + features: TypesStringBoolMap | Unset if isinstance(_features, Unset): features = UNSET else: @@ -152,7 +154,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _links = d.pop("links", UNSET) - links: Union[Unset, AppOrgLinks] + links: AppOrgLinks | Unset if isinstance(_links, Unset): links = UNSET else: @@ -163,14 +165,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _notifications_config = d.pop("notifications_config", UNSET) - notifications_config: Union[Unset, AppNotificationsConfig] + notifications_config: AppNotificationsConfig | Unset if isinstance(_notifications_config, Unset): notifications_config = UNSET else: notifications_config = AppNotificationsConfig.from_dict(_notifications_config) _runner_group = d.pop("runner_group", UNSET) - runner_group: Union[Unset, AppRunnerGroup] + runner_group: AppRunnerGroup | Unset if isinstance(_runner_group, Unset): runner_group = UNSET else: diff --git a/nuon/models/app_org_invite.py b/nuon/models/app_org_invite.py index 00cb876e..a7750e28 100644 --- a/nuon/models/app_org_invite.py +++ b/nuon/models/app_org_invite.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -15,24 +17,24 @@ class AppOrgInvite: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - email (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): parent relationship - role_type (Union[Unset, AppRoleType]): - status (Union[Unset, AppOrgInviteStatus]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + email (str | Unset): + id (str | Unset): + org_id (str | Unset): parent relationship + role_type (AppRoleType | Unset): + status (AppOrgInviteStatus | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - role_type: Union[Unset, AppRoleType] = UNSET - status: Union[Unset, AppOrgInviteStatus] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + email: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + role_type: AppRoleType | Unset = UNSET + status: AppOrgInviteStatus | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,11 +48,11 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id - role_type: Union[Unset, str] = UNSET + role_type: str | Unset = UNSET if not isinstance(self.role_type, Unset): role_type = self.role_type.value - status: Union[Unset, str] = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.value @@ -92,14 +94,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _role_type = d.pop("role_type", UNSET) - role_type: Union[Unset, AppRoleType] + role_type: AppRoleType | Unset if isinstance(_role_type, Unset): role_type = UNSET else: role_type = AppRoleType(_role_type) _status = d.pop("status", UNSET) - status: Union[Unset, AppOrgInviteStatus] + status: AppOrgInviteStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/nuon/models/app_org_links.py b/nuon/models/app_org_links.py index b8c3ddea..1d499fca 100644 --- a/nuon/models/app_org_links.py +++ b/nuon/models/app_org_links.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_otel_log_record.py b/nuon/models/app_otel_log_record.py index 12f6ccdf..202d958e 100644 --- a/nuon/models/app_otel_log_record.py +++ b/nuon/models/app_otel_log_record.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,64 +21,64 @@ class AppOtelLogRecord: """ Attributes: - body (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - log_attributes (Union[Unset, AppOtelLogRecordLogAttributes]): - log_stream_id (Union[Unset, str]): - org_id (Union[Unset, str]): internal attributes - resource_attributes (Union[Unset, AppOtelLogRecordResourceAttributes]): - resource_schema_url (Union[Unset, str]): - runner_group_id (Union[Unset, str]): - runner_id (Union[Unset, str]): - runner_job_execution_id (Union[Unset, str]): - runner_job_execution_step (Union[Unset, str]): - runner_job_id (Union[Unset, str]): - scope_attributes (Union[Unset, AppOtelLogRecordScopeAttributes]): - scope_name (Union[Unset, str]): - scope_schema_url (Union[Unset, str]): - scope_version (Union[Unset, str]): - service_name (Union[Unset, str]): - severity_number (Union[Unset, int]): - severity_text (Union[Unset, str]): - span_id (Union[Unset, str]): - timestamp (Union[Unset, str]): OTEL log message attributes - timestamp_date (Union[Unset, str]): - timestamp_time (Union[Unset, str]): - trace_flags (Union[Unset, int]): - trace_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + body (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + log_attributes (AppOtelLogRecordLogAttributes | Unset): + log_stream_id (str | Unset): + org_id (str | Unset): internal attributes + resource_attributes (AppOtelLogRecordResourceAttributes | Unset): + resource_schema_url (str | Unset): + runner_group_id (str | Unset): + runner_id (str | Unset): + runner_job_execution_id (str | Unset): + runner_job_execution_step (str | Unset): + runner_job_id (str | Unset): + scope_attributes (AppOtelLogRecordScopeAttributes | Unset): + scope_name (str | Unset): + scope_schema_url (str | Unset): + scope_version (str | Unset): + service_name (str | Unset): + severity_number (int | Unset): + severity_text (str | Unset): + span_id (str | Unset): + timestamp (str | Unset): OTEL log message attributes + timestamp_date (str | Unset): + timestamp_time (str | Unset): + trace_flags (int | Unset): + trace_id (str | Unset): + updated_at (str | Unset): """ - body: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - log_attributes: Union[Unset, "AppOtelLogRecordLogAttributes"] = UNSET - log_stream_id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - resource_attributes: Union[Unset, "AppOtelLogRecordResourceAttributes"] = UNSET - resource_schema_url: Union[Unset, str] = UNSET - runner_group_id: Union[Unset, str] = UNSET - runner_id: Union[Unset, str] = UNSET - runner_job_execution_id: Union[Unset, str] = UNSET - runner_job_execution_step: Union[Unset, str] = UNSET - runner_job_id: Union[Unset, str] = UNSET - scope_attributes: Union[Unset, "AppOtelLogRecordScopeAttributes"] = UNSET - scope_name: Union[Unset, str] = UNSET - scope_schema_url: Union[Unset, str] = UNSET - scope_version: Union[Unset, str] = UNSET - service_name: Union[Unset, str] = UNSET - severity_number: Union[Unset, int] = UNSET - severity_text: Union[Unset, str] = UNSET - span_id: Union[Unset, str] = UNSET - timestamp: Union[Unset, str] = UNSET - timestamp_date: Union[Unset, str] = UNSET - timestamp_time: Union[Unset, str] = UNSET - trace_flags: Union[Unset, int] = UNSET - trace_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + body: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + log_attributes: AppOtelLogRecordLogAttributes | Unset = UNSET + log_stream_id: str | Unset = UNSET + org_id: str | Unset = UNSET + resource_attributes: AppOtelLogRecordResourceAttributes | Unset = UNSET + resource_schema_url: str | Unset = UNSET + runner_group_id: str | Unset = UNSET + runner_id: str | Unset = UNSET + runner_job_execution_id: str | Unset = UNSET + runner_job_execution_step: str | Unset = UNSET + runner_job_id: str | Unset = UNSET + scope_attributes: AppOtelLogRecordScopeAttributes | Unset = UNSET + scope_name: str | Unset = UNSET + scope_schema_url: str | Unset = UNSET + scope_version: str | Unset = UNSET + service_name: str | Unset = UNSET + severity_number: int | Unset = UNSET + severity_text: str | Unset = UNSET + span_id: str | Unset = UNSET + timestamp: str | Unset = UNSET + timestamp_date: str | Unset = UNSET + timestamp_time: str | Unset = UNSET + trace_flags: int | Unset = UNSET + trace_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -88,7 +90,7 @@ def to_dict(self) -> dict[str, Any]: id = self.id - log_attributes: Union[Unset, dict[str, Any]] = UNSET + log_attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.log_attributes, Unset): log_attributes = self.log_attributes.to_dict() @@ -96,7 +98,7 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id - resource_attributes: Union[Unset, dict[str, Any]] = UNSET + resource_attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.resource_attributes, Unset): resource_attributes = self.resource_attributes.to_dict() @@ -112,7 +114,7 @@ def to_dict(self) -> dict[str, Any]: runner_job_id = self.runner_job_id - scope_attributes: Union[Unset, dict[str, Any]] = UNSET + scope_attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.scope_attributes, Unset): scope_attributes = self.scope_attributes.to_dict() @@ -220,7 +222,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _log_attributes = d.pop("log_attributes", UNSET) - log_attributes: Union[Unset, AppOtelLogRecordLogAttributes] + log_attributes: AppOtelLogRecordLogAttributes | Unset if isinstance(_log_attributes, Unset): log_attributes = UNSET else: @@ -231,7 +233,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _resource_attributes = d.pop("resource_attributes", UNSET) - resource_attributes: Union[Unset, AppOtelLogRecordResourceAttributes] + resource_attributes: AppOtelLogRecordResourceAttributes | Unset if isinstance(_resource_attributes, Unset): resource_attributes = UNSET else: @@ -250,7 +252,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_job_id = d.pop("runner_job_id", UNSET) _scope_attributes = d.pop("scope_attributes", UNSET) - scope_attributes: Union[Unset, AppOtelLogRecordScopeAttributes] + scope_attributes: AppOtelLogRecordScopeAttributes | Unset if isinstance(_scope_attributes, Unset): scope_attributes = UNSET else: diff --git a/nuon/models/app_otel_log_record_log_attributes.py b/nuon/models/app_otel_log_record_log_attributes.py index a76118b5..7a285cce 100644 --- a/nuon/models/app_otel_log_record_log_attributes.py +++ b/nuon/models/app_otel_log_record_log_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_otel_log_record_resource_attributes.py b/nuon/models/app_otel_log_record_resource_attributes.py index eb1a0d80..154d5379 100644 --- a/nuon/models/app_otel_log_record_resource_attributes.py +++ b/nuon/models/app_otel_log_record_resource_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_otel_log_record_scope_attributes.py b/nuon/models/app_otel_log_record_scope_attributes.py index 76262ec0..1a2bee81 100644 --- a/nuon/models/app_otel_log_record_scope_attributes.py +++ b/nuon/models/app_otel_log_record_scope_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_policy.py b/nuon/models/app_policy.py index d20c19ca..e9786e5c 100644 --- a/nuon/models/app_policy.py +++ b/nuon/models/app_policy.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,23 +20,22 @@ class AppPolicy: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - name (Union[Unset, AppPolicyName]): - permissions (Union[Unset, AppPolicyPermissions]): Permissions are used to track granular permissions for each - domain - role_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + name (AppPolicyName | Unset): + permissions (AppPolicyPermissions | Unset): Permissions are used to track granular permissions for each domain + role_id (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - name: Union[Unset, AppPolicyName] = UNSET - permissions: Union[Unset, "AppPolicyPermissions"] = UNSET - role_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + name: AppPolicyName | Unset = UNSET + permissions: AppPolicyPermissions | Unset = UNSET + role_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,11 +45,11 @@ def to_dict(self) -> dict[str, Any]: id = self.id - name: Union[Unset, str] = UNSET + name: str | Unset = UNSET if not isinstance(self.name, Unset): name = self.name.value - permissions: Union[Unset, dict[str, Any]] = UNSET + permissions: dict[str, Any] | Unset = UNSET if not isinstance(self.permissions, Unset): permissions = self.permissions.to_dict() @@ -88,14 +89,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _name = d.pop("name", UNSET) - name: Union[Unset, AppPolicyName] + name: AppPolicyName | Unset if isinstance(_name, Unset): name = UNSET else: name = AppPolicyName(_name) _permissions = d.pop("permissions", UNSET) - permissions: Union[Unset, AppPolicyPermissions] + permissions: AppPolicyPermissions | Unset if isinstance(_permissions, Unset): permissions = UNSET else: diff --git a/nuon/models/app_policy_permissions.py b/nuon/models/app_policy_permissions.py index b22dfa48..6554f224 100644 --- a/nuon/models/app_policy_permissions.py +++ b/nuon/models/app_policy_permissions.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_public_git_vcs_config.py b/nuon/models/app_public_git_vcs_config.py index 4b2c1e78..5d34d9a7 100644 --- a/nuon/models/app_public_git_vcs_config.py +++ b/nuon/models/app_public_git_vcs_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,26 +15,26 @@ class AppPublicGitVCSConfig: """ Attributes: - branch (Union[Unset, str]): - component_config_id (Union[Unset, str]): - component_config_type (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - directory (Union[Unset, str]): - id (Union[Unset, str]): - repo (Union[Unset, str]): actual configuration - updated_at (Union[Unset, str]): + branch (str | Unset): + component_config_id (str | Unset): + component_config_type (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + directory (str | Unset): + id (str | Unset): + repo (str | Unset): actual configuration + updated_at (str | Unset): """ - branch: Union[Unset, str] = UNSET - component_config_id: Union[Unset, str] = UNSET - component_config_type: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - directory: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - repo: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + branch: str | Unset = UNSET + component_config_id: str | Unset = UNSET + component_config_type: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + directory: str | Unset = UNSET + id: str | Unset = UNSET + repo: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_role.py b/nuon/models/app_role.py index f039d710..86f6ba8c 100644 --- a/nuon/models/app_role.py +++ b/nuon/models/app_role.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,26 +21,26 @@ class AppRole: """ Attributes: - created_by (Union[Unset, AppAccount]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - policies (Union[Unset, list['AppPolicy']]): - role_type (Union[Unset, AppRoleType]): - updated_at (Union[Unset, str]): + created_by (AppAccount | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + policies (list[AppPolicy] | Unset): + role_type (AppRoleType | Unset): + updated_at (str | Unset): """ - created_by: Union[Unset, "AppAccount"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - policies: Union[Unset, list["AppPolicy"]] = UNSET - role_type: Union[Unset, AppRoleType] = UNSET - updated_at: Union[Unset, str] = UNSET + created_by: AppAccount | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + policies: list[AppPolicy] | Unset = UNSET + role_type: AppRoleType | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - created_by: Union[Unset, dict[str, Any]] = UNSET + created_by: dict[str, Any] | Unset = UNSET if not isinstance(self.created_by, Unset): created_by = self.created_by.to_dict() @@ -48,14 +50,14 @@ def to_dict(self) -> dict[str, Any]: id = self.id - policies: Union[Unset, list[dict[str, Any]]] = UNSET + policies: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.policies, Unset): policies = [] for policies_item_data in self.policies: policies_item = policies_item_data.to_dict() policies.append(policies_item) - role_type: Union[Unset, str] = UNSET + role_type: str | Unset = UNSET if not isinstance(self.role_type, Unset): role_type = self.role_type.value @@ -88,7 +90,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _created_by = d.pop("createdBy", UNSET) - created_by: Union[Unset, AppAccount] + created_by: AppAccount | Unset if isinstance(_created_by, Unset): created_by = UNSET else: @@ -108,7 +110,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: policies.append(policies_item) _role_type = d.pop("role_type", UNSET) - role_type: Union[Unset, AppRoleType] + role_type: AppRoleType | Unset if isinstance(_role_type, Unset): role_type = UNSET else: diff --git a/nuon/models/app_runner.py b/nuon/models/app_runner.py index 90789613..323544dd 100644 --- a/nuon/models/app_runner.py +++ b/nuon/models/app_runner.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,36 +21,36 @@ class AppRunner: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - display_name (Union[Unset, str]): - id (Union[Unset, str]): - jobs (Union[Unset, list['AppRunnerJob']]): - 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]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + display_name (str | Unset): + id (str | Unset): + jobs (list[AppRunnerJob] | Unset): + name (str | Unset): + operations (list[AppRunnerOperation] | Unset): + org_id (str | Unset): + runner_group (AppRunnerGroup | Unset): + runner_group_id (str | Unset): + runner_job (AppRunnerJob | Unset): + status (str | Unset): + status_description (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - jobs: Union[Unset, list["AppRunnerJob"]] = UNSET - 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 - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + display_name: str | Unset = UNSET + id: str | Unset = UNSET + jobs: list[AppRunnerJob] | Unset = UNSET + name: str | Unset = UNSET + operations: list[AppRunnerOperation] | Unset = UNSET + org_id: str | Unset = UNSET + runner_group: AppRunnerGroup | Unset = UNSET + runner_group_id: str | Unset = UNSET + runner_job: AppRunnerJob | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -60,7 +62,7 @@ def to_dict(self) -> dict[str, Any]: id = self.id - jobs: Union[Unset, list[dict[str, Any]]] = UNSET + jobs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.jobs, Unset): jobs = [] for jobs_item_data in self.jobs: @@ -69,7 +71,7 @@ def to_dict(self) -> dict[str, Any]: name = self.name - operations: Union[Unset, list[dict[str, Any]]] = UNSET + operations: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.operations, Unset): operations = [] for operations_item_data in self.operations: @@ -78,13 +80,13 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id - runner_group: Union[Unset, dict[str, Any]] = UNSET + runner_group: dict[str, Any] | Unset = 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 + runner_job: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_job, Unset): runner_job = self.runner_job.to_dict() @@ -162,7 +164,7 @@ 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] + runner_group: AppRunnerGroup | Unset if isinstance(_runner_group, Unset): runner_group = UNSET else: @@ -171,7 +173,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_group_id = d.pop("runner_group_id", UNSET) _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] + runner_job: AppRunnerJob | Unset if isinstance(_runner_job, Unset): runner_job = UNSET else: diff --git a/nuon/models/app_runner_group.py b/nuon/models/app_runner_group.py index fa3e13fa..e8f3e919 100644 --- a/nuon/models/app_runner_group.py +++ b/nuon/models/app_runner_group.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,30 +22,30 @@ class AppRunnerGroup: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): parent can org, install or in the future, builtin runner group - owner_type (Union[Unset, str]): - platform (Union[Unset, AppAppRunnerType]): - runners (Union[Unset, list['AppRunner']]): - settings (Union[Unset, AppRunnerGroupSettings]): - type_ (Union[Unset, AppRunnerGroupType]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + owner_id (str | Unset): parent can org, install or in the future, builtin runner group + owner_type (str | Unset): + platform (AppAppRunnerType | Unset): + runners (list[AppRunner] | Unset): + settings (AppRunnerGroupSettings | Unset): + type_ (AppRunnerGroupType | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - platform: Union[Unset, AppAppRunnerType] = UNSET - runners: Union[Unset, list["AppRunner"]] = UNSET - settings: Union[Unset, "AppRunnerGroupSettings"] = UNSET - type_: Union[Unset, AppRunnerGroupType] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + platform: AppAppRunnerType | Unset = UNSET + runners: list[AppRunner] | Unset = UNSET + settings: AppRunnerGroupSettings | Unset = UNSET + type_: AppRunnerGroupType | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -59,22 +61,22 @@ def to_dict(self) -> dict[str, Any]: owner_type = self.owner_type - platform: Union[Unset, str] = UNSET + platform: str | Unset = UNSET if not isinstance(self.platform, Unset): platform = self.platform.value - runners: Union[Unset, list[dict[str, Any]]] = UNSET + runners: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.runners, Unset): runners = [] for runners_item_data in self.runners: runners_item = runners_item_data.to_dict() runners.append(runners_item) - settings: Union[Unset, dict[str, Any]] = UNSET + settings: dict[str, Any] | Unset = UNSET if not isinstance(self.settings, Unset): settings = self.settings.to_dict() - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -127,7 +129,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: owner_type = d.pop("owner_type", UNSET) _platform = d.pop("platform", UNSET) - platform: Union[Unset, AppAppRunnerType] + platform: AppAppRunnerType | Unset if isinstance(_platform, Unset): platform = UNSET else: @@ -141,14 +143,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runners.append(runners_item) _settings = d.pop("settings", UNSET) - settings: Union[Unset, AppRunnerGroupSettings] + settings: AppRunnerGroupSettings | Unset if isinstance(_settings, Unset): settings = UNSET else: settings = AppRunnerGroupSettings.from_dict(_settings) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppRunnerGroupType] + type_: AppRunnerGroupType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/app_runner_group_settings.py b/nuon/models/app_runner_group_settings.py index ea032b7e..3fd5c90d 100644 --- a/nuon/models/app_runner_group_settings.py +++ b/nuon/models/app_runner_group_settings.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,61 +20,61 @@ class AppRunnerGroupSettings: """ Attributes: - aws_cloudformation_stack_type (Union[Unset, str]): - aws_instance_type (Union[Unset, str]): aws runner specifics runner-v2 - aws_max_instance_lifetime (Union[Unset, int]): Default: 7 days - aws_tags (Union[Unset, AppRunnerGroupSettingsAwsTags]): - container_image_tag (Union[Unset, str]): - container_image_url (Union[Unset, str]): configuration for deploying the runner - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - enable_logging (Union[Unset, bool]): - enable_metrics (Union[Unset, bool]): - enable_sentry (Union[Unset, bool]): - groups (Union[Unset, list[str]]): the job loop groups the runner should poll for - heart_beat_timeout (Union[Unset, int]): Various settings for the runner to handle internally - id (Union[Unset, str]): - local_aws_iam_role_arn (Union[Unset, str]): - logging_level (Union[Unset, str]): - metadata (Union[Unset, AppRunnerGroupSettingsMetadata]): Metadata is used as both log and metric tags/attributes - in the runner when emitting data - org_aws_iam_role_arn (Union[Unset, str]): org runner specifics - org_id (Union[Unset, str]): - org_k8s_service_account_name (Union[Unset, str]): - otel_collector_config (Union[Unset, str]): - platform (Union[Unset, str]): platform variable for use in the runner - runner_api_url (Union[Unset, str]): - runner_group_id (Union[Unset, str]): - sandbox_mode (Union[Unset, bool]): configuration for managing the runner server side - updated_at (Union[Unset, str]): + aws_cloudformation_stack_type (str | Unset): + aws_instance_type (str | Unset): aws runner specifics runner-v2 + aws_max_instance_lifetime (int | Unset): Default: 7 days + aws_tags (AppRunnerGroupSettingsAwsTags | Unset): + container_image_tag (str | Unset): + container_image_url (str | Unset): configuration for deploying the runner + created_at (str | Unset): + created_by_id (str | Unset): + enable_logging (bool | Unset): + enable_metrics (bool | Unset): + enable_sentry (bool | Unset): + groups (list[str] | Unset): the job loop groups the runner should poll for + heart_beat_timeout (int | Unset): Various settings for the runner to handle internally + id (str | Unset): + local_aws_iam_role_arn (str | Unset): + logging_level (str | Unset): + metadata (AppRunnerGroupSettingsMetadata | Unset): Metadata is used as both log and metric tags/attributes in + the runner when emitting data + org_aws_iam_role_arn (str | Unset): org runner specifics + org_id (str | Unset): + org_k8s_service_account_name (str | Unset): + otel_collector_config (str | Unset): + platform (str | Unset): platform variable for use in the runner + runner_api_url (str | Unset): + runner_group_id (str | Unset): + sandbox_mode (bool | Unset): configuration for managing the runner server side + updated_at (str | Unset): """ - aws_cloudformation_stack_type: Union[Unset, str] = UNSET - aws_instance_type: Union[Unset, str] = UNSET - aws_max_instance_lifetime: Union[Unset, int] = UNSET - aws_tags: Union[Unset, "AppRunnerGroupSettingsAwsTags"] = UNSET - container_image_tag: Union[Unset, str] = UNSET - container_image_url: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - enable_logging: Union[Unset, bool] = UNSET - enable_metrics: Union[Unset, bool] = UNSET - enable_sentry: Union[Unset, bool] = UNSET - groups: Union[Unset, list[str]] = UNSET - heart_beat_timeout: Union[Unset, int] = UNSET - id: Union[Unset, str] = UNSET - local_aws_iam_role_arn: Union[Unset, str] = UNSET - logging_level: Union[Unset, str] = UNSET - metadata: Union[Unset, "AppRunnerGroupSettingsMetadata"] = UNSET - org_aws_iam_role_arn: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - org_k8s_service_account_name: Union[Unset, str] = UNSET - otel_collector_config: Union[Unset, str] = UNSET - platform: Union[Unset, str] = UNSET - runner_api_url: Union[Unset, str] = UNSET - runner_group_id: Union[Unset, str] = UNSET - sandbox_mode: Union[Unset, bool] = UNSET - updated_at: Union[Unset, str] = UNSET + aws_cloudformation_stack_type: str | Unset = UNSET + aws_instance_type: str | Unset = UNSET + aws_max_instance_lifetime: int | Unset = UNSET + aws_tags: AppRunnerGroupSettingsAwsTags | Unset = UNSET + container_image_tag: str | Unset = UNSET + container_image_url: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + enable_logging: bool | Unset = UNSET + enable_metrics: bool | Unset = UNSET + enable_sentry: bool | Unset = UNSET + groups: list[str] | Unset = UNSET + heart_beat_timeout: int | Unset = UNSET + id: str | Unset = UNSET + local_aws_iam_role_arn: str | Unset = UNSET + logging_level: str | Unset = UNSET + metadata: AppRunnerGroupSettingsMetadata | Unset = UNSET + org_aws_iam_role_arn: str | Unset = UNSET + org_id: str | Unset = UNSET + org_k8s_service_account_name: str | Unset = UNSET + otel_collector_config: str | Unset = UNSET + platform: str | Unset = UNSET + runner_api_url: str | Unset = UNSET + runner_group_id: str | Unset = UNSET + sandbox_mode: bool | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -82,7 +84,7 @@ def to_dict(self) -> dict[str, Any]: aws_max_instance_lifetime = self.aws_max_instance_lifetime - aws_tags: Union[Unset, dict[str, Any]] = UNSET + aws_tags: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_tags, Unset): aws_tags = self.aws_tags.to_dict() @@ -100,7 +102,7 @@ def to_dict(self) -> dict[str, Any]: enable_sentry = self.enable_sentry - groups: Union[Unset, list[str]] = UNSET + groups: list[str] | Unset = UNSET if not isinstance(self.groups, Unset): groups = self.groups @@ -112,7 +114,7 @@ def to_dict(self) -> dict[str, Any]: logging_level = self.logging_level - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -205,7 +207,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: aws_max_instance_lifetime = d.pop("aws_max_instance_lifetime", UNSET) _aws_tags = d.pop("aws_tags", UNSET) - aws_tags: Union[Unset, AppRunnerGroupSettingsAwsTags] + aws_tags: AppRunnerGroupSettingsAwsTags | Unset if isinstance(_aws_tags, Unset): aws_tags = UNSET else: @@ -236,7 +238,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: logging_level = d.pop("logging_level", UNSET) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppRunnerGroupSettingsMetadata] + metadata: AppRunnerGroupSettingsMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/nuon/models/app_runner_group_settings_aws_tags.py b/nuon/models/app_runner_group_settings_aws_tags.py index 29661cab..4f8e6a0c 100644 --- a/nuon/models/app_runner_group_settings_aws_tags.py +++ b/nuon/models/app_runner_group_settings_aws_tags.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_runner_group_settings_metadata.py b/nuon/models/app_runner_group_settings_metadata.py index 2ac06262..8f240f22 100644 --- a/nuon/models/app_runner_group_settings_metadata.py +++ b/nuon/models/app_runner_group_settings_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_runner_health_check.py b/nuon/models/app_runner_health_check.py index 3746f58b..39dcc639 100644 --- a/nuon/models/app_runner_health_check.py +++ b/nuon/models/app_runner_health_check.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,28 +20,28 @@ class AppRunnerHealthCheck: """ Attributes: - created_at (Union[Unset, str]): - 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]): - status_code (Union[Unset, int]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + minute_bucket (str | Unset): + process (str | Unset): + runner_id (str | Unset): + runner_job (AppRunnerJob | Unset): + status (AppRunnerStatus | Unset): + status_code (int | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - 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 - status_code: Union[Unset, int] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + minute_bucket: str | Unset = UNSET + process: str | Unset = UNSET + runner_id: str | Unset = UNSET + runner_job: AppRunnerJob | Unset = UNSET + status: AppRunnerStatus | Unset = UNSET + status_code: int | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,11 +57,11 @@ def to_dict(self) -> dict[str, Any]: runner_id = self.runner_id - runner_job: Union[Unset, dict[str, Any]] = UNSET + runner_job: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_job, Unset): runner_job = self.runner_job.to_dict() - status: Union[Unset, str] = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.value @@ -111,14 +113,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_id = d.pop("runner_id", UNSET) _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] + runner_job: AppRunnerJob | Unset if isinstance(_runner_job, Unset): runner_job = UNSET else: runner_job = AppRunnerJob.from_dict(_runner_job) _status = d.pop("status", UNSET) - status: Union[Unset, AppRunnerStatus] + status: AppRunnerStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/nuon/models/app_runner_heart_beat.py b/nuon/models/app_runner_heart_beat.py index 6be7b4cc..ac46c0ec 100644 --- a/nuon/models/app_runner_heart_beat.py +++ b/nuon/models/app_runner_heart_beat.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,26 +15,26 @@ class AppRunnerHeartBeat: """ Attributes: - alive_time (Union[Unset, int]): - 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]): - version (Union[Unset, str]): + alive_time (int | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + process (str | Unset): + runner_id (str | Unset): + started_at (str | Unset): + updated_at (str | Unset): + version (str | Unset): """ - alive_time: Union[Unset, int] = UNSET - 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 - version: Union[Unset, str] = UNSET + alive_time: int | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + process: str | Unset = UNSET + runner_id: str | Unset = UNSET + started_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + version: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_runner_job.py b/nuon/models/app_runner_job.py index 6509aa58..f8f7781b 100644 --- a/nuon/models/app_runner_job.py +++ b/nuon/models/app_runner_job.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,66 +25,66 @@ class AppRunnerJob: """ Attributes: - available_timeout (Union[Unset, int]): available timeout is how long a job can be marked as "available" before - being requeued - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - execution_count (Union[Unset, int]): - execution_time (Union[Unset, int]): - execution_timeout (Union[Unset, int]): execution timeout is how long a job can be marked as "exeucuting" before - being requeued - executions (Union[Unset, list['AppRunnerJobExecution']]): - final_runner_job_execution_id (Union[Unset, str]): - finished_at (Union[Unset, str]): - group (Union[Unset, AppRunnerJobGroup]): - id (Union[Unset, str]): - log_stream_id (Union[Unset, str]): - max_executions (Union[Unset, int]): - metadata (Union[Unset, AppRunnerJobMetadata]): - operation (Union[Unset, AppRunnerJobOperationType]): - org_id (Union[Unset, str]): - outputs (Union[Unset, AppRunnerJobOutputs]): - outputs_json (Union[Unset, str]): - overall_timeout (Union[Unset, int]): overall timeout is how long a job can be attempted, before being cancelled - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - queue_timeout (Union[Unset, int]): queue timeout is how long a job can be queued, before being made available - runner_id (Union[Unset, str]): - started_at (Union[Unset, str]): - status (Union[Unset, AppRunnerJobStatus]): - status_description (Union[Unset, str]): - type_ (Union[Unset, AppRunnerJobType]): - updated_at (Union[Unset, str]): + available_timeout (int | Unset): available timeout is how long a job can be marked as "available" before being + requeued + created_at (str | Unset): + created_by_id (str | Unset): + execution_count (int | Unset): + execution_time (int | Unset): + execution_timeout (int | Unset): execution timeout is how long a job can be marked as "exeucuting" before being + requeued + executions (list[AppRunnerJobExecution] | Unset): + final_runner_job_execution_id (str | Unset): + finished_at (str | Unset): + group (AppRunnerJobGroup | Unset): + id (str | Unset): + log_stream_id (str | Unset): + max_executions (int | Unset): + metadata (AppRunnerJobMetadata | Unset): + operation (AppRunnerJobOperationType | Unset): + org_id (str | Unset): + outputs (AppRunnerJobOutputs | Unset): + outputs_json (str | Unset): + overall_timeout (int | Unset): overall timeout is how long a job can be attempted, before being cancelled + owner_id (str | Unset): + owner_type (str | Unset): + queue_timeout (int | Unset): queue timeout is how long a job can be queued, before being made available + runner_id (str | Unset): + started_at (str | Unset): + status (AppRunnerJobStatus | Unset): + status_description (str | Unset): + type_ (AppRunnerJobType | Unset): + updated_at (str | Unset): """ - available_timeout: Union[Unset, int] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_count: Union[Unset, int] = UNSET - execution_time: Union[Unset, int] = UNSET - execution_timeout: Union[Unset, int] = UNSET - executions: Union[Unset, list["AppRunnerJobExecution"]] = UNSET - final_runner_job_execution_id: Union[Unset, str] = UNSET - finished_at: Union[Unset, str] = UNSET - group: Union[Unset, AppRunnerJobGroup] = UNSET - id: Union[Unset, str] = UNSET - log_stream_id: Union[Unset, str] = UNSET - max_executions: Union[Unset, int] = UNSET - metadata: Union[Unset, "AppRunnerJobMetadata"] = UNSET - operation: Union[Unset, AppRunnerJobOperationType] = UNSET - org_id: Union[Unset, str] = UNSET - outputs: Union[Unset, "AppRunnerJobOutputs"] = UNSET - outputs_json: Union[Unset, str] = UNSET - overall_timeout: Union[Unset, int] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - queue_timeout: Union[Unset, int] = UNSET - runner_id: Union[Unset, str] = UNSET - started_at: Union[Unset, str] = UNSET - status: Union[Unset, AppRunnerJobStatus] = UNSET - status_description: Union[Unset, str] = UNSET - type_: Union[Unset, AppRunnerJobType] = UNSET - updated_at: Union[Unset, str] = UNSET + available_timeout: int | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + execution_count: int | Unset = UNSET + execution_time: int | Unset = UNSET + execution_timeout: int | Unset = UNSET + executions: list[AppRunnerJobExecution] | Unset = UNSET + final_runner_job_execution_id: str | Unset = UNSET + finished_at: str | Unset = UNSET + group: AppRunnerJobGroup | Unset = UNSET + id: str | Unset = UNSET + log_stream_id: str | Unset = UNSET + max_executions: int | Unset = UNSET + metadata: AppRunnerJobMetadata | Unset = UNSET + operation: AppRunnerJobOperationType | Unset = UNSET + org_id: str | Unset = UNSET + outputs: AppRunnerJobOutputs | Unset = UNSET + outputs_json: str | Unset = UNSET + overall_timeout: int | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + queue_timeout: int | Unset = UNSET + runner_id: str | Unset = UNSET + started_at: str | Unset = UNSET + status: AppRunnerJobStatus | Unset = UNSET + status_description: str | Unset = UNSET + type_: AppRunnerJobType | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -98,7 +100,7 @@ def to_dict(self) -> dict[str, Any]: execution_timeout = self.execution_timeout - executions: Union[Unset, list[dict[str, Any]]] = UNSET + executions: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.executions, Unset): executions = [] for executions_item_data in self.executions: @@ -109,7 +111,7 @@ def to_dict(self) -> dict[str, Any]: finished_at = self.finished_at - group: Union[Unset, str] = UNSET + group: str | Unset = UNSET if not isinstance(self.group, Unset): group = self.group.value @@ -119,17 +121,17 @@ def to_dict(self) -> dict[str, Any]: max_executions = self.max_executions - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() - operation: Union[Unset, str] = UNSET + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.operation.value org_id = self.org_id - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() @@ -147,13 +149,13 @@ def to_dict(self) -> dict[str, Any]: started_at = self.started_at - status: Union[Unset, str] = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.value status_description = self.status_description - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -252,7 +254,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: finished_at = d.pop("finished_at", UNSET) _group = d.pop("group", UNSET) - group: Union[Unset, AppRunnerJobGroup] + group: AppRunnerJobGroup | Unset if isinstance(_group, Unset): group = UNSET else: @@ -265,14 +267,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: max_executions = d.pop("max_executions", UNSET) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppRunnerJobMetadata] + metadata: AppRunnerJobMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: metadata = AppRunnerJobMetadata.from_dict(_metadata) _operation = d.pop("operation", UNSET) - operation: Union[Unset, AppRunnerJobOperationType] + operation: AppRunnerJobOperationType | Unset if isinstance(_operation, Unset): operation = UNSET else: @@ -281,7 +283,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppRunnerJobOutputs] + outputs: AppRunnerJobOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: @@ -302,7 +304,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: started_at = d.pop("started_at", UNSET) _status = d.pop("status", UNSET) - status: Union[Unset, AppRunnerJobStatus] + status: AppRunnerJobStatus | Unset if isinstance(_status, Unset): status = UNSET else: @@ -311,7 +313,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status_description = d.pop("status_description", UNSET) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppRunnerJobType] + type_: AppRunnerJobType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/app_runner_job_execution.py b/nuon/models/app_runner_job_execution.py index 508d6585..1f541e5d 100644 --- a/nuon/models/app_runner_job_execution.py +++ b/nuon/models/app_runner_job_execution.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,26 +21,26 @@ class AppRunnerJobExecution: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - outputs (Union[Unset, AppRunnerJobExecutionOutputs]): - result (Union[Unset, AppRunnerJobExecutionResult]): - runner_job_id (Union[Unset, str]): - status (Union[Unset, AppRunnerJobExecutionStatus]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + outputs (AppRunnerJobExecutionOutputs | Unset): + result (AppRunnerJobExecutionResult | Unset): + runner_job_id (str | Unset): + status (AppRunnerJobExecutionStatus | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - outputs: Union[Unset, "AppRunnerJobExecutionOutputs"] = UNSET - result: Union[Unset, "AppRunnerJobExecutionResult"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - status: Union[Unset, AppRunnerJobExecutionStatus] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + outputs: AppRunnerJobExecutionOutputs | Unset = UNSET + result: AppRunnerJobExecutionResult | Unset = UNSET + runner_job_id: str | Unset = UNSET + status: AppRunnerJobExecutionStatus | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,17 +52,17 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() - result: Union[Unset, dict[str, Any]] = UNSET + result: dict[str, Any] | Unset = UNSET if not isinstance(self.result, Unset): result = self.result.to_dict() runner_job_id = self.runner_job_id - status: Union[Unset, str] = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.value @@ -105,14 +107,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppRunnerJobExecutionOutputs] + outputs: AppRunnerJobExecutionOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: outputs = AppRunnerJobExecutionOutputs.from_dict(_outputs) _result = d.pop("result", UNSET) - result: Union[Unset, AppRunnerJobExecutionResult] + result: AppRunnerJobExecutionResult | Unset if isinstance(_result, Unset): result = UNSET else: @@ -121,7 +123,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_job_id = d.pop("runner_job_id", UNSET) _status = d.pop("status", UNSET) - status: Union[Unset, AppRunnerJobExecutionStatus] + status: AppRunnerJobExecutionStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/nuon/models/app_runner_job_execution_outputs.py b/nuon/models/app_runner_job_execution_outputs.py index 00c1c69b..736e0eb3 100644 --- a/nuon/models/app_runner_job_execution_outputs.py +++ b/nuon/models/app_runner_job_execution_outputs.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,24 +19,24 @@ class AppRunnerJobExecutionOutputs: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - outputs (Union[Unset, AppRunnerJobExecutionOutputsOutputs]): - outputs_json (Union[Unset, str]): - runner_job_execution_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + outputs (AppRunnerJobExecutionOutputsOutputs | Unset): + outputs_json (str | Unset): + runner_job_execution_id (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - outputs: Union[Unset, "AppRunnerJobExecutionOutputsOutputs"] = UNSET - outputs_json: Union[Unset, str] = UNSET - runner_job_execution_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + outputs: AppRunnerJobExecutionOutputsOutputs | Unset = UNSET + outputs_json: str | Unset = UNSET + runner_job_execution_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: org_id = self.org_id - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() @@ -92,7 +94,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: org_id = d.pop("org_id", UNSET) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, AppRunnerJobExecutionOutputsOutputs] + outputs: AppRunnerJobExecutionOutputsOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: diff --git a/nuon/models/app_runner_job_execution_outputs_outputs.py b/nuon/models/app_runner_job_execution_outputs_outputs.py index bbbd229f..4218e900 100644 --- a/nuon/models/app_runner_job_execution_outputs_outputs.py +++ b/nuon/models/app_runner_job_execution_outputs_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -17,7 +19,7 @@ class AppRunnerJobExecutionOutputsOutputs: """ """ - additional_properties: dict[str, "AppRunnerJobExecutionOutputsOutputsAdditionalProperty"] = _attrs_field( + additional_properties: dict[str, AppRunnerJobExecutionOutputsOutputsAdditionalProperty] = _attrs_field( init=False, factory=dict ) @@ -50,10 +52,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) -> "AppRunnerJobExecutionOutputsOutputsAdditionalProperty": + def __getitem__(self, key: str) -> AppRunnerJobExecutionOutputsOutputsAdditionalProperty: return self.additional_properties[key] - def __setitem__(self, key: str, value: "AppRunnerJobExecutionOutputsOutputsAdditionalProperty") -> None: + def __setitem__(self, key: str, value: AppRunnerJobExecutionOutputsOutputsAdditionalProperty) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py b/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py index 908a5ba5..0788834e 100644 --- a/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py +++ b/nuon/models/app_runner_job_execution_outputs_outputs_additional_property.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_runner_job_execution_result.py b/nuon/models/app_runner_job_execution_result.py index 2ebe695b..a08f5468 100644 --- a/nuon/models/app_runner_job_execution_result.py +++ b/nuon/models/app_runner_job_execution_result.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,34 +19,34 @@ class AppRunnerJobExecutionResult: """ Attributes: - contents (Union[Unset, str]): - contents_display (Union[Unset, str]): - contents_display_gzip (Union[Unset, str]): - contents_gzip (Union[Unset, str]): columns for storage of gzipped contents and plans - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - error_code (Union[Unset, int]): - error_metadata (Union[Unset, AppRunnerJobExecutionResultErrorMetadata]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - runner_job_execution_id (Union[Unset, str]): - success (Union[Unset, bool]): - updated_at (Union[Unset, str]): + contents (str | Unset): + contents_display (str | Unset): + contents_display_gzip (str | Unset): + contents_gzip (str | Unset): columns for storage of gzipped contents and plans + created_at (str | Unset): + created_by_id (str | Unset): + error_code (int | Unset): + error_metadata (AppRunnerJobExecutionResultErrorMetadata | Unset): + id (str | Unset): + org_id (str | Unset): + runner_job_execution_id (str | Unset): + success (bool | Unset): + updated_at (str | Unset): """ - contents: Union[Unset, str] = UNSET - contents_display: Union[Unset, str] = UNSET - contents_display_gzip: Union[Unset, str] = UNSET - contents_gzip: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - error_code: Union[Unset, int] = UNSET - error_metadata: Union[Unset, "AppRunnerJobExecutionResultErrorMetadata"] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - runner_job_execution_id: Union[Unset, str] = UNSET - success: Union[Unset, bool] = UNSET - updated_at: Union[Unset, str] = UNSET + contents: str | Unset = UNSET + contents_display: str | Unset = UNSET + contents_display_gzip: str | Unset = UNSET + contents_gzip: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + error_code: int | Unset = UNSET + error_metadata: AppRunnerJobExecutionResultErrorMetadata | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + runner_job_execution_id: str | Unset = UNSET + success: bool | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -62,7 +64,7 @@ def to_dict(self) -> dict[str, Any]: error_code = self.error_code - error_metadata: Union[Unset, dict[str, Any]] = UNSET + error_metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.error_metadata, Unset): error_metadata = self.error_metadata.to_dict() @@ -128,7 +130,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: error_code = d.pop("error_code", UNSET) _error_metadata = d.pop("error_metadata", UNSET) - error_metadata: Union[Unset, AppRunnerJobExecutionResultErrorMetadata] + error_metadata: AppRunnerJobExecutionResultErrorMetadata | Unset if isinstance(_error_metadata, Unset): error_metadata = UNSET else: diff --git a/nuon/models/app_runner_job_execution_result_error_metadata.py b/nuon/models/app_runner_job_execution_result_error_metadata.py index 1c5efc8c..c1652bd9 100644 --- a/nuon/models/app_runner_job_execution_result_error_metadata.py +++ b/nuon/models/app_runner_job_execution_result_error_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_runner_job_metadata.py b/nuon/models/app_runner_job_metadata.py index af0e61b4..b7ec3c7a 100644 --- a/nuon/models/app_runner_job_metadata.py +++ b/nuon/models/app_runner_job_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_runner_job_outputs.py b/nuon/models/app_runner_job_outputs.py index 63ce8ca0..c1bed9a6 100644 --- a/nuon/models/app_runner_job_outputs.py +++ b/nuon/models/app_runner_job_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_runner_operation.py b/nuon/models/app_runner_operation.py index b327004a..ab095b9b 100644 --- a/nuon/models/app_runner_operation.py +++ b/nuon/models/app_runner_operation.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,26 +20,26 @@ class AppRunnerOperation: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - log_stream (Union[Unset, AppLogStream]): - operation_type (Union[Unset, AppRunnerOperationType]): - runner_id (Union[Unset, str]): - status (Union[Unset, str]): - status_description (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + log_stream (AppLogStream | Unset): + operation_type (AppRunnerOperationType | Unset): + runner_id (str | Unset): + status (str | Unset): + status_description (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - log_stream: Union[Unset, "AppLogStream"] = UNSET - operation_type: Union[Unset, AppRunnerOperationType] = UNSET - runner_id: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - status_description: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + log_stream: AppLogStream | Unset = UNSET + operation_type: AppRunnerOperationType | Unset = UNSET + runner_id: str | Unset = UNSET + status: str | Unset = UNSET + status_description: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -47,11 +49,11 @@ def to_dict(self) -> dict[str, Any]: id = self.id - log_stream: Union[Unset, dict[str, Any]] = UNSET + log_stream: dict[str, Any] | Unset = UNSET if not isinstance(self.log_stream, Unset): log_stream = self.log_stream.to_dict() - operation_type: Union[Unset, str] = UNSET + operation_type: str | Unset = UNSET if not isinstance(self.operation_type, Unset): operation_type = self.operation_type.value @@ -99,14 +101,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _log_stream = d.pop("log_stream", UNSET) - log_stream: Union[Unset, AppLogStream] + log_stream: AppLogStream | Unset if isinstance(_log_stream, Unset): log_stream = UNSET else: log_stream = AppLogStream.from_dict(_log_stream) _operation_type = d.pop("operation_type", UNSET) - operation_type: Union[Unset, AppRunnerOperationType] + operation_type: AppRunnerOperationType | Unset if isinstance(_operation_type, Unset): operation_type = UNSET else: diff --git a/nuon/models/app_terraform_lock.py b/nuon/models/app_terraform_lock.py index 07595a65..e0085a63 100644 --- a/nuon/models/app_terraform_lock.py +++ b/nuon/models/app_terraform_lock.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,22 +15,22 @@ class AppTerraformLock: """ Attributes: - created (Union[Unset, str]): - id (Union[Unset, str]): - info (Union[Unset, str]): - operation (Union[Unset, str]): - path (Union[Unset, str]): - version (Union[Unset, Any]): - who (Union[Unset, str]): + created (str | Unset): + id (str | Unset): + info (str | Unset): + operation (str | Unset): + path (str | Unset): + version (Any | Unset): + who (str | Unset): """ - created: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - info: Union[Unset, str] = UNSET - operation: Union[Unset, str] = UNSET - path: Union[Unset, str] = UNSET - version: Union[Unset, Any] = UNSET - who: Union[Unset, str] = UNSET + created: str | Unset = UNSET + id: str | Unset = UNSET + info: str | Unset = UNSET + operation: str | Unset = UNSET + path: str | Unset = UNSET + version: Any | Unset = UNSET + who: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_terraform_module_component_config.py b/nuon/models/app_terraform_module_component_config.py index fdfbcf50..d91646e2 100644 --- a/nuon/models/app_terraform_module_component_config.py +++ b/nuon/models/app_terraform_module_component_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,36 +22,36 @@ class AppTerraformModuleComponentConfig: """ Attributes: - component_config_connection_id (Union[Unset, str]): parent reference - connected_github_vcs_config (Union[Unset, AppConnectedGithubVCSConfig]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - env_vars (Union[Unset, AppTerraformModuleComponentConfigEnvVars]): - id (Union[Unset, str]): - public_git_vcs_config (Union[Unset, AppPublicGitVCSConfig]): - updated_at (Union[Unset, str]): - variables (Union[Unset, AppTerraformModuleComponentConfigVariables]): - variables_files (Union[Unset, list[str]]): - version (Union[Unset, str]): terraform configuration values + component_config_connection_id (str | Unset): parent reference + connected_github_vcs_config (AppConnectedGithubVCSConfig | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + env_vars (AppTerraformModuleComponentConfigEnvVars | Unset): + id (str | Unset): + public_git_vcs_config (AppPublicGitVCSConfig | Unset): + updated_at (str | Unset): + variables (AppTerraformModuleComponentConfigVariables | Unset): + variables_files (list[str] | Unset): + version (str | Unset): terraform configuration values """ - component_config_connection_id: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "AppConnectedGithubVCSConfig"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "AppTerraformModuleComponentConfigEnvVars"] = UNSET - id: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "AppPublicGitVCSConfig"] = UNSET - updated_at: Union[Unset, str] = UNSET - variables: Union[Unset, "AppTerraformModuleComponentConfigVariables"] = UNSET - variables_files: Union[Unset, list[str]] = UNSET - version: Union[Unset, str] = UNSET + component_config_connection_id: str | Unset = UNSET + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + env_vars: AppTerraformModuleComponentConfigEnvVars | Unset = UNSET + id: str | Unset = UNSET + public_git_vcs_config: AppPublicGitVCSConfig | Unset = UNSET + updated_at: str | Unset = UNSET + variables: AppTerraformModuleComponentConfigVariables | Unset = UNSET + variables_files: list[str] | Unset = UNSET + version: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: component_config_connection_id = self.component_config_connection_id - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() @@ -57,23 +59,23 @@ def to_dict(self) -> dict[str, Any]: created_by_id = self.created_by_id - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() id = self.id - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.public_git_vcs_config, Unset): public_git_vcs_config = self.public_git_vcs_config.to_dict() updated_at = self.updated_at - variables: Union[Unset, dict[str, Any]] = UNSET + variables: dict[str, Any] | Unset = UNSET if not isinstance(self.variables, Unset): variables = self.variables.to_dict() - variables_files: Union[Unset, list[str]] = UNSET + variables_files: list[str] | Unset = UNSET if not isinstance(self.variables_files, Unset): variables_files = self.variables_files @@ -118,7 +120,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: component_config_connection_id = d.pop("component_config_connection_id", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, AppConnectedGithubVCSConfig] + connected_github_vcs_config: AppConnectedGithubVCSConfig | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -129,7 +131,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_by_id = d.pop("created_by_id", UNSET) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, AppTerraformModuleComponentConfigEnvVars] + env_vars: AppTerraformModuleComponentConfigEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: @@ -138,7 +140,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, AppPublicGitVCSConfig] + public_git_vcs_config: AppPublicGitVCSConfig | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: @@ -147,7 +149,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _variables = d.pop("variables", UNSET) - variables: Union[Unset, AppTerraformModuleComponentConfigVariables] + variables: AppTerraformModuleComponentConfigVariables | Unset if isinstance(_variables, Unset): variables = UNSET else: diff --git a/nuon/models/app_terraform_module_component_config_env_vars.py b/nuon/models/app_terraform_module_component_config_env_vars.py index eaeb8778..a63dcfad 100644 --- a/nuon/models/app_terraform_module_component_config_env_vars.py +++ b/nuon/models/app_terraform_module_component_config_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_terraform_module_component_config_variables.py b/nuon/models/app_terraform_module_component_config_variables.py index 6be5d8b3..839e0437 100644 --- a/nuon/models/app_terraform_module_component_config_variables.py +++ b/nuon/models/app_terraform_module_component_config_variables.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_terraform_state_instance.py b/nuon/models/app_terraform_state_instance.py index 4ea01d7d..1b9d1689 100644 --- a/nuon/models/app_terraform_state_instance.py +++ b/nuon/models/app_terraform_state_instance.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,24 +19,24 @@ class AppTerraformStateInstance: """ Attributes: - attributes (Union[Unset, AppTerraformStateInstanceAttributes]): - schema_version (Union[Unset, int]): - sensitive_attributes (Union[Unset, list[Any]]): + attributes (AppTerraformStateInstanceAttributes | Unset): + schema_version (int | Unset): + sensitive_attributes (list[Any] | Unset): """ - attributes: Union[Unset, "AppTerraformStateInstanceAttributes"] = UNSET - schema_version: Union[Unset, int] = UNSET - sensitive_attributes: Union[Unset, list[Any]] = UNSET + attributes: AppTerraformStateInstanceAttributes | Unset = UNSET + schema_version: int | Unset = UNSET + sensitive_attributes: list[Any] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - attributes: Union[Unset, dict[str, Any]] = UNSET + attributes: dict[str, Any] | Unset = UNSET if not isinstance(self.attributes, Unset): attributes = self.attributes.to_dict() schema_version = self.schema_version - sensitive_attributes: Union[Unset, list[Any]] = UNSET + sensitive_attributes: list[Any] | Unset = UNSET if not isinstance(self.sensitive_attributes, Unset): sensitive_attributes = self.sensitive_attributes @@ -56,7 +58,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _attributes = d.pop("attributes", UNSET) - attributes: Union[Unset, AppTerraformStateInstanceAttributes] + attributes: AppTerraformStateInstanceAttributes | Unset if isinstance(_attributes, Unset): attributes = UNSET else: diff --git a/nuon/models/app_terraform_state_instance_attributes.py b/nuon/models/app_terraform_state_instance_attributes.py index 9c9c3294..238bbcfe 100644 --- a/nuon/models/app_terraform_state_instance_attributes.py +++ b/nuon/models/app_terraform_state_instance_attributes.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_terraform_state_resource.py b/nuon/models/app_terraform_state_resource.py index f0b75eb8..99f48f07 100644 --- a/nuon/models/app_terraform_state_resource.py +++ b/nuon/models/app_terraform_state_resource.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,22 +19,22 @@ class AppTerraformStateResource: """ Attributes: - instances (Union[Unset, list['AppTerraformStateInstance']]): - mode (Union[Unset, str]): - name (Union[Unset, str]): - provider (Union[Unset, str]): - type_ (Union[Unset, str]): + instances (list[AppTerraformStateInstance] | Unset): + mode (str | Unset): + name (str | Unset): + provider (str | Unset): + type_ (str | Unset): """ - instances: Union[Unset, list["AppTerraformStateInstance"]] = UNSET - mode: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - provider: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET + instances: list[AppTerraformStateInstance] | Unset = UNSET + mode: str | Unset = UNSET + name: str | Unset = UNSET + provider: str | Unset = UNSET + type_: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - instances: Union[Unset, list[dict[str, Any]]] = UNSET + instances: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.instances, Unset): instances = [] for instances_item_data in self.instances: diff --git a/nuon/models/app_terraform_workspace.py b/nuon/models/app_terraform_workspace.py index 8bf33dc7..70187e41 100644 --- a/nuon/models/app_terraform_workspace.py +++ b/nuon/models/app_terraform_workspace.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,22 +15,22 @@ class AppTerraformWorkspace: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + owner_id (str | Unset): + owner_type (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_terraform_workspace_lock.py b/nuon/models/app_terraform_workspace_lock.py index d670a470..fa9f7ee5 100644 --- a/nuon/models/app_terraform_workspace_lock.py +++ b/nuon/models/app_terraform_workspace_lock.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,25 +20,25 @@ class AppTerraformWorkspaceLock: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - lock (Union[Unset, AppTerraformLock]): - runner_job (Union[Unset, AppRunnerJob]): - runner_job_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - workspace_id (Union[Unset, str]): Foreign key to TerraformWorkspace with unique constraint to prevent multiple - active locks + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + lock (AppTerraformLock | Unset): + runner_job (AppRunnerJob | Unset): + runner_job_id (str | Unset): + updated_at (str | Unset): + workspace_id (str | Unset): Foreign key to TerraformWorkspace with unique constraint to prevent multiple active + locks """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - lock: Union[Unset, "AppTerraformLock"] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workspace_id: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + lock: AppTerraformLock | Unset = UNSET + runner_job: AppRunnerJob | Unset = UNSET + runner_job_id: str | Unset = UNSET + updated_at: str | Unset = UNSET + workspace_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,11 +48,11 @@ def to_dict(self) -> dict[str, Any]: id = self.id - lock: Union[Unset, dict[str, Any]] = UNSET + lock: dict[str, Any] | Unset = UNSET if not isinstance(self.lock, Unset): lock = self.lock.to_dict() - runner_job: Union[Unset, dict[str, Any]] = UNSET + runner_job: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_job, Unset): runner_job = self.runner_job.to_dict() @@ -95,14 +97,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _lock = d.pop("lock", UNSET) - lock: Union[Unset, AppTerraformLock] + lock: AppTerraformLock | Unset if isinstance(_lock, Unset): lock = UNSET else: lock = AppTerraformLock.from_dict(_lock) _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] + runner_job: AppRunnerJob | Unset if isinstance(_runner_job, Unset): runner_job = UNSET else: diff --git a/nuon/models/app_terraform_workspace_state.py b/nuon/models/app_terraform_workspace_state.py index 743a551f..b8dbceb3 100644 --- a/nuon/models/app_terraform_workspace_state.py +++ b/nuon/models/app_terraform_workspace_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,34 +20,34 @@ class AppTerraformWorkspaceState: """ Attributes: - contents (Union[Unset, list[int]]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_id (Union[Unset, str]): - revision (Union[Unset, int]): - runner_job (Union[Unset, AppRunnerJob]): - runner_job_id (Union[Unset, str]): - terraform_workspace (Union[Unset, AppTerraformWorkspace]): - terraform_workspace_id (Union[Unset, str]): - updated_at (Union[Unset, str]): + contents (list[int] | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_id (str | Unset): + revision (int | Unset): + runner_job (AppRunnerJob | Unset): + runner_job_id (str | Unset): + terraform_workspace (AppTerraformWorkspace | Unset): + terraform_workspace_id (str | Unset): + updated_at (str | Unset): """ - contents: Union[Unset, list[int]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_id: Union[Unset, str] = UNSET - revision: Union[Unset, int] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - terraform_workspace: Union[Unset, "AppTerraformWorkspace"] = UNSET - terraform_workspace_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + contents: list[int] | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_id: str | Unset = UNSET + revision: int | Unset = UNSET + runner_job: AppRunnerJob | Unset = UNSET + runner_job_id: str | Unset = UNSET + terraform_workspace: AppTerraformWorkspace | Unset = UNSET + terraform_workspace_id: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - contents: Union[Unset, list[int]] = UNSET + contents: list[int] | Unset = UNSET if not isinstance(self.contents, Unset): contents = self.contents @@ -59,13 +61,13 @@ def to_dict(self) -> dict[str, Any]: revision = self.revision - runner_job: Union[Unset, dict[str, Any]] = UNSET + runner_job: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_job, Unset): runner_job = self.runner_job.to_dict() runner_job_id = self.runner_job_id - terraform_workspace: Union[Unset, dict[str, Any]] = UNSET + terraform_workspace: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform_workspace, Unset): terraform_workspace = self.terraform_workspace.to_dict() @@ -120,7 +122,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: revision = d.pop("revision", UNSET) _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] + runner_job: AppRunnerJob | Unset if isinstance(_runner_job, Unset): runner_job = UNSET else: @@ -129,7 +131,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_job_id = d.pop("runner_job_id", UNSET) _terraform_workspace = d.pop("terraform_workspace", UNSET) - terraform_workspace: Union[Unset, AppTerraformWorkspace] + terraform_workspace: AppTerraformWorkspace | Unset if isinstance(_terraform_workspace, Unset): terraform_workspace = UNSET else: diff --git a/nuon/models/app_terraform_workspace_state_json.py b/nuon/models/app_terraform_workspace_state_json.py index 80a90ec6..9a1a5932 100644 --- a/nuon/models/app_terraform_workspace_state_json.py +++ b/nuon/models/app_terraform_workspace_state_json.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,29 +19,29 @@ class AppTerraformWorkspaceStateJSON: """ Attributes: - contents (Union[Unset, list[int]]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - runner_job (Union[Unset, AppRunnerJob]): - runner_job_id (Union[Unset, str]): - updated_at (Union[Unset, str]): - workspace_id (Union[Unset, str]): Foreign key to TerraformWorkspace with unique constraint to prevent - conflicting states for a workspace + contents (list[int] | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + runner_job (AppRunnerJob | Unset): + runner_job_id (str | Unset): + updated_at (str | Unset): + workspace_id (str | Unset): Foreign key to TerraformWorkspace with unique constraint to prevent conflicting + states for a workspace """ - contents: Union[Unset, list[int]] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workspace_id: Union[Unset, str] = UNSET + contents: list[int] | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + runner_job: AppRunnerJob | Unset = UNSET + runner_job_id: str | Unset = UNSET + updated_at: str | Unset = UNSET + workspace_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - contents: Union[Unset, list[int]] = UNSET + contents: list[int] | Unset = UNSET if not isinstance(self.contents, Unset): contents = self.contents @@ -49,7 +51,7 @@ def to_dict(self) -> dict[str, Any]: id = self.id - runner_job: Union[Unset, dict[str, Any]] = UNSET + runner_job: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_job, Unset): runner_job = self.runner_job.to_dict() @@ -95,7 +97,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] + runner_job: AppRunnerJob | Unset if isinstance(_runner_job, Unset): runner_job = UNSET else: diff --git a/nuon/models/app_user_journey.py b/nuon/models/app_user_journey.py index aa47d6e0..a7acec09 100644 --- a/nuon/models/app_user_journey.py +++ b/nuon/models/app_user_journey.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,20 +19,20 @@ class AppUserJourney: """ Attributes: - name (Union[Unset, str]): - steps (Union[Unset, list['AppUserJourneyStep']]): - title (Union[Unset, str]): + name (str | Unset): + steps (list[AppUserJourneyStep] | Unset): + title (str | Unset): """ - name: Union[Unset, str] = UNSET - steps: Union[Unset, list["AppUserJourneyStep"]] = UNSET - title: Union[Unset, str] = UNSET + name: str | Unset = UNSET + steps: list[AppUserJourneyStep] | Unset = UNSET + title: str | Unset = 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 + steps: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.steps, Unset): steps = [] for steps_item_data in self.steps: diff --git a/nuon/models/app_user_journey_step.py b/nuon/models/app_user_journey_step.py index 02875c80..f39a309c 100644 --- a/nuon/models/app_user_journey_step.py +++ b/nuon/models/app_user_journey_step.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,22 +19,22 @@ 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 (bool | Unset): + completed_at (str | Unset): Top-level completion tracking fields + completion_method (str | Unset): + completion_source (str | Unset): + metadata (AppUserJourneyStepMetadata | Unset): Flexible metadata for business data + name (str | Unset): + title (str | Unset): """ - 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 + complete: bool | Unset = UNSET + completed_at: str | Unset = UNSET + completion_method: str | Unset = UNSET + completion_source: str | Unset = UNSET + metadata: AppUserJourneyStepMetadata | Unset = UNSET + name: str | Unset = UNSET + title: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -44,7 +46,7 @@ def to_dict(self) -> dict[str, Any]: completion_source = self.completion_source - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -86,7 +88,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: completion_source = d.pop("completion_source", UNSET) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppUserJourneyStepMetadata] + metadata: AppUserJourneyStepMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/nuon/models/app_user_journey_step_metadata.py b/nuon/models/app_user_journey_step_metadata.py index bb98982e..ec6a719d 100644 --- a/nuon/models/app_user_journey_step_metadata.py +++ b/nuon/models/app_user_journey_step_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_vcs_connection.py b/nuon/models/app_vcs_connection.py index 77ffc23a..63d0eafb 100644 --- a/nuon/models/app_vcs_connection.py +++ b/nuon/models/app_vcs_connection.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,24 +19,24 @@ 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]): - vcs_connection_commit (Union[Unset, list['AppVCSConnectionCommit']]): + created_at (str | Unset): + created_by_id (str | Unset): + github_account_id (str | Unset): + github_account_name (str | Unset): + github_install_id (str | Unset): + id (str | Unset): + updated_at (str | Unset): + vcs_connection_commit (list[AppVCSConnectionCommit] | Unset): """ - 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 - vcs_connection_commit: Union[Unset, list["AppVCSConnectionCommit"]] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + github_account_id: str | Unset = UNSET + github_account_name: str | Unset = UNSET + github_install_id: str | Unset = UNSET + id: str | Unset = UNSET + updated_at: str | Unset = UNSET + vcs_connection_commit: list[AppVCSConnectionCommit] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,7 +54,7 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - vcs_connection_commit: Union[Unset, list[dict[str, Any]]] = UNSET + vcs_connection_commit: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.vcs_connection_commit, Unset): vcs_connection_commit = [] for vcs_connection_commit_item_data in self.vcs_connection_commit: diff --git a/nuon/models/app_vcs_connection_commit.py b/nuon/models/app_vcs_connection_commit.py index 6c8203a3..bca39812 100644 --- a/nuon/models/app_vcs_connection_commit.py +++ b/nuon/models/app_vcs_connection_commit.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,26 +15,26 @@ class AppVCSConnectionCommit: """ Attributes: - author_email (Union[Unset, str]): - author_name (Union[Unset, str]): - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - message (Union[Unset, str]): - sha (Union[Unset, str]): - updated_at (Union[Unset, str]): - vcs_connection_id (Union[Unset, str]): + author_email (str | Unset): + author_name (str | Unset): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + message (str | Unset): + sha (str | Unset): + updated_at (str | Unset): + vcs_connection_id (str | Unset): """ - author_email: Union[Unset, str] = UNSET - author_name: Union[Unset, str] = UNSET - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - message: Union[Unset, str] = UNSET - sha: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - vcs_connection_id: Union[Unset, str] = UNSET + author_email: str | Unset = UNSET + author_name: str | Unset = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + message: str | Unset = UNSET + sha: str | Unset = UNSET + updated_at: str | Unset = UNSET + vcs_connection_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_waitlist.py b/nuon/models/app_waitlist.py index 45356a2c..64971383 100644 --- a/nuon/models/app_waitlist.py +++ b/nuon/models/app_waitlist.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,18 +15,18 @@ class AppWaitlist: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - org_name (Union[Unset, str]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + org_name (str | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - org_name: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + org_name: str | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/app_workflow.py b/nuon/models/app_workflow.py index a04ecf71..4fe47ce4 100644 --- a/nuon/models/app_workflow.py +++ b/nuon/models/app_workflow.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,64 +29,64 @@ class AppWorkflow: """ Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - execution_time (Union[Unset, int]): - finished (Union[Unset, bool]): - finished_at (Union[Unset, str]): - id (Union[Unset, str]): - install_action_workflow_runs (Union[Unset, list['AppInstallActionWorkflowRun']]): - install_deploys (Union[Unset, list['AppInstallDeploy']]): - install_sandbox_runs (Union[Unset, list['AppInstallSandboxRun']]): - links (Union[Unset, AppWorkflowLinks]): - metadata (Union[Unset, AppWorkflowMetadata]): - name (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - plan_only (Union[Unset, bool]): - started_at (Union[Unset, str]): - status (Union[Unset, AppCompositeStatus]): - step_error_behavior (Union[Unset, AppStepErrorBehavior]): - steps (Union[Unset, list['AppWorkflowStep']]): steps represent each piece of the workflow - type_ (Union[Unset, AppWorkflowType]): - updated_at (Union[Unset, str]): + approval_option (AppInstallApprovalOption | Unset): + created_at (str | Unset): + created_by (AppAccount | Unset): + created_by_id (str | Unset): + execution_time (int | Unset): + finished (bool | Unset): + finished_at (str | Unset): + id (str | Unset): + install_action_workflow_runs (list[AppInstallActionWorkflowRun] | Unset): + install_deploys (list[AppInstallDeploy] | Unset): + install_sandbox_runs (list[AppInstallSandboxRun] | Unset): + links (AppWorkflowLinks | Unset): + metadata (AppWorkflowMetadata | Unset): + name (str | Unset): + owner_id (str | Unset): + owner_type (str | Unset): + plan_only (bool | Unset): + started_at (str | Unset): + status (AppCompositeStatus | Unset): + step_error_behavior (AppStepErrorBehavior | Unset): + steps (list[AppWorkflowStep] | Unset): steps represent each piece of the workflow + type_ (AppWorkflowType | Unset): + updated_at (str | Unset): """ - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_time: Union[Unset, int] = UNSET - finished: Union[Unset, bool] = UNSET - finished_at: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_action_workflow_runs: Union[Unset, list["AppInstallActionWorkflowRun"]] = UNSET - install_deploys: Union[Unset, list["AppInstallDeploy"]] = UNSET - install_sandbox_runs: Union[Unset, list["AppInstallSandboxRun"]] = UNSET - links: Union[Unset, "AppWorkflowLinks"] = UNSET - metadata: Union[Unset, "AppWorkflowMetadata"] = UNSET - name: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET - started_at: Union[Unset, str] = UNSET - status: Union[Unset, "AppCompositeStatus"] = UNSET - step_error_behavior: Union[Unset, AppStepErrorBehavior] = UNSET - steps: Union[Unset, list["AppWorkflowStep"]] = UNSET - type_: Union[Unset, AppWorkflowType] = UNSET - updated_at: Union[Unset, str] = UNSET + approval_option: AppInstallApprovalOption | Unset = UNSET + created_at: str | Unset = UNSET + created_by: AppAccount | Unset = UNSET + created_by_id: str | Unset = UNSET + execution_time: int | Unset = UNSET + finished: bool | Unset = UNSET + finished_at: str | Unset = UNSET + id: str | Unset = UNSET + install_action_workflow_runs: list[AppInstallActionWorkflowRun] | Unset = UNSET + install_deploys: list[AppInstallDeploy] | Unset = UNSET + install_sandbox_runs: list[AppInstallSandboxRun] | Unset = UNSET + links: AppWorkflowLinks | Unset = UNSET + metadata: AppWorkflowMetadata | Unset = UNSET + name: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + plan_only: bool | Unset = UNSET + started_at: str | Unset = UNSET + status: AppCompositeStatus | Unset = UNSET + step_error_behavior: AppStepErrorBehavior | Unset = UNSET + steps: list[AppWorkflowStep] | Unset = UNSET + type_: AppWorkflowType | Unset = UNSET + updated_at: str | Unset = 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 + approval_option: str | Unset = UNSET if not isinstance(self.approval_option, Unset): approval_option = self.approval_option.value created_at = self.created_at - created_by: Union[Unset, dict[str, Any]] = UNSET + created_by: dict[str, Any] | Unset = UNSET if not isinstance(self.created_by, Unset): created_by = self.created_by.to_dict() @@ -98,32 +100,32 @@ def to_dict(self) -> dict[str, Any]: id = self.id - install_action_workflow_runs: Union[Unset, list[dict[str, Any]]] = UNSET + install_action_workflow_runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_action_workflow_runs, Unset): install_action_workflow_runs = [] for install_action_workflow_runs_item_data in self.install_action_workflow_runs: install_action_workflow_runs_item = install_action_workflow_runs_item_data.to_dict() install_action_workflow_runs.append(install_action_workflow_runs_item) - install_deploys: Union[Unset, list[dict[str, Any]]] = UNSET + install_deploys: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_deploys, Unset): install_deploys = [] for install_deploys_item_data in self.install_deploys: install_deploys_item = install_deploys_item_data.to_dict() install_deploys.append(install_deploys_item) - install_sandbox_runs: Union[Unset, list[dict[str, Any]]] = UNSET + install_sandbox_runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.install_sandbox_runs, Unset): install_sandbox_runs = [] for install_sandbox_runs_item_data in self.install_sandbox_runs: install_sandbox_runs_item = install_sandbox_runs_item_data.to_dict() install_sandbox_runs.append(install_sandbox_runs_item) - links: Union[Unset, dict[str, Any]] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -137,22 +139,22 @@ def to_dict(self) -> dict[str, Any]: started_at = self.started_at - status: Union[Unset, dict[str, Any]] = UNSET + status: dict[str, Any] | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.to_dict() - step_error_behavior: Union[Unset, str] = UNSET + step_error_behavior: str | Unset = UNSET if not isinstance(self.step_error_behavior, Unset): step_error_behavior = self.step_error_behavior.value - steps: Union[Unset, list[dict[str, Any]]] = UNSET + steps: list[dict[str, Any]] | Unset = 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) - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -223,7 +225,7 @@ 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] + approval_option: AppInstallApprovalOption | Unset if isinstance(_approval_option, Unset): approval_option = UNSET else: @@ -232,7 +234,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at = d.pop("created_at", UNSET) _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] + created_by: AppAccount | Unset if isinstance(_created_by, Unset): created_by = UNSET else: @@ -272,14 +274,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_sandbox_runs.append(install_sandbox_runs_item) _links = d.pop("links", UNSET) - links: Union[Unset, AppWorkflowLinks] + links: AppWorkflowLinks | Unset if isinstance(_links, Unset): links = UNSET else: links = AppWorkflowLinks.from_dict(_links) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppWorkflowMetadata] + metadata: AppWorkflowMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: @@ -296,14 +298,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: started_at = d.pop("started_at", UNSET) _status = d.pop("status", UNSET) - status: Union[Unset, AppCompositeStatus] + status: AppCompositeStatus | Unset if isinstance(_status, Unset): status = UNSET else: status = AppCompositeStatus.from_dict(_status) _step_error_behavior = d.pop("step_error_behavior", UNSET) - step_error_behavior: Union[Unset, AppStepErrorBehavior] + step_error_behavior: AppStepErrorBehavior | Unset if isinstance(_step_error_behavior, Unset): step_error_behavior = UNSET else: @@ -317,7 +319,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: steps.append(steps_item) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppWorkflowType] + type_: AppWorkflowType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/app_workflow_links.py b/nuon/models/app_workflow_links.py index 284b493f..0df5a9ff 100644 --- a/nuon/models/app_workflow_links.py +++ b/nuon/models/app_workflow_links.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_workflow_metadata.py b/nuon/models/app_workflow_metadata.py index 07b3e9e4..c922797d 100644 --- a/nuon/models/app_workflow_metadata.py +++ b/nuon/models/app_workflow_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_workflow_step.py b/nuon/models/app_workflow_step.py index ca20c92f..cf95d04d 100644 --- a/nuon/models/app_workflow_step.py +++ b/nuon/models/app_workflow_step.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,33 +25,32 @@ class AppWorkflowStep: """ Attributes: - approval (Union[Unset, AppWorkflowStepApproval]): - created_at (Union[Unset, str]): - created_by (Union[Unset, AppAccount]): - created_by_id (Union[Unset, str]): - execution_time (Union[Unset, int]): - execution_type (Union[Unset, AppWorkflowStepExecutionType]): - finished (Union[Unset, bool]): - finished_at (Union[Unset, str]): - group_idx (Union[Unset, int]): to group steps which belong to same logical group, eg, plan/apply - group_retry_idx (Union[Unset, int]): counter for every retry attempted on a group - id (Union[Unset, str]): - idx (Union[Unset, int]): - install_workflow_id (Union[Unset, str]): DEPRECATED: this is the install workflow ID, which is now the workflow - ID. - links (Union[Unset, AppWorkflowStepLinks]): - metadata (Union[Unset, AppWorkflowStepMetadata]): - name (Union[Unset, str]): - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - policy_validation (Union[Unset, AppWorkflowStepPolicyValidation]): - retried (Union[Unset, bool]): - retryable (Union[Unset, bool]): - skippable (Union[Unset, bool]): - started_at (Union[Unset, str]): - status (Union[Unset, AppCompositeStatus]): - step_target_id (Union[Unset, str]): the following fields are set _once_ a step is in flight, and are - orchestrated via the step's signal. + approval (AppWorkflowStepApproval | Unset): + created_at (str | Unset): + created_by (AppAccount | Unset): + created_by_id (str | Unset): + execution_time (int | Unset): + execution_type (AppWorkflowStepExecutionType | Unset): + finished (bool | Unset): + finished_at (str | Unset): + group_idx (int | Unset): to group steps which belong to same logical group, eg, plan/apply + group_retry_idx (int | Unset): counter for every retry attempted on a group + id (str | Unset): + idx (int | Unset): + install_workflow_id (str | Unset): DEPRECATED: this is the install workflow ID, which is now the workflow ID. + links (AppWorkflowStepLinks | Unset): + metadata (AppWorkflowStepMetadata | Unset): + name (str | Unset): + owner_id (str | Unset): + owner_type (str | Unset): + policy_validation (AppWorkflowStepPolicyValidation | Unset): + retried (bool | Unset): + retryable (bool | Unset): + skippable (bool | Unset): + started_at (str | Unset): + status (AppCompositeStatus | Unset): + step_target_id (str | Unset): the following fields are set _once_ a step is in flight, and are orchestrated via + the step's signal. this is a polymorphic gorm relationship to one of the following objects: @@ -58,49 +59,49 @@ class AppWorkflowStep: install_runner_update install_deploy install_action_workflow_run (can be many of these) - step_target_type (Union[Unset, str]): - updated_at (Union[Unset, str]): - workflow_id (Union[Unset, str]): Fields that are de-nested at read time using AfterQuery + step_target_type (str | Unset): + updated_at (str | Unset): + workflow_id (str | Unset): Fields that are de-nested at read time using AfterQuery """ - approval: Union[Unset, "AppWorkflowStepApproval"] = UNSET - created_at: Union[Unset, str] = UNSET - created_by: Union[Unset, "AppAccount"] = UNSET - created_by_id: Union[Unset, str] = UNSET - execution_time: Union[Unset, int] = UNSET - execution_type: Union[Unset, AppWorkflowStepExecutionType] = UNSET - finished: Union[Unset, bool] = UNSET - finished_at: Union[Unset, str] = UNSET - group_idx: Union[Unset, int] = UNSET - group_retry_idx: Union[Unset, int] = UNSET - id: Union[Unset, str] = UNSET - idx: Union[Unset, int] = UNSET - install_workflow_id: Union[Unset, str] = UNSET - links: Union[Unset, "AppWorkflowStepLinks"] = UNSET - metadata: Union[Unset, "AppWorkflowStepMetadata"] = UNSET - name: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - policy_validation: Union[Unset, "AppWorkflowStepPolicyValidation"] = UNSET - retried: Union[Unset, bool] = UNSET - retryable: Union[Unset, bool] = UNSET - skippable: Union[Unset, bool] = UNSET - started_at: Union[Unset, str] = UNSET - status: Union[Unset, "AppCompositeStatus"] = UNSET - step_target_id: Union[Unset, str] = UNSET - step_target_type: Union[Unset, str] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow_id: Union[Unset, str] = UNSET + approval: AppWorkflowStepApproval | Unset = UNSET + created_at: str | Unset = UNSET + created_by: AppAccount | Unset = UNSET + created_by_id: str | Unset = UNSET + execution_time: int | Unset = UNSET + execution_type: AppWorkflowStepExecutionType | Unset = UNSET + finished: bool | Unset = UNSET + finished_at: str | Unset = UNSET + group_idx: int | Unset = UNSET + group_retry_idx: int | Unset = UNSET + id: str | Unset = UNSET + idx: int | Unset = UNSET + install_workflow_id: str | Unset = UNSET + links: AppWorkflowStepLinks | Unset = UNSET + metadata: AppWorkflowStepMetadata | Unset = UNSET + name: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + policy_validation: AppWorkflowStepPolicyValidation | Unset = UNSET + retried: bool | Unset = UNSET + retryable: bool | Unset = UNSET + skippable: bool | Unset = UNSET + started_at: str | Unset = UNSET + status: AppCompositeStatus | Unset = UNSET + step_target_id: str | Unset = UNSET + step_target_type: str | Unset = UNSET + updated_at: str | Unset = UNSET + workflow_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - approval: Union[Unset, dict[str, Any]] = UNSET + approval: dict[str, Any] | Unset = UNSET if not isinstance(self.approval, Unset): approval = self.approval.to_dict() created_at = self.created_at - created_by: Union[Unset, dict[str, Any]] = UNSET + created_by: dict[str, Any] | Unset = UNSET if not isinstance(self.created_by, Unset): created_by = self.created_by.to_dict() @@ -108,7 +109,7 @@ def to_dict(self) -> dict[str, Any]: execution_time = self.execution_time - execution_type: Union[Unset, str] = UNSET + execution_type: str | Unset = UNSET if not isinstance(self.execution_type, Unset): execution_type = self.execution_type.value @@ -126,11 +127,11 @@ def to_dict(self) -> dict[str, Any]: install_workflow_id = self.install_workflow_id - links: Union[Unset, dict[str, Any]] = UNSET + links: dict[str, Any] | Unset = UNSET if not isinstance(self.links, Unset): links = self.links.to_dict() - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -140,7 +141,7 @@ def to_dict(self) -> dict[str, Any]: owner_type = self.owner_type - policy_validation: Union[Unset, dict[str, Any]] = UNSET + policy_validation: dict[str, Any] | Unset = UNSET if not isinstance(self.policy_validation, Unset): policy_validation = self.policy_validation.to_dict() @@ -152,7 +153,7 @@ def to_dict(self) -> dict[str, Any]: started_at = self.started_at - status: Union[Unset, dict[str, Any]] = UNSET + status: dict[str, Any] | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.to_dict() @@ -237,7 +238,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _approval = d.pop("approval", UNSET) - approval: Union[Unset, AppWorkflowStepApproval] + approval: AppWorkflowStepApproval | Unset if isinstance(_approval, Unset): approval = UNSET else: @@ -246,7 +247,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at = d.pop("created_at", UNSET) _created_by = d.pop("created_by", UNSET) - created_by: Union[Unset, AppAccount] + created_by: AppAccount | Unset if isinstance(_created_by, Unset): created_by = UNSET else: @@ -257,7 +258,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: execution_time = d.pop("execution_time", UNSET) _execution_type = d.pop("execution_type", UNSET) - execution_type: Union[Unset, AppWorkflowStepExecutionType] + execution_type: AppWorkflowStepExecutionType | Unset if isinstance(_execution_type, Unset): execution_type = UNSET else: @@ -278,14 +279,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_workflow_id = d.pop("install_workflow_id", UNSET) _links = d.pop("links", UNSET) - links: Union[Unset, AppWorkflowStepLinks] + links: AppWorkflowStepLinks | Unset if isinstance(_links, Unset): links = UNSET else: links = AppWorkflowStepLinks.from_dict(_links) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppWorkflowStepMetadata] + metadata: AppWorkflowStepMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: @@ -298,7 +299,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: owner_type = d.pop("owner_type", UNSET) _policy_validation = d.pop("policy_validation", UNSET) - policy_validation: Union[Unset, AppWorkflowStepPolicyValidation] + policy_validation: AppWorkflowStepPolicyValidation | Unset if isinstance(_policy_validation, Unset): policy_validation = UNSET else: @@ -313,7 +314,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: started_at = d.pop("started_at", UNSET) _status = d.pop("status", UNSET) - status: Union[Unset, AppCompositeStatus] + status: AppCompositeStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/nuon/models/app_workflow_step_approval.py b/nuon/models/app_workflow_step_approval.py index 918a6009..9efd7bb9 100644 --- a/nuon/models/app_workflow_step_approval.py +++ b/nuon/models/app_workflow_step_approval.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,36 +22,36 @@ class AppWorkflowStepApproval: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_workflow_step (Union[Unset, AppWorkflowStep]): - install_workflow_step_id (Union[Unset, str]): the step that this approval belongs too - owner_id (Union[Unset, str]): - owner_type (Union[Unset, str]): - response (Union[Unset, AppWorkflowStepApprovalResponse]): - runner_job (Union[Unset, AppRunnerJob]): - runner_job_id (Union[Unset, str]): the runner job where this approval was created - type_ (Union[Unset, AppWorkflowStepApprovalType]): - updated_at (Union[Unset, str]): - workflow_step (Union[Unset, AppWorkflowStep]): - workflow_step_id (Union[Unset, str]): afterquery + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_workflow_step (AppWorkflowStep | Unset): + install_workflow_step_id (str | Unset): the step that this approval belongs too + owner_id (str | Unset): + owner_type (str | Unset): + response (AppWorkflowStepApprovalResponse | Unset): + runner_job (AppRunnerJob | Unset): + runner_job_id (str | Unset): the runner job where this approval was created + type_ (AppWorkflowStepApprovalType | Unset): + updated_at (str | Unset): + workflow_step (AppWorkflowStep | Unset): + workflow_step_id (str | Unset): afterquery """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_workflow_step: Union[Unset, "AppWorkflowStep"] = UNSET - install_workflow_step_id: Union[Unset, str] = UNSET - owner_id: Union[Unset, str] = UNSET - owner_type: Union[Unset, str] = UNSET - response: Union[Unset, "AppWorkflowStepApprovalResponse"] = UNSET - runner_job: Union[Unset, "AppRunnerJob"] = UNSET - runner_job_id: Union[Unset, str] = UNSET - type_: Union[Unset, AppWorkflowStepApprovalType] = UNSET - updated_at: Union[Unset, str] = UNSET - workflow_step: Union[Unset, "AppWorkflowStep"] = UNSET - workflow_step_id: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_workflow_step: AppWorkflowStep | Unset = UNSET + install_workflow_step_id: str | Unset = UNSET + owner_id: str | Unset = UNSET + owner_type: str | Unset = UNSET + response: AppWorkflowStepApprovalResponse | Unset = UNSET + runner_job: AppRunnerJob | Unset = UNSET + runner_job_id: str | Unset = UNSET + type_: AppWorkflowStepApprovalType | Unset = UNSET + updated_at: str | Unset = UNSET + workflow_step: AppWorkflowStep | Unset = UNSET + workflow_step_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -59,7 +61,7 @@ def to_dict(self) -> dict[str, Any]: id = self.id - install_workflow_step: Union[Unset, dict[str, Any]] = UNSET + install_workflow_step: dict[str, Any] | Unset = UNSET if not isinstance(self.install_workflow_step, Unset): install_workflow_step = self.install_workflow_step.to_dict() @@ -69,23 +71,23 @@ def to_dict(self) -> dict[str, Any]: owner_type = self.owner_type - response: Union[Unset, dict[str, Any]] = UNSET + response: dict[str, Any] | Unset = UNSET if not isinstance(self.response, Unset): response = self.response.to_dict() - runner_job: Union[Unset, dict[str, Any]] = UNSET + runner_job: dict[str, Any] | Unset = UNSET if not isinstance(self.runner_job, Unset): runner_job = self.runner_job.to_dict() runner_job_id = self.runner_job_id - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value updated_at = self.updated_at - workflow_step: Union[Unset, dict[str, Any]] = UNSET + workflow_step: dict[str, Any] | Unset = UNSET if not isinstance(self.workflow_step, Unset): workflow_step = self.workflow_step.to_dict() @@ -139,7 +141,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _install_workflow_step = d.pop("installWorkflowStep", UNSET) - install_workflow_step: Union[Unset, AppWorkflowStep] + install_workflow_step: AppWorkflowStep | Unset if isinstance(_install_workflow_step, Unset): install_workflow_step = UNSET else: @@ -152,14 +154,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: owner_type = d.pop("owner_type", UNSET) _response = d.pop("response", UNSET) - response: Union[Unset, AppWorkflowStepApprovalResponse] + response: AppWorkflowStepApprovalResponse | Unset if isinstance(_response, Unset): response = UNSET else: response = AppWorkflowStepApprovalResponse.from_dict(_response) _runner_job = d.pop("runner_job", UNSET) - runner_job: Union[Unset, AppRunnerJob] + runner_job: AppRunnerJob | Unset if isinstance(_runner_job, Unset): runner_job = UNSET else: @@ -168,7 +170,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_job_id = d.pop("runner_job_id", UNSET) _type_ = d.pop("type", UNSET) - type_: Union[Unset, AppWorkflowStepApprovalType] + type_: AppWorkflowStepApprovalType | Unset if isinstance(_type_, Unset): type_ = UNSET else: @@ -177,7 +179,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at", UNSET) _workflow_step = d.pop("workflow_step", UNSET) - workflow_step: Union[Unset, AppWorkflowStep] + workflow_step: AppWorkflowStep | Unset if isinstance(_workflow_step, Unset): workflow_step = UNSET else: diff --git a/nuon/models/app_workflow_step_approval_response.py b/nuon/models/app_workflow_step_approval_response.py index 65c19dae..5f17cf78 100644 --- a/nuon/models/app_workflow_step_approval_response.py +++ b/nuon/models/app_workflow_step_approval_response.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_workflow_step_links.py b/nuon/models/app_workflow_step_links.py index 83d1b937..e358fc35 100644 --- a/nuon/models/app_workflow_step_links.py +++ b/nuon/models/app_workflow_step_links.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_workflow_step_metadata.py b/nuon/models/app_workflow_step_metadata.py index 4dcdf29d..d4f2d064 100644 --- a/nuon/models/app_workflow_step_metadata.py +++ b/nuon/models/app_workflow_step_metadata.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/app_workflow_step_policy_validation.py b/nuon/models/app_workflow_step_policy_validation.py index 3f3fb12c..ba4b0f18 100644 --- a/nuon/models/app_workflow_step_policy_validation.py +++ b/nuon/models/app_workflow_step_policy_validation.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,25 +19,24 @@ class AppWorkflowStepPolicyValidation: """ Attributes: - created_at (Union[Unset, str]): - created_by_id (Union[Unset, str]): - id (Union[Unset, str]): - install_workflow_step_id (Union[Unset, str]): install workflow step is the install step that this was performed - within - response (Union[Unset, str]): response is the kyverno response - runner_job_id (Union[Unset, str]): runnerJobID is the runner job that this was performed within - status (Union[Unset, AppCompositeStatus]): - updated_at (Union[Unset, str]): + created_at (str | Unset): + created_by_id (str | Unset): + id (str | Unset): + install_workflow_step_id (str | Unset): install workflow step is the install step that this was performed within + response (str | Unset): response is the kyverno response + runner_job_id (str | Unset): runnerJobID is the runner job that this was performed within + status (AppCompositeStatus | Unset): + updated_at (str | Unset): """ - created_at: Union[Unset, str] = UNSET - created_by_id: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - install_workflow_step_id: Union[Unset, str] = UNSET - response: Union[Unset, str] = UNSET - runner_job_id: Union[Unset, str] = UNSET - status: Union[Unset, "AppCompositeStatus"] = UNSET - updated_at: Union[Unset, str] = UNSET + created_at: str | Unset = UNSET + created_by_id: str | Unset = UNSET + id: str | Unset = UNSET + install_workflow_step_id: str | Unset = UNSET + response: str | Unset = UNSET + runner_job_id: str | Unset = UNSET + status: AppCompositeStatus | Unset = UNSET + updated_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -51,7 +52,7 @@ def to_dict(self) -> dict[str, Any]: runner_job_id = self.runner_job_id - status: Union[Unset, dict[str, Any]] = UNSET + status: dict[str, Any] | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.to_dict() @@ -97,7 +98,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: runner_job_id = d.pop("runner_job_id", UNSET) _status = d.pop("status", UNSET) - status: Union[Unset, AppCompositeStatus] + status: AppCompositeStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/nuon/models/configs_oci_registry_auth.py b/nuon/models/configs_oci_registry_auth.py index be062c3f..9135634f 100644 --- a/nuon/models/configs_oci_registry_auth.py +++ b/nuon/models/configs_oci_registry_auth.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ConfigsOCIRegistryAuth: """ Attributes: - password (Union[Unset, str]): - username (Union[Unset, str]): + password (str | Unset): + username (str | Unset): """ - password: Union[Unset, str] = UNSET - username: Union[Unset, str] = UNSET + password: str | Unset = UNSET + username: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/configs_oci_registry_repository.py b/nuon/models/configs_oci_registry_repository.py index 83ecdfaa..ce3f7e95 100644 --- a/nuon/models/configs_oci_registry_repository.py +++ b/nuon/models/configs_oci_registry_repository.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,39 +26,39 @@ 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 (GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset): + ecrauth (GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset): + login_server (str | Unset): + ociauth (ConfigsOCIRegistryAuth | Unset): + plugin (str | Unset): + region (str | Unset): + registry_type (ConfigsOCIRegistryType | Unset): + repository (str | Unset): 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 + acrauth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset = UNSET + ecrauth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset = UNSET + login_server: str | Unset = UNSET + ociauth: ConfigsOCIRegistryAuth | Unset = UNSET + plugin: str | Unset = UNSET + region: str | Unset = UNSET + registry_type: ConfigsOCIRegistryType | Unset = UNSET + repository: str | Unset = 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 + acrauth: dict[str, Any] | Unset = UNSET if not isinstance(self.acrauth, Unset): acrauth = self.acrauth.to_dict() - ecrauth: Union[Unset, dict[str, Any]] = UNSET + ecrauth: dict[str, Any] | Unset = UNSET if not isinstance(self.ecrauth, Unset): ecrauth = self.ecrauth.to_dict() login_server = self.login_server - ociauth: Union[Unset, dict[str, Any]] = UNSET + ociauth: dict[str, Any] | Unset = UNSET if not isinstance(self.ociauth, Unset): ociauth = self.ociauth.to_dict() @@ -64,7 +66,7 @@ def to_dict(self) -> dict[str, Any]: region = self.region - registry_type: Union[Unset, str] = UNSET + registry_type: str | Unset = UNSET if not isinstance(self.registry_type, Unset): registry_type = self.registry_type.value @@ -104,14 +106,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _acrauth = d.pop("acrauth", UNSET) - acrauth: Union[Unset, GithubComPowertoolsdevMonoPkgAzureCredentialsConfig] + acrauth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset if isinstance(_acrauth, Unset): acrauth = UNSET else: acrauth = GithubComPowertoolsdevMonoPkgAzureCredentialsConfig.from_dict(_acrauth) _ecrauth = d.pop("ecrauth", UNSET) - ecrauth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + ecrauth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset if isinstance(_ecrauth, Unset): ecrauth = UNSET else: @@ -120,7 +122,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: login_server = d.pop("loginServer", UNSET) _ociauth = d.pop("ociauth", UNSET) - ociauth: Union[Unset, ConfigsOCIRegistryAuth] + ociauth: ConfigsOCIRegistryAuth | Unset if isinstance(_ociauth, Unset): ociauth = UNSET else: @@ -131,7 +133,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: region = d.pop("region", UNSET) _registry_type = d.pop("registryType", UNSET) - registry_type: Union[Unset, ConfigsOCIRegistryType] + registry_type: ConfigsOCIRegistryType | Unset if isinstance(_registry_type, Unset): registry_type = UNSET else: diff --git a/nuon/models/credentials_assume_role_config.py b/nuon/models/credentials_assume_role_config.py index 9c6811c1..4453a061 100644 --- a/nuon/models/credentials_assume_role_config.py +++ b/nuon/models/credentials_assume_role_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,16 +21,16 @@ 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]): + session_duration_seconds (int | Unset): + two_step_config (IamTwoStepConfig | Unset): + use_github_oidc (bool | Unset): """ 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 + session_duration_seconds: int | Unset = UNSET + two_step_config: IamTwoStepConfig | Unset = UNSET + use_github_oidc: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,7 +40,7 @@ def to_dict(self) -> dict[str, Any]: session_duration_seconds = self.session_duration_seconds - two_step_config: Union[Unset, dict[str, Any]] = UNSET + two_step_config: dict[str, Any] | Unset = UNSET if not isinstance(self.two_step_config, Unset): two_step_config = self.two_step_config.to_dict() @@ -73,7 +75,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: session_duration_seconds = d.pop("session_duration_seconds", UNSET) _two_step_config = d.pop("two_step_config", UNSET) - two_step_config: Union[Unset, IamTwoStepConfig] + two_step_config: IamTwoStepConfig | Unset if isinstance(_two_step_config, Unset): two_step_config = UNSET else: diff --git a/nuon/models/credentials_service_principal_credentials.py b/nuon/models/credentials_service_principal_credentials.py index 3c3fd83c..a9d391f9 100644 --- a/nuon/models/credentials_service_principal_credentials.py +++ b/nuon/models/credentials_service_principal_credentials.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class CredentialsServicePrincipalCredentials: """ Attributes: - subscription_id (Union[Unset, str]): - subscription_tenant_id (Union[Unset, str]): + subscription_id (str | Unset): + subscription_tenant_id (str | Unset): """ - subscription_id: Union[Unset, str] = UNSET - subscription_tenant_id: Union[Unset, str] = UNSET + subscription_id: str | Unset = UNSET + subscription_tenant_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/credentials_static_credentials.py b/nuon/models/credentials_static_credentials.py index 0c5adb73..8589f944 100644 --- a/nuon/models/credentials_static_credentials.py +++ b/nuon/models/credentials_static_credentials.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/generics_null_time.py b/nuon/models/generics_null_time.py index 8e567168..1d3ba438 100644 --- a/nuon/models/generics_null_time.py +++ b/nuon/models/generics_null_time.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class GenericsNullTime: """ Attributes: - time (Union[Unset, str]): - valid (Union[Unset, bool]): Valid is true if Time is not NULL + time (str | Unset): + valid (bool | Unset): Valid is true if Time is not NULL """ - time: Union[Unset, str] = UNSET - valid: Union[Unset, bool] = UNSET + time: str | Unset = UNSET + valid: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/get_config_schema_response_200.py b/nuon/models/get_config_schema_response_200.py index 2f9e583a..971c5e1f 100644 --- a/nuon/models/get_config_schema_response_200.py +++ b/nuon/models/get_config_schema_response_200.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/get_install_component_outputs_response_200.py b/nuon/models/get_install_component_outputs_response_200.py index 26fa97b9..f366de42 100644 --- a/nuon/models/get_install_component_outputs_response_200.py +++ b/nuon/models/get_install_component_outputs_response_200.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/get_terraform_workspace_state_json_resources_response_200.py b/nuon/models/get_terraform_workspace_state_json_resources_response_200.py index c329e0ea..11d2ebe5 100644 --- a/nuon/models/get_terraform_workspace_state_json_resources_response_200.py +++ b/nuon/models/get_terraform_workspace_state_json_resources_response_200.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar 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 index 4a5daed2..54fe373a 100644 --- 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 @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py b/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py index 8e4b3e12..3bbcd3a8 100644 --- a/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py +++ b/nuon/models/get_terraform_workspace_states_json_by_id_response_200.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar 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 index b608aa4e..304fef5e 100644 --- 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 @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/get_workflow_step_approval_contents_response_200.py b/nuon/models/get_workflow_step_approval_contents_response_200.py index d4c2ab56..1861ed59 100644 --- a/nuon/models/get_workflow_step_approval_contents_response_200.py +++ b/nuon/models/get_workflow_step_approval_contents_response_200.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar 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 index cec7dcf7..95d5e186 100644 --- a/nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_aws_credentials_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,25 +20,25 @@ 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 + assume_role (CredentialsAssumeRoleConfig | Unset): + cache_id (str | Unset): 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]): + profile (str | Unset): If profile is provided, we'll use that profile over the default credentials + region (str | Unset): + static (CredentialsStaticCredentials | Unset): + use_default (bool | Unset): """ - 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 + assume_role: CredentialsAssumeRoleConfig | Unset = UNSET + cache_id: str | Unset = UNSET + profile: str | Unset = UNSET + region: str | Unset = UNSET + static: CredentialsStaticCredentials | Unset = UNSET + use_default: bool | Unset = 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 + assume_role: dict[str, Any] | Unset = UNSET if not isinstance(self.assume_role, Unset): assume_role = self.assume_role.to_dict() @@ -46,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: region = self.region - static: Union[Unset, dict[str, Any]] = UNSET + static: dict[str, Any] | Unset = UNSET if not isinstance(self.static, Unset): static = self.static.to_dict() @@ -77,7 +79,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _assume_role = d.pop("assume_role", UNSET) - assume_role: Union[Unset, CredentialsAssumeRoleConfig] + assume_role: CredentialsAssumeRoleConfig | Unset if isinstance(_assume_role, Unset): assume_role = UNSET else: @@ -90,7 +92,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: region = d.pop("region", UNSET) _static = d.pop("static", UNSET) - static: Union[Unset, CredentialsStaticCredentials] + static: CredentialsStaticCredentials | Unset if isinstance(_static, Unset): static = UNSET else: 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 index 7613fb9c..62fd14ef 100644 --- a/nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_azure_credentials_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +19,16 @@ class GithubComPowertoolsdevMonoPkgAzureCredentialsConfig: """ Attributes: - service_principal (Union[Unset, CredentialsServicePrincipalCredentials]): - use_default (Union[Unset, bool]): + service_principal (CredentialsServicePrincipalCredentials | Unset): + use_default (bool | Unset): """ - service_principal: Union[Unset, "CredentialsServicePrincipalCredentials"] = UNSET - use_default: Union[Unset, bool] = UNSET + service_principal: CredentialsServicePrincipalCredentials | Unset = UNSET + use_default: bool | Unset = 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 + service_principal: dict[str, Any] | Unset = UNSET if not isinstance(self.service_principal, Unset): service_principal = self.service_principal.to_dict() @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _service_principal = d.pop("service_principal", UNSET) - service_principal: Union[Unset, CredentialsServicePrincipalCredentials] + service_principal: CredentialsServicePrincipalCredentials | Unset if isinstance(_service_principal, Unset): service_principal = UNSET else: 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 dd0f5dc7..9114576d 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 @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,90 +32,90 @@ class GithubComPowertoolsdevMonoPkgTypesStateState: """ Attributes: - actions (Union[Unset, StateActionsState]): - app (Union[Unset, StateAppState]): - cloud_account (Union[Unset, StateCloudAccount]): - components (Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateStateComponents]): - domain (Union[Unset, StateDomainState]): - id (Union[Unset, str]): - inputs (Union[Unset, StateInputsState]): - install (Union[Unset, StateInstallState]): - install_stack (Union[Unset, StateInstallStackState]): - name (Union[Unset, str]): - org (Union[Unset, StateOrgState]): - 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 (StateActionsState | Unset): + app (StateAppState | Unset): + cloud_account (StateCloudAccount | Unset): + components (GithubComPowertoolsdevMonoPkgTypesStateStateComponents | Unset): + domain (StateDomainState | Unset): + id (str | Unset): + inputs (StateInputsState | Unset): + install (StateInstallState | Unset): + install_stack (StateInstallStackState | Unset): + name (str | Unset): + org (StateOrgState | Unset): + runner (StateRunnerState | Unset): + sandbox (StateSandboxState | Unset): + secrets (StateSecretsState | Unset): + stale_at (str | Unset): loaded from the database but not part of the state itself """ - actions: Union[Unset, "StateActionsState"] = UNSET - app: Union[Unset, "StateAppState"] = UNSET - cloud_account: Union[Unset, "StateCloudAccount"] = UNSET - components: Union[Unset, "GithubComPowertoolsdevMonoPkgTypesStateStateComponents"] = UNSET - domain: Union[Unset, "StateDomainState"] = UNSET - id: Union[Unset, str] = UNSET - inputs: Union[Unset, "StateInputsState"] = UNSET - install: Union[Unset, "StateInstallState"] = UNSET - install_stack: Union[Unset, "StateInstallStackState"] = UNSET - name: Union[Unset, str] = UNSET - org: Union[Unset, "StateOrgState"] = UNSET - runner: Union[Unset, "StateRunnerState"] = UNSET - sandbox: Union[Unset, "StateSandboxState"] = UNSET - secrets: Union[Unset, "StateSecretsState"] = UNSET - stale_at: Union[Unset, str] = UNSET + actions: StateActionsState | Unset = UNSET + app: StateAppState | Unset = UNSET + cloud_account: StateCloudAccount | Unset = UNSET + components: GithubComPowertoolsdevMonoPkgTypesStateStateComponents | Unset = UNSET + domain: StateDomainState | Unset = UNSET + id: str | Unset = UNSET + inputs: StateInputsState | Unset = UNSET + install: StateInstallState | Unset = UNSET + install_stack: StateInstallStackState | Unset = UNSET + name: str | Unset = UNSET + org: StateOrgState | Unset = UNSET + runner: StateRunnerState | Unset = UNSET + sandbox: StateSandboxState | Unset = UNSET + secrets: StateSecretsState | Unset = UNSET + stale_at: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - actions: Union[Unset, dict[str, Any]] = UNSET + actions: dict[str, Any] | Unset = UNSET if not isinstance(self.actions, Unset): actions = self.actions.to_dict() - app: Union[Unset, dict[str, Any]] = UNSET + app: dict[str, Any] | Unset = UNSET if not isinstance(self.app, Unset): app = self.app.to_dict() - cloud_account: Union[Unset, dict[str, Any]] = UNSET + cloud_account: dict[str, Any] | Unset = UNSET if not isinstance(self.cloud_account, Unset): cloud_account = self.cloud_account.to_dict() - components: Union[Unset, dict[str, Any]] = UNSET + components: dict[str, Any] | Unset = UNSET if not isinstance(self.components, Unset): components = self.components.to_dict() - domain: Union[Unset, dict[str, Any]] = UNSET + domain: dict[str, Any] | Unset = UNSET if not isinstance(self.domain, Unset): domain = self.domain.to_dict() id = self.id - inputs: Union[Unset, dict[str, Any]] = UNSET + inputs: dict[str, Any] | Unset = UNSET if not isinstance(self.inputs, Unset): inputs = self.inputs.to_dict() - install: Union[Unset, dict[str, Any]] = UNSET + install: dict[str, Any] | Unset = UNSET if not isinstance(self.install, Unset): install = self.install.to_dict() - install_stack: Union[Unset, dict[str, Any]] = UNSET + install_stack: dict[str, Any] | Unset = UNSET if not isinstance(self.install_stack, Unset): install_stack = self.install_stack.to_dict() name = self.name - org: Union[Unset, dict[str, Any]] = UNSET + org: dict[str, Any] | Unset = UNSET if not isinstance(self.org, Unset): org = self.org.to_dict() - runner: Union[Unset, dict[str, Any]] = UNSET + runner: dict[str, Any] | Unset = UNSET if not isinstance(self.runner, Unset): runner = self.runner.to_dict() - sandbox: Union[Unset, dict[str, Any]] = UNSET + sandbox: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox, Unset): sandbox = self.sandbox.to_dict() - secrets: Union[Unset, dict[str, Any]] = UNSET + secrets: dict[str, Any] | Unset = UNSET if not isinstance(self.secrets, Unset): secrets = self.secrets.to_dict() @@ -174,35 +176,35 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _actions = d.pop("actions", UNSET) - actions: Union[Unset, StateActionsState] + actions: StateActionsState | Unset if isinstance(_actions, Unset): actions = UNSET else: actions = StateActionsState.from_dict(_actions) _app = d.pop("app", UNSET) - app: Union[Unset, StateAppState] + app: StateAppState | Unset if isinstance(_app, Unset): app = UNSET else: app = StateAppState.from_dict(_app) _cloud_account = d.pop("cloud_account", UNSET) - cloud_account: Union[Unset, StateCloudAccount] + cloud_account: StateCloudAccount | Unset if isinstance(_cloud_account, Unset): cloud_account = UNSET else: cloud_account = StateCloudAccount.from_dict(_cloud_account) _components = d.pop("components", UNSET) - components: Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateStateComponents] + components: GithubComPowertoolsdevMonoPkgTypesStateStateComponents | Unset if isinstance(_components, Unset): components = UNSET else: components = GithubComPowertoolsdevMonoPkgTypesStateStateComponents.from_dict(_components) _domain = d.pop("domain", UNSET) - domain: Union[Unset, StateDomainState] + domain: StateDomainState | Unset if isinstance(_domain, Unset): domain = UNSET else: @@ -211,21 +213,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _inputs = d.pop("inputs", UNSET) - inputs: Union[Unset, StateInputsState] + inputs: StateInputsState | Unset if isinstance(_inputs, Unset): inputs = UNSET else: inputs = StateInputsState.from_dict(_inputs) _install = d.pop("install", UNSET) - install: Union[Unset, StateInstallState] + install: StateInstallState | Unset if isinstance(_install, Unset): install = UNSET else: install = StateInstallState.from_dict(_install) _install_stack = d.pop("install_stack", UNSET) - install_stack: Union[Unset, StateInstallStackState] + install_stack: StateInstallStackState | Unset if isinstance(_install_stack, Unset): install_stack = UNSET else: @@ -234,28 +236,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _org = d.pop("org", UNSET) - org: Union[Unset, StateOrgState] + org: StateOrgState | Unset if isinstance(_org, Unset): org = UNSET else: org = StateOrgState.from_dict(_org) _runner = d.pop("runner", UNSET) - runner: Union[Unset, StateRunnerState] + runner: StateRunnerState | Unset if isinstance(_runner, Unset): runner = UNSET else: runner = StateRunnerState.from_dict(_runner) _sandbox = d.pop("sandbox", UNSET) - sandbox: Union[Unset, StateSandboxState] + sandbox: StateSandboxState | Unset if isinstance(_sandbox, Unset): sandbox = UNSET else: sandbox = StateSandboxState.from_dict(_sandbox) _secrets = d.pop("secrets", UNSET) - secrets: Union[Unset, StateSecretsState] + secrets: StateSecretsState | Unset if isinstance(_secrets, Unset): secrets = UNSET else: diff --git a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py index 92cef8c6..8102fc6f 100644 --- a/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py +++ b/nuon/models/github_com_powertoolsdev_mono_pkg_types_state_state_components.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/helpers_create_install_config_params.py b/nuon/models/helpers_create_install_config_params.py index 90c00ca2..cb694bae 100644 --- a/nuon/models/helpers_create_install_config_params.py +++ b/nuon/models/helpers_create_install_config_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,14 +16,14 @@ class HelpersCreateInstallConfigParams: """ Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): + approval_option (AppInstallApprovalOption | Unset): """ - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + approval_option: AppInstallApprovalOption | Unset = 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 + approval_option: str | Unset = UNSET if not isinstance(self.approval_option, Unset): approval_option = self.approval_option.value @@ -37,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: 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] + approval_option: AppInstallApprovalOption | Unset if isinstance(_approval_option, Unset): approval_option = UNSET else: diff --git a/nuon/models/helpers_install_metadata.py b/nuon/models/helpers_install_metadata.py index 7a4c6607..cca8aa58 100644 --- a/nuon/models/helpers_install_metadata.py +++ b/nuon/models/helpers_install_metadata.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class HelpersInstallMetadata: """ Attributes: - managed_by (Union[Unset, str]): + managed_by (str | Unset): """ - managed_by: Union[Unset, str] = UNSET + managed_by: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/iam_static_credentials.py b/nuon/models/iam_static_credentials.py index 1359315b..1fc16ac2 100644 --- a/nuon/models/iam_static_credentials.py +++ b/nuon/models/iam_static_credentials.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class IamStaticCredentials: """ Attributes: - access_key_id (Union[Unset, str]): - secret_access_key (Union[Unset, str]): - session_token (Union[Unset, str]): + access_key_id (str | Unset): + secret_access_key (str | Unset): + session_token (str | Unset): """ - access_key_id: Union[Unset, str] = UNSET - secret_access_key: Union[Unset, str] = UNSET - session_token: Union[Unset, str] = UNSET + access_key_id: str | Unset = UNSET + secret_access_key: str | Unset = UNSET + session_token: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/iam_two_step_config.py b/nuon/models/iam_two_step_config.py index 500e26fc..0864c8f6 100644 --- a/nuon/models/iam_two_step_config.py +++ b/nuon/models/iam_two_step_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ 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 (str | Unset): + src_iam_role_arn (str | Unset): + src_static_credentials (IamStaticCredentials | Unset): """ - iam_role_arn: Union[Unset, str] = UNSET - src_iam_role_arn: Union[Unset, str] = UNSET - src_static_credentials: Union[Unset, "IamStaticCredentials"] = UNSET + iam_role_arn: str | Unset = UNSET + src_iam_role_arn: str | Unset = UNSET + src_static_credentials: IamStaticCredentials | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: src_iam_role_arn = self.src_iam_role_arn - src_static_credentials: Union[Unset, dict[str, Any]] = UNSET + src_static_credentials: dict[str, Any] | Unset = UNSET if not isinstance(self.src_static_credentials, Unset): src_static_credentials = self.src_static_credentials.to_dict() @@ -58,7 +60,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 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] + src_static_credentials: IamStaticCredentials | Unset if isinstance(_src_static_credentials, Unset): src_static_credentials = UNSET else: diff --git a/nuon/models/kube_cluster_info.py b/nuon/models/kube_cluster_info.py index dbd3e7c0..2ae16896 100644 --- a/nuon/models/kube_cluster_info.py +++ b/nuon/models/kube_cluster_info.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,38 +25,38 @@ 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 + aws_auth (GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset): + azure_auth (GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset): + ca_data (str | Unset): CAData is the base64 encoded public certificate + endpoint (str | Unset): Endpoint is the URL of the k8s api server + env_vars (KubeClusterInfoEnvVars | Unset): + id (str | Unset): ID is the ID of the EKS cluster + inline (bool | Unset): If this is set, we will _not_ use aws-iam-authenticator, but rather inline create the + token + kube_config (str | Unset): KubeConfig will override the kube config, and be parsed instead of generating a new + one + trusted_role_arn (str | Unset): 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 + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset = UNSET + azure_auth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset = UNSET + ca_data: str | Unset = UNSET + endpoint: str | Unset = UNSET + env_vars: KubeClusterInfoEnvVars | Unset = UNSET + id: str | Unset = UNSET + inline: bool | Unset = UNSET + kube_config: str | Unset = UNSET + trusted_role_arn: str | Unset = 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 + aws_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_auth, Unset): aws_auth = self.aws_auth.to_dict() - azure_auth: Union[Unset, dict[str, Any]] = UNSET + azure_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.azure_auth, Unset): azure_auth = self.azure_auth.to_dict() @@ -62,7 +64,7 @@ def to_dict(self) -> dict[str, Any]: endpoint = self.endpoint - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() @@ -110,14 +112,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _aws_auth = d.pop("aws_auth", UNSET) - aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset 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] + azure_auth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset if isinstance(_azure_auth, Unset): azure_auth = UNSET else: @@ -128,7 +130,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: endpoint = d.pop("endpoint", UNSET) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, KubeClusterInfoEnvVars] + env_vars: KubeClusterInfoEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: diff --git a/nuon/models/kube_cluster_info_env_vars.py b/nuon/models/kube_cluster_info_env_vars.py index 4f60a974..75f7486c 100644 --- a/nuon/models/kube_cluster_info_env_vars.py +++ b/nuon/models/kube_cluster_info_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/lock_terraform_workspace_body.py b/nuon/models/lock_terraform_workspace_body.py index 06826d10..5c9e1529 100644 --- a/nuon/models/lock_terraform_workspace_body.py +++ b/nuon/models/lock_terraform_workspace_body.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/outputs_secret_sync_output.py b/nuon/models/outputs_secret_sync_output.py index 0cfdb524..2d2453c3 100644 --- a/nuon/models/outputs_secret_sync_output.py +++ b/nuon/models/outputs_secret_sync_output.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,24 +15,24 @@ class OutputsSecretSyncOutput: """ Attributes: - arn (Union[Unset, str]): - exists (Union[Unset, bool]): - kubernetes_key (Union[Unset, str]): - kubernetes_name (Union[Unset, str]): - kubernetes_namespace (Union[Unset, str]): - length (Union[Unset, int]): - name (Union[Unset, str]): - timestamp (Union[Unset, str]): + arn (str | Unset): + exists (bool | Unset): + kubernetes_key (str | Unset): + kubernetes_name (str | Unset): + kubernetes_namespace (str | Unset): + length (int | Unset): + name (str | Unset): + timestamp (str | Unset): """ - arn: Union[Unset, str] = UNSET - exists: Union[Unset, bool] = UNSET - kubernetes_key: Union[Unset, str] = UNSET - kubernetes_name: Union[Unset, str] = UNSET - kubernetes_namespace: Union[Unset, str] = UNSET - length: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - timestamp: Union[Unset, str] = UNSET + arn: str | Unset = UNSET + exists: bool | Unset = UNSET + kubernetes_key: str | Unset = UNSET + kubernetes_name: str | Unset = UNSET + kubernetes_namespace: str | Unset = UNSET + length: int | Unset = UNSET + name: str | Unset = UNSET + timestamp: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/permissions_set.py b/nuon/models/permissions_set.py index d8db396a..41bcf7c5 100644 --- a/nuon/models/permissions_set.py +++ b/nuon/models/permissions_set.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_action_workflow_run_plan.py b/nuon/models/plantypes_action_workflow_run_plan.py index b3205d0e..090a2bdb 100644 --- a/nuon/models/plantypes_action_workflow_run_plan.py +++ b/nuon/models/plantypes_action_workflow_run_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,42 +31,42 @@ 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 (PlantypesActionWorkflowRunPlanAttrs | Unset): + aws_auth (GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset): + builtin_env_vars (PlantypesActionWorkflowRunPlanBuiltinEnvVars | Unset): + cluster_info (KubeClusterInfo | Unset): + id (str | Unset): + install_id (str | Unset): + override_env_vars (PlantypesActionWorkflowRunPlanOverrideEnvVars | Unset): + sandbox_mode (PlantypesSandboxMode | Unset): + steps (list[PlantypesActionWorkflowRunStepPlan] | Unset): """ - 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 + attrs: PlantypesActionWorkflowRunPlanAttrs | Unset = UNSET + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset = UNSET + builtin_env_vars: PlantypesActionWorkflowRunPlanBuiltinEnvVars | Unset = UNSET + cluster_info: KubeClusterInfo | Unset = UNSET + id: str | Unset = UNSET + install_id: str | Unset = UNSET + override_env_vars: PlantypesActionWorkflowRunPlanOverrideEnvVars | Unset = UNSET + sandbox_mode: PlantypesSandboxMode | Unset = UNSET + steps: list[PlantypesActionWorkflowRunStepPlan] | Unset = 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 + attrs: dict[str, Any] | Unset = UNSET if not isinstance(self.attrs, Unset): attrs = self.attrs.to_dict() - aws_auth: Union[Unset, dict[str, Any]] = UNSET + aws_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_auth, Unset): aws_auth = self.aws_auth.to_dict() - builtin_env_vars: Union[Unset, dict[str, Any]] = UNSET + builtin_env_vars: dict[str, Any] | Unset = 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 + cluster_info: dict[str, Any] | Unset = UNSET if not isinstance(self.cluster_info, Unset): cluster_info = self.cluster_info.to_dict() @@ -72,15 +74,15 @@ def to_dict(self) -> dict[str, Any]: install_id = self.install_id - override_env_vars: Union[Unset, dict[str, Any]] = UNSET + override_env_vars: dict[str, Any] | Unset = 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 + sandbox_mode: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox_mode, Unset): sandbox_mode = self.sandbox_mode.to_dict() - steps: Union[Unset, list[dict[str, Any]]] = UNSET + steps: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.steps, Unset): steps = [] for steps_item_data in self.steps: @@ -129,28 +131,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _attrs = d.pop("attrs", UNSET) - attrs: Union[Unset, PlantypesActionWorkflowRunPlanAttrs] + attrs: PlantypesActionWorkflowRunPlanAttrs | Unset if isinstance(_attrs, Unset): attrs = UNSET else: attrs = PlantypesActionWorkflowRunPlanAttrs.from_dict(_attrs) _aws_auth = d.pop("aws_auth", UNSET) - aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset 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] + builtin_env_vars: PlantypesActionWorkflowRunPlanBuiltinEnvVars | Unset 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] + cluster_info: KubeClusterInfo | Unset if isinstance(_cluster_info, Unset): cluster_info = UNSET else: @@ -161,14 +163,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_id = d.pop("install_id", UNSET) _override_env_vars = d.pop("override_env_vars", UNSET) - override_env_vars: Union[Unset, PlantypesActionWorkflowRunPlanOverrideEnvVars] + override_env_vars: PlantypesActionWorkflowRunPlanOverrideEnvVars | Unset 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] + sandbox_mode: PlantypesSandboxMode | Unset if isinstance(_sandbox_mode, Unset): sandbox_mode = UNSET else: diff --git a/nuon/models/plantypes_action_workflow_run_plan_attrs.py b/nuon/models/plantypes_action_workflow_run_plan_attrs.py index c54a8331..94c85085 100644 --- a/nuon/models/plantypes_action_workflow_run_plan_attrs.py +++ b/nuon/models/plantypes_action_workflow_run_plan_attrs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar 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 index c25aafb0..f0861155 100644 --- a/nuon/models/plantypes_action_workflow_run_plan_builtin_env_vars.py +++ b/nuon/models/plantypes_action_workflow_run_plan_builtin_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar 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 index 4300ac9a..e7631248 100644 --- a/nuon/models/plantypes_action_workflow_run_plan_override_env_vars.py +++ b/nuon/models/plantypes_action_workflow_run_plan_override_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_action_workflow_run_step_plan.py b/nuon/models/plantypes_action_workflow_run_step_plan.py index 635e8170..09da6794 100644 --- a/nuon/models/plantypes_action_workflow_run_step_plan.py +++ b/nuon/models/plantypes_action_workflow_run_step_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,34 +23,34 @@ 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 (PlantypesActionWorkflowRunStepPlanAttrs | Unset): + git_source (PlantypesGitSource | Unset): + interpolated_command (str | Unset): + interpolated_env_vars (PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars | Unset): + interpolated_inline_contents (str | Unset): + run_id (str | Unset): """ - 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 + attrs: PlantypesActionWorkflowRunStepPlanAttrs | Unset = UNSET + git_source: PlantypesGitSource | Unset = UNSET + interpolated_command: str | Unset = UNSET + interpolated_env_vars: PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars | Unset = UNSET + interpolated_inline_contents: str | Unset = UNSET + run_id: str | Unset = 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 + attrs: dict[str, Any] | Unset = UNSET if not isinstance(self.attrs, Unset): attrs = self.attrs.to_dict() - git_source: Union[Unset, dict[str, Any]] = UNSET + git_source: dict[str, Any] | Unset = 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 + interpolated_env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.interpolated_env_vars, Unset): interpolated_env_vars = self.interpolated_env_vars.to_dict() @@ -84,14 +86,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _attrs = d.pop("attrs", UNSET) - attrs: Union[Unset, PlantypesActionWorkflowRunStepPlanAttrs] + attrs: PlantypesActionWorkflowRunStepPlanAttrs | Unset if isinstance(_attrs, Unset): attrs = UNSET else: attrs = PlantypesActionWorkflowRunStepPlanAttrs.from_dict(_attrs) _git_source = d.pop("git_source", UNSET) - git_source: Union[Unset, PlantypesGitSource] + git_source: PlantypesGitSource | Unset if isinstance(_git_source, Unset): git_source = UNSET else: @@ -100,7 +102,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: interpolated_command = d.pop("interpolated_command", UNSET) _interpolated_env_vars = d.pop("interpolated_env_vars", UNSET) - interpolated_env_vars: Union[Unset, PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars] + interpolated_env_vars: PlantypesActionWorkflowRunStepPlanInterpolatedEnvVars | Unset if isinstance(_interpolated_env_vars, Unset): interpolated_env_vars = UNSET else: diff --git a/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py b/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py index 17c3392e..927a690d 100644 --- a/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py +++ b/nuon/models/plantypes_action_workflow_run_step_plan_attrs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar 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 index 12ee1dbb..909ad0e4 100644 --- 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 @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_build_plan.py b/nuon/models/plantypes_build_plan.py index a48f6bd2..0ee0b60d 100644 --- a/nuon/models/plantypes_build_plan.py +++ b/nuon/models/plantypes_build_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,26 +27,26 @@ 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]): + component_build_id (str | Unset): + component_id (str | Unset): + container_image_pull_plan (PlantypesContainerImagePullPlan | Unset): + docker_build_plan (PlantypesDockerBuildPlan | Unset): + git_source (PlantypesGitSource | Unset): + helm_build_plan (PlantypesHelmBuildPlan | Unset): + sandbox_mode (PlantypesSandboxMode | Unset): + terraform_build_plan (PlantypesTerraformBuildPlan | Unset): """ - dst_registry: "ConfigsOCIRegistryRepository" + 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 + component_build_id: str | Unset = UNSET + component_id: str | Unset = UNSET + container_image_pull_plan: PlantypesContainerImagePullPlan | Unset = UNSET + docker_build_plan: PlantypesDockerBuildPlan | Unset = UNSET + git_source: PlantypesGitSource | Unset = UNSET + helm_build_plan: PlantypesHelmBuildPlan | Unset = UNSET + sandbox_mode: PlantypesSandboxMode | Unset = UNSET + terraform_build_plan: PlantypesTerraformBuildPlan | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -56,27 +58,27 @@ def to_dict(self) -> dict[str, Any]: component_id = self.component_id - container_image_pull_plan: Union[Unset, dict[str, Any]] = UNSET + container_image_pull_plan: dict[str, Any] | Unset = 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 + docker_build_plan: dict[str, Any] | Unset = 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 + git_source: dict[str, Any] | Unset = UNSET if not isinstance(self.git_source, Unset): git_source = self.git_source.to_dict() - helm_build_plan: Union[Unset, dict[str, Any]] = UNSET + helm_build_plan: dict[str, Any] | Unset = 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 + sandbox_mode: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox_mode, Unset): sandbox_mode = self.sandbox_mode.to_dict() - terraform_build_plan: Union[Unset, dict[str, Any]] = UNSET + terraform_build_plan: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform_build_plan, Unset): terraform_build_plan = self.terraform_build_plan.to_dict() @@ -127,42 +129,42 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 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] + container_image_pull_plan: PlantypesContainerImagePullPlan | Unset 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] + docker_build_plan: PlantypesDockerBuildPlan | Unset 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] + git_source: PlantypesGitSource | Unset 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] + helm_build_plan: PlantypesHelmBuildPlan | Unset 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] + sandbox_mode: PlantypesSandboxMode | Unset 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] + terraform_build_plan: PlantypesTerraformBuildPlan | Unset if isinstance(_terraform_build_plan, Unset): terraform_build_plan = UNSET else: diff --git a/nuon/models/plantypes_composite_plan.py b/nuon/models/plantypes_composite_plan.py index edf3c9af..3611c6c7 100644 --- a/nuon/models/plantypes_composite_plan.py +++ b/nuon/models/plantypes_composite_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,44 +24,44 @@ 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 (PlantypesActionWorkflowRunPlan | Unset): + build_plan (PlantypesBuildPlan | Unset): + deploy_plan (PlantypesDeployPlan | Unset): + sandbox_run_plan (PlantypesSandboxRunPlan | Unset): + sync_oci_plan (PlantypesSyncOCIPlan | Unset): + sync_secrets_plan (PlantypesSyncSecretsPlan | Unset): """ - 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 + action_workflow_run_plan: PlantypesActionWorkflowRunPlan | Unset = UNSET + build_plan: PlantypesBuildPlan | Unset = UNSET + deploy_plan: PlantypesDeployPlan | Unset = UNSET + sandbox_run_plan: PlantypesSandboxRunPlan | Unset = UNSET + sync_oci_plan: PlantypesSyncOCIPlan | Unset = UNSET + sync_secrets_plan: PlantypesSyncSecretsPlan | Unset = 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 + action_workflow_run_plan: dict[str, Any] | Unset = 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 + build_plan: dict[str, Any] | Unset = UNSET if not isinstance(self.build_plan, Unset): build_plan = self.build_plan.to_dict() - deploy_plan: Union[Unset, dict[str, Any]] = UNSET + deploy_plan: dict[str, Any] | Unset = UNSET if not isinstance(self.deploy_plan, Unset): deploy_plan = self.deploy_plan.to_dict() - sandbox_run_plan: Union[Unset, dict[str, Any]] = UNSET + sandbox_run_plan: dict[str, Any] | Unset = 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 + sync_oci_plan: dict[str, Any] | Unset = 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 + sync_secrets_plan: dict[str, Any] | Unset = UNSET if not isinstance(self.sync_secrets_plan, Unset): sync_secrets_plan = self.sync_secrets_plan.to_dict() @@ -92,42 +94,42 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _action_workflow_run_plan = d.pop("action_workflow_run_plan", UNSET) - action_workflow_run_plan: Union[Unset, PlantypesActionWorkflowRunPlan] + action_workflow_run_plan: PlantypesActionWorkflowRunPlan | Unset 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] + build_plan: PlantypesBuildPlan | Unset 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] + deploy_plan: PlantypesDeployPlan | Unset 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] + sandbox_run_plan: PlantypesSandboxRunPlan | Unset 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] + sync_oci_plan: PlantypesSyncOCIPlan | Unset 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] + sync_secrets_plan: PlantypesSyncSecretsPlan | Unset if isinstance(_sync_secrets_plan, Unset): sync_secrets_plan = UNSET else: diff --git a/nuon/models/plantypes_container_image_pull_plan.py b/nuon/models/plantypes_container_image_pull_plan.py index cbb50183..5b449d75 100644 --- a/nuon/models/plantypes_container_image_pull_plan.py +++ b/nuon/models/plantypes_container_image_pull_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,20 +19,20 @@ class PlantypesContainerImagePullPlan: """ Attributes: - image (Union[Unset, str]): - repo_config (Union[Unset, ConfigsOCIRegistryRepository]): - tag (Union[Unset, str]): + image (str | Unset): + repo_config (ConfigsOCIRegistryRepository | Unset): + tag (str | Unset): """ - image: Union[Unset, str] = UNSET - repo_config: Union[Unset, "ConfigsOCIRegistryRepository"] = UNSET - tag: Union[Unset, str] = UNSET + image: str | Unset = UNSET + repo_config: ConfigsOCIRegistryRepository | Unset = UNSET + tag: str | Unset = 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 + repo_config: dict[str, Any] | Unset = UNSET if not isinstance(self.repo_config, Unset): repo_config = self.repo_config.to_dict() @@ -56,7 +58,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: image = d.pop("image", UNSET) _repo_config = d.pop("repo_config", UNSET) - repo_config: Union[Unset, ConfigsOCIRegistryRepository] + repo_config: ConfigsOCIRegistryRepository | Unset if isinstance(_repo_config, Unset): repo_config = UNSET else: diff --git a/nuon/models/plantypes_deploy_plan.py b/nuon/models/plantypes_deploy_plan.py index 053f0469..435fcbd7 100644 --- a/nuon/models/plantypes_deploy_plan.py +++ b/nuon/models/plantypes_deploy_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -24,35 +26,34 @@ 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]): + app_config_id (str | Unset): + app_id (str | Unset): + apply_plan_contents (str | Unset): The following field is for applying a plan that is already save + apply_plan_display (str | Unset): This field is for storing a human legible plan or corollary representation + component_id (str | Unset): + component_name (str | Unset): + helm (PlantypesHelmDeployPlan | Unset): + install_id (str | Unset): + kubernetes_manifest (PlantypesKubernetesManifestDeployPlan | Unset): + noop (PlantypesNoopDeployPlan | Unset): + sandbox_mode (PlantypesSandboxMode | Unset): + terraform (PlantypesTerraformDeployPlan | Unset): """ - src_registry: "ConfigsOCIRegistryRepository" + 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 + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + apply_plan_contents: str | Unset = UNSET + apply_plan_display: str | Unset = UNSET + component_id: str | Unset = UNSET + component_name: str | Unset = UNSET + helm: PlantypesHelmDeployPlan | Unset = UNSET + install_id: str | Unset = UNSET + kubernetes_manifest: PlantypesKubernetesManifestDeployPlan | Unset = UNSET + noop: PlantypesNoopDeployPlan | Unset = UNSET + sandbox_mode: PlantypesSandboxMode | Unset = UNSET + terraform: PlantypesTerraformDeployPlan | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -72,25 +73,25 @@ def to_dict(self) -> dict[str, Any]: component_name = self.component_name - helm: Union[Unset, dict[str, Any]] = UNSET + helm: dict[str, Any] | Unset = 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 + kubernetes_manifest: dict[str, Any] | Unset = UNSET if not isinstance(self.kubernetes_manifest, Unset): kubernetes_manifest = self.kubernetes_manifest.to_dict() - noop: Union[Unset, dict[str, Any]] = UNSET + noop: dict[str, Any] | Unset = UNSET if not isinstance(self.noop, Unset): noop = self.noop.to_dict() - sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + sandbox_mode: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox_mode, Unset): sandbox_mode = self.sandbox_mode.to_dict() - terraform: Union[Unset, dict[str, Any]] = UNSET + terraform: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform, Unset): terraform = self.terraform.to_dict() @@ -156,7 +157,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: component_name = d.pop("component_name", UNSET) _helm = d.pop("helm", UNSET) - helm: Union[Unset, PlantypesHelmDeployPlan] + helm: PlantypesHelmDeployPlan | Unset if isinstance(_helm, Unset): helm = UNSET else: @@ -165,28 +166,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_id = d.pop("install_id", UNSET) _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) - kubernetes_manifest: Union[Unset, PlantypesKubernetesManifestDeployPlan] + kubernetes_manifest: PlantypesKubernetesManifestDeployPlan | Unset 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] + noop: PlantypesNoopDeployPlan | Unset if isinstance(_noop, Unset): noop = UNSET else: noop = PlantypesNoopDeployPlan.from_dict(_noop) _sandbox_mode = d.pop("sandbox_mode", UNSET) - sandbox_mode: Union[Unset, PlantypesSandboxMode] + sandbox_mode: PlantypesSandboxMode | Unset 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] + terraform: PlantypesTerraformDeployPlan | Unset if isinstance(_terraform, Unset): terraform = UNSET else: diff --git a/nuon/models/plantypes_docker_build_plan.py b/nuon/models/plantypes_docker_build_plan.py index 9a516f34..bf3b525b 100644 --- a/nuon/models/plantypes_docker_build_plan.py +++ b/nuon/models/plantypes_docker_build_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,20 +19,20 @@ class PlantypesDockerBuildPlan: """ Attributes: - build_args (Union[Unset, PlantypesDockerBuildPlanBuildArgs]): - context (Union[Unset, str]): - dockerfile (Union[Unset, str]): - target (Union[Unset, str]): + build_args (PlantypesDockerBuildPlanBuildArgs | Unset): + context (str | Unset): + dockerfile (str | Unset): + target (str | Unset): """ - build_args: Union[Unset, "PlantypesDockerBuildPlanBuildArgs"] = UNSET - context: Union[Unset, str] = UNSET - dockerfile: Union[Unset, str] = UNSET - target: Union[Unset, str] = UNSET + build_args: PlantypesDockerBuildPlanBuildArgs | Unset = UNSET + context: str | Unset = UNSET + dockerfile: str | Unset = UNSET + target: str | Unset = 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 + build_args: dict[str, Any] | Unset = UNSET if not isinstance(self.build_args, Unset): build_args = self.build_args.to_dict() @@ -60,7 +62,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _build_args = d.pop("build_args", UNSET) - build_args: Union[Unset, PlantypesDockerBuildPlanBuildArgs] + build_args: PlantypesDockerBuildPlanBuildArgs | Unset if isinstance(_build_args, Unset): build_args = UNSET else: diff --git a/nuon/models/plantypes_docker_build_plan_build_args.py b/nuon/models/plantypes_docker_build_plan_build_args.py index 21b331e6..9576b707 100644 --- a/nuon/models/plantypes_docker_build_plan_build_args.py +++ b/nuon/models/plantypes_docker_build_plan_build_args.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_git_source.py b/nuon/models/plantypes_git_source.py index 651268d2..65d83114 100644 --- a/nuon/models/plantypes_git_source.py +++ b/nuon/models/plantypes_git_source.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -16,13 +18,13 @@ class PlantypesGitSource: path (str): ref (str): url (str): - recurse_submodules (Union[Unset, bool]): + recurse_submodules (bool | Unset): """ path: str ref: str url: str - recurse_submodules: Union[Unset, bool] = UNSET + recurse_submodules: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/plantypes_helm_build_plan.py b/nuon/models/plantypes_helm_build_plan.py index 1262f829..3bd8e2ca 100644 --- a/nuon/models/plantypes_helm_build_plan.py +++ b/nuon/models/plantypes_helm_build_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class PlantypesHelmBuildPlan: """ Attributes: - labels (Union[Unset, PlantypesHelmBuildPlanLabels]): + labels (PlantypesHelmBuildPlanLabels | Unset): """ - labels: Union[Unset, "PlantypesHelmBuildPlanLabels"] = UNSET + labels: PlantypesHelmBuildPlanLabels | Unset = 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 + labels: dict[str, Any] | Unset = UNSET if not isinstance(self.labels, Unset): labels = self.labels.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _labels = d.pop("labels", UNSET) - labels: Union[Unset, PlantypesHelmBuildPlanLabels] + labels: PlantypesHelmBuildPlanLabels | Unset if isinstance(_labels, Unset): labels = UNSET else: diff --git a/nuon/models/plantypes_helm_build_plan_labels.py b/nuon/models/plantypes_helm_build_plan_labels.py index 2d636055..37b7ec57 100644 --- a/nuon/models/plantypes_helm_build_plan_labels.py +++ b/nuon/models/plantypes_helm_build_plan_labels.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_helm_deploy_plan.py b/nuon/models/plantypes_helm_deploy_plan.py index 2bb129bb..3c81e5c1 100644 --- a/nuon/models/plantypes_helm_deploy_plan.py +++ b/nuon/models/plantypes_helm_deploy_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,32 +20,32 @@ 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 + cluster_info (KubeClusterInfo | Unset): + create_namespace (bool | Unset): + helm_chart_id (str | Unset): + name (str | Unset): 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]]): + namespace (str | Unset): + storage_driver (str | Unset): + take_ownership (bool | Unset): + values (list[PlantypesHelmValue] | Unset): + values_files (list[str] | Unset): """ - 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 + cluster_info: KubeClusterInfo | Unset = UNSET + create_namespace: bool | Unset = UNSET + helm_chart_id: str | Unset = UNSET + name: str | Unset = UNSET + namespace: str | Unset = UNSET + storage_driver: str | Unset = UNSET + take_ownership: bool | Unset = UNSET + values: list[PlantypesHelmValue] | Unset = UNSET + values_files: list[str] | Unset = 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 + cluster_info: dict[str, Any] | Unset = UNSET if not isinstance(self.cluster_info, Unset): cluster_info = self.cluster_info.to_dict() @@ -59,14 +61,14 @@ def to_dict(self) -> dict[str, Any]: take_ownership = self.take_ownership - values: Union[Unset, list[dict[str, Any]]] = UNSET + values: list[dict[str, Any]] | Unset = 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 + values_files: list[str] | Unset = UNSET if not isinstance(self.values_files, Unset): values_files = self.values_files @@ -101,7 +103,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _cluster_info = d.pop("cluster_info", UNSET) - cluster_info: Union[Unset, KubeClusterInfo] + cluster_info: KubeClusterInfo | Unset if isinstance(_cluster_info, Unset): cluster_info = UNSET else: diff --git a/nuon/models/plantypes_helm_sandbox_mode.py b/nuon/models/plantypes_helm_sandbox_mode.py index 37710fc7..ec0146ac 100644 --- a/nuon/models/plantypes_helm_sandbox_mode.py +++ b/nuon/models/plantypes_helm_sandbox_mode.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class PlantypesHelmSandboxMode: """ Attributes: - plan_contents (Union[Unset, str]): - plan_display_contents (Union[Unset, str]): + plan_contents (str | Unset): + plan_display_contents (str | Unset): """ - plan_contents: Union[Unset, str] = UNSET - plan_display_contents: Union[Unset, str] = UNSET + plan_contents: str | Unset = UNSET + plan_display_contents: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/plantypes_helm_value.py b/nuon/models/plantypes_helm_value.py index 4e9695e9..3142ac99 100644 --- a/nuon/models/plantypes_helm_value.py +++ b/nuon/models/plantypes_helm_value.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class PlantypesHelmValue: """ Attributes: - name (Union[Unset, str]): - type_ (Union[Unset, str]): - value (Union[Unset, str]): + name (str | Unset): + type_ (str | Unset): + value (str | Unset): """ - name: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET - value: Union[Unset, str] = UNSET + name: str | Unset = UNSET + type_: str | Unset = UNSET + value: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py b/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py index 41aa8c0d..c03cda8c 100644 --- a/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py +++ b/nuon/models/plantypes_kubernetes_manifest_deploy_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,18 +19,18 @@ class PlantypesKubernetesManifestDeployPlan: """ Attributes: - cluster_info (Union[Unset, KubeClusterInfo]): - manifest (Union[Unset, str]): - namespace (Union[Unset, str]): + cluster_info (KubeClusterInfo | Unset): + manifest (str | Unset): + namespace (str | Unset): """ - cluster_info: Union[Unset, "KubeClusterInfo"] = UNSET - manifest: Union[Unset, str] = UNSET - namespace: Union[Unset, str] = UNSET + cluster_info: KubeClusterInfo | Unset = UNSET + manifest: str | Unset = UNSET + namespace: str | Unset = 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 + cluster_info: dict[str, Any] | Unset = UNSET if not isinstance(self.cluster_info, Unset): cluster_info = self.cluster_info.to_dict() @@ -54,7 +56,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _cluster_info = d.pop("cluster_info", UNSET) - cluster_info: Union[Unset, KubeClusterInfo] + cluster_info: KubeClusterInfo | Unset if isinstance(_cluster_info, Unset): cluster_info = UNSET else: diff --git a/nuon/models/plantypes_kubernetes_sandbox_mode.py b/nuon/models/plantypes_kubernetes_sandbox_mode.py index d0e4a69a..7b544ae6 100644 --- a/nuon/models/plantypes_kubernetes_sandbox_mode.py +++ b/nuon/models/plantypes_kubernetes_sandbox_mode.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class PlantypesKubernetesSandboxMode: """ Attributes: - plan_contents (Union[Unset, str]): - plan_display_contents (Union[Unset, str]): + plan_contents (str | Unset): + plan_display_contents (str | Unset): """ - plan_contents: Union[Unset, str] = UNSET - plan_display_contents: Union[Unset, str] = UNSET + plan_contents: str | Unset = UNSET + plan_display_contents: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/plantypes_kubernetes_secret_sync.py b/nuon/models/plantypes_kubernetes_secret_sync.py index 2c3b9c93..22acbed9 100644 --- a/nuon/models/plantypes_kubernetes_secret_sync.py +++ b/nuon/models/plantypes_kubernetes_secret_sync.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,22 +15,22 @@ 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 + format_ (str | Unset): 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 + key_name (str | Unset): + name (str | Unset): + namespace (str | Unset): + secret_arn (str | Unset): + secret_name (str | Unset): 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 + format_: str | Unset = UNSET + key_name: str | Unset = UNSET + name: str | Unset = UNSET + namespace: str | Unset = UNSET + secret_arn: str | Unset = UNSET + secret_name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/plantypes_noop_deploy_plan.py b/nuon/models/plantypes_noop_deploy_plan.py index 7a0f5963..26caea1d 100644 --- a/nuon/models/plantypes_noop_deploy_plan.py +++ b/nuon/models/plantypes_noop_deploy_plan.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_sandbox_mode.py b/nuon/models/plantypes_sandbox_mode.py index a6741e85..5ccd503e 100644 --- a/nuon/models/plantypes_sandbox_mode.py +++ b/nuon/models/plantypes_sandbox_mode.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,36 +22,36 @@ 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 (bool | Unset): + helm (PlantypesHelmSandboxMode | Unset): + kubernetes_manifest (PlantypesKubernetesSandboxMode | Unset): + outputs (PlantypesSandboxModeOutputs | Unset): + terraform (PlantypesTerraformSandboxMode | Unset): """ - 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 + enabled: bool | Unset = UNSET + helm: PlantypesHelmSandboxMode | Unset = UNSET + kubernetes_manifest: PlantypesKubernetesSandboxMode | Unset = UNSET + outputs: PlantypesSandboxModeOutputs | Unset = UNSET + terraform: PlantypesTerraformSandboxMode | Unset = 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 + helm: dict[str, Any] | Unset = UNSET if not isinstance(self.helm, Unset): helm = self.helm.to_dict() - kubernetes_manifest: Union[Unset, dict[str, Any]] = UNSET + kubernetes_manifest: dict[str, Any] | Unset = UNSET if not isinstance(self.kubernetes_manifest, Unset): kubernetes_manifest = self.kubernetes_manifest.to_dict() - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() - terraform: Union[Unset, dict[str, Any]] = UNSET + terraform: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform, Unset): terraform = self.terraform.to_dict() @@ -80,28 +82,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _helm = d.pop("helm", UNSET) - helm: Union[Unset, PlantypesHelmSandboxMode] + helm: PlantypesHelmSandboxMode | Unset if isinstance(_helm, Unset): helm = UNSET else: helm = PlantypesHelmSandboxMode.from_dict(_helm) _kubernetes_manifest = d.pop("kubernetes_manifest", UNSET) - kubernetes_manifest: Union[Unset, PlantypesKubernetesSandboxMode] + kubernetes_manifest: PlantypesKubernetesSandboxMode | Unset 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] + outputs: PlantypesSandboxModeOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: outputs = PlantypesSandboxModeOutputs.from_dict(_outputs) _terraform = d.pop("terraform", UNSET) - terraform: Union[Unset, PlantypesTerraformSandboxMode] + terraform: PlantypesTerraformSandboxMode | Unset if isinstance(_terraform, Unset): terraform = UNSET else: diff --git a/nuon/models/plantypes_sandbox_mode_outputs.py b/nuon/models/plantypes_sandbox_mode_outputs.py index d863ffb6..b24024a8 100644 --- a/nuon/models/plantypes_sandbox_mode_outputs.py +++ b/nuon/models/plantypes_sandbox_mode_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_sandbox_run_plan.py b/nuon/models/plantypes_sandbox_run_plan.py index a813de7b..b9d13944 100644 --- a/nuon/models/plantypes_sandbox_run_plan.py +++ b/nuon/models/plantypes_sandbox_run_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,43 +35,43 @@ 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 + app_config_id (str | Unset): + app_id (str | Unset): + apply_plan_contents (str | Unset): The following field is for applying a plan that is already saved + apply_plan_display (list[int] | Unset): 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]]): + aws_auth (GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset): + azure_auth (GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset): + env_vars (PlantypesSandboxRunPlanEnvVars | Unset): + git_source (PlantypesGitSource | Unset): + hooks (PlantypesTerraformDeployHooks | Unset): + install_id (str | Unset): + local_archive (PlantypesTerraformLocalArchive | Unset): + policies (PlantypesSandboxRunPlanPolicies | Unset): + sandbox_mode (PlantypesSandboxMode | Unset): + state (GithubComPowertoolsdevMonoPkgTypesStateState | Unset): + terraform_backend (PlantypesTerraformBackend | Unset): + vars_ (PlantypesSandboxRunPlanVars | Unset): + vars_files (list[str] | Unset): """ - 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 + app_config_id: str | Unset = UNSET + app_id: str | Unset = UNSET + apply_plan_contents: str | Unset = UNSET + apply_plan_display: list[int] | Unset = UNSET + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset = UNSET + azure_auth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset = UNSET + env_vars: PlantypesSandboxRunPlanEnvVars | Unset = UNSET + git_source: PlantypesGitSource | Unset = UNSET + hooks: PlantypesTerraformDeployHooks | Unset = UNSET + install_id: str | Unset = UNSET + local_archive: PlantypesTerraformLocalArchive | Unset = UNSET + policies: PlantypesSandboxRunPlanPolicies | Unset = UNSET + sandbox_mode: PlantypesSandboxMode | Unset = UNSET + state: GithubComPowertoolsdevMonoPkgTypesStateState | Unset = UNSET + terraform_backend: PlantypesTerraformBackend | Unset = UNSET + vars_: PlantypesSandboxRunPlanVars | Unset = UNSET + vars_files: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -79,57 +81,57 @@ def to_dict(self) -> dict[str, Any]: apply_plan_contents = self.apply_plan_contents - apply_plan_display: Union[Unset, list[int]] = UNSET + apply_plan_display: list[int] | Unset = UNSET if not isinstance(self.apply_plan_display, Unset): apply_plan_display = self.apply_plan_display - aws_auth: Union[Unset, dict[str, Any]] = UNSET + aws_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_auth, Unset): aws_auth = self.aws_auth.to_dict() - azure_auth: Union[Unset, dict[str, Any]] = UNSET + azure_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.azure_auth, Unset): azure_auth = self.azure_auth.to_dict() - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() - git_source: Union[Unset, dict[str, Any]] = UNSET + git_source: dict[str, Any] | Unset = UNSET if not isinstance(self.git_source, Unset): git_source = self.git_source.to_dict() - hooks: Union[Unset, dict[str, Any]] = UNSET + hooks: dict[str, Any] | Unset = 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 + local_archive: dict[str, Any] | Unset = UNSET if not isinstance(self.local_archive, Unset): local_archive = self.local_archive.to_dict() - policies: Union[Unset, dict[str, Any]] = UNSET + policies: dict[str, Any] | Unset = UNSET if not isinstance(self.policies, Unset): policies = self.policies.to_dict() - sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + sandbox_mode: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox_mode, Unset): sandbox_mode = self.sandbox_mode.to_dict() - state: Union[Unset, dict[str, Any]] = UNSET + state: dict[str, Any] | Unset = UNSET if not isinstance(self.state, Unset): state = self.state.to_dict() - terraform_backend: Union[Unset, dict[str, Any]] = UNSET + terraform_backend: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform_backend, Unset): terraform_backend = self.terraform_backend.to_dict() - vars_: Union[Unset, dict[str, Any]] = UNSET + vars_: dict[str, Any] | Unset = UNSET if not isinstance(self.vars_, Unset): vars_ = self.vars_.to_dict() - vars_files: Union[Unset, list[str]] = UNSET + vars_files: list[str] | Unset = UNSET if not isinstance(self.vars_files, Unset): vars_files = self.vars_files @@ -203,35 +205,35 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: apply_plan_display = cast(list[int], d.pop("apply_plan_display", UNSET)) _aws_auth = d.pop("aws_auth", UNSET) - aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset 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] + azure_auth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset 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] + env_vars: PlantypesSandboxRunPlanEnvVars | Unset 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] + git_source: PlantypesGitSource | Unset 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] + hooks: PlantypesTerraformDeployHooks | Unset if isinstance(_hooks, Unset): hooks = UNSET else: @@ -240,42 +242,42 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_id = d.pop("install_id", UNSET) _local_archive = d.pop("local_archive", UNSET) - local_archive: Union[Unset, PlantypesTerraformLocalArchive] + local_archive: PlantypesTerraformLocalArchive | Unset 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] + policies: PlantypesSandboxRunPlanPolicies | Unset if isinstance(_policies, Unset): policies = UNSET else: policies = PlantypesSandboxRunPlanPolicies.from_dict(_policies) _sandbox_mode = d.pop("sandbox_mode", UNSET) - sandbox_mode: Union[Unset, PlantypesSandboxMode] + sandbox_mode: PlantypesSandboxMode | Unset 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] + state: GithubComPowertoolsdevMonoPkgTypesStateState | Unset if isinstance(_state, Unset): state = UNSET else: state = GithubComPowertoolsdevMonoPkgTypesStateState.from_dict(_state) _terraform_backend = d.pop("terraform_backend", UNSET) - terraform_backend: Union[Unset, PlantypesTerraformBackend] + terraform_backend: PlantypesTerraformBackend | Unset 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] + vars_: PlantypesSandboxRunPlanVars | Unset if isinstance(_vars_, Unset): vars_ = UNSET else: diff --git a/nuon/models/plantypes_sandbox_run_plan_env_vars.py b/nuon/models/plantypes_sandbox_run_plan_env_vars.py index bc4a8205..d47b59aa 100644 --- a/nuon/models/plantypes_sandbox_run_plan_env_vars.py +++ b/nuon/models/plantypes_sandbox_run_plan_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_sandbox_run_plan_policies.py b/nuon/models/plantypes_sandbox_run_plan_policies.py index cf1a9d89..5078e9ee 100644 --- a/nuon/models/plantypes_sandbox_run_plan_policies.py +++ b/nuon/models/plantypes_sandbox_run_plan_policies.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_sandbox_run_plan_vars.py b/nuon/models/plantypes_sandbox_run_plan_vars.py index 115e9ecb..2c442cfb 100644 --- a/nuon/models/plantypes_sandbox_run_plan_vars.py +++ b/nuon/models/plantypes_sandbox_run_plan_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_sync_oci_plan.py b/nuon/models/plantypes_sync_oci_plan.py index fbe1bba4..538a386d 100644 --- a/nuon/models/plantypes_sync_oci_plan.py +++ b/nuon/models/plantypes_sync_oci_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,14 +24,14 @@ class PlantypesSyncOCIPlan: dst_tag (str): src_registry (ConfigsOCIRegistryRepository): src_tag (str): - sandbox_mode (Union[Unset, PlantypesSandboxMode]): + sandbox_mode (PlantypesSandboxMode | Unset): """ - dst_registry: "ConfigsOCIRegistryRepository" + dst_registry: ConfigsOCIRegistryRepository dst_tag: str - src_registry: "ConfigsOCIRegistryRepository" + src_registry: ConfigsOCIRegistryRepository src_tag: str - sandbox_mode: Union[Unset, "PlantypesSandboxMode"] = UNSET + sandbox_mode: PlantypesSandboxMode | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -41,7 +43,7 @@ def to_dict(self) -> dict[str, Any]: src_tag = self.src_tag - sandbox_mode: Union[Unset, dict[str, Any]] = UNSET + sandbox_mode: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox_mode, Unset): sandbox_mode = self.sandbox_mode.to_dict() @@ -75,7 +77,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: src_tag = d.pop("src_tag") _sandbox_mode = d.pop("sandbox_mode", UNSET) - sandbox_mode: Union[Unset, PlantypesSandboxMode] + sandbox_mode: PlantypesSandboxMode | Unset if isinstance(_sandbox_mode, Unset): sandbox_mode = UNSET else: diff --git a/nuon/models/plantypes_sync_secrets_plan.py b/nuon/models/plantypes_sync_secrets_plan.py index 80df93fa..61078380 100644 --- a/nuon/models/plantypes_sync_secrets_plan.py +++ b/nuon/models/plantypes_sync_secrets_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,41 +27,41 @@ 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 (GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset): + azure_auth (GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset): + cluster_info (KubeClusterInfo | Unset): + kubernetes_secrets (list[PlantypesKubernetesSecretSync] | Unset): + sandbox_mode (PlantypesSandboxMode | Unset): """ - 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 + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset = UNSET + azure_auth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset = UNSET + cluster_info: KubeClusterInfo | Unset = UNSET + kubernetes_secrets: list[PlantypesKubernetesSecretSync] | Unset = UNSET + sandbox_mode: PlantypesSandboxMode | Unset = 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 + aws_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_auth, Unset): aws_auth = self.aws_auth.to_dict() - azure_auth: Union[Unset, dict[str, Any]] = UNSET + azure_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.azure_auth, Unset): azure_auth = self.azure_auth.to_dict() - cluster_info: Union[Unset, dict[str, Any]] = UNSET + cluster_info: dict[str, Any] | Unset = UNSET if not isinstance(self.cluster_info, Unset): cluster_info = self.cluster_info.to_dict() - kubernetes_secrets: Union[Unset, list[dict[str, Any]]] = UNSET + kubernetes_secrets: list[dict[str, Any]] | Unset = 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 + sandbox_mode: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox_mode, Unset): sandbox_mode = self.sandbox_mode.to_dict() @@ -93,21 +95,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _aws_auth = d.pop("aws_auth", UNSET) - aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset 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] + azure_auth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset 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] + cluster_info: KubeClusterInfo | Unset if isinstance(_cluster_info, Unset): cluster_info = UNSET else: @@ -121,7 +123,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: kubernetes_secrets.append(kubernetes_secrets_item) _sandbox_mode = d.pop("sandbox_mode", UNSET) - sandbox_mode: Union[Unset, PlantypesSandboxMode] + sandbox_mode: PlantypesSandboxMode | Unset if isinstance(_sandbox_mode, Unset): sandbox_mode = UNSET else: diff --git a/nuon/models/plantypes_terraform_backend.py b/nuon/models/plantypes_terraform_backend.py index 4a5f62c0..0adfa65a 100644 --- a/nuon/models/plantypes_terraform_backend.py +++ b/nuon/models/plantypes_terraform_backend.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_terraform_build_plan.py b/nuon/models/plantypes_terraform_build_plan.py index c46064f6..31ac8f8c 100644 --- a/nuon/models/plantypes_terraform_build_plan.py +++ b/nuon/models/plantypes_terraform_build_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class PlantypesTerraformBuildPlan: """ Attributes: - labels (Union[Unset, PlantypesTerraformBuildPlanLabels]): + labels (PlantypesTerraformBuildPlanLabels | Unset): """ - labels: Union[Unset, "PlantypesTerraformBuildPlanLabels"] = UNSET + labels: PlantypesTerraformBuildPlanLabels | Unset = 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 + labels: dict[str, Any] | Unset = UNSET if not isinstance(self.labels, Unset): labels = self.labels.to_dict() @@ -42,7 +44,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _labels = d.pop("labels", UNSET) - labels: Union[Unset, PlantypesTerraformBuildPlanLabels] + labels: PlantypesTerraformBuildPlanLabels | Unset if isinstance(_labels, Unset): labels = UNSET else: diff --git a/nuon/models/plantypes_terraform_build_plan_labels.py b/nuon/models/plantypes_terraform_build_plan_labels.py index b8480c60..8d7ab081 100644 --- a/nuon/models/plantypes_terraform_build_plan_labels.py +++ b/nuon/models/plantypes_terraform_build_plan_labels.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_terraform_deploy_hooks.py b/nuon/models/plantypes_terraform_deploy_hooks.py index 1dab00ff..5765b51c 100644 --- a/nuon/models/plantypes_terraform_deploy_hooks.py +++ b/nuon/models/plantypes_terraform_deploy_hooks.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,24 +22,24 @@ class PlantypesTerraformDeployHooks: """ Attributes: - enabled (Union[Unset, bool]): - env_vars (Union[Unset, PlantypesTerraformDeployHooksEnvVars]): - run_auth (Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig]): + enabled (bool | Unset): + env_vars (PlantypesTerraformDeployHooksEnvVars | Unset): + run_auth (GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset): """ - enabled: Union[Unset, bool] = UNSET - env_vars: Union[Unset, "PlantypesTerraformDeployHooksEnvVars"] = UNSET - run_auth: Union[Unset, "GithubComPowertoolsdevMonoPkgAwsCredentialsConfig"] = UNSET + enabled: bool | Unset = UNSET + env_vars: PlantypesTerraformDeployHooksEnvVars | Unset = UNSET + run_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset = 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 + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() - run_auth: Union[Unset, dict[str, Any]] = UNSET + run_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.run_auth, Unset): run_auth = self.run_auth.to_dict() @@ -64,14 +66,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) _env_vars = d.pop("envVars", UNSET) - env_vars: Union[Unset, PlantypesTerraformDeployHooksEnvVars] + env_vars: PlantypesTerraformDeployHooksEnvVars | Unset 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] + run_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset if isinstance(_run_auth, Unset): run_auth = UNSET else: diff --git a/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py b/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py index 6924e361..71c8a932 100644 --- a/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py +++ b/nuon/models/plantypes_terraform_deploy_hooks_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_terraform_deploy_plan.py b/nuon/models/plantypes_terraform_deploy_plan.py index f8610814..f143bc36 100644 --- a/nuon/models/plantypes_terraform_deploy_plan.py +++ b/nuon/models/plantypes_terraform_deploy_plan.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -31,74 +33,74 @@ 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 (GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset): + azure_auth (GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset): + cluster_info (KubeClusterInfo | Unset): + env_vars (PlantypesTerraformDeployPlanEnvVars | Unset): + hooks (PlantypesTerraformDeployHooks | Unset): + plan_json (list[int] | Unset): + policies (PlantypesTerraformDeployPlanPolicies | Unset): + state (GithubComPowertoolsdevMonoPkgTypesStateState | Unset): + terraform_backend (PlantypesTerraformBackend | Unset): + vars_ (PlantypesTerraformDeployPlanVars | Unset): + vars_files (list[str] | Unset): """ - 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 + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset = UNSET + azure_auth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset = UNSET + cluster_info: KubeClusterInfo | Unset = UNSET + env_vars: PlantypesTerraformDeployPlanEnvVars | Unset = UNSET + hooks: PlantypesTerraformDeployHooks | Unset = UNSET + plan_json: list[int] | Unset = UNSET + policies: PlantypesTerraformDeployPlanPolicies | Unset = UNSET + state: GithubComPowertoolsdevMonoPkgTypesStateState | Unset = UNSET + terraform_backend: PlantypesTerraformBackend | Unset = UNSET + vars_: PlantypesTerraformDeployPlanVars | Unset = UNSET + vars_files: list[str] | Unset = 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 + aws_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_auth, Unset): aws_auth = self.aws_auth.to_dict() - azure_auth: Union[Unset, dict[str, Any]] = UNSET + azure_auth: dict[str, Any] | Unset = UNSET if not isinstance(self.azure_auth, Unset): azure_auth = self.azure_auth.to_dict() - cluster_info: Union[Unset, dict[str, Any]] = UNSET + cluster_info: dict[str, Any] | Unset = UNSET if not isinstance(self.cluster_info, Unset): cluster_info = self.cluster_info.to_dict() - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() - hooks: Union[Unset, dict[str, Any]] = UNSET + hooks: dict[str, Any] | Unset = UNSET if not isinstance(self.hooks, Unset): hooks = self.hooks.to_dict() - plan_json: Union[Unset, list[int]] = UNSET + plan_json: list[int] | Unset = UNSET if not isinstance(self.plan_json, Unset): plan_json = self.plan_json - policies: Union[Unset, dict[str, Any]] = UNSET + policies: dict[str, Any] | Unset = UNSET if not isinstance(self.policies, Unset): policies = self.policies.to_dict() - state: Union[Unset, dict[str, Any]] = UNSET + state: dict[str, Any] | Unset = UNSET if not isinstance(self.state, Unset): state = self.state.to_dict() - terraform_backend: Union[Unset, dict[str, Any]] = UNSET + terraform_backend: dict[str, Any] | Unset = UNSET if not isinstance(self.terraform_backend, Unset): terraform_backend = self.terraform_backend.to_dict() - vars_: Union[Unset, dict[str, Any]] = UNSET + vars_: dict[str, Any] | Unset = UNSET if not isinstance(self.vars_, Unset): vars_ = self.vars_.to_dict() - vars_files: Union[Unset, list[str]] = UNSET + vars_files: list[str] | Unset = UNSET if not isinstance(self.vars_files, Unset): vars_files = self.vars_files @@ -150,35 +152,35 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _aws_auth = d.pop("aws_auth", UNSET) - aws_auth: Union[Unset, GithubComPowertoolsdevMonoPkgAwsCredentialsConfig] + aws_auth: GithubComPowertoolsdevMonoPkgAwsCredentialsConfig | Unset 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] + azure_auth: GithubComPowertoolsdevMonoPkgAzureCredentialsConfig | Unset 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] + cluster_info: KubeClusterInfo | Unset 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] + env_vars: PlantypesTerraformDeployPlanEnvVars | Unset 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] + hooks: PlantypesTerraformDeployHooks | Unset if isinstance(_hooks, Unset): hooks = UNSET else: @@ -187,28 +189,28 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: plan_json = cast(list[int], d.pop("plan_json", UNSET)) _policies = d.pop("policies", UNSET) - policies: Union[Unset, PlantypesTerraformDeployPlanPolicies] + policies: PlantypesTerraformDeployPlanPolicies | Unset if isinstance(_policies, Unset): policies = UNSET else: policies = PlantypesTerraformDeployPlanPolicies.from_dict(_policies) _state = d.pop("state", UNSET) - state: Union[Unset, GithubComPowertoolsdevMonoPkgTypesStateState] + state: GithubComPowertoolsdevMonoPkgTypesStateState | Unset if isinstance(_state, Unset): state = UNSET else: state = GithubComPowertoolsdevMonoPkgTypesStateState.from_dict(_state) _terraform_backend = d.pop("terraform_backend", UNSET) - terraform_backend: Union[Unset, PlantypesTerraformBackend] + terraform_backend: PlantypesTerraformBackend | Unset 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] + vars_: PlantypesTerraformDeployPlanVars | Unset if isinstance(_vars_, Unset): vars_ = UNSET else: diff --git a/nuon/models/plantypes_terraform_deploy_plan_env_vars.py b/nuon/models/plantypes_terraform_deploy_plan_env_vars.py index 20bc3fb1..fc85e17f 100644 --- a/nuon/models/plantypes_terraform_deploy_plan_env_vars.py +++ b/nuon/models/plantypes_terraform_deploy_plan_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_terraform_deploy_plan_policies.py b/nuon/models/plantypes_terraform_deploy_plan_policies.py index 661166b9..77b3b2d7 100644 --- a/nuon/models/plantypes_terraform_deploy_plan_policies.py +++ b/nuon/models/plantypes_terraform_deploy_plan_policies.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_terraform_deploy_plan_vars.py b/nuon/models/plantypes_terraform_deploy_plan_vars.py index 72cc0f46..bc015708 100644 --- a/nuon/models/plantypes_terraform_deploy_plan_vars.py +++ b/nuon/models/plantypes_terraform_deploy_plan_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/plantypes_terraform_local_archive.py b/nuon/models/plantypes_terraform_local_archive.py index 744b8f10..f9715307 100644 --- a/nuon/models/plantypes_terraform_local_archive.py +++ b/nuon/models/plantypes_terraform_local_archive.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class PlantypesTerraformLocalArchive: """ Attributes: - local_archive (Union[Unset, str]): + local_archive (str | Unset): """ - local_archive: Union[Unset, str] = UNSET + local_archive: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/plantypes_terraform_sandbox_mode.py b/nuon/models/plantypes_terraform_sandbox_mode.py index cfc178a8..29817f29 100644 --- a/nuon/models/plantypes_terraform_sandbox_mode.py +++ b/nuon/models/plantypes_terraform_sandbox_mode.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,16 +15,16 @@ 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 (str | Unset): create the plan output + plan_display_contents (str | Unset): + state_json (list[int] | Unset): needs to be the outputs of `terraform show -json` + workspace_id (str | Unset): """ - 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 + plan_contents: str | Unset = UNSET + plan_display_contents: str | Unset = UNSET + state_json: list[int] | Unset = UNSET + workspace_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -30,7 +32,7 @@ def to_dict(self) -> dict[str, Any]: plan_display_contents = self.plan_display_contents - state_json: Union[Unset, list[int]] = UNSET + state_json: list[int] | Unset = UNSET if not isinstance(self.state_json, Unset): state_json = self.state_json diff --git a/nuon/models/refs_ref.py b/nuon/models/refs_ref.py index 280a6759..0678faf9 100644 --- a/nuon/models/refs_ref.py +++ b/nuon/models/refs_ref.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,16 +16,16 @@ class RefsRef: """ Attributes: - input_ (Union[Unset, str]): - name (Union[Unset, str]): - type_ (Union[Unset, RefsRefType]): - value (Union[Unset, str]): + input_ (str | Unset): + name (str | Unset): + type_ (RefsRefType | Unset): + value (str | Unset): """ - input_: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - type_: Union[Unset, RefsRefType] = UNSET - value: Union[Unset, str] = UNSET + input_: str | Unset = UNSET + name: str | Unset = UNSET + type_: RefsRefType | Unset = UNSET + value: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -31,7 +33,7 @@ def to_dict(self) -> dict[str, Any]: name = self.name - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -59,7 +61,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name", UNSET) _type_ = d.pop("type", UNSET) - type_: Union[Unset, RefsRefType] + type_: RefsRefType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/service_app_awsiam_policy_config.py b/nuon/models/service_app_awsiam_policy_config.py index 1fdb7507..30eac201 100644 --- a/nuon/models/service_app_awsiam_policy_config.py +++ b/nuon/models/service_app_awsiam_policy_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class ServiceAppAWSIAMPolicyConfig: """ Attributes: - contents (Union[Unset, str]): - managed_policy_name (Union[Unset, str]): - name (Union[Unset, str]): + contents (str | Unset): + managed_policy_name (str | Unset): + name (str | Unset): """ - contents: Union[Unset, str] = UNSET - managed_policy_name: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET + contents: str | Unset = UNSET + managed_policy_name: str | Unset = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_app_awsiam_role_config.py b/nuon/models/service_app_awsiam_role_config.py index 0dca9dc7..3bc63401 100644 --- a/nuon/models/service_app_awsiam_role_config.py +++ b/nuon/models/service_app_awsiam_role_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,15 +22,15 @@ class ServiceAppAWSIAMRoleConfig: description (str): display_name (str): name (str): - permissions_boundary (Union[Unset, str]): - policies (Union[Unset, list['ServiceAppAWSIAMPolicyConfig']]): + permissions_boundary (str | Unset): + policies (list[ServiceAppAWSIAMPolicyConfig] | Unset): """ description: str display_name: str name: str - permissions_boundary: Union[Unset, str] = UNSET - policies: Union[Unset, list["ServiceAppAWSIAMPolicyConfig"]] = UNSET + permissions_boundary: str | Unset = UNSET + policies: list[ServiceAppAWSIAMPolicyConfig] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: permissions_boundary = self.permissions_boundary - policies: Union[Unset, list[dict[str, Any]]] = UNSET + policies: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.policies, Unset): policies = [] for policies_item_data in self.policies: diff --git a/nuon/models/service_app_config_template.py b/nuon/models/service_app_config_template.py index b93d3d0e..d08c1fc6 100644 --- a/nuon/models/service_app_config_template.py +++ b/nuon/models/service_app_config_template.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -15,16 +17,16 @@ class ServiceAppConfigTemplate: """ Attributes: - content (Union[Unset, str]): - filename (Union[Unset, str]): - format_ (Union[Unset, AppAppConfigVersion]): - type_ (Union[Unset, ServiceAppConfigTemplateType]): + content (str | Unset): + filename (str | Unset): + format_ (AppAppConfigVersion | Unset): + type_ (ServiceAppConfigTemplateType | Unset): """ - content: Union[Unset, str] = UNSET - filename: Union[Unset, str] = UNSET - format_: Union[Unset, AppAppConfigVersion] = UNSET - type_: Union[Unset, ServiceAppConfigTemplateType] = UNSET + content: str | Unset = UNSET + filename: str | Unset = UNSET + format_: AppAppConfigVersion | Unset = UNSET + type_: ServiceAppConfigTemplateType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,11 +34,11 @@ def to_dict(self) -> dict[str, Any]: filename = self.filename - format_: Union[Unset, str] = UNSET + format_: str | Unset = UNSET if not isinstance(self.format_, Unset): format_ = self.format_.value - type_: Union[Unset, str] = UNSET + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_.value @@ -62,14 +64,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: filename = d.pop("filename", UNSET) _format_ = d.pop("format", UNSET) - format_: Union[Unset, AppAppConfigVersion] + format_: AppAppConfigVersion | Unset if isinstance(_format_, Unset): format_ = UNSET else: format_ = AppAppConfigVersion(_format_) _type_ = d.pop("type", UNSET) - type_: Union[Unset, ServiceAppConfigTemplateType] + type_: ServiceAppConfigTemplateType | Unset if isinstance(_type_, Unset): type_ = UNSET else: diff --git a/nuon/models/service_app_group_request.py b/nuon/models/service_app_group_request.py index e2937949..e0c4fa5b 100644 --- a/nuon/models/service_app_group_request.py +++ b/nuon/models/service_app_group_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_app_input_request.py b/nuon/models/service_app_input_request.py index e474c10c..e2eb73bd 100644 --- a/nuon/models/service_app_input_request.py +++ b/nuon/models/service_app_input_request.py @@ -1,9 +1,12 @@ +from __future__ import annotations + 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_app_input_source import AppAppInputSource from ..types import UNSET, Unset T = TypeVar("T", bound="ServiceAppInputRequest") @@ -17,22 +20,24 @@ class ServiceAppInputRequest: display_name (str): group (str): index (int): - default (Union[Unset, str]): - internal (Union[Unset, bool]): New, optional fields - required (Union[Unset, bool]): - sensitive (Union[Unset, bool]): - type_ (Union[Unset, str]): + default (str | Unset): + internal (bool | Unset): New, optional fields + required (bool | Unset): + sensitive (bool | Unset): + source (AppAppInputSource | Unset): + type_ (str | Unset): """ description: str display_name: str group: str index: int - default: Union[Unset, str] = UNSET - internal: Union[Unset, bool] = UNSET - required: Union[Unset, bool] = UNSET - sensitive: Union[Unset, bool] = UNSET - type_: Union[Unset, str] = UNSET + default: str | Unset = UNSET + internal: bool | Unset = UNSET + required: bool | Unset = UNSET + sensitive: bool | Unset = UNSET + source: AppAppInputSource | Unset = UNSET + type_: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -52,6 +57,10 @@ def to_dict(self) -> dict[str, Any]: sensitive = self.sensitive + source: str | Unset = UNSET + if not isinstance(self.source, Unset): + source = self.source.value + type_ = self.type_ field_dict: dict[str, Any] = {} @@ -72,6 +81,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if sensitive is not UNSET: field_dict["sensitive"] = sensitive + if source is not UNSET: + field_dict["source"] = source if type_ is not UNSET: field_dict["type"] = type_ @@ -96,6 +107,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: sensitive = d.pop("sensitive", UNSET) + _source = d.pop("source", UNSET) + source: AppAppInputSource | Unset + if isinstance(_source, Unset): + source = UNSET + else: + source = AppAppInputSource(_source) + type_ = d.pop("type", UNSET) service_app_input_request = cls( @@ -107,6 +125,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: internal=internal, required=required, sensitive=sensitive, + source=source, type_=type_, ) diff --git a/nuon/models/service_app_policy_config.py b/nuon/models/service_app_policy_config.py index af424da1..197ccda8 100644 --- a/nuon/models/service_app_policy_config.py +++ b/nuon/models/service_app_policy_config.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_app_secret_config.py b/nuon/models/service_app_secret_config.py index ef8072fe..d79ab592 100644 --- a/nuon/models/service_app_secret_config.py +++ b/nuon/models/service_app_secret_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -16,25 +18,25 @@ class ServiceAppSecretConfig: description (str): display_name (str): name (str): - auto_generate (Union[Unset, bool]): - default (Union[Unset, str]): - format_ (Union[Unset, str]): - kubernetes_secret_name (Union[Unset, str]): - kubernetes_secret_namespace (Union[Unset, str]): - kubernetes_sync (Union[Unset, bool]): - required (Union[Unset, bool]): + auto_generate (bool | Unset): + default (str | Unset): + format_ (str | Unset): + kubernetes_secret_name (str | Unset): + kubernetes_secret_namespace (str | Unset): + kubernetes_sync (bool | Unset): + required (bool | Unset): """ description: str display_name: str name: str - auto_generate: Union[Unset, bool] = UNSET - default: Union[Unset, str] = UNSET - format_: Union[Unset, str] = UNSET - kubernetes_secret_name: Union[Unset, str] = UNSET - kubernetes_secret_namespace: Union[Unset, str] = UNSET - kubernetes_sync: Union[Unset, bool] = UNSET - required: Union[Unset, bool] = UNSET + auto_generate: bool | Unset = UNSET + default: str | Unset = UNSET + format_: str | Unset = UNSET + kubernetes_secret_name: str | Unset = UNSET + kubernetes_secret_namespace: str | Unset = UNSET + kubernetes_sync: bool | Unset = UNSET + required: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_aws_ecr_image_config_request.py b/nuon/models/service_aws_ecr_image_config_request.py index 56859d38..9be044e9 100644 --- a/nuon/models/service_aws_ecr_image_config_request.py +++ b/nuon/models/service_aws_ecr_image_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceAwsECRImageConfigRequest: """ Attributes: - aws_region (Union[Unset, str]): - iam_role_arn (Union[Unset, str]): + aws_region (str | Unset): + iam_role_arn (str | Unset): """ - aws_region: Union[Unset, str] = UNSET - iam_role_arn: Union[Unset, str] = UNSET + aws_region: str | Unset = UNSET + iam_role_arn: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_build_all_components_request.py b/nuon/models/service_build_all_components_request.py index 1b563545..c558b6ca 100644 --- a/nuon/models/service_build_all_components_request.py +++ b/nuon/models/service_build_all_components_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_cancel_runner_job_request.py b/nuon/models/service_cancel_runner_job_request.py index 91ad5557..e1feea24 100644 --- a/nuon/models/service_cancel_runner_job_request.py +++ b/nuon/models/service_cancel_runner_job_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_cli_config.py b/nuon/models/service_cli_config.py index 130a8f3a..c31bebc1 100644 --- a/nuon/models/service_cli_config.py +++ b/nuon/models/service_cli_config.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,16 +15,16 @@ class ServiceCLIConfig: """ Attributes: - auth_audience (Union[Unset, str]): - auth_client_id (Union[Unset, str]): - auth_domain (Union[Unset, str]): - dashboard_url (Union[Unset, str]): + auth_audience (str | Unset): + auth_client_id (str | Unset): + auth_domain (str | Unset): + dashboard_url (str | Unset): """ - auth_audience: Union[Unset, str] = UNSET - auth_client_id: Union[Unset, str] = UNSET - auth_domain: Union[Unset, str] = UNSET - dashboard_url: Union[Unset, str] = UNSET + auth_audience: str | Unset = UNSET + auth_client_id: str | Unset = UNSET + auth_domain: str | Unset = UNSET + dashboard_url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_component_children.py b/nuon/models/service_component_children.py index 39be8271..b79a2552 100644 --- a/nuon/models/service_component_children.py +++ b/nuon/models/service_component_children.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,14 +19,14 @@ class ServiceComponentChildren: """ Attributes: - children (Union[Unset, list['AppComponent']]): + children (list[AppComponent] | Unset): """ - children: Union[Unset, list["AppComponent"]] = UNSET + children: list[AppComponent] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - children: Union[Unset, list[dict[str, Any]]] = UNSET + children: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.children, Unset): children = [] for children_item_data in self.children: diff --git a/nuon/models/service_connected_github_vcs_action_workflow_config_request.py b/nuon/models/service_connected_github_vcs_action_workflow_config_request.py index 137abd97..75c41f45 100644 --- a/nuon/models/service_connected_github_vcs_action_workflow_config_request.py +++ b/nuon/models/service_connected_github_vcs_action_workflow_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -15,14 +17,14 @@ class ServiceConnectedGithubVCSActionWorkflowConfigRequest: Attributes: directory (str): repo (str): - branch (Union[Unset, str]): - git_ref (Union[Unset, str]): + branch (str | Unset): + git_ref (str | Unset): """ directory: str repo: str - branch: Union[Unset, str] = UNSET - git_ref: Union[Unset, str] = UNSET + branch: str | Unset = UNSET + git_ref: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_connected_github_vcs_config_request.py b/nuon/models/service_connected_github_vcs_config_request.py index ffa61a0c..35bdc9d1 100644 --- a/nuon/models/service_connected_github_vcs_config_request.py +++ b/nuon/models/service_connected_github_vcs_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -15,14 +17,14 @@ class ServiceConnectedGithubVCSConfigRequest: Attributes: directory (str): repo (str): - branch (Union[Unset, str]): - git_ref (Union[Unset, str]): + branch (str | Unset): + git_ref (str | Unset): """ directory: str repo: str - branch: Union[Unset, str] = UNSET - git_ref: Union[Unset, str] = UNSET + branch: str | Unset = UNSET + git_ref: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_connected_github_vcs_sandbox_config_request.py b/nuon/models/service_connected_github_vcs_sandbox_config_request.py index a39543e5..c05e4cf2 100644 --- a/nuon/models/service_connected_github_vcs_sandbox_config_request.py +++ b/nuon/models/service_connected_github_vcs_sandbox_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -15,14 +17,14 @@ class ServiceConnectedGithubVCSSandboxConfigRequest: Attributes: directory (str): repo (str): - branch (Union[Unset, str]): - git_ref (Union[Unset, str]): + branch (str | Unset): + git_ref (str | Unset): """ directory: str repo: str - branch: Union[Unset, str] = UNSET - git_ref: Union[Unset, str] = UNSET + branch: str | Unset = UNSET + git_ref: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_action_workflow_config_request.py b/nuon/models/service_create_action_workflow_config_request.py index 125de9f6..5cae4a7e 100644 --- a/nuon/models/service_create_action_workflow_config_request.py +++ b/nuon/models/service_create_action_workflow_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,21 +23,21 @@ class ServiceCreateActionWorkflowConfigRequest: """ Attributes: 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]): + steps (list[ServiceCreateActionWorkflowConfigStepRequest]): + triggers (list[ServiceCreateActionWorkflowConfigTriggerRequest]): + break_glass_role_arn (str | Unset): + dependencies (list[str] | Unset): + references (list[str] | Unset): + timeout (int | Unset): """ 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 + steps: list[ServiceCreateActionWorkflowConfigStepRequest] + triggers: list[ServiceCreateActionWorkflowConfigTriggerRequest] + break_glass_role_arn: str | Unset = UNSET + dependencies: list[str] | Unset = UNSET + references: list[str] | Unset = UNSET + timeout: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -53,11 +55,11 @@ def to_dict(self) -> dict[str, Any]: break_glass_role_arn = self.break_glass_role_arn - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies - references: Union[Unset, list[str]] = UNSET + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references diff --git a/nuon/models/service_create_action_workflow_config_step_request.py b/nuon/models/service_create_action_workflow_config_step_request.py index 629e7468..58d96072 100644 --- a/nuon/models/service_create_action_workflow_config_step_request.py +++ b/nuon/models/service_create_action_workflow_config_step_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,21 +28,21 @@ class ServiceCreateActionWorkflowConfigStepRequest: """ Attributes: name (str): - command (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSActionWorkflowConfigRequest]): - env_vars (Union[Unset, ServiceCreateActionWorkflowConfigStepRequestEnvVars]): - inline_contents (Union[Unset, str]): - public_git_vcs_config (Union[Unset, ServicePublicGitVCSActionWorkflowConfigRequest]): - references (Union[Unset, list[str]]): + command (str | Unset): + connected_github_vcs_config (ServiceConnectedGithubVCSActionWorkflowConfigRequest | Unset): + env_vars (ServiceCreateActionWorkflowConfigStepRequestEnvVars | Unset): + inline_contents (str | Unset): + public_git_vcs_config (ServicePublicGitVCSActionWorkflowConfigRequest | Unset): + references (list[str] | Unset): """ name: str - command: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSActionWorkflowConfigRequest"] = UNSET - env_vars: Union[Unset, "ServiceCreateActionWorkflowConfigStepRequestEnvVars"] = UNSET - inline_contents: Union[Unset, str] = UNSET - public_git_vcs_config: Union[Unset, "ServicePublicGitVCSActionWorkflowConfigRequest"] = UNSET - references: Union[Unset, list[str]] = UNSET + command: str | Unset = UNSET + connected_github_vcs_config: ServiceConnectedGithubVCSActionWorkflowConfigRequest | Unset = UNSET + env_vars: ServiceCreateActionWorkflowConfigStepRequestEnvVars | Unset = UNSET + inline_contents: str | Unset = UNSET + public_git_vcs_config: ServicePublicGitVCSActionWorkflowConfigRequest | Unset = UNSET + references: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -48,21 +50,21 @@ def to_dict(self) -> dict[str, Any]: command = self.command - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() inline_contents = self.inline_contents - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = 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 + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references @@ -106,7 +108,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: command = d.pop("command", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSActionWorkflowConfigRequest] + connected_github_vcs_config: ServiceConnectedGithubVCSActionWorkflowConfigRequest | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -115,7 +117,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, ServiceCreateActionWorkflowConfigStepRequestEnvVars] + env_vars: ServiceCreateActionWorkflowConfigStepRequestEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: @@ -124,7 +126,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: inline_contents = d.pop("inline_contents", UNSET) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, ServicePublicGitVCSActionWorkflowConfigRequest] + public_git_vcs_config: ServicePublicGitVCSActionWorkflowConfigRequest | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: diff --git a/nuon/models/service_create_action_workflow_config_step_request_env_vars.py b/nuon/models/service_create_action_workflow_config_step_request_env_vars.py index 43535a25..6ffacaf0 100644 --- a/nuon/models/service_create_action_workflow_config_step_request_env_vars.py +++ b/nuon/models/service_create_action_workflow_config_step_request_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar 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 ce7aaa7a..6f170c0b 100644 --- a/nuon/models/service_create_action_workflow_config_trigger_request.py +++ b/nuon/models/service_create_action_workflow_config_trigger_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -15,15 +17,15 @@ class ServiceCreateActionWorkflowConfigTriggerRequest: """ Attributes: type_ (AppActionWorkflowTriggerType): - component_name (Union[Unset, str]): - cron_schedule (Union[Unset, str]): - index (Union[Unset, int]): + component_name (str | Unset): + cron_schedule (str | Unset): + index (int | Unset): """ type_: AppActionWorkflowTriggerType - component_name: Union[Unset, str] = UNSET - cron_schedule: Union[Unset, str] = UNSET - index: Union[Unset, int] = UNSET + component_name: str | Unset = UNSET + cron_schedule: str | Unset = UNSET + index: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_app_action_request.py b/nuon/models/service_create_app_action_request.py index e440a42f..a6892f22 100644 --- a/nuon/models/service_create_app_action_request.py +++ b/nuon/models/service_create_app_action_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceCreateAppActionRequest: """ Attributes: - name (Union[Unset, str]): + name (str | Unset): """ - name: Union[Unset, str] = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_app_action_workflow_request.py b/nuon/models/service_create_app_action_workflow_request.py index db06267a..df60544b 100644 --- a/nuon/models/service_create_app_action_workflow_request.py +++ b/nuon/models/service_create_app_action_workflow_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceCreateAppActionWorkflowRequest: """ Attributes: - name (Union[Unset, str]): + name (str | Unset): """ - name: Union[Unset, str] = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_app_branch_request.py b/nuon/models/service_create_app_branch_request.py index 839a6a2b..cb79601c 100644 --- a/nuon/models/service_create_app_branch_request.py +++ b/nuon/models/service_create_app_branch_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_app_break_glass_config_request.py b/nuon/models/service_create_app_break_glass_config_request.py index cda794f9..59742cf5 100644 --- a/nuon/models/service_create_app_break_glass_config_request.py +++ b/nuon/models/service_create_app_break_glass_config_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -16,11 +18,11 @@ class ServiceCreateAppBreakGlassConfigRequest: """ Attributes: app_config_id (str): - roles (list['ServiceAppAWSIAMRoleConfig']): + roles (list[ServiceAppAWSIAMRoleConfig]): """ app_config_id: str - roles: list["ServiceAppAWSIAMRoleConfig"] + roles: list[ServiceAppAWSIAMRoleConfig] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_app_config_request.py b/nuon/models/service_create_app_config_request.py index ffe181ea..f18b252f 100644 --- a/nuon/models/service_create_app_config_request.py +++ b/nuon/models/service_create_app_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceCreateAppConfigRequest: """ Attributes: - cli_version (Union[Unset, str]): - readme (Union[Unset, str]): not required Readme + cli_version (str | Unset): + readme (str | Unset): not required Readme """ - cli_version: Union[Unset, str] = UNSET - readme: Union[Unset, str] = UNSET + cli_version: str | Unset = UNSET + readme: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_app_input_config_request.py b/nuon/models/service_create_app_input_config_request.py index d0e0bf4e..2f1a32a2 100644 --- a/nuon/models/service_create_app_input_config_request.py +++ b/nuon/models/service_create_app_input_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,12 +22,12 @@ class ServiceCreateAppInputConfigRequest: Attributes: groups (ServiceCreateAppInputConfigRequestGroups): inputs (ServiceCreateAppInputConfigRequestInputs): - app_config_id (Union[Unset, str]): + app_config_id (str | Unset): """ - groups: "ServiceCreateAppInputConfigRequestGroups" - inputs: "ServiceCreateAppInputConfigRequestInputs" - app_config_id: Union[Unset, str] = UNSET + groups: ServiceCreateAppInputConfigRequestGroups + inputs: ServiceCreateAppInputConfigRequestInputs + app_config_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_app_input_config_request_groups.py b/nuon/models/service_create_app_input_config_request_groups.py index d005b63d..07357baa 100644 --- a/nuon/models/service_create_app_input_config_request_groups.py +++ b/nuon/models/service_create_app_input_config_request_groups.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -15,7 +17,7 @@ class ServiceCreateAppInputConfigRequestGroups: """ """ - additional_properties: dict[str, "ServiceAppGroupRequest"] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, ServiceAppGroupRequest] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} @@ -44,10 +46,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) -> "ServiceAppGroupRequest": + def __getitem__(self, key: str) -> ServiceAppGroupRequest: return self.additional_properties[key] - def __setitem__(self, key: str, value: "ServiceAppGroupRequest") -> None: + def __setitem__(self, key: str, value: ServiceAppGroupRequest) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/nuon/models/service_create_app_input_config_request_inputs.py b/nuon/models/service_create_app_input_config_request_inputs.py index 71f40ed1..f25b272f 100644 --- a/nuon/models/service_create_app_input_config_request_inputs.py +++ b/nuon/models/service_create_app_input_config_request_inputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -15,7 +17,7 @@ class ServiceCreateAppInputConfigRequestInputs: """ """ - additional_properties: dict[str, "ServiceAppInputRequest"] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, ServiceAppInputRequest] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} @@ -44,10 +46,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) -> "ServiceAppInputRequest": + def __getitem__(self, key: str) -> ServiceAppInputRequest: return self.additional_properties[key] - def __setitem__(self, key: str, value: "ServiceAppInputRequest") -> None: + def __setitem__(self, key: str, value: ServiceAppInputRequest) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/nuon/models/service_create_app_permissions_config_request.py b/nuon/models/service_create_app_permissions_config_request.py index fc532d8a..6ce9e882 100644 --- a/nuon/models/service_create_app_permissions_config_request.py +++ b/nuon/models/service_create_app_permissions_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,14 +23,14 @@ class ServiceCreateAppPermissionsConfigRequest: deprovision_role (ServiceAppAWSIAMRoleConfig): maintenance_role (ServiceAppAWSIAMRoleConfig): provision_role (ServiceAppAWSIAMRoleConfig): - break_glass_roles (Union[Unset, list['ServiceAppAWSIAMRoleConfig']]): + break_glass_roles (list[ServiceAppAWSIAMRoleConfig] | Unset): """ app_config_id: str - deprovision_role: "ServiceAppAWSIAMRoleConfig" - maintenance_role: "ServiceAppAWSIAMRoleConfig" - provision_role: "ServiceAppAWSIAMRoleConfig" - break_glass_roles: Union[Unset, list["ServiceAppAWSIAMRoleConfig"]] = UNSET + deprovision_role: ServiceAppAWSIAMRoleConfig + maintenance_role: ServiceAppAWSIAMRoleConfig + provision_role: ServiceAppAWSIAMRoleConfig + break_glass_roles: list[ServiceAppAWSIAMRoleConfig] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: provision_role = self.provision_role.to_dict() - break_glass_roles: Union[Unset, list[dict[str, Any]]] = UNSET + break_glass_roles: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.break_glass_roles, Unset): break_glass_roles = [] for break_glass_roles_item_data in self.break_glass_roles: diff --git a/nuon/models/service_create_app_policies_config_request.py b/nuon/models/service_create_app_policies_config_request.py index 692dd09b..80490917 100644 --- a/nuon/models/service_create_app_policies_config_request.py +++ b/nuon/models/service_create_app_policies_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,17 +20,17 @@ class ServiceCreateAppPoliciesConfigRequest: """ Attributes: app_config_id (str): - policies (Union[Unset, list['ServiceAppPolicyConfig']]): + policies (list[ServiceAppPolicyConfig] | Unset): """ app_config_id: str - policies: Union[Unset, list["ServiceAppPolicyConfig"]] = UNSET + policies: list[ServiceAppPolicyConfig] | Unset = 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 - policies: Union[Unset, list[dict[str, Any]]] = UNSET + policies: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.policies, Unset): policies = [] for policies_item_data in self.policies: diff --git a/nuon/models/service_create_app_request.py b/nuon/models/service_create_app_request.py index 38e64111..05eef40d 100644 --- a/nuon/models/service_create_app_request.py +++ b/nuon/models/service_create_app_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,15 +16,15 @@ class ServiceCreateAppRequest: """ Attributes: name (str): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - slack_webhook_url (Union[Unset, str]): + description (str | Unset): + display_name (str | Unset): + slack_webhook_url (str | Unset): """ name: str - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - slack_webhook_url: Union[Unset, str] = UNSET + description: str | Unset = UNSET + display_name: str | Unset = UNSET + slack_webhook_url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_app_runner_config_request.py b/nuon/models/service_create_app_runner_config_request.py index 799905d9..cd5270e0 100644 --- a/nuon/models/service_create_app_runner_config_request.py +++ b/nuon/models/service_create_app_runner_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -20,17 +22,17 @@ class ServiceCreateAppRunnerConfigRequest: """ Attributes: type_ (AppAppRunnerType): - app_config_id (Union[Unset, str]): - env_vars (Union[Unset, ServiceCreateAppRunnerConfigRequestEnvVars]): - helm_driver (Union[Unset, AppAppRunnerConfigHelmDriverType]): - init_script_url (Union[Unset, str]): + app_config_id (str | Unset): + env_vars (ServiceCreateAppRunnerConfigRequestEnvVars | Unset): + helm_driver (AppAppRunnerConfigHelmDriverType | Unset): + init_script_url (str | Unset): """ type_: AppAppRunnerType - app_config_id: Union[Unset, str] = UNSET - env_vars: Union[Unset, "ServiceCreateAppRunnerConfigRequestEnvVars"] = UNSET - helm_driver: Union[Unset, AppAppRunnerConfigHelmDriverType] = UNSET - init_script_url: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + env_vars: ServiceCreateAppRunnerConfigRequestEnvVars | Unset = UNSET + helm_driver: AppAppRunnerConfigHelmDriverType | Unset = UNSET + init_script_url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,11 +40,11 @@ def to_dict(self) -> dict[str, Any]: app_config_id = self.app_config_id - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() - helm_driver: Union[Unset, str] = UNSET + helm_driver: str | Unset = UNSET if not isinstance(self.helm_driver, Unset): helm_driver = self.helm_driver.value @@ -78,14 +80,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_config_id = d.pop("app_config_id", UNSET) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, ServiceCreateAppRunnerConfigRequestEnvVars] + env_vars: ServiceCreateAppRunnerConfigRequestEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: env_vars = ServiceCreateAppRunnerConfigRequestEnvVars.from_dict(_env_vars) _helm_driver = d.pop("helm_driver", UNSET) - helm_driver: Union[Unset, AppAppRunnerConfigHelmDriverType] + helm_driver: AppAppRunnerConfigHelmDriverType | Unset if isinstance(_helm_driver, Unset): helm_driver = UNSET else: diff --git a/nuon/models/service_create_app_runner_config_request_env_vars.py b/nuon/models/service_create_app_runner_config_request_env_vars.py index f5098f78..f6e2041b 100644 --- a/nuon/models/service_create_app_runner_config_request_env_vars.py +++ b/nuon/models/service_create_app_runner_config_request_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_app_sandbox_config_request.py b/nuon/models/service_create_app_sandbox_config_request.py index 3dd72c26..affbc26e 100644 --- a/nuon/models/service_create_app_sandbox_config_request.py +++ b/nuon/models/service_create_app_sandbox_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,23 +29,23 @@ class ServiceCreateAppSandboxConfigRequest: env_vars (ServiceCreateAppSandboxConfigRequestEnvVars): terraform_version (str): 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]]): + app_config_id (str | Unset): + connected_github_vcs_config (ServiceConnectedGithubVCSSandboxConfigRequest | Unset): + drift_schedule (str | Unset): + public_git_vcs_config (ServicePublicGitVCSSandboxConfigRequest | Unset): + references (list[str] | Unset): + variables_files (list[str] | Unset): """ - env_vars: "ServiceCreateAppSandboxConfigRequestEnvVars" + env_vars: ServiceCreateAppSandboxConfigRequestEnvVars terraform_version: str - 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 + variables: ServiceCreateAppSandboxConfigRequestVariables + app_config_id: str | Unset = UNSET + connected_github_vcs_config: ServiceConnectedGithubVCSSandboxConfigRequest | Unset = UNSET + drift_schedule: str | Unset = UNSET + public_git_vcs_config: ServicePublicGitVCSSandboxConfigRequest | Unset = UNSET + references: list[str] | Unset = UNSET + variables_files: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -55,21 +57,21 @@ def to_dict(self) -> dict[str, Any]: app_config_id = self.app_config_id - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET 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 + public_git_vcs_config: dict[str, Any] | Unset = 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 + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references - variables_files: Union[Unset, list[str]] = UNSET + variables_files: list[str] | Unset = UNSET if not isinstance(self.variables_files, Unset): variables_files = self.variables_files @@ -120,7 +122,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_config_id = d.pop("app_config_id", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSSandboxConfigRequest] + connected_github_vcs_config: ServiceConnectedGithubVCSSandboxConfigRequest | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -131,7 +133,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 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] + public_git_vcs_config: ServicePublicGitVCSSandboxConfigRequest | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: diff --git a/nuon/models/service_create_app_sandbox_config_request_env_vars.py b/nuon/models/service_create_app_sandbox_config_request_env_vars.py index 7fc7b0a3..a7d20edc 100644 --- a/nuon/models/service_create_app_sandbox_config_request_env_vars.py +++ b/nuon/models/service_create_app_sandbox_config_request_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_app_sandbox_config_request_variables.py b/nuon/models/service_create_app_sandbox_config_request_variables.py index 08150e96..a8fc8dfe 100644 --- a/nuon/models/service_create_app_sandbox_config_request_variables.py +++ b/nuon/models/service_create_app_sandbox_config_request_variables.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_app_secret_request.py b/nuon/models/service_create_app_secret_request.py index cf276988..8f570c42 100644 --- a/nuon/models/service_create_app_secret_request.py +++ b/nuon/models/service_create_app_secret_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_app_secrets_config_request.py b/nuon/models/service_create_app_secrets_config_request.py index ea971d90..61897137 100644 --- a/nuon/models/service_create_app_secrets_config_request.py +++ b/nuon/models/service_create_app_secrets_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,17 +20,17 @@ class ServiceCreateAppSecretsConfigRequest: """ Attributes: app_config_id (str): - secrets (Union[Unset, list['ServiceAppSecretConfig']]): + secrets (list[ServiceAppSecretConfig] | Unset): """ app_config_id: str - secrets: Union[Unset, list["ServiceAppSecretConfig"]] = UNSET + secrets: list[ServiceAppSecretConfig] | Unset = 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 - secrets: Union[Unset, list[dict[str, Any]]] = UNSET + secrets: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.secrets, Unset): secrets = [] for secrets_item_data in self.secrets: diff --git a/nuon/models/service_create_app_stack_config_request.py b/nuon/models/service_create_app_stack_config_request.py index 90b412d6..97d05e4c 100644 --- a/nuon/models/service_create_app_stack_config_request.py +++ b/nuon/models/service_create_app_stack_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -18,16 +20,16 @@ class ServiceCreateAppStackConfigRequest: description (str): name (str): type_ (AppStackType): - runner_nested_template_url (Union[Unset, str]): - vpc_nested_template_url (Union[Unset, str]): + runner_nested_template_url (str | Unset): + vpc_nested_template_url (str | Unset): """ app_config_id: str description: str name: str type_: AppStackType - runner_nested_template_url: Union[Unset, str] = UNSET - vpc_nested_template_url: Union[Unset, str] = UNSET + runner_nested_template_url: str | Unset = UNSET + vpc_nested_template_url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_component_build_request.py b/nuon/models/service_create_component_build_request.py index 7bed66c8..f23e609f 100644 --- a/nuon/models/service_create_component_build_request.py +++ b/nuon/models/service_create_component_build_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceCreateComponentBuildRequest: """ Attributes: - git_ref (Union[Unset, str]): - use_latest (Union[Unset, bool]): + git_ref (str | Unset): + use_latest (bool | Unset): """ - git_ref: Union[Unset, str] = UNSET - use_latest: Union[Unset, bool] = UNSET + git_ref: str | Unset = UNSET + use_latest: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_component_release_request.py b/nuon/models/service_create_component_release_request.py index 7c2f8d7b..5e27714a 100644 --- a/nuon/models/service_create_component_release_request.py +++ b/nuon/models/service_create_component_release_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +19,16 @@ class ServiceCreateComponentReleaseRequest: """ Attributes: - auto_build (Union[Unset, bool]): - build_id (Union[Unset, str]): - install_ids (Union[Unset, list[str]]): - strategy (Union[Unset, ServiceCreateComponentReleaseRequestStrategy]): + auto_build (bool | Unset): + build_id (str | Unset): + install_ids (list[str] | Unset): + strategy (ServiceCreateComponentReleaseRequestStrategy | Unset): """ - auto_build: Union[Unset, bool] = UNSET - build_id: Union[Unset, str] = UNSET - install_ids: Union[Unset, list[str]] = UNSET - strategy: Union[Unset, "ServiceCreateComponentReleaseRequestStrategy"] = UNSET + auto_build: bool | Unset = UNSET + build_id: str | Unset = UNSET + install_ids: list[str] | Unset = UNSET + strategy: ServiceCreateComponentReleaseRequestStrategy | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -34,11 +36,11 @@ def to_dict(self) -> dict[str, Any]: build_id = self.build_id - install_ids: Union[Unset, list[str]] = UNSET + install_ids: list[str] | Unset = UNSET if not isinstance(self.install_ids, Unset): install_ids = self.install_ids - strategy: Union[Unset, dict[str, Any]] = UNSET + strategy: dict[str, Any] | Unset = UNSET if not isinstance(self.strategy, Unset): strategy = self.strategy.to_dict() @@ -70,7 +72,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: install_ids = cast(list[str], d.pop("install_ids", UNSET)) _strategy = d.pop("strategy", UNSET) - strategy: Union[Unset, ServiceCreateComponentReleaseRequestStrategy] + strategy: ServiceCreateComponentReleaseRequestStrategy | Unset if isinstance(_strategy, Unset): strategy = UNSET else: diff --git a/nuon/models/service_create_component_release_request_strategy.py b/nuon/models/service_create_component_release_request_strategy.py index 78688e15..e307fb09 100644 --- a/nuon/models/service_create_component_release_request_strategy.py +++ b/nuon/models/service_create_component_release_request_strategy.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceCreateComponentReleaseRequestStrategy: """ Attributes: - delay (Union[Unset, str]): - installs_per_step (Union[Unset, int]): + delay (str | Unset): + installs_per_step (int | Unset): """ - delay: Union[Unset, str] = UNSET - installs_per_step: Union[Unset, int] = UNSET + delay: str | Unset = UNSET + installs_per_step: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_component_request.py b/nuon/models/service_create_component_request.py index 28bc9c45..2fd8b547 100644 --- a/nuon/models/service_create_component_request.py +++ b/nuon/models/service_create_component_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,19 +16,19 @@ class ServiceCreateComponentRequest: """ Attributes: name (str): - dependencies (Union[Unset, list[str]]): - var_name (Union[Unset, str]): + dependencies (list[str] | Unset): + var_name (str | Unset): """ name: str - dependencies: Union[Unset, list[str]] = UNSET - var_name: Union[Unset, str] = UNSET + dependencies: list[str] | Unset = UNSET + var_name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies diff --git a/nuon/models/service_create_connection_callback_request.py b/nuon/models/service_create_connection_callback_request.py index 5ac6739c..40b6f7c0 100644 --- a/nuon/models/service_create_connection_callback_request.py +++ b/nuon/models/service_create_connection_callback_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_connection_request.py b/nuon/models/service_create_connection_request.py index e48abf36..7a2aeedc 100644 --- a/nuon/models/service_create_connection_request.py +++ b/nuon/models/service_create_connection_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_docker_build_component_config_request.py b/nuon/models/service_create_docker_build_component_config_request.py index 035ea301..f31da697 100644 --- a/nuon/models/service_create_docker_build_component_config_request.py +++ b/nuon/models/service_create_docker_build_component_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,27 +24,27 @@ class ServiceCreateDockerBuildComponentConfigRequest: """ Attributes: dockerfile (str): - app_config_id (Union[Unset, str]): - build_args (Union[Unset, list[str]]): - checksum (Union[Unset, str]): - connected_github_vcs_config (Union[Unset, ServiceConnectedGithubVCSConfigRequest]): - dependencies (Union[Unset, list[str]]): - env_vars (Union[Unset, ServiceCreateDockerBuildComponentConfigRequestEnvVars]): - public_git_vcs_config (Union[Unset, ServicePublicGitVCSConfigRequest]): - references (Union[Unset, list[str]]): - target (Union[Unset, str]): + app_config_id (str | Unset): + build_args (list[str] | Unset): + checksum (str | Unset): + connected_github_vcs_config (ServiceConnectedGithubVCSConfigRequest | Unset): + dependencies (list[str] | Unset): + env_vars (ServiceCreateDockerBuildComponentConfigRequestEnvVars | Unset): + public_git_vcs_config (ServicePublicGitVCSConfigRequest | Unset): + references (list[str] | Unset): + target (str | Unset): """ dockerfile: str - app_config_id: Union[Unset, str] = UNSET - build_args: Union[Unset, list[str]] = UNSET - checksum: Union[Unset, str] = UNSET - connected_github_vcs_config: Union[Unset, "ServiceConnectedGithubVCSConfigRequest"] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - env_vars: Union[Unset, "ServiceCreateDockerBuildComponentConfigRequestEnvVars"] = UNSET - public_git_vcs_config: Union[Unset, "ServicePublicGitVCSConfigRequest"] = UNSET - references: Union[Unset, list[str]] = UNSET - target: Union[Unset, str] = UNSET + app_config_id: str | Unset = UNSET + build_args: list[str] | Unset = UNSET + checksum: str | Unset = UNSET + connected_github_vcs_config: ServiceConnectedGithubVCSConfigRequest | Unset = UNSET + dependencies: list[str] | Unset = UNSET + env_vars: ServiceCreateDockerBuildComponentConfigRequestEnvVars | Unset = UNSET + public_git_vcs_config: ServicePublicGitVCSConfigRequest | Unset = UNSET + references: list[str] | Unset = UNSET + target: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,29 +52,29 @@ def to_dict(self) -> dict[str, Any]: app_config_id = self.app_config_id - build_args: Union[Unset, list[str]] = UNSET + build_args: list[str] | Unset = UNSET if not isinstance(self.build_args, Unset): build_args = self.build_args checksum = self.checksum - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = 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 + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references @@ -124,7 +126,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: checksum = d.pop("checksum", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] + connected_github_vcs_config: ServiceConnectedGithubVCSConfigRequest | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -133,14 +135,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: dependencies = cast(list[str], d.pop("dependencies", UNSET)) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, ServiceCreateDockerBuildComponentConfigRequestEnvVars] + env_vars: ServiceCreateDockerBuildComponentConfigRequestEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: env_vars = ServiceCreateDockerBuildComponentConfigRequestEnvVars.from_dict(_env_vars) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] + public_git_vcs_config: ServicePublicGitVCSConfigRequest | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: diff --git a/nuon/models/service_create_docker_build_component_config_request_env_vars.py b/nuon/models/service_create_docker_build_component_config_request_env_vars.py index 2f118ba1..cb9b8f1a 100644 --- a/nuon/models/service_create_docker_build_component_config_request_env_vars.py +++ b/nuon/models/service_create_docker_build_component_config_request_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_external_image_component_config_request.py b/nuon/models/service_create_external_image_component_config_request.py index f366cc13..217e1128 100644 --- a/nuon/models/service_create_external_image_component_config_request.py +++ b/nuon/models/service_create_external_image_component_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,20 +21,20 @@ class ServiceCreateExternalImageComponentConfigRequest: Attributes: image_url (str): tag (str): - app_config_id (Union[Unset, str]): - aws_ecr_image_config (Union[Unset, ServiceAwsECRImageConfigRequest]): - checksum (Union[Unset, str]): - dependencies (Union[Unset, list[str]]): - references (Union[Unset, list[str]]): + app_config_id (str | Unset): + aws_ecr_image_config (ServiceAwsECRImageConfigRequest | Unset): + checksum (str | Unset): + dependencies (list[str] | Unset): + references (list[str] | Unset): """ image_url: str tag: str - app_config_id: Union[Unset, str] = UNSET - aws_ecr_image_config: Union[Unset, "ServiceAwsECRImageConfigRequest"] = UNSET - checksum: Union[Unset, str] = UNSET - dependencies: Union[Unset, list[str]] = UNSET - references: Union[Unset, list[str]] = UNSET + app_config_id: str | Unset = UNSET + aws_ecr_image_config: ServiceAwsECRImageConfigRequest | Unset = UNSET + checksum: str | Unset = UNSET + dependencies: list[str] | Unset = UNSET + references: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -42,17 +44,17 @@ def to_dict(self) -> dict[str, Any]: app_config_id = self.app_config_id - aws_ecr_image_config: Union[Unset, dict[str, Any]] = UNSET + aws_ecr_image_config: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_ecr_image_config, Unset): aws_ecr_image_config = self.aws_ecr_image_config.to_dict() checksum = self.checksum - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies - references: Union[Unset, list[str]] = UNSET + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references @@ -89,7 +91,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: app_config_id = d.pop("app_config_id", UNSET) _aws_ecr_image_config = d.pop("aws_ecr_image_config", UNSET) - aws_ecr_image_config: Union[Unset, ServiceAwsECRImageConfigRequest] + aws_ecr_image_config: ServiceAwsECRImageConfigRequest | Unset if isinstance(_aws_ecr_image_config, Unset): aws_ecr_image_config = UNSET else: diff --git a/nuon/models/service_create_helm_component_config_request.py b/nuon/models/service_create_helm_component_config_request.py index e5f2e720..6174c389 100644 --- a/nuon/models/service_create_helm_component_config_request.py +++ b/nuon/models/service_create_helm_component_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,32 +25,32 @@ class ServiceCreateHelmComponentConfigRequest: Attributes: chart_name (str): values (ServiceCreateHelmComponentConfigRequestValues): - app_config_id (Union[Unset, str]): - 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]]): - storage_driver (Union[Unset, str]): - take_ownership (Union[Unset, bool]): - values_files (Union[Unset, list[str]]): + app_config_id (str | Unset): + checksum (str | Unset): + connected_github_vcs_config (ServiceConnectedGithubVCSConfigRequest | Unset): + dependencies (list[str] | Unset): + drift_schedule (str | Unset): + namespace (str | Unset): + public_git_vcs_config (ServicePublicGitVCSConfigRequest | Unset): + references (list[str] | Unset): + storage_driver (str | Unset): + take_ownership (bool | Unset): + values_files (list[str] | Unset): """ chart_name: str - values: "ServiceCreateHelmComponentConfigRequestValues" - app_config_id: Union[Unset, str] = UNSET - 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 - storage_driver: Union[Unset, str] = UNSET - take_ownership: Union[Unset, bool] = UNSET - values_files: Union[Unset, list[str]] = UNSET + values: ServiceCreateHelmComponentConfigRequestValues + app_config_id: str | Unset = UNSET + checksum: str | Unset = UNSET + connected_github_vcs_config: ServiceConnectedGithubVCSConfigRequest | Unset = UNSET + dependencies: list[str] | Unset = UNSET + drift_schedule: str | Unset = UNSET + namespace: str | Unset = UNSET + public_git_vcs_config: ServicePublicGitVCSConfigRequest | Unset = UNSET + references: list[str] | Unset = UNSET + storage_driver: str | Unset = UNSET + take_ownership: bool | Unset = UNSET + values_files: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -60,11 +62,11 @@ def to_dict(self) -> dict[str, Any]: checksum = self.checksum - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies @@ -72,11 +74,11 @@ def to_dict(self) -> dict[str, Any]: namespace = self.namespace - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = 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 + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references @@ -84,7 +86,7 @@ def to_dict(self) -> dict[str, Any]: take_ownership = self.take_ownership - values_files: Union[Unset, list[str]] = UNSET + values_files: list[str] | Unset = UNSET if not isinstance(self.values_files, Unset): values_files = self.values_files @@ -139,7 +141,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: checksum = d.pop("checksum", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] + connected_github_vcs_config: ServiceConnectedGithubVCSConfigRequest | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -152,7 +154,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: namespace = d.pop("namespace", UNSET) _public_git_vcs_config = d.pop("public_git_vcs_config", UNSET) - public_git_vcs_config: Union[Unset, ServicePublicGitVCSConfigRequest] + public_git_vcs_config: ServicePublicGitVCSConfigRequest | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: diff --git a/nuon/models/service_create_helm_component_config_request_values.py b/nuon/models/service_create_helm_component_config_request_values.py index a98ebfee..6f2c4876 100644 --- a/nuon/models/service_create_helm_component_config_request_values.py +++ b/nuon/models/service_create_helm_component_config_request_values.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_install_action_workflow_run_request.py b/nuon/models/service_create_install_action_workflow_run_request.py index 38e0b8fc..66964a4a 100644 --- a/nuon/models/service_create_install_action_workflow_run_request.py +++ b/nuon/models/service_create_install_action_workflow_run_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,18 +21,18 @@ class ServiceCreateInstallActionWorkflowRunRequest: """ Attributes: - action_workflow_config_id (Union[Unset, str]): - run_env_vars (Union[Unset, ServiceCreateInstallActionWorkflowRunRequestRunEnvVars]): + action_workflow_config_id (str | Unset): + run_env_vars (ServiceCreateInstallActionWorkflowRunRequestRunEnvVars | Unset): """ - action_workflow_config_id: Union[Unset, str] = UNSET - run_env_vars: Union[Unset, "ServiceCreateInstallActionWorkflowRunRequestRunEnvVars"] = UNSET + action_workflow_config_id: str | Unset = UNSET + run_env_vars: ServiceCreateInstallActionWorkflowRunRequestRunEnvVars | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: action_workflow_config_id = self.action_workflow_config_id - run_env_vars: Union[Unset, dict[str, Any]] = UNSET + run_env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.run_env_vars, Unset): run_env_vars = self.run_env_vars.to_dict() @@ -54,7 +56,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: action_workflow_config_id = d.pop("action_workflow_config_id", UNSET) _run_env_vars = d.pop("run_env_vars", UNSET) - run_env_vars: Union[Unset, ServiceCreateInstallActionWorkflowRunRequestRunEnvVars] + run_env_vars: ServiceCreateInstallActionWorkflowRunRequestRunEnvVars | Unset if isinstance(_run_env_vars, Unset): run_env_vars = UNSET else: diff --git a/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py b/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py index 10aff0bc..94e7e2db 100644 --- a/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py +++ b/nuon/models/service_create_install_action_workflow_run_request_run_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_install_component_deploy_request.py b/nuon/models/service_create_install_component_deploy_request.py index f82c83da..2582c9ba 100644 --- a/nuon/models/service_create_install_component_deploy_request.py +++ b/nuon/models/service_create_install_component_deploy_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class ServiceCreateInstallComponentDeployRequest: """ Attributes: - build_id (Union[Unset, str]): - deploy_dependents (Union[Unset, bool]): - plan_only (Union[Unset, bool]): + build_id (str | Unset): + deploy_dependents (bool | Unset): + plan_only (bool | Unset): """ - build_id: Union[Unset, str] = UNSET - deploy_dependents: Union[Unset, bool] = UNSET - plan_only: Union[Unset, bool] = UNSET + build_id: str | Unset = UNSET + deploy_dependents: bool | Unset = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_install_config_request.py b/nuon/models/service_create_install_config_request.py index 998dbd0f..5bb9ed58 100644 --- a/nuon/models/service_create_install_config_request.py +++ b/nuon/models/service_create_install_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,14 +16,14 @@ class ServiceCreateInstallConfigRequest: """ Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): + approval_option (AppInstallApprovalOption | Unset): """ - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + approval_option: AppInstallApprovalOption | Unset = 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 + approval_option: str | Unset = UNSET if not isinstance(self.approval_option, Unset): approval_option = self.approval_option.value @@ -37,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: 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] + approval_option: AppInstallApprovalOption | Unset if isinstance(_approval_option, Unset): approval_option = UNSET else: diff --git a/nuon/models/service_create_install_deploy_request.py b/nuon/models/service_create_install_deploy_request.py index 490946ff..b357417b 100644 --- a/nuon/models/service_create_install_deploy_request.py +++ b/nuon/models/service_create_install_deploy_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class ServiceCreateInstallDeployRequest: """ Attributes: - build_id (Union[Unset, str]): - deploy_dependents (Union[Unset, bool]): - plan_only (Union[Unset, bool]): + build_id (str | Unset): + deploy_dependents (bool | Unset): + plan_only (bool | Unset): """ - build_id: Union[Unset, str] = UNSET - deploy_dependents: Union[Unset, bool] = UNSET - plan_only: Union[Unset, bool] = UNSET + build_id: str | Unset = UNSET + deploy_dependents: bool | Unset = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_install_inputs_request.py b/nuon/models/service_create_install_inputs_request.py index f09fae99..3d382138 100644 --- a/nuon/models/service_create_install_inputs_request.py +++ b/nuon/models/service_create_install_inputs_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class ServiceCreateInstallInputsRequest: inputs (ServiceCreateInstallInputsRequestInputs): """ - inputs: "ServiceCreateInstallInputsRequestInputs" + inputs: ServiceCreateInstallInputsRequestInputs additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_install_inputs_request_inputs.py b/nuon/models/service_create_install_inputs_request_inputs.py index a94c7938..f20e4880 100644 --- a/nuon/models/service_create_install_inputs_request_inputs.py +++ b/nuon/models/service_create_install_inputs_request_inputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_install_request.py b/nuon/models/service_create_install_request.py index d6c6cabf..4ba31758 100644 --- a/nuon/models/service_create_install_request.py +++ b/nuon/models/service_create_install_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -22,41 +24,41 @@ class ServiceCreateInstallRequest: """ Attributes: name (str): - aws_account (Union[Unset, ServiceCreateInstallRequestAwsAccount]): - azure_account (Union[Unset, ServiceCreateInstallRequestAzureAccount]): - inputs (Union[Unset, ServiceCreateInstallRequestInputs]): - install_config (Union[Unset, HelpersCreateInstallConfigParams]): - metadata (Union[Unset, HelpersInstallMetadata]): + aws_account (ServiceCreateInstallRequestAwsAccount | Unset): + azure_account (ServiceCreateInstallRequestAzureAccount | Unset): + inputs (ServiceCreateInstallRequestInputs | Unset): + install_config (HelpersCreateInstallConfigParams | Unset): + metadata (HelpersInstallMetadata | Unset): """ name: str - aws_account: Union[Unset, "ServiceCreateInstallRequestAwsAccount"] = UNSET - azure_account: Union[Unset, "ServiceCreateInstallRequestAzureAccount"] = UNSET - inputs: Union[Unset, "ServiceCreateInstallRequestInputs"] = UNSET - install_config: Union[Unset, "HelpersCreateInstallConfigParams"] = UNSET - metadata: Union[Unset, "HelpersInstallMetadata"] = UNSET + aws_account: ServiceCreateInstallRequestAwsAccount | Unset = UNSET + azure_account: ServiceCreateInstallRequestAzureAccount | Unset = UNSET + inputs: ServiceCreateInstallRequestInputs | Unset = UNSET + install_config: HelpersCreateInstallConfigParams | Unset = UNSET + metadata: HelpersInstallMetadata | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - aws_account: Union[Unset, dict[str, Any]] = UNSET + aws_account: dict[str, Any] | Unset = UNSET if not isinstance(self.aws_account, Unset): aws_account = self.aws_account.to_dict() - azure_account: Union[Unset, dict[str, Any]] = UNSET + azure_account: dict[str, Any] | Unset = UNSET if not isinstance(self.azure_account, Unset): azure_account = self.azure_account.to_dict() - inputs: Union[Unset, dict[str, Any]] = UNSET + inputs: dict[str, Any] | Unset = UNSET if not isinstance(self.inputs, Unset): inputs = self.inputs.to_dict() - install_config: Union[Unset, dict[str, Any]] = UNSET + install_config: dict[str, Any] | Unset = UNSET if not isinstance(self.install_config, Unset): install_config = self.install_config.to_dict() - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -92,35 +94,35 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name") _aws_account = d.pop("aws_account", UNSET) - aws_account: Union[Unset, ServiceCreateInstallRequestAwsAccount] + aws_account: ServiceCreateInstallRequestAwsAccount | Unset if isinstance(_aws_account, Unset): aws_account = UNSET else: aws_account = ServiceCreateInstallRequestAwsAccount.from_dict(_aws_account) _azure_account = d.pop("azure_account", UNSET) - azure_account: Union[Unset, ServiceCreateInstallRequestAzureAccount] + azure_account: ServiceCreateInstallRequestAzureAccount | Unset if isinstance(_azure_account, Unset): azure_account = UNSET else: azure_account = ServiceCreateInstallRequestAzureAccount.from_dict(_azure_account) _inputs = d.pop("inputs", UNSET) - inputs: Union[Unset, ServiceCreateInstallRequestInputs] + inputs: ServiceCreateInstallRequestInputs | Unset if isinstance(_inputs, Unset): inputs = UNSET else: inputs = ServiceCreateInstallRequestInputs.from_dict(_inputs) _install_config = d.pop("install_config", UNSET) - install_config: Union[Unset, HelpersCreateInstallConfigParams] + install_config: HelpersCreateInstallConfigParams | Unset if isinstance(_install_config, Unset): install_config = UNSET else: install_config = HelpersCreateInstallConfigParams.from_dict(_install_config) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, HelpersInstallMetadata] + metadata: HelpersInstallMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/nuon/models/service_create_install_request_aws_account.py b/nuon/models/service_create_install_request_aws_account.py index 2449009e..22107d86 100644 --- a/nuon/models/service_create_install_request_aws_account.py +++ b/nuon/models/service_create_install_request_aws_account.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceCreateInstallRequestAwsAccount: """ Attributes: - region (Union[Unset, str]): + region (str | Unset): """ - region: Union[Unset, str] = UNSET + region: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_install_request_azure_account.py b/nuon/models/service_create_install_request_azure_account.py index 3fd7df2e..50d7b968 100644 --- a/nuon/models/service_create_install_request_azure_account.py +++ b/nuon/models/service_create_install_request_azure_account.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceCreateInstallRequestAzureAccount: """ Attributes: - location (Union[Unset, str]): + location (str | Unset): """ - location: Union[Unset, str] = UNSET + location: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_install_request_inputs.py b/nuon/models/service_create_install_request_inputs.py index c7b521e7..7997b6ef 100644 --- a/nuon/models/service_create_install_request_inputs.py +++ b/nuon/models/service_create_install_request_inputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_install_v2_request.py b/nuon/models/service_create_install_v2_request.py new file mode 100644 index 00000000..d926b443 --- /dev/null +++ b/nuon/models/service_create_install_v2_request.py @@ -0,0 +1,165 @@ +from __future__ import annotations + +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 + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.helpers_create_install_config_params import HelpersCreateInstallConfigParams + from ..models.helpers_install_metadata import HelpersInstallMetadata + from ..models.service_create_install_v2_request_aws_account import ServiceCreateInstallV2RequestAwsAccount + from ..models.service_create_install_v2_request_azure_account import ServiceCreateInstallV2RequestAzureAccount + from ..models.service_create_install_v2_request_inputs import ServiceCreateInstallV2RequestInputs + + +T = TypeVar("T", bound="ServiceCreateInstallV2Request") + + +@_attrs_define +class ServiceCreateInstallV2Request: + """ + Attributes: + app_id (str): + name (str): + aws_account (ServiceCreateInstallV2RequestAwsAccount | Unset): + azure_account (ServiceCreateInstallV2RequestAzureAccount | Unset): + inputs (ServiceCreateInstallV2RequestInputs | Unset): + install_config (HelpersCreateInstallConfigParams | Unset): + metadata (HelpersInstallMetadata | Unset): + """ + + app_id: str + name: str + aws_account: ServiceCreateInstallV2RequestAwsAccount | Unset = UNSET + azure_account: ServiceCreateInstallV2RequestAzureAccount | Unset = UNSET + inputs: ServiceCreateInstallV2RequestInputs | Unset = UNSET + install_config: HelpersCreateInstallConfigParams | Unset = UNSET + metadata: HelpersInstallMetadata | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + app_id = self.app_id + + name = self.name + + aws_account: dict[str, Any] | Unset = UNSET + if not isinstance(self.aws_account, Unset): + aws_account = self.aws_account.to_dict() + + azure_account: dict[str, Any] | Unset = UNSET + if not isinstance(self.azure_account, Unset): + azure_account = self.azure_account.to_dict() + + inputs: dict[str, Any] | Unset = UNSET + if not isinstance(self.inputs, Unset): + inputs = self.inputs.to_dict() + + install_config: dict[str, Any] | Unset = UNSET + if not isinstance(self.install_config, Unset): + install_config = self.install_config.to_dict() + + metadata: dict[str, Any] | Unset = 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( + { + "app_id": app_id, + "name": name, + } + ) + if aws_account is not UNSET: + field_dict["aws_account"] = aws_account + if azure_account is not UNSET: + field_dict["azure_account"] = azure_account + if inputs is not UNSET: + 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_v2_request_aws_account import ServiceCreateInstallV2RequestAwsAccount + from ..models.service_create_install_v2_request_azure_account import ServiceCreateInstallV2RequestAzureAccount + from ..models.service_create_install_v2_request_inputs import ServiceCreateInstallV2RequestInputs + + d = dict(src_dict) + app_id = d.pop("app_id") + + name = d.pop("name") + + _aws_account = d.pop("aws_account", UNSET) + aws_account: ServiceCreateInstallV2RequestAwsAccount | Unset + if isinstance(_aws_account, Unset): + aws_account = UNSET + else: + aws_account = ServiceCreateInstallV2RequestAwsAccount.from_dict(_aws_account) + + _azure_account = d.pop("azure_account", UNSET) + azure_account: ServiceCreateInstallV2RequestAzureAccount | Unset + if isinstance(_azure_account, Unset): + azure_account = UNSET + else: + azure_account = ServiceCreateInstallV2RequestAzureAccount.from_dict(_azure_account) + + _inputs = d.pop("inputs", UNSET) + inputs: ServiceCreateInstallV2RequestInputs | Unset + if isinstance(_inputs, Unset): + inputs = UNSET + else: + inputs = ServiceCreateInstallV2RequestInputs.from_dict(_inputs) + + _install_config = d.pop("install_config", UNSET) + install_config: HelpersCreateInstallConfigParams | Unset + if isinstance(_install_config, Unset): + install_config = UNSET + else: + install_config = HelpersCreateInstallConfigParams.from_dict(_install_config) + + _metadata = d.pop("metadata", UNSET) + metadata: HelpersInstallMetadata | Unset + if isinstance(_metadata, Unset): + metadata = UNSET + else: + metadata = HelpersInstallMetadata.from_dict(_metadata) + + service_create_install_v2_request = cls( + app_id=app_id, + name=name, + aws_account=aws_account, + azure_account=azure_account, + inputs=inputs, + install_config=install_config, + metadata=metadata, + ) + + service_create_install_v2_request.additional_properties = d + return service_create_install_v2_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_retry_workflow_step_response.py b/nuon/models/service_create_install_v2_request_aws_account.py similarity index 64% rename from nuon/models/service_retry_workflow_step_response.py rename to nuon/models/service_create_install_v2_request_aws_account.py index e8de15b0..c282eb4d 100644 --- a/nuon/models/service_retry_workflow_step_response.py +++ b/nuon/models/service_create_install_v2_request_aws_account.py @@ -1,46 +1,48 @@ +from __future__ import annotations + 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 ..types import UNSET, Unset -T = TypeVar("T", bound="ServiceRetryWorkflowStepResponse") +T = TypeVar("T", bound="ServiceCreateInstallV2RequestAwsAccount") @_attrs_define -class ServiceRetryWorkflowStepResponse: +class ServiceCreateInstallV2RequestAwsAccount: """ Attributes: - workflow_id (Union[Unset, str]): + region (str | Unset): """ - workflow_id: Union[Unset, str] = UNSET + region: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - workflow_id = self.workflow_id + region = self.region 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 + if region is not UNSET: + field_dict["region"] = region 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) + region = d.pop("region", UNSET) - service_retry_workflow_step_response = cls( - workflow_id=workflow_id, + service_create_install_v2_request_aws_account = cls( + region=region, ) - service_retry_workflow_step_response.additional_properties = d - return service_retry_workflow_step_response + service_create_install_v2_request_aws_account.additional_properties = d + return service_create_install_v2_request_aws_account @property def additional_keys(self) -> list[str]: diff --git a/nuon/models/service_create_install_v2_request_azure_account.py b/nuon/models/service_create_install_v2_request_azure_account.py new file mode 100644 index 00000000..6c12df65 --- /dev/null +++ b/nuon/models/service_create_install_v2_request_azure_account.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceCreateInstallV2RequestAzureAccount") + + +@_attrs_define +class ServiceCreateInstallV2RequestAzureAccount: + """ + Attributes: + location (str | Unset): + """ + + location: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + location = self.location + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if location is not UNSET: + field_dict["location"] = location + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + location = d.pop("location", UNSET) + + service_create_install_v2_request_azure_account = cls( + location=location, + ) + + service_create_install_v2_request_azure_account.additional_properties = d + return service_create_install_v2_request_azure_account + + @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_v2_request_inputs.py b/nuon/models/service_create_install_v2_request_inputs.py new file mode 100644 index 00000000..44a7df08 --- /dev/null +++ b/nuon/models/service_create_install_v2_request_inputs.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +T = TypeVar("T", bound="ServiceCreateInstallV2RequestInputs") + + +@_attrs_define +class ServiceCreateInstallV2RequestInputs: + """ """ + + 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) + service_create_install_v2_request_inputs = cls() + + service_create_install_v2_request_inputs.additional_properties = d + return service_create_install_v2_request_inputs + + @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/service_create_installer_request.py b/nuon/models/service_create_installer_request.py index dcf6c0e1..4cb14834 100644 --- a/nuon/models/service_create_installer_request.py +++ b/nuon/models/service_create_installer_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,12 +21,12 @@ class ServiceCreateInstallerRequest: Attributes: app_ids (list[str]): name (str): - metadata (Union[Unset, ServiceCreateInstallerRequestMetadata]): + metadata (ServiceCreateInstallerRequestMetadata | Unset): """ app_ids: list[str] name: str - metadata: Union[Unset, "ServiceCreateInstallerRequestMetadata"] = UNSET + metadata: ServiceCreateInstallerRequestMetadata | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: name = self.name - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -59,7 +61,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name") _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, ServiceCreateInstallerRequestMetadata] + metadata: ServiceCreateInstallerRequestMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/nuon/models/service_create_installer_request_metadata.py b/nuon/models/service_create_installer_request_metadata.py index 97c26002..ef7a9e7c 100644 --- a/nuon/models/service_create_installer_request_metadata.py +++ b/nuon/models/service_create_installer_request_metadata.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -20,11 +22,11 @@ class ServiceCreateInstallerRequestMetadata: github_url (str): homepage_url (str): logo_url (str): - copyright_markdown (Union[Unset, str]): - demo_url (Union[Unset, str]): - footer_markdown (Union[Unset, str]): - og_image_url (Union[Unset, str]): - post_install_markdown (Union[Unset, str]): + copyright_markdown (str | Unset): + demo_url (str | Unset): + footer_markdown (str | Unset): + og_image_url (str | Unset): + post_install_markdown (str | Unset): """ community_url: str @@ -34,11 +36,11 @@ class ServiceCreateInstallerRequestMetadata: github_url: str homepage_url: str logo_url: str - copyright_markdown: Union[Unset, str] = UNSET - demo_url: Union[Unset, str] = UNSET - footer_markdown: Union[Unset, str] = UNSET - og_image_url: Union[Unset, str] = UNSET - post_install_markdown: Union[Unset, str] = UNSET + copyright_markdown: str | Unset = UNSET + demo_url: str | Unset = UNSET + footer_markdown: str | Unset = UNSET + og_image_url: str | Unset = UNSET + post_install_markdown: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_job_component_config_request.py b/nuon/models/service_create_job_component_config_request.py index dff977a7..196f2124 100644 --- a/nuon/models/service_create_job_component_config_request.py +++ b/nuon/models/service_create_job_component_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,22 +23,22 @@ class ServiceCreateJobComponentConfigRequest: Attributes: image_url (str): tag (str): - app_config_id (Union[Unset, str]): - args (Union[Unset, list[str]]): - checksum (Union[Unset, str]): - cmd (Union[Unset, list[str]]): - env_vars (Union[Unset, ServiceCreateJobComponentConfigRequestEnvVars]): - references (Union[Unset, list[str]]): + app_config_id (str | Unset): + args (list[str] | Unset): + checksum (str | Unset): + cmd (list[str] | Unset): + env_vars (ServiceCreateJobComponentConfigRequestEnvVars | Unset): + references (list[str] | Unset): """ image_url: str tag: str - app_config_id: Union[Unset, str] = UNSET - args: Union[Unset, list[str]] = UNSET - checksum: Union[Unset, str] = UNSET - cmd: Union[Unset, list[str]] = UNSET - env_vars: Union[Unset, "ServiceCreateJobComponentConfigRequestEnvVars"] = UNSET - references: Union[Unset, list[str]] = UNSET + app_config_id: str | Unset = UNSET + args: list[str] | Unset = UNSET + checksum: str | Unset = UNSET + cmd: list[str] | Unset = UNSET + env_vars: ServiceCreateJobComponentConfigRequestEnvVars | Unset = UNSET + references: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -46,21 +48,21 @@ def to_dict(self) -> dict[str, Any]: app_config_id = self.app_config_id - args: Union[Unset, list[str]] = UNSET + args: list[str] | Unset = UNSET if not isinstance(self.args, Unset): args = self.args checksum = self.checksum - cmd: Union[Unset, list[str]] = UNSET + cmd: list[str] | Unset = UNSET if not isinstance(self.cmd, Unset): cmd = self.cmd - env_vars: Union[Unset, dict[str, Any]] = UNSET + env_vars: dict[str, Any] | Unset = UNSET if not isinstance(self.env_vars, Unset): env_vars = self.env_vars.to_dict() - references: Union[Unset, list[str]] = UNSET + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references @@ -107,7 +109,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: cmd = cast(list[str], d.pop("cmd", UNSET)) _env_vars = d.pop("env_vars", UNSET) - env_vars: Union[Unset, ServiceCreateJobComponentConfigRequestEnvVars] + env_vars: ServiceCreateJobComponentConfigRequestEnvVars | Unset if isinstance(_env_vars, Unset): env_vars = UNSET else: diff --git a/nuon/models/service_create_job_component_config_request_env_vars.py b/nuon/models/service_create_job_component_config_request_env_vars.py index dd284a70..58f26001 100644 --- a/nuon/models/service_create_job_component_config_request_env_vars.py +++ b/nuon/models/service_create_job_component_config_request_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar 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 4c7e2f45..ae507c44 100644 --- a/nuon/models/service_create_kubernetes_manifest_component_config_request.py +++ b/nuon/models/service_create_kubernetes_manifest_component_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,22 +15,22 @@ class ServiceCreateKubernetesManifestComponentConfigRequest: """ Attributes: - 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]]): + app_config_id (str | Unset): + checksum (str | Unset): + dependencies (list[str] | Unset): + drift_schedule (str | Unset): + manifest (str | Unset): + namespace (str | Unset): + references (list[str] | Unset): """ - 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 + app_config_id: str | Unset = UNSET + checksum: str | Unset = UNSET + dependencies: list[str] | Unset = UNSET + drift_schedule: str | Unset = UNSET + manifest: str | Unset = UNSET + namespace: str | Unset = UNSET + references: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -36,7 +38,7 @@ def to_dict(self) -> dict[str, Any]: checksum = self.checksum - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies @@ -46,7 +48,7 @@ def to_dict(self) -> dict[str, Any]: namespace = self.namespace - references: Union[Unset, list[str]] = UNSET + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references diff --git a/nuon/models/service_create_org_invite_request.py b/nuon/models/service_create_org_invite_request.py index 74696684..de785c21 100644 --- a/nuon/models/service_create_org_invite_request.py +++ b/nuon/models/service_create_org_invite_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_org_request.py b/nuon/models/service_create_org_request.py index 62816b52..1d9a73c7 100644 --- a/nuon/models/service_create_org_request.py +++ b/nuon/models/service_create_org_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,11 +16,11 @@ class ServiceCreateOrgRequest: """ Attributes: name (str): - use_sandbox_mode (Union[Unset, bool]): These fields are used to control the behaviour of the org. + use_sandbox_mode (bool | Unset): These fields are used to control the behaviour of the org. """ name: str - use_sandbox_mode: Union[Unset, bool] = UNSET + use_sandbox_mode: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_create_org_user_request.py b/nuon/models/service_create_org_user_request.py index 74b3bf80..6fd1df7c 100644 --- a/nuon/models/service_create_org_user_request.py +++ b/nuon/models/service_create_org_user_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceCreateOrgUserRequest: """ Attributes: - user_id (Union[Unset, str]): + user_id (str | Unset): """ - user_id: Union[Unset, str] = UNSET + user_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: 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 7a6182a7..e46a51c9 100644 --- a/nuon/models/service_create_terraform_module_component_config_request.py +++ b/nuon/models/service_create_terraform_module_component_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,28 +28,28 @@ class ServiceCreateTerraformModuleComponentConfigRequest: Attributes: env_vars (ServiceCreateTerraformModuleComponentConfigRequestEnvVars): variables (ServiceCreateTerraformModuleComponentConfigRequestVariables): - app_config_id (Union[Unset, str]): - 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]]): - version (Union[Unset, str]): + app_config_id (str | Unset): + checksum (str | Unset): + connected_github_vcs_config (ServiceConnectedGithubVCSConfigRequest | Unset): + dependencies (list[str] | Unset): + drift_schedule (str | Unset): + public_git_vcs_config (ServicePublicGitVCSConfigRequest | Unset): + references (list[str] | Unset): + variables_files (list[str] | Unset): + version (str | Unset): """ - env_vars: "ServiceCreateTerraformModuleComponentConfigRequestEnvVars" - variables: "ServiceCreateTerraformModuleComponentConfigRequestVariables" - app_config_id: Union[Unset, str] = UNSET - 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 - version: Union[Unset, str] = UNSET + env_vars: ServiceCreateTerraformModuleComponentConfigRequestEnvVars + variables: ServiceCreateTerraformModuleComponentConfigRequestVariables + app_config_id: str | Unset = UNSET + checksum: str | Unset = UNSET + connected_github_vcs_config: ServiceConnectedGithubVCSConfigRequest | Unset = UNSET + dependencies: list[str] | Unset = UNSET + drift_schedule: str | Unset = UNSET + public_git_vcs_config: ServicePublicGitVCSConfigRequest | Unset = UNSET + references: list[str] | Unset = UNSET + variables_files: list[str] | Unset = UNSET + version: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -59,25 +61,25 @@ def to_dict(self) -> dict[str, Any]: checksum = self.checksum - connected_github_vcs_config: Union[Unset, dict[str, Any]] = UNSET + connected_github_vcs_config: dict[str, Any] | Unset = UNSET if not isinstance(self.connected_github_vcs_config, Unset): connected_github_vcs_config = self.connected_github_vcs_config.to_dict() - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies drift_schedule = self.drift_schedule - public_git_vcs_config: Union[Unset, dict[str, Any]] = UNSET + public_git_vcs_config: dict[str, Any] | Unset = 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 + references: list[str] | Unset = UNSET if not isinstance(self.references, Unset): references = self.references - variables_files: Union[Unset, list[str]] = UNSET + variables_files: list[str] | Unset = UNSET if not isinstance(self.variables_files, Unset): variables_files = self.variables_files @@ -133,7 +135,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: checksum = d.pop("checksum", UNSET) _connected_github_vcs_config = d.pop("connected_github_vcs_config", UNSET) - connected_github_vcs_config: Union[Unset, ServiceConnectedGithubVCSConfigRequest] + connected_github_vcs_config: ServiceConnectedGithubVCSConfigRequest | Unset if isinstance(_connected_github_vcs_config, Unset): connected_github_vcs_config = UNSET else: @@ -144,7 +146,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 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] + public_git_vcs_config: ServicePublicGitVCSConfigRequest | Unset if isinstance(_public_git_vcs_config, Unset): public_git_vcs_config = UNSET else: diff --git a/nuon/models/service_create_terraform_module_component_config_request_env_vars.py b/nuon/models/service_create_terraform_module_component_config_request_env_vars.py index 38979419..c813fabf 100644 --- a/nuon/models/service_create_terraform_module_component_config_request_env_vars.py +++ b/nuon/models/service_create_terraform_module_component_config_request_env_vars.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_terraform_module_component_config_request_variables.py b/nuon/models/service_create_terraform_module_component_config_request_variables.py index 0842ad89..ca09a1f1 100644 --- a/nuon/models/service_create_terraform_module_component_config_request_variables.py +++ b/nuon/models/service_create_terraform_module_component_config_request_variables.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_terraform_workspace_request.py b/nuon/models/service_create_terraform_workspace_request.py index 9de9b3f8..7d9d4cce 100644 --- a/nuon/models/service_create_terraform_workspace_request.py +++ b/nuon/models/service_create_terraform_workspace_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_user_journey_request.py b/nuon/models/service_create_user_journey_request.py index 7d7d0785..0fb39d67 100644 --- a/nuon/models/service_create_user_journey_request.py +++ b/nuon/models/service_create_user_journey_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -16,12 +18,12 @@ class ServiceCreateUserJourneyRequest: """ Attributes: name (str): - steps (list['ServiceCreateUserJourneyStepReq']): + steps (list[ServiceCreateUserJourneyStepReq]): title (str): """ name: str - steps: list["ServiceCreateUserJourneyStepReq"] + steps: list[ServiceCreateUserJourneyStepReq] title: str additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) diff --git a/nuon/models/service_create_user_journey_step_req.py b/nuon/models/service_create_user_journey_step_req.py index 93e3eed3..7f366cae 100644 --- a/nuon/models/service_create_user_journey_step_req.py +++ b/nuon/models/service_create_user_journey_step_req.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_create_workflow_step_approval_response_request.py b/nuon/models/service_create_workflow_step_approval_response_request.py index 0e733f57..d2ba976b 100644 --- a/nuon/models/service_create_workflow_step_approval_response_request.py +++ b/nuon/models/service_create_workflow_step_approval_response_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,18 +16,18 @@ class ServiceCreateWorkflowStepApprovalResponseRequest: """ Attributes: - note (Union[Unset, str]): - response_type (Union[Unset, AppWorkflowStepResponseType]): + note (str | Unset): + response_type (AppWorkflowStepResponseType | Unset): """ - note: Union[Unset, str] = UNSET - response_type: Union[Unset, AppWorkflowStepResponseType] = UNSET + note: str | Unset = UNSET + response_type: AppWorkflowStepResponseType | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: note = self.note - response_type: Union[Unset, str] = UNSET + response_type: str | Unset = UNSET if not isinstance(self.response_type, Unset): response_type = self.response_type.value @@ -45,7 +47,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: note = d.pop("note", UNSET) _response_type = d.pop("response_type", UNSET) - response_type: Union[Unset, AppWorkflowStepResponseType] + response_type: AppWorkflowStepResponseType | Unset if isinstance(_response_type, Unset): response_type = UNSET else: diff --git a/nuon/models/service_create_workflow_step_approval_response_response.py b/nuon/models/service_create_workflow_step_approval_response_response.py index 2415662f..5462c188 100644 --- a/nuon/models/service_create_workflow_step_approval_response_response.py +++ b/nuon/models/service_create_workflow_step_approval_response_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class ServiceCreateWorkflowStepApprovalResponseResponse: """ Attributes: - id (Union[Unset, str]): - note (Union[Unset, str]): - type_ (Union[Unset, str]): + id (str | Unset): + note (str | Unset): + type_ (str | Unset): """ - id: Union[Unset, str] = UNSET - note: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET + id: str | Unset = UNSET + note: str | Unset = UNSET + type_: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_deploy_install_components_request.py b/nuon/models/service_deploy_install_components_request.py index 08be2f8f..8e1bdaf9 100644 --- a/nuon/models/service_deploy_install_components_request.py +++ b/nuon/models/service_deploy_install_components_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceDeployInstallComponentsRequest: """ Attributes: - plan_only (Union[Unset, bool]): + plan_only (bool | Unset): """ - plan_only: Union[Unset, bool] = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_deprovision_install_request.py b/nuon/models/service_deprovision_install_request.py index 868b932b..1666b215 100644 --- a/nuon/models/service_deprovision_install_request.py +++ b/nuon/models/service_deprovision_install_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceDeprovisionInstallRequest: """ Attributes: - error_behavior (Union[Unset, str]): - plan_only (Union[Unset, bool]): + error_behavior (str | Unset): + plan_only (bool | Unset): """ - error_behavior: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET + error_behavior: str | Unset = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_deprovision_install_sandbox_request.py b/nuon/models/service_deprovision_install_sandbox_request.py index 79a56d8f..bdd2ae74 100644 --- a/nuon/models/service_deprovision_install_sandbox_request.py +++ b/nuon/models/service_deprovision_install_sandbox_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceDeprovisionInstallSandboxRequest: """ Attributes: - error_behavior (Union[Unset, str]): - plan_only (Union[Unset, bool]): + error_behavior (str | Unset): + plan_only (bool | Unset): """ - error_behavior: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET + error_behavior: str | Unset = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_force_shutdown_request.py b/nuon/models/service_force_shutdown_request.py index 1517d85e..e6129044 100644 --- a/nuon/models/service_force_shutdown_request.py +++ b/nuon/models/service_force_shutdown_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_forget_install_request.py b/nuon/models/service_forget_install_request.py index 2ced5716..3d100ff2 100644 --- a/nuon/models/service_forget_install_request.py +++ b/nuon/models/service_forget_install_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_graceful_shutdown_request.py b/nuon/models/service_graceful_shutdown_request.py index c99751f0..e094b730 100644 --- a/nuon/models/service_graceful_shutdown_request.py +++ b/nuon/models/service_graceful_shutdown_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_install_phone_home_request.py b/nuon/models/service_install_phone_home_request.py index cad5630f..af5d169d 100644 --- a/nuon/models/service_install_phone_home_request.py +++ b/nuon/models/service_install_phone_home_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_latest_runner_heart_beats.py b/nuon/models/service_latest_runner_heart_beats.py index 4478747f..a939a0b3 100644 --- a/nuon/models/service_latest_runner_heart_beats.py +++ b/nuon/models/service_latest_runner_heart_beats.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -15,7 +17,7 @@ class ServiceLatestRunnerHeartBeats: """ """ - additional_properties: dict[str, "AppLatestRunnerHeartBeat"] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, AppLatestRunnerHeartBeat] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} @@ -44,10 +46,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) -> "AppLatestRunnerHeartBeat": + def __getitem__(self, key: str) -> AppLatestRunnerHeartBeat: return self.additional_properties[key] - def __setitem__(self, key: str, value: "AppLatestRunnerHeartBeat") -> None: + def __setitem__(self, key: str, value: AppLatestRunnerHeartBeat) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/nuon/models/service_mng_shut_down_request.py b/nuon/models/service_mng_shut_down_request.py index 6bd0f457..fb9ebae5 100644 --- a/nuon/models/service_mng_shut_down_request.py +++ b/nuon/models/service_mng_shut_down_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_mng_update_request.py b/nuon/models/service_mng_update_request.py index bede9163..4296893c 100644 --- a/nuon/models/service_mng_update_request.py +++ b/nuon/models/service_mng_update_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_mng_vm_shut_down_request.py b/nuon/models/service_mng_vm_shut_down_request.py index 47313084..728c7662 100644 --- a/nuon/models/service_mng_vm_shut_down_request.py +++ b/nuon/models/service_mng_vm_shut_down_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_patch_install_config_params.py b/nuon/models/service_patch_install_config_params.py index 0608b1c3..262cb2ee 100644 --- a/nuon/models/service_patch_install_config_params.py +++ b/nuon/models/service_patch_install_config_params.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,14 +16,14 @@ class ServicePatchInstallConfigParams: """ Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): + approval_option (AppInstallApprovalOption | Unset): """ - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + approval_option: AppInstallApprovalOption | Unset = 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 + approval_option: str | Unset = UNSET if not isinstance(self.approval_option, Unset): approval_option = self.approval_option.value @@ -37,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: 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] + approval_option: AppInstallApprovalOption | Unset if isinstance(_approval_option, Unset): approval_option = UNSET else: diff --git a/nuon/models/service_public_git_vcs_action_workflow_config_request.py b/nuon/models/service_public_git_vcs_action_workflow_config_request.py index 5f2ee9b4..c349e431 100644 --- a/nuon/models/service_public_git_vcs_action_workflow_config_request.py +++ b/nuon/models/service_public_git_vcs_action_workflow_config_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_public_git_vcs_config_request.py b/nuon/models/service_public_git_vcs_config_request.py index 6c545a4b..26b8a16d 100644 --- a/nuon/models/service_public_git_vcs_config_request.py +++ b/nuon/models/service_public_git_vcs_config_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_public_git_vcs_sandbox_config_request.py b/nuon/models/service_public_git_vcs_sandbox_config_request.py index ae5f0246..2c046723 100644 --- a/nuon/models/service_public_git_vcs_sandbox_config_request.py +++ b/nuon/models/service_public_git_vcs_sandbox_config_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_readme.py b/nuon/models/service_readme.py index c7bf1790..f5eb503e 100644 --- a/nuon/models/service_readme.py +++ b/nuon/models/service_readme.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,14 +15,14 @@ class ServiceReadme: """ Attributes: - original (Union[Unset, str]): - readme (Union[Unset, str]): - warnings (Union[Unset, list[str]]): + original (str | Unset): + readme (str | Unset): + warnings (list[str] | Unset): """ - original: Union[Unset, str] = UNSET - readme: Union[Unset, str] = UNSET - warnings: Union[Unset, list[str]] = UNSET + original: str | Unset = UNSET + readme: str | Unset = UNSET + warnings: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -28,7 +30,7 @@ def to_dict(self) -> dict[str, Any]: readme = self.readme - warnings: Union[Unset, list[str]] = UNSET + warnings: list[str] | Unset = UNSET if not isinstance(self.warnings, Unset): warnings = self.warnings diff --git a/nuon/models/service_remove_org_user_request.py b/nuon/models/service_remove_org_user_request.py index 196e72bd..982f8798 100644 --- a/nuon/models/service_remove_org_user_request.py +++ b/nuon/models/service_remove_org_user_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceRemoveOrgUserRequest: """ Attributes: - user_id (Union[Unset, str]): + user_id (str | Unset): """ - user_id: Union[Unset, str] = UNSET + user_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_rendered_installer.py b/nuon/models/service_rendered_installer.py index 396d910a..9e9fd925 100644 --- a/nuon/models/service_rendered_installer.py +++ b/nuon/models/service_rendered_installer.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,25 +20,25 @@ class ServiceRenderedInstaller: """ Attributes: - apps (Union[Unset, list['AppApp']]): - metadata (Union[Unset, AppInstallerMetadata]): - sandbox_mode (Union[Unset, bool]): + apps (list[AppApp] | Unset): + metadata (AppInstallerMetadata | Unset): + sandbox_mode (bool | Unset): """ - apps: Union[Unset, list["AppApp"]] = UNSET - metadata: Union[Unset, "AppInstallerMetadata"] = UNSET - sandbox_mode: Union[Unset, bool] = UNSET + apps: list[AppApp] | Unset = UNSET + metadata: AppInstallerMetadata | Unset = UNSET + sandbox_mode: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - apps: Union[Unset, list[dict[str, Any]]] = UNSET + apps: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.apps, Unset): apps = [] for apps_item_data in self.apps: apps_item = apps_item_data.to_dict() apps.append(apps_item) - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -68,7 +70,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: apps.append(apps_item) _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, AppInstallerMetadata] + metadata: AppInstallerMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/nuon/models/service_reprovision_install_request.py b/nuon/models/service_reprovision_install_request.py index 19521696..cef25acf 100644 --- a/nuon/models/service_reprovision_install_request.py +++ b/nuon/models/service_reprovision_install_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceReprovisionInstallRequest: """ Attributes: - plan_only (Union[Unset, bool]): + plan_only (bool | Unset): """ - plan_only: Union[Unset, bool] = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_reprovision_install_sandbox_request.py b/nuon/models/service_reprovision_install_sandbox_request.py index 1740843b..aa4536f9 100644 --- a/nuon/models/service_reprovision_install_sandbox_request.py +++ b/nuon/models/service_reprovision_install_sandbox_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceReprovisionInstallSandboxRequest: """ Attributes: - plan_only (Union[Unset, bool]): + plan_only (bool | Unset): """ - plan_only: Union[Unset, bool] = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_retry_workflow_by_id_request.py b/nuon/models/service_retry_workflow_by_id_request.py index 862f14f0..f030a6e8 100644 --- a/nuon/models/service_retry_workflow_by_id_request.py +++ b/nuon/models/service_retry_workflow_by_id_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceRetryWorkflowByIDRequest: """ Attributes: - operation (Union[Unset, str]): Retry indicates whether to retry the current step or not - step_id (Union[Unset, str]): StepID is the ID of the step to start the retry from + operation (str | Unset): Retry indicates whether to retry the current step or not + step_id (str | Unset): StepID is the ID of the step to start the retry from """ - operation: Union[Unset, str] = UNSET - step_id: Union[Unset, str] = UNSET + operation: str | Unset = UNSET + step_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_retry_workflow_by_id_response.py b/nuon/models/service_retry_workflow_by_id_response.py index dc310ac0..f5ae8b68 100644 --- a/nuon/models/service_retry_workflow_by_id_response.py +++ b/nuon/models/service_retry_workflow_by_id_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceRetryWorkflowByIDResponse: """ Attributes: - workflow_id (Union[Unset, str]): + workflow_id (str | Unset): """ - workflow_id: Union[Unset, str] = UNSET + workflow_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_retry_workflow_request.py b/nuon/models/service_retry_workflow_request.py index ed24f7e2..802c4035 100644 --- a/nuon/models/service_retry_workflow_request.py +++ b/nuon/models/service_retry_workflow_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class ServiceRetryWorkflowRequest: """ Attributes: - operation (Union[Unset, str]): Retry indicates whether to retry the current step or not - step_id (Union[Unset, str]): StepID is the ID of the step to start the retry from - workflow_id (Union[Unset, str]): + operation (str | Unset): Retry indicates whether to retry the current step or not + step_id (str | Unset): StepID is the ID of the step to start the retry from + workflow_id (str | Unset): """ - operation: Union[Unset, str] = UNSET - step_id: Union[Unset, str] = UNSET - workflow_id: Union[Unset, str] = UNSET + operation: str | Unset = UNSET + step_id: str | Unset = UNSET + workflow_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_retry_workflow_response.py b/nuon/models/service_retry_workflow_response.py index d21141fd..049f1589 100644 --- a/nuon/models/service_retry_workflow_response.py +++ b/nuon/models/service_retry_workflow_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceRetryWorkflowResponse: """ Attributes: - workflow_id (Union[Unset, str]): + workflow_id (str | Unset): """ - workflow_id: Union[Unset, str] = UNSET + workflow_id: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_retry_workflow_step_request.py b/nuon/models/service_retry_workflow_step_request.py new file mode 100644 index 00000000..cb945b39 --- /dev/null +++ b/nuon/models/service_retry_workflow_step_request.py @@ -0,0 +1,61 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ServiceRetryWorkflowStepRequest") + + +@_attrs_define +class ServiceRetryWorkflowStepRequest: + """ + Attributes: + operation (str | Unset): Retry indicates whether to retry the current step or not + """ + + operation: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + operation = self.operation + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if operation is not UNSET: + field_dict["operation"] = operation + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + operation = d.pop("operation", UNSET) + + service_retry_workflow_step_request = cls( + operation=operation, + ) + + service_retry_workflow_step_request.additional_properties = d + return service_retry_workflow_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/service_runner_connection_status.py b/nuon/models/service_runner_connection_status.py index 74612f3b..5134c339 100644 --- a/nuon/models/service_runner_connection_status.py +++ b/nuon/models/service_runner_connection_status.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceRunnerConnectionStatus: """ Attributes: - connected (Union[Unset, bool]): - latest_heartbeat_timestamp (Union[Unset, int]): + connected (bool | Unset): + latest_heartbeat_timestamp (int | Unset): """ - connected: Union[Unset, bool] = UNSET - latest_heartbeat_timestamp: Union[Unset, int] = UNSET + connected: bool | Unset = UNSET + latest_heartbeat_timestamp: int | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_sync_secrets_request.py b/nuon/models/service_sync_secrets_request.py index 9931f0bf..5982e22d 100644 --- a/nuon/models/service_sync_secrets_request.py +++ b/nuon/models/service_sync_secrets_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceSyncSecretsRequest: """ Attributes: - plan_only (Union[Unset, bool]): + plan_only (bool | Unset): """ - plan_only: Union[Unset, bool] = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_teardown_install_component_request.py b/nuon/models/service_teardown_install_component_request.py index db4d1c72..9ac21ab6 100644 --- a/nuon/models/service_teardown_install_component_request.py +++ b/nuon/models/service_teardown_install_component_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceTeardownInstallComponentRequest: """ Attributes: - error_behavior (Union[Unset, str]): - plan_only (Union[Unset, bool]): + error_behavior (str | Unset): + plan_only (bool | Unset): """ - error_behavior: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET + error_behavior: str | Unset = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_teardown_install_components_request.py b/nuon/models/service_teardown_install_components_request.py index e9b64781..f4f06ab5 100644 --- a/nuon/models/service_teardown_install_components_request.py +++ b/nuon/models/service_teardown_install_components_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,12 +15,12 @@ class ServiceTeardownInstallComponentsRequest: """ Attributes: - error_behavior (Union[Unset, str]): - plan_only (Union[Unset, bool]): + error_behavior (str | Unset): + plan_only (bool | Unset): """ - error_behavior: Union[Unset, str] = UNSET - plan_only: Union[Unset, bool] = UNSET + error_behavior: str | Unset = UNSET + plan_only: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_update_action_workflow_request.py b/nuon/models/service_update_action_workflow_request.py index 7b1e2396..42b35329 100644 --- a/nuon/models/service_update_action_workflow_request.py +++ b/nuon/models/service_update_action_workflow_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceUpdateActionWorkflowRequest: """ Attributes: - name (Union[Unset, str]): + name (str | Unset): """ - name: Union[Unset, str] = UNSET + name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_update_app_config_installs_request.py b/nuon/models/service_update_app_config_installs_request.py index efcb0966..eb231bd7 100644 --- a/nuon/models/service_update_app_config_installs_request.py +++ b/nuon/models/service_update_app_config_installs_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -13,16 +15,16 @@ class ServiceUpdateAppConfigInstallsRequest: """ Attributes: - install_i_ds (Union[Unset, list[str]]): - update_all (Union[Unset, bool]): + install_i_ds (list[str] | Unset): + update_all (bool | Unset): """ - install_i_ds: Union[Unset, list[str]] = UNSET - update_all: Union[Unset, bool] = UNSET + install_i_ds: list[str] | Unset = UNSET + update_all: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - install_i_ds: Union[Unset, list[str]] = UNSET + install_i_ds: list[str] | Unset = UNSET if not isinstance(self.install_i_ds, Unset): install_i_ds = self.install_i_ds diff --git a/nuon/models/service_update_app_config_request.py b/nuon/models/service_update_app_config_request.py index 38f45104..28e6bb04 100644 --- a/nuon/models/service_update_app_config_request.py +++ b/nuon/models/service_update_app_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,26 +16,26 @@ class ServiceUpdateAppConfigRequest: """ Attributes: - component_ids (Union[Unset, list[str]]): - state (Union[Unset, str]): - status (Union[Unset, AppAppConfigStatus]): - status_description (Union[Unset, str]): + component_ids (list[str] | Unset): + state (str | Unset): + status (AppAppConfigStatus | Unset): + status_description (str | Unset): """ - component_ids: Union[Unset, list[str]] = UNSET - state: Union[Unset, str] = UNSET - status: Union[Unset, AppAppConfigStatus] = UNSET - status_description: Union[Unset, str] = UNSET + component_ids: list[str] | Unset = UNSET + state: str | Unset = UNSET + status: AppAppConfigStatus | Unset = UNSET + status_description: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - component_ids: Union[Unset, list[str]] = UNSET + component_ids: list[str] | Unset = UNSET if not isinstance(self.component_ids, Unset): component_ids = self.component_ids state = self.state - status: Union[Unset, str] = UNSET + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status.value @@ -61,7 +63,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: state = d.pop("state", UNSET) _status = d.pop("status", UNSET) - status: Union[Unset, AppAppConfigStatus] + status: AppAppConfigStatus | Unset if isinstance(_status, Unset): status = UNSET else: diff --git a/nuon/models/service_update_app_request.py b/nuon/models/service_update_app_request.py index 4c56ec99..8b2b5301 100644 --- a/nuon/models/service_update_app_request.py +++ b/nuon/models/service_update_app_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,20 +15,20 @@ class ServiceUpdateAppRequest: """ Attributes: - config_directory (Union[Unset, str]): - config_repo (Union[Unset, str]): - description (Union[Unset, str]): - display_name (Union[Unset, str]): - name (Union[Unset, str]): - slack_webhook_url (Union[Unset, str]): + config_directory (str | Unset): + config_repo (str | Unset): + description (str | Unset): + display_name (str | Unset): + name (str | Unset): + slack_webhook_url (str | Unset): """ - config_directory: Union[Unset, str] = UNSET - config_repo: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - display_name: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - slack_webhook_url: Union[Unset, str] = UNSET + config_directory: str | Unset = UNSET + config_repo: str | Unset = UNSET + description: str | Unset = UNSET + display_name: str | Unset = UNSET + name: str | Unset = UNSET + slack_webhook_url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_update_component_request.py b/nuon/models/service_update_component_request.py index d24b2122..1210dfd8 100644 --- a/nuon/models/service_update_component_request.py +++ b/nuon/models/service_update_component_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import Any, TypeVar, Union, cast +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,19 +16,19 @@ class ServiceUpdateComponentRequest: """ Attributes: name (str): - dependencies (Union[Unset, list[str]]): - var_name (Union[Unset, str]): + dependencies (list[str] | Unset): + var_name (str | Unset): """ name: str - dependencies: Union[Unset, list[str]] = UNSET - var_name: Union[Unset, str] = UNSET + dependencies: list[str] | Unset = UNSET + var_name: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: name = self.name - dependencies: Union[Unset, list[str]] = UNSET + dependencies: list[str] | Unset = UNSET if not isinstance(self.dependencies, Unset): dependencies = self.dependencies diff --git a/nuon/models/service_update_install_config_request.py b/nuon/models/service_update_install_config_request.py index dc94b9cd..f425593b 100644 --- a/nuon/models/service_update_install_config_request.py +++ b/nuon/models/service_update_install_config_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -14,14 +16,14 @@ class ServiceUpdateInstallConfigRequest: """ Attributes: - approval_option (Union[Unset, AppInstallApprovalOption]): + approval_option (AppInstallApprovalOption | Unset): """ - approval_option: Union[Unset, AppInstallApprovalOption] = UNSET + approval_option: AppInstallApprovalOption | Unset = 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 + approval_option: str | Unset = UNSET if not isinstance(self.approval_option, Unset): approval_option = self.approval_option.value @@ -37,7 +39,7 @@ def to_dict(self) -> dict[str, Any]: 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] + approval_option: AppInstallApprovalOption | Unset if isinstance(_approval_option, Unset): approval_option = UNSET else: diff --git a/nuon/models/service_update_install_inputs_request.py b/nuon/models/service_update_install_inputs_request.py index f0d28503..39479e30 100644 --- a/nuon/models/service_update_install_inputs_request.py +++ b/nuon/models/service_update_install_inputs_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -18,7 +20,7 @@ class ServiceUpdateInstallInputsRequest: inputs (ServiceUpdateInstallInputsRequestInputs): """ - inputs: "ServiceUpdateInstallInputsRequestInputs" + inputs: ServiceUpdateInstallInputsRequestInputs additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_update_install_inputs_request_inputs.py b/nuon/models/service_update_install_inputs_request_inputs.py index 66fc7ad4..08255166 100644 --- a/nuon/models/service_update_install_inputs_request_inputs.py +++ b/nuon/models/service_update_install_inputs_request_inputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_update_install_request.py b/nuon/models/service_update_install_request.py index cb81b4bf..f5a4d8f9 100644 --- a/nuon/models/service_update_install_request.py +++ b/nuon/models/service_update_install_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,22 +20,22 @@ class ServiceUpdateInstallRequest: """ Attributes: - install_config (Union[Unset, ServicePatchInstallConfigParams]): - metadata (Union[Unset, HelpersInstallMetadata]): - name (Union[Unset, str]): + install_config (ServicePatchInstallConfigParams | Unset): + metadata (HelpersInstallMetadata | Unset): + name (str | Unset): """ - install_config: Union[Unset, "ServicePatchInstallConfigParams"] = UNSET - metadata: Union[Unset, "HelpersInstallMetadata"] = UNSET - name: Union[Unset, str] = UNSET + install_config: ServicePatchInstallConfigParams | Unset = UNSET + metadata: HelpersInstallMetadata | Unset = UNSET + name: str | Unset = 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 + install_config: dict[str, Any] | Unset = UNSET if not isinstance(self.install_config, Unset): install_config = self.install_config.to_dict() - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -58,14 +60,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _install_config = d.pop("install_config", UNSET) - install_config: Union[Unset, ServicePatchInstallConfigParams] + install_config: ServicePatchInstallConfigParams | Unset 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] + metadata: HelpersInstallMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/nuon/models/service_update_installer_request.py b/nuon/models/service_update_installer_request.py index 573af4cb..ff3ef379 100644 --- a/nuon/models/service_update_installer_request.py +++ b/nuon/models/service_update_installer_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -19,12 +21,12 @@ class ServiceUpdateInstallerRequest: Attributes: app_ids (list[str]): name (str): - metadata (Union[Unset, ServiceUpdateInstallerRequestMetadata]): + metadata (ServiceUpdateInstallerRequestMetadata | Unset): """ app_ids: list[str] name: str - metadata: Union[Unset, "ServiceUpdateInstallerRequestMetadata"] = UNSET + metadata: ServiceUpdateInstallerRequestMetadata | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -32,7 +34,7 @@ def to_dict(self) -> dict[str, Any]: name = self.name - metadata: Union[Unset, dict[str, Any]] = UNSET + metadata: dict[str, Any] | Unset = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -59,7 +61,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: name = d.pop("name") _metadata = d.pop("metadata", UNSET) - metadata: Union[Unset, ServiceUpdateInstallerRequestMetadata] + metadata: ServiceUpdateInstallerRequestMetadata | Unset if isinstance(_metadata, Unset): metadata = UNSET else: diff --git a/nuon/models/service_update_installer_request_metadata.py b/nuon/models/service_update_installer_request_metadata.py index f443e9cf..814d2e46 100644 --- a/nuon/models/service_update_installer_request_metadata.py +++ b/nuon/models/service_update_installer_request_metadata.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -20,11 +22,11 @@ class ServiceUpdateInstallerRequestMetadata: github_url (str): homepage_url (str): logo_url (str): - copyright_markdown (Union[Unset, str]): - demo_url (Union[Unset, str]): - footer_markdown (Union[Unset, str]): - og_image_url (Union[Unset, str]): - post_install_markdown (Union[Unset, str]): + copyright_markdown (str | Unset): + demo_url (str | Unset): + footer_markdown (str | Unset): + og_image_url (str | Unset): + post_install_markdown (str | Unset): """ community_url: str @@ -34,11 +36,11 @@ class ServiceUpdateInstallerRequestMetadata: github_url: str homepage_url: str logo_url: str - copyright_markdown: Union[Unset, str] = UNSET - demo_url: Union[Unset, str] = UNSET - footer_markdown: Union[Unset, str] = UNSET - og_image_url: Union[Unset, str] = UNSET - post_install_markdown: Union[Unset, str] = UNSET + copyright_markdown: str | Unset = UNSET + demo_url: str | Unset = UNSET + footer_markdown: str | Unset = UNSET + og_image_url: str | Unset = UNSET + post_install_markdown: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_update_org_request.py b/nuon/models/service_update_org_request.py index 6ea62635..84565d54 100644 --- a/nuon/models/service_update_org_request.py +++ b/nuon/models/service_update_org_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_update_runner_settings_request.py b/nuon/models/service_update_runner_settings_request.py index 06a80ea1..c16727b5 100644 --- a/nuon/models/service_update_runner_settings_request.py +++ b/nuon/models/service_update_runner_settings_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,20 +15,20 @@ class ServiceUpdateRunnerSettingsRequest: """ Attributes: - aws_max_instance_lifetime (Union[Unset, int]): - container_image_tag (Union[Unset, str]): - container_image_url (Union[Unset, str]): - org_awsiam_role_arn (Union[Unset, str]): - org_k8s_service_account_name (Union[Unset, str]): - runner_api_url (Union[Unset, str]): + aws_max_instance_lifetime (int | Unset): + container_image_tag (str | Unset): + container_image_url (str | Unset): + org_awsiam_role_arn (str | Unset): + org_k8s_service_account_name (str | Unset): + runner_api_url (str | Unset): """ - aws_max_instance_lifetime: Union[Unset, int] = UNSET - container_image_tag: Union[Unset, str] = UNSET - container_image_url: Union[Unset, str] = UNSET - org_awsiam_role_arn: Union[Unset, str] = UNSET - org_k8s_service_account_name: Union[Unset, str] = UNSET - runner_api_url: Union[Unset, str] = UNSET + aws_max_instance_lifetime: int | Unset = UNSET + container_image_tag: str | Unset = UNSET + container_image_url: str | Unset = UNSET + org_awsiam_role_arn: str | Unset = UNSET + org_k8s_service_account_name: str | Unset = UNSET + runner_api_url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_update_user_journey_step_request.py b/nuon/models/service_update_user_journey_step_request.py index 9884e6b8..7bb595c1 100644 --- a/nuon/models/service_update_user_journey_step_request.py +++ b/nuon/models/service_update_user_journey_step_request.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class ServiceUpdateUserJourneyStepRequest: """ Attributes: - complete (Union[Unset, bool]): + complete (bool | Unset): """ - complete: Union[Unset, bool] = UNSET + complete: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/service_update_workflow_request.py b/nuon/models/service_update_workflow_request.py index 45b3eaf6..dddbaf6a 100644 --- a/nuon/models/service_update_workflow_request.py +++ b/nuon/models/service_update_workflow_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/service_waitlist_request.py b/nuon/models/service_waitlist_request.py index 11398956..b016e3c8 100644 --- a/nuon/models/service_waitlist_request.py +++ b/nuon/models/service_waitlist_request.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/state_action_workflow_state.py b/nuon/models/state_action_workflow_state.py index fed5232a..640f86a5 100644 --- a/nuon/models/state_action_workflow_state.py +++ b/nuon/models/state_action_workflow_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,22 +19,22 @@ class StateActionWorkflowState: """ Attributes: - id (Union[Unset, str]): - outputs (Union[Unset, StateActionWorkflowStateOutputs]): - populated (Union[Unset, bool]): - status (Union[Unset, str]): + id (str | Unset): + outputs (StateActionWorkflowStateOutputs | Unset): + populated (bool | Unset): + status (str | Unset): """ - id: Union[Unset, str] = UNSET - outputs: Union[Unset, "StateActionWorkflowStateOutputs"] = UNSET - populated: Union[Unset, bool] = UNSET - status: Union[Unset, str] = UNSET + id: str | Unset = UNSET + outputs: StateActionWorkflowStateOutputs | Unset = UNSET + populated: bool | Unset = UNSET + status: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: id = self.id - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() @@ -62,7 +64,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, StateActionWorkflowStateOutputs] + outputs: StateActionWorkflowStateOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: diff --git a/nuon/models/state_action_workflow_state_outputs.py b/nuon/models/state_action_workflow_state_outputs.py index 53434965..7bdbf54c 100644 --- a/nuon/models/state_action_workflow_state_outputs.py +++ b/nuon/models/state_action_workflow_state_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/state_actions_state.py b/nuon/models/state_actions_state.py index 27c408da..c233e185 100644 --- a/nuon/models/state_actions_state.py +++ b/nuon/models/state_actions_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,18 +19,18 @@ class StateActionsState: """ Attributes: - populated (Union[Unset, bool]): - workflows (Union[Unset, StateActionsStateWorkflows]): + populated (bool | Unset): + workflows (StateActionsStateWorkflows | Unset): """ - populated: Union[Unset, bool] = UNSET - workflows: Union[Unset, "StateActionsStateWorkflows"] = UNSET + populated: bool | Unset = UNSET + workflows: StateActionsStateWorkflows | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: populated = self.populated - workflows: Union[Unset, dict[str, Any]] = UNSET + workflows: dict[str, Any] | Unset = UNSET if not isinstance(self.workflows, Unset): workflows = self.workflows.to_dict() @@ -50,7 +52,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: populated = d.pop("populated", UNSET) _workflows = d.pop("workflows", UNSET) - workflows: Union[Unset, StateActionsStateWorkflows] + workflows: StateActionsStateWorkflows | Unset if isinstance(_workflows, Unset): workflows = UNSET else: diff --git a/nuon/models/state_actions_state_workflows.py b/nuon/models/state_actions_state_workflows.py index 726f05be..1b410bd0 100644 --- a/nuon/models/state_actions_state_workflows.py +++ b/nuon/models/state_actions_state_workflows.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -15,7 +17,7 @@ class StateActionsStateWorkflows: """ """ - additional_properties: dict[str, "StateActionWorkflowState"] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, StateActionWorkflowState] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} @@ -44,10 +46,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) -> "StateActionWorkflowState": + def __getitem__(self, key: str) -> StateActionWorkflowState: return self.additional_properties[key] - def __setitem__(self, key: str, value: "StateActionWorkflowState") -> None: + def __setitem__(self, key: str, value: StateActionWorkflowState) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/nuon/models/state_app_state.py b/nuon/models/state_app_state.py index bffafb49..90615d17 100644 --- a/nuon/models/state_app_state.py +++ b/nuon/models/state_app_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,18 +19,18 @@ class StateAppState: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): - populated (Union[Unset, bool]): - status (Union[Unset, str]): - variables (Union[Unset, StateAppStateVariables]): + id (str | Unset): + name (str | Unset): + populated (bool | Unset): + status (str | Unset): + variables (StateAppStateVariables | Unset): """ - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - status: Union[Unset, str] = UNSET - variables: Union[Unset, "StateAppStateVariables"] = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET + populated: bool | Unset = UNSET + status: str | Unset = UNSET + variables: StateAppStateVariables | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -40,7 +42,7 @@ def to_dict(self) -> dict[str, Any]: status = self.status - variables: Union[Unset, dict[str, Any]] = UNSET + variables: dict[str, Any] | Unset = UNSET if not isinstance(self.variables, Unset): variables = self.variables.to_dict() @@ -74,7 +76,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: status = d.pop("status", UNSET) _variables = d.pop("variables", UNSET) - variables: Union[Unset, StateAppStateVariables] + variables: StateAppStateVariables | Unset if isinstance(_variables, Unset): variables = UNSET else: diff --git a/nuon/models/state_app_state_variables.py b/nuon/models/state_app_state_variables.py index b82e4fb7..f43ba032 100644 --- a/nuon/models/state_app_state_variables.py +++ b/nuon/models/state_app_state_variables.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/state_aws_cloud_account.py b/nuon/models/state_aws_cloud_account.py index a6048f0d..e30cb598 100644 --- a/nuon/models/state_aws_cloud_account.py +++ b/nuon/models/state_aws_cloud_account.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class StateAWSCloudAccount: """ Attributes: - region (Union[Unset, str]): + region (str | Unset): """ - region: Union[Unset, str] = UNSET + region: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/state_azure_cloud_account.py b/nuon/models/state_azure_cloud_account.py index 85b42eb3..aacddd90 100644 --- a/nuon/models/state_azure_cloud_account.py +++ b/nuon/models/state_azure_cloud_account.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,10 +15,10 @@ class StateAzureCloudAccount: """ Attributes: - location (Union[Unset, str]): + location (str | Unset): """ - location: Union[Unset, str] = UNSET + location: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/state_cloud_account.py b/nuon/models/state_cloud_account.py index 515d872f..ac6ae41e 100644 --- a/nuon/models/state_cloud_account.py +++ b/nuon/models/state_cloud_account.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,20 +20,20 @@ class StateCloudAccount: """ Attributes: - aws (Union[Unset, StateAWSCloudAccount]): - azure (Union[Unset, StateAzureCloudAccount]): + aws (StateAWSCloudAccount | Unset): + azure (StateAzureCloudAccount | Unset): """ - aws: Union[Unset, "StateAWSCloudAccount"] = UNSET - azure: Union[Unset, "StateAzureCloudAccount"] = UNSET + aws: StateAWSCloudAccount | Unset = UNSET + azure: StateAzureCloudAccount | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - aws: Union[Unset, dict[str, Any]] = UNSET + aws: dict[str, Any] | Unset = UNSET if not isinstance(self.aws, Unset): aws = self.aws.to_dict() - azure: Union[Unset, dict[str, Any]] = UNSET + azure: dict[str, Any] | Unset = UNSET if not isinstance(self.azure, Unset): azure = self.azure.to_dict() @@ -52,14 +54,14 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _aws = d.pop("aws", UNSET) - aws: Union[Unset, StateAWSCloudAccount] + aws: StateAWSCloudAccount | Unset if isinstance(_aws, Unset): aws = UNSET else: aws = StateAWSCloudAccount.from_dict(_aws) _azure = d.pop("azure", UNSET) - azure: Union[Unset, StateAzureCloudAccount] + azure: StateAzureCloudAccount | Unset if isinstance(_azure, Unset): azure = UNSET else: diff --git a/nuon/models/state_domain_state.py b/nuon/models/state_domain_state.py index 2385b1d9..f93c7f77 100644 --- a/nuon/models/state_domain_state.py +++ b/nuon/models/state_domain_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class StateDomainState: """ Attributes: - internal_domain (Union[Unset, str]): - populated (Union[Unset, bool]): - public_domain (Union[Unset, str]): + internal_domain (str | Unset): + populated (bool | Unset): + public_domain (str | Unset): """ - internal_domain: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - public_domain: Union[Unset, str] = UNSET + internal_domain: str | Unset = UNSET + populated: bool | Unset = UNSET + public_domain: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/state_inputs_state.py b/nuon/models/state_inputs_state.py index 18cdc7a5..7a156917 100644 --- a/nuon/models/state_inputs_state.py +++ b/nuon/models/state_inputs_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,16 +19,16 @@ class StateInputsState: """ Attributes: - inputs (Union[Unset, StateInputsStateInputs]): - populated (Union[Unset, bool]): + inputs (StateInputsStateInputs | Unset): + populated (bool | Unset): """ - inputs: Union[Unset, "StateInputsStateInputs"] = UNSET - populated: Union[Unset, bool] = UNSET + inputs: StateInputsStateInputs | Unset = UNSET + populated: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - inputs: Union[Unset, dict[str, Any]] = UNSET + inputs: dict[str, Any] | Unset = UNSET if not isinstance(self.inputs, Unset): inputs = self.inputs.to_dict() @@ -48,7 +50,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _inputs = d.pop("inputs", UNSET) - inputs: Union[Unset, StateInputsStateInputs] + inputs: StateInputsStateInputs | Unset if isinstance(_inputs, Unset): inputs = UNSET else: diff --git a/nuon/models/state_inputs_state_inputs.py b/nuon/models/state_inputs_state_inputs.py index 902962d7..e5b9f021 100644 --- a/nuon/models/state_inputs_state_inputs.py +++ b/nuon/models/state_inputs_state_inputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/state_install_stack_state.py b/nuon/models/state_install_stack_state.py index 64965cdc..32ab90d2 100644 --- a/nuon/models/state_install_stack_state.py +++ b/nuon/models/state_install_stack_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,28 +19,28 @@ class StateInstallStackState: """ Attributes: - checksum (Union[Unset, str]): - outputs (Union[Unset, StateInstallStackStateOutputs]): - populated (Union[Unset, bool]): - quick_link_url (Union[Unset, str]): - status (Union[Unset, str]): - template_json (Union[Unset, str]): - template_url (Union[Unset, str]): + checksum (str | Unset): + outputs (StateInstallStackStateOutputs | Unset): + populated (bool | Unset): + quick_link_url (str | Unset): + status (str | Unset): + template_json (str | Unset): + template_url (str | Unset): """ - checksum: Union[Unset, str] = UNSET - outputs: Union[Unset, "StateInstallStackStateOutputs"] = UNSET - populated: Union[Unset, bool] = UNSET - quick_link_url: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET - template_json: Union[Unset, str] = UNSET - template_url: Union[Unset, str] = UNSET + checksum: str | Unset = UNSET + outputs: StateInstallStackStateOutputs | Unset = UNSET + populated: bool | Unset = UNSET + quick_link_url: str | Unset = UNSET + status: str | Unset = UNSET + template_json: str | Unset = UNSET + template_url: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: checksum = self.checksum - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() @@ -80,7 +82,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: checksum = d.pop("checksum", UNSET) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, StateInstallStackStateOutputs] + outputs: StateInstallStackStateOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: diff --git a/nuon/models/state_install_stack_state_outputs.py b/nuon/models/state_install_stack_state_outputs.py index be21cf31..29525a65 100644 --- a/nuon/models/state_install_stack_state_outputs.py +++ b/nuon/models/state_install_stack_state_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/state_install_state.py b/nuon/models/state_install_state.py index ef0a2974..ea886cab 100644 --- a/nuon/models/state_install_state.py +++ b/nuon/models/state_install_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -18,28 +20,28 @@ class StateInstallState: """ Attributes: - id (Union[Unset, str]): - inputs (Union[Unset, StateInstallStateInputs]): - internal_domain (Union[Unset, str]): - name (Union[Unset, str]): - populated (Union[Unset, bool]): - public_domain (Union[Unset, str]): - sandbox (Union[Unset, StateSandboxState]): + id (str | Unset): + inputs (StateInstallStateInputs | Unset): + internal_domain (str | Unset): + name (str | Unset): + populated (bool | Unset): + public_domain (str | Unset): + sandbox (StateSandboxState | Unset): """ - id: Union[Unset, str] = UNSET - inputs: Union[Unset, "StateInstallStateInputs"] = UNSET - internal_domain: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - public_domain: Union[Unset, str] = UNSET - sandbox: Union[Unset, "StateSandboxState"] = UNSET + id: str | Unset = UNSET + inputs: StateInstallStateInputs | Unset = UNSET + internal_domain: str | Unset = UNSET + name: str | Unset = UNSET + populated: bool | Unset = UNSET + public_domain: str | Unset = UNSET + sandbox: StateSandboxState | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: id = self.id - inputs: Union[Unset, dict[str, Any]] = UNSET + inputs: dict[str, Any] | Unset = UNSET if not isinstance(self.inputs, Unset): inputs = self.inputs.to_dict() @@ -51,7 +53,7 @@ def to_dict(self) -> dict[str, Any]: public_domain = self.public_domain - sandbox: Union[Unset, dict[str, Any]] = UNSET + sandbox: dict[str, Any] | Unset = UNSET if not isinstance(self.sandbox, Unset): sandbox = self.sandbox.to_dict() @@ -84,7 +86,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: id = d.pop("id", UNSET) _inputs = d.pop("inputs", UNSET) - inputs: Union[Unset, StateInstallStateInputs] + inputs: StateInstallStateInputs | Unset if isinstance(_inputs, Unset): inputs = UNSET else: @@ -99,7 +101,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: public_domain = d.pop("public_domain", UNSET) _sandbox = d.pop("sandbox", UNSET) - sandbox: Union[Unset, StateSandboxState] + sandbox: StateSandboxState | Unset if isinstance(_sandbox, Unset): sandbox = UNSET else: diff --git a/nuon/models/state_install_state_inputs.py b/nuon/models/state_install_state_inputs.py index 8f164644..f5e2525a 100644 --- a/nuon/models/state_install_state_inputs.py +++ b/nuon/models/state_install_state_inputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/state_org_state.py b/nuon/models/state_org_state.py index 0bd0eb7e..6f5e1c36 100644 --- a/nuon/models/state_org_state.py +++ b/nuon/models/state_org_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,16 +15,16 @@ class StateOrgState: """ Attributes: - id (Union[Unset, str]): - name (Union[Unset, str]): - populated (Union[Unset, bool]): - status (Union[Unset, str]): + id (str | Unset): + name (str | Unset): + populated (bool | Unset): + status (str | Unset): """ - id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - status: Union[Unset, str] = UNSET + id: str | Unset = UNSET + name: str | Unset = UNSET + populated: bool | Unset = UNSET + status: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/state_runner_state.py b/nuon/models/state_runner_state.py index 5fd73a8b..d8ec6387 100644 --- a/nuon/models/state_runner_state.py +++ b/nuon/models/state_runner_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,16 +15,16 @@ class StateRunnerState: """ Attributes: - id (Union[Unset, str]): - populated (Union[Unset, bool]): - runner_group_id (Union[Unset, str]): - status (Union[Unset, str]): + id (str | Unset): + populated (bool | Unset): + runner_group_id (str | Unset): + status (str | Unset): """ - id: Union[Unset, str] = UNSET - populated: Union[Unset, bool] = UNSET - runner_group_id: Union[Unset, str] = UNSET - status: Union[Unset, str] = UNSET + id: str | Unset = UNSET + populated: bool | Unset = UNSET + runner_group_id: str | Unset = UNSET + status: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/state_sandbox_state.py b/nuon/models/state_sandbox_state.py index d578415d..e5dceb48 100644 --- a/nuon/models/state_sandbox_state.py +++ b/nuon/models/state_sandbox_state.py @@ -1,5 +1,7 @@ +from __future__ import annotations + from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, Union +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -17,30 +19,30 @@ class StateSandboxState: """ Attributes: - outputs (Union[Unset, StateSandboxStateOutputs]): - populated (Union[Unset, bool]): - recent_runs (Union[Unset, list['StateSandboxState']]): - status (Union[Unset, str]): - type_ (Union[Unset, str]): - version (Union[Unset, str]): + outputs (StateSandboxStateOutputs | Unset): + populated (bool | Unset): + recent_runs (list[StateSandboxState] | Unset): + status (str | Unset): + type_ (str | Unset): + version (str | Unset): """ - outputs: Union[Unset, "StateSandboxStateOutputs"] = UNSET - populated: Union[Unset, bool] = UNSET - recent_runs: Union[Unset, list["StateSandboxState"]] = UNSET - status: Union[Unset, str] = UNSET - type_: Union[Unset, str] = UNSET - version: Union[Unset, str] = UNSET + outputs: StateSandboxStateOutputs | Unset = UNSET + populated: bool | Unset = UNSET + recent_runs: list[StateSandboxState] | Unset = UNSET + status: str | Unset = UNSET + type_: str | Unset = UNSET + version: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - outputs: Union[Unset, dict[str, Any]] = UNSET + outputs: dict[str, Any] | Unset = UNSET if not isinstance(self.outputs, Unset): outputs = self.outputs.to_dict() populated = self.populated - recent_runs: Union[Unset, list[dict[str, Any]]] = UNSET + recent_runs: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.recent_runs, Unset): recent_runs = [] for recent_runs_item_data in self.recent_runs: @@ -77,7 +79,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) _outputs = d.pop("outputs", UNSET) - outputs: Union[Unset, StateSandboxStateOutputs] + outputs: StateSandboxStateOutputs | Unset if isinstance(_outputs, Unset): outputs = UNSET else: diff --git a/nuon/models/state_sandbox_state_outputs.py b/nuon/models/state_sandbox_state_outputs.py index 67290aa4..1a011b01 100644 --- a/nuon/models/state_sandbox_state_outputs.py +++ b/nuon/models/state_sandbox_state_outputs.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/state_secrets_state.py b/nuon/models/state_secrets_state.py index 1e49f1ae..f7d575bd 100644 --- a/nuon/models/state_secrets_state.py +++ b/nuon/models/state_secrets_state.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import TYPE_CHECKING, Any, TypeVar @@ -15,7 +17,7 @@ class StateSecretsState: """ """ - additional_properties: dict[str, "OutputsSecretSyncOutput"] = _attrs_field(init=False, factory=dict) + additional_properties: dict[str, OutputsSecretSyncOutput] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: field_dict: dict[str, Any] = {} @@ -44,10 +46,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) -> "OutputsSecretSyncOutput": + def __getitem__(self, key: str) -> OutputsSecretSyncOutput: return self.additional_properties[key] - def __setitem__(self, key: str, value: "OutputsSecretSyncOutput") -> None: + def __setitem__(self, key: str, value: OutputsSecretSyncOutput) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/nuon/models/stderr_err_response.py b/nuon/models/stderr_err_response.py index ed2992a3..4a579680 100644 --- a/nuon/models/stderr_err_response.py +++ b/nuon/models/stderr_err_response.py @@ -1,5 +1,7 @@ +from __future__ import annotations + 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 @@ -13,14 +15,14 @@ class StderrErrResponse: """ Attributes: - description (Union[Unset, str]): - error (Union[Unset, str]): - user_error (Union[Unset, bool]): + description (str | Unset): + error (str | Unset): + user_error (bool | Unset): """ - description: Union[Unset, str] = UNSET - error: Union[Unset, str] = UNSET - user_error: Union[Unset, bool] = UNSET + description: str | Unset = UNSET + error: str | Unset = UNSET + user_error: bool | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: diff --git a/nuon/models/types_string_bool_map.py b/nuon/models/types_string_bool_map.py index 1e0bb089..561f4acb 100644 --- a/nuon/models/types_string_bool_map.py +++ b/nuon/models/types_string_bool_map.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/unlock_terraform_workspace_body.py b/nuon/models/unlock_terraform_workspace_body.py index 25b7cae7..bd6e73dd 100644 --- a/nuon/models/unlock_terraform_workspace_body.py +++ b/nuon/models/unlock_terraform_workspace_body.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/models/update_terraform_state_body.py b/nuon/models/update_terraform_state_body.py index 64673d44..30367ee8 100644 --- a/nuon/models/update_terraform_state_body.py +++ b/nuon/models/update_terraform_state_body.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from collections.abc import Mapping from typing import Any, TypeVar diff --git a/nuon/types.py b/nuon/types.py index 1b96ca40..b64af095 100644 --- a/nuon/types.py +++ b/nuon/types.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, MutableMapping from http import HTTPStatus -from typing import IO, BinaryIO, Generic, Literal, Optional, TypeVar, Union +from typing import IO, BinaryIO, Generic, Literal, TypeVar from attrs import define @@ -15,13 +15,13 @@ def __bool__(self) -> Literal[False]: UNSET: Unset = Unset() # The types that `httpx.Client(files=)` can accept, copied from that library. -FileContent = Union[IO[bytes], bytes, str] -FileTypes = Union[ +FileContent = IO[bytes] | bytes | str +FileTypes = ( # (filename, file (or bytes), content_type) - tuple[Optional[str], FileContent, Optional[str]], + tuple[str | None, FileContent, str | None] # (filename, file (or bytes), content_type, headers) - tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], -] + | tuple[str | None, FileContent, str | None, Mapping[str, str]] +) RequestFiles = list[tuple[str, FileTypes]] @@ -30,8 +30,8 @@ class File: """Contains information for file uploads""" payload: BinaryIO - file_name: Optional[str] = None - mime_type: Optional[str] = None + file_name: str | None = None + mime_type: str | None = None def to_tuple(self) -> FileTypes: """Return a tuple representation that httpx will accept for multipart/form-data""" @@ -48,7 +48,7 @@ class Response(Generic[T]): status_code: HTTPStatus content: bytes headers: MutableMapping[str, str] - parsed: Optional[T] + parsed: T | None __all__ = ["UNSET", "File", "FileTypes", "RequestFiles", "Response", "Unset"] diff --git a/pyproject.toml b/pyproject.toml index 5fbc5b46..252814e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [project] name = "nuon" -version = "0.19.679" +version = "0.19.686" description = "A client library for accessing Nuon" authors = [] -requires-python = "~=3.9" +requires-python = ">=3.10" readme = "README.md" dependencies = [ "httpx>=0.23.0,<0.29.0", diff --git a/version.txt b/version.txt index 848ef50c..c571e8f5 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.19.679 +0.19.686