Skip to content

Commit 38ba4b8

Browse files
authored
fix(rdb): use BoolValue type for skip_size_retrieval option in ListDatabases endpoint (#1344)
1 parent 9670241 commit 38ba4b8

File tree

4 files changed

+20
-24
lines changed

4 files changed

+20
-24
lines changed

scaleway-async/scaleway_async/rdb/v1/api.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2451,25 +2451,25 @@ async def list_databases(
24512451
self,
24522452
*,
24532453
instance_id: str,
2454-
skip_size_retrieval: bool,
24552454
region: Optional[ScwRegion] = None,
24562455
name: Optional[str] = None,
24572456
managed: Optional[bool] = None,
24582457
owner: Optional[str] = None,
24592458
order_by: Optional[ListDatabasesRequestOrderBy] = None,
2459+
skip_size_retrieval: Optional[bool] = None,
24602460
page: Optional[int] = None,
24612461
page_size: Optional[int] = None,
24622462
) -> ListDatabasesResponse:
24632463
"""
24642464
List databases in a Database Instance.
24652465
List all databases of a given Database Instance. 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. You can define additional parameters for your query, such as `name`, `managed` and `owner`.
24662466
:param instance_id: UUID of the Database Instance to list the databases of.
2467-
:param skip_size_retrieval: Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
24682467
:param region: Region to target. If none is passed will use default region from the config.
24692468
:param name: Name of the database.
24702469
:param managed: Defines whether or not the database is managed.
24712470
:param owner: User that owns this database.
24722471
:param order_by: Criteria to use when ordering database listing.
2472+
:param skip_size_retrieval: Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
24732473
:param page:
24742474
:param page_size:
24752475
:return: :class:`ListDatabasesResponse <ListDatabasesResponse>`
@@ -2479,7 +2479,6 @@ async def list_databases(
24792479
24802480
result = await api.list_databases(
24812481
instance_id="example",
2482-
skip_size_retrieval=False,
24832482
)
24842483
"""
24852484

@@ -2509,25 +2508,25 @@ async def list_databases_all(
25092508
self,
25102509
*,
25112510
instance_id: str,
2512-
skip_size_retrieval: bool,
25132511
region: Optional[ScwRegion] = None,
25142512
name: Optional[str] = None,
25152513
managed: Optional[bool] = None,
25162514
owner: Optional[str] = None,
25172515
order_by: Optional[ListDatabasesRequestOrderBy] = None,
2516+
skip_size_retrieval: Optional[bool] = None,
25182517
page: Optional[int] = None,
25192518
page_size: Optional[int] = None,
25202519
) -> list[Database]:
25212520
"""
25222521
List databases in a Database Instance.
25232522
List all databases of a given Database Instance. 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. You can define additional parameters for your query, such as `name`, `managed` and `owner`.
25242523
:param instance_id: UUID of the Database Instance to list the databases of.
2525-
:param skip_size_retrieval: Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
25262524
:param region: Region to target. If none is passed will use default region from the config.
25272525
:param name: Name of the database.
25282526
:param managed: Defines whether or not the database is managed.
25292527
:param owner: User that owns this database.
25302528
:param order_by: Criteria to use when ordering database listing.
2529+
:param skip_size_retrieval: Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
25312530
:param page:
25322531
:param page_size:
25332532
:return: :class:`list[Database] <list[Database]>`
@@ -2537,7 +2536,6 @@ async def list_databases_all(
25372536
25382537
result = await api.list_databases_all(
25392538
instance_id="example",
2540-
skip_size_retrieval=False,
25412539
)
25422540
"""
25432541

@@ -2547,12 +2545,12 @@ async def list_databases_all(
25472545
fetcher=self.list_databases,
25482546
args={
25492547
"instance_id": instance_id,
2550-
"skip_size_retrieval": skip_size_retrieval,
25512548
"region": region,
25522549
"name": name,
25532550
"managed": managed,
25542551
"owner": owner,
25552552
"order_by": order_by,
2553+
"skip_size_retrieval": skip_size_retrieval,
25562554
"page": page,
25572555
"page_size": page_size,
25582556
},

scaleway-async/scaleway_async/rdb/v1/types.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,11 +1883,6 @@ class ListDatabasesRequest:
18831883
UUID of the Database Instance to list the databases of.
18841884
"""
18851885

1886-
skip_size_retrieval: bool
1887-
"""
1888-
Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
1889-
"""
1890-
18911886
region: Optional[ScwRegion] = None
18921887
"""
18931888
Region to target. If none is passed will use default region from the config.
@@ -1915,6 +1910,11 @@ class ListDatabasesRequest:
19151910
Criteria to use when ordering database listing.
19161911
"""
19171912

1913+
skip_size_retrieval: Optional[bool] = False
1914+
"""
1915+
Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
1916+
"""
1917+
19181918
page: Optional[int] = 0
19191919
page_size: Optional[int] = 0
19201920

scaleway/scaleway/rdb/v1/api.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,25 +2443,25 @@ def list_databases(
24432443
self,
24442444
*,
24452445
instance_id: str,
2446-
skip_size_retrieval: bool,
24472446
region: Optional[ScwRegion] = None,
24482447
name: Optional[str] = None,
24492448
managed: Optional[bool] = None,
24502449
owner: Optional[str] = None,
24512450
order_by: Optional[ListDatabasesRequestOrderBy] = None,
2451+
skip_size_retrieval: Optional[bool] = None,
24522452
page: Optional[int] = None,
24532453
page_size: Optional[int] = None,
24542454
) -> ListDatabasesResponse:
24552455
"""
24562456
List databases in a Database Instance.
24572457
List all databases of a given Database Instance. 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. You can define additional parameters for your query, such as `name`, `managed` and `owner`.
24582458
:param instance_id: UUID of the Database Instance to list the databases of.
2459-
:param skip_size_retrieval: Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
24602459
:param region: Region to target. If none is passed will use default region from the config.
24612460
:param name: Name of the database.
24622461
:param managed: Defines whether or not the database is managed.
24632462
:param owner: User that owns this database.
24642463
:param order_by: Criteria to use when ordering database listing.
2464+
:param skip_size_retrieval: Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
24652465
:param page:
24662466
:param page_size:
24672467
:return: :class:`ListDatabasesResponse <ListDatabasesResponse>`
@@ -2471,7 +2471,6 @@ def list_databases(
24712471
24722472
result = api.list_databases(
24732473
instance_id="example",
2474-
skip_size_retrieval=False,
24752474
)
24762475
"""
24772476

@@ -2501,25 +2500,25 @@ def list_databases_all(
25012500
self,
25022501
*,
25032502
instance_id: str,
2504-
skip_size_retrieval: bool,
25052503
region: Optional[ScwRegion] = None,
25062504
name: Optional[str] = None,
25072505
managed: Optional[bool] = None,
25082506
owner: Optional[str] = None,
25092507
order_by: Optional[ListDatabasesRequestOrderBy] = None,
2508+
skip_size_retrieval: Optional[bool] = None,
25102509
page: Optional[int] = None,
25112510
page_size: Optional[int] = None,
25122511
) -> list[Database]:
25132512
"""
25142513
List databases in a Database Instance.
25152514
List all databases of a given Database Instance. 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. You can define additional parameters for your query, such as `name`, `managed` and `owner`.
25162515
:param instance_id: UUID of the Database Instance to list the databases of.
2517-
:param skip_size_retrieval: Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
25182516
:param region: Region to target. If none is passed will use default region from the config.
25192517
:param name: Name of the database.
25202518
:param managed: Defines whether or not the database is managed.
25212519
:param owner: User that owns this database.
25222520
:param order_by: Criteria to use when ordering database listing.
2521+
:param skip_size_retrieval: Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
25232522
:param page:
25242523
:param page_size:
25252524
:return: :class:`list[Database] <list[Database]>`
@@ -2529,7 +2528,6 @@ def list_databases_all(
25292528
25302529
result = api.list_databases_all(
25312530
instance_id="example",
2532-
skip_size_retrieval=False,
25332531
)
25342532
"""
25352533

@@ -2539,12 +2537,12 @@ def list_databases_all(
25392537
fetcher=self.list_databases,
25402538
args={
25412539
"instance_id": instance_id,
2542-
"skip_size_retrieval": skip_size_retrieval,
25432540
"region": region,
25442541
"name": name,
25452542
"managed": managed,
25462543
"owner": owner,
25472544
"order_by": order_by,
2545+
"skip_size_retrieval": skip_size_retrieval,
25482546
"page": page,
25492547
"page_size": page_size,
25502548
},

scaleway/scaleway/rdb/v1/types.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,11 +1883,6 @@ class ListDatabasesRequest:
18831883
UUID of the Database Instance to list the databases of.
18841884
"""
18851885

1886-
skip_size_retrieval: bool
1887-
"""
1888-
Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
1889-
"""
1890-
18911886
region: Optional[ScwRegion] = None
18921887
"""
18931888
Region to target. If none is passed will use default region from the config.
@@ -1915,6 +1910,11 @@ class ListDatabasesRequest:
19151910
Criteria to use when ordering database listing.
19161911
"""
19171912

1913+
skip_size_retrieval: Optional[bool] = False
1914+
"""
1915+
Whether to skip the retrieval of each database size. If true, the size of each returned database will be set to 0.
1916+
"""
1917+
19181918
page: Optional[int] = 0
19191919
page_size: Optional[int] = 0
19201920

0 commit comments

Comments
 (0)