diff --git a/services/mongodbflex/src/stackit/mongodbflex/__init__.py b/services/mongodbflex/src/stackit/mongodbflex/__init__.py index edfafab0..a3f7df54 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/__init__.py +++ b/services/mongodbflex/src/stackit/mongodbflex/__init__.py @@ -7,97 +7,204 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 __version__ = "1.0.0" +# Define package exports +__all__ = [ + "DefaultApi", + "ApiResponse", + "ApiClient", + "HostConfiguration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "ACL", + "Backup", + "BackupSchedule", + "CloneInstancePayload", + "CloneInstanceResponse", + "CreateInstancePayload", + "CreateInstanceResponse", + "CreateUserPayload", + "CreateUserResponse", + "DataPoint", + "Error", + "Flavor", + "GetBackupResponse", + "GetInstanceResponse", + "GetUserResponse", + "HandlersInstancesSlowQueriesResponse", + "HandlersInstancesSuggestedIndexesResponse", + "Host", + "HostMetric", + "Instance", + "InstanceFlavor", + "InstanceListInstance", + "InstanceResponseUser", + "ListBackupsResponse", + "ListFlavorsResponse", + "ListInstancesResponse", + "ListMetricsResponse", + "ListRestoreJobsResponse", + "ListStoragesResponse", + "ListUser", + "ListUsersResponse", + "ListVersionsResponse", + "MongodbatlasOperation", + "MongodbatlasStats", + "PartialUpdateInstancePayload", + "PartialUpdateUserPayload", + "RestoreInstancePayload", + "RestoreInstanceResponse", + "RestoreInstanceStatus", + "Shape", + "SlowQuery", + "Storage", + "StorageRange", + "SuggestedIndex", + "UpdateBackupSchedulePayload", + "UpdateInstancePayload", + "UpdateInstanceResponse", + "UpdateUserPayload", + "User", +] + # import apis into sdk package -from stackit.mongodbflex.api.default_api import DefaultApi -from stackit.mongodbflex.api_client import ApiClient +from stackit.mongodbflex.api.default_api import DefaultApi as DefaultApi +from stackit.mongodbflex.api_client import ApiClient as ApiClient # import ApiClient -from stackit.mongodbflex.api_response import ApiResponse -from stackit.mongodbflex.configuration import HostConfiguration -from stackit.mongodbflex.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.mongodbflex.api_response import ApiResponse as ApiResponse +from stackit.mongodbflex.configuration import HostConfiguration as HostConfiguration +from stackit.mongodbflex.exceptions import ApiAttributeError as ApiAttributeError +from stackit.mongodbflex.exceptions import ApiException as ApiException +from stackit.mongodbflex.exceptions import ApiKeyError as ApiKeyError +from stackit.mongodbflex.exceptions import ApiTypeError as ApiTypeError +from stackit.mongodbflex.exceptions import ApiValueError as ApiValueError +from stackit.mongodbflex.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.mongodbflex.models.acl import ACL -from stackit.mongodbflex.models.backup import Backup -from stackit.mongodbflex.models.backup_schedule import BackupSchedule -from stackit.mongodbflex.models.clone_instance_payload import CloneInstancePayload -from stackit.mongodbflex.models.clone_instance_response import CloneInstanceResponse -from stackit.mongodbflex.models.create_instance_payload import CreateInstancePayload -from stackit.mongodbflex.models.create_instance_response import CreateInstanceResponse -from stackit.mongodbflex.models.create_user_payload import CreateUserPayload -from stackit.mongodbflex.models.create_user_response import CreateUserResponse -from stackit.mongodbflex.models.data_point import DataPoint -from stackit.mongodbflex.models.error import Error -from stackit.mongodbflex.models.flavor import Flavor -from stackit.mongodbflex.models.get_backup_response import GetBackupResponse -from stackit.mongodbflex.models.get_instance_response import GetInstanceResponse -from stackit.mongodbflex.models.get_user_response import GetUserResponse -from stackit.mongodbflex.models.handlers_infra_flavor import HandlersInfraFlavor -from stackit.mongodbflex.models.handlers_infra_get_flavors_response import ( - HandlersInfraGetFlavorsResponse, -) -from stackit.mongodbflex.models.handlers_instances_get_instance_response import ( - HandlersInstancesGetInstanceResponse, +from stackit.mongodbflex.models.acl import ACL as ACL +from stackit.mongodbflex.models.backup import Backup as Backup +from stackit.mongodbflex.models.backup_schedule import BackupSchedule as BackupSchedule +from stackit.mongodbflex.models.clone_instance_payload import ( + CloneInstancePayload as CloneInstancePayload, +) +from stackit.mongodbflex.models.clone_instance_response import ( + CloneInstanceResponse as CloneInstanceResponse, +) +from stackit.mongodbflex.models.create_instance_payload import ( + CreateInstancePayload as CreateInstancePayload, +) +from stackit.mongodbflex.models.create_instance_response import ( + CreateInstanceResponse as CreateInstanceResponse, +) +from stackit.mongodbflex.models.create_user_payload import ( + CreateUserPayload as CreateUserPayload, +) +from stackit.mongodbflex.models.create_user_response import ( + CreateUserResponse as CreateUserResponse, +) +from stackit.mongodbflex.models.data_point import DataPoint as DataPoint +from stackit.mongodbflex.models.error import Error as Error +from stackit.mongodbflex.models.flavor import Flavor as Flavor +from stackit.mongodbflex.models.get_backup_response import ( + GetBackupResponse as GetBackupResponse, +) +from stackit.mongodbflex.models.get_instance_response import ( + GetInstanceResponse as GetInstanceResponse, +) +from stackit.mongodbflex.models.get_user_response import ( + GetUserResponse as GetUserResponse, ) from stackit.mongodbflex.models.handlers_instances_slow_queries_response import ( - HandlersInstancesSlowQueriesResponse, + HandlersInstancesSlowQueriesResponse as HandlersInstancesSlowQueriesResponse, ) from stackit.mongodbflex.models.handlers_instances_suggested_indexes_response import ( - HandlersInstancesSuggestedIndexesResponse, -) -from stackit.mongodbflex.models.host import Host -from stackit.mongodbflex.models.host_metric import HostMetric -from stackit.mongodbflex.models.instance import Instance -from stackit.mongodbflex.models.instance_list_instance import InstanceListInstance -from stackit.mongodbflex.models.instance_response_user import InstanceResponseUser -from stackit.mongodbflex.models.list_backups_response import ListBackupsResponse -from stackit.mongodbflex.models.list_flavors_response import ListFlavorsResponse -from stackit.mongodbflex.models.list_instances_response import ListInstancesResponse -from stackit.mongodbflex.models.list_metrics_response import ListMetricsResponse + HandlersInstancesSuggestedIndexesResponse as HandlersInstancesSuggestedIndexesResponse, +) +from stackit.mongodbflex.models.host import Host as Host +from stackit.mongodbflex.models.host_metric import HostMetric as HostMetric +from stackit.mongodbflex.models.instance import Instance as Instance +from stackit.mongodbflex.models.instance_flavor import InstanceFlavor as InstanceFlavor +from stackit.mongodbflex.models.instance_list_instance import ( + InstanceListInstance as InstanceListInstance, +) +from stackit.mongodbflex.models.instance_response_user import ( + InstanceResponseUser as InstanceResponseUser, +) +from stackit.mongodbflex.models.list_backups_response import ( + ListBackupsResponse as ListBackupsResponse, +) +from stackit.mongodbflex.models.list_flavors_response import ( + ListFlavorsResponse as ListFlavorsResponse, +) +from stackit.mongodbflex.models.list_instances_response import ( + ListInstancesResponse as ListInstancesResponse, +) +from stackit.mongodbflex.models.list_metrics_response import ( + ListMetricsResponse as ListMetricsResponse, +) from stackit.mongodbflex.models.list_restore_jobs_response import ( - ListRestoreJobsResponse, -) -from stackit.mongodbflex.models.list_storages_response import ListStoragesResponse -from stackit.mongodbflex.models.list_user import ListUser -from stackit.mongodbflex.models.list_users_response import ListUsersResponse -from stackit.mongodbflex.models.list_versions_response import ListVersionsResponse -from stackit.mongodbflex.models.mongodbatlas_operation import MongodbatlasOperation -from stackit.mongodbflex.models.mongodbatlas_stats import MongodbatlasStats + ListRestoreJobsResponse as ListRestoreJobsResponse, +) +from stackit.mongodbflex.models.list_storages_response import ( + ListStoragesResponse as ListStoragesResponse, +) +from stackit.mongodbflex.models.list_user import ListUser as ListUser +from stackit.mongodbflex.models.list_users_response import ( + ListUsersResponse as ListUsersResponse, +) +from stackit.mongodbflex.models.list_versions_response import ( + ListVersionsResponse as ListVersionsResponse, +) +from stackit.mongodbflex.models.mongodbatlas_operation import ( + MongodbatlasOperation as MongodbatlasOperation, +) +from stackit.mongodbflex.models.mongodbatlas_stats import ( + MongodbatlasStats as MongodbatlasStats, +) from stackit.mongodbflex.models.partial_update_instance_payload import ( - PartialUpdateInstancePayload, + PartialUpdateInstancePayload as PartialUpdateInstancePayload, ) from stackit.mongodbflex.models.partial_update_user_payload import ( - PartialUpdateUserPayload, -) -from stackit.mongodbflex.models.restore_instance_payload import RestoreInstancePayload -from stackit.mongodbflex.models.restore_instance_response import RestoreInstanceResponse -from stackit.mongodbflex.models.restore_instance_status import RestoreInstanceStatus -from stackit.mongodbflex.models.shape import Shape -from stackit.mongodbflex.models.slow_query import SlowQuery -from stackit.mongodbflex.models.storage import Storage -from stackit.mongodbflex.models.storage_range import StorageRange -from stackit.mongodbflex.models.suggested_index import SuggestedIndex + PartialUpdateUserPayload as PartialUpdateUserPayload, +) +from stackit.mongodbflex.models.restore_instance_payload import ( + RestoreInstancePayload as RestoreInstancePayload, +) +from stackit.mongodbflex.models.restore_instance_response import ( + RestoreInstanceResponse as RestoreInstanceResponse, +) +from stackit.mongodbflex.models.restore_instance_status import ( + RestoreInstanceStatus as RestoreInstanceStatus, +) +from stackit.mongodbflex.models.shape import Shape as Shape +from stackit.mongodbflex.models.slow_query import SlowQuery as SlowQuery +from stackit.mongodbflex.models.storage import Storage as Storage +from stackit.mongodbflex.models.storage_range import StorageRange as StorageRange +from stackit.mongodbflex.models.suggested_index import SuggestedIndex as SuggestedIndex from stackit.mongodbflex.models.update_backup_schedule_payload import ( - UpdateBackupSchedulePayload, + UpdateBackupSchedulePayload as UpdateBackupSchedulePayload, +) +from stackit.mongodbflex.models.update_instance_payload import ( + UpdateInstancePayload as UpdateInstancePayload, +) +from stackit.mongodbflex.models.update_instance_response import ( + UpdateInstanceResponse as UpdateInstanceResponse, +) +from stackit.mongodbflex.models.update_user_payload import ( + UpdateUserPayload as UpdateUserPayload, ) -from stackit.mongodbflex.models.update_instance_payload import UpdateInstancePayload -from stackit.mongodbflex.models.update_instance_response import UpdateInstanceResponse -from stackit.mongodbflex.models.update_user_payload import UpdateUserPayload -from stackit.mongodbflex.models.user import User +from stackit.mongodbflex.models.user import User as User diff --git a/services/mongodbflex/src/stackit/mongodbflex/api/default_api.py b/services/mongodbflex/src/stackit/mongodbflex/api/default_api.py index a7d96b49..35ad0846 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/api/default_api.py +++ b/services/mongodbflex/src/stackit/mongodbflex/api/default_api.py @@ -5,16 +5,22 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from typing import Any, Dict, List, Optional, Tuple, Union -from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call +from pydantic import ( + Field, + StrictFloat, + StrictInt, + StrictStr, + validate_call, +) from stackit.core.configuration import Configuration from typing_extensions import Annotated @@ -82,6 +88,7 @@ def clone_instance( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], clone_instance_payload: Annotated[CloneInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -101,6 +108,8 @@ def clone_instance( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param clone_instance_payload: payload (required) :type clone_instance_payload: CloneInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -123,11 +132,12 @@ def clone_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._clone_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, clone_instance_payload=clone_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -138,6 +148,7 @@ def clone_instance( _response_types_map: Dict[str, Optional[str]] = { "202": "CloneInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -152,6 +163,7 @@ def clone_instance_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], clone_instance_payload: Annotated[CloneInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -171,6 +183,8 @@ def clone_instance_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param clone_instance_payload: payload (required) :type clone_instance_payload: CloneInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -193,11 +207,12 @@ def clone_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._clone_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, clone_instance_payload=clone_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -208,6 +223,7 @@ def clone_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": "CloneInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -222,6 +238,7 @@ def clone_instance_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], clone_instance_payload: Annotated[CloneInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -241,6 +258,8 @@ def clone_instance_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param clone_instance_payload: payload (required) :type clone_instance_payload: CloneInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -263,11 +282,12 @@ def clone_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._clone_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, clone_instance_payload=clone_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -278,6 +298,7 @@ def clone_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": "CloneInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -287,6 +308,7 @@ def _clone_instance_serialize( self, project_id, instance_id, + region, clone_instance_payload, _request_auth, _content_type, @@ -302,7 +324,7 @@ def _clone_instance_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -310,6 +332,8 @@ def _clone_instance_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -334,7 +358,7 @@ def _clone_instance_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/clone", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/clone", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -351,6 +375,7 @@ def _clone_instance_serialize( def create_instance( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], create_instance_payload: Annotated[CreateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -368,6 +393,8 @@ def create_instance( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param create_instance_payload: payload (required) :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -390,10 +417,11 @@ def create_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_instance_serialize( project_id=project_id, + region=region, create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -404,6 +432,7 @@ def create_instance( _response_types_map: Dict[str, Optional[str]] = { "202": "CreateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -418,6 +447,7 @@ def create_instance( def create_instance_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], create_instance_payload: Annotated[CreateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -435,6 +465,8 @@ def create_instance_with_http_info( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param create_instance_payload: payload (required) :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -457,10 +489,11 @@ def create_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_instance_serialize( project_id=project_id, + region=region, create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -471,6 +504,7 @@ def create_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": "CreateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -485,6 +519,7 @@ def create_instance_with_http_info( def create_instance_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], create_instance_payload: Annotated[CreateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -502,6 +537,8 @@ def create_instance_without_preload_content( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param create_instance_payload: payload (required) :type create_instance_payload: CreateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -524,10 +561,11 @@ def create_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_instance_serialize( project_id=project_id, + region=region, create_instance_payload=create_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -538,6 +576,7 @@ def create_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": "CreateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -547,6 +586,7 @@ def create_instance_without_preload_content( def _create_instance_serialize( self, project_id, + region, create_instance_payload, _request_auth, _content_type, @@ -562,12 +602,14 @@ def _create_instance_serialize( _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]] = {} + _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 is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -592,7 +634,7 @@ def _create_instance_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances", + resource_path="/v2/projects/{projectId}/regions/{region}/instances", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -610,6 +652,7 @@ def create_user( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], create_user_payload: Annotated[CreateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -629,6 +672,8 @@ def create_user( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param create_user_payload: payload (required) :type create_user_payload: CreateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -651,11 +696,12 @@ def create_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_user_serialize( project_id=project_id, instance_id=instance_id, + region=region, create_user_payload=create_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -666,6 +712,7 @@ def create_user( _response_types_map: Dict[str, Optional[str]] = { "202": "CreateUserResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -682,6 +729,7 @@ def create_user_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], create_user_payload: Annotated[CreateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -701,6 +749,8 @@ def create_user_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param create_user_payload: payload (required) :type create_user_payload: CreateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -723,11 +773,12 @@ def create_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_user_serialize( project_id=project_id, instance_id=instance_id, + region=region, create_user_payload=create_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -738,6 +789,7 @@ def create_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": "CreateUserResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -754,6 +806,7 @@ def create_user_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], create_user_payload: Annotated[CreateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -773,6 +826,8 @@ def create_user_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param create_user_payload: payload (required) :type create_user_payload: CreateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -795,11 +850,12 @@ def create_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._create_user_serialize( project_id=project_id, instance_id=instance_id, + region=region, create_user_payload=create_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -810,6 +866,7 @@ def create_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": "CreateUserResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -821,6 +878,7 @@ def _create_user_serialize( self, project_id, instance_id, + region, create_user_payload, _request_auth, _content_type, @@ -836,7 +894,7 @@ def _create_user_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -844,6 +902,8 @@ def _create_user_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -868,7 +928,7 @@ def _create_user_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -886,6 +946,7 @@ def delete_instance( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -904,6 +965,8 @@ def delete_instance( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -924,11 +987,12 @@ def delete_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -938,6 +1002,7 @@ def delete_instance( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -953,6 +1018,7 @@ def delete_instance_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -971,6 +1037,8 @@ def delete_instance_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -991,11 +1059,12 @@ def delete_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1005,6 +1074,7 @@ def delete_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -1020,6 +1090,7 @@ def delete_instance_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1038,6 +1109,8 @@ def delete_instance_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1058,11 +1131,12 @@ def delete_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1072,6 +1146,7 @@ def delete_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -1082,6 +1157,7 @@ def _delete_instance_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -1096,7 +1172,7 @@ def _delete_instance_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1104,6 +1180,8 @@ def _delete_instance_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -1111,14 +1189,14 @@ def _delete_instance_serialize( # set the HTTP header `Accept` if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + _header_params["Accept"] = self.api_client.select_header_accept(["*/*", "application/json"]) # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1137,6 +1215,7 @@ def delete_user( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1157,6 +1236,8 @@ def delete_user( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1177,12 +1258,13 @@ def delete_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1191,6 +1273,8 @@ def delete_user( _response_types_map: Dict[str, Optional[str]] = { "200": None, + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -1207,6 +1291,7 @@ def delete_user_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1227,6 +1312,8 @@ def delete_user_with_http_info( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1247,12 +1334,13 @@ def delete_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1261,6 +1349,8 @@ def delete_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": None, + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -1277,6 +1367,7 @@ def delete_user_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1297,6 +1388,8 @@ def delete_user_without_preload_content( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1317,12 +1410,13 @@ def delete_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._delete_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1331,6 +1425,8 @@ def delete_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": None, + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -1342,6 +1438,7 @@ def _delete_user_serialize( project_id, instance_id, user_id, + region, _request_auth, _content_type, _headers, @@ -1356,7 +1453,7 @@ def _delete_user_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1366,6 +1463,8 @@ def _delete_user_serialize( _path_params["instanceId"] = instance_id if user_id is not None: _path_params["userId"] = user_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -1380,7 +1479,7 @@ def _delete_user_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1399,6 +1498,7 @@ def get_backup( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], backup_id: Annotated[StrictStr, Field(description="backup id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1419,6 +1519,8 @@ def get_backup( :type instance_id: str :param backup_id: backup id (required) :type backup_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1439,12 +1541,13 @@ def get_backup( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_backup_serialize( project_id=project_id, instance_id=instance_id, backup_id=backup_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1454,6 +1557,7 @@ def get_backup( _response_types_map: Dict[str, Optional[str]] = { "200": "GetBackupResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1469,6 +1573,7 @@ def get_backup_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], backup_id: Annotated[StrictStr, Field(description="backup id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1489,6 +1594,8 @@ def get_backup_with_http_info( :type instance_id: str :param backup_id: backup id (required) :type backup_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1509,12 +1616,13 @@ def get_backup_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_backup_serialize( project_id=project_id, instance_id=instance_id, backup_id=backup_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1524,6 +1632,7 @@ def get_backup_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetBackupResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1539,6 +1648,7 @@ def get_backup_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], backup_id: Annotated[StrictStr, Field(description="backup id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1559,6 +1669,8 @@ def get_backup_without_preload_content( :type instance_id: str :param backup_id: backup id (required) :type backup_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1579,12 +1691,13 @@ def get_backup_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_backup_serialize( project_id=project_id, instance_id=instance_id, backup_id=backup_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1594,6 +1707,7 @@ def get_backup_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetBackupResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1604,6 +1718,7 @@ def _get_backup_serialize( project_id, instance_id, backup_id, + region, _request_auth, _content_type, _headers, @@ -1618,7 +1733,7 @@ def _get_backup_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1628,6 +1743,8 @@ def _get_backup_serialize( _path_params["instanceId"] = instance_id if backup_id is not None: _path_params["backupId"] = backup_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -1642,7 +1759,7 @@ def _get_backup_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1660,6 +1777,7 @@ def get_instance( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1678,6 +1796,8 @@ def get_instance( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1698,11 +1818,12 @@ def get_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1712,6 +1833,7 @@ def get_instance( _response_types_map: Dict[str, Optional[str]] = { "200": "GetInstanceResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1726,6 +1848,7 @@ def get_instance_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1744,6 +1867,8 @@ def get_instance_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1764,11 +1889,12 @@ def get_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1778,6 +1904,7 @@ def get_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetInstanceResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1792,6 +1919,7 @@ def get_instance_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1810,6 +1938,8 @@ def get_instance_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1830,11 +1960,12 @@ def get_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1844,6 +1975,7 @@ def get_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetInstanceResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1853,6 +1985,7 @@ def _get_instance_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -1867,7 +2000,7 @@ def _get_instance_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1875,6 +2008,8 @@ def _get_instance_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -1889,7 +2024,7 @@ def _get_instance_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1908,6 +2043,7 @@ def get_user( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1928,6 +2064,8 @@ def get_user( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1948,12 +2086,13 @@ def get_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1962,6 +2101,8 @@ def get_user( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUserResponse", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -1978,6 +2119,7 @@ def get_user_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1998,6 +2140,8 @@ def get_user_with_http_info( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2018,12 +2162,13 @@ def get_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2032,6 +2177,8 @@ def get_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUserResponse", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -2048,6 +2195,7 @@ def get_user_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2068,6 +2216,8 @@ def get_user_without_preload_content( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2088,12 +2238,13 @@ def get_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._get_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2102,6 +2253,8 @@ def get_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUserResponse", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -2113,6 +2266,7 @@ def _get_user_serialize( project_id, instance_id, user_id, + region, _request_auth, _content_type, _headers, @@ -2127,7 +2281,7 @@ def _get_user_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2137,6 +2291,8 @@ def _get_user_serialize( _path_params["instanceId"] = instance_id if user_id is not None: _path_params["userId"] = user_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2151,7 +2307,7 @@ def _get_user_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2169,6 +2325,7 @@ def list_advisor_slow_queries( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2187,6 +2344,8 @@ def list_advisor_slow_queries( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2207,11 +2366,12 @@ def list_advisor_slow_queries( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_advisor_slow_queries_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2221,6 +2381,7 @@ def list_advisor_slow_queries( _response_types_map: Dict[str, Optional[str]] = { "200": "HandlersInstancesSlowQueriesResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -2236,6 +2397,7 @@ def list_advisor_slow_queries_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2254,6 +2416,8 @@ def list_advisor_slow_queries_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2274,11 +2438,12 @@ def list_advisor_slow_queries_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_advisor_slow_queries_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2288,6 +2453,7 @@ def list_advisor_slow_queries_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "HandlersInstancesSlowQueriesResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -2303,6 +2469,7 @@ def list_advisor_slow_queries_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2321,6 +2488,8 @@ def list_advisor_slow_queries_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2341,11 +2510,12 @@ def list_advisor_slow_queries_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_advisor_slow_queries_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2355,6 +2525,7 @@ def list_advisor_slow_queries_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "HandlersInstancesSlowQueriesResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -2365,6 +2536,7 @@ def _list_advisor_slow_queries_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -2379,7 +2551,7 @@ def _list_advisor_slow_queries_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2387,6 +2559,8 @@ def _list_advisor_slow_queries_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2401,7 +2575,7 @@ def _list_advisor_slow_queries_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/advisor/slow-queries", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/advisor/slow-queries", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2419,6 +2593,7 @@ def list_backups( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2437,6 +2612,8 @@ def list_backups( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2457,11 +2634,12 @@ def list_backups( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_backups_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2471,6 +2649,7 @@ def list_backups( _response_types_map: Dict[str, Optional[str]] = { "200": "ListBackupsResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2485,6 +2664,7 @@ def list_backups_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2503,6 +2683,8 @@ def list_backups_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2523,11 +2705,12 @@ def list_backups_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_backups_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2537,6 +2720,7 @@ def list_backups_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListBackupsResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2551,6 +2735,7 @@ def list_backups_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2569,6 +2754,8 @@ def list_backups_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2589,11 +2776,12 @@ def list_backups_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_backups_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2603,6 +2791,7 @@ def list_backups_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListBackupsResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2612,6 +2801,7 @@ def _list_backups_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -2626,7 +2816,7 @@ def _list_backups_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2634,6 +2824,8 @@ def _list_backups_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2648,7 +2840,7 @@ def _list_backups_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/backups", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2665,6 +2857,7 @@ def _list_backups_serialize( def list_flavors( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2681,6 +2874,8 @@ def list_flavors( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2701,10 +2896,11 @@ def list_flavors( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_flavors_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2714,6 +2910,7 @@ def list_flavors( _response_types_map: Dict[str, Optional[str]] = { "200": "ListFlavorsResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2727,6 +2924,7 @@ def list_flavors( def list_flavors_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2743,6 +2941,8 @@ def list_flavors_with_http_info( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2763,10 +2963,11 @@ def list_flavors_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_flavors_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2776,6 +2977,7 @@ def list_flavors_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListFlavorsResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2789,6 +2991,7 @@ def list_flavors_with_http_info( def list_flavors_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2805,6 +3008,8 @@ def list_flavors_without_preload_content( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2825,10 +3030,11 @@ def list_flavors_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_flavors_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2838,6 +3044,7 @@ def list_flavors_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListFlavorsResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2846,6 +3053,7 @@ def list_flavors_without_preload_content( def _list_flavors_serialize( self, project_id, + region, _request_auth, _content_type, _headers, @@ -2860,12 +3068,14 @@ def _list_flavors_serialize( _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]] = {} + _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 is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -2880,7 +3090,7 @@ def _list_flavors_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/flavors", + resource_path="/v2/projects/{projectId}/regions/{region}/flavors", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2898,6 +3108,7 @@ def list_instances( self, project_id: Annotated[StrictStr, Field(description="project id")], tag: Annotated[StrictStr, Field(description="instance tag")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2916,6 +3127,8 @@ def list_instances( :type project_id: str :param tag: instance tag (required) :type tag: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2936,11 +3149,12 @@ def list_instances( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_instances_serialize( project_id=project_id, tag=tag, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2950,6 +3164,7 @@ def list_instances( _response_types_map: Dict[str, Optional[str]] = { "200": "ListInstancesResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2964,6 +3179,7 @@ def list_instances_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], tag: Annotated[StrictStr, Field(description="instance tag")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2982,6 +3198,8 @@ def list_instances_with_http_info( :type project_id: str :param tag: instance tag (required) :type tag: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3002,11 +3220,12 @@ def list_instances_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_instances_serialize( project_id=project_id, tag=tag, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3016,6 +3235,7 @@ def list_instances_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListInstancesResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3030,6 +3250,7 @@ def list_instances_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], tag: Annotated[StrictStr, Field(description="instance tag")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3048,6 +3269,8 @@ def list_instances_without_preload_content( :type project_id: str :param tag: instance tag (required) :type tag: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3068,11 +3291,12 @@ def list_instances_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_instances_serialize( project_id=project_id, tag=tag, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3082,6 +3306,7 @@ def list_instances_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListInstancesResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3091,6 +3316,7 @@ def _list_instances_serialize( self, project_id, tag, + region, _request_auth, _content_type, _headers, @@ -3105,12 +3331,14 @@ def _list_instances_serialize( _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]] = {} + _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 is not None: + _path_params["region"] = region # process the query parameters if tag is not None: @@ -3129,7 +3357,7 @@ def _list_instances_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances", + resource_path="/v2/projects/{projectId}/regions/{region}/instances", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3149,6 +3377,7 @@ def list_metrics( instance_id: Annotated[StrictStr, Field(description="instance id")], metric: Annotated[StrictStr, Field(description="metric type")], granularity: Annotated[StrictStr, Field(description="granularity")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], period: Annotated[Optional[StrictStr], Field(description="period")] = None, start: Annotated[Optional[StrictStr], Field(description="period start")] = None, end: Annotated[Optional[StrictStr], Field(description="period end")] = None, @@ -3174,6 +3403,8 @@ def list_metrics( :type metric: str :param granularity: granularity (required) :type granularity: str + :param region: The region which should be addressed (required) + :type region: str :param period: period :type period: str :param start: period start @@ -3200,13 +3431,14 @@ def list_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_metrics_serialize( project_id=project_id, instance_id=instance_id, metric=metric, granularity=granularity, + region=region, period=period, start=start, end=end, @@ -3219,6 +3451,7 @@ def list_metrics( _response_types_map: Dict[str, Optional[str]] = { "200": "ListMetricsResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -3236,6 +3469,7 @@ def list_metrics_with_http_info( instance_id: Annotated[StrictStr, Field(description="instance id")], metric: Annotated[StrictStr, Field(description="metric type")], granularity: Annotated[StrictStr, Field(description="granularity")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], period: Annotated[Optional[StrictStr], Field(description="period")] = None, start: Annotated[Optional[StrictStr], Field(description="period start")] = None, end: Annotated[Optional[StrictStr], Field(description="period end")] = None, @@ -3261,6 +3495,8 @@ def list_metrics_with_http_info( :type metric: str :param granularity: granularity (required) :type granularity: str + :param region: The region which should be addressed (required) + :type region: str :param period: period :type period: str :param start: period start @@ -3287,13 +3523,14 @@ def list_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_metrics_serialize( project_id=project_id, instance_id=instance_id, metric=metric, granularity=granularity, + region=region, period=period, start=start, end=end, @@ -3306,6 +3543,7 @@ def list_metrics_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListMetricsResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -3323,6 +3561,7 @@ def list_metrics_without_preload_content( instance_id: Annotated[StrictStr, Field(description="instance id")], metric: Annotated[StrictStr, Field(description="metric type")], granularity: Annotated[StrictStr, Field(description="granularity")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], period: Annotated[Optional[StrictStr], Field(description="period")] = None, start: Annotated[Optional[StrictStr], Field(description="period start")] = None, end: Annotated[Optional[StrictStr], Field(description="period end")] = None, @@ -3348,6 +3587,8 @@ def list_metrics_without_preload_content( :type metric: str :param granularity: granularity (required) :type granularity: str + :param region: The region which should be addressed (required) + :type region: str :param period: period :type period: str :param start: period start @@ -3374,13 +3615,14 @@ def list_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_metrics_serialize( project_id=project_id, instance_id=instance_id, metric=metric, granularity=granularity, + region=region, period=period, start=start, end=end, @@ -3393,6 +3635,7 @@ def list_metrics_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListMetricsResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -3405,6 +3648,7 @@ def _list_metrics_serialize( instance_id, metric, granularity, + region, period, start, end, @@ -3422,7 +3666,7 @@ def _list_metrics_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3432,6 +3676,8 @@ def _list_metrics_serialize( _path_params["instanceId"] = instance_id if metric is not None: _path_params["metric"] = metric + if region is not None: + _path_params["region"] = region # process the query parameters if granularity is not None: @@ -3462,7 +3708,7 @@ def _list_metrics_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/metrics/{metric}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3480,6 +3726,7 @@ def list_restore_jobs( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3498,6 +3745,8 @@ def list_restore_jobs( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3518,11 +3767,12 @@ def list_restore_jobs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_restore_jobs_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3532,6 +3782,7 @@ def list_restore_jobs( _response_types_map: Dict[str, Optional[str]] = { "200": "ListRestoreJobsResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3546,6 +3797,7 @@ def list_restore_jobs_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3564,6 +3816,8 @@ def list_restore_jobs_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3584,11 +3838,12 @@ def list_restore_jobs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_restore_jobs_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3598,6 +3853,7 @@ def list_restore_jobs_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListRestoreJobsResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3612,6 +3868,7 @@ def list_restore_jobs_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3630,6 +3887,8 @@ def list_restore_jobs_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3650,11 +3909,12 @@ def list_restore_jobs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_restore_jobs_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3664,6 +3924,7 @@ def list_restore_jobs_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListRestoreJobsResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3673,6 +3934,7 @@ def _list_restore_jobs_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -3687,7 +3949,7 @@ def _list_restore_jobs_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3695,6 +3957,8 @@ def _list_restore_jobs_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -3709,7 +3973,7 @@ def _list_restore_jobs_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/restores", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/restores", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3727,6 +3991,7 @@ def list_storages( self, project_id: Annotated[StrictStr, Field(description="project id")], flavor: Annotated[StrictStr, Field(description="flavor id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3745,6 +4010,8 @@ def list_storages( :type project_id: str :param flavor: flavor id (required) :type flavor: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3765,11 +4032,12 @@ def list_storages( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_storages_serialize( project_id=project_id, flavor=flavor, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3779,6 +4047,7 @@ def list_storages( _response_types_map: Dict[str, Optional[str]] = { "200": "ListStoragesResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3793,6 +4062,7 @@ def list_storages_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], flavor: Annotated[StrictStr, Field(description="flavor id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3811,6 +4081,8 @@ def list_storages_with_http_info( :type project_id: str :param flavor: flavor id (required) :type flavor: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3831,11 +4103,12 @@ def list_storages_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_storages_serialize( project_id=project_id, flavor=flavor, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3845,6 +4118,7 @@ def list_storages_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListStoragesResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3859,6 +4133,7 @@ def list_storages_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], flavor: Annotated[StrictStr, Field(description="flavor id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3877,6 +4152,8 @@ def list_storages_without_preload_content( :type project_id: str :param flavor: flavor id (required) :type flavor: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3897,11 +4174,12 @@ def list_storages_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_storages_serialize( project_id=project_id, flavor=flavor, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3911,6 +4189,7 @@ def list_storages_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListStoragesResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3920,6 +4199,7 @@ def _list_storages_serialize( self, project_id, flavor, + region, _request_auth, _content_type, _headers, @@ -3934,7 +4214,7 @@ def _list_storages_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -3942,6 +4222,8 @@ def _list_storages_serialize( _path_params["projectId"] = project_id if flavor is not None: _path_params["flavor"] = flavor + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -3956,7 +4238,7 @@ def _list_storages_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/storages/{flavor}", + resource_path="/v2/projects/{projectId}/regions/{region}/storages/{flavor}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3974,6 +4256,7 @@ def list_suggested_indexes( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3992,6 +4275,8 @@ def list_suggested_indexes( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4012,11 +4297,12 @@ def list_suggested_indexes( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_suggested_indexes_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4026,6 +4312,7 @@ def list_suggested_indexes( _response_types_map: Dict[str, Optional[str]] = { "200": "HandlersInstancesSuggestedIndexesResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -4041,6 +4328,7 @@ def list_suggested_indexes_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4059,6 +4347,8 @@ def list_suggested_indexes_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4079,11 +4369,12 @@ def list_suggested_indexes_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_suggested_indexes_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4093,6 +4384,7 @@ def list_suggested_indexes_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "HandlersInstancesSuggestedIndexesResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -4108,6 +4400,7 @@ def list_suggested_indexes_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4126,6 +4419,8 @@ def list_suggested_indexes_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4146,11 +4441,12 @@ def list_suggested_indexes_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_suggested_indexes_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4160,6 +4456,7 @@ def list_suggested_indexes_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "HandlersInstancesSuggestedIndexesResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -4170,6 +4467,7 @@ def _list_suggested_indexes_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -4184,7 +4482,7 @@ def _list_suggested_indexes_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4192,6 +4490,8 @@ def _list_suggested_indexes_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -4206,7 +4506,7 @@ def _list_suggested_indexes_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/advisor/suggested-indexes", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/advisor/suggested-indexes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4224,6 +4524,7 @@ def list_users( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4242,6 +4543,8 @@ def list_users( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4262,11 +4565,12 @@ def list_users( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_users_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4275,6 +4579,8 @@ def list_users( _response_types_map: Dict[str, Optional[str]] = { "200": "ListUsersResponse", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -4290,6 +4596,7 @@ def list_users_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4308,6 +4615,8 @@ def list_users_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4328,11 +4637,12 @@ def list_users_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_users_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4341,6 +4651,8 @@ def list_users_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListUsersResponse", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -4356,6 +4668,7 @@ def list_users_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4374,6 +4687,8 @@ def list_users_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4394,11 +4709,12 @@ def list_users_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_users_serialize( project_id=project_id, instance_id=instance_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4407,6 +4723,8 @@ def list_users_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListUsersResponse", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -4417,6 +4735,7 @@ def _list_users_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -4431,7 +4750,7 @@ def _list_users_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4439,6 +4758,8 @@ def _list_users_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -4453,7 +4774,7 @@ def _list_users_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4470,6 +4791,7 @@ def _list_users_serialize( def list_versions( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4486,6 +4808,8 @@ def list_versions( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4506,10 +4830,11 @@ def list_versions( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_versions_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4519,6 +4844,7 @@ def list_versions( _response_types_map: Dict[str, Optional[str]] = { "200": "ListVersionsResponse", "400": "Error", + "401": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4531,6 +4857,7 @@ def list_versions( def list_versions_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4547,6 +4874,8 @@ def list_versions_with_http_info( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4567,10 +4896,11 @@ def list_versions_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_versions_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4580,6 +4910,7 @@ def list_versions_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "ListVersionsResponse", "400": "Error", + "401": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) response_data.read() @@ -4592,6 +4923,7 @@ def list_versions_with_http_info( def list_versions_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4608,6 +4940,8 @@ def list_versions_without_preload_content( :param project_id: project id (required) :type project_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4628,10 +4962,11 @@ def list_versions_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._list_versions_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4641,6 +4976,7 @@ def list_versions_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "ListVersionsResponse", "400": "Error", + "401": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response @@ -4648,6 +4984,7 @@ def list_versions_without_preload_content( def _list_versions_serialize( self, project_id, + region, _request_auth, _content_type, _headers, @@ -4662,12 +4999,14 @@ def _list_versions_serialize( _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]] = {} + _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 is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -4682,7 +5021,7 @@ def _list_versions_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/versions", + resource_path="/v2/projects/{projectId}/regions/{region}/versions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4700,6 +5039,7 @@ def partial_update_instance( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], partial_update_instance_payload: Annotated[PartialUpdateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -4719,6 +5059,8 @@ def partial_update_instance( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param partial_update_instance_payload: payload (required) :type partial_update_instance_payload: PartialUpdateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -4741,11 +5083,12 @@ def partial_update_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -4757,6 +5100,7 @@ def partial_update_instance( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -4773,6 +5117,7 @@ def partial_update_instance_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], partial_update_instance_payload: Annotated[PartialUpdateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -4792,6 +5137,8 @@ def partial_update_instance_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param partial_update_instance_payload: payload (required) :type partial_update_instance_payload: PartialUpdateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -4814,11 +5161,12 @@ def partial_update_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -4830,6 +5178,7 @@ def partial_update_instance_with_http_info( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -4846,6 +5195,7 @@ def partial_update_instance_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], partial_update_instance_payload: Annotated[PartialUpdateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -4865,6 +5215,8 @@ def partial_update_instance_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param partial_update_instance_payload: payload (required) :type partial_update_instance_payload: PartialUpdateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -4887,11 +5239,12 @@ def partial_update_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, partial_update_instance_payload=partial_update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -4903,6 +5256,7 @@ def partial_update_instance_without_preload_content( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -4914,6 +5268,7 @@ def _partial_update_instance_serialize( self, project_id, instance_id, + region, partial_update_instance_payload, _request_auth, _content_type, @@ -4929,7 +5284,7 @@ def _partial_update_instance_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -4937,6 +5292,8 @@ def _partial_update_instance_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -4961,7 +5318,7 @@ def _partial_update_instance_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v1/projects/{projectId}/instances/{instanceId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4980,6 +5337,7 @@ def partial_update_user( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], partial_update_user_payload: Annotated[PartialUpdateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5001,6 +5359,8 @@ def partial_update_user( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param partial_update_user_payload: payload (required) :type partial_update_user_payload: PartialUpdateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -5023,12 +5383,13 @@ def partial_update_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, partial_update_user_payload=partial_update_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5039,6 +5400,7 @@ def partial_update_user( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "409": "Error", } @@ -5055,6 +5417,7 @@ def partial_update_user_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], partial_update_user_payload: Annotated[PartialUpdateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5076,6 +5439,8 @@ def partial_update_user_with_http_info( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param partial_update_user_payload: payload (required) :type partial_update_user_payload: PartialUpdateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -5098,12 +5463,13 @@ def partial_update_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, partial_update_user_payload=partial_update_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5114,6 +5480,7 @@ def partial_update_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "409": "Error", } @@ -5130,6 +5497,7 @@ def partial_update_user_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], partial_update_user_payload: Annotated[PartialUpdateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5151,6 +5519,8 @@ def partial_update_user_without_preload_content( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param partial_update_user_payload: payload (required) :type partial_update_user_payload: PartialUpdateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -5173,12 +5543,13 @@ def partial_update_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._partial_update_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, partial_update_user_payload=partial_update_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5189,6 +5560,7 @@ def partial_update_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "409": "Error", } @@ -5200,6 +5572,7 @@ def _partial_update_user_serialize( project_id, instance_id, user_id, + region, partial_update_user_payload, _request_auth, _content_type, @@ -5215,7 +5588,7 @@ def _partial_update_user_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5225,6 +5598,8 @@ def _partial_update_user_serialize( _path_params["instanceId"] = instance_id if user_id is not None: _path_params["userId"] = user_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -5249,7 +5624,7 @@ def _partial_update_user_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5268,6 +5643,7 @@ def reset_user( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5288,6 +5664,8 @@ def reset_user( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5308,12 +5686,13 @@ def reset_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._reset_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5322,6 +5701,8 @@ def reset_user( _response_types_map: Dict[str, Optional[str]] = { "202": "User", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -5338,6 +5719,7 @@ def reset_user_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5358,6 +5740,8 @@ def reset_user_with_http_info( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5378,12 +5762,13 @@ def reset_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._reset_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5392,6 +5777,8 @@ def reset_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": "User", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -5408,6 +5795,7 @@ def reset_user_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5428,6 +5816,8 @@ def reset_user_without_preload_content( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5448,12 +5838,13 @@ def reset_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._reset_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5462,6 +5853,8 @@ def reset_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": "User", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -5473,6 +5866,7 @@ def _reset_user_serialize( project_id, instance_id, user_id, + region, _request_auth, _content_type, _headers, @@ -5487,7 +5881,7 @@ def _reset_user_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5497,6 +5891,8 @@ def _reset_user_serialize( _path_params["instanceId"] = instance_id if user_id is not None: _path_params["userId"] = user_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -5511,7 +5907,7 @@ def _reset_user_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users/{userId}/reset", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5529,6 +5925,7 @@ def restore_instance( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], restore_instance_payload: Annotated[RestoreInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5548,6 +5945,8 @@ def restore_instance( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param restore_instance_payload: payload (required) :type restore_instance_payload: RestoreInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -5570,11 +5969,12 @@ def restore_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._restore_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, restore_instance_payload=restore_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5585,6 +5985,7 @@ def restore_instance( _response_types_map: Dict[str, Optional[str]] = { "202": "RestoreInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -5599,6 +6000,7 @@ def restore_instance_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], restore_instance_payload: Annotated[RestoreInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5618,6 +6020,8 @@ def restore_instance_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param restore_instance_payload: payload (required) :type restore_instance_payload: RestoreInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -5640,11 +6044,12 @@ def restore_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._restore_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, restore_instance_payload=restore_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5655,6 +6060,7 @@ def restore_instance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "202": "RestoreInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -5669,6 +6075,7 @@ def restore_instance_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], restore_instance_payload: Annotated[RestoreInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5688,6 +6095,8 @@ def restore_instance_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param restore_instance_payload: payload (required) :type restore_instance_payload: RestoreInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -5710,11 +6119,12 @@ def restore_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._restore_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, restore_instance_payload=restore_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5725,6 +6135,7 @@ def restore_instance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "202": "RestoreInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -5734,6 +6145,7 @@ def _restore_instance_serialize( self, project_id, instance_id, + region, restore_instance_payload, _request_auth, _content_type, @@ -5749,7 +6161,7 @@ def _restore_instance_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -5757,6 +6169,8 @@ def _restore_instance_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -5781,7 +6195,7 @@ def _restore_instance_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/restores", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/restores", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5799,6 +6213,7 @@ def update_backup_schedule( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_backup_schedule_payload: Annotated[UpdateBackupSchedulePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5818,6 +6233,8 @@ def update_backup_schedule( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_backup_schedule_payload: payload (required) :type update_backup_schedule_payload: UpdateBackupSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -5840,11 +6257,12 @@ def update_backup_schedule( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_backup_schedule_serialize( project_id=project_id, instance_id=instance_id, + region=region, update_backup_schedule_payload=update_backup_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5855,6 +6273,7 @@ def update_backup_schedule( _response_types_map: Dict[str, Optional[str]] = { "200": "BackupSchedule", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -5869,6 +6288,7 @@ def update_backup_schedule_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_backup_schedule_payload: Annotated[UpdateBackupSchedulePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5888,6 +6308,8 @@ def update_backup_schedule_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_backup_schedule_payload: payload (required) :type update_backup_schedule_payload: UpdateBackupSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -5910,11 +6332,12 @@ def update_backup_schedule_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_backup_schedule_serialize( project_id=project_id, instance_id=instance_id, + region=region, update_backup_schedule_payload=update_backup_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5925,6 +6348,7 @@ def update_backup_schedule_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": "BackupSchedule", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -5939,6 +6363,7 @@ def update_backup_schedule_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_backup_schedule_payload: Annotated[UpdateBackupSchedulePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -5958,6 +6383,8 @@ def update_backup_schedule_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_backup_schedule_payload: payload (required) :type update_backup_schedule_payload: UpdateBackupSchedulePayload :param _request_timeout: timeout setting for this request. If one @@ -5980,11 +6407,12 @@ def update_backup_schedule_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_backup_schedule_serialize( project_id=project_id, instance_id=instance_id, + region=region, update_backup_schedule_payload=update_backup_schedule_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -5995,6 +6423,7 @@ def update_backup_schedule_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": "BackupSchedule", "400": "Error", + "401": "Error", "404": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -6004,6 +6433,7 @@ def _update_backup_schedule_serialize( self, project_id, instance_id, + region, update_backup_schedule_payload, _request_auth, _content_type, @@ -6019,7 +6449,7 @@ def _update_backup_schedule_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -6027,6 +6457,8 @@ def _update_backup_schedule_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -6051,7 +6483,7 @@ def _update_backup_schedule_serialize( return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/backups", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6069,6 +6501,7 @@ def update_instance( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_instance_payload: Annotated[UpdateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -6088,6 +6521,8 @@ def update_instance( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_instance_payload: payload (required) :type update_instance_payload: UpdateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -6110,11 +6545,12 @@ def update_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, update_instance_payload=update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -6126,6 +6562,7 @@ def update_instance( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -6142,6 +6579,7 @@ def update_instance_with_http_info( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_instance_payload: Annotated[UpdateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -6161,6 +6599,8 @@ def update_instance_with_http_info( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_instance_payload: payload (required) :type update_instance_payload: UpdateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -6183,11 +6623,12 @@ def update_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, update_instance_payload=update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -6199,6 +6640,7 @@ def update_instance_with_http_info( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -6215,6 +6657,7 @@ def update_instance_without_preload_content( self, project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_instance_payload: Annotated[UpdateInstancePayload, Field(description="payload")], _request_timeout: Union[ None, @@ -6234,6 +6677,8 @@ def update_instance_without_preload_content( :type project_id: str :param instance_id: instance id (required) :type instance_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_instance_payload: payload (required) :type update_instance_payload: UpdateInstancePayload :param _request_timeout: timeout setting for this request. If one @@ -6256,11 +6701,12 @@ def update_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_instance_serialize( project_id=project_id, instance_id=instance_id, + region=region, update_instance_payload=update_instance_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -6272,6 +6718,7 @@ def update_instance_without_preload_content( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -6283,6 +6730,7 @@ def _update_instance_serialize( self, project_id, instance_id, + region, update_instance_payload, _request_auth, _content_type, @@ -6298,7 +6746,7 @@ def _update_instance_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -6306,6 +6754,8 @@ def _update_instance_serialize( _path_params["projectId"] = project_id if instance_id is not None: _path_params["instanceId"] = instance_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -6330,7 +6780,7 @@ def _update_instance_serialize( return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/instances/{instanceId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6349,6 +6799,7 @@ def update_user( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_user_payload: Annotated[UpdateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -6370,6 +6821,8 @@ def update_user( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_user_payload: payload (required) :type update_user_payload: UpdateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -6392,12 +6845,13 @@ def update_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, update_user_payload=update_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -6408,6 +6862,7 @@ def update_user( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "409": "Error", } @@ -6424,6 +6879,7 @@ def update_user_with_http_info( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_user_payload: Annotated[UpdateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -6445,6 +6901,8 @@ def update_user_with_http_info( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_user_payload: payload (required) :type update_user_payload: UpdateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -6467,12 +6925,13 @@ def update_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, update_user_payload=update_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -6483,6 +6942,7 @@ def update_user_with_http_info( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "409": "Error", } @@ -6499,6 +6959,7 @@ def update_user_without_preload_content( project_id: Annotated[StrictStr, Field(description="project id")], instance_id: Annotated[StrictStr, Field(description="instance id")], user_id: Annotated[StrictStr, Field(description="user id")], + region: Annotated[StrictStr, Field(description="The region which should be addressed")], update_user_payload: Annotated[UpdateUserPayload, Field(description="payload")], _request_timeout: Union[ None, @@ -6520,6 +6981,8 @@ def update_user_without_preload_content( :type instance_id: str :param user_id: user id (required) :type user_id: str + :param region: The region which should be addressed (required) + :type region: str :param update_user_payload: payload (required) :type update_user_payload: UpdateUserPayload :param _request_timeout: timeout setting for this request. If one @@ -6542,12 +7005,13 @@ def update_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 docstring might be too long + """ # noqa: E501 _param = self._update_user_serialize( project_id=project_id, instance_id=instance_id, user_id=user_id, + region=region, update_user_payload=update_user_payload, _request_auth=_request_auth, _content_type=_content_type, @@ -6558,6 +7022,7 @@ def update_user_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "409": "Error", } @@ -6569,6 +7034,7 @@ def _update_user_serialize( project_id, instance_id, user_id, + region, update_user_payload, _request_auth, _content_type, @@ -6584,7 +7050,7 @@ def _update_user_serialize( _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]] = {} + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -6594,6 +7060,8 @@ def _update_user_serialize( _path_params["instanceId"] = instance_id if user_id is not None: _path_params["userId"] = user_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -6618,7 +7086,7 @@ def _update_user_serialize( return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/instances/{instanceId}/users/{userId}", + resource_path="/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/services/mongodbflex/src/stackit/mongodbflex/api_client.py b/services/mongodbflex/src/stackit/mongodbflex/api_client.py index 86324df8..46fb6b4f 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/api_client.py +++ b/services/mongodbflex/src/stackit/mongodbflex/api_client.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 import datetime import json @@ -332,6 +332,10 @@ def sanitize_for_serialization(self, obj): else: obj_dict = obj.__dict__ + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() # noqa: E501 + return self.sanitize_for_serialization(obj_dict) + return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()} def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): @@ -351,12 +355,12 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif content_type.startswith("application/json"): + elif re.match(r"^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)", content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif content_type.startswith("text/plain"): + elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): data = response_text else: raise ApiException(status=0, reason="Unsupported content type: {0}".format(content_type)) @@ -458,7 +462,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == "multi": - new_params.extend((k, str(value)) for value in v) + new_params.extend((k, quote(str(value))) for value in v) else: if collection_format == "ssv": delimiter = " " @@ -474,7 +478,10 @@ def parameters_to_url_query(self, params, collection_formats): return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files: Dict[str, Union[str, bytes]]): + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): """Builds form parameters. :param files: File parameters. @@ -489,6 +496,12 @@ def files_parameters(self, files: Dict[str, Union[str, bytes]]): elif isinstance(v, bytes): filename = k filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue else: raise ValueError("Unsupported file value") mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" diff --git a/services/mongodbflex/src/stackit/mongodbflex/configuration.py b/services/mongodbflex/src/stackit/mongodbflex/configuration.py index 0b458a38..eb2beb5c 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/configuration.py +++ b/services/mongodbflex/src/stackit/mongodbflex/configuration.py @@ -1,21 +1,38 @@ # coding: utf-8 -import sys - -import os - - """ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 + +import sys +from typing import Dict, List, Optional, TypedDict + +from typing_extensions import NotRequired + +import os + + +ServerVariablesT = Dict[str, str] + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] class HostConfiguration: @@ -37,7 +54,7 @@ def __init__( ) """Constructor """ - self._base_path = "https://mongodb-flex-service.api.eu01.stackit.cloud" + self._base_path = "https://mongodb-flex-service.api.stackit.cloud" """Default Base url """ self.server_index = 0 if server_index is None else server_index @@ -54,26 +71,30 @@ def __init__( """Ignore operation servers """ - def get_host_settings(self): + def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings :return: An array of host settings """ return [ { - "url": "https://mongodb-flex-service.api.{region}stackit.cloud", + "url": "https://mongodb-flex-service.api.stackit.cloud", "description": "No description provided", "variables": { "region": { "description": "No description provided", - "default_value": "eu01.", - "enum_values": ["eu01."], + "default_value": "global", } }, } ] - def get_host_from_settings(self, index, variables=None, servers=None): + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT] = None, + servers: Optional[List[HostSetting]] = None, + ) -> str: """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value @@ -113,7 +134,7 @@ def get_host_from_settings(self, index, variables=None, servers=None): and variables.get(variable_name) is not None ): raise ValueError( - "this API does not support setting a region in the the client configuration, " + "this API does not support setting a region in the client configuration, " "please check if the region can be specified as a function parameter" ) used_value = variables.get(variable_name, variable["default_value"]) @@ -132,12 +153,12 @@ def get_host_from_settings(self, index, variables=None, servers=None): return url @property - def host(self): + def host(self) -> str: """Return generated host.""" return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter - def host(self, value): + def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/exceptions.py b/services/mongodbflex/src/stackit/mongodbflex/exceptions.py index 15ea88ee..4c4dcdec 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/exceptions.py +++ b/services/mongodbflex/src/stackit/mongodbflex/exceptions.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from typing import Any, Optional @@ -152,6 +152,13 @@ def from_response( if http_resp.status == 404: raise NotFoundException(http_resp=http_resp, body=body, data=data) + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + if 500 <= http_resp.status <= 599: raise ServiceException(http_resp=http_resp, body=body, data=data) raise ApiException(http_resp=http_resp, body=body, data=data) @@ -188,6 +195,18 @@ class ServiceException(ApiException): pass +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + + pass + + def render_path(path_to_item): """Returns a string representation of a path""" result = "" diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/__init__.py b/services/mongodbflex/src/stackit/mongodbflex/models/__init__.py index 6bccfe3d..b727d3a9 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/__init__.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/__init__.py @@ -6,12 +6,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 # import models into model package @@ -30,13 +30,6 @@ from stackit.mongodbflex.models.get_backup_response import GetBackupResponse from stackit.mongodbflex.models.get_instance_response import GetInstanceResponse from stackit.mongodbflex.models.get_user_response import GetUserResponse -from stackit.mongodbflex.models.handlers_infra_flavor import HandlersInfraFlavor -from stackit.mongodbflex.models.handlers_infra_get_flavors_response import ( - HandlersInfraGetFlavorsResponse, -) -from stackit.mongodbflex.models.handlers_instances_get_instance_response import ( - HandlersInstancesGetInstanceResponse, -) from stackit.mongodbflex.models.handlers_instances_slow_queries_response import ( HandlersInstancesSlowQueriesResponse, ) @@ -46,6 +39,7 @@ from stackit.mongodbflex.models.host import Host from stackit.mongodbflex.models.host_metric import HostMetric from stackit.mongodbflex.models.instance import Instance +from stackit.mongodbflex.models.instance_flavor import InstanceFlavor from stackit.mongodbflex.models.instance_list_instance import InstanceListInstance from stackit.mongodbflex.models.instance_response_user import InstanceResponseUser from stackit.mongodbflex.models.list_backups_response import ListBackupsResponse diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/acl.py b/services/mongodbflex/src/stackit/mongodbflex/models/acl.py index fd76b039..69b633d4 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/acl.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/acl.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class ACL(BaseModel): """ ACL - """ + """ # noqa: E501 items: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["items"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/backup.py b/services/mongodbflex/src/stackit/mongodbflex/models/backup.py index 900036d7..52823957 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/backup.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/backup.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class Backup(BaseModel): """ Backup - """ + """ # noqa: E501 end_time: Optional[StrictStr] = Field(default=None, alias="endTime") error: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/backup_schedule.py b/services/mongodbflex/src/stackit/mongodbflex/models/backup_schedule.py index 93a671d1..6fa3ad66 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/backup_schedule.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/backup_schedule.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class BackupSchedule(BaseModel): """ BackupSchedule - """ + """ # noqa: E501 backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule") daily_snapshot_retention_days: Optional[StrictInt] = Field(default=None, alias="dailySnapshotRetentionDays") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/clone_instance_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/clone_instance_payload.py index bf2560b2..3d980322 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/clone_instance_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/clone_instance_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class CloneInstancePayload(BaseModel): """ CloneInstancePayload - """ + """ # noqa: E501 instance_id: StrictStr = Field(alias="instanceId") timestamp: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/clone_instance_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/clone_instance_response.py index 2b19e095..dd17da38 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/clone_instance_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/clone_instance_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class CloneInstanceResponse(BaseModel): """ CloneInstanceResponse - """ + """ # noqa: E501 instance_id: Optional[StrictStr] = Field(default=None, alias="instanceId") __properties: ClassVar[List[str]] = ["instanceId"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/create_instance_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/create_instance_payload.py index dba81a9e..e7846d71 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/create_instance_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/create_instance_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,9 +28,11 @@ class CreateInstancePayload(BaseModel): """ CreateInstancePayload - """ + """ # noqa: E501 - acl: ACL + acl: ACL = Field( + description="ACL is the Access Control List defining the IP ranges allowed to connect to the database" + ) backup_schedule: StrictStr = Field(alias="backupSchedule") flavor_id: StrictStr = Field(alias="flavorId") labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Labels field is not certain/clear") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/create_instance_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/create_instance_response.py index 81d456e5..6a68772f 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/create_instance_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/create_instance_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class CreateInstanceResponse(BaseModel): """ CreateInstanceResponse - """ + """ # noqa: E501 id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/create_user_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/create_user_payload.py index 4735745a..6b9f0f1a 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/create_user_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/create_user_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class CreateUserPayload(BaseModel): """ CreateUserPayload - """ + """ # noqa: E501 database: StrictStr roles: List[StrictStr] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/create_user_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/create_user_response.py index 70807043..207b9f66 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/create_user_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/create_user_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class CreateUserResponse(BaseModel): """ CreateUserResponse - """ + """ # noqa: E501 item: Optional[User] = None __properties: ClassVar[List[str]] = ["item"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/data_point.py b/services/mongodbflex/src/stackit/mongodbflex/models/data_point.py index c01ea2db..8d49b263 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/data_point.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/data_point.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class DataPoint(BaseModel): """ DataPoint - """ + """ # noqa: E501 timestamp: Optional[StrictStr] = None value: Optional[Union[StrictFloat, StrictInt]] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/error.py b/services/mongodbflex/src/stackit/mongodbflex/models/error.py index b5c7a2b1..ec652464 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/error.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/error.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class Error(BaseModel): """ Error - """ + """ # noqa: E501 code: Optional[StrictInt] = None fields: Optional[Dict[str, List[StrictStr]]] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/flavor.py b/services/mongodbflex/src/stackit/mongodbflex/models/flavor.py index 128fbe89..81b637ed 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/flavor.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/flavor.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class Flavor(BaseModel): """ Flavor - """ + """ # noqa: E501 cpu: Optional[StrictInt] = None description: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/get_backup_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/get_backup_response.py index d7ad9884..afe68046 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/get_backup_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/get_backup_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class GetBackupResponse(BaseModel): """ GetBackupResponse - """ + """ # noqa: E501 item: Optional[Backup] = None __properties: ClassVar[List[str]] = ["item"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/get_instance_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/get_instance_response.py index d4be3d49..ceb7fd32 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/get_instance_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/get_instance_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class GetInstanceResponse(BaseModel): """ GetInstanceResponse - """ + """ # noqa: E501 item: Optional[Instance] = None __properties: ClassVar[List[str]] = ["item"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/get_user_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/get_user_response.py index 214c707f..02bfedb5 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/get_user_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/get_user_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class GetUserResponse(BaseModel): """ GetUserResponse - """ + """ # noqa: E501 item: Optional[InstanceResponseUser] = None __properties: ClassVar[List[str]] = ["item"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_get_flavors_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_get_flavors_response.py deleted file mode 100644 index 5170deb8..00000000 --- a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_get_flavors_response.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - STACKIT MongoDB Service API - - This is the documentation for the STACKIT MongoDB Flex Service API - - The version of the OpenAPI document: 1.0.0 - Contact: support@stackit.cloud - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 docstring might be too long - -from __future__ import annotations - -import json -import pprint -from typing import Any, ClassVar, Dict, List, Optional, Set - -from pydantic import BaseModel, ConfigDict -from typing_extensions import Self - -from stackit.mongodbflex.models.handlers_infra_flavor import HandlersInfraFlavor - - -class HandlersInfraGetFlavorsResponse(BaseModel): - """ - HandlersInfraGetFlavorsResponse - """ - - flavors: Optional[List[HandlersInfraFlavor]] = None - __properties: ClassVar[List[str]] = ["flavors"] - - model_config = ConfigDict( - populate_by_name=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""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HandlersInfraGetFlavorsResponse 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, - ) - # override the default output from pydantic by calling `to_dict()` of each item in flavors (list) - _items = [] - if self.flavors: - for _item in self.flavors: - if _item: - _items.append(_item.to_dict()) - _dict["flavors"] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HandlersInfraGetFlavorsResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate( - { - "flavors": ( - [HandlersInfraFlavor.from_dict(_item) for _item in obj["flavors"]] - if obj.get("flavors") is not None - else None - ) - } - ) - return _obj diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_get_instance_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_get_instance_response.py deleted file mode 100644 index 9ec41420..00000000 --- a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_get_instance_response.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - STACKIT MongoDB Service API - - This is the documentation for the STACKIT MongoDB Flex Service API - - The version of the OpenAPI document: 1.0.0 - Contact: support@stackit.cloud - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 docstring might be too long - -from __future__ import annotations - -import json -import pprint -from typing import Any, ClassVar, Dict, List, Optional, Set - -from pydantic import BaseModel, ConfigDict -from typing_extensions import Self - -from stackit.mongodbflex.models.instance import Instance - - -class HandlersInstancesGetInstanceResponse(BaseModel): - """ - HandlersInstancesGetInstanceResponse - """ - - item: Optional[Instance] = None - __properties: ClassVar[List[str]] = ["item"] - - model_config = ConfigDict( - populate_by_name=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""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HandlersInstancesGetInstanceResponse 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, - ) - # override the default output from pydantic by calling `to_dict()` of item - if self.item: - _dict["item"] = self.item.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HandlersInstancesGetInstanceResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({"item": Instance.from_dict(obj["item"]) if obj.get("item") is not None else None}) - return _obj diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_slow_queries_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_slow_queries_response.py index 3131c5a1..4e7014b1 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_slow_queries_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_slow_queries_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class HandlersInstancesSlowQueriesResponse(BaseModel): """ HandlersInstancesSlowQueriesResponse - """ + """ # noqa: E501 slow_queries: Optional[List[SlowQuery]] = Field( default=None, diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_suggested_indexes_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_suggested_indexes_response.py index d767ea53..27355987 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_suggested_indexes_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/handlers_instances_suggested_indexes_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,7 +28,7 @@ class HandlersInstancesSuggestedIndexesResponse(BaseModel): """ HandlersInstancesSuggestedIndexesResponse - """ + """ # noqa: E501 shapes: Optional[List[Shape]] = Field( default=None, diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/host.py b/services/mongodbflex/src/stackit/mongodbflex/models/host.py index 874a169b..aa76dbbf 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/host.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/host.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class Host(BaseModel): """ Host - """ + """ # noqa: E501 host_metrics: Optional[List[HostMetric]] = Field(default=None, alias="hostMetrics") id: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/host_metric.py b/services/mongodbflex/src/stackit/mongodbflex/models/host_metric.py index c8c8dd55..7c923f07 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/host_metric.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/host_metric.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class HostMetric(BaseModel): """ HostMetric - """ + """ # noqa: E501 datapoints: Optional[List[DataPoint]] = None name: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/instance.py b/services/mongodbflex/src/stackit/mongodbflex/models/instance.py index b0a4d1cf..51ab4820 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/instance.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/instance.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -29,7 +29,7 @@ class Instance(BaseModel): """ Instance - """ + """ # noqa: E501 acl: Optional[ACL] = None backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_flavor.py b/services/mongodbflex/src/stackit/mongodbflex/models/instance_flavor.py similarity index 89% rename from services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_flavor.py rename to services/mongodbflex/src/stackit/mongodbflex/models/instance_flavor.py index ad71aeaf..91117dc5 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_flavor.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/instance_flavor.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -22,10 +22,10 @@ from typing_extensions import Self -class HandlersInfraFlavor(BaseModel): - """ - HandlersInfraFlavor +class InstanceFlavor(BaseModel): """ + InstanceFlavor + """ # noqa: E501 categories: Optional[List[StrictStr]] = None cpu: Optional[StrictInt] = None @@ -51,7 +51,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HandlersInfraFlavor from a JSON string""" + """Create an instance of InstanceFlavor from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -75,7 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HandlersInfraFlavor from a dict""" + """Create an instance of InstanceFlavor from a dict""" if obj is None: return None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/instance_list_instance.py b/services/mongodbflex/src/stackit/mongodbflex/models/instance_list_instance.py index dfd495e2..507579a7 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/instance_list_instance.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/instance_list_instance.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class InstanceListInstance(BaseModel): """ InstanceListInstance - """ + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/instance_response_user.py b/services/mongodbflex/src/stackit/mongodbflex/models/instance_response_user.py index 8ec7b15f..a98436ad 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/instance_response_user.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/instance_response_user.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class InstanceResponseUser(BaseModel): """ InstanceResponseUser - """ + """ # noqa: E501 database: Optional[StrictStr] = None host: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_backups_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_backups_response.py index ba158364..e81fdc6c 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_backups_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_backups_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class ListBackupsResponse(BaseModel): """ ListBackupsResponse - """ + """ # noqa: E501 count: Optional[StrictInt] = None items: Optional[List[Backup]] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_flavors_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_flavors_response.py index 5d3333fb..ffb42d64 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_flavors_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_flavors_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -21,15 +21,15 @@ from pydantic import BaseModel, ConfigDict from typing_extensions import Self -from stackit.mongodbflex.models.handlers_infra_flavor import HandlersInfraFlavor +from stackit.mongodbflex.models.instance_flavor import InstanceFlavor class ListFlavorsResponse(BaseModel): """ ListFlavorsResponse - """ + """ # noqa: E501 - flavors: Optional[List[HandlersInfraFlavor]] = None + flavors: Optional[List[InstanceFlavor]] = None __properties: ClassVar[List[str]] = ["flavors"] model_config = ConfigDict( @@ -90,7 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "flavors": ( - [HandlersInfraFlavor.from_dict(_item) for _item in obj["flavors"]] + [InstanceFlavor.from_dict(_item) for _item in obj["flavors"]] if obj.get("flavors") is not None else None ) diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_instances_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_instances_response.py index 96bfa0ef..f43a4fc2 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_instances_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_instances_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class ListInstancesResponse(BaseModel): """ ListInstancesResponse - """ + """ # noqa: E501 count: Optional[StrictInt] = None items: Optional[List[InstanceListInstance]] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_metrics_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_metrics_response.py index a9d0c0ec..222f54ba 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_metrics_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_metrics_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class ListMetricsResponse(BaseModel): """ ListMetricsResponse - """ + """ # noqa: E501 hosts: Optional[List[Host]] = None __properties: ClassVar[List[str]] = ["hosts"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_restore_jobs_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_restore_jobs_response.py index 376cd503..af32667d 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_restore_jobs_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_restore_jobs_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class ListRestoreJobsResponse(BaseModel): """ ListRestoreJobsResponse - """ + """ # noqa: E501 items: Optional[List[RestoreInstanceStatus]] = None __properties: ClassVar[List[str]] = ["items"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_storages_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_storages_response.py index 9b26e1c3..0a90804f 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_storages_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_storages_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class ListStoragesResponse(BaseModel): """ ListStoragesResponse - """ + """ # noqa: E501 storage_classes: Optional[List[StrictStr]] = Field(default=None, alias="storageClasses") storage_range: Optional[StorageRange] = Field(default=None, alias="storageRange") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_user.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_user.py index 2d20201e..4eeb4ebc 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_user.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_user.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class ListUser(BaseModel): """ ListUser - """ + """ # noqa: E501 id: Optional[StrictStr] = None username: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_users_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_users_response.py index 2c90b78b..d7723ce5 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_users_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_users_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class ListUsersResponse(BaseModel): """ ListUsersResponse - """ + """ # noqa: E501 count: Optional[StrictInt] = None items: Optional[List[ListUser]] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/list_versions_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/list_versions_response.py index ed4b45cb..df16cbca 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/list_versions_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/list_versions_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class ListVersionsResponse(BaseModel): """ ListVersionsResponse - """ + """ # noqa: E501 versions: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["versions"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/mongodbatlas_operation.py b/services/mongodbflex/src/stackit/mongodbflex/models/mongodbatlas_operation.py index fd188528..e9b1adf2 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/mongodbatlas_operation.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/mongodbatlas_operation.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class MongodbatlasOperation(BaseModel): """ MongodbatlasOperation - """ + """ # noqa: E501 predicates: Optional[List[Dict[str, Any]]] = Field( default=None, description="Documents containing the search criteria used by the query." diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/mongodbatlas_stats.py b/services/mongodbflex/src/stackit/mongodbflex/models/mongodbatlas_stats.py index a8b61286..3be06ac0 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/mongodbatlas_stats.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/mongodbatlas_stats.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class MongodbatlasStats(BaseModel): """ MongodbatlasStats - """ + """ # noqa: E501 ms: Optional[Union[StrictFloat, StrictInt]] = Field( default=None, description="Duration in milliseconds of the query." diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/partial_update_instance_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/partial_update_instance_payload.py index 96beae0a..60ad4ea3 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/partial_update_instance_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/partial_update_instance_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,7 +28,7 @@ class PartialUpdateInstancePayload(BaseModel): """ PartialUpdateInstancePayload - """ + """ # noqa: E501 acl: Optional[ACL] = None backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/partial_update_user_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/partial_update_user_payload.py index 6e136561..48b79fdf 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/partial_update_user_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/partial_update_user_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class PartialUpdateUserPayload(BaseModel): """ PartialUpdateUserPayload - """ + """ # noqa: E501 database: Optional[StrictStr] = None roles: Optional[List[StrictStr]] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_payload.py index 9611c997..e5df7c65 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class RestoreInstancePayload(BaseModel): """ RestoreInstancePayload - """ + """ # noqa: E501 backup_id: StrictStr = Field(alias="backupId") instance_id: StrictStr = Field(alias="instanceId") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_response.py index 14b21d82..c1189c7a 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class RestoreInstanceResponse(BaseModel): """ RestoreInstanceResponse - """ + """ # noqa: E501 item: Optional[RestoreInstanceStatus] = None __properties: ClassVar[List[str]] = ["item"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_status.py b/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_status.py index 67ccf118..0ac67b28 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_status.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/restore_instance_status.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class RestoreInstanceStatus(BaseModel): """ RestoreInstanceStatus - """ + """ # noqa: E501 backup_id: Optional[StrictStr] = Field(default=None, alias="backupID") var_date: Optional[StrictStr] = Field(default=None, alias="date") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/shape.py b/services/mongodbflex/src/stackit/mongodbflex/models/shape.py index bc3b4fcd..34838495 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/shape.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/shape.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class Shape(BaseModel): """ Shape - """ + """ # noqa: E501 avg_ms: Optional[Union[StrictFloat, StrictInt]] = Field( default=None, diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/slow_query.py b/services/mongodbflex/src/stackit/mongodbflex/models/slow_query.py index 9d66f328..d24ec22d 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/slow_query.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/slow_query.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class SlowQuery(BaseModel): """ SlowQuery - """ + """ # noqa: E501 line: Optional[StrictStr] = Field(default=None, description="The raw log line pertaining to the slow query.") namespace: Optional[StrictStr] = Field(default=None, description="The namespace in which the slow query ran.") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/storage.py b/services/mongodbflex/src/stackit/mongodbflex/models/storage.py index b128d6d7..5f01b0ab 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/storage.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/storage.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class Storage(BaseModel): """ Storage - """ + """ # noqa: E501 var_class: Optional[StrictStr] = Field(default=None, alias="class") size: Optional[StrictInt] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/storage_range.py b/services/mongodbflex/src/stackit/mongodbflex/models/storage_range.py index 03ca8ac1..2d7fbaa3 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/storage_range.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/storage_range.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class StorageRange(BaseModel): """ StorageRange - """ + """ # noqa: E501 max: Optional[StrictInt] = None min: Optional[StrictInt] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/suggested_index.py b/services/mongodbflex/src/stackit/mongodbflex/models/suggested_index.py index f3c5bfc8..b8c8883d 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/suggested_index.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/suggested_index.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class SuggestedIndex(BaseModel): """ SuggestedIndex - """ + """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Unique id for this suggested index.") impact: Optional[List[StrictStr]] = Field( diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/update_backup_schedule_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/update_backup_schedule_payload.py index 01855bd0..eae84e23 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/update_backup_schedule_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/update_backup_schedule_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class UpdateBackupSchedulePayload(BaseModel): """ UpdateBackupSchedulePayload - """ + """ # noqa: E501 backup_schedule: Optional[StrictStr] = Field(default=None, alias="backupSchedule") daily_snapshot_retention_days: Optional[StrictInt] = Field(default=None, alias="dailySnapshotRetentionDays") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/update_instance_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/update_instance_payload.py index 92f657bc..7477585b 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/update_instance_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/update_instance_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -28,7 +28,7 @@ class UpdateInstancePayload(BaseModel): """ UpdateInstancePayload - """ + """ # noqa: E501 acl: ACL backup_schedule: StrictStr = Field(alias="backupSchedule") diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/update_instance_response.py b/services/mongodbflex/src/stackit/mongodbflex/models/update_instance_response.py index 8bc2a7d6..e6423082 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/update_instance_response.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/update_instance_response.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -27,7 +27,7 @@ class UpdateInstanceResponse(BaseModel): """ UpdateInstanceResponse - """ + """ # noqa: E501 item: Optional[Instance] = None __properties: ClassVar[List[str]] = ["item"] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/update_user_payload.py b/services/mongodbflex/src/stackit/mongodbflex/models/update_user_payload.py index d01aa979..fd57ef89 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/update_user_payload.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/update_user_payload.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class UpdateUserPayload(BaseModel): """ UpdateUserPayload - """ + """ # noqa: E501 database: StrictStr roles: List[StrictStr] diff --git a/services/mongodbflex/src/stackit/mongodbflex/models/user.py b/services/mongodbflex/src/stackit/mongodbflex/models/user.py index f34eca78..98aa0a57 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/user.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/user.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 from __future__ import annotations @@ -25,7 +25,7 @@ class User(BaseModel): """ User - """ + """ # noqa: E501 database: Optional[StrictStr] = None host: Optional[StrictStr] = None diff --git a/services/mongodbflex/src/stackit/mongodbflex/rest.py b/services/mongodbflex/src/stackit/mongodbflex/rest.py index c5559b93..a8bfd49a 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/rest.py +++ b/services/mongodbflex/src/stackit/mongodbflex/rest.py @@ -5,12 +5,12 @@ This is the documentation for the STACKIT MongoDB Flex Service API - The version of the OpenAPI document: 1.0.0 + The version of the OpenAPI document: 2.0.0 Contact: support@stackit.cloud Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. -""" # noqa: E501 docstring might be too long +""" # noqa: E501 import io import json @@ -125,7 +125,7 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque data=body, headers=headers, ) - elif headers["Content-Type"] == "text/plain" and isinstance(body, bool): + elif headers["Content-Type"].startswith("text/") and isinstance(body, bool): request_body = "true" if body else "false" r = self.session.request(method, url, data=request_body, headers=headers) else: