@@ -74,9 +74,41 @@ class CloudRedisAsyncClient:
7474 instance_path = staticmethod (CloudRedisClient .instance_path )
7575 parse_instance_path = staticmethod (CloudRedisClient .parse_instance_path )
7676
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+
77100 from_service_account_file = CloudRedisClient .from_service_account_file
78101 from_service_account_json = from_service_account_file
79102
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+
80112 get_transport_class = functools .partial (
81113 type (CloudRedisClient ).get_transport_class , type (CloudRedisClient )
82114 )
@@ -180,7 +212,8 @@ async def list_instances(
180212 # Create or coerce a protobuf request object.
181213 # Sanity check: If we got a request object, we should *not* have
182214 # 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 :
184217 raise ValueError (
185218 "If the `request` argument is set, then none of "
186219 "the individual field arguments should be set."
@@ -256,7 +289,8 @@ async def get_instance(
256289 # Create or coerce a protobuf request object.
257290 # Sanity check: If we got a request object, we should *not* have
258291 # 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 :
260294 raise ValueError (
261295 "If the `request` argument is set, then none of "
262296 "the individual field arguments should be set."
@@ -365,7 +399,8 @@ async def create_instance(
365399 # Create or coerce a protobuf request object.
366400 # Sanity check: If we got a request object, we should *not* have
367401 # 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 :
369404 raise ValueError (
370405 "If the `request` argument is set, then none of "
371406 "the individual field arguments should be set."
@@ -470,7 +505,8 @@ async def update_instance(
470505 # Create or coerce a protobuf request object.
471506 # Sanity check: If we got a request object, we should *not* have
472507 # 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 :
474510 raise ValueError (
475511 "If the `request` argument is set, then none of "
476512 "the individual field arguments should be set."
@@ -565,7 +601,8 @@ async def upgrade_instance(
565601 # Create or coerce a protobuf request object.
566602 # Sanity check: If we got a request object, we should *not* have
567603 # 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 :
569606 raise ValueError (
570607 "If the `request` argument is set, then none of "
571608 "the individual field arguments should be set."
@@ -665,7 +702,8 @@ async def import_instance(
665702 # Create or coerce a protobuf request object.
666703 # Sanity check: If we got a request object, we should *not* have
667704 # 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 :
669707 raise ValueError (
670708 "If the `request` argument is set, then none of "
671709 "the individual field arguments should be set."
@@ -761,7 +799,8 @@ async def export_instance(
761799 # Create or coerce a protobuf request object.
762800 # Sanity check: If we got a request object, we should *not* have
763801 # 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 :
765804 raise ValueError (
766805 "If the `request` argument is set, then none of "
767806 "the individual field arguments should be set."
@@ -856,7 +895,8 @@ async def failover_instance(
856895 # Create or coerce a protobuf request object.
857896 # Sanity check: If we got a request object, we should *not* have
858897 # 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 :
860900 raise ValueError (
861901 "If the `request` argument is set, then none of "
862902 "the individual field arguments should be set."
@@ -954,7 +994,8 @@ async def delete_instance(
954994 # Create or coerce a protobuf request object.
955995 # Sanity check: If we got a request object, we should *not* have
956996 # 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 :
958999 raise ValueError (
9591000 "If the `request` argument is set, then none of "
9601001 "the individual field arguments should be set."
0 commit comments