@@ -54,14 +54,58 @@ class DataTransferServiceAsyncClient:
5454 DEFAULT_ENDPOINT = DataTransferServiceClient .DEFAULT_ENDPOINT
5555 DEFAULT_MTLS_ENDPOINT = DataTransferServiceClient .DEFAULT_MTLS_ENDPOINT
5656
57+ data_source_path = staticmethod (DataTransferServiceClient .data_source_path )
58+ parse_data_source_path = staticmethod (
59+ DataTransferServiceClient .parse_data_source_path
60+ )
61+ run_path = staticmethod (DataTransferServiceClient .run_path )
62+ parse_run_path = staticmethod (DataTransferServiceClient .parse_run_path )
5763 transfer_config_path = staticmethod (DataTransferServiceClient .transfer_config_path )
5864 parse_transfer_config_path = staticmethod (
5965 DataTransferServiceClient .parse_transfer_config_path
6066 )
6167
68+ common_billing_account_path = staticmethod (
69+ DataTransferServiceClient .common_billing_account_path
70+ )
71+ parse_common_billing_account_path = staticmethod (
72+ DataTransferServiceClient .parse_common_billing_account_path
73+ )
74+
75+ common_folder_path = staticmethod (DataTransferServiceClient .common_folder_path )
76+ parse_common_folder_path = staticmethod (
77+ DataTransferServiceClient .parse_common_folder_path
78+ )
79+
80+ common_organization_path = staticmethod (
81+ DataTransferServiceClient .common_organization_path
82+ )
83+ parse_common_organization_path = staticmethod (
84+ DataTransferServiceClient .parse_common_organization_path
85+ )
86+
87+ common_project_path = staticmethod (DataTransferServiceClient .common_project_path )
88+ parse_common_project_path = staticmethod (
89+ DataTransferServiceClient .parse_common_project_path
90+ )
91+
92+ common_location_path = staticmethod (DataTransferServiceClient .common_location_path )
93+ parse_common_location_path = staticmethod (
94+ DataTransferServiceClient .parse_common_location_path
95+ )
96+
6297 from_service_account_file = DataTransferServiceClient .from_service_account_file
6398 from_service_account_json = from_service_account_file
6499
100+ @property
101+ def transport (self ) -> DataTransferServiceTransport :
102+ """Return the transport used by the client instance.
103+
104+ Returns:
105+ DataTransferServiceTransport: The transport used by the client instance.
106+ """
107+ return self ._client .transport
108+
65109 get_transport_class = functools .partial (
66110 type (DataTransferServiceClient ).get_transport_class ,
67111 type (DataTransferServiceClient ),
@@ -156,7 +200,8 @@ async def get_data_source(
156200 # Create or coerce a protobuf request object.
157201 # Sanity check: If we got a request object, we should *not* have
158202 # gotten any keyword arguments that map to the request.
159- if request is not None and any ([name ]):
203+ has_flattened_params = any ([name ])
204+ if request is not None and has_flattened_params :
160205 raise ValueError (
161206 "If the `request` argument is set, then none of "
162207 "the individual field arguments should be set."
@@ -241,7 +286,8 @@ async def list_data_sources(
241286 # Create or coerce a protobuf request object.
242287 # Sanity check: If we got a request object, we should *not* have
243288 # gotten any keyword arguments that map to the request.
244- if request is not None and any ([parent ]):
289+ has_flattened_params = any ([parent ])
290+ if request is not None and has_flattened_params :
245291 raise ValueError (
246292 "If the `request` argument is set, then none of "
247293 "the individual field arguments should be set."
@@ -348,7 +394,8 @@ async def create_transfer_config(
348394 # Create or coerce a protobuf request object.
349395 # Sanity check: If we got a request object, we should *not* have
350396 # gotten any keyword arguments that map to the request.
351- if request is not None and any ([parent , transfer_config ]):
397+ has_flattened_params = any ([parent , transfer_config ])
398+ if request is not None and has_flattened_params :
352399 raise ValueError (
353400 "If the `request` argument is set, then none of "
354401 "the individual field arguments should be set."
@@ -436,7 +483,8 @@ async def update_transfer_config(
436483 # Create or coerce a protobuf request object.
437484 # Sanity check: If we got a request object, we should *not* have
438485 # gotten any keyword arguments that map to the request.
439- if request is not None and any ([transfer_config , update_mask ]):
486+ has_flattened_params = any ([transfer_config , update_mask ])
487+ if request is not None and has_flattened_params :
440488 raise ValueError (
441489 "If the `request` argument is set, then none of "
442490 "the individual field arguments should be set."
@@ -509,7 +557,8 @@ async def delete_transfer_config(
509557 # Create or coerce a protobuf request object.
510558 # Sanity check: If we got a request object, we should *not* have
511559 # gotten any keyword arguments that map to the request.
512- if request is not None and any ([name ]):
560+ has_flattened_params = any ([name ])
561+ if request is not None and has_flattened_params :
513562 raise ValueError (
514563 "If the `request` argument is set, then none of "
515564 "the individual field arguments should be set."
@@ -594,7 +643,8 @@ async def get_transfer_config(
594643 # Create or coerce a protobuf request object.
595644 # Sanity check: If we got a request object, we should *not* have
596645 # gotten any keyword arguments that map to the request.
597- if request is not None and any ([name ]):
646+ has_flattened_params = any ([name ])
647+ if request is not None and has_flattened_params :
598648 raise ValueError (
599649 "If the `request` argument is set, then none of "
600650 "the individual field arguments should be set."
@@ -678,7 +728,8 @@ async def list_transfer_configs(
678728 # Create or coerce a protobuf request object.
679729 # Sanity check: If we got a request object, we should *not* have
680730 # gotten any keyword arguments that map to the request.
681- if request is not None and any ([parent ]):
731+ has_flattened_params = any ([parent ])
732+ if request is not None and has_flattened_params :
682733 raise ValueError (
683734 "If the `request` argument is set, then none of "
684735 "the individual field arguments should be set."
@@ -782,7 +833,8 @@ async def schedule_transfer_runs(
782833 # Create or coerce a protobuf request object.
783834 # Sanity check: If we got a request object, we should *not* have
784835 # gotten any keyword arguments that map to the request.
785- if request is not None and any ([parent , start_time , end_time ]):
836+ has_flattened_params = any ([parent , start_time , end_time ])
837+ if request is not None and has_flattened_params :
786838 raise ValueError (
787839 "If the `request` argument is set, then none of "
788840 "the individual field arguments should be set."
@@ -913,7 +965,8 @@ async def get_transfer_run(
913965 # Create or coerce a protobuf request object.
914966 # Sanity check: If we got a request object, we should *not* have
915967 # gotten any keyword arguments that map to the request.
916- if request is not None and any ([name ]):
968+ has_flattened_params = any ([name ])
969+ if request is not None and has_flattened_params :
917970 raise ValueError (
918971 "If the `request` argument is set, then none of "
919972 "the individual field arguments should be set."
@@ -989,7 +1042,8 @@ async def delete_transfer_run(
9891042 # Create or coerce a protobuf request object.
9901043 # Sanity check: If we got a request object, we should *not* have
9911044 # gotten any keyword arguments that map to the request.
992- if request is not None and any ([name ]):
1045+ has_flattened_params = any ([name ])
1046+ if request is not None and has_flattened_params :
9931047 raise ValueError (
9941048 "If the `request` argument is set, then none of "
9951049 "the individual field arguments should be set."
@@ -1075,7 +1129,8 @@ async def list_transfer_runs(
10751129 # Create or coerce a protobuf request object.
10761130 # Sanity check: If we got a request object, we should *not* have
10771131 # gotten any keyword arguments that map to the request.
1078- if request is not None and any ([parent ]):
1132+ has_flattened_params = any ([parent ])
1133+ if request is not None and has_flattened_params :
10791134 raise ValueError (
10801135 "If the `request` argument is set, then none of "
10811136 "the individual field arguments should be set."
@@ -1166,7 +1221,8 @@ async def list_transfer_logs(
11661221 # Create or coerce a protobuf request object.
11671222 # Sanity check: If we got a request object, we should *not* have
11681223 # gotten any keyword arguments that map to the request.
1169- if request is not None and any ([parent ]):
1224+ has_flattened_params = any ([parent ])
1225+ if request is not None and has_flattened_params :
11701226 raise ValueError (
11711227 "If the `request` argument is set, then none of "
11721228 "the individual field arguments should be set."
@@ -1265,7 +1321,8 @@ async def check_valid_creds(
12651321 # Create or coerce a protobuf request object.
12661322 # Sanity check: If we got a request object, we should *not* have
12671323 # gotten any keyword arguments that map to the request.
1268- if request is not None and any ([name ]):
1324+ has_flattened_params = any ([name ])
1325+ if request is not None and has_flattened_params :
12691326 raise ValueError (
12701327 "If the `request` argument is set, then none of "
12711328 "the individual field arguments should be set."
0 commit comments