google-cloud-firestore-admin-v1 0.12.0 → 0.14.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.
@@ -61,6 +61,9 @@ module Google
61
61
  # service `google.longrunning.Operations`.
62
62
  #
63
63
  class Client
64
+ # @private
65
+ DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$"
66
+
64
67
  include Paths
65
68
 
66
69
  # @private
@@ -154,6 +157,15 @@ module Google
154
157
  @config
155
158
  end
156
159
 
160
+ ##
161
+ # The effective universe domain
162
+ #
163
+ # @return [String]
164
+ #
165
+ def universe_domain
166
+ @firestore_admin_stub.universe_domain
167
+ end
168
+
157
169
  ##
158
170
  # Create a new FirestoreAdmin REST client object.
159
171
  #
@@ -181,8 +193,9 @@ module Google
181
193
  credentials = @config.credentials
182
194
  # Use self-signed JWT if the endpoint is unchanged from default,
183
195
  # but only if the default endpoint does not have a region prefix.
184
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
185
- !@config.endpoint.split(".").first.include?("-")
196
+ enable_self_signed_jwt = @config.endpoint.nil? ||
197
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
198
+ !@config.endpoint.split(".").first.include?("-"))
186
199
  credentials ||= Credentials.default scope: @config.scope,
187
200
  enable_self_signed_jwt: enable_self_signed_jwt
188
201
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -196,15 +209,22 @@ module Google
196
209
  config.credentials = credentials
197
210
  config.quota_project = @quota_project_id
198
211
  config.endpoint = @config.endpoint
212
+ config.universe_domain = @config.universe_domain
199
213
  end
200
214
 
201
215
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
202
216
  config.credentials = credentials
203
217
  config.quota_project = @quota_project_id
204
218
  config.endpoint = @config.endpoint
219
+ config.universe_domain = @config.universe_domain
205
220
  end
206
221
 
207
- @firestore_admin_stub = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
222
+ @firestore_admin_stub = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.new(
223
+ endpoint: @config.endpoint,
224
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
225
+ universe_domain: @config.universe_domain,
226
+ credentials: credentials
227
+ )
208
228
  end
209
229
 
210
230
  ##
@@ -757,7 +777,8 @@ module Google
757
777
  # only supports listing fields that have been explicitly overridden. To issue
758
778
  # this query, call
759
779
  # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields}
760
- # with the filter set to `indexConfig.usesAncestorConfig:false` .
780
+ # with the filter set to `indexConfig.usesAncestorConfig:false or
781
+ # `ttlConfig:*`.
761
782
  #
762
783
  # @overload list_fields(request, options = nil)
763
784
  # Pass arguments to `list_fields` via a request object, either of type
@@ -896,7 +917,7 @@ module Google
896
917
  # If the URI is a bucket (without a namespace path), a prefix will be
897
918
  # generated based on the start time.
898
919
  # @param namespace_ids [::Array<::String>]
899
- # Unspecified means all namespaces. This is the preferred
920
+ # An empty list represents all namespaces. This is the preferred
900
921
  # usage for databases that don't use namespaces.
901
922
  #
902
923
  # An empty string element represents the default namespace. This should be
@@ -1011,7 +1032,7 @@ module Google
1011
1032
  # See:
1012
1033
  # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}.
1013
1034
  # @param namespace_ids [::Array<::String>]
1014
- # Unspecified means all namespaces. This is the preferred
1035
+ # An empty list represents all namespaces. This is the preferred
1015
1036
  # usage for databases that don't use namespaces.
1016
1037
  #
1017
1038
  # An empty string element represents the default namespace. This should be
@@ -1110,7 +1131,11 @@ module Google
1110
1131
  # Required. The ID to use for the database, which will become the final
1111
1132
  # component of the database's resource name.
1112
1133
  #
1113
- # The value must be set to "(default)".
1134
+ # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/
1135
+ # with first character a letter and the last a letter or a number. Must not
1136
+ # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/.
1137
+ #
1138
+ # "(default)" database id is also valid.
1114
1139
  # @yield [result, operation] Access the result along with the TransportOperation object
1115
1140
  # @yieldparam result [::Gapic::Operation]
1116
1141
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1423,6 +1448,97 @@ module Google
1423
1448
  raise ::Google::Cloud::Error.from_error(e)
1424
1449
  end
1425
1450
 
1451
+ ##
1452
+ # Deletes a database.
1453
+ #
1454
+ # @overload delete_database(request, options = nil)
1455
+ # Pass arguments to `delete_database` via a request object, either of type
1456
+ # {::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest} or an equivalent Hash.
1457
+ #
1458
+ # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Hash]
1459
+ # A request object representing the call parameters. Required. To specify no
1460
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1461
+ # @param options [::Gapic::CallOptions, ::Hash]
1462
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1463
+ #
1464
+ # @overload delete_database(name: nil, etag: nil)
1465
+ # Pass arguments to `delete_database` via keyword arguments. Note that at
1466
+ # least one keyword argument is required. To specify no parameters, or to keep all
1467
+ # the default parameter values, pass an empty Hash as a request object (see above).
1468
+ #
1469
+ # @param name [::String]
1470
+ # Required. A name of the form
1471
+ # `projects/{project_id}/databases/{database_id}`
1472
+ # @param etag [::String]
1473
+ # The current etag of the Database.
1474
+ # If an etag is provided and does not match the current etag of the database,
1475
+ # deletion will be blocked and a FAILED_PRECONDITION error will be returned.
1476
+ # @yield [result, operation] Access the result along with the TransportOperation object
1477
+ # @yieldparam result [::Gapic::Operation]
1478
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1479
+ #
1480
+ # @return [::Gapic::Operation]
1481
+ #
1482
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1483
+ #
1484
+ # @example Basic example
1485
+ # require "google/cloud/firestore/admin/v1"
1486
+ #
1487
+ # # Create a client object. The client can be reused for multiple calls.
1488
+ # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new
1489
+ #
1490
+ # # Create a request. To set request fields, pass in keyword arguments.
1491
+ # request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new
1492
+ #
1493
+ # # Call the delete_database method.
1494
+ # result = client.delete_database request
1495
+ #
1496
+ # # The returned object is of type Gapic::Operation. You can use it to
1497
+ # # check the status of an operation, cancel it, or wait for results.
1498
+ # # Here is how to wait for a response.
1499
+ # result.wait_until_done! timeout: 60
1500
+ # if result.response?
1501
+ # p result.response
1502
+ # else
1503
+ # puts "No response received."
1504
+ # end
1505
+ #
1506
+ def delete_database request, options = nil
1507
+ raise ::ArgumentError, "request must be provided" if request.nil?
1508
+
1509
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest
1510
+
1511
+ # Converts hash and nil to an options object
1512
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1513
+
1514
+ # Customize the options with defaults
1515
+ call_metadata = @config.rpcs.delete_database.metadata.to_h
1516
+
1517
+ # Set x-goog-api-client and x-goog-user-project headers
1518
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1519
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1520
+ gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION,
1521
+ transports_version_send: [:rest]
1522
+
1523
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1524
+
1525
+ options.apply_defaults timeout: @config.rpcs.delete_database.timeout,
1526
+ metadata: call_metadata,
1527
+ retry_policy: @config.rpcs.delete_database.retry_policy
1528
+
1529
+ options.apply_defaults timeout: @config.timeout,
1530
+ metadata: @config.metadata,
1531
+ retry_policy: @config.retry_policy
1532
+
1533
+ @firestore_admin_stub.delete_database request, options do |result, operation|
1534
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1535
+ yield result, operation if block_given?
1536
+ return result
1537
+ end
1538
+ rescue ::Gapic::Rest::Error => e
1539
+ raise ::Google::Cloud::Error.from_error(e)
1540
+ end
1541
+
1426
1542
  ##
1427
1543
  # Configuration class for the FirestoreAdmin REST API.
1428
1544
  #
@@ -1453,9 +1569,9 @@ module Google
1453
1569
  # end
1454
1570
  #
1455
1571
  # @!attribute [rw] endpoint
1456
- # The hostname or hostname:port of the service endpoint.
1457
- # Defaults to `"firestore.googleapis.com"`.
1458
- # @return [::String]
1572
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1573
+ # nil, indicating to use the default endpoint in the current universe domain.
1574
+ # @return [::String,nil]
1459
1575
  # @!attribute [rw] credentials
1460
1576
  # Credentials to send with calls. You may provide any of the following types:
1461
1577
  # * (`String`) The path to a service account key file in JSON format
@@ -1492,13 +1608,20 @@ module Google
1492
1608
  # @!attribute [rw] quota_project
1493
1609
  # A separate project against which to charge quota.
1494
1610
  # @return [::String]
1611
+ # @!attribute [rw] universe_domain
1612
+ # The universe domain within which to make requests. This determines the
1613
+ # default endpoint URL. The default value of nil uses the environment
1614
+ # universe (usually the default "googleapis.com" universe).
1615
+ # @return [::String,nil]
1495
1616
  #
1496
1617
  class Configuration
1497
1618
  extend ::Gapic::Config
1498
1619
 
1620
+ # @private
1621
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1499
1622
  DEFAULT_ENDPOINT = "firestore.googleapis.com"
1500
1623
 
1501
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1624
+ config_attr :endpoint, nil, ::String, nil
1502
1625
  config_attr :credentials, nil do |value|
1503
1626
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1504
1627
  allowed.any? { |klass| klass === value }
@@ -1510,6 +1633,7 @@ module Google
1510
1633
  config_attr :metadata, nil, ::Hash, nil
1511
1634
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1512
1635
  config_attr :quota_project, nil, ::String, nil
1636
+ config_attr :universe_domain, nil, ::String, nil
1513
1637
 
1514
1638
  # @private
1515
1639
  def initialize parent_config = nil
@@ -1613,6 +1737,11 @@ module Google
1613
1737
  # @return [::Gapic::Config::Method]
1614
1738
  #
1615
1739
  attr_reader :update_database
1740
+ ##
1741
+ # RPC-specific configuration for `delete_database`
1742
+ # @return [::Gapic::Config::Method]
1743
+ #
1744
+ attr_reader :delete_database
1616
1745
 
1617
1746
  # @private
1618
1747
  def initialize parent_rpcs = nil
@@ -1642,6 +1771,8 @@ module Google
1642
1771
  @list_databases = ::Gapic::Config::Method.new list_databases_config
1643
1772
  update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database
1644
1773
  @update_database = ::Gapic::Config::Method.new update_database_config
1774
+ delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database
1775
+ @delete_database = ::Gapic::Config::Method.new delete_database_config
1645
1776
 
1646
1777
  yield self if block_given?
1647
1778
  end
@@ -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
+ DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$"
32
+
30
33
  # @private
31
34
  attr_reader :operations_stub
32
35
 
@@ -61,6 +64,15 @@ module Google
61
64
  @config
62
65
  end
63
66
 
67
+ ##
68
+ # The effective universe domain
69
+ #
70
+ # @return [String]
71
+ #
72
+ def universe_domain
73
+ @operations_stub.universe_domain
74
+ end
75
+
64
76
  ##
65
77
  # Create a new Operations client object.
66
78
  #
@@ -85,8 +97,10 @@ module Google
85
97
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
86
98
 
87
99
  @operations_stub = OperationsServiceStub.new(
88
- endpoint: @config.endpoint,
89
- credentials: credentials
100
+ endpoint: @config.endpoint,
101
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
102
+ universe_domain: @config.universe_domain,
103
+ credentials: credentials
90
104
  )
91
105
 
92
106
  # Used by an LRO wrapper for some methods of this service
@@ -479,9 +493,9 @@ module Google
479
493
  # end
480
494
  #
481
495
  # @!attribute [rw] endpoint
482
- # The hostname or hostname:port of the service endpoint.
483
- # Defaults to `"firestore.googleapis.com"`.
484
- # @return [::String]
496
+ # A custom service endpoint, as a hostname or hostname:port. The default is
497
+ # nil, indicating to use the default endpoint in the current universe domain.
498
+ # @return [::String,nil]
485
499
  # @!attribute [rw] credentials
486
500
  # Credentials to send with calls. You may provide any of the following types:
487
501
  # * (`String`) The path to a service account key file in JSON format
@@ -518,13 +532,20 @@ module Google
518
532
  # @!attribute [rw] quota_project
519
533
  # A separate project against which to charge quota.
520
534
  # @return [::String]
535
+ # @!attribute [rw] universe_domain
536
+ # The universe domain within which to make requests. This determines the
537
+ # default endpoint URL. The default value of nil uses the environment
538
+ # universe (usually the default "googleapis.com" universe).
539
+ # @return [::String,nil]
521
540
  #
522
541
  class Configuration
523
542
  extend ::Gapic::Config
524
543
 
544
+ # @private
545
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
525
546
  DEFAULT_ENDPOINT = "firestore.googleapis.com"
526
547
 
527
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
548
+ config_attr :endpoint, nil, ::String, nil
528
549
  config_attr :credentials, nil do |value|
529
550
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
530
551
  allowed.any? { |klass| klass === value }
@@ -536,6 +557,7 @@ module Google
536
557
  config_attr :metadata, nil, ::Hash, nil
537
558
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
538
559
  config_attr :quota_project, nil, ::String, nil
560
+ config_attr :universe_domain, nil, ::String, nil
539
561
 
540
562
  # @private
541
563
  def initialize parent_config = nil
@@ -618,12 +640,15 @@ module Google
618
640
  # Service stub contains baseline method implementations
619
641
  # including transcoding, making the REST call, and deserialing the response.
620
642
  class OperationsServiceStub
621
- def initialize endpoint:, credentials:
643
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
622
644
  # These require statements are intentionally placed here to initialize
623
645
  # the REST modules only when it's required.
624
646
  require "gapic/rest"
625
647
 
626
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
648
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
649
+ endpoint_template: endpoint_template,
650
+ universe_domain: universe_domain,
651
+ credentials: credentials
627
652
  end
628
653
 
629
654
  ##
@@ -31,16 +31,28 @@ module Google
31
31
  # including transcoding, making the REST call, and deserialing the response.
32
32
  #
33
33
  class ServiceStub
34
- def initialize endpoint:, credentials:
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
35
35
  # These require statements are intentionally placed here to initialize
36
36
  # the REST modules only when it's required.
37
37
  require "gapic/rest"
38
38
 
39
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
40
+ endpoint_template: endpoint_template,
41
+ universe_domain: universe_domain,
42
+ credentials: credentials,
40
43
  numeric_enums: true,
41
44
  raise_faraday_errors: false
42
45
  end
43
46
 
47
+ ##
48
+ # The effective universe domain
49
+ #
50
+ # @return [String]
51
+ #
52
+ def universe_domain
53
+ @client_stub.universe_domain
54
+ end
55
+
44
56
  ##
45
57
  # Baseline implementation for the create_index REST call
46
58
  #
@@ -535,6 +547,44 @@ module Google
535
547
  result
536
548
  end
537
549
 
550
+ ##
551
+ # Baseline implementation for the delete_database REST call
552
+ #
553
+ # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest]
554
+ # A request object representing the call parameters. Required.
555
+ # @param options [::Gapic::CallOptions]
556
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
557
+ #
558
+ # @yield [result, operation] Access the result along with the TransportOperation object
559
+ # @yieldparam result [::Google::Longrunning::Operation]
560
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
561
+ #
562
+ # @return [::Google::Longrunning::Operation]
563
+ # A result object deserialized from the server's reply
564
+ def delete_database request_pb, options = nil
565
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
566
+
567
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_database_request request_pb
568
+ query_string_params = if query_string_params.any?
569
+ query_string_params.to_h { |p| p.split "=", 2 }
570
+ else
571
+ {}
572
+ end
573
+
574
+ response = @client_stub.make_http_request(
575
+ verb,
576
+ uri: uri,
577
+ body: body || "",
578
+ params: query_string_params,
579
+ options: options
580
+ )
581
+ operation = ::Gapic::Rest::TransportOperation.new response
582
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
583
+
584
+ yield result, operation if block_given?
585
+ result
586
+ end
587
+
538
588
  ##
539
589
  # @private
540
590
  #
@@ -813,6 +863,27 @@ module Google
813
863
  )
814
864
  transcoder.transcode request_pb
815
865
  end
866
+
867
+ ##
868
+ # @private
869
+ #
870
+ # GRPC transcoding helper method for the delete_database REST call
871
+ #
872
+ # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest]
873
+ # A request object representing the call parameters. Required.
874
+ # @return [Array(String, [String, nil], Hash{String => String})]
875
+ # Uri, Body, Query string parameters
876
+ def self.transcode_delete_database_request request_pb
877
+ transcoder = Gapic::Rest::GrpcTranscoder.new
878
+ .with_bindings(
879
+ uri_method: :delete,
880
+ uri_template: "/v1/{name}",
881
+ matches: [
882
+ ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false]
883
+ ]
884
+ )
885
+ transcoder.transcode request_pb
886
+ end
816
887
  end
817
888
  end
818
889
  end
@@ -22,7 +22,7 @@ module Google
22
22
  module Firestore
23
23
  module Admin
24
24
  module V1
25
- VERSION = "0.12.0"
25
+ VERSION = "0.14.0"
26
26
  end
27
27
  end
28
28
  end
@@ -10,7 +10,7 @@ require 'google/protobuf/duration_pb'
10
10
  require 'google/protobuf/timestamp_pb'
11
11
 
12
12
 
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\"\xde\x08\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@\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\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: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"
14
14
 
15
15
  pool = Google::Protobuf::DescriptorPool.generated_pool
16
16
 
@@ -25,8 +25,8 @@ rescue TypeError => e
25
25
  file = pool.add_serialized_file(serialized)
26
26
  warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
27
27
  imports = [
28
- ["google.protobuf.Duration", "google/protobuf/duration.proto"],
29
28
  ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
30
30
  ]
31
31
  imports.each do |type_name, expected_filename|
32
32
  import_file = pool.lookup(type_name).file_descriptor
@@ -48,6 +48,7 @@ module Google
48
48
  Database::ConcurrencyMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.ConcurrencyMode").enummodule
49
49
  Database::PointInTimeRecoveryEnablement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement").enummodule
50
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
51
52
  end
52
53
  end
53
54
  end
@@ -18,7 +18,7 @@ require 'google/protobuf/field_mask_pb'
18
18
  require 'google/protobuf/timestamp_pb'
19
19
 
20
20
 
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\"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\"\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\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"
22
22
 
23
23
  pool = Google::Protobuf::DescriptorPool.generated_pool
24
24
 
@@ -61,6 +61,8 @@ module Google
61
61
  GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetDatabaseRequest").msgclass
62
62
  UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseRequest").msgclass
63
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
64
66
  CreateIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateIndexRequest").msgclass
65
67
  ListIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesRequest").msgclass
66
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
@@ -21,6 +21,7 @@ module Google
21
21
  module Api
22
22
  # Required information for every language.
23
23
  # @!attribute [rw] reference_docs_uri
24
+ # @deprecated This field is deprecated and may be removed in the next major version update.
24
25
  # @return [::String]
25
26
  # Link to automatically generated reference documentation. Example:
26
27
  # https://cloud.google.com/nodejs/docs/reference/asset/latest
@@ -23,12 +23,22 @@ 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
44
  # The location of the database. Available locations are listed at
@@ -78,6 +88,9 @@ module Google
78
88
  #
79
89
  # This value may be empty in which case the appid to use for URL-encoded keys
80
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.
81
94
  # @!attribute [rw] etag
82
95
  # @return [::String]
83
96
  # This checksum is computed by the server based on the value of other
@@ -164,6 +177,18 @@ module Google
164
177
  # This is the default setting for databases created with the Firestore API.
165
178
  DISABLED = 2
166
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
167
192
  end
168
193
  end
169
194
  end