google-cloud-firestore-admin-v1 0.17.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c60863f63424d876f806e33a7f22def3b3cdc2a5cd9b7a4f2be5ede40d295ef4
4
- data.tar.gz: 57520227b4e4bf8dedc8776da78f98df18a61e779abbdb6ce3a0207b41c160f0
3
+ metadata.gz: beefda52461d743e224209367e6c4c7e061070ea6ade0d84455bb515d6abe108
4
+ data.tar.gz: be918c796fa37ac02790a1a59563897d6d8f54ba2a8b6952afd9d19fe9180fa6
5
5
  SHA512:
6
- metadata.gz: ca5ad58481929c759417c44bc7f3d729d221f78f91e5affbf5150db3c4d352844770bd0b3a90f4592a0e907fbbbc54c62ab7621f0729d104375480ca9e5d6d84
7
- data.tar.gz: ef9c20c389f34f88dac67a91bddcbad659c7b9352b28713ebd85d35bd54c07553a08e0e0439efe99e3a42d3f917e4a5e7bcc6301d1eb5b728d25914123b61a88
6
+ metadata.gz: 1eed2e39d0d8bf38ee418a172bf5640ec0dcb165de35b5b063eaf5aa53676f2b8c51360ae8891369fb512cc93b5ed23ba73eacf383d0cef2255a46dfae2271ad
7
+ data.tar.gz: 4c6ec690947daf87ace7ce8df66e5deb808926c548b944dff6217a7ffac03ffb29dd378c857d641dc881140b7b84065c3f70e79e0df94af092708225929eab33
@@ -59,6 +59,9 @@ module Google
59
59
  # service `google.longrunning.Operations`.
60
60
  #
61
61
  class Client
62
+ # @private
63
+ API_VERSION = ""
64
+
62
65
  # @private
63
66
  DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$"
64
67
 
@@ -129,6 +132,8 @@ module Google
129
132
 
130
133
  default_config.rpcs.import_documents.timeout = 60.0
131
134
 
135
+ default_config.rpcs.bulk_delete_documents.timeout = 60.0
136
+
132
137
  default_config
133
138
  end
134
139
  yield @configure if block_given?
@@ -319,10 +324,11 @@ module Google
319
324
  # Customize the options with defaults
320
325
  metadata = @config.rpcs.create_index.metadata.to_h
321
326
 
322
- # Set x-goog-api-client and x-goog-user-project headers
327
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
323
328
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
324
329
  lib_name: @config.lib_name, lib_version: @config.lib_version,
325
330
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
331
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
326
332
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
327
333
 
328
334
  header_params = {}
@@ -418,10 +424,11 @@ module Google
418
424
  # Customize the options with defaults
419
425
  metadata = @config.rpcs.list_indexes.metadata.to_h
420
426
 
421
- # Set x-goog-api-client and x-goog-user-project headers
427
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
422
428
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
423
429
  lib_name: @config.lib_name, lib_version: @config.lib_version,
424
430
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
431
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
425
432
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
426
433
 
427
434
  header_params = {}
@@ -505,10 +512,11 @@ module Google
505
512
  # Customize the options with defaults
506
513
  metadata = @config.rpcs.get_index.metadata.to_h
507
514
 
508
- # Set x-goog-api-client and x-goog-user-project headers
515
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
509
516
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
510
517
  lib_name: @config.lib_name, lib_version: @config.lib_version,
511
518
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
519
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
512
520
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
513
521
 
514
522
  header_params = {}
@@ -591,10 +599,11 @@ module Google
591
599
  # Customize the options with defaults
592
600
  metadata = @config.rpcs.delete_index.metadata.to_h
593
601
 
594
- # Set x-goog-api-client and x-goog-user-project headers
602
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
595
603
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
596
604
  lib_name: @config.lib_name, lib_version: @config.lib_version,
597
605
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
606
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
598
607
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
599
608
 
600
609
  header_params = {}
@@ -677,10 +686,11 @@ module Google
677
686
  # Customize the options with defaults
678
687
  metadata = @config.rpcs.get_field.metadata.to_h
679
688
 
680
- # Set x-goog-api-client and x-goog-user-project headers
689
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
681
690
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
682
691
  lib_name: @config.lib_name, lib_version: @config.lib_version,
683
692
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
693
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
684
694
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
685
695
 
686
696
  header_params = {}
@@ -787,10 +797,11 @@ module Google
787
797
  # Customize the options with defaults
788
798
  metadata = @config.rpcs.update_field.metadata.to_h
789
799
 
790
- # Set x-goog-api-client and x-goog-user-project headers
800
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
791
801
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
792
802
  lib_name: @config.lib_name, lib_version: @config.lib_version,
793
803
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
804
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
794
805
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
795
806
 
796
807
  header_params = {}
@@ -853,7 +864,8 @@ module Google
853
864
  # only supports listing fields that have been explicitly overridden. To issue
854
865
  # this query, call
855
866
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}
856
- # with a filter that includes `indexConfig.usesAncestorConfig:false` .
867
+ # with a filter that includes `indexConfig.usesAncestorConfig:false` or
868
+ # `ttlConfig:*`.
857
869
  # @param page_size [::Integer]
858
870
  # The number of results to return.
859
871
  # @param page_token [::String]
@@ -899,10 +911,11 @@ module Google
899
911
  # Customize the options with defaults
900
912
  metadata = @config.rpcs.list_fields.metadata.to_h
901
913
 
902
- # Set x-goog-api-client and x-goog-user-project headers
914
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
903
915
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
904
916
  lib_name: @config.lib_name, lib_version: @config.lib_version,
905
917
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
918
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
906
919
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
907
920
 
908
921
  header_params = {}
@@ -962,7 +975,8 @@ module Google
962
975
  # Required. Database to export. Should be of the form:
963
976
  # `projects/{project_id}/databases/{database_id}`.
964
977
  # @param collection_ids [::Array<::String>]
965
- # Which collection ids to export. Unspecified means all collections.
978
+ # Which collection ids to export. Unspecified means all collections. Each
979
+ # collection id in this list must be unique.
966
980
  # @param output_uri_prefix [::String]
967
981
  # The output URI. Currently only supports Google Cloud Storage URIs of the
968
982
  # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
@@ -1029,10 +1043,11 @@ module Google
1029
1043
  # Customize the options with defaults
1030
1044
  metadata = @config.rpcs.export_documents.metadata.to_h
1031
1045
 
1032
- # Set x-goog-api-client and x-goog-user-project headers
1046
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1033
1047
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1034
1048
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1035
1049
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1050
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1036
1051
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1037
1052
 
1038
1053
  header_params = {}
@@ -1087,7 +1102,7 @@ module Google
1087
1102
  # `projects/{project_id}/databases/{database_id}`.
1088
1103
  # @param collection_ids [::Array<::String>]
1089
1104
  # Which collection ids to import. Unspecified means all collections included
1090
- # in the import.
1105
+ # in the import. Each collection id in this list must be unique.
1091
1106
  # @param input_uri_prefix [::String]
1092
1107
  # Location of the exported files.
1093
1108
  # This must match the output_uri_prefix of an ExportDocumentsResponse from
@@ -1143,10 +1158,11 @@ module Google
1143
1158
  # Customize the options with defaults
1144
1159
  metadata = @config.rpcs.import_documents.metadata.to_h
1145
1160
 
1146
- # Set x-goog-api-client and x-goog-user-project headers
1161
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1147
1162
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1148
1163
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1149
1164
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1165
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1150
1166
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1151
1167
 
1152
1168
  header_params = {}
@@ -1174,6 +1190,124 @@ module Google
1174
1190
  raise ::Google::Cloud::Error.from_error(e)
1175
1191
  end
1176
1192
 
1193
+ ##
1194
+ # Bulk deletes a subset of documents from Google Cloud Firestore.
1195
+ # Documents created or updated after the underlying system starts to process
1196
+ # the request will not be deleted. The bulk delete occurs in the background
1197
+ # and its progress can be monitored and managed via the Operation resource
1198
+ # that is created.
1199
+ #
1200
+ # For more details on bulk delete behavior, refer to:
1201
+ # https://cloud.google.com/firestore/docs/manage-data/bulk-delete
1202
+ #
1203
+ # @overload bulk_delete_documents(request, options = nil)
1204
+ # Pass arguments to `bulk_delete_documents` via a request object, either of type
1205
+ # {::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest} or an equivalent Hash.
1206
+ #
1207
+ # @param request [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Hash]
1208
+ # A request object representing the call parameters. Required. To specify no
1209
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1210
+ # @param options [::Gapic::CallOptions, ::Hash]
1211
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1212
+ #
1213
+ # @overload bulk_delete_documents(name: nil, collection_ids: nil, namespace_ids: nil)
1214
+ # Pass arguments to `bulk_delete_documents` via keyword arguments. Note that at
1215
+ # least one keyword argument is required. To specify no parameters, or to keep all
1216
+ # the default parameter values, pass an empty Hash as a request object (see above).
1217
+ #
1218
+ # @param name [::String]
1219
+ # Required. Database to operate. Should be of the form:
1220
+ # `projects/{project_id}/databases/{database_id}`.
1221
+ # @param collection_ids [::Array<::String>]
1222
+ # Optional. IDs of the collection groups to delete. Unspecified means all
1223
+ # collection groups.
1224
+ #
1225
+ # Each collection group in this list must be unique.
1226
+ # @param namespace_ids [::Array<::String>]
1227
+ # Optional. Namespaces to delete.
1228
+ #
1229
+ # An empty list means all namespaces. This is the recommended
1230
+ # usage for databases that don't use namespaces.
1231
+ #
1232
+ # An empty string element represents the default namespace. This should be
1233
+ # used if the database has data in non-default namespaces, but doesn't want
1234
+ # to delete from them.
1235
+ #
1236
+ # Each namespace in this list must be unique.
1237
+ #
1238
+ # @yield [response, operation] Access the result along with the RPC operation
1239
+ # @yieldparam response [::Gapic::Operation]
1240
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1241
+ #
1242
+ # @return [::Gapic::Operation]
1243
+ #
1244
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1245
+ #
1246
+ # @example Basic example
1247
+ # require "google/cloud/firestore/admin/v1"
1248
+ #
1249
+ # # Create a client object. The client can be reused for multiple calls.
1250
+ # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
1251
+ #
1252
+ # # Create a request. To set request fields, pass in keyword arguments.
1253
+ # request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new
1254
+ #
1255
+ # # Call the bulk_delete_documents method.
1256
+ # result = client.bulk_delete_documents request
1257
+ #
1258
+ # # The returned object is of type Gapic::Operation. You can use it to
1259
+ # # check the status of an operation, cancel it, or wait for results.
1260
+ # # Here is how to wait for a response.
1261
+ # result.wait_until_done! timeout: 60
1262
+ # if result.response?
1263
+ # p result.response
1264
+ # else
1265
+ # puts "No response received."
1266
+ # end
1267
+ #
1268
+ def bulk_delete_documents request, options = nil
1269
+ raise ::ArgumentError, "request must be provided" if request.nil?
1270
+
1271
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest
1272
+
1273
+ # Converts hash and nil to an options object
1274
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1275
+
1276
+ # Customize the options with defaults
1277
+ metadata = @config.rpcs.bulk_delete_documents.metadata.to_h
1278
+
1279
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1280
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1281
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1282
+ gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1283
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1284
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1285
+
1286
+ header_params = {}
1287
+ if request.name
1288
+ header_params["name"] = request.name
1289
+ end
1290
+
1291
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1292
+ metadata[:"x-goog-request-params"] ||= request_params_header
1293
+
1294
+ options.apply_defaults timeout: @config.rpcs.bulk_delete_documents.timeout,
1295
+ metadata: metadata,
1296
+ retry_policy: @config.rpcs.bulk_delete_documents.retry_policy
1297
+
1298
+ options.apply_defaults timeout: @config.timeout,
1299
+ metadata: @config.metadata,
1300
+ retry_policy: @config.retry_policy
1301
+
1302
+ @firestore_admin_stub.call_rpc :bulk_delete_documents, request, options: options do |response, operation|
1303
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1304
+ yield response, operation if block_given?
1305
+ return response
1306
+ end
1307
+ rescue ::GRPC::BadStatus => e
1308
+ raise ::Google::Cloud::Error.from_error(e)
1309
+ end
1310
+
1177
1311
  ##
1178
1312
  # Create a database.
1179
1313
  #
@@ -1248,10 +1382,11 @@ module Google
1248
1382
  # Customize the options with defaults
1249
1383
  metadata = @config.rpcs.create_database.metadata.to_h
1250
1384
 
1251
- # Set x-goog-api-client and x-goog-user-project headers
1385
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1252
1386
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1253
1387
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1254
1388
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1389
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1255
1390
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1256
1391
 
1257
1392
  header_params = {}
@@ -1335,10 +1470,11 @@ module Google
1335
1470
  # Customize the options with defaults
1336
1471
  metadata = @config.rpcs.get_database.metadata.to_h
1337
1472
 
1338
- # Set x-goog-api-client and x-goog-user-project headers
1473
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1339
1474
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1340
1475
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1341
1476
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1477
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1342
1478
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1343
1479
 
1344
1480
  header_params = {}
@@ -1378,7 +1514,7 @@ module Google
1378
1514
  # @param options [::Gapic::CallOptions, ::Hash]
1379
1515
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1380
1516
  #
1381
- # @overload list_databases(parent: nil)
1517
+ # @overload list_databases(parent: nil, show_deleted: nil)
1382
1518
  # Pass arguments to `list_databases` via keyword arguments. Note that at
1383
1519
  # least one keyword argument is required. To specify no parameters, or to keep all
1384
1520
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1386,6 +1522,8 @@ module Google
1386
1522
  # @param parent [::String]
1387
1523
  # Required. A parent name of the form
1388
1524
  # `projects/{project_id}`
1525
+ # @param show_deleted [::Boolean]
1526
+ # If true, also returns deleted resources.
1389
1527
  #
1390
1528
  # @yield [response, operation] Access the result along with the RPC operation
1391
1529
  # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse]
@@ -1421,10 +1559,11 @@ module Google
1421
1559
  # Customize the options with defaults
1422
1560
  metadata = @config.rpcs.list_databases.metadata.to_h
1423
1561
 
1424
- # Set x-goog-api-client and x-goog-user-project headers
1562
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1425
1563
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1426
1564
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1427
1565
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1566
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1428
1567
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1429
1568
 
1430
1569
  header_params = {}
@@ -1515,10 +1654,11 @@ module Google
1515
1654
  # Customize the options with defaults
1516
1655
  metadata = @config.rpcs.update_database.metadata.to_h
1517
1656
 
1518
- # Set x-goog-api-client and x-goog-user-project headers
1657
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1519
1658
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1520
1659
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1521
1660
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1661
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1522
1662
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1523
1663
 
1524
1664
  header_params = {}
@@ -1613,10 +1753,11 @@ module Google
1613
1753
  # Customize the options with defaults
1614
1754
  metadata = @config.rpcs.delete_database.metadata.to_h
1615
1755
 
1616
- # Set x-goog-api-client and x-goog-user-project headers
1756
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1617
1757
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1618
1758
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1619
1759
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1760
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1620
1761
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1621
1762
 
1622
1763
  header_params = {}
@@ -1701,10 +1842,11 @@ module Google
1701
1842
  # Customize the options with defaults
1702
1843
  metadata = @config.rpcs.get_backup.metadata.to_h
1703
1844
 
1704
- # Set x-goog-api-client and x-goog-user-project headers
1845
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1705
1846
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1706
1847
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1707
1848
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1849
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1708
1850
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1709
1851
 
1710
1852
  header_params = {}
@@ -1791,10 +1933,11 @@ module Google
1791
1933
  # Customize the options with defaults
1792
1934
  metadata = @config.rpcs.list_backups.metadata.to_h
1793
1935
 
1794
- # Set x-goog-api-client and x-goog-user-project headers
1936
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1795
1937
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1796
1938
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1797
1939
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1940
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1798
1941
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1799
1942
 
1800
1943
  header_params = {}
@@ -1878,10 +2021,11 @@ module Google
1878
2021
  # Customize the options with defaults
1879
2022
  metadata = @config.rpcs.delete_backup.metadata.to_h
1880
2023
 
1881
- # Set x-goog-api-client and x-goog-user-project headers
2024
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1882
2025
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1883
2026
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1884
2027
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2028
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1885
2029
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1886
2030
 
1887
2031
  header_params = {}
@@ -1913,7 +2057,7 @@ module Google
1913
2057
  #
1914
2058
  # The new database must be in the same cloud region or multi-region location
1915
2059
  # as the existing backup. This behaves similar to
1916
- # [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase]
2060
+ # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database FirestoreAdmin.CreateDatabase}
1917
2061
  # except instead of creating a new empty database, a new database is created
1918
2062
  # with the database type, index configuration, and documents from an existing
1919
2063
  # backup.
@@ -2002,10 +2146,11 @@ module Google
2002
2146
  # Customize the options with defaults
2003
2147
  metadata = @config.rpcs.restore_database.metadata.to_h
2004
2148
 
2005
- # Set x-goog-api-client and x-goog-user-project headers
2149
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2006
2150
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2007
2151
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2008
2152
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2153
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2009
2154
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2010
2155
 
2011
2156
  header_params = {}
@@ -2094,10 +2239,11 @@ module Google
2094
2239
  # Customize the options with defaults
2095
2240
  metadata = @config.rpcs.create_backup_schedule.metadata.to_h
2096
2241
 
2097
- # Set x-goog-api-client and x-goog-user-project headers
2242
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2098
2243
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2099
2244
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2100
2245
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2246
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2101
2247
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2102
2248
 
2103
2249
  header_params = {}
@@ -2182,10 +2328,11 @@ module Google
2182
2328
  # Customize the options with defaults
2183
2329
  metadata = @config.rpcs.get_backup_schedule.metadata.to_h
2184
2330
 
2185
- # Set x-goog-api-client and x-goog-user-project headers
2331
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2186
2332
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2187
2333
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2188
2334
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2335
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2189
2336
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2190
2337
 
2191
2338
  header_params = {}
@@ -2269,10 +2416,11 @@ module Google
2269
2416
  # Customize the options with defaults
2270
2417
  metadata = @config.rpcs.list_backup_schedules.metadata.to_h
2271
2418
 
2272
- # Set x-goog-api-client and x-goog-user-project headers
2419
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2273
2420
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2274
2421
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2275
2422
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2423
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2276
2424
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2277
2425
 
2278
2426
  header_params = {}
@@ -2356,10 +2504,11 @@ module Google
2356
2504
  # Customize the options with defaults
2357
2505
  metadata = @config.rpcs.update_backup_schedule.metadata.to_h
2358
2506
 
2359
- # Set x-goog-api-client and x-goog-user-project headers
2507
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2360
2508
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2361
2509
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2362
2510
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2511
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2363
2512
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2364
2513
 
2365
2514
  header_params = {}
@@ -2444,10 +2593,11 @@ module Google
2444
2593
  # Customize the options with defaults
2445
2594
  metadata = @config.rpcs.delete_backup_schedule.metadata.to_h
2446
2595
 
2447
- # Set x-goog-api-client and x-goog-user-project headers
2596
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2448
2597
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2449
2598
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2450
2599
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2600
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2451
2601
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2452
2602
 
2453
2603
  header_params = {}
@@ -2673,6 +2823,11 @@ module Google
2673
2823
  #
2674
2824
  attr_reader :import_documents
2675
2825
  ##
2826
+ # RPC-specific configuration for `bulk_delete_documents`
2827
+ # @return [::Gapic::Config::Method]
2828
+ #
2829
+ attr_reader :bulk_delete_documents
2830
+ ##
2676
2831
  # RPC-specific configuration for `create_database`
2677
2832
  # @return [::Gapic::Config::Method]
2678
2833
  #
@@ -2763,6 +2918,8 @@ module Google
2763
2918
  @export_documents = ::Gapic::Config::Method.new export_documents_config
2764
2919
  import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents
2765
2920
  @import_documents = ::Gapic::Config::Method.new import_documents_config
2921
+ bulk_delete_documents_config = parent_rpcs.bulk_delete_documents if parent_rpcs.respond_to? :bulk_delete_documents
2922
+ @bulk_delete_documents = ::Gapic::Config::Method.new bulk_delete_documents_config
2766
2923
  create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database
2767
2924
  @create_database = ::Gapic::Config::Method.new create_database_config
2768
2925
  get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database
@@ -27,6 +27,9 @@ module Google
27
27
  module FirestoreAdmin
28
28
  # Service that implements Longrunning Operations API.
29
29
  class Operations
30
+ # @private
31
+ API_VERSION = ""
32
+
30
33
  # @private
31
34
  DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$"
32
35
 
@@ -192,10 +195,11 @@ module Google
192
195
  # Customize the options with defaults
193
196
  metadata = @config.rpcs.list_operations.metadata.to_h
194
197
 
195
- # Set x-goog-api-client and x-goog-user-project headers
198
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
196
199
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
197
200
  lib_name: @config.lib_name, lib_version: @config.lib_version,
198
201
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
202
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
199
203
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
200
204
 
201
205
  header_params = {}
@@ -288,10 +292,11 @@ module Google
288
292
  # Customize the options with defaults
289
293
  metadata = @config.rpcs.get_operation.metadata.to_h
290
294
 
291
- # Set x-goog-api-client and x-goog-user-project headers
295
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
292
296
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
293
297
  lib_name: @config.lib_name, lib_version: @config.lib_version,
294
298
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
299
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
295
300
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
296
301
 
297
302
  header_params = {}
@@ -377,10 +382,11 @@ module Google
377
382
  # Customize the options with defaults
378
383
  metadata = @config.rpcs.delete_operation.metadata.to_h
379
384
 
380
- # Set x-goog-api-client and x-goog-user-project headers
385
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
381
386
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
382
387
  lib_name: @config.lib_name, lib_version: @config.lib_version,
383
388
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
389
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
384
390
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
385
391
 
386
392
  header_params = {}
@@ -471,10 +477,11 @@ module Google
471
477
  # Customize the options with defaults
472
478
  metadata = @config.rpcs.cancel_operation.metadata.to_h
473
479
 
474
- # Set x-goog-api-client and x-goog-user-project headers
480
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
475
481
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
476
482
  lib_name: @config.lib_name, lib_version: @config.lib_version,
477
483
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
484
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
478
485
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
479
486
 
480
487
  header_params = {}
@@ -575,10 +582,11 @@ module Google
575
582
  # Customize the options with defaults
576
583
  metadata = @config.rpcs.wait_operation.metadata.to_h
577
584
 
578
- # Set x-goog-api-client and x-goog-user-project headers
585
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
579
586
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
580
587
  lib_name: @config.lib_name, lib_version: @config.lib_version,
581
588
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
589
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
582
590
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
583
591
 
584
592
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,