google-cloud-firestore-admin-v1 0.9.0 → 0.11.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 +4 -4
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +151 -24
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb +13 -2
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb +369 -23
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb +82 -5
- data/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb +72 -12
- data/lib/google/cloud/firestore/admin/v1/version.rb +1 -1
- data/lib/google/firestore/admin/v1/database_pb.rb +24 -26
- data/lib/google/firestore/admin/v1/field_pb.rb +25 -21
- data/lib/google/firestore/admin/v1/firestore_admin_pb.rb +30 -63
- data/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +22 -13
- data/lib/google/firestore/admin/v1/index_pb.rb +24 -40
- data/lib/google/firestore/admin/v1/location_pb.rb +24 -3
- data/lib/google/firestore/admin/v1/operation_pb.rb +26 -71
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/firestore/admin/v1/firestore_admin.rb +61 -21
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- metadata +5 -5
@@ -137,6 +137,26 @@ module Google
|
|
137
137
|
# @return [::Gapic::Operation]
|
138
138
|
#
|
139
139
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
140
|
+
#
|
141
|
+
# @example Basic example
|
142
|
+
# require "google/longrunning"
|
143
|
+
#
|
144
|
+
# # Create a client object. The client can be reused for multiple calls.
|
145
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
146
|
+
#
|
147
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
148
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
149
|
+
#
|
150
|
+
# # Call the list_operations method.
|
151
|
+
# result = client.list_operations request
|
152
|
+
#
|
153
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
154
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
155
|
+
# result.each do |item|
|
156
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
157
|
+
# p item
|
158
|
+
# end
|
159
|
+
#
|
140
160
|
def list_operations request, options = nil
|
141
161
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
142
162
|
|
@@ -202,6 +222,29 @@ module Google
|
|
202
222
|
# @return [::Gapic::Operation]
|
203
223
|
#
|
204
224
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
225
|
+
#
|
226
|
+
# @example Basic example
|
227
|
+
# require "google/longrunning"
|
228
|
+
#
|
229
|
+
# # Create a client object. The client can be reused for multiple calls.
|
230
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
231
|
+
#
|
232
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
233
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
234
|
+
#
|
235
|
+
# # Call the get_operation method.
|
236
|
+
# result = client.get_operation request
|
237
|
+
#
|
238
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
239
|
+
# # check the status of an operation, cancel it, or wait for results.
|
240
|
+
# # Here is how to wait for a response.
|
241
|
+
# result.wait_until_done! timeout: 60
|
242
|
+
# if result.response?
|
243
|
+
# p result.response
|
244
|
+
# else
|
245
|
+
# puts "No response received."
|
246
|
+
# end
|
247
|
+
#
|
205
248
|
def get_operation request, options = nil
|
206
249
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
207
250
|
|
@@ -268,6 +311,22 @@ module Google
|
|
268
311
|
# @return [::Google::Protobuf::Empty]
|
269
312
|
#
|
270
313
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
314
|
+
#
|
315
|
+
# @example Basic example
|
316
|
+
# require "google/longrunning"
|
317
|
+
#
|
318
|
+
# # Create a client object. The client can be reused for multiple calls.
|
319
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
320
|
+
#
|
321
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
322
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
323
|
+
#
|
324
|
+
# # Call the delete_operation method.
|
325
|
+
# result = client.delete_operation request
|
326
|
+
#
|
327
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
328
|
+
# p result
|
329
|
+
#
|
271
330
|
def delete_operation request, options = nil
|
272
331
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
273
332
|
|
@@ -339,6 +398,22 @@ module Google
|
|
339
398
|
# @return [::Google::Protobuf::Empty]
|
340
399
|
#
|
341
400
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
401
|
+
#
|
402
|
+
# @example Basic example
|
403
|
+
# require "google/longrunning"
|
404
|
+
#
|
405
|
+
# # Create a client object. The client can be reused for multiple calls.
|
406
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
407
|
+
#
|
408
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
409
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
410
|
+
#
|
411
|
+
# # Call the cancel_operation method.
|
412
|
+
# result = client.cancel_operation request
|
413
|
+
#
|
414
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
415
|
+
# p result
|
416
|
+
#
|
342
417
|
def cancel_operation request, options = nil
|
343
418
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
344
419
|
|
@@ -447,7 +522,9 @@ module Google
|
|
447
522
|
class Configuration
|
448
523
|
extend ::Gapic::Config
|
449
524
|
|
450
|
-
|
525
|
+
DEFAULT_ENDPOINT = "firestore.googleapis.com"
|
526
|
+
|
527
|
+
config_attr :endpoint, DEFAULT_ENDPOINT, ::String
|
451
528
|
config_attr :credentials, nil do |value|
|
452
529
|
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
453
530
|
allowed.any? { |klass| klass === value }
|
@@ -568,7 +645,7 @@ module Google
|
|
568
645
|
|
569
646
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
|
570
647
|
query_string_params = if query_string_params.any?
|
571
|
-
query_string_params.to_h { |p| p.split
|
648
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
572
649
|
else
|
573
650
|
{}
|
574
651
|
end
|
@@ -606,7 +683,7 @@ module Google
|
|
606
683
|
|
607
684
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
|
608
685
|
query_string_params = if query_string_params.any?
|
609
|
-
query_string_params.to_h { |p| p.split
|
686
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
610
687
|
else
|
611
688
|
{}
|
612
689
|
end
|
@@ -644,7 +721,7 @@ module Google
|
|
644
721
|
|
645
722
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
|
646
723
|
query_string_params = if query_string_params.any?
|
647
|
-
query_string_params.to_h { |p| p.split
|
724
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
648
725
|
else
|
649
726
|
{}
|
650
727
|
end
|
@@ -682,7 +759,7 @@ module Google
|
|
682
759
|
|
683
760
|
verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
|
684
761
|
query_string_params = if query_string_params.any?
|
685
|
-
query_string_params.to_h { |p| p.split
|
762
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
686
763
|
else
|
687
764
|
{}
|
688
765
|
end
|
@@ -60,7 +60,7 @@ module Google
|
|
60
60
|
|
61
61
|
verb, uri, query_string_params, body = ServiceStub.transcode_create_index_request request_pb
|
62
62
|
query_string_params = if query_string_params.any?
|
63
|
-
query_string_params.to_h { |p| p.split
|
63
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
64
64
|
else
|
65
65
|
{}
|
66
66
|
end
|
@@ -98,7 +98,7 @@ module Google
|
|
98
98
|
|
99
99
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_indexes_request request_pb
|
100
100
|
query_string_params = if query_string_params.any?
|
101
|
-
query_string_params.to_h { |p| p.split
|
101
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
102
102
|
else
|
103
103
|
{}
|
104
104
|
end
|
@@ -136,7 +136,7 @@ module Google
|
|
136
136
|
|
137
137
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_index_request request_pb
|
138
138
|
query_string_params = if query_string_params.any?
|
139
|
-
query_string_params.to_h { |p| p.split
|
139
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
140
140
|
else
|
141
141
|
{}
|
142
142
|
end
|
@@ -174,7 +174,7 @@ module Google
|
|
174
174
|
|
175
175
|
verb, uri, query_string_params, body = ServiceStub.transcode_delete_index_request request_pb
|
176
176
|
query_string_params = if query_string_params.any?
|
177
|
-
query_string_params.to_h { |p| p.split
|
177
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
178
178
|
else
|
179
179
|
{}
|
180
180
|
end
|
@@ -212,7 +212,7 @@ module Google
|
|
212
212
|
|
213
213
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_field_request request_pb
|
214
214
|
query_string_params = if query_string_params.any?
|
215
|
-
query_string_params.to_h { |p| p.split
|
215
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
216
216
|
else
|
217
217
|
{}
|
218
218
|
end
|
@@ -250,7 +250,7 @@ module Google
|
|
250
250
|
|
251
251
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_field_request request_pb
|
252
252
|
query_string_params = if query_string_params.any?
|
253
|
-
query_string_params.to_h { |p| p.split
|
253
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
254
254
|
else
|
255
255
|
{}
|
256
256
|
end
|
@@ -288,7 +288,7 @@ module Google
|
|
288
288
|
|
289
289
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_fields_request request_pb
|
290
290
|
query_string_params = if query_string_params.any?
|
291
|
-
query_string_params.to_h { |p| p.split
|
291
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
292
292
|
else
|
293
293
|
{}
|
294
294
|
end
|
@@ -326,7 +326,7 @@ module Google
|
|
326
326
|
|
327
327
|
verb, uri, query_string_params, body = ServiceStub.transcode_export_documents_request request_pb
|
328
328
|
query_string_params = if query_string_params.any?
|
329
|
-
query_string_params.to_h { |p| p.split
|
329
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
330
330
|
else
|
331
331
|
{}
|
332
332
|
end
|
@@ -364,7 +364,45 @@ module Google
|
|
364
364
|
|
365
365
|
verb, uri, query_string_params, body = ServiceStub.transcode_import_documents_request request_pb
|
366
366
|
query_string_params = if query_string_params.any?
|
367
|
-
query_string_params.to_h { |p| p.split
|
367
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
368
|
+
else
|
369
|
+
{}
|
370
|
+
end
|
371
|
+
|
372
|
+
response = @client_stub.make_http_request(
|
373
|
+
verb,
|
374
|
+
uri: uri,
|
375
|
+
body: body || "",
|
376
|
+
params: query_string_params,
|
377
|
+
options: options
|
378
|
+
)
|
379
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
380
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
381
|
+
|
382
|
+
yield result, operation if block_given?
|
383
|
+
result
|
384
|
+
end
|
385
|
+
|
386
|
+
##
|
387
|
+
# Baseline implementation for the create_database REST call
|
388
|
+
#
|
389
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest]
|
390
|
+
# A request object representing the call parameters. Required.
|
391
|
+
# @param options [::Gapic::CallOptions]
|
392
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
393
|
+
#
|
394
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
395
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
396
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
397
|
+
#
|
398
|
+
# @return [::Google::Longrunning::Operation]
|
399
|
+
# A result object deserialized from the server's reply
|
400
|
+
def create_database request_pb, options = nil
|
401
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
402
|
+
|
403
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_database_request request_pb
|
404
|
+
query_string_params = if query_string_params.any?
|
405
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
368
406
|
else
|
369
407
|
{}
|
370
408
|
end
|
@@ -402,7 +440,7 @@ module Google
|
|
402
440
|
|
403
441
|
verb, uri, query_string_params, body = ServiceStub.transcode_get_database_request request_pb
|
404
442
|
query_string_params = if query_string_params.any?
|
405
|
-
query_string_params.to_h { |p| p.split
|
443
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
406
444
|
else
|
407
445
|
{}
|
408
446
|
end
|
@@ -440,7 +478,7 @@ module Google
|
|
440
478
|
|
441
479
|
verb, uri, query_string_params, body = ServiceStub.transcode_list_databases_request request_pb
|
442
480
|
query_string_params = if query_string_params.any?
|
443
|
-
query_string_params.to_h { |p| p.split
|
481
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
444
482
|
else
|
445
483
|
{}
|
446
484
|
end
|
@@ -478,7 +516,7 @@ module Google
|
|
478
516
|
|
479
517
|
verb, uri, query_string_params, body = ServiceStub.transcode_update_database_request request_pb
|
480
518
|
query_string_params = if query_string_params.any?
|
481
|
-
query_string_params.to_h { |p| p.split
|
519
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
482
520
|
else
|
483
521
|
{}
|
484
522
|
end
|
@@ -690,6 +728,28 @@ module Google
|
|
690
728
|
transcoder.transcode request_pb
|
691
729
|
end
|
692
730
|
|
731
|
+
##
|
732
|
+
# @private
|
733
|
+
#
|
734
|
+
# GRPC transcoding helper method for the create_database REST call
|
735
|
+
#
|
736
|
+
# @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest]
|
737
|
+
# A request object representing the call parameters. Required.
|
738
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
739
|
+
# Uri, Body, Query string parameters
|
740
|
+
def self.transcode_create_database_request request_pb
|
741
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
742
|
+
.with_bindings(
|
743
|
+
uri_method: :post,
|
744
|
+
uri_template: "/v1/{parent}/databases",
|
745
|
+
body: "database",
|
746
|
+
matches: [
|
747
|
+
["parent", %r{^projects/[^/]+/?$}, false]
|
748
|
+
]
|
749
|
+
)
|
750
|
+
transcoder.transcode request_pb
|
751
|
+
end
|
752
|
+
|
693
753
|
##
|
694
754
|
# @private
|
695
755
|
#
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/firestore/admin/v1/database.proto
|
3
4
|
|
@@ -6,34 +7,31 @@ require 'google/protobuf'
|
|
6
7
|
require 'google/api/field_behavior_pb'
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
31
|
-
add_enum "google.firestore.admin.v1.Database.AppEngineIntegrationMode" do
|
32
|
-
value :APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED, 0
|
33
|
-
value :ENABLED, 1
|
34
|
-
value :DISABLED, 2
|
10
|
+
|
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"
|
12
|
+
|
13
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
14
|
+
|
15
|
+
begin
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
17
|
+
rescue TypeError => e
|
18
|
+
# Compatibility code: will be removed in the next major version.
|
19
|
+
require 'google/protobuf/descriptor_pb'
|
20
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
21
|
+
parsed.clear_dependency
|
22
|
+
serialized = parsed.class.encode(parsed)
|
23
|
+
file = pool.add_serialized_file(serialized)
|
24
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
25
|
+
imports = [
|
26
|
+
]
|
27
|
+
imports.each do |type_name, expected_filename|
|
28
|
+
import_file = pool.lookup(type_name).file_descriptor
|
29
|
+
if import_file.name != expected_filename
|
30
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
35
31
|
end
|
36
32
|
end
|
33
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
34
|
+
warn "This will become an error in the next major version."
|
37
35
|
end
|
38
36
|
|
39
37
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/firestore/admin/v1/field.proto
|
3
4
|
|
@@ -7,29 +8,32 @@ require 'google/api/field_behavior_pb'
|
|
7
8
|
require 'google/api/resource_pb'
|
8
9
|
require 'google/firestore/admin/v1/index_pb'
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
11
|
+
|
12
|
+
descriptor_data = "\n%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/firestore/admin/v1/index.proto\"\xc5\x04\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x0cindex_config\x18\x02 \x01(\x0b\x32,.google.firestore.admin.v1.Field.IndexConfig\x12>\n\nttl_config\x18\x03 \x01(\x0b\x32*.google.firestore.admin.v1.Field.TtlConfig\x1a\x89\x01\n\x0bIndexConfig\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x1c\n\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\n\x0e\x61ncestor_field\x18\x03 \x01(\t\x12\x11\n\treverting\x18\x04 \x01(\x08\x1a\x9d\x01\n\tTtlConfig\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x30.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xe0\x41\x03\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0cNEEDS_REPAIR\x10\x03:y\xea\x41v\n\x1e\x66irestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xd9\x01\n\x1d\x63om.google.firestore.admin.v1B\nFieldProtoP\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
|
+
|
14
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
15
|
+
|
16
|
+
begin
|
17
|
+
pool.add_serialized_file(descriptor_data)
|
18
|
+
rescue TypeError => e
|
19
|
+
# Compatibility code: will be removed in the next major version.
|
20
|
+
require 'google/protobuf/descriptor_pb'
|
21
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
22
|
+
parsed.clear_dependency
|
23
|
+
serialized = parsed.class.encode(parsed)
|
24
|
+
file = pool.add_serialized_file(serialized)
|
25
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
26
|
+
imports = [
|
27
|
+
["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"],
|
28
|
+
]
|
29
|
+
imports.each do |type_name, expected_filename|
|
30
|
+
import_file = pool.lookup(type_name).file_descriptor
|
31
|
+
if import_file.name != expected_filename
|
32
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
31
33
|
end
|
32
34
|
end
|
35
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
36
|
+
warn "This will become an error in the next major version."
|
33
37
|
end
|
34
38
|
|
35
39
|
module Google
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
3
|
# source: google/firestore/admin/v1/firestore_admin.proto
|
3
4
|
|
@@ -14,71 +15,35 @@ require 'google/longrunning/operations_pb'
|
|
14
15
|
require 'google/protobuf/empty_pb'
|
15
16
|
require 'google/protobuf/field_mask_pb'
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
optional :page_token, :string, 4
|
43
|
-
end
|
44
|
-
add_message "google.firestore.admin.v1.ListIndexesResponse" do
|
45
|
-
repeated :indexes, :message, 1, "google.firestore.admin.v1.Index"
|
46
|
-
optional :next_page_token, :string, 2
|
47
|
-
end
|
48
|
-
add_message "google.firestore.admin.v1.GetIndexRequest" do
|
49
|
-
optional :name, :string, 1
|
50
|
-
end
|
51
|
-
add_message "google.firestore.admin.v1.DeleteIndexRequest" do
|
52
|
-
optional :name, :string, 1
|
53
|
-
end
|
54
|
-
add_message "google.firestore.admin.v1.UpdateFieldRequest" do
|
55
|
-
optional :field, :message, 1, "google.firestore.admin.v1.Field"
|
56
|
-
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
57
|
-
end
|
58
|
-
add_message "google.firestore.admin.v1.GetFieldRequest" do
|
59
|
-
optional :name, :string, 1
|
60
|
-
end
|
61
|
-
add_message "google.firestore.admin.v1.ListFieldsRequest" do
|
62
|
-
optional :parent, :string, 1
|
63
|
-
optional :filter, :string, 2
|
64
|
-
optional :page_size, :int32, 3
|
65
|
-
optional :page_token, :string, 4
|
66
|
-
end
|
67
|
-
add_message "google.firestore.admin.v1.ListFieldsResponse" do
|
68
|
-
repeated :fields, :message, 1, "google.firestore.admin.v1.Field"
|
69
|
-
optional :next_page_token, :string, 2
|
70
|
-
end
|
71
|
-
add_message "google.firestore.admin.v1.ExportDocumentsRequest" do
|
72
|
-
optional :name, :string, 1
|
73
|
-
repeated :collection_ids, :string, 2
|
74
|
-
optional :output_uri_prefix, :string, 3
|
75
|
-
end
|
76
|
-
add_message "google.firestore.admin.v1.ImportDocumentsRequest" do
|
77
|
-
optional :name, :string, 1
|
78
|
-
repeated :collection_ids, :string, 2
|
79
|
-
optional :input_uri_prefix, :string, 3
|
18
|
+
|
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"
|
20
|
+
|
21
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
22
|
+
|
23
|
+
begin
|
24
|
+
pool.add_serialized_file(descriptor_data)
|
25
|
+
rescue TypeError => e
|
26
|
+
# Compatibility code: will be removed in the next major version.
|
27
|
+
require 'google/protobuf/descriptor_pb'
|
28
|
+
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
29
|
+
parsed.clear_dependency
|
30
|
+
serialized = parsed.class.encode(parsed)
|
31
|
+
file = pool.add_serialized_file(serialized)
|
32
|
+
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
33
|
+
imports = [
|
34
|
+
["google.firestore.admin.v1.Database", "google/firestore/admin/v1/database.proto"],
|
35
|
+
["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"],
|
36
|
+
["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"],
|
37
|
+
["google.firestore.admin.v1.Field", "google/firestore/admin/v1/field.proto"],
|
38
|
+
]
|
39
|
+
imports.each do |type_name, expected_filename|
|
40
|
+
import_file = pool.lookup(type_name).file_descriptor
|
41
|
+
if import_file.name != expected_filename
|
42
|
+
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
80
43
|
end
|
81
44
|
end
|
45
|
+
warn "Each proto file must use a consistent fully-qualified name."
|
46
|
+
warn "This will become an error in the next major version."
|
82
47
|
end
|
83
48
|
|
84
49
|
module Google
|
@@ -87,6 +52,8 @@ module Google
|
|
87
52
|
module Admin
|
88
53
|
module V1
|
89
54
|
ListDatabasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesRequest").msgclass
|
55
|
+
CreateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateDatabaseRequest").msgclass
|
56
|
+
CreateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateDatabaseMetadata").msgclass
|
90
57
|
ListDatabasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesResponse").msgclass
|
91
58
|
GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetDatabaseRequest").msgclass
|
92
59
|
UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseRequest").msgclass
|