@@ -54,14 +54,58 @@ class FirestoreAdminAsyncClient:
54
54
DEFAULT_ENDPOINT = FirestoreAdminClient .DEFAULT_ENDPOINT
55
55
DEFAULT_MTLS_ENDPOINT = FirestoreAdminClient .DEFAULT_MTLS_ENDPOINT
56
56
57
+ collection_group_path = staticmethod (FirestoreAdminClient .collection_group_path )
58
+ parse_collection_group_path = staticmethod (
59
+ FirestoreAdminClient .parse_collection_group_path
60
+ )
61
+ database_path = staticmethod (FirestoreAdminClient .database_path )
62
+ parse_database_path = staticmethod (FirestoreAdminClient .parse_database_path )
57
63
field_path = staticmethod (FirestoreAdminClient .field_path )
58
64
parse_field_path = staticmethod (FirestoreAdminClient .parse_field_path )
59
65
index_path = staticmethod (FirestoreAdminClient .index_path )
60
66
parse_index_path = staticmethod (FirestoreAdminClient .parse_index_path )
61
67
68
+ common_billing_account_path = staticmethod (
69
+ FirestoreAdminClient .common_billing_account_path
70
+ )
71
+ parse_common_billing_account_path = staticmethod (
72
+ FirestoreAdminClient .parse_common_billing_account_path
73
+ )
74
+
75
+ common_folder_path = staticmethod (FirestoreAdminClient .common_folder_path )
76
+ parse_common_folder_path = staticmethod (
77
+ FirestoreAdminClient .parse_common_folder_path
78
+ )
79
+
80
+ common_organization_path = staticmethod (
81
+ FirestoreAdminClient .common_organization_path
82
+ )
83
+ parse_common_organization_path = staticmethod (
84
+ FirestoreAdminClient .parse_common_organization_path
85
+ )
86
+
87
+ common_project_path = staticmethod (FirestoreAdminClient .common_project_path )
88
+ parse_common_project_path = staticmethod (
89
+ FirestoreAdminClient .parse_common_project_path
90
+ )
91
+
92
+ common_location_path = staticmethod (FirestoreAdminClient .common_location_path )
93
+ parse_common_location_path = staticmethod (
94
+ FirestoreAdminClient .parse_common_location_path
95
+ )
96
+
62
97
from_service_account_file = FirestoreAdminClient .from_service_account_file
63
98
from_service_account_json = from_service_account_file
64
99
100
+ @property
101
+ def transport (self ) -> FirestoreAdminTransport :
102
+ """Return the transport used by the client instance.
103
+
104
+ Returns:
105
+ FirestoreAdminTransport: The transport used by the client instance.
106
+ """
107
+ return self ._client .transport
108
+
65
109
get_transport_class = functools .partial (
66
110
type (FirestoreAdminClient ).get_transport_class , type (FirestoreAdminClient )
67
111
)
@@ -166,7 +210,8 @@ async def create_index(
166
210
# Create or coerce a protobuf request object.
167
211
# Sanity check: If we got a request object, we should *not* have
168
212
# gotten any keyword arguments that map to the request.
169
- if request is not None and any ([parent , index ]):
213
+ has_flattened_params = any ([parent , index ])
214
+ if request is not None and has_flattened_params :
170
215
raise ValueError (
171
216
"If the `request` argument is set, then none of "
172
217
"the individual field arguments should be set."
@@ -250,7 +295,8 @@ async def list_indexes(
250
295
# Create or coerce a protobuf request object.
251
296
# Sanity check: If we got a request object, we should *not* have
252
297
# gotten any keyword arguments that map to the request.
253
- if request is not None and any ([parent ]):
298
+ has_flattened_params = any ([parent ])
299
+ if request is not None and has_flattened_params :
254
300
raise ValueError (
255
301
"If the `request` argument is set, then none of "
256
302
"the individual field arguments should be set."
@@ -338,7 +384,8 @@ async def get_index(
338
384
# Create or coerce a protobuf request object.
339
385
# Sanity check: If we got a request object, we should *not* have
340
386
# gotten any keyword arguments that map to the request.
341
- if request is not None and any ([name ]):
387
+ has_flattened_params = any ([name ])
388
+ if request is not None and has_flattened_params :
342
389
raise ValueError (
343
390
"If the `request` argument is set, then none of "
344
391
"the individual field arguments should be set."
@@ -413,7 +460,8 @@ async def delete_index(
413
460
# Create or coerce a protobuf request object.
414
461
# Sanity check: If we got a request object, we should *not* have
415
462
# gotten any keyword arguments that map to the request.
416
- if request is not None and any ([name ]):
463
+ has_flattened_params = any ([name ])
464
+ if request is not None and has_flattened_params :
417
465
raise ValueError (
418
466
"If the `request` argument is set, then none of "
419
467
"the individual field arguments should be set."
@@ -496,7 +544,8 @@ async def get_field(
496
544
# Create or coerce a protobuf request object.
497
545
# Sanity check: If we got a request object, we should *not* have
498
546
# gotten any keyword arguments that map to the request.
499
- if request is not None and any ([name ]):
547
+ has_flattened_params = any ([name ])
548
+ if request is not None and has_flattened_params :
500
549
raise ValueError (
501
550
"If the `request` argument is set, then none of "
502
551
"the individual field arguments should be set."
@@ -598,7 +647,8 @@ async def update_field(
598
647
# Create or coerce a protobuf request object.
599
648
# Sanity check: If we got a request object, we should *not* have
600
649
# gotten any keyword arguments that map to the request.
601
- if request is not None and any ([field ]):
650
+ has_flattened_params = any ([field ])
651
+ if request is not None and has_flattened_params :
602
652
raise ValueError (
603
653
"If the `request` argument is set, then none of "
604
654
"the individual field arguments should be set."
@@ -689,7 +739,8 @@ async def list_fields(
689
739
# Create or coerce a protobuf request object.
690
740
# Sanity check: If we got a request object, we should *not* have
691
741
# gotten any keyword arguments that map to the request.
692
- if request is not None and any ([parent ]):
742
+ has_flattened_params = any ([parent ])
743
+ if request is not None and has_flattened_params :
693
744
raise ValueError (
694
745
"If the `request` argument is set, then none of "
695
746
"the individual field arguments should be set."
@@ -790,7 +841,8 @@ async def export_documents(
790
841
# Create or coerce a protobuf request object.
791
842
# Sanity check: If we got a request object, we should *not* have
792
843
# gotten any keyword arguments that map to the request.
793
- if request is not None and any ([name ]):
844
+ has_flattened_params = any ([name ])
845
+ if request is not None and has_flattened_params :
794
846
raise ValueError (
795
847
"If the `request` argument is set, then none of "
796
848
"the individual field arguments should be set."
@@ -890,7 +942,8 @@ async def import_documents(
890
942
# Create or coerce a protobuf request object.
891
943
# Sanity check: If we got a request object, we should *not* have
892
944
# gotten any keyword arguments that map to the request.
893
- if request is not None and any ([name ]):
945
+ has_flattened_params = any ([name ])
946
+ if request is not None and has_flattened_params :
894
947
raise ValueError (
895
948
"If the `request` argument is set, then none of "
896
949
"the individual field arguments should be set."
0 commit comments