google-cloud-firestore-admin-v1 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 453d010adaaf70742a4ba9d85a9c0f577b62fd3575e6c121271ceef99e99572a
4
- data.tar.gz: 021f36505a6c7f7aa74a272dceaff5ee2956e46238fa5acc02b16426e049498a
3
+ metadata.gz: e5efb5ca0e1799251476ae7009132313c4344a30bb07f98d88300ae057dce5ad
4
+ data.tar.gz: e605435bf52225c4386e003209a0841557cde969d0de3cd9fc3617f1fff4f374
5
5
  SHA512:
6
- metadata.gz: 237683018d8e0add1636a247091545ca66c5a37c8dc6c3137c0b2b60d5284bcc2746bd3359f6f1f1d2e6d44f38080d44c90d2d18c0839917c1fdf258ccd5a576
7
- data.tar.gz: 6d492b82a1e29cf286a2101b7ff83498421df327ef4111e747a6e3dcd4399564642a5026336c0e2fd5973c9869255ff0c4502b1ee481826bec5e6e121138227d
6
+ metadata.gz: 51bcefd163a4b7b64ec8300b1262f9b629a0acbdd1655a70ef22a722727a1011f7e24e793cc99d897ba0bbe2043cef4dfdb4842c2cfaae84d9e8cc1ac729e79f
7
+ data.tar.gz: 29957c44079cb27ad870f408779bac4c9ad8bf8b6de2c281915118a75c4d773d55337baa8b3e3a042892aa3e73395a860698a13ab8026fe815764a8ace41f414
@@ -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 = {}
@@ -2036,8 +2181,7 @@ module Google
2036
2181
  ##
2037
2182
  # Creates a backup schedule on a database.
2038
2183
  # At most two backup schedules can be configured on a database, one daily
2039
- # backup schedule with retention up to 7 days and one weekly backup schedule
2040
- # with retention up to 14 weeks.
2184
+ # backup schedule and one weekly backup schedule.
2041
2185
  #
2042
2186
  # @overload create_backup_schedule(request, options = nil)
2043
2187
  # Pass arguments to `create_backup_schedule` via a request object, either of type
@@ -2095,10 +2239,11 @@ module Google
2095
2239
  # Customize the options with defaults
2096
2240
  metadata = @config.rpcs.create_backup_schedule.metadata.to_h
2097
2241
 
2098
- # 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
2099
2243
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2100
2244
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2101
2245
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2246
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2102
2247
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2103
2248
 
2104
2249
  header_params = {}
@@ -2183,10 +2328,11 @@ module Google
2183
2328
  # Customize the options with defaults
2184
2329
  metadata = @config.rpcs.get_backup_schedule.metadata.to_h
2185
2330
 
2186
- # 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
2187
2332
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2188
2333
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2189
2334
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2335
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2190
2336
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2191
2337
 
2192
2338
  header_params = {}
@@ -2270,10 +2416,11 @@ module Google
2270
2416
  # Customize the options with defaults
2271
2417
  metadata = @config.rpcs.list_backup_schedules.metadata.to_h
2272
2418
 
2273
- # 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
2274
2420
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2275
2421
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2276
2422
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2423
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2277
2424
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2278
2425
 
2279
2426
  header_params = {}
@@ -2357,10 +2504,11 @@ module Google
2357
2504
  # Customize the options with defaults
2358
2505
  metadata = @config.rpcs.update_backup_schedule.metadata.to_h
2359
2506
 
2360
- # 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
2361
2508
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2362
2509
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2363
2510
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2511
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2364
2512
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2365
2513
 
2366
2514
  header_params = {}
@@ -2445,10 +2593,11 @@ module Google
2445
2593
  # Customize the options with defaults
2446
2594
  metadata = @config.rpcs.delete_backup_schedule.metadata.to_h
2447
2595
 
2448
- # 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
2449
2597
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2450
2598
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2451
2599
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
2600
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2452
2601
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2453
2602
 
2454
2603
  header_params = {}
@@ -2674,6 +2823,11 @@ module Google
2674
2823
  #
2675
2824
  attr_reader :import_documents
2676
2825
  ##
2826
+ # RPC-specific configuration for `bulk_delete_documents`
2827
+ # @return [::Gapic::Config::Method]
2828
+ #
2829
+ attr_reader :bulk_delete_documents
2830
+ ##
2677
2831
  # RPC-specific configuration for `create_database`
2678
2832
  # @return [::Gapic::Config::Method]
2679
2833
  #
@@ -2764,6 +2918,8 @@ module Google
2764
2918
  @export_documents = ::Gapic::Config::Method.new export_documents_config
2765
2919
  import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents
2766
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
2767
2923
  create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database
2768
2924
  @create_database = ::Gapic::Config::Method.new create_database_config
2769
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,