@@ -459,7 +459,8 @@ async def sample_list_assets():
459459 # Create or coerce a protobuf request object.
460460 # - Quick check: If we got a request object, we should *not* have
461461 # gotten any keyword arguments that map to the request.
462- has_flattened_params = any ([parent ])
462+ flattened_params = [parent ]
463+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
463464 if request is not None and has_flattened_params :
464465 raise ValueError ("If the `request` argument is set, then none of "
465466 "the individual field arguments should be set." )
@@ -682,7 +683,8 @@ async def sample_create_feed():
682683 # Create or coerce a protobuf request object.
683684 # - Quick check: If we got a request object, we should *not* have
684685 # gotten any keyword arguments that map to the request.
685- has_flattened_params = any ([parent ])
686+ flattened_params = [parent ]
687+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
686688 if request is not None and has_flattened_params :
687689 raise ValueError ("If the `request` argument is set, then none of "
688690 "the individual field arguments should be set." )
@@ -794,7 +796,8 @@ async def sample_get_feed():
794796 # Create or coerce a protobuf request object.
795797 # - Quick check: If we got a request object, we should *not* have
796798 # gotten any keyword arguments that map to the request.
797- has_flattened_params = any ([name ])
799+ flattened_params = [name ]
800+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
798801 if request is not None and has_flattened_params :
799802 raise ValueError ("If the `request` argument is set, then none of "
800803 "the individual field arguments should be set." )
@@ -901,7 +904,8 @@ async def sample_list_feeds():
901904 # Create or coerce a protobuf request object.
902905 # - Quick check: If we got a request object, we should *not* have
903906 # gotten any keyword arguments that map to the request.
904- has_flattened_params = any ([parent ])
907+ flattened_params = [parent ]
908+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
905909 if request is not None and has_flattened_params :
906910 raise ValueError ("If the `request` argument is set, then none of "
907911 "the individual field arguments should be set." )
@@ -1017,7 +1021,8 @@ async def sample_update_feed():
10171021 # Create or coerce a protobuf request object.
10181022 # - Quick check: If we got a request object, we should *not* have
10191023 # gotten any keyword arguments that map to the request.
1020- has_flattened_params = any ([feed ])
1024+ flattened_params = [feed ]
1025+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
10211026 if request is not None and has_flattened_params :
10221027 raise ValueError ("If the `request` argument is set, then none of "
10231028 "the individual field arguments should be set." )
@@ -1114,7 +1119,8 @@ async def sample_delete_feed():
11141119 # Create or coerce a protobuf request object.
11151120 # - Quick check: If we got a request object, we should *not* have
11161121 # gotten any keyword arguments that map to the request.
1117- has_flattened_params = any ([name ])
1122+ flattened_params = [name ]
1123+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
11181124 if request is not None and has_flattened_params :
11191125 raise ValueError ("If the `request` argument is set, then none of "
11201126 "the individual field arguments should be set." )
@@ -1328,7 +1334,8 @@ async def sample_search_all_resources():
13281334 # Create or coerce a protobuf request object.
13291335 # - Quick check: If we got a request object, we should *not* have
13301336 # gotten any keyword arguments that map to the request.
1331- has_flattened_params = any ([scope , query , asset_types ])
1337+ flattened_params = [scope , query , asset_types ]
1338+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
13321339 if request is not None and has_flattened_params :
13331340 raise ValueError ("If the `request` argument is set, then none of "
13341341 "the individual field arguments should be set." )
@@ -1523,7 +1530,8 @@ async def sample_search_all_iam_policies():
15231530 # Create or coerce a protobuf request object.
15241531 # - Quick check: If we got a request object, we should *not* have
15251532 # gotten any keyword arguments that map to the request.
1526- has_flattened_params = any ([scope , query ])
1533+ flattened_params = [scope , query ]
1534+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
15271535 if request is not None and has_flattened_params :
15281536 raise ValueError ("If the `request` argument is set, then none of "
15291537 "the individual field arguments should be set." )
@@ -2067,7 +2075,8 @@ async def sample_create_saved_query():
20672075 # Create or coerce a protobuf request object.
20682076 # - Quick check: If we got a request object, we should *not* have
20692077 # gotten any keyword arguments that map to the request.
2070- has_flattened_params = any ([parent , saved_query , saved_query_id ])
2078+ flattened_params = [parent , saved_query , saved_query_id ]
2079+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
20712080 if request is not None and has_flattened_params :
20722081 raise ValueError ("If the `request` argument is set, then none of "
20732082 "the individual field arguments should be set." )
@@ -2179,7 +2188,8 @@ async def sample_get_saved_query():
21792188 # Create or coerce a protobuf request object.
21802189 # - Quick check: If we got a request object, we should *not* have
21812190 # gotten any keyword arguments that map to the request.
2182- has_flattened_params = any ([name ])
2191+ flattened_params = [name ]
2192+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
21832193 if request is not None and has_flattened_params :
21842194 raise ValueError ("If the `request` argument is set, then none of "
21852195 "the individual field arguments should be set." )
@@ -2293,7 +2303,8 @@ async def sample_list_saved_queries():
22932303 # Create or coerce a protobuf request object.
22942304 # - Quick check: If we got a request object, we should *not* have
22952305 # gotten any keyword arguments that map to the request.
2296- has_flattened_params = any ([parent ])
2306+ flattened_params = [parent ]
2307+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
22972308 if request is not None and has_flattened_params :
22982309 raise ValueError ("If the `request` argument is set, then none of "
22992310 "the individual field arguments should be set." )
@@ -2421,7 +2432,8 @@ async def sample_update_saved_query():
24212432 # Create or coerce a protobuf request object.
24222433 # - Quick check: If we got a request object, we should *not* have
24232434 # gotten any keyword arguments that map to the request.
2424- has_flattened_params = any ([saved_query , update_mask ])
2435+ flattened_params = [saved_query , update_mask ]
2436+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
24252437 if request is not None and has_flattened_params :
24262438 raise ValueError ("If the `request` argument is set, then none of "
24272439 "the individual field arguments should be set." )
@@ -2522,7 +2534,8 @@ async def sample_delete_saved_query():
25222534 # Create or coerce a protobuf request object.
25232535 # - Quick check: If we got a request object, we should *not* have
25242536 # gotten any keyword arguments that map to the request.
2525- has_flattened_params = any ([name ])
2537+ flattened_params = [name ]
2538+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
25262539 if request is not None and has_flattened_params :
25272540 raise ValueError ("If the `request` argument is set, then none of "
25282541 "the individual field arguments should be set." )
@@ -2744,7 +2757,8 @@ async def sample_analyze_org_policies():
27442757 # Create or coerce a protobuf request object.
27452758 # - Quick check: If we got a request object, we should *not* have
27462759 # gotten any keyword arguments that map to the request.
2747- has_flattened_params = any ([scope , constraint , filter ])
2760+ flattened_params = [scope , constraint , filter ]
2761+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
27482762 if request is not None and has_flattened_params :
27492763 raise ValueError ("If the `request` argument is set, then none of "
27502764 "the individual field arguments should be set." )
@@ -2898,7 +2912,8 @@ async def sample_analyze_org_policy_governed_containers():
28982912 # Create or coerce a protobuf request object.
28992913 # - Quick check: If we got a request object, we should *not* have
29002914 # gotten any keyword arguments that map to the request.
2901- has_flattened_params = any ([scope , constraint , filter ])
2915+ flattened_params = [scope , constraint , filter ]
2916+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
29022917 if request is not None and has_flattened_params :
29032918 raise ValueError ("If the `request` argument is set, then none of "
29042919 "the individual field arguments should be set." )
@@ -3081,7 +3096,8 @@ async def sample_analyze_org_policy_governed_assets():
30813096 # Create or coerce a protobuf request object.
30823097 # - Quick check: If we got a request object, we should *not* have
30833098 # gotten any keyword arguments that map to the request.
3084- has_flattened_params = any ([scope , constraint , filter ])
3099+ flattened_params = [scope , constraint , filter ]
3100+ has_flattened_params = len ([param for param in flattened_params if param is not None ]) > 0
30853101 if request is not None and has_flattened_params :
30863102 raise ValueError ("If the `request` argument is set, then none of "
30873103 "the individual field arguments should be set." )
0 commit comments