google-cloud-firestore-admin-v1 0.11.0 → 0.13.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: 81e47ddb5eaa9fce2c1f17357eb5cce975f86d1041f1f2910b407fe66b937c55
4
- data.tar.gz: 36a1477f52a561c65e965f3bd597938b602c10eeca69ede784a88a07b1b0bc53
3
+ metadata.gz: 603f0f1959c31b28bbf809414ada4c7ddfc014c71665e3506b9c3a9ba1497cf6
4
+ data.tar.gz: 02b181132216523c8a613e558599ea34fb7e9f268d420de466993164ae2a3c64
5
5
  SHA512:
6
- metadata.gz: 54ba9fd6346f66b503cb909dd60bd6a879447062aee3fde3ae49c3128e1f52199db397f0e96c2d61640088764140c978d7780e85577c08422eb94f83a4869290
7
- data.tar.gz: 825bc0b0b720326721587904c36c1dfff45814f57b0c371b1c683fadddae718730128566359309d5659e61700d9fe629ed90c0041a4f6fd4e3e183551d910deb
6
+ metadata.gz: ad47026a9c92848c3be3c8f3c942e8eb2e46ff0221a00d0b3f74afb908035b67b760ef434324a0187cd9890166096f3c5b09bf51d6f4bec2fdfd816f7f94d969
7
+ data.tar.gz: 46dcd11c448c72654d05b573dd85bb1d9fbfefd3bfdeae2e832d5257678a885a44a3258f4c6617e2eb32716cfd551d40d010a65deb4584740878e6ed78a4a7c4
@@ -809,7 +809,8 @@ module Google
809
809
  # only supports listing fields that have been explicitly overridden. To issue
810
810
  # this query, call
811
811
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}
812
- # with the filter set to `indexConfig.usesAncestorConfig:false` .
812
+ # with the filter set to `indexConfig.usesAncestorConfig:false or
813
+ # `ttlConfig:*`.
813
814
  #
814
815
  # @overload list_fields(request, options = nil)
815
816
  # Pass arguments to `list_fields` via a request object, either of type
@@ -935,7 +936,7 @@ module Google
935
936
  # @param options [::Gapic::CallOptions, ::Hash]
936
937
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
937
938
  #
938
- # @overload export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil)
939
+ # @overload export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil, namespace_ids: nil, snapshot_time: nil)
939
940
  # Pass arguments to `export_documents` via keyword arguments. Note that at
940
941
  # least one keyword argument is required. To specify no parameters, or to keep all
941
942
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -954,6 +955,21 @@ module Google
954
955
  # guidelines: https://cloud.google.com/storage/docs/naming.
955
956
  # If the URI is a bucket (without a namespace path), a prefix will be
956
957
  # generated based on the start time.
958
+ # @param namespace_ids [::Array<::String>]
959
+ # An empty list represents all namespaces. This is the preferred
960
+ # usage for databases that don't use namespaces.
961
+ #
962
+ # An empty string element represents the default namespace. This should be
963
+ # used if the database has data in non-default namespaces, but doesn't want
964
+ # to include them. Each namespace in this list must be unique.
965
+ # @param snapshot_time [::Google::Protobuf::Timestamp, ::Hash]
966
+ # The timestamp that corresponds to the version of the database to be
967
+ # exported. The timestamp must be in the past, rounded to the minute and not
968
+ # older than
969
+ # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}.
970
+ # If specified, then the exported documents will represent a consistent view
971
+ # of the database at the provided time. Otherwise, there are no guarantees
972
+ # about the consistency of the exported documents.
957
973
  #
958
974
  # @yield [response, operation] Access the result along with the RPC operation
959
975
  # @yieldparam response [::Gapic::Operation]
@@ -1044,7 +1060,7 @@ module Google
1044
1060
  # @param options [::Gapic::CallOptions, ::Hash]
1045
1061
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1046
1062
  #
1047
- # @overload import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil)
1063
+ # @overload import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil, namespace_ids: nil)
1048
1064
  # Pass arguments to `import_documents` via keyword arguments. Note that at
1049
1065
  # least one keyword argument is required. To specify no parameters, or to keep all
1050
1066
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1061,6 +1077,13 @@ module Google
1061
1077
  # an export that has completed successfully.
1062
1078
  # See:
1063
1079
  # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}.
1080
+ # @param namespace_ids [::Array<::String>]
1081
+ # An empty list represents all namespaces. This is the preferred
1082
+ # usage for databases that don't use namespaces.
1083
+ #
1084
+ # An empty string element represents the default namespace. This should be
1085
+ # used if the database has data in non-default namespaces, but doesn't want
1086
+ # to include them. Each namespace in this list must be unique.
1064
1087
  #
1065
1088
  # @yield [response, operation] Access the result along with the RPC operation
1066
1089
  # @yieldparam response [::Gapic::Operation]
@@ -1161,7 +1184,11 @@ module Google
1161
1184
  # Required. The ID to use for the database, which will become the final
1162
1185
  # component of the database's resource name.
1163
1186
  #
1164
- # The value must be set to "(default)".
1187
+ # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
1188
+ # with first character a letter and the last a letter or a number. Must not
1189
+ # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/.
1190
+ #
1191
+ # "(default)" database id is also valid.
1165
1192
  #
1166
1193
  # @yield [response, operation] Access the result along with the RPC operation
1167
1194
  # @yieldparam response [::Gapic::Operation]
@@ -1502,6 +1529,104 @@ module Google
1502
1529
  raise ::Google::Cloud::Error.from_error(e)
1503
1530
  end
1504
1531
 
1532
+ ##
1533
+ # Deletes a database.
1534
+ #
1535
+ # @overload delete_database(request, options = nil)
1536
+ # Pass arguments to `delete_database` via a request object, either of type
1537
+ # {::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest} or an equivalent Hash.
1538
+ #
1539
+ # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Hash]
1540
+ # A request object representing the call parameters. Required. To specify no
1541
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1542
+ # @param options [::Gapic::CallOptions, ::Hash]
1543
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1544
+ #
1545
+ # @overload delete_database(name: nil, etag: nil)
1546
+ # Pass arguments to `delete_database` via keyword arguments. Note that at
1547
+ # least one keyword argument is required. To specify no parameters, or to keep all
1548
+ # the default parameter values, pass an empty Hash as a request object (see above).
1549
+ #
1550
+ # @param name [::String]
1551
+ # Required. A name of the form
1552
+ # `projects/{project_id}/databases/{database_id}`
1553
+ # @param etag [::String]
1554
+ # The current etag of the Database.
1555
+ # If an etag is provided and does not match the current etag of the database,
1556
+ # deletion will be blocked and a FAILED_PRECONDITION error will be returned.
1557
+ #
1558
+ # @yield [response, operation] Access the result along with the RPC operation
1559
+ # @yieldparam response [::Gapic::Operation]
1560
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1561
+ #
1562
+ # @return [::Gapic::Operation]
1563
+ #
1564
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1565
+ #
1566
+ # @example Basic example
1567
+ # require "google/cloud/firestore/admin/v1"
1568
+ #
1569
+ # # Create a client object. The client can be reused for multiple calls.
1570
+ # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
1571
+ #
1572
+ # # Create a request. To set request fields, pass in keyword arguments.
1573
+ # request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new
1574
+ #
1575
+ # # Call the delete_database method.
1576
+ # result = client.delete_database request
1577
+ #
1578
+ # # The returned object is of type Gapic::Operation. You can use it to
1579
+ # # check the status of an operation, cancel it, or wait for results.
1580
+ # # Here is how to wait for a response.
1581
+ # result.wait_until_done! timeout: 60
1582
+ # if result.response?
1583
+ # p result.response
1584
+ # else
1585
+ # puts "No response received."
1586
+ # end
1587
+ #
1588
+ def delete_database request, options = nil
1589
+ raise ::ArgumentError, "request must be provided" if request.nil?
1590
+
1591
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest
1592
+
1593
+ # Converts hash and nil to an options object
1594
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1595
+
1596
+ # Customize the options with defaults
1597
+ metadata = @config.rpcs.delete_database.metadata.to_h
1598
+
1599
+ # Set x-goog-api-client and x-goog-user-project headers
1600
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1601
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1602
+ gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
1603
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1604
+
1605
+ header_params = {}
1606
+ if request.name
1607
+ header_params["name"] = request.name
1608
+ end
1609
+
1610
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1611
+ metadata[:"x-goog-request-params"] ||= request_params_header
1612
+
1613
+ options.apply_defaults timeout: @config.rpcs.delete_database.timeout,
1614
+ metadata: metadata,
1615
+ retry_policy: @config.rpcs.delete_database.retry_policy
1616
+
1617
+ options.apply_defaults timeout: @config.timeout,
1618
+ metadata: @config.metadata,
1619
+ retry_policy: @config.retry_policy
1620
+
1621
+ @firestore_admin_stub.call_rpc :delete_database, request, options: options do |response, operation|
1622
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1623
+ yield response, operation if block_given?
1624
+ return response
1625
+ end
1626
+ rescue ::GRPC::BadStatus => e
1627
+ raise ::Google::Cloud::Error.from_error(e)
1628
+ end
1629
+
1505
1630
  ##
1506
1631
  # Configuration class for the FirestoreAdmin API.
1507
1632
  #
@@ -1712,6 +1837,11 @@ module Google
1712
1837
  # @return [::Gapic::Config::Method]
1713
1838
  #
1714
1839
  attr_reader :update_database
1840
+ ##
1841
+ # RPC-specific configuration for `delete_database`
1842
+ # @return [::Gapic::Config::Method]
1843
+ #
1844
+ attr_reader :delete_database
1715
1845
 
1716
1846
  # @private
1717
1847
  def initialize parent_rpcs = nil
@@ -1741,6 +1871,8 @@ module Google
1741
1871
  @list_databases = ::Gapic::Config::Method.new list_databases_config
1742
1872
  update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database
1743
1873
  @update_database = ::Gapic::Config::Method.new update_database_config
1874
+ delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database
1875
+ @delete_database = ::Gapic::Config::Method.new delete_database_config
1744
1876
 
1745
1877
  yield self if block_given?
1746
1878
  end
@@ -757,7 +757,8 @@ module Google
757
757
  # only supports listing fields that have been explicitly overridden. To issue
758
758
  # this query, call
759
759
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields}
760
- # with the filter set to `indexConfig.usesAncestorConfig:false` .
760
+ # with the filter set to `indexConfig.usesAncestorConfig:false or
761
+ # `ttlConfig:*`.
761
762
  #
762
763
  # @overload list_fields(request, options = nil)
763
764
  # Pass arguments to `list_fields` via a request object, either of type
@@ -876,7 +877,7 @@ module Google
876
877
  # @param options [::Gapic::CallOptions, ::Hash]
877
878
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
878
879
  #
879
- # @overload export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil)
880
+ # @overload export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil, namespace_ids: nil, snapshot_time: nil)
880
881
  # Pass arguments to `export_documents` via keyword arguments. Note that at
881
882
  # least one keyword argument is required. To specify no parameters, or to keep all
882
883
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -895,6 +896,21 @@ module Google
895
896
  # guidelines: https://cloud.google.com/storage/docs/naming.
896
897
  # If the URI is a bucket (without a namespace path), a prefix will be
897
898
  # generated based on the start time.
899
+ # @param namespace_ids [::Array<::String>]
900
+ # An empty list represents all namespaces. This is the preferred
901
+ # usage for databases that don't use namespaces.
902
+ #
903
+ # An empty string element represents the default namespace. This should be
904
+ # used if the database has data in non-default namespaces, but doesn't want
905
+ # to include them. Each namespace in this list must be unique.
906
+ # @param snapshot_time [::Google::Protobuf::Timestamp, ::Hash]
907
+ # The timestamp that corresponds to the version of the database to be
908
+ # exported. The timestamp must be in the past, rounded to the minute and not
909
+ # older than
910
+ # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}.
911
+ # If specified, then the exported documents will represent a consistent view
912
+ # of the database at the provided time. Otherwise, there are no guarantees
913
+ # about the consistency of the exported documents.
898
914
  # @yield [result, operation] Access the result along with the TransportOperation object
899
915
  # @yieldparam result [::Gapic::Operation]
900
916
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -978,7 +994,7 @@ module Google
978
994
  # @param options [::Gapic::CallOptions, ::Hash]
979
995
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
980
996
  #
981
- # @overload import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil)
997
+ # @overload import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil, namespace_ids: nil)
982
998
  # Pass arguments to `import_documents` via keyword arguments. Note that at
983
999
  # least one keyword argument is required. To specify no parameters, or to keep all
984
1000
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -995,6 +1011,13 @@ module Google
995
1011
  # an export that has completed successfully.
996
1012
  # See:
997
1013
  # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}.
1014
+ # @param namespace_ids [::Array<::String>]
1015
+ # An empty list represents all namespaces. This is the preferred
1016
+ # usage for databases that don't use namespaces.
1017
+ #
1018
+ # An empty string element represents the default namespace. This should be
1019
+ # used if the database has data in non-default namespaces, but doesn't want
1020
+ # to include them. Each namespace in this list must be unique.
998
1021
  # @yield [result, operation] Access the result along with the TransportOperation object
999
1022
  # @yieldparam result [::Gapic::Operation]
1000
1023
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1088,7 +1111,11 @@ module Google
1088
1111
  # Required. The ID to use for the database, which will become the final
1089
1112
  # component of the database's resource name.
1090
1113
  #
1091
- # The value must be set to "(default)".
1114
+ # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
1115
+ # with first character a letter and the last a letter or a number. Must not
1116
+ # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/.
1117
+ #
1118
+ # "(default)" database id is also valid.
1092
1119
  # @yield [result, operation] Access the result along with the TransportOperation object
1093
1120
  # @yieldparam result [::Gapic::Operation]
1094
1121
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1401,6 +1428,97 @@ module Google
1401
1428
  raise ::Google::Cloud::Error.from_error(e)
1402
1429
  end
1403
1430
 
1431
+ ##
1432
+ # Deletes a database.
1433
+ #
1434
+ # @overload delete_database(request, options = nil)
1435
+ # Pass arguments to `delete_database` via a request object, either of type
1436
+ # {::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest} or an equivalent Hash.
1437
+ #
1438
+ # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Hash]
1439
+ # A request object representing the call parameters. Required. To specify no
1440
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1441
+ # @param options [::Gapic::CallOptions, ::Hash]
1442
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1443
+ #
1444
+ # @overload delete_database(name: nil, etag: nil)
1445
+ # Pass arguments to `delete_database` via keyword arguments. Note that at
1446
+ # least one keyword argument is required. To specify no parameters, or to keep all
1447
+ # the default parameter values, pass an empty Hash as a request object (see above).
1448
+ #
1449
+ # @param name [::String]
1450
+ # Required. A name of the form
1451
+ # `projects/{project_id}/databases/{database_id}`
1452
+ # @param etag [::String]
1453
+ # The current etag of the Database.
1454
+ # If an etag is provided and does not match the current etag of the database,
1455
+ # deletion will be blocked and a FAILED_PRECONDITION error will be returned.
1456
+ # @yield [result, operation] Access the result along with the TransportOperation object
1457
+ # @yieldparam result [::Gapic::Operation]
1458
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1459
+ #
1460
+ # @return [::Gapic::Operation]
1461
+ #
1462
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1463
+ #
1464
+ # @example Basic example
1465
+ # require "google/cloud/firestore/admin/v1"
1466
+ #
1467
+ # # Create a client object. The client can be reused for multiple calls.
1468
+ # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
1469
+ #
1470
+ # # Create a request. To set request fields, pass in keyword arguments.
1471
+ # request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new
1472
+ #
1473
+ # # Call the delete_database method.
1474
+ # result = client.delete_database request
1475
+ #
1476
+ # # The returned object is of type Gapic::Operation. You can use it to
1477
+ # # check the status of an operation, cancel it, or wait for results.
1478
+ # # Here is how to wait for a response.
1479
+ # result.wait_until_done! timeout: 60
1480
+ # if result.response?
1481
+ # p result.response
1482
+ # else
1483
+ # puts "No response received."
1484
+ # end
1485
+ #
1486
+ def delete_database request, options = nil
1487
+ raise ::ArgumentError, "request must be provided" if request.nil?
1488
+
1489
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest
1490
+
1491
+ # Converts hash and nil to an options object
1492
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1493
+
1494
+ # Customize the options with defaults
1495
+ call_metadata = @config.rpcs.delete_database.metadata.to_h
1496
+
1497
+ # Set x-goog-api-client and x-goog-user-project headers
1498
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1499
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1500
+ gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1501
+ transports_version_send: [:rest]
1502
+
1503
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1504
+
1505
+ options.apply_defaults timeout: @config.rpcs.delete_database.timeout,
1506
+ metadata: call_metadata,
1507
+ retry_policy: @config.rpcs.delete_database.retry_policy
1508
+
1509
+ options.apply_defaults timeout: @config.timeout,
1510
+ metadata: @config.metadata,
1511
+ retry_policy: @config.retry_policy
1512
+
1513
+ @firestore_admin_stub.delete_database request, options do |result, operation|
1514
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1515
+ yield result, operation if block_given?
1516
+ return result
1517
+ end
1518
+ rescue ::Gapic::Rest::Error => e
1519
+ raise ::Google::Cloud::Error.from_error(e)
1520
+ end
1521
+
1404
1522
  ##
1405
1523
  # Configuration class for the FirestoreAdmin REST API.
1406
1524
  #
@@ -1591,6 +1709,11 @@ module Google
1591
1709
  # @return [::Gapic::Config::Method]
1592
1710
  #
1593
1711
  attr_reader :update_database
1712
+ ##
1713
+ # RPC-specific configuration for `delete_database`
1714
+ # @return [::Gapic::Config::Method]
1715
+ #
1716
+ attr_reader :delete_database
1594
1717
 
1595
1718
  # @private
1596
1719
  def initialize parent_rpcs = nil
@@ -1620,6 +1743,8 @@ module Google
1620
1743
  @list_databases = ::Gapic::Config::Method.new list_databases_config
1621
1744
  update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database
1622
1745
  @update_database = ::Gapic::Config::Method.new update_database_config
1746
+ delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database
1747
+ @delete_database = ::Gapic::Config::Method.new delete_database_config
1623
1748
 
1624
1749
  yield self if block_given?
1625
1750
  end
@@ -535,6 +535,44 @@ module Google
535
535
  result
536
536
  end
537
537
 
538
+ ##
539
+ # Baseline implementation for the delete_database REST call
540
+ #
541
+ # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest]
542
+ # A request object representing the call parameters. Required.
543
+ # @param options [::Gapic::CallOptions]
544
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
545
+ #
546
+ # @yield [result, operation] Access the result along with the TransportOperation object
547
+ # @yieldparam result [::Google::Longrunning::Operation]
548
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
549
+ #
550
+ # @return [::Google::Longrunning::Operation]
551
+ # A result object deserialized from the server's reply
552
+ def delete_database request_pb, options = nil
553
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
554
+
555
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_database_request request_pb
556
+ query_string_params = if query_string_params.any?
557
+ query_string_params.to_h { |p| p.split "=", 2 }
558
+ else
559
+ {}
560
+ end
561
+
562
+ response = @client_stub.make_http_request(
563
+ verb,
564
+ uri: uri,
565
+ body: body || "",
566
+ params: query_string_params,
567
+ options: options
568
+ )
569
+ operation = ::Gapic::Rest::TransportOperation.new response
570
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
571
+
572
+ yield result, operation if block_given?
573
+ result
574
+ end
575
+
538
576
  ##
539
577
  # @private
540
578
  #
@@ -813,6 +851,27 @@ module Google
813
851
  )
814
852
  transcoder.transcode request_pb
815
853
  end
854
+
855
+ ##
856
+ # @private
857
+ #
858
+ # GRPC transcoding helper method for the delete_database REST call
859
+ #
860
+ # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest]
861
+ # A request object representing the call parameters. Required.
862
+ # @return [Array(String, [String, nil], Hash{String => String})]
863
+ # Uri, Body, Query string parameters
864
+ def self.transcode_delete_database_request request_pb
865
+ transcoder = Gapic::Rest::GrpcTranscoder.new
866
+ .with_bindings(
867
+ uri_method: :delete,
868
+ uri_template: "/v1/{name}",
869
+ matches: [
870
+ ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false]
871
+ ]
872
+ )
873
+ transcoder.transcode request_pb
874
+ end
816
875
  end
817
876
  end
818
877
  end
@@ -22,7 +22,7 @@ module Google
22
22
  module Firestore
23
23
  module Admin
24
24
  module V1
25
- VERSION = "0.11.0"
25
+ VERSION = "0.13.0"
26
26
  end
27
27
  end
28
28
  end
@@ -6,9 +6,11 @@ require 'google/protobuf'
6
6
 
7
7
  require 'google/api/field_behavior_pb'
8
8
  require 'google/api/resource_pb'
9
+ require 'google/protobuf/duration_pb'
10
+ require 'google/protobuf/timestamp_pb'
9
11
 
10
12
 
11
- descriptor_data = "\n(google/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xd0\x05\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0blocation_id\x18\t \x01(\t\x12>\n\x04type\x18\n \x01(\x0e\x32\x30.google.firestore.admin.v1.Database.DatabaseType\x12M\n\x10\x63oncurrency_mode\x18\x0f \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.ConcurrencyMode\x12\x61\n\x1b\x61pp_engine_integration_mode\x18\x13 \x01(\x0e\x32<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\n\nkey_prefix\x18\x14 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x63 \x01(\t\"W\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x46IRESTORE_NATIVE\x10\x01\x12\x12\n\x0e\x44\x41TASTORE_MODE\x10\x02\"w\n\x0f\x43oncurrencyMode\x12 \n\x1c\x43ONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nOPTIMISTIC\x10\x01\x12\x0f\n\x0bPESSIMISTIC\x10\x02\x12!\n\x1dOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"b\n\x18\x41ppEngineIntegrationMode\x12+\n\'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:R\xea\x41O\n!firestore.googleapis.com/Database\x12\'projects/{project}/databases/{database}R\x01\x01\x42\xdc\x01\n\x1d\x63om.google.firestore.admin.v1B\rDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3"
13
+ descriptor_data = "\n(google/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb9\x0b\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0blocation_id\x18\t \x01(\t\x12>\n\x04type\x18\n \x01(\x0e\x32\x30.google.firestore.admin.v1.Database.DatabaseType\x12M\n\x10\x63oncurrency_mode\x18\x0f \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\n\x18version_retention_period\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12l\n!point_in_time_recovery_enablement\x18\x15 \x01(\x0e\x32\x41.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12\x61\n\x1b\x61pp_engine_integration_mode\x18\x13 \x01(\x0e\x32<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\n\nkey_prefix\x18\x14 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x17\x64\x65lete_protection_state\x18\x16 \x01(\x0e\x32\x39.google.firestore.admin.v1.Database.DeleteProtectionState\x12\x0c\n\x04\x65tag\x18\x63 \x01(\t\"W\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x46IRESTORE_NATIVE\x10\x01\x12\x12\n\x0e\x44\x41TASTORE_MODE\x10\x02\"w\n\x0f\x43oncurrencyMode\x12 \n\x1c\x43ONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nOPTIMISTIC\x10\x01\x12\x0f\n\x0bPESSIMISTIC\x10\x02\x12!\n\x1dOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9b\x01\n\x1dPointInTimeRecoveryEnablement\x12\x31\n-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\n\x1ePOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\n\x1fPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\n\x18\x41ppEngineIntegrationMode\x12+\n\'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\x7f\n\x15\x44\x65leteProtectionState\x12\'\n#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETE_PROTECTION_DISABLED\x10\x01\x12\x1d\n\x19\x44\x45LETE_PROTECTION_ENABLED\x10\x02:R\xea\x41O\n!firestore.googleapis.com/Database\x12\'projects/{project}/databases/{database}R\x01\x01\x42\xdc\x01\n\x1d\x63om.google.firestore.admin.v1B\rDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3"
12
14
 
13
15
  pool = Google::Protobuf::DescriptorPool.generated_pool
14
16
 
@@ -23,6 +25,8 @@ rescue TypeError => e
23
25
  file = pool.add_serialized_file(serialized)
24
26
  warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
27
  imports = [
28
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
26
30
  ]
27
31
  imports.each do |type_name, expected_filename|
28
32
  import_file = pool.lookup(type_name).file_descriptor
@@ -42,7 +46,9 @@ module Google
42
46
  Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database").msgclass
43
47
  Database::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DatabaseType").enummodule
44
48
  Database::ConcurrencyMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.ConcurrencyMode").enummodule
49
+ Database::PointInTimeRecoveryEnablement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement").enummodule
45
50
  Database::AppEngineIntegrationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.AppEngineIntegrationMode").enummodule
51
+ Database::DeleteProtectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DeleteProtectionState").enummodule
46
52
  end
47
53
  end
48
54
  end
@@ -11,12 +11,14 @@ require 'google/api/resource_pb'
11
11
  require 'google/firestore/admin/v1/database_pb'
12
12
  require 'google/firestore/admin/v1/field_pb'
13
13
  require 'google/firestore/admin/v1/index_pb'
14
+ require 'google/firestore/admin/v1/operation_pb'
14
15
  require 'google/longrunning/operations_pb'
15
16
  require 'google/protobuf/empty_pb'
16
17
  require 'google/protobuf/field_mask_pb'
18
+ require 'google/protobuf/timestamp_pb'
17
19
 
18
20
 
19
- descriptor_data = "\n/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/firestore/admin/v1/database.proto\x1a%google/firestore/admin/v1/field.proto\x1a%google/firestore/admin/v1/index.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"Q\n\x14ListDatabasesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\"\xa8\x01\n\x15\x43reateDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12:\n\x08\x64\x61tabase\x18\x02 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x18\n\x16\x43reateDatabaseMetadata\"O\n\x15ListDatabasesResponse\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.google.firestore.admin.v1.Database\"M\n\x12GetDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"\x84\x01\n\x15UpdateDatabaseRequest\x12:\n\x08\x64\x61tabase\x18\x01 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x18\n\x16UpdateDatabaseMetadata\"\x8c\x01\n\x12\x43reateIndexRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x34\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.IndexB\x03\xe0\x41\x02\"\x8d\x01\n\x12ListIndexesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"J\n\x12\x44\x65leteIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"{\n\x12UpdateFieldRequest\x12\x34\n\x05\x66ield\x18\x01 \x01(\x0b\x32 .google.firestore.admin.v1.FieldB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x0fGetFieldRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Field\"\x8c\x01\n\x11ListFieldsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x12ListFieldsResponse\x12\x30\n\x06\x66ields\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Field\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x84\x01\n\x16\x45xportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x03 \x01(\t\"\x83\x01\n\x16ImportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x03 \x01(\t2\xee\x14\n\x0e\x46irestoreAdmin\x12\xdb\x01\n\x0b\x43reateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1a\x1d.google.longrunning.Operation\"~\x82\xd3\xe4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\xda\x41\x0cparent,index\xca\x41\x1f\n\x05Index\x12\x16IndexOperationMetadata\x12\xbd\x01\n\x0bListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1a..google.firestore.admin.v1.ListIndexesResponse\"O\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\xda\x41\x06parent\x12\xa7\x01\n\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1a .google.firestore.admin.v1.Index\"M\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\xda\x41\x04name\x12\xa3\x01\n\x0b\x44\x65leteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1a\x16.google.protobuf.Empty\"M\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\xda\x41\x04name\x12\xa6\x01\n\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1a .google.firestore.admin.v1.Field\"L\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\xda\x41\x04name\x12\xd9\x01\n\x0bUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1a\x1d.google.longrunning.Operation\"|\x82\xd3\xe4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05\x66ield\xda\x41\x05\x66ield\xca\x41\x1f\n\x05\x46ield\x12\x16\x46ieldOperationMetadata\x12\xb9\x01\n\nListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1a-.google.firestore.admin.v1.ListFieldsResponse\"N\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\xda\x41\x06parent\x12\xdd\x01\n\x0f\x45xportDocuments\x12\x31.google.firestore.admin.v1.ExportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\xda\x41\x04name\xca\x41\x32\n\x17\x45xportDocumentsResponse\x12\x17\x45xportDocumentsMetadata\x12\xdb\x01\n\x0fImportDocuments\x12\x31.google.firestore.admin.v1.ImportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"v\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\xda\x41\x04name\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\x12\xd9\x01\n\x0e\x43reateDatabase\x12\x30.google.firestore.admin.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"v\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08\x64\x61tabase\xda\x41\x1bparent,database,database_id\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x43reateDatabaseMetadata\x12\x93\x01\n\x0bGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1a#.google.firestore.admin.v1.Database\"0\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\xda\x41\x04name\x12\xa6\x01\n\rListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1a\x30.google.firestore.admin.v1.ListDatabasesResponse\"2\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/databases\xda\x41\x06parent\x12\xdb\x01\n\x0eUpdateDatabase\x12\x30.google.firestore.admin.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02\x36\x32*/v1/{database.name=projects/*/databases/*}:\x08\x64\x61tabase\xda\x41\x14\x64\x61tabase,update_mask\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xa5\x03\n\x1d\x63om.google.firestore.admin.v1B\x13\x46irestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41L\n!firestore.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41q\n(firestore.googleapis.com/CollectionGroup\x12\x45projects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3"
21
+ descriptor_data = "\n/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a(google/firestore/admin/v1/database.proto\x1a%google/firestore/admin/v1/field.proto\x1a%google/firestore/admin/v1/index.proto\x1a)google/firestore/admin/v1/operation.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x14ListDatabasesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\"\xa8\x01\n\x15\x43reateDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12:\n\x08\x64\x61tabase\x18\x02 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x18\n\x16\x43reateDatabaseMetadata\"d\n\x15ListDatabasesResponse\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.google.firestore.admin.v1.Database\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"\x84\x01\n\x15UpdateDatabaseRequest\x12:\n\x08\x64\x61tabase\x18\x01 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x18\n\x16UpdateDatabaseMetadata\"^\n\x15\x44\x65leteDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x18\n\x16\x44\x65leteDatabaseMetadata\"\x8c\x01\n\x12\x43reateIndexRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x34\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.IndexB\x03\xe0\x41\x02\"\x8d\x01\n\x12ListIndexesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"J\n\x12\x44\x65leteIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"{\n\x12UpdateFieldRequest\x12\x34\n\x05\x66ield\x18\x01 \x01(\x0b\x32 .google.firestore.admin.v1.FieldB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x0fGetFieldRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Field\"\x8c\x01\n\x11ListFieldsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x12ListFieldsResponse\x12\x30\n\x06\x66ields\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Field\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x01\n\x16\x45xportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\x12\x31\n\rsnapshot_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9a\x01\n\x16ImportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t2\xa9\x16\n\x0e\x46irestoreAdmin\x12\xdb\x01\n\x0b\x43reateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1a\x1d.google.longrunning.Operation\"~\x82\xd3\xe4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\xda\x41\x0cparent,index\xca\x41\x1f\n\x05Index\x12\x16IndexOperationMetadata\x12\xbd\x01\n\x0bListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1a..google.firestore.admin.v1.ListIndexesResponse\"O\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\xda\x41\x06parent\x12\xa7\x01\n\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1a .google.firestore.admin.v1.Index\"M\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\xda\x41\x04name\x12\xa3\x01\n\x0b\x44\x65leteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1a\x16.google.protobuf.Empty\"M\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\xda\x41\x04name\x12\xa6\x01\n\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1a .google.firestore.admin.v1.Field\"L\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\xda\x41\x04name\x12\xd9\x01\n\x0bUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1a\x1d.google.longrunning.Operation\"|\x82\xd3\xe4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05\x66ield\xda\x41\x05\x66ield\xca\x41\x1f\n\x05\x46ield\x12\x16\x46ieldOperationMetadata\x12\xb9\x01\n\nListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1a-.google.firestore.admin.v1.ListFieldsResponse\"N\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\xda\x41\x06parent\x12\xdd\x01\n\x0f\x45xportDocuments\x12\x31.google.firestore.admin.v1.ExportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\xda\x41\x04name\xca\x41\x32\n\x17\x45xportDocumentsResponse\x12\x17\x45xportDocumentsMetadata\x12\xdb\x01\n\x0fImportDocuments\x12\x31.google.firestore.admin.v1.ImportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"v\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\xda\x41\x04name\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\x12\xd9\x01\n\x0e\x43reateDatabase\x12\x30.google.firestore.admin.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"v\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08\x64\x61tabase\xda\x41\x1bparent,database,database_id\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x43reateDatabaseMetadata\x12\x93\x01\n\x0bGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1a#.google.firestore.admin.v1.Database\"0\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\xda\x41\x04name\x12\xa6\x01\n\rListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1a\x30.google.firestore.admin.v1.ListDatabasesResponse\"2\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/databases\xda\x41\x06parent\x12\xdb\x01\n\x0eUpdateDatabase\x12\x30.google.firestore.admin.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"x\x82\xd3\xe4\x93\x02\x36\x32*/v1/{database.name=projects/*/databases/*}:\x08\x64\x61tabase\xda\x41\x14\x64\x61tabase,update_mask\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\x12\xb8\x01\n\x0e\x44\x65leteDatabase\x12\x30.google.firestore.admin.v1.DeleteDatabaseRequest\x1a\x1d.google.longrunning.Operation\"U\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/databases/*}\xda\x41\x04name\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x44\x65leteDatabaseMetadata\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xa5\x03\n\x1d\x63om.google.firestore.admin.v1B\x13\x46irestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41L\n!firestore.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41q\n(firestore.googleapis.com/CollectionGroup\x12\x45projects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3"
20
22
 
21
23
  pool = Google::Protobuf::DescriptorPool.generated_pool
22
24
 
@@ -35,6 +37,7 @@ rescue TypeError => e
35
37
  ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
36
38
  ["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"],
37
39
  ["google.firestore.admin.v1.Field", "google/firestore/admin/v1/field.proto"],
40
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
38
41
  ]
39
42
  imports.each do |type_name, expected_filename|
40
43
  import_file = pool.lookup(type_name).file_descriptor
@@ -58,6 +61,8 @@ module Google
58
61
  GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetDatabaseRequest").msgclass
59
62
  UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseRequest").msgclass
60
63
  UpdateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseMetadata").msgclass
64
+ DeleteDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteDatabaseRequest").msgclass
65
+ DeleteDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteDatabaseMetadata").msgclass
61
66
  CreateIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateIndexRequest").msgclass
62
67
  ListIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesRequest").msgclass
63
68
  ListIndexesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesResponse").msgclass
@@ -99,7 +99,8 @@ module Google
99
99
  # only supports listing fields that have been explicitly overridden. To issue
100
100
  # this query, call
101
101
  # [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields]
102
- # with the filter set to `indexConfig.usesAncestorConfig:false` .
102
+ # with the filter set to `indexConfig.usesAncestorConfig:false or
103
+ # `ttlConfig:*`.
103
104
  rpc :ListFields, ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse
104
105
  # Exports a copy of all or a subset of documents from Google Cloud Firestore
105
106
  # to another storage system, such as Google Cloud Storage. Recent updates to
@@ -127,6 +128,8 @@ module Google
127
128
  rpc :ListDatabases, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse
128
129
  # Updates a database.
129
130
  rpc :UpdateDatabase, ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Google::Longrunning::Operation
131
+ # Deletes a database.
132
+ rpc :DeleteDatabase, ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Google::Longrunning::Operation
130
133
  end
131
134
 
132
135
  Stub = Service.rpc_stub_class
@@ -4,11 +4,12 @@
4
4
 
5
5
  require 'google/protobuf'
6
6
 
7
+ require 'google/api/resource_pb'
7
8
  require 'google/firestore/admin/v1/index_pb'
8
9
  require 'google/protobuf/timestamp_pb'
9
10
 
10
11
 
11
- descriptor_data = "\n)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1a%google/firestore/admin/v1/index.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x02\n\x16IndexOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05index\x18\x03 \x01(\t\x12\x38\n\x05state\x18\x04 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\x99\x07\n\x16\x46ieldOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05\x66ield\x18\x03 \x01(\t\x12_\n\x13index_config_deltas\x18\x04 \x03(\x0b\x32\x42.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x12\x38\n\x05state\x18\x05 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x07 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12Z\n\x10ttl_config_delta\x18\x08 \x01(\x0b\x32@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1a\xe7\x01\n\x10IndexConfigDelta\x12\x62\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.Index\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x1a\xb2\x01\n\x0eTtlConfigDelta\x12`\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\"\xec\x02\n\x17\x45xportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x07 \x01(\t\"\xeb\x02\n\x17ImportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x07 \x01(\t\"4\n\x17\x45xportDocumentsResponse\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\":\n\x08Progress\x12\x16\n\x0e\x65stimated_work\x18\x01 \x01(\x03\x12\x16\n\x0e\x63ompleted_work\x18\x02 \x01(\x03*\x9e\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nPROCESSING\x10\x02\x12\x0e\n\nCANCELLING\x10\x03\x12\x0e\n\nFINALIZING\x10\x04\x12\x0e\n\nSUCCESSFUL\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x42\xdd\x01\n\x1d\x63om.google.firestore.admin.v1B\x0eOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3"
12
+ descriptor_data = "\n)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1a\x19google/api/resource.proto\x1a%google/firestore/admin/v1/index.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x02\n\x16IndexOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05index\x18\x03 \x01(\t\x12\x38\n\x05state\x18\x04 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\x99\x07\n\x16\x46ieldOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05\x66ield\x18\x03 \x01(\t\x12_\n\x13index_config_deltas\x18\x04 \x03(\x0b\x32\x42.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x12\x38\n\x05state\x18\x05 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x07 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12Z\n\x10ttl_config_delta\x18\x08 \x01(\x0b\x32@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1a\xe7\x01\n\x10IndexConfigDelta\x12\x62\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.Index\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x1a\xb2\x01\n\x0eTtlConfigDelta\x12`\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\"\xb6\x03\n\x17\x45xportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\x12\x31\n\rsnapshot_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x82\x03\n\x17ImportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\"4\n\x17\x45xportDocumentsResponse\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\":\n\x08Progress\x12\x16\n\x0e\x65stimated_work\x18\x01 \x01(\x03\x12\x16\n\x0e\x63ompleted_work\x18\x02 \x01(\x03*\x9e\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nPROCESSING\x10\x02\x12\x0e\n\nCANCELLING\x10\x03\x12\x0e\n\nFINALIZING\x10\x04\x12\x0e\n\nSUCCESSFUL\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x42\xdd\x01\n\x1d\x63om.google.firestore.admin.v1B\x0eOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3"
12
13
 
13
14
  pool = Google::Protobuf::DescriptorPool.generated_pool
14
15
 
@@ -304,6 +304,19 @@ module Google
304
304
  # seconds: 360 # 6 minutes
305
305
  # total_poll_timeout:
306
306
  # seconds: 54000 # 90 minutes
307
+ # @!attribute [rw] auto_populated_fields
308
+ # @return [::Array<::String>]
309
+ # List of top-level fields of the request message, that should be
310
+ # automatically populated by the client libraries based on their
311
+ # (google.api.field_info).format. Currently supported format: UUID4.
312
+ #
313
+ # Example of a YAML configuration:
314
+ #
315
+ # publishing:
316
+ # method_settings:
317
+ # - selector: google.example.v1.ExampleService.CreateExample
318
+ # auto_populated_fields:
319
+ # - request_id
307
320
  class MethodSettings
308
321
  include ::Google::Protobuf::MessageExts
309
322
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -23,15 +23,25 @@ module Google
23
23
  module Admin
24
24
  module V1
25
25
  # A Cloud Firestore Database.
26
- # Currently only one database is allowed per cloud project; this database
27
- # must have a `database_id` of '(default)'.
28
26
  # @!attribute [rw] name
29
27
  # @return [::String]
30
28
  # The resource name of the Database.
31
29
  # Format: `projects/{project}/databases/{database}`
30
+ # @!attribute [r] uid
31
+ # @return [::String]
32
+ # Output only. The system-generated UUID4 for this Database.
33
+ # @!attribute [r] create_time
34
+ # @return [::Google::Protobuf::Timestamp]
35
+ # Output only. The timestamp at which this database was created. Databases
36
+ # created before 2016 do not populate create_time.
37
+ # @!attribute [r] update_time
38
+ # @return [::Google::Protobuf::Timestamp]
39
+ # Output only. The timestamp at which this database was most recently
40
+ # updated. Note this only includes updates to the database resource and not
41
+ # data contained by the database.
32
42
  # @!attribute [rw] location_id
33
43
  # @return [::String]
34
- # The location of the database. Available databases are listed at
44
+ # The location of the database. Available locations are listed at
35
45
  # https://cloud.google.com/firestore/docs/locations.
36
46
  # @!attribute [rw] type
37
47
  # @return [::Google::Cloud::Firestore::Admin::V1::Database::DatabaseType]
@@ -41,18 +51,46 @@ module Google
41
51
  # @!attribute [rw] concurrency_mode
42
52
  # @return [::Google::Cloud::Firestore::Admin::V1::Database::ConcurrencyMode]
43
53
  # The concurrency control mode to use for this database.
54
+ # @!attribute [r] version_retention_period
55
+ # @return [::Google::Protobuf::Duration]
56
+ # Output only. The period during which past versions of data are retained in
57
+ # the database.
58
+ #
59
+ # Any [read][google.firestore.v1.GetDocumentRequest.read_time]
60
+ # or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify
61
+ # a `read_time` within this window, and will read the state of the database
62
+ # at that time.
63
+ #
64
+ # If the PITR feature is enabled, the retention period is 7 days. Otherwise,
65
+ # the retention period is 1 hour.
66
+ # @!attribute [r] earliest_version_time
67
+ # @return [::Google::Protobuf::Timestamp]
68
+ # Output only. The earliest timestamp at which older versions of the data can
69
+ # be read from the database. See [version_retention_period] above; this field
70
+ # is populated with `now - version_retention_period`.
71
+ #
72
+ # This value is continuously updated, and becomes stale the moment it is
73
+ # queried. If you are using this value to recover data, make sure to account
74
+ # for the time from the moment when the value is queried to the moment when
75
+ # you initiate the recovery.
76
+ # @!attribute [rw] point_in_time_recovery_enablement
77
+ # @return [::Google::Cloud::Firestore::Admin::V1::Database::PointInTimeRecoveryEnablement]
78
+ # Whether to enable the PITR feature on this database.
44
79
  # @!attribute [rw] app_engine_integration_mode
45
80
  # @return [::Google::Cloud::Firestore::Admin::V1::Database::AppEngineIntegrationMode]
46
81
  # The App Engine integration mode to use for this database.
47
82
  # @!attribute [r] key_prefix
48
83
  # @return [::String]
49
- # Output only. The key_prefix for this database. This key_prefix is used, in combination
50
- # with the project id ("<key prefix>~<project id>") to construct the
51
- # application id that is returned from the Cloud Datastore APIs in Google App
52
- # Engine first generation runtimes.
84
+ # Output only. The key_prefix for this database. This key_prefix is used, in
85
+ # combination with the project id ("<key prefix>~<project id>") to construct
86
+ # the application id that is returned from the Cloud Datastore APIs in Google
87
+ # App Engine first generation runtimes.
53
88
  #
54
89
  # This value may be empty in which case the appid to use for URL-encoded keys
55
90
  # is the project_id (eg: foo instead of v~foo).
91
+ # @!attribute [rw] delete_protection_state
92
+ # @return [::Google::Cloud::Firestore::Admin::V1::Database::DeleteProtectionState]
93
+ # State of delete protection for the database.
56
94
  # @!attribute [rw] etag
57
95
  # @return [::String]
58
96
  # This checksum is computed by the server based on the value of other
@@ -102,6 +140,26 @@ module Google
102
140
  OPTIMISTIC_WITH_ENTITY_GROUPS = 3
103
141
  end
104
142
 
143
+ # Point In Time Recovery feature enablement.
144
+ module PointInTimeRecoveryEnablement
145
+ # Not used.
146
+ POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0
147
+
148
+ # Reads are supported on selected versions of the data from within the past
149
+ # 7 days:
150
+ #
151
+ # * Reads against any timestamp within the past hour
152
+ # * Reads against 1-minute snapshots beyond 1 hour and within 7 days
153
+ #
154
+ # `version_retention_period` and `earliest_version_time` can be
155
+ # used to determine the supported versions.
156
+ POINT_IN_TIME_RECOVERY_ENABLED = 1
157
+
158
+ # Reads are supported on any version of the data from within the past 1
159
+ # hour.
160
+ POINT_IN_TIME_RECOVERY_DISABLED = 2
161
+ end
162
+
105
163
  # The type of App Engine integration mode.
106
164
  module AppEngineIntegrationMode
107
165
  # Not used.
@@ -113,10 +171,24 @@ module Google
113
171
  # the database.
114
172
  ENABLED = 1
115
173
 
116
- # Appengine has no affect on the ability of this database to serve
174
+ # App Engine has no effect on the ability of this database to serve
117
175
  # requests.
176
+ #
177
+ # This is the default setting for databases created with the Firestore API.
118
178
  DISABLED = 2
119
179
  end
180
+
181
+ # The delete protection state of the database.
182
+ module DeleteProtectionState
183
+ # The default value. Delete protection type is not specified
184
+ DELETE_PROTECTION_STATE_UNSPECIFIED = 0
185
+
186
+ # Delete protection is disabled
187
+ DELETE_PROTECTION_DISABLED = 1
188
+
189
+ # Delete protection is enabled
190
+ DELETE_PROTECTION_ENABLED = 2
191
+ end
120
192
  end
121
193
  end
122
194
  end
@@ -46,7 +46,11 @@ module Google
46
46
  # Required. The ID to use for the database, which will become the final
47
47
  # component of the database's resource name.
48
48
  #
49
- # The value must be set to "(default)".
49
+ # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
50
+ # with first character a letter and the last a letter or a number. Must not
51
+ # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/.
52
+ #
53
+ # "(default)" database id is also valid.
50
54
  class CreateDatabaseRequest
51
55
  include ::Google::Protobuf::MessageExts
52
56
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -62,6 +66,17 @@ module Google
62
66
  # @!attribute [rw] databases
63
67
  # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Database>]
64
68
  # The databases in the project.
69
+ # @!attribute [rw] unreachable
70
+ # @return [::Array<::String>]
71
+ # In the event that data about individual databases cannot be listed they
72
+ # will be recorded here.
73
+ #
74
+ # An example entry might be: projects/some_project/locations/some_location
75
+ # This can happen if the Cloud Region that the Database resides in is
76
+ # currently unavailable. In this case we can't fetch all the details about
77
+ # the database. You may be able to get a more detailed error message
78
+ # (or possibly fetch the resource) by sending a 'Get' request for the
79
+ # resource or a 'List' request for the specific location.
65
80
  class ListDatabasesResponse
66
81
  include ::Google::Protobuf::MessageExts
67
82
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -97,6 +112,28 @@ module Google
97
112
  extend ::Google::Protobuf::MessageExts::ClassMethods
98
113
  end
99
114
 
115
+ # The request for
116
+ # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database FirestoreAdmin.DeleteDatabase}.
117
+ # @!attribute [rw] name
118
+ # @return [::String]
119
+ # Required. A name of the form
120
+ # `projects/{project_id}/databases/{database_id}`
121
+ # @!attribute [rw] etag
122
+ # @return [::String]
123
+ # The current etag of the Database.
124
+ # If an etag is provided and does not match the current etag of the database,
125
+ # deletion will be blocked and a FAILED_PRECONDITION error will be returned.
126
+ class DeleteDatabaseRequest
127
+ include ::Google::Protobuf::MessageExts
128
+ extend ::Google::Protobuf::MessageExts::ClassMethods
129
+ end
130
+
131
+ # Metadata related to the delete database operation.
132
+ class DeleteDatabaseMetadata
133
+ include ::Google::Protobuf::MessageExts
134
+ extend ::Google::Protobuf::MessageExts::ClassMethods
135
+ end
136
+
100
137
  # The request for
101
138
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index FirestoreAdmin.CreateIndex}.
102
139
  # @!attribute [rw] parent
@@ -254,6 +291,23 @@ module Google
254
291
  # guidelines: https://cloud.google.com/storage/docs/naming.
255
292
  # If the URI is a bucket (without a namespace path), a prefix will be
256
293
  # generated based on the start time.
294
+ # @!attribute [rw] namespace_ids
295
+ # @return [::Array<::String>]
296
+ # An empty list represents all namespaces. This is the preferred
297
+ # usage for databases that don't use namespaces.
298
+ #
299
+ # An empty string element represents the default namespace. This should be
300
+ # used if the database has data in non-default namespaces, but doesn't want
301
+ # to include them. Each namespace in this list must be unique.
302
+ # @!attribute [rw] snapshot_time
303
+ # @return [::Google::Protobuf::Timestamp]
304
+ # The timestamp that corresponds to the version of the database to be
305
+ # exported. The timestamp must be in the past, rounded to the minute and not
306
+ # older than
307
+ # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}.
308
+ # If specified, then the exported documents will represent a consistent view
309
+ # of the database at the provided time. Otherwise, there are no guarantees
310
+ # about the consistency of the exported documents.
257
311
  class ExportDocumentsRequest
258
312
  include ::Google::Protobuf::MessageExts
259
313
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -276,6 +330,14 @@ module Google
276
330
  # an export that has completed successfully.
277
331
  # See:
278
332
  # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}.
333
+ # @!attribute [rw] namespace_ids
334
+ # @return [::Array<::String>]
335
+ # An empty list represents all namespaces. This is the preferred
336
+ # usage for databases that don't use namespaces.
337
+ #
338
+ # An empty string element represents the default namespace. This should be
339
+ # used if the database has data in non-default namespaces, but doesn't want
340
+ # to include them. Each namespace in this list must be unique.
279
341
  class ImportDocumentsRequest
280
342
  include ::Google::Protobuf::MessageExts
281
343
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -22,7 +22,8 @@ module Google
22
22
  module Firestore
23
23
  module Admin
24
24
  module V1
25
- # The metadata message for `::Google::Cloud::Location::Location#metadata`.
25
+ # The metadata message for
26
+ # `::Google::Cloud::Location::Location#metadata`.
26
27
  class LocationMetadata
27
28
  include ::Google::Protobuf::MessageExts
28
29
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -22,7 +22,8 @@ module Google
22
22
  module Firestore
23
23
  module Admin
24
24
  module V1
25
- # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} results from
25
+ # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation}
26
+ # results from
26
27
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index FirestoreAdmin.CreateIndex}.
27
28
  # @!attribute [rw] start_time
28
29
  # @return [::Google::Protobuf::Timestamp]
@@ -49,7 +50,8 @@ module Google
49
50
  extend ::Google::Protobuf::MessageExts::ClassMethods
50
51
  end
51
52
 
52
- # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} results from
53
+ # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation}
54
+ # results from
53
55
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field FirestoreAdmin.UpdateField}.
54
56
  # @!attribute [rw] start_time
55
57
  # @return [::Google::Protobuf::Timestamp]
@@ -64,8 +66,9 @@ module Google
64
66
  # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
65
67
  # @!attribute [rw] index_config_deltas
66
68
  # @return [::Array<::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta>]
67
- # A list of {::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta IndexConfigDelta}, which describe the intent of this
68
- # operation.
69
+ # A list of
70
+ # {::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta IndexConfigDelta},
71
+ # which describe the intent of this operation.
69
72
  # @!attribute [rw] state
70
73
  # @return [::Google::Cloud::Firestore::Admin::V1::OperationState]
71
74
  # The state of the operation.
@@ -106,7 +109,7 @@ module Google
106
109
  end
107
110
  end
108
111
 
109
- # Information about an TTL configuration change.
112
+ # Information about a TTL configuration change.
110
113
  # @!attribute [rw] change_type
111
114
  # @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::TtlConfigDelta::ChangeType]
112
115
  # Specifies how the TTL configuration is changing.
@@ -128,7 +131,8 @@ module Google
128
131
  end
129
132
  end
130
133
 
131
- # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} results from
134
+ # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation}
135
+ # results from
132
136
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents FirestoreAdmin.ExportDocuments}.
133
137
  # @!attribute [rw] start_time
134
138
  # @return [::Google::Protobuf::Timestamp]
@@ -151,13 +155,22 @@ module Google
151
155
  # Which collection ids are being exported.
152
156
  # @!attribute [rw] output_uri_prefix
153
157
  # @return [::String]
154
- # Where the entities are being exported to.
158
+ # Where the documents are being exported to.
159
+ # @!attribute [rw] namespace_ids
160
+ # @return [::Array<::String>]
161
+ # Which namespace ids are being exported.
162
+ # @!attribute [rw] snapshot_time
163
+ # @return [::Google::Protobuf::Timestamp]
164
+ # The timestamp that corresponds to the version of the database that is being
165
+ # exported. If unspecified, there are no guarantees about the consistency of
166
+ # the documents being exported.
155
167
  class ExportDocumentsMetadata
156
168
  include ::Google::Protobuf::MessageExts
157
169
  extend ::Google::Protobuf::MessageExts::ClassMethods
158
170
  end
159
171
 
160
- # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} results from
172
+ # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation}
173
+ # results from
161
174
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents FirestoreAdmin.ImportDocuments}.
162
175
  # @!attribute [rw] start_time
163
176
  # @return [::Google::Protobuf::Timestamp]
@@ -181,12 +194,16 @@ module Google
181
194
  # @!attribute [rw] input_uri_prefix
182
195
  # @return [::String]
183
196
  # The location of the documents being imported.
197
+ # @!attribute [rw] namespace_ids
198
+ # @return [::Array<::String>]
199
+ # Which namespace ids are being imported.
184
200
  class ImportDocumentsMetadata
185
201
  include ::Google::Protobuf::MessageExts
186
202
  extend ::Google::Protobuf::MessageExts::ClassMethods
187
203
  end
188
204
 
189
- # Returned in the {::Google::Longrunning::Operation google.longrunning.Operation} response field.
205
+ # Returned in the {::Google::Longrunning::Operation google.longrunning.Operation}
206
+ # response field.
190
207
  # @!attribute [rw] output_uri_prefix
191
208
  # @return [::String]
192
209
  # Location of the output files. This can be used to begin an import
@@ -198,8 +215,8 @@ module Google
198
215
  end
199
216
 
200
217
  # Describes the progress of the operation.
201
- # Unit of work is generic and must be interpreted based on where {::Google::Cloud::Firestore::Admin::V1::Progress Progress}
202
- # is used.
218
+ # Unit of work is generic and must be interpreted based on where
219
+ # {::Google::Cloud::Firestore::Admin::V1::Progress Progress} is used.
203
220
  # @!attribute [rw] estimated_work
204
221
  # @return [::Integer]
205
222
  # The amount of work estimated.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-firestore-admin-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-12 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  requirements: []
250
- rubygems_version: 3.4.19
250
+ rubygems_version: 3.5.3
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Accesses the NoSQL document database built for automatic scaling, high performance,