From 9f5074fe31ef23d555139c60161606a347a6a582 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Fri, 16 Oct 2026 09:41:12 +0000 Subject: [PATCH] Generate redis --- services/redis/oas_commit | 2 +- services/redis/src/stackit/redis/__init__.py | 18 +- .../src/stackit/redis/api/default_api.py | 1475 +++++++++++++---- .../redis/src/stackit/redis/api_client.py | 6 +- .../redis/src/stackit/redis/configuration.py | 6 +- .../redis/src/stackit/redis/exceptions.py | 6 +- .../src/stackit/redis/models/__init__.py | 13 +- .../redis/src/stackit/redis/models/backup.py | 6 +- .../models/create_backup_response_item.py | 6 +- .../models/create_credentials_payload.py | 6 +- .../redis/models/create_instance_payload.py | 6 +- .../redis/models/create_instance_response.py | 6 +- .../src/stackit/redis/models/credentials.py | 6 +- .../redis/models/credentials_list_item.py | 6 +- .../redis/models/credentials_response.py | 6 +- .../redis/src/stackit/redis/models/error.py | 6 +- .../redis/models/get_metrics_response.py | 6 +- .../redis/models/get_updates_response.py | 92 + .../src/stackit/redis/models/instance.py | 25 +- .../redis/models/instance_last_operation.py | 6 +- .../redis/models/instance_parameters.py | 6 +- .../stackit/redis/models/instance_schema.py | 6 +- .../redis/models/list_credentials_response.py | 6 +- .../redis/models/list_instances_response.py | 6 +- .../redis/models/list_offerings_response.py | 6 +- .../redis/models/list_restores_response.py | 6 +- .../src/stackit/redis/models/model_schema.py | 6 +- .../src/stackit/redis/models/offering.py | 6 +- .../models/partial_update_instance_payload.py | 6 +- .../redis/src/stackit/redis/models/plan.py | 6 +- .../stackit/redis/models/raw_credentials.py | 6 +- .../redis/src/stackit/redis/models/restore.py | 6 +- .../redis/models/trigger_restore_response.py | 6 +- .../models/update_backups_config_payload.py | 6 +- .../models/update_backups_config_response.py | 6 +- .../models/update_updates_settings_payload.py | 84 + .../update_updates_settings_response.py | 84 + services/redis/src/stackit/redis/rest.py | 6 +- 38 files changed, 1574 insertions(+), 399 deletions(-) create mode 100644 services/redis/src/stackit/redis/models/get_updates_response.py create mode 100644 services/redis/src/stackit/redis/models/update_updates_settings_payload.py create mode 100644 services/redis/src/stackit/redis/models/update_updates_settings_response.py diff --git a/services/redis/oas_commit b/services/redis/oas_commit index 3df2932d2..2ea6d59b0 100644 --- a/services/redis/oas_commit +++ b/services/redis/oas_commit @@ -1 +1 @@ -1fdef398bea59d49731a7d9ac39394ba5b6bb72c +24dbfc40a5c0e07440476abb6b64d76219f9b2c7 diff --git a/services/redis/src/stackit/redis/__init__.py b/services/redis/src/stackit/redis/__init__.py index a8e5263af..c4542c099 100644 --- a/services/redis/src/stackit/redis/__init__.py +++ b/services/redis/src/stackit/redis/__init__.py @@ -3,11 +3,11 @@ # flake8: noqa """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -37,6 +37,7 @@ "CredentialsResponse", "Error", "GetMetricsResponse", + "GetUpdatesResponse", "Instance", "InstanceLastOperation", "InstanceParameters", @@ -54,6 +55,8 @@ "TriggerRestoreResponse", "UpdateBackupsConfigPayload", "UpdateBackupsConfigResponse", + "UpdateUpdatesSettingsPayload", + "UpdateUpdatesSettingsResponse", ] # import apis into sdk package @@ -95,6 +98,9 @@ from stackit.redis.models.get_metrics_response import ( GetMetricsResponse as GetMetricsResponse, ) +from stackit.redis.models.get_updates_response import ( + GetUpdatesResponse as GetUpdatesResponse, +) from stackit.redis.models.instance import Instance as Instance from stackit.redis.models.instance_last_operation import ( InstanceLastOperation as InstanceLastOperation, @@ -132,3 +138,9 @@ from stackit.redis.models.update_backups_config_response import ( UpdateBackupsConfigResponse as UpdateBackupsConfigResponse, ) +from stackit.redis.models.update_updates_settings_payload import ( + UpdateUpdatesSettingsPayload as UpdateUpdatesSettingsPayload, +) +from stackit.redis.models.update_updates_settings_response import ( + UpdateUpdatesSettingsResponse as UpdateUpdatesSettingsResponse, +) diff --git a/services/redis/src/stackit/redis/api/default_api.py b/services/redis/src/stackit/redis/api/default_api.py index 72d0fad43..4ad564357 100644 --- a/services/redis/src/stackit/redis/api/default_api.py +++ b/services/redis/src/stackit/redis/api/default_api.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -33,6 +33,7 @@ from stackit.redis.models.create_instance_response import CreateInstanceResponse from stackit.redis.models.credentials_response import CredentialsResponse from stackit.redis.models.get_metrics_response import GetMetricsResponse +from stackit.redis.models.get_updates_response import GetUpdatesResponse from stackit.redis.models.instance import Instance from stackit.redis.models.list_credentials_response import ListCredentialsResponse from stackit.redis.models.list_instances_response import ListInstancesResponse @@ -48,6 +49,12 @@ from stackit.redis.models.update_backups_config_response import ( UpdateBackupsConfigResponse, ) +from stackit.redis.models.update_updates_settings_payload import ( + UpdateUpdatesSettingsPayload, +) +from stackit.redis.models.update_updates_settings_response import ( + UpdateUpdatesSettingsResponse, +) from stackit.redis.rest import RESTResponseType @@ -2633,7 +2640,7 @@ def _get_metrics_serialize( ) @validate_call - def list_backups( + 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")], @@ -2647,9 +2654,10 @@ def list_backups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[Backup]: - """(Deprecated) get latest backup information for provided instanceId + ) -> GetUpdatesResponse: + """(Deprecated) 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 @@ -2679,11 +2687,11 @@ def list_backups( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups is deprecated.", + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates is deprecated.", DeprecationWarning, ) - _param = self._list_backups_serialize( + _param = self._get_updates_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -2694,10 +2702,12 @@ def list_backups( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "List[Backup]", + "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() @@ -2707,7 +2717,7 @@ def list_backups( ).data @validate_call - def list_backups_with_http_info( + 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")], @@ -2721,9 +2731,10 @@ def list_backups_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[List[Backup]]: - """(Deprecated) get latest backup information for provided instanceId + ) -> ApiResponse[GetUpdatesResponse]: + """(Deprecated) 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 @@ -2753,11 +2764,11 @@ def list_backups_with_http_info( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups is deprecated.", + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates is deprecated.", DeprecationWarning, ) - _param = self._list_backups_serialize( + _param = self._get_updates_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -2768,10 +2779,12 @@ def list_backups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "List[Backup]", + "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() @@ -2781,7 +2794,7 @@ def list_backups_with_http_info( ) @validate_call - def list_backups_without_preload_content( + 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")], @@ -2796,8 +2809,9 @@ def list_backups_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) get latest backup information for provided instanceId + """(Deprecated) 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 @@ -2827,11 +2841,11 @@ def list_backups_without_preload_content( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups is deprecated.", + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates is deprecated.", DeprecationWarning, ) - _param = self._list_backups_serialize( + _param = self._get_updates_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -2842,15 +2856,17 @@ def list_backups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "List[Backup]", + "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 _list_backups_serialize( + def _get_updates_serialize( self, project_id, region_id, @@ -2893,7 +2909,7 @@ def _list_backups_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2907,7 +2923,7 @@ def _list_backups_serialize( ) @validate_call - def list_credentials( + def list_backups( 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")], @@ -2921,10 +2937,9 @@ def list_credentials( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListCredentialsResponse: - """(Deprecated) get list of credentials ids + ) -> List[Backup]: + """(Deprecated) get latest backup information for provided instanceId - get list all credentials ids for instance :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -2954,11 +2969,11 @@ def list_credentials( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/credentials is deprecated.", + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups is deprecated.", DeprecationWarning, ) - _param = self._list_credentials_serialize( + _param = self._list_backups_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -2969,7 +2984,7 @@ def list_credentials( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsResponse", + "200": "List[Backup]", "400": "Error", "401": "Error", "404": "Error", @@ -2982,7 +2997,7 @@ def list_credentials( ).data @validate_call - def list_credentials_with_http_info( + def list_backups_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")], @@ -2996,10 +3011,9 @@ def list_credentials_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[ListCredentialsResponse]: - """(Deprecated) get list of credentials ids + ) -> ApiResponse[List[Backup]]: + """(Deprecated) get latest backup information for provided instanceId - get list all credentials ids for instance :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -3029,11 +3043,11 @@ def list_credentials_with_http_info( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/credentials is deprecated.", + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups is deprecated.", DeprecationWarning, ) - _param = self._list_credentials_serialize( + _param = self._list_backups_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -3044,7 +3058,7 @@ def list_credentials_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsResponse", + "200": "List[Backup]", "400": "Error", "401": "Error", "404": "Error", @@ -3057,7 +3071,7 @@ def list_credentials_with_http_info( ) @validate_call - def list_credentials_without_preload_content( + def list_backups_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")], @@ -3072,9 +3086,8 @@ def list_credentials_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) get list of credentials ids + """(Deprecated) get latest backup information for provided instanceId - get list all credentials ids for instance :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -3104,11 +3117,11 @@ def list_credentials_without_preload_content( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/credentials is deprecated.", + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups is deprecated.", DeprecationWarning, ) - _param = self._list_credentials_serialize( + _param = self._list_backups_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -3119,7 +3132,7 @@ def list_credentials_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsResponse", + "200": "List[Backup]", "400": "Error", "401": "Error", "404": "Error", @@ -3127,7 +3140,7 @@ def list_credentials_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_credentials_serialize( + def _list_backups_serialize( self, project_id, region_id, @@ -3170,7 +3183,7 @@ def _list_credentials_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/credentials", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3184,10 +3197,11 @@ def _list_credentials_serialize( ) @validate_call - def list_instances( + def list_credentials( 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)], @@ -3197,15 +3211,17 @@ def list_instances( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListInstancesResponse: - """(Deprecated) get service instances list + ) -> ListCredentialsResponse: + """(Deprecated) get list of credentials ids - Get a list of available instances + get list all credentials ids for 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 _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 @@ -3227,11 +3243,15 @@ def list_instances( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/instances is deprecated.", DeprecationWarning) + warnings.warn( + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/credentials is deprecated.", + DeprecationWarning, + ) - _param = self._list_instances_serialize( + _param = self._list_credentials_serialize( project_id=project_id, region_id=region_id, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3239,7 +3259,7 @@ def list_instances( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", + "200": "ListCredentialsResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3252,10 +3272,11 @@ def list_instances( ).data @validate_call - def list_instances_with_http_info( + def list_credentials_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)], @@ -3265,15 +3286,17 @@ def list_instances_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[ListInstancesResponse]: - """(Deprecated) get service instances list + ) -> ApiResponse[ListCredentialsResponse]: + """(Deprecated) get list of credentials ids - Get a list of available instances + get list all credentials ids for 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 _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 @@ -3295,11 +3318,15 @@ def list_instances_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/instances is deprecated.", DeprecationWarning) + warnings.warn( + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/credentials is deprecated.", + DeprecationWarning, + ) - _param = self._list_instances_serialize( + _param = self._list_credentials_serialize( project_id=project_id, region_id=region_id, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3307,7 +3334,7 @@ def list_instances_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", + "200": "ListCredentialsResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3320,10 +3347,11 @@ def list_instances_with_http_info( ) @validate_call - def list_instances_without_preload_content( + def list_credentials_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)], @@ -3334,14 +3362,16 @@ def list_instances_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) get service instances list + """(Deprecated) get list of credentials ids - Get a list of available instances + get list all credentials ids for 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 _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 @@ -3363,11 +3393,15 @@ def list_instances_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/instances is deprecated.", DeprecationWarning) + warnings.warn( + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/credentials is deprecated.", + DeprecationWarning, + ) - _param = self._list_instances_serialize( + _param = self._list_credentials_serialize( project_id=project_id, region_id=region_id, + instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3375,7 +3409,7 @@ def list_instances_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesResponse", + "200": "ListCredentialsResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3383,10 +3417,11 @@ def list_instances_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_instances_serialize( + def _list_credentials_serialize( self, project_id, region_id, + instance_id, _request_auth, _content_type, _headers, @@ -3409,6 +3444,8 @@ def _list_instances_serialize( _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 @@ -3423,7 +3460,7 @@ def _list_instances_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{regionId}/instances", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/credentials", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3437,7 +3474,7 @@ def _list_instances_serialize( ) @validate_call - def list_offerings( + def list_instances( 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")], @@ -3450,10 +3487,10 @@ def list_offerings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListOfferingsResponse: - """(Deprecated) get the service offerings + ) -> ListInstancesResponse: + """(Deprecated) get service instances list - Get the service offerings that the service broker offers. + Get a list of available instances :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -3480,9 +3517,9 @@ def list_offerings( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/offerings is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/instances is deprecated.", DeprecationWarning) - _param = self._list_offerings_serialize( + _param = self._list_instances_serialize( project_id=project_id, region_id=region_id, _request_auth=_request_auth, @@ -3492,7 +3529,7 @@ def list_offerings( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOfferingsResponse", + "200": "ListInstancesResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3505,7 +3542,7 @@ def list_offerings( ).data @validate_call - def list_offerings_with_http_info( + def list_instances_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")], @@ -3518,10 +3555,10 @@ def list_offerings_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[ListOfferingsResponse]: - """(Deprecated) get the service offerings + ) -> ApiResponse[ListInstancesResponse]: + """(Deprecated) get service instances list - Get the service offerings that the service broker offers. + Get a list of available instances :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -3548,9 +3585,9 @@ def list_offerings_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/offerings is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/instances is deprecated.", DeprecationWarning) - _param = self._list_offerings_serialize( + _param = self._list_instances_serialize( project_id=project_id, region_id=region_id, _request_auth=_request_auth, @@ -3560,7 +3597,7 @@ def list_offerings_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOfferingsResponse", + "200": "ListInstancesResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3573,7 +3610,7 @@ def list_offerings_with_http_info( ) @validate_call - def list_offerings_without_preload_content( + def list_instances_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")], @@ -3587,9 +3624,9 @@ def list_offerings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) get the service offerings + """(Deprecated) get service instances list - Get the service offerings that the service broker offers. + Get a list of available instances :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -3616,9 +3653,9 @@ def list_offerings_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/offerings is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/instances is deprecated.", DeprecationWarning) - _param = self._list_offerings_serialize( + _param = self._list_instances_serialize( project_id=project_id, region_id=region_id, _request_auth=_request_auth, @@ -3628,7 +3665,7 @@ def list_offerings_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOfferingsResponse", + "200": "ListInstancesResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3636,7 +3673,7 @@ def list_offerings_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_offerings_serialize( + def _list_instances_serialize( self, project_id, region_id, @@ -3676,7 +3713,7 @@ def _list_offerings_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{regionId}/offerings", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3690,11 +3727,10 @@ def _list_offerings_serialize( ) @validate_call - def list_restores( + def list_offerings( 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)], @@ -3704,16 +3740,15 @@ def list_restores( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListRestoresResponse: - """(Deprecated) get latest restore information for provided instanceId + ) -> ListOfferingsResponse: + """(Deprecated) get the service offerings + Get the service offerings that the service broker offers. :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 @@ -3735,15 +3770,11 @@ def list_restores( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restores is deprecated.", - DeprecationWarning, - ) + warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/offerings is deprecated.", DeprecationWarning) - _param = self._list_restores_serialize( + _param = self._list_offerings_serialize( project_id=project_id, region_id=region_id, - instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3751,7 +3782,7 @@ def list_restores( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRestoresResponse", + "200": "ListOfferingsResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3764,11 +3795,10 @@ def list_restores( ).data @validate_call - def list_restores_with_http_info( + def list_offerings_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)], @@ -3778,16 +3808,15 @@ def list_restores_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[ListRestoresResponse]: - """(Deprecated) get latest restore information for provided instanceId + ) -> ApiResponse[ListOfferingsResponse]: + """(Deprecated) get the service offerings + Get the service offerings that the service broker offers. :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 @@ -3809,15 +3838,11 @@ def list_restores_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restores is deprecated.", - DeprecationWarning, - ) + warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/offerings is deprecated.", DeprecationWarning) - _param = self._list_restores_serialize( + _param = self._list_offerings_serialize( project_id=project_id, region_id=region_id, - instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3825,7 +3850,7 @@ def list_restores_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRestoresResponse", + "200": "ListOfferingsResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3838,11 +3863,10 @@ def list_restores_with_http_info( ) @validate_call - def list_restores_without_preload_content( + def list_offerings_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)], @@ -3853,15 +3877,14 @@ def list_restores_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) get latest restore information for provided instanceId + """(Deprecated) get the service offerings + Get the service offerings that the service broker offers. :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 @@ -3883,15 +3906,11 @@ def list_restores_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn( - "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restores is deprecated.", - DeprecationWarning, - ) + warnings.warn("GET /v2/projects/{projectId}/regions/{regionId}/offerings is deprecated.", DeprecationWarning) - _param = self._list_restores_serialize( + _param = self._list_offerings_serialize( project_id=project_id, region_id=region_id, - instance_id=instance_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3899,7 +3918,7 @@ def list_restores_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRestoresResponse", + "200": "ListOfferingsResponse", "400": "Error", "401": "Error", "404": "Error", @@ -3907,11 +3926,10 @@ def list_restores_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_restores_serialize( + def _list_offerings_serialize( self, project_id, region_id, - instance_id, _request_auth, _content_type, _headers, @@ -3934,8 +3952,6 @@ def _list_restores_serialize( _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 @@ -3950,7 +3966,7 @@ def _list_restores_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restores", + resource_path="/v2/projects/{projectId}/regions/{regionId}/offerings", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3964,17 +3980,11 @@ def _list_restores_serialize( ) @validate_call - def partial_update_instance( + def list_restores( 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")], - partial_update_instance_payload: Annotated[ - PartialUpdateInstancePayload, - Field( - description="Parameters for the requested update operation on service instance - sgw acl update, plan upgrade " - ), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3984,10 +3994,9 @@ def partial_update_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """(Deprecated) update a service instance - - Update a service instance. This could be a sgw acl update or a plan upgrade. + ) -> ListRestoresResponse: + """(Deprecated) get latest restore information for provided instanceId + :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -3995,8 +4004,6 @@ def partial_update_instance( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str - :param partial_update_instance_payload: Parameters for the requested update operation on service instance - sgw acl update, plan upgrade (required) - :type partial_update_instance_payload: PartialUpdateInstancePayload :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 @@ -4019,15 +4026,14 @@ def partial_update_instance( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId} is deprecated.", + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restores is deprecated.", DeprecationWarning, ) - _param = self._partial_update_instance_serialize( + _param = self._list_restores_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, - partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4035,7 +4041,7 @@ def partial_update_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ListRestoresResponse", "400": "Error", "401": "Error", "404": "Error", @@ -4048,7 +4054,207 @@ def partial_update_instance( ).data @validate_call - def partial_update_instance_with_http_info( + def list_restores_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[ListRestoresResponse]: + """(Deprecated) get latest restore information for provided instanceId + + + :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 + warnings.warn( + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restores is deprecated.", + DeprecationWarning, + ) + + _param = self._list_restores_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": "ListRestoresResponse", + "400": "Error", + "401": "Error", + "404": "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 list_restores_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: + """(Deprecated) get latest restore information for provided instanceId + + + :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 + warnings.warn( + "GET /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restores is deprecated.", + DeprecationWarning, + ) + + _param = self._list_restores_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": "ListRestoresResponse", + "400": "Error", + "401": "Error", + "404": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _list_restores_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}/restores", + 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 partial_update_instance( 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")], @@ -4068,10 +4274,670 @@ def partial_update_instance_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[None]: + ) -> None: """(Deprecated) update a service instance - Update a service instance. This could be a sgw acl update or a plan upgrade. + Update a service instance. This could be a sgw acl update or a plan upgrade. + + :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 partial_update_instance_payload: Parameters for the requested update operation on service instance - sgw acl update, plan upgrade (required) + :type partial_update_instance_payload: PartialUpdateInstancePayload + :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 + warnings.warn( + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId} is deprecated.", + DeprecationWarning, + ) + + _param = self._partial_update_instance_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + partial_update_instance_payload=partial_update_instance_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "404": "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 partial_update_instance_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")], + partial_update_instance_payload: Annotated[ + PartialUpdateInstancePayload, + Field( + description="Parameters for the requested update operation on service instance - sgw acl update, plan upgrade " + ), + ], + _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) update a service instance + + Update a service instance. This could be a sgw acl update or a plan upgrade. + + :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 partial_update_instance_payload: Parameters for the requested update operation on service instance - sgw acl update, plan upgrade (required) + :type partial_update_instance_payload: PartialUpdateInstancePayload + :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 + warnings.warn( + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId} is deprecated.", + DeprecationWarning, + ) + + _param = self._partial_update_instance_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + partial_update_instance_payload=partial_update_instance_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "404": "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 partial_update_instance_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")], + partial_update_instance_payload: Annotated[ + PartialUpdateInstancePayload, + Field( + description="Parameters for the requested update operation on service instance - sgw acl update, plan upgrade " + ), + ], + _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) update a service instance + + Update a service instance. This could be a sgw acl update or a plan upgrade. + + :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 partial_update_instance_payload: Parameters for the requested update operation on service instance - sgw acl update, plan upgrade (required) + :type partial_update_instance_payload: PartialUpdateInstancePayload + :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 + warnings.warn( + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId} is deprecated.", + DeprecationWarning, + ) + + _param = self._partial_update_instance_serialize( + project_id=project_id, + region_id=region_id, + instance_id=instance_id, + partial_update_instance_payload=partial_update_instance_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "404": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _partial_update_instance_serialize( + self, + project_id, + region_id, + instance_id, + partial_update_instance_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 partial_update_instance_payload is not None: + _body_params = partial_update_instance_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}", + 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 trigger_recreate( + 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, + ) -> CreateInstanceResponse: + """(Deprecated) trigger a recreate + + + :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 + warnings.warn( + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/recreate is deprecated.", + DeprecationWarning, + ) + + _param = self._trigger_recreate_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", + "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_recreate_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]: + """(Deprecated) trigger a recreate + + + :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 + warnings.warn( + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/recreate is deprecated.", + DeprecationWarning, + ) + + _param = self._trigger_recreate_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", + "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_recreate_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: + """(Deprecated) trigger a recreate + + + :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 + warnings.warn( + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/recreate is deprecated.", + DeprecationWarning, + ) + + _param = self._trigger_recreate_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", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _trigger_recreate_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="PATCH", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/recreate", + 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 trigger_restart( + 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, + ) -> CreateInstanceResponse: + """(Deprecated) trigger a restart + + + :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 + warnings.warn( + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restart is deprecated.", + DeprecationWarning, + ) + + _param = self._trigger_restart_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", + "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_restart_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]: + """(Deprecated) trigger a restart + :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -4079,8 +4945,6 @@ def partial_update_instance_with_http_info( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str - :param partial_update_instance_payload: Parameters for the requested update operation on service instance - sgw acl update, plan upgrade (required) - :type partial_update_instance_payload: PartialUpdateInstancePayload :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 @@ -4103,15 +4967,14 @@ def partial_update_instance_with_http_info( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId} is deprecated.", + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restart is deprecated.", DeprecationWarning, ) - _param = self._partial_update_instance_serialize( + _param = self._trigger_restart_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, - partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4119,10 +4982,11 @@ def partial_update_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "202": "CreateInstanceResponse", "400": "Error", "401": "Error", "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4132,17 +4996,11 @@ def partial_update_instance_with_http_info( ) @validate_call - def partial_update_instance_without_preload_content( + def trigger_restart_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")], - partial_update_instance_payload: Annotated[ - PartialUpdateInstancePayload, - Field( - description="Parameters for the requested update operation on service instance - sgw acl update, plan upgrade " - ), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4153,9 +5011,8 @@ def partial_update_instance_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) update a service instance + """(Deprecated) trigger a restart - Update a service instance. This could be a sgw acl update or a plan upgrade. :param project_id: Project id on which user has permissions (required) :type project_id: str @@ -4163,8 +5020,6 @@ def partial_update_instance_without_preload_content( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str - :param partial_update_instance_payload: Parameters for the requested update operation on service instance - sgw acl update, plan upgrade (required) - :type partial_update_instance_payload: PartialUpdateInstancePayload :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 @@ -4187,15 +5042,14 @@ def partial_update_instance_without_preload_content( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId} is deprecated.", + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restart is deprecated.", DeprecationWarning, ) - _param = self._partial_update_instance_serialize( + _param = self._trigger_restart_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, - partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4203,20 +5057,20 @@ def partial_update_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "202": "CreateInstanceResponse", "400": "Error", "401": "Error", "404": "Error", + "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _partial_update_instance_serialize( + def _trigger_restart_serialize( self, project_id, region_id, instance_id, - partial_update_instance_payload, _request_auth, _content_type, _headers, @@ -4245,27 +5099,17 @@ def _partial_update_instance_serialize( # process the header parameters # process the form parameters # process the body parameter - if partial_update_instance_payload is not None: - _body_params = partial_update_instance_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}", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restart", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4279,11 +5123,12 @@ def _partial_update_instance_serialize( ) @validate_call - def trigger_recreate( + def trigger_restore( 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")], + backup_id: Annotated[StrictInt, Field(description="Backup id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4293,8 +5138,8 @@ def trigger_recreate( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateInstanceResponse: - """(Deprecated) trigger a recreate + ) -> TriggerRestoreResponse: + """(Deprecated) trigger a restore :param project_id: Project id on which user has permissions (required) @@ -4303,6 +5148,8 @@ def trigger_recreate( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str + :param backup_id: Backup id (required) + :type backup_id: int :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 @@ -4325,14 +5172,15 @@ def trigger_recreate( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/recreate is deprecated.", + "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups/{backupId}/restore is deprecated.", DeprecationWarning, ) - _param = self._trigger_recreate_serialize( + _param = self._trigger_restore_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4340,7 +5188,7 @@ def trigger_recreate( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "CreateInstanceResponse", + "200": "TriggerRestoreResponse", "400": "Error", "401": "Error", "404": "Error", @@ -4354,11 +5202,12 @@ def trigger_recreate( ).data @validate_call - def trigger_recreate_with_http_info( + def trigger_restore_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")], + backup_id: Annotated[StrictInt, Field(description="Backup id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4368,8 +5217,8 @@ def trigger_recreate_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[CreateInstanceResponse]: - """(Deprecated) trigger a recreate + ) -> ApiResponse[TriggerRestoreResponse]: + """(Deprecated) trigger a restore :param project_id: Project id on which user has permissions (required) @@ -4378,6 +5227,8 @@ def trigger_recreate_with_http_info( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str + :param backup_id: Backup id (required) + :type backup_id: int :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 @@ -4400,14 +5251,15 @@ def trigger_recreate_with_http_info( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/recreate is deprecated.", + "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups/{backupId}/restore is deprecated.", DeprecationWarning, ) - _param = self._trigger_recreate_serialize( + _param = self._trigger_restore_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4415,7 +5267,7 @@ def trigger_recreate_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "CreateInstanceResponse", + "200": "TriggerRestoreResponse", "400": "Error", "401": "Error", "404": "Error", @@ -4429,11 +5281,12 @@ def trigger_recreate_with_http_info( ) @validate_call - def trigger_recreate_without_preload_content( + def trigger_restore_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")], + backup_id: Annotated[StrictInt, Field(description="Backup id")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4444,7 +5297,7 @@ def trigger_recreate_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) trigger a recreate + """(Deprecated) trigger a restore :param project_id: Project id on which user has permissions (required) @@ -4453,6 +5306,8 @@ def trigger_recreate_without_preload_content( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str + :param backup_id: Backup id (required) + :type backup_id: int :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 @@ -4475,14 +5330,15 @@ def trigger_recreate_without_preload_content( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/recreate is deprecated.", + "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups/{backupId}/restore is deprecated.", DeprecationWarning, ) - _param = self._trigger_recreate_serialize( + _param = self._trigger_restore_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4490,7 +5346,7 @@ def trigger_recreate_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "CreateInstanceResponse", + "200": "TriggerRestoreResponse", "400": "Error", "401": "Error", "404": "Error", @@ -4499,11 +5355,12 @@ def trigger_recreate_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _trigger_recreate_serialize( + def _trigger_restore_serialize( self, project_id, region_id, instance_id, + backup_id, _request_auth, _content_type, _headers, @@ -4528,6 +5385,8 @@ def _trigger_recreate_serialize( _path_params["regionId"] = region_id if instance_id is not None: _path_params["instanceId"] = instance_id + if backup_id is not None: + _path_params["backupId"] = backup_id # process the query parameters # process the header parameters # process the form parameters @@ -4541,8 +5400,8 @@ def _trigger_recreate_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/recreate", + method="POST", + resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups/{backupId}/restore", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4556,7 +5415,7 @@ def _trigger_recreate_serialize( ) @validate_call - def trigger_restart( + 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")], @@ -4571,8 +5430,9 @@ def trigger_restart( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> CreateInstanceResponse: - """(Deprecated) trigger a restart + """(Deprecated) 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 @@ -4602,11 +5462,11 @@ def trigger_restart( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restart is deprecated.", + "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates/start is deprecated.", DeprecationWarning, ) - _param = self._trigger_restart_serialize( + _param = self._trigger_update_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -4621,6 +5481,7 @@ def trigger_restart( "400": "Error", "401": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -4631,7 +5492,7 @@ def trigger_restart( ).data @validate_call - def trigger_restart_with_http_info( + 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")], @@ -4646,8 +5507,9 @@ def trigger_restart_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[CreateInstanceResponse]: - """(Deprecated) trigger a restart + """(Deprecated) 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 @@ -4677,11 +5539,11 @@ def trigger_restart_with_http_info( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restart is deprecated.", + "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates/start is deprecated.", DeprecationWarning, ) - _param = self._trigger_restart_serialize( + _param = self._trigger_update_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -4696,6 +5558,7 @@ def trigger_restart_with_http_info( "400": "Error", "401": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -4706,7 +5569,7 @@ def trigger_restart_with_http_info( ) @validate_call - def trigger_restart_without_preload_content( + 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")], @@ -4721,8 +5584,9 @@ def trigger_restart_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) trigger a restart + """(Deprecated) 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 @@ -4752,11 +5616,11 @@ def trigger_restart_without_preload_content( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restart is deprecated.", + "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates/start is deprecated.", DeprecationWarning, ) - _param = self._trigger_restart_serialize( + _param = self._trigger_update_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, @@ -4771,12 +5635,13 @@ def trigger_restart_without_preload_content( "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_restart_serialize( + def _trigger_update_serialize( self, project_id, region_id, @@ -4818,8 +5683,8 @@ def _trigger_restart_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/restart", + 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, @@ -4833,12 +5698,14 @@ def _trigger_restart_serialize( ) @validate_call - def trigger_restore( + 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")], - backup_id: Annotated[StrictInt, Field(description="Backup 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)], @@ -4848,9 +5715,10 @@ def trigger_restore( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TriggerRestoreResponse: - """(Deprecated) trigger a restore + ) -> UpdateBackupsConfigResponse: + """(Deprecated) 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 @@ -4858,8 +5726,8 @@ def trigger_restore( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str - :param backup_id: Backup id (required) - :type backup_id: int + :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 @@ -4882,15 +5750,15 @@ def trigger_restore( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups/{backupId}/restore is deprecated.", + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups-config is deprecated.", DeprecationWarning, ) - _param = self._trigger_restore_serialize( + _param = self._update_backups_config_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, - backup_id=backup_id, + update_backups_config_payload=update_backups_config_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4898,7 +5766,7 @@ def trigger_restore( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TriggerRestoreResponse", + "200": "UpdateBackupsConfigResponse", "400": "Error", "401": "Error", "404": "Error", @@ -4912,12 +5780,14 @@ def trigger_restore( ).data @validate_call - def trigger_restore_with_http_info( + 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")], - backup_id: Annotated[StrictInt, Field(description="Backup 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)], @@ -4927,9 +5797,10 @@ def trigger_restore_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[TriggerRestoreResponse]: - """(Deprecated) trigger a restore + ) -> ApiResponse[UpdateBackupsConfigResponse]: + """(Deprecated) 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 @@ -4937,8 +5808,8 @@ def trigger_restore_with_http_info( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str - :param backup_id: Backup id (required) - :type backup_id: int + :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 @@ -4961,15 +5832,15 @@ def trigger_restore_with_http_info( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups/{backupId}/restore is deprecated.", + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups-config is deprecated.", DeprecationWarning, ) - _param = self._trigger_restore_serialize( + _param = self._update_backups_config_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, - backup_id=backup_id, + update_backups_config_payload=update_backups_config_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4977,7 +5848,7 @@ def trigger_restore_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TriggerRestoreResponse", + "200": "UpdateBackupsConfigResponse", "400": "Error", "401": "Error", "404": "Error", @@ -4991,12 +5862,14 @@ def trigger_restore_with_http_info( ) @validate_call - def trigger_restore_without_preload_content( + 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")], instance_id: Annotated[StrictStr, Field(description="Instance id")], - backup_id: Annotated[StrictInt, Field(description="Backup 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)], @@ -5007,8 +5880,9 @@ def trigger_restore_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) trigger a restore + """(Deprecated) 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 @@ -5016,8 +5890,8 @@ def trigger_restore_without_preload_content( :type region_id: str :param instance_id: Instance id (required) :type instance_id: str - :param backup_id: Backup id (required) - :type backup_id: int + :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 @@ -5040,15 +5914,15 @@ def trigger_restore_without_preload_content( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "POST /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups/{backupId}/restore is deprecated.", + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups-config is deprecated.", DeprecationWarning, ) - _param = self._trigger_restore_serialize( + _param = self._update_backups_config_serialize( project_id=project_id, region_id=region_id, instance_id=instance_id, - backup_id=backup_id, + update_backups_config_payload=update_backups_config_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5056,7 +5930,7 @@ def trigger_restore_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "TriggerRestoreResponse", + "200": "UpdateBackupsConfigResponse", "400": "Error", "401": "Error", "404": "Error", @@ -5065,12 +5939,12 @@ def trigger_restore_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _trigger_restore_serialize( + def _update_backups_config_serialize( self, project_id, region_id, instance_id, - backup_id, + update_backups_config_payload, _request_auth, _content_type, _headers, @@ -5095,23 +5969,31 @@ def _trigger_restore_serialize( _path_params["regionId"] = region_id if instance_id is not None: _path_params["instanceId"] = instance_id - if backup_id is not None: - _path_params["backupId"] = backup_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="POST", - resource_path="/v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups/{backupId}/restore", + 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, @@ -5125,14 +6007,12 @@ def _trigger_restore_serialize( ) @validate_call - def update_backups_config( + 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_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)], @@ -5142,10 +6022,10 @@ 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: - """(Deprecated) backups configuration update + ) -> UpdateUpdatesSettingsResponse: + """(Deprecated) 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 @@ -5153,8 +6033,8 @@ def update_backups_config( :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 @@ -5177,15 +6057,15 @@ def update_backups_config( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups-config is deprecated.", + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates is deprecated.", DeprecationWarning, ) - _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, @@ -5193,10 +6073,11 @@ def update_backups_config( ) _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) @@ -5207,14 +6088,12 @@ def update_backups_config( ).data @validate_call - def update_backups_config_with_http_info( + 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_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)], @@ -5224,10 +6103,10 @@ 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]: - """(Deprecated) backups configuration update + ) -> ApiResponse[UpdateUpdatesSettingsResponse]: + """(Deprecated) 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 @@ -5235,8 +6114,8 @@ def update_backups_config_with_http_info( :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 @@ -5259,15 +6138,15 @@ def update_backups_config_with_http_info( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups-config is deprecated.", + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates is deprecated.", DeprecationWarning, ) - _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, @@ -5275,10 +6154,11 @@ def update_backups_config_with_http_info( ) _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) @@ -5289,14 +6169,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)], @@ -5307,9 +6185,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: - """(Deprecated) backups configuration update + """(Deprecated) 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 @@ -5317,8 +6195,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 @@ -5341,15 +6219,15 @@ def update_backups_config_without_preload_content( :return: Returns the result object. """ # noqa: E501 warnings.warn( - "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/backups-config is deprecated.", + "PATCH /v2/projects/{projectId}/regions/{regionId}/instances/{instanceId}/updates is deprecated.", DeprecationWarning, ) - _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, @@ -5357,21 +6235,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, @@ -5400,8 +6279,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: @@ -5420,7 +6299,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/redis/src/stackit/redis/api_client.py b/services/redis/src/stackit/redis/api_client.py index a379aaf0f..72a10a082 100644 --- a/services/redis/src/stackit/redis/api_client.py +++ b/services/redis/src/stackit/redis/api_client.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/configuration.py b/services/redis/src/stackit/redis/configuration.py index b80206aff..58b9eb350 100644 --- a/services/redis/src/stackit/redis/configuration.py +++ b/services/redis/src/stackit/redis/configuration.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/exceptions.py b/services/redis/src/stackit/redis/exceptions.py index d27c75628..a5f8b956a 100644 --- a/services/redis/src/stackit/redis/exceptions.py +++ b/services/redis/src/stackit/redis/exceptions.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/__init__.py b/services/redis/src/stackit/redis/models/__init__.py index 1dcd1961c..2ec2e30f4 100644 --- a/services/redis/src/stackit/redis/models/__init__.py +++ b/services/redis/src/stackit/redis/models/__init__.py @@ -2,11 +2,11 @@ # flake8: noqa """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -23,6 +23,7 @@ from stackit.redis.models.credentials_response import CredentialsResponse from stackit.redis.models.error import Error from stackit.redis.models.get_metrics_response import GetMetricsResponse +from stackit.redis.models.get_updates_response import GetUpdatesResponse from stackit.redis.models.instance import Instance from stackit.redis.models.instance_last_operation import InstanceLastOperation from stackit.redis.models.instance_parameters import InstanceParameters @@ -46,3 +47,9 @@ from stackit.redis.models.update_backups_config_response import ( UpdateBackupsConfigResponse, ) +from stackit.redis.models.update_updates_settings_payload import ( + UpdateUpdatesSettingsPayload, +) +from stackit.redis.models.update_updates_settings_response import ( + UpdateUpdatesSettingsResponse, +) diff --git a/services/redis/src/stackit/redis/models/backup.py b/services/redis/src/stackit/redis/models/backup.py index fd7ad4c8b..09184beba 100644 --- a/services/redis/src/stackit/redis/models/backup.py +++ b/services/redis/src/stackit/redis/models/backup.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/create_backup_response_item.py b/services/redis/src/stackit/redis/models/create_backup_response_item.py index e0b585f68..c43af8e64 100644 --- a/services/redis/src/stackit/redis/models/create_backup_response_item.py +++ b/services/redis/src/stackit/redis/models/create_backup_response_item.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/create_credentials_payload.py b/services/redis/src/stackit/redis/models/create_credentials_payload.py index 7097491ca..3607c3acd 100644 --- a/services/redis/src/stackit/redis/models/create_credentials_payload.py +++ b/services/redis/src/stackit/redis/models/create_credentials_payload.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/create_instance_payload.py b/services/redis/src/stackit/redis/models/create_instance_payload.py index 41e84805a..aa12f5a2c 100644 --- a/services/redis/src/stackit/redis/models/create_instance_payload.py +++ b/services/redis/src/stackit/redis/models/create_instance_payload.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/create_instance_response.py b/services/redis/src/stackit/redis/models/create_instance_response.py index 2a4458370..db5167dc8 100644 --- a/services/redis/src/stackit/redis/models/create_instance_response.py +++ b/services/redis/src/stackit/redis/models/create_instance_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/credentials.py b/services/redis/src/stackit/redis/models/credentials.py index 9edd1b573..bc7436987 100644 --- a/services/redis/src/stackit/redis/models/credentials.py +++ b/services/redis/src/stackit/redis/models/credentials.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/credentials_list_item.py b/services/redis/src/stackit/redis/models/credentials_list_item.py index 86d2554f1..570786c7f 100644 --- a/services/redis/src/stackit/redis/models/credentials_list_item.py +++ b/services/redis/src/stackit/redis/models/credentials_list_item.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/credentials_response.py b/services/redis/src/stackit/redis/models/credentials_response.py index 15029a512..7f29cd8ec 100644 --- a/services/redis/src/stackit/redis/models/credentials_response.py +++ b/services/redis/src/stackit/redis/models/credentials_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/error.py b/services/redis/src/stackit/redis/models/error.py index 1bb12a1e2..bfa063229 100644 --- a/services/redis/src/stackit/redis/models/error.py +++ b/services/redis/src/stackit/redis/models/error.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/get_metrics_response.py b/services/redis/src/stackit/redis/models/get_metrics_response.py index b33cd1d40..ce6d734f3 100644 --- a/services/redis/src/stackit/redis/models/get_metrics_response.py +++ b/services/redis/src/stackit/redis/models/get_metrics_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/get_updates_response.py b/services/redis/src/stackit/redis/models/get_updates_response.py new file mode 100644 index 000000000..27a224767 --- /dev/null +++ b/services/redis/src/stackit/redis/models/get_updates_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" +STACKIT Redis API (Deprecated) + +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. + +The version of the OpenAPI document: 2.1.2 +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/redis/src/stackit/redis/models/instance.py b/services/redis/src/stackit/redis/models/instance.py index 643211126..9fee13483 100644 --- a/services/redis/src/stackit/redis/models/instance.py +++ b/services/redis/src/stackit/redis/models/instance.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 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/redis/src/stackit/redis/models/instance_last_operation.py b/services/redis/src/stackit/redis/models/instance_last_operation.py index 15e6446e6..5e1e0bb0a 100644 --- a/services/redis/src/stackit/redis/models/instance_last_operation.py +++ b/services/redis/src/stackit/redis/models/instance_last_operation.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/instance_parameters.py b/services/redis/src/stackit/redis/models/instance_parameters.py index 9bf95eb5d..271b5706d 100644 --- a/services/redis/src/stackit/redis/models/instance_parameters.py +++ b/services/redis/src/stackit/redis/models/instance_parameters.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/instance_schema.py b/services/redis/src/stackit/redis/models/instance_schema.py index f96af62c7..80828d83f 100644 --- a/services/redis/src/stackit/redis/models/instance_schema.py +++ b/services/redis/src/stackit/redis/models/instance_schema.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/list_credentials_response.py b/services/redis/src/stackit/redis/models/list_credentials_response.py index 6c3766f53..baeaec8d3 100644 --- a/services/redis/src/stackit/redis/models/list_credentials_response.py +++ b/services/redis/src/stackit/redis/models/list_credentials_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/list_instances_response.py b/services/redis/src/stackit/redis/models/list_instances_response.py index d117d9c5f..2db4ba743 100644 --- a/services/redis/src/stackit/redis/models/list_instances_response.py +++ b/services/redis/src/stackit/redis/models/list_instances_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/list_offerings_response.py b/services/redis/src/stackit/redis/models/list_offerings_response.py index fe3e5b480..496d29af4 100644 --- a/services/redis/src/stackit/redis/models/list_offerings_response.py +++ b/services/redis/src/stackit/redis/models/list_offerings_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/list_restores_response.py b/services/redis/src/stackit/redis/models/list_restores_response.py index 343d7db1c..7b3643fed 100644 --- a/services/redis/src/stackit/redis/models/list_restores_response.py +++ b/services/redis/src/stackit/redis/models/list_restores_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/model_schema.py b/services/redis/src/stackit/redis/models/model_schema.py index 7cd406e5d..add872759 100644 --- a/services/redis/src/stackit/redis/models/model_schema.py +++ b/services/redis/src/stackit/redis/models/model_schema.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/offering.py b/services/redis/src/stackit/redis/models/offering.py index 00b1f8130..371d836df 100644 --- a/services/redis/src/stackit/redis/models/offering.py +++ b/services/redis/src/stackit/redis/models/offering.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/partial_update_instance_payload.py b/services/redis/src/stackit/redis/models/partial_update_instance_payload.py index 87a9ef180..a0a9af7a8 100644 --- a/services/redis/src/stackit/redis/models/partial_update_instance_payload.py +++ b/services/redis/src/stackit/redis/models/partial_update_instance_payload.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/plan.py b/services/redis/src/stackit/redis/models/plan.py index b617f995c..82de46284 100644 --- a/services/redis/src/stackit/redis/models/plan.py +++ b/services/redis/src/stackit/redis/models/plan.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/raw_credentials.py b/services/redis/src/stackit/redis/models/raw_credentials.py index 4537aa347..15e092ad7 100644 --- a/services/redis/src/stackit/redis/models/raw_credentials.py +++ b/services/redis/src/stackit/redis/models/raw_credentials.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/restore.py b/services/redis/src/stackit/redis/models/restore.py index 793eff7ca..b2d6fc2b3 100644 --- a/services/redis/src/stackit/redis/models/restore.py +++ b/services/redis/src/stackit/redis/models/restore.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/trigger_restore_response.py b/services/redis/src/stackit/redis/models/trigger_restore_response.py index 70e0c23b1..6a4337bb2 100644 --- a/services/redis/src/stackit/redis/models/trigger_restore_response.py +++ b/services/redis/src/stackit/redis/models/trigger_restore_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/update_backups_config_payload.py b/services/redis/src/stackit/redis/models/update_backups_config_payload.py index 4fce4b4bd..827f058b8 100644 --- a/services/redis/src/stackit/redis/models/update_backups_config_payload.py +++ b/services/redis/src/stackit/redis/models/update_backups_config_payload.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/update_backups_config_response.py b/services/redis/src/stackit/redis/models/update_backups_config_response.py index 193cc304c..f2cb345fb 100644 --- a/services/redis/src/stackit/redis/models/update_backups_config_response.py +++ b/services/redis/src/stackit/redis/models/update_backups_config_response.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. diff --git a/services/redis/src/stackit/redis/models/update_updates_settings_payload.py b/services/redis/src/stackit/redis/models/update_updates_settings_payload.py new file mode 100644 index 000000000..3bd664719 --- /dev/null +++ b/services/redis/src/stackit/redis/models/update_updates_settings_payload.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +STACKIT Redis API (Deprecated) + +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. + +The version of the OpenAPI document: 2.1.2 +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/redis/src/stackit/redis/models/update_updates_settings_response.py b/services/redis/src/stackit/redis/models/update_updates_settings_response.py new file mode 100644 index 000000000..f7f758799 --- /dev/null +++ b/services/redis/src/stackit/redis/models/update_updates_settings_response.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" +STACKIT Redis API (Deprecated) + +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. + +The version of the OpenAPI document: 2.1.2 +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/redis/src/stackit/redis/rest.py b/services/redis/src/stackit/redis/rest.py index 3b4f3dc6d..dc78363c1 100644 --- a/services/redis/src/stackit/redis/rest.py +++ b/services/redis/src/stackit/redis/rest.py @@ -1,11 +1,11 @@ # coding: utf-8 """ -[DEPRECATED] STACKIT Redis API +STACKIT Redis API (Deprecated) -⚠️ WARNING: THIS API/Service IS DEPRECATED - migrate to valkey! The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. +⚠️ This product, API and Service is deprecated. Use STACKIT Key Value Store instead. Planned retirement: 01.08.2027. The STACKIT Redis API provides endpoints to list service offerings, manage service instances and service credentials within STACKIT portal projects. -The version of the OpenAPI document: 2.1.0 +The version of the OpenAPI document: 2.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually.