From bb44f718ee126474e7be8bb33ed60aaf5ee71262 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 20 Sep 2023 15:01:44 +0000 Subject: [PATCH] feat: update generated APIs --- .../scaleway_async/rdb/v1/marshalling.py | 210 +++++++++--------- scaleway-async/scaleway_async/rdb/v1/types.py | 1 + scaleway/scaleway/rdb/v1/marshalling.py | 210 +++++++++--------- scaleway/scaleway/rdb/v1/types.py | 1 + 4 files changed, 212 insertions(+), 210 deletions(-) diff --git a/scaleway-async/scaleway_async/rdb/v1/marshalling.py b/scaleway-async/scaleway_async/rdb/v1/marshalling.py index 9800f2c81..0c962ad9a 100644 --- a/scaleway-async/scaleway_async/rdb/v1/marshalling.py +++ b/scaleway-async/scaleway_async/rdb/v1/marshalling.py @@ -99,9 +99,9 @@ def unmarshal_EndpointDirectAccessDetails(data: Any) -> EndpointDirectAccessDetails: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EndpointDirectAccessDetails' failed as data isn't a dictionary." + f"Unmarshalling the type 'EndpointDirectAccessDetails' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -110,9 +110,9 @@ def unmarshal_EndpointDirectAccessDetails(data: Any) -> EndpointDirectAccessDeta def unmarshal_EndpointLoadBalancerDetails(data: Any) -> EndpointLoadBalancerDetails: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EndpointLoadBalancerDetails' failed as data isn't a dictionary." + f"Unmarshalling the type 'EndpointLoadBalancerDetails' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -121,9 +121,9 @@ def unmarshal_EndpointLoadBalancerDetails(data: Any) -> EndpointLoadBalancerDeta def unmarshal_EndpointPrivateNetworkDetails(data: Any) -> EndpointPrivateNetworkDetails: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary." + f"Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -141,9 +141,9 @@ def unmarshal_EndpointPrivateNetworkDetails(data: Any) -> EndpointPrivateNetwork def unmarshal_Endpoint(data: Any) -> Endpoint: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Endpoint' failed as data isn't a dictionary." + f"Unmarshalling the type 'Endpoint' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -182,9 +182,9 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: def unmarshal_EngineSetting(data: Any) -> EngineSetting: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary." + f"Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -226,9 +226,9 @@ def unmarshal_EngineSetting(data: Any) -> EngineSetting: def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary." + f"Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -240,7 +240,7 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: args["frequency"] = field field = data.get("next_run_at", None) - args["next_run_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["next_run_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("retention", None) args["retention"] = field @@ -249,9 +249,9 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: def unmarshal_EngineVersion(data: Any) -> EngineVersion: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EngineVersion' failed as data isn't a dictionary." + f"Unmarshalling the type 'EngineVersion' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -273,7 +273,7 @@ def unmarshal_EngineVersion(data: Any) -> EngineVersion: args["disabled"] = field field = data.get("end_of_life", None) - args["end_of_life"] = parser.isoparse(field) if isinstance(field, str) else field + args["end_of_life"] = parser.isoparse(field) if type(field) is str else field field = data.get("name", None) args["name"] = field @@ -285,9 +285,9 @@ def unmarshal_EngineVersion(data: Any) -> EngineVersion: def unmarshal_InstanceSetting(data: Any) -> InstanceSetting: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary." + f"Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -302,9 +302,9 @@ def unmarshal_InstanceSetting(data: Any) -> InstanceSetting: def unmarshal_LogsPolicy(data: Any) -> LogsPolicy: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'LogsPolicy' failed as data isn't a dictionary." + f"Unmarshalling the type 'LogsPolicy' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -319,35 +319,35 @@ def unmarshal_LogsPolicy(data: Any) -> LogsPolicy: def unmarshal_Maintenance(data: Any) -> Maintenance: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Maintenance' failed as data isn't a dictionary." + f"Unmarshalling the type 'Maintenance' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("closed_at", None) - args["closed_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["closed_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("reason", None) args["reason"] = field field = data.get("starts_at", None) - args["starts_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["starts_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("status", None) args["status"] = field field = data.get("stops_at", None) - args["stops_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["stops_at"] = parser.isoparse(field) if type(field) is str else field return Maintenance(**args) def unmarshal_NodeTypeVolumeConstraintSizes(data: Any) -> NodeTypeVolumeConstraintSizes: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'NodeTypeVolumeConstraintSizes' failed as data isn't a dictionary." + f"Unmarshalling the type 'NodeTypeVolumeConstraintSizes' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -362,9 +362,9 @@ def unmarshal_NodeTypeVolumeConstraintSizes(data: Any) -> NodeTypeVolumeConstrai def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary." + f"Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -388,9 +388,9 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: def unmarshal_ReadReplica(data: Any) -> ReadReplica: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary." + f"Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -416,9 +416,9 @@ def unmarshal_ReadReplica(data: Any) -> ReadReplica: def unmarshal_UpgradableVersion(data: Any) -> UpgradableVersion: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'UpgradableVersion' failed as data isn't a dictionary." + f"Unmarshalling the type 'UpgradableVersion' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -439,9 +439,9 @@ def unmarshal_UpgradableVersion(data: Any) -> UpgradableVersion: def unmarshal_Volume(data: Any) -> Volume: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Volume' failed as data isn't a dictionary." + f"Unmarshalling the type 'Volume' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -456,9 +456,9 @@ def unmarshal_Volume(data: Any) -> Volume: def unmarshal_ACLRule(data: Any) -> ACLRule: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ACLRule' failed as data isn't a dictionary." + f"Unmarshalling the type 'ACLRule' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -485,9 +485,9 @@ def unmarshal_ACLRule(data: Any) -> ACLRule: def unmarshal_Database(data: Any) -> Database: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Database' failed as data isn't a dictionary." + f"Unmarshalling the type 'Database' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -508,15 +508,15 @@ def unmarshal_Database(data: Any) -> Database: def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary." + f"Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("database_name", None) args["database_name"] = field @@ -526,11 +526,11 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: field = data.get("download_url_expires_at", None) args["download_url_expires_at"] = ( - parser.isoparse(field) if isinstance(field, str) else field + parser.isoparse(field) if type(field) is str else field ) field = data.get("expires_at", None) - args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["expires_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("id", None) args["id"] = field @@ -557,15 +557,15 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: args["status"] = field field = data.get("updated_at", None) - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["updated_at"] = parser.isoparse(field) if type(field) is str else field return DatabaseBackup(**args) def unmarshal_DatabaseEngine(data: Any) -> DatabaseEngine: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary." + f"Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -588,9 +588,9 @@ def unmarshal_DatabaseEngine(data: Any) -> DatabaseEngine: def unmarshal_Instance(data: Any) -> Instance: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Instance' failed as data isn't a dictionary." + f"Unmarshalling the type 'Instance' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -604,7 +604,7 @@ def unmarshal_Instance(data: Any) -> Instance: ) field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("endpoint", None) args["endpoint"] = unmarshal_Endpoint(field) if field is not None else None @@ -679,21 +679,21 @@ def unmarshal_Instance(data: Any) -> Instance: def unmarshal_InstanceLog(data: Any) -> InstanceLog: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary." + f"Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("download_url", None) args["download_url"] = field field = data.get("expires_at", None) - args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["expires_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("id", None) args["id"] = field @@ -713,9 +713,9 @@ def unmarshal_InstanceLog(data: Any) -> InstanceLog: def unmarshal_ListInstanceLogsDetailsResponseInstanceLogDetail( data: Any, ) -> ListInstanceLogsDetailsResponseInstanceLogDetail: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -730,9 +730,9 @@ def unmarshal_ListInstanceLogsDetailsResponseInstanceLogDetail( def unmarshal_NodeType(data: Any) -> NodeType: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'NodeType' failed as data isn't a dictionary." + f"Unmarshalling the type 'NodeType' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -787,9 +787,9 @@ def unmarshal_NodeType(data: Any) -> NodeType: def unmarshal_Privilege(data: Any) -> Privilege: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Privilege' failed as data isn't a dictionary." + f"Unmarshalling the type 'Privilege' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -807,18 +807,18 @@ def unmarshal_Privilege(data: Any) -> Privilege: def unmarshal_Snapshot(data: Any) -> Snapshot: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Snapshot' failed as data isn't a dictionary." + f"Unmarshalling the type 'Snapshot' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("expires_at", None) - args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["expires_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("id", None) args["id"] = field @@ -845,15 +845,15 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: args["status"] = field field = data.get("updated_at", None) - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["updated_at"] = parser.isoparse(field) if type(field) is str else field return Snapshot(**args) def unmarshal_User(data: Any) -> User: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'User' failed as data isn't a dictionary." + f"Unmarshalling the type 'User' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -868,9 +868,9 @@ def unmarshal_User(data: Any) -> User: def unmarshal_AddInstanceACLRulesResponse(data: Any) -> AddInstanceACLRulesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'AddInstanceACLRulesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'AddInstanceACLRulesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -882,9 +882,9 @@ def unmarshal_AddInstanceACLRulesResponse(data: Any) -> AddInstanceACLRulesRespo def unmarshal_AddInstanceSettingsResponse(data: Any) -> AddInstanceSettingsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'AddInstanceSettingsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'AddInstanceSettingsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -900,9 +900,9 @@ def unmarshal_AddInstanceSettingsResponse(data: Any) -> AddInstanceSettingsRespo def unmarshal_DeleteInstanceACLRulesResponse( data: Any, ) -> DeleteInstanceACLRulesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DeleteInstanceACLRulesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'DeleteInstanceACLRulesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -916,9 +916,9 @@ def unmarshal_DeleteInstanceACLRulesResponse( def unmarshal_DeleteInstanceSettingsResponse( data: Any, ) -> DeleteInstanceSettingsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DeleteInstanceSettingsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'DeleteInstanceSettingsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -932,9 +932,9 @@ def unmarshal_DeleteInstanceSettingsResponse( def unmarshal_InstanceMetrics(data: Any) -> InstanceMetrics: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'InstanceMetrics' failed as data isn't a dictionary." + f"Unmarshalling the type 'InstanceMetrics' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -948,9 +948,9 @@ def unmarshal_InstanceMetrics(data: Any) -> InstanceMetrics: def unmarshal_ListDatabaseBackupsResponse(data: Any) -> ListDatabaseBackupsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListDatabaseBackupsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListDatabaseBackupsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -967,9 +967,9 @@ def unmarshal_ListDatabaseBackupsResponse(data: Any) -> ListDatabaseBackupsRespo def unmarshal_ListDatabaseEnginesResponse(data: Any) -> ListDatabaseEnginesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListDatabaseEnginesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListDatabaseEnginesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -986,9 +986,9 @@ def unmarshal_ListDatabaseEnginesResponse(data: Any) -> ListDatabaseEnginesRespo def unmarshal_ListDatabasesResponse(data: Any) -> ListDatabasesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1005,9 +1005,9 @@ def unmarshal_ListDatabasesResponse(data: Any) -> ListDatabasesResponse: def unmarshal_ListInstanceACLRulesResponse(data: Any) -> ListInstanceACLRulesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstanceACLRulesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstanceACLRulesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1024,9 +1024,9 @@ def unmarshal_ListInstanceACLRulesResponse(data: Any) -> ListInstanceACLRulesRes def unmarshal_ListInstanceLogsDetailsResponse( data: Any, ) -> ListInstanceLogsDetailsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstanceLogsDetailsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstanceLogsDetailsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1042,9 +1042,9 @@ def unmarshal_ListInstanceLogsDetailsResponse( def unmarshal_ListInstanceLogsResponse(data: Any) -> ListInstanceLogsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstanceLogsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstanceLogsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1058,9 +1058,9 @@ def unmarshal_ListInstanceLogsResponse(data: Any) -> ListInstanceLogsResponse: def unmarshal_ListInstancesResponse(data: Any) -> ListInstancesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1077,9 +1077,9 @@ def unmarshal_ListInstancesResponse(data: Any) -> ListInstancesResponse: def unmarshal_ListNodeTypesResponse(data: Any) -> ListNodeTypesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1096,9 +1096,9 @@ def unmarshal_ListNodeTypesResponse(data: Any) -> ListNodeTypesResponse: def unmarshal_ListPrivilegesResponse(data: Any) -> ListPrivilegesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListPrivilegesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListPrivilegesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1115,9 +1115,9 @@ def unmarshal_ListPrivilegesResponse(data: Any) -> ListPrivilegesResponse: def unmarshal_ListSnapshotsResponse(data: Any) -> ListSnapshotsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1134,9 +1134,9 @@ def unmarshal_ListSnapshotsResponse(data: Any) -> ListSnapshotsResponse: def unmarshal_ListUsersResponse(data: Any) -> ListUsersResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1151,9 +1151,9 @@ def unmarshal_ListUsersResponse(data: Any) -> ListUsersResponse: def unmarshal_PrepareInstanceLogsResponse(data: Any) -> PrepareInstanceLogsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'PrepareInstanceLogsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'PrepareInstanceLogsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1167,9 +1167,9 @@ def unmarshal_PrepareInstanceLogsResponse(data: Any) -> PrepareInstanceLogsRespo def unmarshal_SetInstanceACLRulesResponse(data: Any) -> SetInstanceACLRulesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'SetInstanceACLRulesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'SetInstanceACLRulesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1181,9 +1181,9 @@ def unmarshal_SetInstanceACLRulesResponse(data: Any) -> SetInstanceACLRulesRespo def unmarshal_SetInstanceSettingsResponse(data: Any) -> SetInstanceSettingsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'SetInstanceSettingsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'SetInstanceSettingsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} diff --git a/scaleway-async/scaleway_async/rdb/v1/types.py b/scaleway-async/scaleway_async/rdb/v1/types.py index d07f655a2..ec7dae9e0 100644 --- a/scaleway-async/scaleway_async/rdb/v1/types.py +++ b/scaleway-async/scaleway_async/rdb/v1/types.py @@ -245,6 +245,7 @@ def __str__(self) -> str: class VolumeType(str, Enum, metaclass=StrEnumMeta): LSSD = "lssd" BSSD = "bssd" + SBS = "sbs" def __str__(self) -> str: return str(self.value) diff --git a/scaleway/scaleway/rdb/v1/marshalling.py b/scaleway/scaleway/rdb/v1/marshalling.py index 9800f2c81..0c962ad9a 100644 --- a/scaleway/scaleway/rdb/v1/marshalling.py +++ b/scaleway/scaleway/rdb/v1/marshalling.py @@ -99,9 +99,9 @@ def unmarshal_EndpointDirectAccessDetails(data: Any) -> EndpointDirectAccessDetails: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EndpointDirectAccessDetails' failed as data isn't a dictionary." + f"Unmarshalling the type 'EndpointDirectAccessDetails' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -110,9 +110,9 @@ def unmarshal_EndpointDirectAccessDetails(data: Any) -> EndpointDirectAccessDeta def unmarshal_EndpointLoadBalancerDetails(data: Any) -> EndpointLoadBalancerDetails: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EndpointLoadBalancerDetails' failed as data isn't a dictionary." + f"Unmarshalling the type 'EndpointLoadBalancerDetails' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -121,9 +121,9 @@ def unmarshal_EndpointLoadBalancerDetails(data: Any) -> EndpointLoadBalancerDeta def unmarshal_EndpointPrivateNetworkDetails(data: Any) -> EndpointPrivateNetworkDetails: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary." + f"Unmarshalling the type 'EndpointPrivateNetworkDetails' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -141,9 +141,9 @@ def unmarshal_EndpointPrivateNetworkDetails(data: Any) -> EndpointPrivateNetwork def unmarshal_Endpoint(data: Any) -> Endpoint: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Endpoint' failed as data isn't a dictionary." + f"Unmarshalling the type 'Endpoint' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -182,9 +182,9 @@ def unmarshal_Endpoint(data: Any) -> Endpoint: def unmarshal_EngineSetting(data: Any) -> EngineSetting: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary." + f"Unmarshalling the type 'EngineSetting' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -226,9 +226,9 @@ def unmarshal_EngineSetting(data: Any) -> EngineSetting: def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary." + f"Unmarshalling the type 'BackupSchedule' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -240,7 +240,7 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: args["frequency"] = field field = data.get("next_run_at", None) - args["next_run_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["next_run_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("retention", None) args["retention"] = field @@ -249,9 +249,9 @@ def unmarshal_BackupSchedule(data: Any) -> BackupSchedule: def unmarshal_EngineVersion(data: Any) -> EngineVersion: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'EngineVersion' failed as data isn't a dictionary." + f"Unmarshalling the type 'EngineVersion' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -273,7 +273,7 @@ def unmarshal_EngineVersion(data: Any) -> EngineVersion: args["disabled"] = field field = data.get("end_of_life", None) - args["end_of_life"] = parser.isoparse(field) if isinstance(field, str) else field + args["end_of_life"] = parser.isoparse(field) if type(field) is str else field field = data.get("name", None) args["name"] = field @@ -285,9 +285,9 @@ def unmarshal_EngineVersion(data: Any) -> EngineVersion: def unmarshal_InstanceSetting(data: Any) -> InstanceSetting: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary." + f"Unmarshalling the type 'InstanceSetting' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -302,9 +302,9 @@ def unmarshal_InstanceSetting(data: Any) -> InstanceSetting: def unmarshal_LogsPolicy(data: Any) -> LogsPolicy: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'LogsPolicy' failed as data isn't a dictionary." + f"Unmarshalling the type 'LogsPolicy' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -319,35 +319,35 @@ def unmarshal_LogsPolicy(data: Any) -> LogsPolicy: def unmarshal_Maintenance(data: Any) -> Maintenance: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Maintenance' failed as data isn't a dictionary." + f"Unmarshalling the type 'Maintenance' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("closed_at", None) - args["closed_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["closed_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("reason", None) args["reason"] = field field = data.get("starts_at", None) - args["starts_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["starts_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("status", None) args["status"] = field field = data.get("stops_at", None) - args["stops_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["stops_at"] = parser.isoparse(field) if type(field) is str else field return Maintenance(**args) def unmarshal_NodeTypeVolumeConstraintSizes(data: Any) -> NodeTypeVolumeConstraintSizes: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'NodeTypeVolumeConstraintSizes' failed as data isn't a dictionary." + f"Unmarshalling the type 'NodeTypeVolumeConstraintSizes' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -362,9 +362,9 @@ def unmarshal_NodeTypeVolumeConstraintSizes(data: Any) -> NodeTypeVolumeConstrai def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary." + f"Unmarshalling the type 'NodeTypeVolumeType' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -388,9 +388,9 @@ def unmarshal_NodeTypeVolumeType(data: Any) -> NodeTypeVolumeType: def unmarshal_ReadReplica(data: Any) -> ReadReplica: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary." + f"Unmarshalling the type 'ReadReplica' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -416,9 +416,9 @@ def unmarshal_ReadReplica(data: Any) -> ReadReplica: def unmarshal_UpgradableVersion(data: Any) -> UpgradableVersion: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'UpgradableVersion' failed as data isn't a dictionary." + f"Unmarshalling the type 'UpgradableVersion' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -439,9 +439,9 @@ def unmarshal_UpgradableVersion(data: Any) -> UpgradableVersion: def unmarshal_Volume(data: Any) -> Volume: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Volume' failed as data isn't a dictionary." + f"Unmarshalling the type 'Volume' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -456,9 +456,9 @@ def unmarshal_Volume(data: Any) -> Volume: def unmarshal_ACLRule(data: Any) -> ACLRule: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ACLRule' failed as data isn't a dictionary." + f"Unmarshalling the type 'ACLRule' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -485,9 +485,9 @@ def unmarshal_ACLRule(data: Any) -> ACLRule: def unmarshal_Database(data: Any) -> Database: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Database' failed as data isn't a dictionary." + f"Unmarshalling the type 'Database' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -508,15 +508,15 @@ def unmarshal_Database(data: Any) -> Database: def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary." + f"Unmarshalling the type 'DatabaseBackup' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("database_name", None) args["database_name"] = field @@ -526,11 +526,11 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: field = data.get("download_url_expires_at", None) args["download_url_expires_at"] = ( - parser.isoparse(field) if isinstance(field, str) else field + parser.isoparse(field) if type(field) is str else field ) field = data.get("expires_at", None) - args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["expires_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("id", None) args["id"] = field @@ -557,15 +557,15 @@ def unmarshal_DatabaseBackup(data: Any) -> DatabaseBackup: args["status"] = field field = data.get("updated_at", None) - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["updated_at"] = parser.isoparse(field) if type(field) is str else field return DatabaseBackup(**args) def unmarshal_DatabaseEngine(data: Any) -> DatabaseEngine: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary." + f"Unmarshalling the type 'DatabaseEngine' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -588,9 +588,9 @@ def unmarshal_DatabaseEngine(data: Any) -> DatabaseEngine: def unmarshal_Instance(data: Any) -> Instance: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Instance' failed as data isn't a dictionary." + f"Unmarshalling the type 'Instance' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -604,7 +604,7 @@ def unmarshal_Instance(data: Any) -> Instance: ) field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("endpoint", None) args["endpoint"] = unmarshal_Endpoint(field) if field is not None else None @@ -679,21 +679,21 @@ def unmarshal_Instance(data: Any) -> Instance: def unmarshal_InstanceLog(data: Any) -> InstanceLog: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary." + f"Unmarshalling the type 'InstanceLog' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("download_url", None) args["download_url"] = field field = data.get("expires_at", None) - args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["expires_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("id", None) args["id"] = field @@ -713,9 +713,9 @@ def unmarshal_InstanceLog(data: Any) -> InstanceLog: def unmarshal_ListInstanceLogsDetailsResponseInstanceLogDetail( data: Any, ) -> ListInstanceLogsDetailsResponseInstanceLogDetail: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstanceLogsDetailsResponseInstanceLogDetail' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -730,9 +730,9 @@ def unmarshal_ListInstanceLogsDetailsResponseInstanceLogDetail( def unmarshal_NodeType(data: Any) -> NodeType: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'NodeType' failed as data isn't a dictionary." + f"Unmarshalling the type 'NodeType' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -787,9 +787,9 @@ def unmarshal_NodeType(data: Any) -> NodeType: def unmarshal_Privilege(data: Any) -> Privilege: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Privilege' failed as data isn't a dictionary." + f"Unmarshalling the type 'Privilege' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -807,18 +807,18 @@ def unmarshal_Privilege(data: Any) -> Privilege: def unmarshal_Snapshot(data: Any) -> Snapshot: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'Snapshot' failed as data isn't a dictionary." + f"Unmarshalling the type 'Snapshot' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} field = data.get("created_at", None) - args["created_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["created_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("expires_at", None) - args["expires_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["expires_at"] = parser.isoparse(field) if type(field) is str else field field = data.get("id", None) args["id"] = field @@ -845,15 +845,15 @@ def unmarshal_Snapshot(data: Any) -> Snapshot: args["status"] = field field = data.get("updated_at", None) - args["updated_at"] = parser.isoparse(field) if isinstance(field, str) else field + args["updated_at"] = parser.isoparse(field) if type(field) is str else field return Snapshot(**args) def unmarshal_User(data: Any) -> User: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'User' failed as data isn't a dictionary." + f"Unmarshalling the type 'User' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -868,9 +868,9 @@ def unmarshal_User(data: Any) -> User: def unmarshal_AddInstanceACLRulesResponse(data: Any) -> AddInstanceACLRulesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'AddInstanceACLRulesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'AddInstanceACLRulesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -882,9 +882,9 @@ def unmarshal_AddInstanceACLRulesResponse(data: Any) -> AddInstanceACLRulesRespo def unmarshal_AddInstanceSettingsResponse(data: Any) -> AddInstanceSettingsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'AddInstanceSettingsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'AddInstanceSettingsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -900,9 +900,9 @@ def unmarshal_AddInstanceSettingsResponse(data: Any) -> AddInstanceSettingsRespo def unmarshal_DeleteInstanceACLRulesResponse( data: Any, ) -> DeleteInstanceACLRulesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DeleteInstanceACLRulesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'DeleteInstanceACLRulesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -916,9 +916,9 @@ def unmarshal_DeleteInstanceACLRulesResponse( def unmarshal_DeleteInstanceSettingsResponse( data: Any, ) -> DeleteInstanceSettingsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'DeleteInstanceSettingsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'DeleteInstanceSettingsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -932,9 +932,9 @@ def unmarshal_DeleteInstanceSettingsResponse( def unmarshal_InstanceMetrics(data: Any) -> InstanceMetrics: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'InstanceMetrics' failed as data isn't a dictionary." + f"Unmarshalling the type 'InstanceMetrics' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -948,9 +948,9 @@ def unmarshal_InstanceMetrics(data: Any) -> InstanceMetrics: def unmarshal_ListDatabaseBackupsResponse(data: Any) -> ListDatabaseBackupsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListDatabaseBackupsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListDatabaseBackupsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -967,9 +967,9 @@ def unmarshal_ListDatabaseBackupsResponse(data: Any) -> ListDatabaseBackupsRespo def unmarshal_ListDatabaseEnginesResponse(data: Any) -> ListDatabaseEnginesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListDatabaseEnginesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListDatabaseEnginesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -986,9 +986,9 @@ def unmarshal_ListDatabaseEnginesResponse(data: Any) -> ListDatabaseEnginesRespo def unmarshal_ListDatabasesResponse(data: Any) -> ListDatabasesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListDatabasesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1005,9 +1005,9 @@ def unmarshal_ListDatabasesResponse(data: Any) -> ListDatabasesResponse: def unmarshal_ListInstanceACLRulesResponse(data: Any) -> ListInstanceACLRulesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstanceACLRulesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstanceACLRulesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1024,9 +1024,9 @@ def unmarshal_ListInstanceACLRulesResponse(data: Any) -> ListInstanceACLRulesRes def unmarshal_ListInstanceLogsDetailsResponse( data: Any, ) -> ListInstanceLogsDetailsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstanceLogsDetailsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstanceLogsDetailsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1042,9 +1042,9 @@ def unmarshal_ListInstanceLogsDetailsResponse( def unmarshal_ListInstanceLogsResponse(data: Any) -> ListInstanceLogsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstanceLogsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstanceLogsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1058,9 +1058,9 @@ def unmarshal_ListInstanceLogsResponse(data: Any) -> ListInstanceLogsResponse: def unmarshal_ListInstancesResponse(data: Any) -> ListInstancesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListInstancesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1077,9 +1077,9 @@ def unmarshal_ListInstancesResponse(data: Any) -> ListInstancesResponse: def unmarshal_ListNodeTypesResponse(data: Any) -> ListNodeTypesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListNodeTypesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1096,9 +1096,9 @@ def unmarshal_ListNodeTypesResponse(data: Any) -> ListNodeTypesResponse: def unmarshal_ListPrivilegesResponse(data: Any) -> ListPrivilegesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListPrivilegesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListPrivilegesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1115,9 +1115,9 @@ def unmarshal_ListPrivilegesResponse(data: Any) -> ListPrivilegesResponse: def unmarshal_ListSnapshotsResponse(data: Any) -> ListSnapshotsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListSnapshotsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1134,9 +1134,9 @@ def unmarshal_ListSnapshotsResponse(data: Any) -> ListSnapshotsResponse: def unmarshal_ListUsersResponse(data: Any) -> ListUsersResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1151,9 +1151,9 @@ def unmarshal_ListUsersResponse(data: Any) -> ListUsersResponse: def unmarshal_PrepareInstanceLogsResponse(data: Any) -> PrepareInstanceLogsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'PrepareInstanceLogsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'PrepareInstanceLogsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1167,9 +1167,9 @@ def unmarshal_PrepareInstanceLogsResponse(data: Any) -> PrepareInstanceLogsRespo def unmarshal_SetInstanceACLRulesResponse(data: Any) -> SetInstanceACLRulesResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'SetInstanceACLRulesResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'SetInstanceACLRulesResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} @@ -1181,9 +1181,9 @@ def unmarshal_SetInstanceACLRulesResponse(data: Any) -> SetInstanceACLRulesRespo def unmarshal_SetInstanceSettingsResponse(data: Any) -> SetInstanceSettingsResponse: - if not isinstance(data, dict): + if type(data) is not dict: raise TypeError( - "Unmarshalling the type 'SetInstanceSettingsResponse' failed as data isn't a dictionary." + f"Unmarshalling the type 'SetInstanceSettingsResponse' failed as data isn't a dictionary." ) args: Dict[str, Any] = {} diff --git a/scaleway/scaleway/rdb/v1/types.py b/scaleway/scaleway/rdb/v1/types.py index d07f655a2..ec7dae9e0 100644 --- a/scaleway/scaleway/rdb/v1/types.py +++ b/scaleway/scaleway/rdb/v1/types.py @@ -245,6 +245,7 @@ def __str__(self) -> str: class VolumeType(str, Enum, metaclass=StrEnumMeta): LSSD = "lssd" BSSD = "bssd" + SBS = "sbs" def __str__(self) -> str: return str(self.value)