Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 9d987d5

Browse files
1 parent 5f92f83 commit 9d987d5

287 files changed

Lines changed: 438 additions & 129257 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

google/cloud/spanner_admin_database_v1/services/database_admin/async_client.py

Lines changed: 104 additions & 26 deletions
Large diffs are not rendered by default.

google/cloud/spanner_admin_database_v1/services/database_admin/client.py

Lines changed: 104 additions & 26 deletions
Large diffs are not rendered by default.

google/cloud/spanner_admin_instance_v1/services/instance_admin/async_client.py

Lines changed: 80 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,10 @@ async def sample_list_instance_configs():
399399
# Create or coerce a protobuf request object.
400400
# - Quick check: If we got a request object, we should *not* have
401401
# gotten any keyword arguments that map to the request.
402-
has_flattened_params = any([parent])
402+
flattened_params = [parent]
403+
has_flattened_params = (
404+
len([param for param in flattened_params if param is not None]) > 0
405+
)
403406
if request is not None and has_flattened_params:
404407
raise ValueError(
405408
"If the `request` argument is set, then none of "
@@ -524,7 +527,10 @@ async def sample_get_instance_config():
524527
# Create or coerce a protobuf request object.
525528
# - Quick check: If we got a request object, we should *not* have
526529
# gotten any keyword arguments that map to the request.
527-
has_flattened_params = any([name])
530+
flattened_params = [name]
531+
has_flattened_params = (
532+
len([param for param in flattened_params if param is not None]) > 0
533+
)
528534
if request is not None and has_flattened_params:
529535
raise ValueError(
530536
"If the `request` argument is set, then none of "
@@ -706,7 +712,10 @@ async def sample_create_instance_config():
706712
# Create or coerce a protobuf request object.
707713
# - Quick check: If we got a request object, we should *not* have
708714
# gotten any keyword arguments that map to the request.
709-
has_flattened_params = any([parent, instance_config, instance_config_id])
715+
flattened_params = [parent, instance_config, instance_config_id]
716+
has_flattened_params = (
717+
len([param for param in flattened_params if param is not None]) > 0
718+
)
710719
if request is not None and has_flattened_params:
711720
raise ValueError(
712721
"If the `request` argument is set, then none of "
@@ -900,7 +909,10 @@ async def sample_update_instance_config():
900909
# Create or coerce a protobuf request object.
901910
# - Quick check: If we got a request object, we should *not* have
902911
# gotten any keyword arguments that map to the request.
903-
has_flattened_params = any([instance_config, update_mask])
912+
flattened_params = [instance_config, update_mask]
913+
has_flattened_params = (
914+
len([param for param in flattened_params if param is not None]) > 0
915+
)
904916
if request is not None and has_flattened_params:
905917
raise ValueError(
906918
"If the `request` argument is set, then none of "
@@ -1022,7 +1034,10 @@ async def sample_delete_instance_config():
10221034
# Create or coerce a protobuf request object.
10231035
# - Quick check: If we got a request object, we should *not* have
10241036
# gotten any keyword arguments that map to the request.
1025-
has_flattened_params = any([name])
1037+
flattened_params = [name]
1038+
has_flattened_params = (
1039+
len([param for param in flattened_params if param is not None]) > 0
1040+
)
10261041
if request is not None and has_flattened_params:
10271042
raise ValueError(
10281043
"If the `request` argument is set, then none of "
@@ -1144,7 +1159,10 @@ async def sample_list_instance_config_operations():
11441159
# Create or coerce a protobuf request object.
11451160
# - Quick check: If we got a request object, we should *not* have
11461161
# gotten any keyword arguments that map to the request.
1147-
has_flattened_params = any([parent])
1162+
flattened_params = [parent]
1163+
has_flattened_params = (
1164+
len([param for param in flattened_params if param is not None]) > 0
1165+
)
11481166
if request is not None and has_flattened_params:
11491167
raise ValueError(
11501168
"If the `request` argument is set, then none of "
@@ -1274,7 +1292,10 @@ async def sample_list_instances():
12741292
# Create or coerce a protobuf request object.
12751293
# - Quick check: If we got a request object, we should *not* have
12761294
# gotten any keyword arguments that map to the request.
1277-
has_flattened_params = any([parent])
1295+
flattened_params = [parent]
1296+
has_flattened_params = (
1297+
len([param for param in flattened_params if param is not None]) > 0
1298+
)
12781299
if request is not None and has_flattened_params:
12791300
raise ValueError(
12801301
"If the `request` argument is set, then none of "
@@ -1403,7 +1424,10 @@ async def sample_list_instance_partitions():
14031424
# Create or coerce a protobuf request object.
14041425
# - Quick check: If we got a request object, we should *not* have
14051426
# gotten any keyword arguments that map to the request.
1406-
has_flattened_params = any([parent])
1427+
flattened_params = [parent]
1428+
has_flattened_params = (
1429+
len([param for param in flattened_params if param is not None]) > 0
1430+
)
14071431
if request is not None and has_flattened_params:
14081432
raise ValueError(
14091433
"If the `request` argument is set, then none of "
@@ -1527,7 +1551,10 @@ async def sample_get_instance():
15271551
# Create or coerce a protobuf request object.
15281552
# - Quick check: If we got a request object, we should *not* have
15291553
# gotten any keyword arguments that map to the request.
1530-
has_flattened_params = any([name])
1554+
flattened_params = [name]
1555+
has_flattened_params = (
1556+
len([param for param in flattened_params if param is not None]) > 0
1557+
)
15311558
if request is not None and has_flattened_params:
15321559
raise ValueError(
15331560
"If the `request` argument is set, then none of "
@@ -1705,7 +1732,10 @@ async def sample_create_instance():
17051732
# Create or coerce a protobuf request object.
17061733
# - Quick check: If we got a request object, we should *not* have
17071734
# gotten any keyword arguments that map to the request.
1708-
has_flattened_params = any([parent, instance_id, instance])
1735+
flattened_params = [parent, instance_id, instance]
1736+
has_flattened_params = (
1737+
len([param for param in flattened_params if param is not None]) > 0
1738+
)
17091739
if request is not None and has_flattened_params:
17101740
raise ValueError(
17111741
"If the `request` argument is set, then none of "
@@ -1898,7 +1928,10 @@ async def sample_update_instance():
18981928
# Create or coerce a protobuf request object.
18991929
# - Quick check: If we got a request object, we should *not* have
19001930
# gotten any keyword arguments that map to the request.
1901-
has_flattened_params = any([instance, field_mask])
1931+
flattened_params = [instance, field_mask]
1932+
has_flattened_params = (
1933+
len([param for param in flattened_params if param is not None]) > 0
1934+
)
19021935
if request is not None and has_flattened_params:
19031936
raise ValueError(
19041937
"If the `request` argument is set, then none of "
@@ -2022,7 +2055,10 @@ async def sample_delete_instance():
20222055
# Create or coerce a protobuf request object.
20232056
# - Quick check: If we got a request object, we should *not* have
20242057
# gotten any keyword arguments that map to the request.
2025-
has_flattened_params = any([name])
2058+
flattened_params = [name]
2059+
has_flattened_params = (
2060+
len([param for param in flattened_params if param is not None]) > 0
2061+
)
20262062
if request is not None and has_flattened_params:
20272063
raise ValueError(
20282064
"If the `request` argument is set, then none of "
@@ -2161,7 +2197,10 @@ async def sample_set_iam_policy():
21612197
# Create or coerce a protobuf request object.
21622198
# - Quick check: If we got a request object, we should *not* have
21632199
# gotten any keyword arguments that map to the request.
2164-
has_flattened_params = any([resource])
2200+
flattened_params = [resource]
2201+
has_flattened_params = (
2202+
len([param for param in flattened_params if param is not None]) > 0
2203+
)
21652204
if request is not None and has_flattened_params:
21662205
raise ValueError(
21672206
"If the `request` argument is set, then none of "
@@ -2301,7 +2340,10 @@ async def sample_get_iam_policy():
23012340
# Create or coerce a protobuf request object.
23022341
# - Quick check: If we got a request object, we should *not* have
23032342
# gotten any keyword arguments that map to the request.
2304-
has_flattened_params = any([resource])
2343+
flattened_params = [resource]
2344+
has_flattened_params = (
2345+
len([param for param in flattened_params if param is not None]) > 0
2346+
)
23052347
if request is not None and has_flattened_params:
23062348
raise ValueError(
23072349
"If the `request` argument is set, then none of "
@@ -2423,7 +2465,10 @@ async def sample_test_iam_permissions():
24232465
# Create or coerce a protobuf request object.
24242466
# - Quick check: If we got a request object, we should *not* have
24252467
# gotten any keyword arguments that map to the request.
2426-
has_flattened_params = any([resource, permissions])
2468+
flattened_params = [resource, permissions]
2469+
has_flattened_params = (
2470+
len([param for param in flattened_params if param is not None]) > 0
2471+
)
24272472
if request is not None and has_flattened_params:
24282473
raise ValueError(
24292474
"If the `request` argument is set, then none of "
@@ -2535,7 +2580,10 @@ async def sample_get_instance_partition():
25352580
# Create or coerce a protobuf request object.
25362581
# - Quick check: If we got a request object, we should *not* have
25372582
# gotten any keyword arguments that map to the request.
2538-
has_flattened_params = any([name])
2583+
flattened_params = [name]
2584+
has_flattened_params = (
2585+
len([param for param in flattened_params if param is not None]) > 0
2586+
)
25392587
if request is not None and has_flattened_params:
25402588
raise ValueError(
25412589
"If the `request` argument is set, then none of "
@@ -2717,7 +2765,10 @@ async def sample_create_instance_partition():
27172765
# Create or coerce a protobuf request object.
27182766
# - Quick check: If we got a request object, we should *not* have
27192767
# gotten any keyword arguments that map to the request.
2720-
has_flattened_params = any([parent, instance_partition, instance_partition_id])
2768+
flattened_params = [parent, instance_partition, instance_partition_id]
2769+
has_flattened_params = (
2770+
len([param for param in flattened_params if param is not None]) > 0
2771+
)
27212772
if request is not None and has_flattened_params:
27222773
raise ValueError(
27232774
"If the `request` argument is set, then none of "
@@ -2839,7 +2890,10 @@ async def sample_delete_instance_partition():
28392890
# Create or coerce a protobuf request object.
28402891
# - Quick check: If we got a request object, we should *not* have
28412892
# gotten any keyword arguments that map to the request.
2842-
has_flattened_params = any([name])
2893+
flattened_params = [name]
2894+
has_flattened_params = (
2895+
len([param for param in flattened_params if param is not None]) > 0
2896+
)
28432897
if request is not None and has_flattened_params:
28442898
raise ValueError(
28452899
"If the `request` argument is set, then none of "
@@ -3021,7 +3075,10 @@ async def sample_update_instance_partition():
30213075
# Create or coerce a protobuf request object.
30223076
# - Quick check: If we got a request object, we should *not* have
30233077
# gotten any keyword arguments that map to the request.
3024-
has_flattened_params = any([instance_partition, field_mask])
3078+
flattened_params = [instance_partition, field_mask]
3079+
has_flattened_params = (
3080+
len([param for param in flattened_params if param is not None]) > 0
3081+
)
30253082
if request is not None and has_flattened_params:
30263083
raise ValueError(
30273084
"If the `request` argument is set, then none of "
@@ -3164,7 +3221,10 @@ async def sample_list_instance_partition_operations():
31643221
# Create or coerce a protobuf request object.
31653222
# - Quick check: If we got a request object, we should *not* have
31663223
# gotten any keyword arguments that map to the request.
3167-
has_flattened_params = any([parent])
3224+
flattened_params = [parent]
3225+
has_flattened_params = (
3226+
len([param for param in flattened_params if param is not None]) > 0
3227+
)
31683228
if request is not None and has_flattened_params:
31693229
raise ValueError(
31703230
"If the `request` argument is set, then none of "

0 commit comments

Comments
 (0)