diff --git a/services/rabbitmq/oas_commit b/services/rabbitmq/oas_commit index 46f709a50..2ea6d59b0 100644 --- a/services/rabbitmq/oas_commit +++ b/services/rabbitmq/oas_commit @@ -1 +1 @@ -7db6460b25eee93a646427ec41a08f06d75615d3 +24dbfc40a5c0e07440476abb6b64d76219f9b2c7 diff --git a/services/rabbitmq/src/stackit/rabbitmq/__init__.py b/services/rabbitmq/src/stackit/rabbitmq/__init__.py index 4a07e92ec..b0f6832ff 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/__init__.py +++ b/services/rabbitmq/src/stackit/rabbitmq/__init__.py @@ -7,7 +7,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -38,6 +38,7 @@ "CredentialsResponse", "Error", "GetMetricsResponse", + "GetUpdatesResponse", "Instance", "InstanceLastOperation", "InstanceParameters", @@ -55,6 +56,8 @@ "TriggerRestoreResponse", "UpdateBackupsConfigPayload", "UpdateBackupsConfigResponse", + "UpdateUpdatesSettingsPayload", + "UpdateUpdatesSettingsResponse", ] # import apis into sdk package @@ -99,6 +102,9 @@ from stackit.rabbitmq.models.get_metrics_response import ( GetMetricsResponse as GetMetricsResponse, ) +from stackit.rabbitmq.models.get_updates_response import ( + GetUpdatesResponse as GetUpdatesResponse, +) from stackit.rabbitmq.models.instance import Instance as Instance from stackit.rabbitmq.models.instance_last_operation import ( InstanceLastOperation as InstanceLastOperation, @@ -136,3 +142,9 @@ from stackit.rabbitmq.models.update_backups_config_response import ( UpdateBackupsConfigResponse as UpdateBackupsConfigResponse, ) +from stackit.rabbitmq.models.update_updates_settings_payload import ( + UpdateUpdatesSettingsPayload as UpdateUpdatesSettingsPayload, +) +from stackit.rabbitmq.models.update_updates_settings_response import ( + UpdateUpdatesSettingsResponse as UpdateUpdatesSettingsResponse, +) diff --git a/services/rabbitmq/src/stackit/rabbitmq/api/default_api.py b/services/rabbitmq/src/stackit/rabbitmq/api/default_api.py index b40ea96d2..b4fc5b2a2 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/api/default_api.py +++ b/services/rabbitmq/src/stackit/rabbitmq/api/default_api.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -32,6 +32,7 @@ from stackit.rabbitmq.models.create_instance_response import CreateInstanceResponse from stackit.rabbitmq.models.credentials_response import CredentialsResponse from stackit.rabbitmq.models.get_metrics_response import GetMetricsResponse +from stackit.rabbitmq.models.get_updates_response import GetUpdatesResponse from stackit.rabbitmq.models.instance import Instance from stackit.rabbitmq.models.list_credentials_response import ListCredentialsResponse from stackit.rabbitmq.models.list_instances_response import ListInstancesResponse @@ -47,6 +48,12 @@ from stackit.rabbitmq.models.update_backups_config_response import ( UpdateBackupsConfigResponse, ) +from stackit.rabbitmq.models.update_updates_settings_payload import ( + UpdateUpdatesSettingsPayload, +) +from stackit.rabbitmq.models.update_updates_settings_response import ( + UpdateUpdatesSettingsResponse, +) from stackit.rabbitmq.rest import RESTResponseType @@ -2535,6 +2542,277 @@ def _get_metrics_serialize( _request_auth=_request_auth, ) + @validate_call + def get_updates( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance 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, + ) -> GetUpdatesResponse: + """get update settings + + Returns whether automatic updates are enabled and the number of available updates. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_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 + + _param = self._get_updates_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetUpdatesResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + 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 get_updates_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance 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[GetUpdatesResponse]: + """get update settings + + Returns whether automatic updates are enabled and the number of available updates. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_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 + + _param = self._get_updates_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetUpdatesResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + 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 get_updates_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance 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: + """get update settings + + Returns whether automatic updates are enabled and the number of available updates. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_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 + + _param = self._get_updates_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "GetUpdatesResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _get_updates_serialize( + self, + project_id, + region_id, + instance_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, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region_id is not None: + _path_params["regionId"] = region_id + if instance_id is not None: + _path_params["instanceId"] = instance_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="GET", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates", + 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 list_backups( self, @@ -4938,12 +5216,361 @@ def _trigger_restore_serialize( ) @validate_call - def update_backups_config( + def trigger_update( self, project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], region_id: Annotated[StrictStr, Field(description="region in which the project resides")], instance_id: Annotated[StrictStr, Field(description="Instance id")], - update_backups_config_payload: Annotated[ + _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, + ) -> CreateInstanceResponse: + """start updates + + Starts all available updates asynchronously using the instance's service offering. No request body is required. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_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 + + _param = self._trigger_update_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "CreateInstanceResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + 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 trigger_update_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance 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[CreateInstanceResponse]: + """start updates + + Starts all available updates asynchronously using the instance's service offering. No request body is required. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_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 + + _param = self._trigger_update_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "CreateInstanceResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + 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 trigger_update_without_preload_content( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance 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: + """start updates + + Starts all available updates asynchronously using the instance's service offering. No request body is required. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_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 + + _param = self._trigger_update_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "CreateInstanceResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _trigger_update_serialize( + self, + project_id, + region_id, + instance_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, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region_id is not None: + _path_params["regionId"] = region_id + if instance_id is not None: + _path_params["instanceId"] = instance_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="POST", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates/start", + 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 update_backups_config( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance id")], + update_backups_config_payload: Annotated[ + UpdateBackupsConfigPayload, Field(description="Parameters for the requested backup configuration update") + ], + _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, + ) -> UpdateBackupsConfigResponse: + """backups configuration update + + Update the configuration for backups for your instance. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_id: str + :param update_backups_config_payload: Parameters for the requested backup configuration update (required) + :type update_backups_config_payload: UpdateBackupsConfigPayload + :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 + + _param = self._update_backups_config_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + update_backups_config_payload=update_backups_config_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "UpdateBackupsConfigResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "500": "Error", + } + 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 update_backups_config_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance id")], + update_backups_config_payload: Annotated[ UpdateBackupsConfigPayload, Field(description="Parameters for the requested backup configuration update") ], _request_timeout: Union[ @@ -4955,7 +5582,7 @@ def update_backups_config( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UpdateBackupsConfigResponse: + ) -> ApiResponse[UpdateBackupsConfigResponse]: """backups configuration update Update the configuration for backups for your instance. @@ -5013,10 +5640,10 @@ def update_backups_config( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call - def update_backups_config_with_http_info( + def update_backups_config_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], region_id: Annotated[StrictStr, Field(description="region in which the project resides")], @@ -5033,7 +5660,7 @@ def update_backups_config_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UpdateBackupsConfigResponse]: + ) -> RESTResponseType: """backups configuration update Update the configuration for backups for your instance. @@ -5087,6 +5714,223 @@ def update_backups_config_with_http_info( "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _update_backups_config_serialize( + self, + project_id, + region_id, + instance_id, + update_backups_config_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, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region_id is not None: + _path_params["regionId"] = region_id + if instance_id is not None: + _path_params["instanceId"] = instance_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if update_backups_config_payload is not None: + _body_params = update_backups_config_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 + 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 + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="PATCH", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups-config", + 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 update_updates_settings( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance id")], + update_updates_settings_payload: UpdateUpdatesSettingsPayload, + _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, + ) -> UpdateUpdatesSettingsResponse: + """update update settings + + Enables or disables automatic updates. The platform operator must allow changing this setting. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_id: str + :param update_updates_settings_payload: (required) + :type update_updates_settings_payload: UpdateUpdatesSettingsPayload + :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 + + _param = self._update_updates_settings_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + update_updates_settings_payload=update_updates_settings_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "UpdateUpdatesSettingsResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + 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 update_updates_settings_with_http_info( + self, + project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], + region_id: Annotated[StrictStr, Field(description="region in which the project resides")], + instance_id: Annotated[StrictStr, Field(description="Instance id")], + update_updates_settings_payload: UpdateUpdatesSettingsPayload, + _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[UpdateUpdatesSettingsResponse]: + """update update settings + + Enables or disables automatic updates. The platform operator must allow changing this setting. + + :param project_id: Project id on which user has permissions (required) + :type project_id: str + :param region_id: region in which the project resides (required) + :type region_id: str + :param instance_id: Instance id (required) + :type instance_id: str + :param update_updates_settings_payload: (required) + :type update_updates_settings_payload: UpdateUpdatesSettingsPayload + :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 + + _param = self._update_updates_settings_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + update_updates_settings_payload=update_updates_settings_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "UpdateUpdatesSettingsResponse", + "400": "Error", + "401": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + 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, @@ -5094,14 +5938,12 @@ def update_backups_config_with_http_info( ) @validate_call - def update_backups_config_without_preload_content( + def update_updates_settings_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="Project id on which user has permissions")], region_id: Annotated[StrictStr, Field(description="region in which the project resides")], instance_id: Annotated[StrictStr, Field(description="Instance id")], - update_backups_config_payload: Annotated[ - UpdateBackupsConfigPayload, Field(description="Parameters for the requested backup configuration update") - ], + update_updates_settings_payload: UpdateUpdatesSettingsPayload, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5112,9 +5954,9 @@ def update_backups_config_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """backups configuration update + """update update settings - Update the configuration for backups for your instance. + Enables or disables automatic updates. The platform operator must allow changing this setting. :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -5122,8 +5964,8 @@ def update_backups_config_without_preload_content( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str - :param update_backups_config_payload: Parameters for the requested backup configuration update (required) - :type update_backups_config_payload: UpdateBackupsConfigPayload + :param update_updates_settings_payload: (required) + :type update_updates_settings_payload: UpdateUpdatesSettingsPayload :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 @@ -5146,11 +5988,11 @@ def update_backups_config_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_backups_config_serialize( + _param = self._update_updates_settings_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, - update_backups_config_payload=update_backups_config_payload, + update_updates_settings_payload=update_updates_settings_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5158,21 +6000,22 @@ def update_backups_config_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateBackupsConfigResponse", + "200": "UpdateUpdatesSettingsResponse", "400": "Error", "401": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_backups_config_serialize( + def _update_updates_settings_serialize( self, project_id, region_id, instance_id, - update_backups_config_payload, + update_updates_settings_payload, _request_auth, _content_type, _headers, @@ -5201,8 +6044,8 @@ def _update_backups_config_serialize( # process the header parameters # process the form parameters # process the body parameter - if update_backups_config_payload is not None: - _body_params = update_backups_config_payload + if update_updates_settings_payload is not None: + _body_params = update_updates_settings_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -5221,7 +6064,7 @@ def _update_backups_config_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups-config", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/services/rabbitmq/src/stackit/rabbitmq/api_client.py b/services/rabbitmq/src/stackit/rabbitmq/api_client.py index 25a0e38f4..22af6c4f6 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/api_client.py +++ b/services/rabbitmq/src/stackit/rabbitmq/api_client.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/configuration.py b/services/rabbitmq/src/stackit/rabbitmq/configuration.py index e3cca86b4..811fd1e3a 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/configuration.py +++ b/services/rabbitmq/src/stackit/rabbitmq/configuration.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/exceptions.py b/services/rabbitmq/src/stackit/rabbitmq/exceptions.py index 401a04a8a..d6a330f22 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/exceptions.py +++ b/services/rabbitmq/src/stackit/rabbitmq/exceptions.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/__init__.py b/services/rabbitmq/src/stackit/rabbitmq/models/__init__.py index de448a8a6..20f548b73 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/__init__.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/__init__.py @@ -6,7 +6,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -24,6 +24,7 @@ from stackit.rabbitmq.models.credentials_response import CredentialsResponse from stackit.rabbitmq.models.error import Error from stackit.rabbitmq.models.get_metrics_response import GetMetricsResponse +from stackit.rabbitmq.models.get_updates_response import GetUpdatesResponse from stackit.rabbitmq.models.instance import Instance from stackit.rabbitmq.models.instance_last_operation import InstanceLastOperation from stackit.rabbitmq.models.instance_parameters import InstanceParameters @@ -47,3 +48,9 @@ from stackit.rabbitmq.models.update_backups_config_response import ( UpdateBackupsConfigResponse, ) +from stackit.rabbitmq.models.update_updates_settings_payload import ( + UpdateUpdatesSettingsPayload, +) +from stackit.rabbitmq.models.update_updates_settings_response import ( + UpdateUpdatesSettingsResponse, +) diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/backup.py b/services/rabbitmq/src/stackit/rabbitmq/models/backup.py index 227e2e7df..82ddee854 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/backup.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/backup.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/create_backup_response_item.py b/services/rabbitmq/src/stackit/rabbitmq/models/create_backup_response_item.py index 08c13ecb4..7f075d46e 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/create_backup_response_item.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/create_backup_response_item.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/create_credentials_payload.py b/services/rabbitmq/src/stackit/rabbitmq/models/create_credentials_payload.py index 42cd33e9b..92fc066ff 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/create_credentials_payload.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/create_credentials_payload.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/create_instance_payload.py b/services/rabbitmq/src/stackit/rabbitmq/models/create_instance_payload.py index 6bfd3548a..e3e2900e8 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/create_instance_payload.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/create_instance_payload.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/create_instance_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/create_instance_response.py index 4a66b42c8..499be324c 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/create_instance_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/create_instance_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/credentials.py b/services/rabbitmq/src/stackit/rabbitmq/models/credentials.py index e9473660a..3c13ef498 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/credentials.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/credentials.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/credentials_list_item.py b/services/rabbitmq/src/stackit/rabbitmq/models/credentials_list_item.py index 1352e381f..e54f9c1c6 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/credentials_list_item.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/credentials_list_item.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/credentials_parameters.py b/services/rabbitmq/src/stackit/rabbitmq/models/credentials_parameters.py index d136da2a6..f92cb23e6 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/credentials_parameters.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/credentials_parameters.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/credentials_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/credentials_response.py index b48c494ce..c544b9528 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/credentials_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/credentials_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/error.py b/services/rabbitmq/src/stackit/rabbitmq/models/error.py index b9f5b338c..d94c27487 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/error.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/error.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/get_metrics_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/get_metrics_response.py index f6c3d9457..f3f359099 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/get_metrics_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/get_metrics_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/get_updates_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/get_updates_response.py new file mode 100644 index 000000000..7893768f3 --- /dev/null +++ b/services/rabbitmq/src/stackit/rabbitmq/models/get_updates_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +STACKIT RabbitMQ API + +The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. + +The version of the OpenAPI document: 2.3.1 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic_core import to_jsonable_python +from typing_extensions import Annotated, Self + + +class GetUpdatesResponse(BaseModel): + """ + GetUpdatesResponse + """ # noqa: E501 + + automatic_updates_enabled: StrictBool = Field( + description="Whether automatic updates are allowed.", alias="automaticUpdatesEnabled" + ) + available_updates: Annotated[int, Field(strict=True, ge=0)] = Field( + description="Number of available update components.", alias="availableUpdates" + ) + __properties: ClassVar[List[str]] = ["automaticUpdatesEnabled", "availableUpdates"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetUpdatesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetUpdatesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "automaticUpdatesEnabled": obj.get("automaticUpdatesEnabled"), + "availableUpdates": obj.get("availableUpdates"), + } + ) + return _obj diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/instance.py b/services/rabbitmq/src/stackit/rabbitmq/models/instance.py index 7f6806bbe..e4233101e 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/instance.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/instance.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -35,6 +35,9 @@ class Instance(BaseModel): dashboard_url: StrictStr = Field(alias="dashboardUrl") image_url: StrictStr = Field(alias="imageUrl") instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") + instance_status: Optional[StrictStr] = Field( + default=None, description="Current state of a service instance", alias="instanceStatus" + ) last_operation: InstanceLastOperation = Field(alias="lastOperation") name: StrictStr offering_name: StrictStr = Field(alias="offeringName") @@ -42,7 +45,7 @@ class Instance(BaseModel): parameters: Dict[str, Any] plan_id: StrictStr = Field(alias="planId") plan_name: StrictStr = Field(alias="planName") - status: Optional[StrictStr] = None + status: Optional[StrictStr] = Field(default=None, description="State of the last operation and this instance") __properties: ClassVar[List[str]] = [ "cfGuid", "cfOrganizationGuid", @@ -50,6 +53,7 @@ class Instance(BaseModel): "dashboardUrl", "imageUrl", "instanceId", + "instanceStatus", "lastOperation", "name", "offeringName", @@ -60,6 +64,18 @@ class Instance(BaseModel): "status", ] + @field_validator("instance_status") + def instance_status_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(["provisioned", "available", "deleted", "deploying", "failed", "stopped", "unknown"]): + raise ValueError( + "must be one of enum values ('provisioned', 'available', 'deleted', 'deploying', 'failed', 'stopped', 'unknown')" + ) + return value + @field_validator("status") def status_validate_enum(cls, value): """Validates the enum""" @@ -131,6 +147,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "dashboardUrl": obj.get("dashboardUrl"), "imageUrl": obj.get("imageUrl"), "instanceId": obj.get("instanceId"), + "instanceStatus": obj.get("instanceStatus"), "lastOperation": ( InstanceLastOperation.from_dict(obj["lastOperation"]) if obj.get("lastOperation") is not None diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/instance_last_operation.py b/services/rabbitmq/src/stackit/rabbitmq/models/instance_last_operation.py index 707e2ceca..09cfd24a9 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/instance_last_operation.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/instance_last_operation.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/instance_parameters.py b/services/rabbitmq/src/stackit/rabbitmq/models/instance_parameters.py index 84e33c636..7c20dd58e 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/instance_parameters.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/instance_parameters.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/instance_schema.py b/services/rabbitmq/src/stackit/rabbitmq/models/instance_schema.py index 6b96c2b39..31040363c 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/instance_schema.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/instance_schema.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/list_credentials_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/list_credentials_response.py index 789b7483d..41ce22f51 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/list_credentials_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/list_credentials_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/list_instances_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/list_instances_response.py index 5b4692cdb..f0bd57bf5 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/list_instances_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/list_instances_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/list_offerings_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/list_offerings_response.py index 5538934cd..556d64097 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/list_offerings_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/list_offerings_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/list_restores_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/list_restores_response.py index a1e39034a..709bcf8bf 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/list_restores_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/list_restores_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/model_schema.py b/services/rabbitmq/src/stackit/rabbitmq/models/model_schema.py index 1c099b5fe..1d974cf7c 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/model_schema.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/model_schema.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/offering.py b/services/rabbitmq/src/stackit/rabbitmq/models/offering.py index 750d202f2..fe2e22ca8 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/offering.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/offering.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/partial_update_instance_payload.py b/services/rabbitmq/src/stackit/rabbitmq/models/partial_update_instance_payload.py index a1d0c7b8a..77577bf5e 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/partial_update_instance_payload.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/partial_update_instance_payload.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/plan.py b/services/rabbitmq/src/stackit/rabbitmq/models/plan.py index 9507d5270..201d2873b 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/plan.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/plan.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/raw_credentials.py b/services/rabbitmq/src/stackit/rabbitmq/models/raw_credentials.py index 99bfee490..d4aaf4ce2 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/raw_credentials.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/raw_credentials.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/restore.py b/services/rabbitmq/src/stackit/rabbitmq/models/restore.py index 12e4d152b..5d266ad43 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/restore.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/restore.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/trigger_restore_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/trigger_restore_response.py index fe0475503..6cfbc4e42 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/trigger_restore_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/trigger_restore_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/update_backups_config_payload.py b/services/rabbitmq/src/stackit/rabbitmq/models/update_backups_config_payload.py index ca10f33f3..2b1655b57 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/update_backups_config_payload.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/update_backups_config_payload.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/update_backups_config_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/update_backups_config_response.py index 144904442..8e89cb7fa 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/models/update_backups_config_response.py +++ b/services/rabbitmq/src/stackit/rabbitmq/models/update_backups_config_response.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/update_updates_settings_payload.py b/services/rabbitmq/src/stackit/rabbitmq/models/update_updates_settings_payload.py new file mode 100644 index 000000000..c18290f7e --- /dev/null +++ b/services/rabbitmq/src/stackit/rabbitmq/models/update_updates_settings_payload.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +STACKIT RabbitMQ API + +The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. + +The version of the OpenAPI document: 2.3.1 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class UpdateUpdatesSettingsPayload(BaseModel): + """ + UpdateUpdatesSettingsPayload + """ # noqa: E501 + + automatic_updates_enabled: StrictBool = Field( + description="Set to true to enable automatic updates or false to disable them.", alias="automaticUpdatesEnabled" + ) + __properties: ClassVar[List[str]] = ["automaticUpdatesEnabled"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateUpdatesSettingsPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateUpdatesSettingsPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"automaticUpdatesEnabled": obj.get("automaticUpdatesEnabled")}) + return _obj diff --git a/services/rabbitmq/src/stackit/rabbitmq/models/update_updates_settings_response.py b/services/rabbitmq/src/stackit/rabbitmq/models/update_updates_settings_response.py new file mode 100644 index 000000000..20532d9ba --- /dev/null +++ b/services/rabbitmq/src/stackit/rabbitmq/models/update_updates_settings_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +STACKIT RabbitMQ API + +The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. + +The version of the OpenAPI document: 2.3.1 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic_core import to_jsonable_python +from typing_extensions import Self + + +class UpdateUpdatesSettingsResponse(BaseModel): + """ + UpdateUpdatesSettingsResponse + """ # noqa: E501 + + automatic_updates_enabled: StrictBool = Field( + description="Whether automatic updates are allowed.", alias="automaticUpdatesEnabled" + ) + __properties: ClassVar[List[str]] = ["automaticUpdatesEnabled"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateUpdatesSettingsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateUpdatesSettingsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"automaticUpdatesEnabled": obj.get("automaticUpdatesEnabled")}) + return _obj diff --git a/services/rabbitmq/src/stackit/rabbitmq/rest.py b/services/rabbitmq/src/stackit/rabbitmq/rest.py index 31bdc99ba..729ddb418 100644 --- a/services/rabbitmq/src/stackit/rabbitmq/rest.py +++ b/services/rabbitmq/src/stackit/rabbitmq/rest.py @@ -5,7 +5,7 @@ The STACKIT RabbitMQ API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.3.0 +The version of the OpenAPI document: 2.3.1 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually.