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

Sign up to get free protection for your applications and to get access to all the features.
@@ -61,6 +61,9 @@ module Google
61
61
  # service `google.longrunning.Operations`.
62
62
  #
63
63
  class Client
64
+ # @private
65
+ API_VERSION = ""
66
+
64
67
  # @private
65
68
  DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$"
66
69
 
@@ -131,6 +134,8 @@ module Google
131
134
 
132
135
  default_config.rpcs.import_documents.timeout = 60.0
133
136
 
137
+ default_config.rpcs.bulk_delete_documents.timeout = 60.0
138
+
134
139
  default_config
135
140
  end
136
141
  yield @configure if block_given?
@@ -311,12 +316,13 @@ module Google
311
316
  # Customize the options with defaults
312
317
  call_metadata = @config.rpcs.create_index.metadata.to_h
313
318
 
314
- # Set x-goog-api-client and x-goog-user-project headers
319
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
315
320
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
316
321
  lib_name: @config.lib_name, lib_version: @config.lib_version,
317
322
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
318
323
  transports_version_send: [:rest]
319
324
 
325
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
320
326
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
321
327
 
322
328
  options.apply_defaults timeout: @config.rpcs.create_index.timeout,
@@ -403,12 +409,13 @@ module Google
403
409
  # Customize the options with defaults
404
410
  call_metadata = @config.rpcs.list_indexes.metadata.to_h
405
411
 
406
- # Set x-goog-api-client and x-goog-user-project headers
412
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
407
413
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
408
414
  lib_name: @config.lib_name, lib_version: @config.lib_version,
409
415
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
410
416
  transports_version_send: [:rest]
411
417
 
418
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
412
419
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
413
420
 
414
421
  options.apply_defaults timeout: @config.rpcs.list_indexes.timeout,
@@ -483,12 +490,13 @@ module Google
483
490
  # Customize the options with defaults
484
491
  call_metadata = @config.rpcs.get_index.metadata.to_h
485
492
 
486
- # Set x-goog-api-client and x-goog-user-project headers
493
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
487
494
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
488
495
  lib_name: @config.lib_name, lib_version: @config.lib_version,
489
496
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
490
497
  transports_version_send: [:rest]
491
498
 
499
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
492
500
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
493
501
 
494
502
  options.apply_defaults timeout: @config.rpcs.get_index.timeout,
@@ -562,12 +570,13 @@ module Google
562
570
  # Customize the options with defaults
563
571
  call_metadata = @config.rpcs.delete_index.metadata.to_h
564
572
 
565
- # Set x-goog-api-client and x-goog-user-project headers
573
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
566
574
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
567
575
  lib_name: @config.lib_name, lib_version: @config.lib_version,
568
576
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
569
577
  transports_version_send: [:rest]
570
578
 
579
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
571
580
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
572
581
 
573
582
  options.apply_defaults timeout: @config.rpcs.delete_index.timeout,
@@ -641,12 +650,13 @@ module Google
641
650
  # Customize the options with defaults
642
651
  call_metadata = @config.rpcs.get_field.metadata.to_h
643
652
 
644
- # Set x-goog-api-client and x-goog-user-project headers
653
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
645
654
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
646
655
  lib_name: @config.lib_name, lib_version: @config.lib_version,
647
656
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
648
657
  transports_version_send: [:rest]
649
658
 
659
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
650
660
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
651
661
 
652
662
  options.apply_defaults timeout: @config.rpcs.get_field.timeout,
@@ -744,12 +754,13 @@ module Google
744
754
  # Customize the options with defaults
745
755
  call_metadata = @config.rpcs.update_field.metadata.to_h
746
756
 
747
- # Set x-goog-api-client and x-goog-user-project headers
757
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
748
758
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
749
759
  lib_name: @config.lib_name, lib_version: @config.lib_version,
750
760
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
751
761
  transports_version_send: [:rest]
752
762
 
763
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
753
764
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
754
765
 
755
766
  options.apply_defaults timeout: @config.rpcs.update_field.timeout,
@@ -804,7 +815,8 @@ module Google
804
815
  # only supports listing fields that have been explicitly overridden. To issue
805
816
  # this query, call
806
817
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields}
807
- # with a filter that includes `indexConfig.usesAncestorConfig:false` .
818
+ # with a filter that includes `indexConfig.usesAncestorConfig:false` or
819
+ # `ttlConfig:*`.
808
820
  # @param page_size [::Integer]
809
821
  # The number of results to return.
810
822
  # @param page_token [::String]
@@ -849,12 +861,13 @@ module Google
849
861
  # Customize the options with defaults
850
862
  call_metadata = @config.rpcs.list_fields.metadata.to_h
851
863
 
852
- # Set x-goog-api-client and x-goog-user-project headers
864
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
853
865
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
854
866
  lib_name: @config.lib_name, lib_version: @config.lib_version,
855
867
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
856
868
  transports_version_send: [:rest]
857
869
 
870
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
858
871
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
859
872
 
860
873
  options.apply_defaults timeout: @config.rpcs.list_fields.timeout,
@@ -906,7 +919,8 @@ module Google
906
919
  # Required. Database to export. Should be of the form:
907
920
  # `projects/{project_id}/databases/{database_id}`.
908
921
  # @param collection_ids [::Array<::String>]
909
- # Which collection ids to export. Unspecified means all collections.
922
+ # Which collection ids to export. Unspecified means all collections. Each
923
+ # collection id in this list must be unique.
910
924
  # @param output_uri_prefix [::String]
911
925
  # The output URI. Currently only supports Google Cloud Storage URIs of the
912
926
  # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name
@@ -972,12 +986,13 @@ module Google
972
986
  # Customize the options with defaults
973
987
  call_metadata = @config.rpcs.export_documents.metadata.to_h
974
988
 
975
- # Set x-goog-api-client and x-goog-user-project headers
989
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
976
990
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
977
991
  lib_name: @config.lib_name, lib_version: @config.lib_version,
978
992
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
979
993
  transports_version_send: [:rest]
980
994
 
995
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
981
996
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
982
997
 
983
998
  options.apply_defaults timeout: @config.rpcs.export_documents.timeout,
@@ -1024,7 +1039,7 @@ module Google
1024
1039
  # `projects/{project_id}/databases/{database_id}`.
1025
1040
  # @param collection_ids [::Array<::String>]
1026
1041
  # Which collection ids to import. Unspecified means all collections included
1027
- # in the import.
1042
+ # in the import. Each collection id in this list must be unique.
1028
1043
  # @param input_uri_prefix [::String]
1029
1044
  # Location of the exported files.
1030
1045
  # This must match the output_uri_prefix of an ExportDocumentsResponse from
@@ -1079,12 +1094,13 @@ module Google
1079
1094
  # Customize the options with defaults
1080
1095
  call_metadata = @config.rpcs.import_documents.metadata.to_h
1081
1096
 
1082
- # Set x-goog-api-client and x-goog-user-project headers
1097
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1083
1098
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1084
1099
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1085
1100
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1086
1101
  transports_version_send: [:rest]
1087
1102
 
1103
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1088
1104
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1089
1105
 
1090
1106
  options.apply_defaults timeout: @config.rpcs.import_documents.timeout,
@@ -1104,6 +1120,117 @@ module Google
1104
1120
  raise ::Google::Cloud::Error.from_error(e)
1105
1121
  end
1106
1122
 
1123
+ ##
1124
+ # Bulk deletes a subset of documents from Google Cloud Firestore.
1125
+ # Documents created or updated after the underlying system starts to process
1126
+ # the request will not be deleted. The bulk delete occurs in the background
1127
+ # and its progress can be monitored and managed via the Operation resource
1128
+ # that is created.
1129
+ #
1130
+ # For more details on bulk delete behavior, refer to:
1131
+ # https://cloud.google.com/firestore/docs/manage-data/bulk-delete
1132
+ #
1133
+ # @overload bulk_delete_documents(request, options = nil)
1134
+ # Pass arguments to `bulk_delete_documents` via a request object, either of type
1135
+ # {::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest} or an equivalent Hash.
1136
+ #
1137
+ # @param request [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Hash]
1138
+ # A request object representing the call parameters. Required. To specify no
1139
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1140
+ # @param options [::Gapic::CallOptions, ::Hash]
1141
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1142
+ #
1143
+ # @overload bulk_delete_documents(name: nil, collection_ids: nil, namespace_ids: nil)
1144
+ # Pass arguments to `bulk_delete_documents` via keyword arguments. Note that at
1145
+ # least one keyword argument is required. To specify no parameters, or to keep all
1146
+ # the default parameter values, pass an empty Hash as a request object (see above).
1147
+ #
1148
+ # @param name [::String]
1149
+ # Required. Database to operate. Should be of the form:
1150
+ # `projects/{project_id}/databases/{database_id}`.
1151
+ # @param collection_ids [::Array<::String>]
1152
+ # Optional. IDs of the collection groups to delete. Unspecified means all
1153
+ # collection groups.
1154
+ #
1155
+ # Each collection group in this list must be unique.
1156
+ # @param namespace_ids [::Array<::String>]
1157
+ # Optional. Namespaces to delete.
1158
+ #
1159
+ # An empty list means all namespaces. This is the recommended
1160
+ # usage for databases that don't use namespaces.
1161
+ #
1162
+ # An empty string element represents the default namespace. This should be
1163
+ # used if the database has data in non-default namespaces, but doesn't want
1164
+ # to delete from them.
1165
+ #
1166
+ # Each namespace in this list must be unique.
1167
+ # @yield [result, operation] Access the result along with the TransportOperation object
1168
+ # @yieldparam result [::Gapic::Operation]
1169
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1170
+ #
1171
+ # @return [::Gapic::Operation]
1172
+ #
1173
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1174
+ #
1175
+ # @example Basic example
1176
+ # require "google/cloud/firestore/admin/v1"
1177
+ #
1178
+ # # Create a client object. The client can be reused for multiple calls.
1179
+ # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
1180
+ #
1181
+ # # Create a request. To set request fields, pass in keyword arguments.
1182
+ # request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new
1183
+ #
1184
+ # # Call the bulk_delete_documents method.
1185
+ # result = client.bulk_delete_documents request
1186
+ #
1187
+ # # The returned object is of type Gapic::Operation. You can use it to
1188
+ # # check the status of an operation, cancel it, or wait for results.
1189
+ # # Here is how to wait for a response.
1190
+ # result.wait_until_done! timeout: 60
1191
+ # if result.response?
1192
+ # p result.response
1193
+ # else
1194
+ # puts "No response received."
1195
+ # end
1196
+ #
1197
+ def bulk_delete_documents request, options = nil
1198
+ raise ::ArgumentError, "request must be provided" if request.nil?
1199
+
1200
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest
1201
+
1202
+ # Converts hash and nil to an options object
1203
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1204
+
1205
+ # Customize the options with defaults
1206
+ call_metadata = @config.rpcs.bulk_delete_documents.metadata.to_h
1207
+
1208
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1209
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1210
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1211
+ gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1212
+ transports_version_send: [:rest]
1213
+
1214
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1215
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1216
+
1217
+ options.apply_defaults timeout: @config.rpcs.bulk_delete_documents.timeout,
1218
+ metadata: call_metadata,
1219
+ retry_policy: @config.rpcs.bulk_delete_documents.retry_policy
1220
+
1221
+ options.apply_defaults timeout: @config.timeout,
1222
+ metadata: @config.metadata,
1223
+ retry_policy: @config.retry_policy
1224
+
1225
+ @firestore_admin_stub.bulk_delete_documents request, options do |result, operation|
1226
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1227
+ yield result, operation if block_given?
1228
+ return result
1229
+ end
1230
+ rescue ::Gapic::Rest::Error => e
1231
+ raise ::Google::Cloud::Error.from_error(e)
1232
+ end
1233
+
1107
1234
  ##
1108
1235
  # Create a database.
1109
1236
  #
@@ -1177,12 +1304,13 @@ module Google
1177
1304
  # Customize the options with defaults
1178
1305
  call_metadata = @config.rpcs.create_database.metadata.to_h
1179
1306
 
1180
- # Set x-goog-api-client and x-goog-user-project headers
1307
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1181
1308
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1182
1309
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1183
1310
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1184
1311
  transports_version_send: [:rest]
1185
1312
 
1313
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1186
1314
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1187
1315
 
1188
1316
  options.apply_defaults timeout: @config.rpcs.create_database.timeout,
@@ -1257,12 +1385,13 @@ module Google
1257
1385
  # Customize the options with defaults
1258
1386
  call_metadata = @config.rpcs.get_database.metadata.to_h
1259
1387
 
1260
- # Set x-goog-api-client and x-goog-user-project headers
1388
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1261
1389
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1262
1390
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1263
1391
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1264
1392
  transports_version_send: [:rest]
1265
1393
 
1394
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1266
1395
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1267
1396
 
1268
1397
  options.apply_defaults timeout: @config.rpcs.get_database.timeout,
@@ -1294,7 +1423,7 @@ module Google
1294
1423
  # @param options [::Gapic::CallOptions, ::Hash]
1295
1424
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1296
1425
  #
1297
- # @overload list_databases(parent: nil)
1426
+ # @overload list_databases(parent: nil, show_deleted: nil)
1298
1427
  # Pass arguments to `list_databases` via keyword arguments. Note that at
1299
1428
  # least one keyword argument is required. To specify no parameters, or to keep all
1300
1429
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1302,6 +1431,8 @@ module Google
1302
1431
  # @param parent [::String]
1303
1432
  # Required. A parent name of the form
1304
1433
  # `projects/{project_id}`
1434
+ # @param show_deleted [::Boolean]
1435
+ # If true, also returns deleted resources.
1305
1436
  # @yield [result, operation] Access the result along with the TransportOperation object
1306
1437
  # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse]
1307
1438
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1336,12 +1467,13 @@ module Google
1336
1467
  # Customize the options with defaults
1337
1468
  call_metadata = @config.rpcs.list_databases.metadata.to_h
1338
1469
 
1339
- # Set x-goog-api-client and x-goog-user-project headers
1470
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1340
1471
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1341
1472
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1342
1473
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1343
1474
  transports_version_send: [:rest]
1344
1475
 
1476
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1345
1477
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1346
1478
 
1347
1479
  options.apply_defaults timeout: @config.rpcs.list_databases.timeout,
@@ -1423,12 +1555,13 @@ module Google
1423
1555
  # Customize the options with defaults
1424
1556
  call_metadata = @config.rpcs.update_database.metadata.to_h
1425
1557
 
1426
- # Set x-goog-api-client and x-goog-user-project headers
1558
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1427
1559
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1428
1560
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1429
1561
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1430
1562
  transports_version_send: [:rest]
1431
1563
 
1564
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1432
1565
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1433
1566
 
1434
1567
  options.apply_defaults timeout: @config.rpcs.update_database.timeout,
@@ -1514,12 +1647,13 @@ module Google
1514
1647
  # Customize the options with defaults
1515
1648
  call_metadata = @config.rpcs.delete_database.metadata.to_h
1516
1649
 
1517
- # Set x-goog-api-client and x-goog-user-project headers
1650
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1518
1651
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1519
1652
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1520
1653
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1521
1654
  transports_version_send: [:rest]
1522
1655
 
1656
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1523
1657
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1524
1658
 
1525
1659
  options.apply_defaults timeout: @config.rpcs.delete_database.timeout,
@@ -1595,12 +1729,13 @@ module Google
1595
1729
  # Customize the options with defaults
1596
1730
  call_metadata = @config.rpcs.get_backup.metadata.to_h
1597
1731
 
1598
- # Set x-goog-api-client and x-goog-user-project headers
1732
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1599
1733
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1600
1734
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1601
1735
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1602
1736
  transports_version_send: [:rest]
1603
1737
 
1738
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1604
1739
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1605
1740
 
1606
1741
  options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
@@ -1678,12 +1813,13 @@ module Google
1678
1813
  # Customize the options with defaults
1679
1814
  call_metadata = @config.rpcs.list_backups.metadata.to_h
1680
1815
 
1681
- # Set x-goog-api-client and x-goog-user-project headers
1816
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1682
1817
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1683
1818
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1684
1819
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1685
1820
  transports_version_send: [:rest]
1686
1821
 
1822
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1687
1823
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1688
1824
 
1689
1825
  options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
@@ -1758,12 +1894,13 @@ module Google
1758
1894
  # Customize the options with defaults
1759
1895
  call_metadata = @config.rpcs.delete_backup.metadata.to_h
1760
1896
 
1761
- # Set x-goog-api-client and x-goog-user-project headers
1897
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1762
1898
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1763
1899
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1764
1900
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1765
1901
  transports_version_send: [:rest]
1766
1902
 
1903
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1767
1904
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1768
1905
 
1769
1906
  options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
@@ -1787,7 +1924,7 @@ module Google
1787
1924
  #
1788
1925
  # The new database must be in the same cloud region or multi-region location
1789
1926
  # as the existing backup. This behaves similar to
1790
- # [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.CreateDatabase]
1927
+ # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#create_database FirestoreAdmin.CreateDatabase}
1791
1928
  # except instead of creating a new empty database, a new database is created
1792
1929
  # with the database type, index configuration, and documents from an existing
1793
1930
  # backup.
@@ -1875,12 +2012,13 @@ module Google
1875
2012
  # Customize the options with defaults
1876
2013
  call_metadata = @config.rpcs.restore_database.metadata.to_h
1877
2014
 
1878
- # Set x-goog-api-client and x-goog-user-project headers
2015
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1879
2016
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1880
2017
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1881
2018
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1882
2019
  transports_version_send: [:rest]
1883
2020
 
2021
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1884
2022
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1885
2023
 
1886
2024
  options.apply_defaults timeout: @config.rpcs.restore_database.timeout,
@@ -1960,12 +2098,13 @@ module Google
1960
2098
  # Customize the options with defaults
1961
2099
  call_metadata = @config.rpcs.create_backup_schedule.metadata.to_h
1962
2100
 
1963
- # Set x-goog-api-client and x-goog-user-project headers
2101
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1964
2102
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1965
2103
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1966
2104
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1967
2105
  transports_version_send: [:rest]
1968
2106
 
2107
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1969
2108
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1970
2109
 
1971
2110
  options.apply_defaults timeout: @config.rpcs.create_backup_schedule.timeout,
@@ -2041,12 +2180,13 @@ module Google
2041
2180
  # Customize the options with defaults
2042
2181
  call_metadata = @config.rpcs.get_backup_schedule.metadata.to_h
2043
2182
 
2044
- # Set x-goog-api-client and x-goog-user-project headers
2183
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2045
2184
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2046
2185
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2047
2186
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
2048
2187
  transports_version_send: [:rest]
2049
2188
 
2189
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2050
2190
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2051
2191
 
2052
2192
  options.apply_defaults timeout: @config.rpcs.get_backup_schedule.timeout,
@@ -2121,12 +2261,13 @@ module Google
2121
2261
  # Customize the options with defaults
2122
2262
  call_metadata = @config.rpcs.list_backup_schedules.metadata.to_h
2123
2263
 
2124
- # Set x-goog-api-client and x-goog-user-project headers
2264
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2125
2265
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2126
2266
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2127
2267
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
2128
2268
  transports_version_send: [:rest]
2129
2269
 
2270
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2130
2271
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2131
2272
 
2132
2273
  options.apply_defaults timeout: @config.rpcs.list_backup_schedules.timeout,
@@ -2201,12 +2342,13 @@ module Google
2201
2342
  # Customize the options with defaults
2202
2343
  call_metadata = @config.rpcs.update_backup_schedule.metadata.to_h
2203
2344
 
2204
- # Set x-goog-api-client and x-goog-user-project headers
2345
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2205
2346
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2206
2347
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2207
2348
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
2208
2349
  transports_version_send: [:rest]
2209
2350
 
2351
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2210
2352
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2211
2353
 
2212
2354
  options.apply_defaults timeout: @config.rpcs.update_backup_schedule.timeout,
@@ -2282,12 +2424,13 @@ module Google
2282
2424
  # Customize the options with defaults
2283
2425
  call_metadata = @config.rpcs.delete_backup_schedule.metadata.to_h
2284
2426
 
2285
- # Set x-goog-api-client and x-goog-user-project headers
2427
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2286
2428
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2287
2429
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2288
2430
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
2289
2431
  transports_version_send: [:rest]
2290
2432
 
2433
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2291
2434
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2292
2435
 
2293
2436
  options.apply_defaults timeout: @config.rpcs.delete_backup_schedule.timeout,
@@ -2485,6 +2628,11 @@ module Google
2485
2628
  #
2486
2629
  attr_reader :import_documents
2487
2630
  ##
2631
+ # RPC-specific configuration for `bulk_delete_documents`
2632
+ # @return [::Gapic::Config::Method]
2633
+ #
2634
+ attr_reader :bulk_delete_documents
2635
+ ##
2488
2636
  # RPC-specific configuration for `create_database`
2489
2637
  # @return [::Gapic::Config::Method]
2490
2638
  #
@@ -2575,6 +2723,8 @@ module Google
2575
2723
  @export_documents = ::Gapic::Config::Method.new export_documents_config
2576
2724
  import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents
2577
2725
  @import_documents = ::Gapic::Config::Method.new import_documents_config
2726
+ bulk_delete_documents_config = parent_rpcs.bulk_delete_documents if parent_rpcs.respond_to? :bulk_delete_documents
2727
+ @bulk_delete_documents = ::Gapic::Config::Method.new bulk_delete_documents_config
2578
2728
  create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database
2579
2729
  @create_database = ::Gapic::Config::Method.new create_database_config
2580
2730
  get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database
@@ -27,6 +27,9 @@ module Google
27
27
  module Rest
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
 
@@ -182,12 +185,13 @@ module Google
182
185
  # Customize the options with defaults
183
186
  call_metadata = @config.rpcs.list_operations.metadata.to_h
184
187
 
185
- # Set x-goog-api-client and x-goog-user-project headers
188
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
186
189
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
187
190
  lib_name: @config.lib_name, lib_version: @config.lib_version,
188
191
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
189
192
  transports_version_send: [:rest]
190
193
 
194
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
191
195
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
192
196
 
193
197
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
@@ -270,12 +274,13 @@ module Google
270
274
  # Customize the options with defaults
271
275
  call_metadata = @config.rpcs.get_operation.metadata.to_h
272
276
 
273
- # Set x-goog-api-client and x-goog-user-project headers
277
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
274
278
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
275
279
  lib_name: @config.lib_name, lib_version: @config.lib_version,
276
280
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
277
281
  transports_version_send: [:rest]
278
282
 
283
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
279
284
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
280
285
 
281
286
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
@@ -352,12 +357,13 @@ module Google
352
357
  # Customize the options with defaults
353
358
  call_metadata = @config.rpcs.delete_operation.metadata.to_h
354
359
 
355
- # Set x-goog-api-client and x-goog-user-project headers
360
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
356
361
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
357
362
  lib_name: @config.lib_name, lib_version: @config.lib_version,
358
363
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
359
364
  transports_version_send: [:rest]
360
365
 
366
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
361
367
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
362
368
 
363
369
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
@@ -439,12 +445,13 @@ module Google
439
445
  # Customize the options with defaults
440
446
  call_metadata = @config.rpcs.cancel_operation.metadata.to_h
441
447
 
442
- # Set x-goog-api-client and x-goog-user-project headers
448
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
443
449
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
444
450
  lib_name: @config.lib_name, lib_version: @config.lib_version,
445
451
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
446
452
  transports_version_send: [:rest]
447
453
 
454
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
448
455
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
449
456
 
450
457
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,