Skip to content

Commit 1fc6d4f

Browse files
authored
fix(serverless_sqldb): restore fields in messages (#417)
1 parent 154726b commit 1fc6d4f

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

scaleway-async/scaleway_async/serverless_sqldb/v1alpha1/api.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ async def list_databases(
206206
*,
207207
page: int,
208208
region: Optional[Region] = None,
209+
organization_id: Optional[str] = None,
209210
project_id: Optional[str] = None,
210211
page_size: Optional[int] = None,
211212
name: Optional[str] = None,
@@ -215,6 +216,7 @@ async def list_databases(
215216
List your Serverless SQL Databases.
216217
List all Serverless SQL Databases for a given Scaleway Organization or Scaleway Project. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.
217218
:param region: Region to target. If none is passed will use default region from the config.
219+
:param organization_id: Filter by the UUID of the Scaleway organization.
218220
:param project_id: UUID of the Scaleway project.
219221
:param page: Page number.
220222
:param page_size: Page size.
@@ -238,6 +240,8 @@ async def list_databases(
238240
params={
239241
"name": name,
240242
"order_by": order_by,
243+
"organization_id": organization_id
244+
or self.client.default_organization_id,
241245
"page": page,
242246
"page_size": page_size or self.client.default_page_size,
243247
"project_id": project_id or self.client.default_project_id,
@@ -252,6 +256,7 @@ async def list_databases_all(
252256
*,
253257
page: int,
254258
region: Optional[Region] = None,
259+
organization_id: Optional[str] = None,
255260
project_id: Optional[str] = None,
256261
page_size: Optional[int] = None,
257262
name: Optional[str] = None,
@@ -261,6 +266,7 @@ async def list_databases_all(
261266
List your Serverless SQL Databases.
262267
List all Serverless SQL Databases for a given Scaleway Organization or Scaleway Project. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.
263268
:param region: Region to target. If none is passed will use default region from the config.
269+
:param organization_id: Filter by the UUID of the Scaleway organization.
264270
:param project_id: UUID of the Scaleway project.
265271
:param page: Page number.
266272
:param page_size: Page size.
@@ -281,6 +287,7 @@ async def list_databases_all(
281287
args={
282288
"page": page,
283289
"region": region,
290+
"organization_id": organization_id,
284291
"project_id": project_id,
285292
"page_size": page_size,
286293
"name": name,
@@ -416,13 +423,17 @@ async def list_database_backups(
416423
database_id: str,
417424
page: int,
418425
region: Optional[Region] = None,
426+
organization_id: Optional[str] = None,
427+
project_id: Optional[str] = None,
419428
page_size: Optional[int] = None,
420429
order_by: ListDatabaseBackupsRequestOrderBy = ListDatabaseBackupsRequestOrderBy.CREATED_AT_ASC,
421430
) -> ListDatabaseBackupsResponse:
422431
"""
423432
List your Serverless SQL Database backups.
424433
List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
425434
:param region: Region to target. If none is passed will use default region from the config.
435+
:param organization_id: Filter by the UUID of the Scaleway organization.
436+
:param project_id: Filter by the UUID of the Scaleway project.
426437
:param database_id: Filter by the UUID of the Serverless SQL Database.
427438
:param page: Page number.
428439
:param page_size: Page size.
@@ -448,8 +459,11 @@ async def list_database_backups(
448459
params={
449460
"database_id": database_id,
450461
"order_by": order_by,
462+
"organization_id": organization_id
463+
or self.client.default_organization_id,
451464
"page": page,
452465
"page_size": page_size or self.client.default_page_size,
466+
"project_id": project_id or self.client.default_project_id,
453467
},
454468
)
455469

@@ -462,13 +476,17 @@ async def list_database_backups_all(
462476
database_id: str,
463477
page: int,
464478
region: Optional[Region] = None,
479+
organization_id: Optional[str] = None,
480+
project_id: Optional[str] = None,
465481
page_size: Optional[int] = None,
466482
order_by: Optional[ListDatabaseBackupsRequestOrderBy] = None,
467483
) -> List[DatabaseBackup]:
468484
"""
469485
List your Serverless SQL Database backups.
470486
List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
471487
:param region: Region to target. If none is passed will use default region from the config.
488+
:param organization_id: Filter by the UUID of the Scaleway organization.
489+
:param project_id: Filter by the UUID of the Scaleway project.
472490
:param database_id: Filter by the UUID of the Serverless SQL Database.
473491
:param page: Page number.
474492
:param page_size: Page size.
@@ -492,6 +510,8 @@ async def list_database_backups_all(
492510
"database_id": database_id,
493511
"page": page,
494512
"region": region,
513+
"organization_id": organization_id,
514+
"project_id": project_id,
495515
"page_size": page_size,
496516
"order_by": order_by,
497517
},

scaleway-async/scaleway_async/serverless_sqldb/v1alpha1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ class ListDatabasesRequest:
290290
Region to target. If none is passed will use default region from the config.
291291
"""
292292

293+
organization_id: Optional[str]
294+
"""
295+
Filter by the UUID of the Scaleway organization.
296+
"""
297+
293298
project_id: Optional[str]
294299
"""
295300
UUID of the Scaleway project.
@@ -377,6 +382,16 @@ class ListDatabaseBackupsRequest:
377382
Region to target. If none is passed will use default region from the config.
378383
"""
379384

385+
organization_id: Optional[str]
386+
"""
387+
Filter by the UUID of the Scaleway organization.
388+
"""
389+
390+
project_id: Optional[str]
391+
"""
392+
Filter by the UUID of the Scaleway project.
393+
"""
394+
380395
database_id: str
381396
"""
382397
Filter by the UUID of the Serverless SQL Database.

scaleway/scaleway/serverless_sqldb/v1alpha1/api.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ def list_databases(
204204
*,
205205
page: int,
206206
region: Optional[Region] = None,
207+
organization_id: Optional[str] = None,
207208
project_id: Optional[str] = None,
208209
page_size: Optional[int] = None,
209210
name: Optional[str] = None,
@@ -213,6 +214,7 @@ def list_databases(
213214
List your Serverless SQL Databases.
214215
List all Serverless SQL Databases for a given Scaleway Organization or Scaleway Project. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.
215216
:param region: Region to target. If none is passed will use default region from the config.
217+
:param organization_id: Filter by the UUID of the Scaleway organization.
216218
:param project_id: UUID of the Scaleway project.
217219
:param page: Page number.
218220
:param page_size: Page size.
@@ -236,6 +238,8 @@ def list_databases(
236238
params={
237239
"name": name,
238240
"order_by": order_by,
241+
"organization_id": organization_id
242+
or self.client.default_organization_id,
239243
"page": page,
240244
"page_size": page_size or self.client.default_page_size,
241245
"project_id": project_id or self.client.default_project_id,
@@ -250,6 +254,7 @@ def list_databases_all(
250254
*,
251255
page: int,
252256
region: Optional[Region] = None,
257+
organization_id: Optional[str] = None,
253258
project_id: Optional[str] = None,
254259
page_size: Optional[int] = None,
255260
name: Optional[str] = None,
@@ -259,6 +264,7 @@ def list_databases_all(
259264
List your Serverless SQL Databases.
260265
List all Serverless SQL Databases for a given Scaleway Organization or Scaleway Project. By default, the databases returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.
261266
:param region: Region to target. If none is passed will use default region from the config.
267+
:param organization_id: Filter by the UUID of the Scaleway organization.
262268
:param project_id: UUID of the Scaleway project.
263269
:param page: Page number.
264270
:param page_size: Page size.
@@ -279,6 +285,7 @@ def list_databases_all(
279285
args={
280286
"page": page,
281287
"region": region,
288+
"organization_id": organization_id,
282289
"project_id": project_id,
283290
"page_size": page_size,
284291
"name": name,
@@ -414,13 +421,17 @@ def list_database_backups(
414421
database_id: str,
415422
page: int,
416423
region: Optional[Region] = None,
424+
organization_id: Optional[str] = None,
425+
project_id: Optional[str] = None,
417426
page_size: Optional[int] = None,
418427
order_by: ListDatabaseBackupsRequestOrderBy = ListDatabaseBackupsRequestOrderBy.CREATED_AT_ASC,
419428
) -> ListDatabaseBackupsResponse:
420429
"""
421430
List your Serverless SQL Database backups.
422431
List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
423432
:param region: Region to target. If none is passed will use default region from the config.
433+
:param organization_id: Filter by the UUID of the Scaleway organization.
434+
:param project_id: Filter by the UUID of the Scaleway project.
424435
:param database_id: Filter by the UUID of the Serverless SQL Database.
425436
:param page: Page number.
426437
:param page_size: Page size.
@@ -446,8 +457,11 @@ def list_database_backups(
446457
params={
447458
"database_id": database_id,
448459
"order_by": order_by,
460+
"organization_id": organization_id
461+
or self.client.default_organization_id,
449462
"page": page,
450463
"page_size": page_size or self.client.default_page_size,
464+
"project_id": project_id or self.client.default_project_id,
451465
},
452466
)
453467

@@ -460,13 +474,17 @@ def list_database_backups_all(
460474
database_id: str,
461475
page: int,
462476
region: Optional[Region] = None,
477+
organization_id: Optional[str] = None,
478+
project_id: Optional[str] = None,
463479
page_size: Optional[int] = None,
464480
order_by: Optional[ListDatabaseBackupsRequestOrderBy] = None,
465481
) -> List[DatabaseBackup]:
466482
"""
467483
List your Serverless SQL Database backups.
468484
List all Serverless SQL Database backups for a given Scaleway Project or Database. By default, the backups returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field.
469485
:param region: Region to target. If none is passed will use default region from the config.
486+
:param organization_id: Filter by the UUID of the Scaleway organization.
487+
:param project_id: Filter by the UUID of the Scaleway project.
470488
:param database_id: Filter by the UUID of the Serverless SQL Database.
471489
:param page: Page number.
472490
:param page_size: Page size.
@@ -490,6 +508,8 @@ def list_database_backups_all(
490508
"database_id": database_id,
491509
"page": page,
492510
"region": region,
511+
"organization_id": organization_id,
512+
"project_id": project_id,
493513
"page_size": page_size,
494514
"order_by": order_by,
495515
},

scaleway/scaleway/serverless_sqldb/v1alpha1/types.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ class ListDatabasesRequest:
290290
Region to target. If none is passed will use default region from the config.
291291
"""
292292

293+
organization_id: Optional[str]
294+
"""
295+
Filter by the UUID of the Scaleway organization.
296+
"""
297+
293298
project_id: Optional[str]
294299
"""
295300
UUID of the Scaleway project.
@@ -377,6 +382,16 @@ class ListDatabaseBackupsRequest:
377382
Region to target. If none is passed will use default region from the config.
378383
"""
379384

385+
organization_id: Optional[str]
386+
"""
387+
Filter by the UUID of the Scaleway organization.
388+
"""
389+
390+
project_id: Optional[str]
391+
"""
392+
Filter by the UUID of the Scaleway project.
393+
"""
394+
380395
database_id: str
381396
"""
382397
Filter by the UUID of the Serverless SQL Database.

0 commit comments

Comments
 (0)