@@ -74,9 +74,41 @@ class CloudRedisAsyncClient:
74
74
instance_path = staticmethod (CloudRedisClient .instance_path )
75
75
parse_instance_path = staticmethod (CloudRedisClient .parse_instance_path )
76
76
77
+ common_billing_account_path = staticmethod (
78
+ CloudRedisClient .common_billing_account_path
79
+ )
80
+ parse_common_billing_account_path = staticmethod (
81
+ CloudRedisClient .parse_common_billing_account_path
82
+ )
83
+
84
+ common_folder_path = staticmethod (CloudRedisClient .common_folder_path )
85
+ parse_common_folder_path = staticmethod (CloudRedisClient .parse_common_folder_path )
86
+
87
+ common_organization_path = staticmethod (CloudRedisClient .common_organization_path )
88
+ parse_common_organization_path = staticmethod (
89
+ CloudRedisClient .parse_common_organization_path
90
+ )
91
+
92
+ common_project_path = staticmethod (CloudRedisClient .common_project_path )
93
+ parse_common_project_path = staticmethod (CloudRedisClient .parse_common_project_path )
94
+
95
+ common_location_path = staticmethod (CloudRedisClient .common_location_path )
96
+ parse_common_location_path = staticmethod (
97
+ CloudRedisClient .parse_common_location_path
98
+ )
99
+
77
100
from_service_account_file = CloudRedisClient .from_service_account_file
78
101
from_service_account_json = from_service_account_file
79
102
103
+ @property
104
+ def transport (self ) -> CloudRedisTransport :
105
+ """Return the transport used by the client instance.
106
+
107
+ Returns:
108
+ CloudRedisTransport: The transport used by the client instance.
109
+ """
110
+ return self ._client .transport
111
+
80
112
get_transport_class = functools .partial (
81
113
type (CloudRedisClient ).get_transport_class , type (CloudRedisClient )
82
114
)
@@ -180,7 +212,8 @@ async def list_instances(
180
212
# Create or coerce a protobuf request object.
181
213
# Sanity check: If we got a request object, we should *not* have
182
214
# gotten any keyword arguments that map to the request.
183
- if request is not None and builtins .any ([parent ]):
215
+ has_flattened_params = builtins .any ([parent ])
216
+ if request is not None and has_flattened_params :
184
217
raise ValueError (
185
218
"If the `request` argument is set, then none of "
186
219
"the individual field arguments should be set."
@@ -256,7 +289,8 @@ async def get_instance(
256
289
# Create or coerce a protobuf request object.
257
290
# Sanity check: If we got a request object, we should *not* have
258
291
# gotten any keyword arguments that map to the request.
259
- if request is not None and builtins .any ([name ]):
292
+ has_flattened_params = builtins .any ([name ])
293
+ if request is not None and has_flattened_params :
260
294
raise ValueError (
261
295
"If the `request` argument is set, then none of "
262
296
"the individual field arguments should be set."
@@ -365,7 +399,8 @@ async def create_instance(
365
399
# Create or coerce a protobuf request object.
366
400
# Sanity check: If we got a request object, we should *not* have
367
401
# gotten any keyword arguments that map to the request.
368
- if request is not None and builtins .any ([parent , instance_id , instance ]):
402
+ has_flattened_params = builtins .any ([parent , instance_id , instance ])
403
+ if request is not None and has_flattened_params :
369
404
raise ValueError (
370
405
"If the `request` argument is set, then none of "
371
406
"the individual field arguments should be set."
@@ -470,7 +505,8 @@ async def update_instance(
470
505
# Create or coerce a protobuf request object.
471
506
# Sanity check: If we got a request object, we should *not* have
472
507
# gotten any keyword arguments that map to the request.
473
- if request is not None and builtins .any ([update_mask , instance ]):
508
+ has_flattened_params = builtins .any ([update_mask , instance ])
509
+ if request is not None and has_flattened_params :
474
510
raise ValueError (
475
511
"If the `request` argument is set, then none of "
476
512
"the individual field arguments should be set."
@@ -565,7 +601,8 @@ async def upgrade_instance(
565
601
# Create or coerce a protobuf request object.
566
602
# Sanity check: If we got a request object, we should *not* have
567
603
# gotten any keyword arguments that map to the request.
568
- if request is not None and builtins .any ([name , redis_version ]):
604
+ has_flattened_params = builtins .any ([name , redis_version ])
605
+ if request is not None and has_flattened_params :
569
606
raise ValueError (
570
607
"If the `request` argument is set, then none of "
571
608
"the individual field arguments should be set."
@@ -665,7 +702,8 @@ async def import_instance(
665
702
# Create or coerce a protobuf request object.
666
703
# Sanity check: If we got a request object, we should *not* have
667
704
# gotten any keyword arguments that map to the request.
668
- if request is not None and builtins .any ([name , input_config ]):
705
+ has_flattened_params = builtins .any ([name , input_config ])
706
+ if request is not None and has_flattened_params :
669
707
raise ValueError (
670
708
"If the `request` argument is set, then none of "
671
709
"the individual field arguments should be set."
@@ -761,7 +799,8 @@ async def export_instance(
761
799
# Create or coerce a protobuf request object.
762
800
# Sanity check: If we got a request object, we should *not* have
763
801
# gotten any keyword arguments that map to the request.
764
- if request is not None and builtins .any ([name , output_config ]):
802
+ has_flattened_params = builtins .any ([name , output_config ])
803
+ if request is not None and has_flattened_params :
765
804
raise ValueError (
766
805
"If the `request` argument is set, then none of "
767
806
"the individual field arguments should be set."
@@ -856,7 +895,8 @@ async def failover_instance(
856
895
# Create or coerce a protobuf request object.
857
896
# Sanity check: If we got a request object, we should *not* have
858
897
# gotten any keyword arguments that map to the request.
859
- if request is not None and builtins .any ([name , data_protection_mode ]):
898
+ has_flattened_params = builtins .any ([name , data_protection_mode ])
899
+ if request is not None and has_flattened_params :
860
900
raise ValueError (
861
901
"If the `request` argument is set, then none of "
862
902
"the individual field arguments should be set."
@@ -954,7 +994,8 @@ async def delete_instance(
954
994
# Create or coerce a protobuf request object.
955
995
# Sanity check: If we got a request object, we should *not* have
956
996
# gotten any keyword arguments that map to the request.
957
- if request is not None and builtins .any ([name ]):
997
+ has_flattened_params = builtins .any ([name ])
998
+ if request is not None and has_flattened_params :
958
999
raise ValueError (
959
1000
"If the `request` argument is set, then none of "
960
1001
"the individual field arguments should be set."
0 commit comments