diff --git a/services/serverupdate/src/stackit/serverupdate/__init__.py b/services/serverupdate/src/stackit/serverupdate/__init__.py index 0522cf5c..19298904 100644 --- a/services/serverupdate/src/stackit/serverupdate/__init__.py +++ b/services/serverupdate/src/stackit/serverupdate/__init__.py @@ -7,7 +7,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -38,10 +38,10 @@ from stackit.serverupdate.models.create_update_schedule_payload import ( CreateUpdateSchedulePayload, ) -from stackit.serverupdate.models.enable_service_payload import EnableServicePayload from stackit.serverupdate.models.enable_service_resource_payload import ( EnableServiceResourcePayload, ) +from stackit.serverupdate.models.error_response import ErrorResponse from stackit.serverupdate.models.get_update_policies_response import ( GetUpdatePoliciesResponse, ) diff --git a/services/serverupdate/src/stackit/serverupdate/api/default_api.py b/services/serverupdate/src/stackit/serverupdate/api/default_api.py index 1da71a00..d9ee5aa1 100644 --- a/services/serverupdate/src/stackit/serverupdate/api/default_api.py +++ b/services/serverupdate/src/stackit/serverupdate/api/default_api.py @@ -5,14 +5,13 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 docstring might be too long -import warnings from typing import Any, Dict, List, Optional, Tuple, Union from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call @@ -25,7 +24,6 @@ from stackit.serverupdate.models.create_update_schedule_payload import ( CreateUpdateSchedulePayload, ) -from stackit.serverupdate.models.enable_service_payload import EnableServicePayload from stackit.serverupdate.models.enable_service_resource_payload import ( EnableServiceResourcePayload, ) @@ -65,6 +63,7 @@ def create_update( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], create_update_payload: Optional[CreateUpdatePayload] = None, _request_timeout: Union[ None, @@ -83,6 +82,8 @@ def create_update( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param create_update_payload: :type create_update_payload: CreateUpdatePayload :param _request_timeout: timeout setting for this request. If one @@ -110,6 +111,7 @@ def create_update( _param = self._create_update_serialize( project_id=project_id, server_id=server_id, + region=region, create_update_payload=create_update_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -120,7 +122,7 @@ def create_update( _response_types_map: Dict[str, Optional[str]] = { "202": "Update", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -135,6 +137,7 @@ def create_update_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], create_update_payload: Optional[CreateUpdatePayload] = None, _request_timeout: Union[ None, @@ -153,6 +156,8 @@ def create_update_with_http_info( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param create_update_payload: :type create_update_payload: CreateUpdatePayload :param _request_timeout: timeout setting for this request. If one @@ -180,6 +185,7 @@ def create_update_with_http_info( _param = self._create_update_serialize( project_id=project_id, server_id=server_id, + region=region, create_update_payload=create_update_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -190,7 +196,7 @@ def create_update_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": "Update", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -205,6 +211,7 @@ def create_update_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], create_update_payload: Optional[CreateUpdatePayload] = None, _request_timeout: Union[ None, @@ -223,6 +230,8 @@ def create_update_without_preload_content( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param create_update_payload: :type create_update_payload: CreateUpdatePayload :param _request_timeout: timeout setting for this request. If one @@ -250,6 +259,7 @@ def create_update_without_preload_content( _param = self._create_update_serialize( project_id=project_id, server_id=server_id, + region=region, create_update_payload=create_update_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -260,7 +270,7 @@ def create_update_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": "Update", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -270,6 +280,7 @@ def _create_update_serialize( self, project_id, server_id, + region, create_update_payload, _request_auth, _content_type, @@ -293,6 +304,8 @@ def _create_update_serialize( _path_params["projectId"] = project_id if server_id is not None: _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -317,7 +330,7 @@ def _create_update_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/updates", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/updates", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -335,6 +348,7 @@ def create_update_schedule( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], create_update_schedule_payload: Optional[CreateUpdateSchedulePayload] = None, _request_timeout: Union[ None, @@ -353,6 +367,8 @@ def create_update_schedule( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param create_update_schedule_payload: :type create_update_schedule_payload: CreateUpdateSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -380,6 +396,7 @@ def create_update_schedule( _param = self._create_update_schedule_serialize( project_id=project_id, server_id=server_id, + region=region, create_update_schedule_payload=create_update_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -390,7 +407,7 @@ def create_update_schedule( _response_types_map: Dict[str, Optional[str]] = { "201": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -405,6 +422,7 @@ def create_update_schedule_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], create_update_schedule_payload: Optional[CreateUpdateSchedulePayload] = None, _request_timeout: Union[ None, @@ -423,6 +441,8 @@ def create_update_schedule_with_http_info( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param create_update_schedule_payload: :type create_update_schedule_payload: CreateUpdateSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -450,6 +470,7 @@ def create_update_schedule_with_http_info( _param = self._create_update_schedule_serialize( project_id=project_id, server_id=server_id, + region=region, create_update_schedule_payload=create_update_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -460,7 +481,7 @@ def create_update_schedule_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "201": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -475,6 +496,7 @@ def create_update_schedule_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], create_update_schedule_payload: Optional[CreateUpdateSchedulePayload] = None, _request_timeout: Union[ None, @@ -493,6 +515,8 @@ def create_update_schedule_without_preload_content( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param create_update_schedule_payload: :type create_update_schedule_payload: CreateUpdateSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -520,6 +544,7 @@ def create_update_schedule_without_preload_content( _param = self._create_update_schedule_serialize( project_id=project_id, server_id=server_id, + region=region, create_update_schedule_payload=create_update_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -530,7 +555,7 @@ def create_update_schedule_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "201": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -540,6 +565,7 @@ def _create_update_schedule_serialize( self, project_id, server_id, + region, create_update_schedule_payload, _request_auth, _content_type, @@ -563,6 +589,8 @@ def _create_update_schedule_serialize( _path_params["projectId"] = project_id if server_id is not None: _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -587,7 +615,7 @@ def _create_update_schedule_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/update-schedules", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/update-schedules", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -606,6 +634,7 @@ def delete_update_schedule( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -625,6 +654,8 @@ def delete_update_schedule( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -651,6 +682,7 @@ def delete_update_schedule( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -660,7 +692,7 @@ def delete_update_schedule( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -676,6 +708,7 @@ def delete_update_schedule_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -695,6 +728,8 @@ def delete_update_schedule_with_http_info( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -721,6 +756,7 @@ def delete_update_schedule_with_http_info( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -730,7 +766,7 @@ def delete_update_schedule_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -746,6 +782,7 @@ def delete_update_schedule_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -765,6 +802,8 @@ def delete_update_schedule_without_preload_content( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -791,6 +830,7 @@ def delete_update_schedule_without_preload_content( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -800,7 +840,7 @@ def delete_update_schedule_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -811,6 +851,7 @@ def _delete_update_schedule_serialize( project_id, server_id, schedule_id, + region, _request_auth, _content_type, _headers, @@ -835,263 +876,23 @@ def _delete_update_schedule_serialize( _path_params["serverId"] = server_id if schedule_id is not None: _path_params["scheduleId"] = schedule_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # authentication setting - _auth_settings: List[str] = [] - - return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}/update-schedules/{scheduleId}", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def disable_service( - self, - project_id: Annotated[StrictStr, Field(description="project id")], - server_id: Annotated[StrictStr, Field(description="server id")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """(Deprecated) disable update service - - - :param project_id: project id (required) - :type project_id: str - :param server_id: server id (required) - :type server_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 docstring might be too long - warnings.warn("DELETE /v1/projects/{projectId}/servers/{serverId} is deprecated.", DeprecationWarning) - - _param = self._disable_service_serialize( - project_id=project_id, - server_id=server_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": None, - "401": None, - "404": None, - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def disable_service_with_http_info( - self, - project_id: Annotated[StrictStr, Field(description="project id")], - server_id: Annotated[StrictStr, Field(description="server id")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """(Deprecated) disable update service - - - :param project_id: project id (required) - :type project_id: str - :param server_id: server id (required) - :type server_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 docstring might be too long - warnings.warn("DELETE /v1/projects/{projectId}/servers/{serverId} is deprecated.", DeprecationWarning) - - _param = self._disable_service_serialize( - project_id=project_id, - server_id=server_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": None, - "401": None, - "404": None, - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def disable_service_without_preload_content( - self, - project_id: Annotated[StrictStr, Field(description="project id")], - server_id: Annotated[StrictStr, Field(description="server id")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """(Deprecated) disable update service - - - :param project_id: project id (required) - :type project_id: str - :param server_id: server id (required) - :type server_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 docstring might be too long - warnings.warn("DELETE /v1/projects/{projectId}/servers/{serverId} is deprecated.", DeprecationWarning) - - _param = self._disable_service_serialize( - project_id=project_id, - server_id=server_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": None, - "401": None, - "404": None, - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - return response_data.response - - def _disable_service_serialize( - self, - project_id, - server_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/update-schedules/{scheduleId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1109,6 +910,7 @@ def disable_service_resource( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1126,6 +928,8 @@ def disable_service_resource( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1151,6 +955,7 @@ def disable_service_resource( _param = self._disable_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1160,7 +965,7 @@ def disable_service_resource( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1175,6 +980,7 @@ def disable_service_resource_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1192,6 +998,8 @@ def disable_service_resource_with_http_info( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1217,6 +1025,7 @@ def disable_service_resource_with_http_info( _param = self._disable_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1226,7 +1035,7 @@ def disable_service_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1241,6 +1050,7 @@ def disable_service_resource_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1258,6 +1068,8 @@ def disable_service_resource_without_preload_content( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1283,6 +1095,7 @@ def disable_service_resource_without_preload_content( _param = self._disable_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1292,7 +1105,7 @@ def disable_service_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1302,6 +1115,7 @@ def _disable_service_resource_serialize( self, project_id, server_id, + region, _request_auth, _content_type, _headers, @@ -1324,286 +1138,23 @@ def _disable_service_resource_serialize( _path_params["projectId"] = project_id if server_id is not None: _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # authentication setting - _auth_settings: List[str] = [] - - return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}/service", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def enable_service( - self, - project_id: Annotated[StrictStr, Field(description="project id")], - server_id: Annotated[StrictStr, Field(description="server id")], - enable_service_payload: Optional[EnableServicePayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """(Deprecated) enable update service - - - :param project_id: project id (required) - :type project_id: str - :param server_id: server id (required) - :type server_id: str - :param enable_service_payload: - :type enable_service_payload: EnableServicePayload - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 docstring might be too long - warnings.warn("POST /v1/projects/{projectId}/servers/{serverId} is deprecated.", DeprecationWarning) - - _param = self._enable_service_serialize( - project_id=project_id, - server_id=server_id, - enable_service_payload=enable_service_payload, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": None, - "401": None, - "404": None, - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def enable_service_with_http_info( - self, - project_id: Annotated[StrictStr, Field(description="project id")], - server_id: Annotated[StrictStr, Field(description="server id")], - enable_service_payload: Optional[EnableServicePayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """(Deprecated) enable update service - - - :param project_id: project id (required) - :type project_id: str - :param server_id: server id (required) - :type server_id: str - :param enable_service_payload: - :type enable_service_payload: EnableServicePayload - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 docstring might be too long - warnings.warn("POST /v1/projects/{projectId}/servers/{serverId} is deprecated.", DeprecationWarning) - - _param = self._enable_service_serialize( - project_id=project_id, - server_id=server_id, - enable_service_payload=enable_service_payload, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": None, - "401": None, - "404": None, - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def enable_service_without_preload_content( - self, - project_id: Annotated[StrictStr, Field(description="project id")], - server_id: Annotated[StrictStr, Field(description="server id")], - enable_service_payload: Optional[EnableServicePayload] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """(Deprecated) enable update service - - - :param project_id: project id (required) - :type project_id: str - :param server_id: server id (required) - :type server_id: str - :param enable_service_payload: - :type enable_service_payload: EnableServicePayload - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 docstring might be too long - warnings.warn("POST /v1/projects/{projectId}/servers/{serverId} is deprecated.", DeprecationWarning) - - _param = self._enable_service_serialize( - project_id=project_id, - server_id=server_id, - enable_service_payload=enable_service_payload, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "204": None, - "400": None, - "401": None, - "404": None, - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - return response_data.response - - def _enable_service_serialize( - self, - project_id, - server_id, - enable_service_payload, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if enable_service_payload is not None: - _body_params = enable_service_payload - - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}", + method="DELETE", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1621,6 +1172,7 @@ def enable_service_resource( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], enable_service_resource_payload: Optional[EnableServiceResourcePayload] = None, _request_timeout: Union[ None, @@ -1639,6 +1191,8 @@ def enable_service_resource( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param enable_service_resource_payload: :type enable_service_resource_payload: EnableServiceResourcePayload :param _request_timeout: timeout setting for this request. If one @@ -1666,6 +1220,7 @@ def enable_service_resource( _param = self._enable_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, enable_service_resource_payload=enable_service_resource_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -1676,7 +1231,7 @@ def enable_service_resource( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1691,6 +1246,7 @@ def enable_service_resource_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], enable_service_resource_payload: Optional[EnableServiceResourcePayload] = None, _request_timeout: Union[ None, @@ -1709,6 +1265,8 @@ def enable_service_resource_with_http_info( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param enable_service_resource_payload: :type enable_service_resource_payload: EnableServiceResourcePayload :param _request_timeout: timeout setting for this request. If one @@ -1736,6 +1294,7 @@ def enable_service_resource_with_http_info( _param = self._enable_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, enable_service_resource_payload=enable_service_resource_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -1746,7 +1305,7 @@ def enable_service_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1761,6 +1320,7 @@ def enable_service_resource_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], enable_service_resource_payload: Optional[EnableServiceResourcePayload] = None, _request_timeout: Union[ None, @@ -1779,6 +1339,8 @@ def enable_service_resource_without_preload_content( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param enable_service_resource_payload: :type enable_service_resource_payload: EnableServiceResourcePayload :param _request_timeout: timeout setting for this request. If one @@ -1806,6 +1368,7 @@ def enable_service_resource_without_preload_content( _param = self._enable_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, enable_service_resource_payload=enable_service_resource_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -1816,7 +1379,7 @@ def enable_service_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "204": None, "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1826,6 +1389,7 @@ def _enable_service_resource_serialize( self, project_id, server_id, + region, enable_service_resource_payload, _request_auth, _content_type, @@ -1849,6 +1413,8 @@ def _enable_service_resource_serialize( _path_params["projectId"] = project_id if server_id is not None: _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -1856,6 +1422,10 @@ def _enable_service_resource_serialize( if enable_service_resource_payload is not None: _body_params = enable_service_resource_payload + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` if _content_type: _header_params["Content-Type"] = _content_type @@ -1869,7 +1439,7 @@ def _enable_service_resource_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/service", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1887,6 +1457,7 @@ def get_service_resource( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1904,6 +1475,8 @@ def get_service_resource( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1929,6 +1502,7 @@ def get_service_resource( _param = self._get_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1938,7 +1512,7 @@ def get_service_resource( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdateServiceResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1953,6 +1527,7 @@ def get_service_resource_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1970,6 +1545,8 @@ def get_service_resource_with_http_info( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1995,6 +1572,7 @@ def get_service_resource_with_http_info( _param = self._get_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2004,7 +1582,7 @@ def get_service_resource_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdateServiceResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2019,6 +1597,7 @@ def get_service_resource_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2036,6 +1615,8 @@ def get_service_resource_without_preload_content( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2061,6 +1642,7 @@ def get_service_resource_without_preload_content( _param = self._get_service_resource_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2070,7 +1652,7 @@ def get_service_resource_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdateServiceResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2080,6 +1662,7 @@ def _get_service_resource_serialize( self, project_id, server_id, + region, _request_auth, _content_type, _headers, @@ -2102,6 +1685,8 @@ def _get_service_resource_serialize( _path_params["projectId"] = project_id if server_id is not None: _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2116,7 +1701,7 @@ def _get_service_resource_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/service", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/service", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2135,6 +1720,7 @@ def get_update( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], update_id: Annotated[StrictStr, Field(description="id of the update")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2154,6 +1740,8 @@ def get_update( :type server_id: str :param update_id: id of the update (required) :type update_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2180,6 +1768,7 @@ def get_update( project_id=project_id, server_id=server_id, update_id=update_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2189,7 +1778,7 @@ def get_update( _response_types_map: Dict[str, Optional[str]] = { "200": "Update", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2205,6 +1794,7 @@ def get_update_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], update_id: Annotated[StrictStr, Field(description="id of the update")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2224,6 +1814,8 @@ def get_update_with_http_info( :type server_id: str :param update_id: id of the update (required) :type update_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2250,6 +1842,7 @@ def get_update_with_http_info( project_id=project_id, server_id=server_id, update_id=update_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2259,7 +1852,7 @@ def get_update_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "Update", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2275,6 +1868,7 @@ def get_update_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], update_id: Annotated[StrictStr, Field(description="id of the update")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2294,6 +1888,8 @@ def get_update_without_preload_content( :type server_id: str :param update_id: id of the update (required) :type update_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2320,6 +1916,7 @@ def get_update_without_preload_content( project_id=project_id, server_id=server_id, update_id=update_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2329,7 +1926,7 @@ def get_update_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "Update", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2340,6 +1937,7 @@ def _get_update_serialize( project_id, server_id, update_id, + region, _request_auth, _content_type, _headers, @@ -2364,6 +1962,8 @@ def _get_update_serialize( _path_params["serverId"] = server_id if update_id is not None: _path_params["updateId"] = update_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2378,7 +1978,7 @@ def _get_update_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/updates/{updateId}", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/updates/{updateId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2397,6 +1997,7 @@ def get_update_schedule( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2416,6 +2017,8 @@ def get_update_schedule( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2442,6 +2045,7 @@ def get_update_schedule( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2451,7 +2055,7 @@ def get_update_schedule( _response_types_map: Dict[str, Optional[str]] = { "200": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2467,6 +2071,7 @@ def get_update_schedule_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2486,6 +2091,8 @@ def get_update_schedule_with_http_info( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2512,6 +2119,7 @@ def get_update_schedule_with_http_info( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2521,7 +2129,7 @@ def get_update_schedule_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2537,6 +2145,7 @@ def get_update_schedule_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2556,6 +2165,8 @@ def get_update_schedule_without_preload_content( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2582,6 +2193,7 @@ def get_update_schedule_without_preload_content( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2591,7 +2203,7 @@ def get_update_schedule_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2602,6 +2214,7 @@ def _get_update_schedule_serialize( project_id, server_id, schedule_id, + region, _request_auth, _content_type, _headers, @@ -2626,6 +2239,8 @@ def _get_update_schedule_serialize( _path_params["serverId"] = server_id if schedule_id is not None: _path_params["scheduleId"] = schedule_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2640,7 +2255,7 @@ def _get_update_schedule_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/update-schedules/{scheduleId}", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/update-schedules/{scheduleId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2705,6 +2320,7 @@ def list_update_policies( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdatePoliciesResponse", "400": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2766,6 +2382,7 @@ def list_update_policies_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdatePoliciesResponse", "400": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2827,6 +2444,7 @@ def list_update_policies_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdatePoliciesResponse", "400": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2869,7 +2487,7 @@ def _list_update_policies_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/update-policies", + resource_path="/v2/projects/{projectId}/update-policies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2887,6 +2505,7 @@ def list_update_schedules( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2904,6 +2523,8 @@ def list_update_schedules( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2929,6 +2550,7 @@ def list_update_schedules( _param = self._list_update_schedules_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2938,7 +2560,7 @@ def list_update_schedules( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdateSchedulesResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2953,6 +2575,7 @@ def list_update_schedules_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2970,6 +2593,8 @@ def list_update_schedules_with_http_info( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2995,6 +2620,7 @@ def list_update_schedules_with_http_info( _param = self._list_update_schedules_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3004,7 +2630,7 @@ def list_update_schedules_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdateSchedulesResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3019,6 +2645,7 @@ def list_update_schedules_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3036,6 +2663,8 @@ def list_update_schedules_without_preload_content( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3061,6 +2690,7 @@ def list_update_schedules_without_preload_content( _param = self._list_update_schedules_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3070,7 +2700,7 @@ def list_update_schedules_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdateSchedulesResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3080,6 +2710,7 @@ def _list_update_schedules_serialize( self, project_id, server_id, + region, _request_auth, _content_type, _headers, @@ -3102,6 +2733,8 @@ def _list_update_schedules_serialize( _path_params["projectId"] = project_id if server_id is not None: _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -3116,7 +2749,7 @@ def _list_update_schedules_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/update-schedules", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/update-schedules", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3134,6 +2767,7 @@ def list_updates( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3151,6 +2785,8 @@ def list_updates( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3176,6 +2812,7 @@ def list_updates( _param = self._list_updates_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3185,7 +2822,7 @@ def list_updates( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdatesListResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3200,6 +2837,7 @@ def list_updates_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3217,6 +2855,8 @@ def list_updates_with_http_info( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3242,6 +2882,7 @@ def list_updates_with_http_info( _param = self._list_updates_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3251,7 +2892,7 @@ def list_updates_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdatesListResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3266,6 +2907,7 @@ def list_updates_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], + region: Annotated[StrictStr, Field(description="region")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3283,6 +2925,8 @@ def list_updates_without_preload_content( :type project_id: str :param server_id: server id (required) :type server_id: str + :param region: region (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3308,6 +2952,7 @@ def list_updates_without_preload_content( _param = self._list_updates_serialize( project_id=project_id, server_id=server_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3317,7 +2962,7 @@ def list_updates_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUpdatesListResponse", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3327,6 +2972,7 @@ def _list_updates_serialize( self, project_id, server_id, + region, _request_auth, _content_type, _headers, @@ -3349,6 +2995,8 @@ def _list_updates_serialize( _path_params["projectId"] = project_id if server_id is not None: _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -3363,7 +3011,7 @@ def _list_updates_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/updates", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/updates", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3382,6 +3030,7 @@ def update_update_schedule( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], update_update_schedule_payload: Optional[UpdateUpdateSchedulePayload] = None, _request_timeout: Union[ None, @@ -3402,6 +3051,8 @@ def update_update_schedule( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param update_update_schedule_payload: :type update_update_schedule_payload: UpdateUpdateSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -3430,6 +3081,7 @@ def update_update_schedule( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, update_update_schedule_payload=update_update_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -3440,7 +3092,7 @@ def update_update_schedule( _response_types_map: Dict[str, Optional[str]] = { "200": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3456,6 +3108,7 @@ def update_update_schedule_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], update_update_schedule_payload: Optional[UpdateUpdateSchedulePayload] = None, _request_timeout: Union[ None, @@ -3476,6 +3129,8 @@ def update_update_schedule_with_http_info( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param update_update_schedule_payload: :type update_update_schedule_payload: UpdateUpdateSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -3504,6 +3159,7 @@ def update_update_schedule_with_http_info( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, update_update_schedule_payload=update_update_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -3514,7 +3170,7 @@ def update_update_schedule_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3530,6 +3186,7 @@ def update_update_schedule_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], server_id: Annotated[StrictStr, Field(description="server id")], schedule_id: Annotated[StrictStr, Field(description="update schedule id")], + region: Annotated[StrictStr, Field(description="region")], update_update_schedule_payload: Optional[UpdateUpdateSchedulePayload] = None, _request_timeout: Union[ None, @@ -3550,6 +3207,8 @@ def update_update_schedule_without_preload_content( :type server_id: str :param schedule_id: update schedule id (required) :type schedule_id: str + :param region: region (required) + :type region: str :param update_update_schedule_payload: :type update_update_schedule_payload: UpdateUpdateSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -3578,6 +3237,7 @@ def update_update_schedule_without_preload_content( project_id=project_id, server_id=server_id, schedule_id=schedule_id, + region=region, update_update_schedule_payload=update_update_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -3588,7 +3248,7 @@ def update_update_schedule_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "UpdateSchedule", "400": None, - "401": None, + "401": "ErrorResponse", "404": None, } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3599,6 +3259,7 @@ def _update_update_schedule_serialize( project_id, server_id, schedule_id, + region, update_update_schedule_payload, _request_auth, _content_type, @@ -3624,6 +3285,8 @@ def _update_update_schedule_serialize( _path_params["serverId"] = server_id if schedule_id is not None: _path_params["scheduleId"] = schedule_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -3648,7 +3311,7 @@ def _update_update_schedule_serialize( return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/servers/{serverId}/update-schedules/{scheduleId}", + resource_path="/v2/projects/{projectId}/regions/{region}/servers/{serverId}/update-schedules/{scheduleId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/services/serverupdate/src/stackit/serverupdate/api_client.py b/services/serverupdate/src/stackit/serverupdate/api_client.py index 00643328..0e92614b 100644 --- a/services/serverupdate/src/stackit/serverupdate/api_client.py +++ b/services/serverupdate/src/stackit/serverupdate/api_client.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/configuration.py b/services/serverupdate/src/stackit/serverupdate/configuration.py index cb286fc3..5f9dfbc7 100644 --- a/services/serverupdate/src/stackit/serverupdate/configuration.py +++ b/services/serverupdate/src/stackit/serverupdate/configuration.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,7 +33,7 @@ def __init__( ) """Constructor """ - self._base_path = "https://server-update.api.eu01.stackit.cloud" + self._base_path = "https://server-update.api.stackit.cloud" """Default Base url """ self.server_index = 0 if server_index is None else server_index @@ -57,13 +57,12 @@ def get_host_settings(self): """ return [ { - "url": "https://server-update.api.{region}stackit.cloud", + "url": "https://server-update.api.stackit.cloud", "description": "No description provided", "variables": { "region": { "description": "No description provided", - "default_value": "eu01.", - "enum_values": ["eu01."], + "default_value": "global", } }, } diff --git a/services/serverupdate/src/stackit/serverupdate/exceptions.py b/services/serverupdate/src/stackit/serverupdate/exceptions.py index 61004d5f..a60279c4 100644 --- a/services/serverupdate/src/stackit/serverupdate/exceptions.py +++ b/services/serverupdate/src/stackit/serverupdate/exceptions.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/__init__.py b/services/serverupdate/src/stackit/serverupdate/models/__init__.py index 8018a8a3..b9eec8cb 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/__init__.py +++ b/services/serverupdate/src/stackit/serverupdate/models/__init__.py @@ -6,7 +6,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,10 +19,10 @@ from stackit.serverupdate.models.create_update_schedule_payload import ( CreateUpdateSchedulePayload, ) -from stackit.serverupdate.models.enable_service_payload import EnableServicePayload from stackit.serverupdate.models.enable_service_resource_payload import ( EnableServiceResourcePayload, ) +from stackit.serverupdate.models.error_response import ErrorResponse from stackit.serverupdate.models.get_update_policies_response import ( GetUpdatePoliciesResponse, ) diff --git a/services/serverupdate/src/stackit/serverupdate/models/create_update_payload.py b/services/serverupdate/src/stackit/serverupdate/models/create_update_payload.py index 7f7b8293..ee988557 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/create_update_payload.py +++ b/services/serverupdate/src/stackit/serverupdate/models/create_update_payload.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/create_update_schedule_payload.py b/services/serverupdate/src/stackit/serverupdate/models/create_update_schedule_payload.py index bdc3bc0e..ff573ddd 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/create_update_schedule_payload.py +++ b/services/serverupdate/src/stackit/serverupdate/models/create_update_schedule_payload.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/enable_service_resource_payload.py b/services/serverupdate/src/stackit/serverupdate/models/enable_service_resource_payload.py index f16e90f9..5a4f8bdf 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/enable_service_resource_payload.py +++ b/services/serverupdate/src/stackit/serverupdate/models/enable_service_resource_payload.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/enable_service_payload.py b/services/serverupdate/src/stackit/serverupdate/models/error_response.py similarity index 77% rename from services/serverupdate/src/stackit/serverupdate/models/enable_service_payload.py rename to services/serverupdate/src/stackit/serverupdate/models/error_response.py index 5b0f255d..f3b89a6a 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/enable_service_payload.py +++ b/services/serverupdate/src/stackit/serverupdate/models/error_response.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,13 +22,16 @@ from typing_extensions import Self -class EnableServicePayload(BaseModel): +class ErrorResponse(BaseModel): """ - EnableServicePayload + ErrorResponse """ - update_policy_id: Optional[StrictStr] = Field(default=None, alias="updatePolicyId") - __properties: ClassVar[List[str]] = ["updatePolicyId"] + message: StrictStr = Field(description="Details about the error") + status: StrictStr = Field( + description="The string representation of the http status code (i.e. Not Found, Bad Request, etc)" + ) + __properties: ClassVar[List[str]] = ["message", "status"] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +50,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EnableServicePayload from a JSON string""" + """Create an instance of ErrorResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,12 +74,12 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EnableServicePayload from a dict""" + """Create an instance of ErrorResponse from a dict""" if obj is None: return None if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"updatePolicyId": obj.get("updatePolicyId")}) + _obj = cls.model_validate({"message": obj.get("message"), "status": obj.get("status")}) return _obj diff --git a/services/serverupdate/src/stackit/serverupdate/models/get_update_policies_response.py b/services/serverupdate/src/stackit/serverupdate/models/get_update_policies_response.py index 4ede96df..2a76ce6c 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/get_update_policies_response.py +++ b/services/serverupdate/src/stackit/serverupdate/models/get_update_policies_response.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/get_update_schedules_response.py b/services/serverupdate/src/stackit/serverupdate/models/get_update_schedules_response.py index c5b62191..c4e2c168 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/get_update_schedules_response.py +++ b/services/serverupdate/src/stackit/serverupdate/models/get_update_schedules_response.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/get_update_service_response.py b/services/serverupdate/src/stackit/serverupdate/models/get_update_service_response.py index 23a87478..eb44ea56 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/get_update_service_response.py +++ b/services/serverupdate/src/stackit/serverupdate/models/get_update_service_response.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/get_updates_list_response.py b/services/serverupdate/src/stackit/serverupdate/models/get_updates_list_response.py index ee0814c2..30ea367f 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/get_updates_list_response.py +++ b/services/serverupdate/src/stackit/serverupdate/models/get_updates_list_response.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/update.py b/services/serverupdate/src/stackit/serverupdate/models/update.py index d1cf38e2..cf466ed4 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/update.py +++ b/services/serverupdate/src/stackit/serverupdate/models/update.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/update_policy.py b/services/serverupdate/src/stackit/serverupdate/models/update_policy.py index 36c17dc3..edc318d6 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/update_policy.py +++ b/services/serverupdate/src/stackit/serverupdate/models/update_policy.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/update_schedule.py b/services/serverupdate/src/stackit/serverupdate/models/update_schedule.py index 533942fe..3abd5c00 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/update_schedule.py +++ b/services/serverupdate/src/stackit/serverupdate/models/update_schedule.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/update_schedule_create_request.py b/services/serverupdate/src/stackit/serverupdate/models/update_schedule_create_request.py index e9c7799e..a78ac8f9 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/update_schedule_create_request.py +++ b/services/serverupdate/src/stackit/serverupdate/models/update_schedule_create_request.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/models/update_update_schedule_payload.py b/services/serverupdate/src/stackit/serverupdate/models/update_update_schedule_payload.py index 91436fce..db85baa6 100644 --- a/services/serverupdate/src/stackit/serverupdate/models/update_update_schedule_payload.py +++ b/services/serverupdate/src/stackit/serverupdate/models/update_update_schedule_payload.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/serverupdate/src/stackit/serverupdate/rest.py b/services/serverupdate/src/stackit/serverupdate/rest.py index ccc4fc56..42a57625 100644 --- a/services/serverupdate/src/stackit/serverupdate/rest.py +++ b/services/serverupdate/src/stackit/serverupdate/rest.py @@ -5,7 +5,7 @@ API endpoints for Server Update Operations on STACKIT Servers. - The version of the OpenAPI document: 1.0 + The version of the OpenAPI document: 2.0 Contact: support@stackit.de Generated by OpenAPI Generator (https://openapi-generator.tech)