diff --git a/services/mongodbflex/src/stackit/mongodbflex/__init__.py b/services/mongodbflex/src/stackit/mongodbflex/__init__.py index edfafab0..ffdfd67a 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/__init__.py +++ b/services/mongodbflex/src/stackit/mongodbflex/__init__.py @@ -7,97 +7,214 @@ 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", + "HandlersInfraFlavor", + "HandlersInfraGetFlavorsResponse", + "HandlersInstancesGetInstanceResponse", + "HandlersInstancesSlowQueriesResponse", + "HandlersInstancesSuggestedIndexesResponse", + "Host", + "HostMetric", + "Instance", + "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.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_infra_flavor import ( + HandlersInfraFlavor as HandlersInfraFlavor, +) from stackit.mongodbflex.models.handlers_infra_get_flavors_response import ( - HandlersInfraGetFlavorsResponse, + HandlersInfraGetFlavorsResponse as HandlersInfraGetFlavorsResponse, ) from stackit.mongodbflex.models.handlers_instances_get_instance_response import ( - HandlersInstancesGetInstanceResponse, + HandlersInstancesGetInstanceResponse as HandlersInstancesGetInstanceResponse, ) 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_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..e19fcdeb 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 @@ -28,8 +34,13 @@ from stackit.mongodbflex.models.create_user_payload import CreateUserPayload from stackit.mongodbflex.models.create_user_response import CreateUserResponse 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_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, ) @@ -37,7 +48,6 @@ HandlersInstancesSuggestedIndexesResponse, ) 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 from stackit.mongodbflex.models.list_restore_jobs_response import ( @@ -82,6 +92,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 +112,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 +136,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 +152,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 +167,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 +187,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 +211,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 +227,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 +242,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 +262,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 +286,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 +302,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 +312,7 @@ def _clone_instance_serialize( self, project_id, instance_id, + region, clone_instance_payload, _request_auth, _content_type, @@ -302,7 +328,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 +336,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 +362,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 +379,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 +397,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 +421,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 +436,7 @@ def create_instance( _response_types_map: Dict[str, Optional[str]] = { "202": "CreateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -418,6 +451,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 +469,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 +493,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 +508,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 +523,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 +541,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 +565,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 +580,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 +590,7 @@ def create_instance_without_preload_content( def _create_instance_serialize( self, project_id, + region, create_instance_payload, _request_auth, _content_type, @@ -562,12 +606,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 +638,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 +656,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 +676,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 +700,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 +716,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 +733,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 +753,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 +777,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 +793,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 +810,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 +830,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 +854,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 +870,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 +882,7 @@ def _create_user_serialize( self, project_id, instance_id, + region, create_user_payload, _request_auth, _content_type, @@ -836,7 +898,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 +906,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 +932,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 +950,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 +969,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 +991,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 +1006,7 @@ def delete_instance( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -953,6 +1022,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 +1041,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 +1063,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 +1078,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 +1094,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 +1113,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 +1135,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 +1150,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 +1161,7 @@ def _delete_instance_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -1096,7 +1176,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 +1184,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 +1193,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 +1219,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 +1240,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 +1262,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 +1277,8 @@ def delete_user( _response_types_map: Dict[str, Optional[str]] = { "200": None, + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -1207,6 +1295,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 +1316,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 +1338,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 +1353,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 +1371,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 +1392,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 +1414,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 +1429,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 +1442,7 @@ def _delete_user_serialize( project_id, instance_id, user_id, + region, _request_auth, _content_type, _headers, @@ -1356,7 +1457,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 +1467,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 +1483,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 +1502,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 +1523,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 +1545,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 +1561,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 +1577,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 +1598,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 +1620,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 +1636,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 +1652,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 +1673,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 +1695,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 +1711,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 +1722,7 @@ def _get_backup_serialize( project_id, instance_id, backup_id, + region, _request_auth, _content_type, _headers, @@ -1618,7 +1737,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 +1747,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 +1763,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 +1781,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)], @@ -1669,7 +1791,7 @@ def get_instance( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetInstanceResponse: + ) -> HandlersInstancesGetInstanceResponse: """Get instance gets information of an instance @@ -1678,6 +1800,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 +1822,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, @@ -1710,8 +1835,9 @@ def get_instance( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceResponse", + "200": "HandlersInstancesGetInstanceResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1726,6 +1852,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)], @@ -1735,7 +1862,7 @@ def get_instance_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetInstanceResponse]: + ) -> ApiResponse[HandlersInstancesGetInstanceResponse]: """Get instance gets information of an instance @@ -1744,6 +1871,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 +1893,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, @@ -1776,8 +1906,9 @@ def get_instance_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceResponse", + "200": "HandlersInstancesGetInstanceResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1792,6 +1923,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 +1942,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 +1964,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, @@ -1842,8 +1977,9 @@ def get_instance_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceResponse", + "200": "HandlersInstancesGetInstanceResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -1853,6 +1989,7 @@ def _get_instance_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -1867,7 +2004,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 +2012,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 +2028,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 +2047,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 +2068,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 +2090,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 +2105,8 @@ def get_user( _response_types_map: Dict[str, Optional[str]] = { "200": "GetUserResponse", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -1978,6 +2123,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 +2144,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 +2166,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 +2181,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 +2199,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 +2220,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 +2242,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 +2257,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 +2270,7 @@ def _get_user_serialize( project_id, instance_id, user_id, + region, _request_auth, _content_type, _headers, @@ -2127,7 +2285,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 +2295,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 +2311,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 +2329,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 +2348,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 +2370,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 +2385,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 +2401,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 +2420,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 +2442,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 +2457,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 +2473,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 +2492,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 +2514,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 +2529,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 +2540,7 @@ def _list_advisor_slow_queries_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -2379,7 +2555,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 +2563,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 +2579,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 +2597,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 +2616,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 +2638,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 +2653,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 +2668,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 +2687,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 +2709,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 +2724,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 +2739,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 +2758,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 +2780,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 +2795,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 +2805,7 @@ def _list_backups_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -2626,7 +2820,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 +2828,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 +2844,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 +2861,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)], @@ -2674,13 +2871,15 @@ def list_flavors( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListFlavorsResponse: + ) -> HandlersInfraGetFlavorsResponse: """Flavors returns all possible 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 +2900,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, @@ -2712,8 +2912,9 @@ def list_flavors( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListFlavorsResponse", + "200": "HandlersInfraGetFlavorsResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2727,6 +2928,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)], @@ -2736,13 +2938,15 @@ def list_flavors_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListFlavorsResponse]: + ) -> ApiResponse[HandlersInfraGetFlavorsResponse]: """Flavors returns all possible 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 @@ -2763,10 +2967,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, @@ -2774,8 +2979,9 @@ def list_flavors_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListFlavorsResponse", + "200": "HandlersInfraGetFlavorsResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2789,6 +2995,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 +3012,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 +3034,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, @@ -2836,8 +3046,9 @@ def list_flavors_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListFlavorsResponse", + "200": "HandlersInfraGetFlavorsResponse", "400": "Error", + "401": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2846,6 +3057,7 @@ def list_flavors_without_preload_content( def _list_flavors_serialize( self, project_id, + region, _request_auth, _content_type, _headers, @@ -2860,12 +3072,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 +3094,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 +3112,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 +3131,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 +3153,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 +3168,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 +3183,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 +3202,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 +3224,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 +3239,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 +3254,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 +3273,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 +3295,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 +3310,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 +3320,7 @@ def _list_instances_serialize( self, project_id, tag, + region, _request_auth, _content_type, _headers, @@ -3105,12 +3335,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 +3361,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 +3381,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 +3407,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 +3435,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 +3455,7 @@ def list_metrics( _response_types_map: Dict[str, Optional[str]] = { "200": "ListMetricsResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -3236,6 +3473,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 +3499,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 +3527,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 +3547,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 +3565,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 +3591,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 +3619,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 +3639,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 +3652,7 @@ def _list_metrics_serialize( instance_id, metric, granularity, + region, period, start, end, @@ -3422,7 +3670,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 +3680,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 +3712,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 +3730,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 +3749,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 +3771,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 +3786,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 +3801,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 +3820,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 +3842,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 +3857,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 +3872,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 +3891,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 +3913,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 +3928,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 +3938,7 @@ def _list_restore_jobs_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -3687,7 +3953,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 +3961,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 +3977,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 +3995,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 +4014,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 +4036,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 +4051,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 +4066,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 +4085,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 +4107,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 +4122,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 +4137,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 +4156,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 +4178,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 +4193,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 +4203,7 @@ def _list_storages_serialize( self, project_id, flavor, + region, _request_auth, _content_type, _headers, @@ -3934,7 +4218,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 +4226,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 +4242,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 +4260,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 +4279,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 +4301,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 +4316,7 @@ def list_suggested_indexes( _response_types_map: Dict[str, Optional[str]] = { "200": "HandlersInstancesSuggestedIndexesResponse", "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -4041,6 +4332,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 +4351,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 +4373,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 +4388,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 +4404,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 +4423,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 +4445,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 +4460,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 +4471,7 @@ def _list_suggested_indexes_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -4184,7 +4486,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 +4494,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 +4510,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 +4528,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 +4547,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 +4569,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 +4583,8 @@ def list_users( _response_types_map: Dict[str, Optional[str]] = { "200": "ListUsersResponse", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -4290,6 +4600,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 +4619,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 +4641,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 +4655,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 +4672,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 +4691,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 +4713,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 +4727,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 +4739,7 @@ def _list_users_serialize( self, project_id, instance_id, + region, _request_auth, _content_type, _headers, @@ -4431,7 +4754,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 +4762,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 +4778,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 +4795,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 +4812,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 +4834,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 +4848,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 +4861,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 +4878,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 +4900,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 +4914,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 +4927,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 +4944,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 +4966,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 +4980,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 +4988,7 @@ def list_versions_without_preload_content( def _list_versions_serialize( self, project_id, + region, _request_auth, _content_type, _headers, @@ -4662,12 +5003,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 +5025,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 +5043,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 +5063,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 +5087,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 +5104,7 @@ def partial_update_instance( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -4773,6 +5121,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 +5141,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 +5165,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 +5182,7 @@ def partial_update_instance_with_http_info( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -4846,6 +5199,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 +5219,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 +5243,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 +5260,7 @@ def partial_update_instance_without_preload_content( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -4914,6 +5272,7 @@ def _partial_update_instance_serialize( self, project_id, instance_id, + region, partial_update_instance_payload, _request_auth, _content_type, @@ -4929,7 +5288,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 +5296,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 +5322,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 +5341,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 +5363,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 +5387,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 +5404,7 @@ def partial_update_user( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "409": "Error", } @@ -5055,6 +5421,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 +5443,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 +5467,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 +5484,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 +5501,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 +5523,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 +5547,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 +5564,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 +5576,7 @@ def _partial_update_user_serialize( project_id, instance_id, user_id, + region, partial_update_user_payload, _request_auth, _content_type, @@ -5215,7 +5592,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 +5602,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 +5628,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 +5647,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 +5668,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 +5690,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 +5705,8 @@ def reset_user( _response_types_map: Dict[str, Optional[str]] = { "202": "User", + "400": "Error", + "401": "Error", "404": "Error", "500": "Error", } @@ -5338,6 +5723,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 +5744,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 +5766,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 +5781,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 +5799,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 +5820,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 +5842,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 +5857,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 +5870,7 @@ def _reset_user_serialize( project_id, instance_id, user_id, + region, _request_auth, _content_type, _headers, @@ -5487,7 +5885,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 +5895,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 +5911,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 +5929,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 +5949,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 +5973,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 +5989,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 +6004,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 +6024,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 +6048,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 +6064,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 +6079,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 +6099,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 +6123,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 +6139,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 +6149,7 @@ def _restore_instance_serialize( self, project_id, instance_id, + region, restore_instance_payload, _request_auth, _content_type, @@ -5749,7 +6165,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 +6173,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 +6199,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 +6217,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 +6237,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 +6261,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 +6277,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 +6292,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 +6312,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 +6336,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 +6352,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 +6367,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 +6387,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 +6411,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 +6427,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 +6437,7 @@ def _update_backup_schedule_serialize( self, project_id, instance_id, + region, update_backup_schedule_payload, _request_auth, _content_type, @@ -6019,7 +6453,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 +6461,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 +6487,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 +6505,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 +6525,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 +6549,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 +6566,7 @@ def update_instance( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -6142,6 +6583,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 +6603,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 +6627,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 +6644,7 @@ def update_instance_with_http_info( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -6215,6 +6661,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 +6681,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 +6705,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 +6722,7 @@ def update_instance_without_preload_content( "200": "UpdateInstanceResponse", "202": "UpdateInstanceResponse", "400": "Error", + "401": "Error", "404": "Error", "409": "Error", "500": "Error", @@ -6283,6 +6734,7 @@ def _update_instance_serialize( self, project_id, instance_id, + region, update_instance_payload, _request_auth, _content_type, @@ -6298,7 +6750,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 +6758,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 +6784,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 +6803,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 +6825,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 +6849,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 +6866,7 @@ def update_user( _response_types_map: Dict[str, Optional[str]] = { "200": None, "400": "Error", + "401": "Error", "404": "Error", "409": "Error", } @@ -6424,6 +6883,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 +6905,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 +6929,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 +6946,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 +6963,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 +6985,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 +7009,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 +7026,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 +7038,7 @@ def _update_user_serialize( project_id, instance_id, user_id, + region, update_user_payload, _request_auth, _content_type, @@ -6584,7 +7054,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 +7064,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 +7090,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..becbcc15 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() + 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..b43f5569 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 @@ -128,7 +128,7 @@ def __init__( if self.body is None: try: self.body = http_resp.data.decode("utf-8") - except Exception: # noqa: S110 + except Exception: pass self.headers = http_resp.getheaders() @@ -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..a2cf658f 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 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_flavor.py b/services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_flavor.py index ad71aeaf..f210482c 100644 --- a/services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_flavor.py +++ b/services/mongodbflex/src/stackit/mongodbflex/models/handlers_infra_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 HandlersInfraFlavor(BaseModel): """ HandlersInfraFlavor - """ + """ # noqa: E501 categories: Optional[List[StrictStr]] = None cpu: Optional[StrictInt] = None 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 index 5170deb8..a69970b8 100644 --- 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 @@ -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 HandlersInfraGetFlavorsResponse(BaseModel): """ HandlersInfraGetFlavorsResponse - """ + """ # noqa: E501 flavors: Optional[List[HandlersInfraFlavor]] = None __properties: ClassVar[List[str]] = ["flavors"] 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 index 9ec41420..1c74a87d 100644 --- 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 @@ -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 HandlersInstancesGetInstanceResponse(BaseModel): """ HandlersInstancesGetInstanceResponse - """ + """ # noqa: E501 item: Optional[Instance] = None __properties: ClassVar[List[str]] = ["item"] 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/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..6e80d35f 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 @@ -27,7 +27,7 @@ class ListFlavorsResponse(BaseModel): """ ListFlavorsResponse - """ + """ # noqa: E501 flavors: Optional[List[HandlersInfraFlavor]] = None __properties: ClassVar[List[str]] = ["flavors"] 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: