google-cloud-firestore-admin-v1 0.3.4 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -144,6 +144,27 @@ module Google
144
144
  #
145
145
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
146
146
  #
147
+ # @example Basic example
148
+ # require "google/longrunning"
149
+ #
150
+ # # Create a client object. The client can be reused for multiple calls.
151
+ # client = Google::Longrunning::Operations::Client.new
152
+ #
153
+ # # Create a request. To set request fields, pass in keyword arguments.
154
+ # request = Google::Longrunning::ListOperationsRequest.new
155
+ #
156
+ # # Call the list_operations method.
157
+ # result = client.list_operations request
158
+ #
159
+ # # The returned object is of type Gapic::PagedEnumerable. You can
160
+ # # iterate over all elements by calling #each, and the enumerable
161
+ # # will lazily make API calls to fetch subsequent pages. Other
162
+ # # methods are also available for managing paging directly.
163
+ # result.each do |response|
164
+ # # Each element is of type ::Google::Longrunning::Operation.
165
+ # p response
166
+ # end
167
+ #
147
168
  def list_operations request, options = nil
148
169
  raise ::ArgumentError, "request must be provided" if request.nil?
149
170
 
@@ -161,9 +182,11 @@ module Google
161
182
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
162
183
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
163
184
 
164
- header_params = {
165
- "name" => request.name
166
- }
185
+ header_params = {}
186
+ if request.name
187
+ header_params["name"] = request.name
188
+ end
189
+
167
190
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
168
191
  metadata[:"x-goog-request-params"] ||= request_params_header
169
192
 
@@ -216,6 +239,28 @@ module Google
216
239
  #
217
240
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
218
241
  #
242
+ # @example Basic example
243
+ # require "google/longrunning"
244
+ #
245
+ # # Create a client object. The client can be reused for multiple calls.
246
+ # client = Google::Longrunning::Operations::Client.new
247
+ #
248
+ # # Create a request. To set request fields, pass in keyword arguments.
249
+ # request = Google::Longrunning::GetOperationRequest.new
250
+ #
251
+ # # Call the get_operation method.
252
+ # result = client.get_operation request
253
+ #
254
+ # # The returned object is of type Gapic::Operation. You can use this
255
+ # # object to check the status of an operation, cancel it, or wait
256
+ # # for results. Here is how to block until completion:
257
+ # result.wait_until_done! timeout: 60
258
+ # if result.response?
259
+ # p result.response
260
+ # else
261
+ # puts "Error!"
262
+ # end
263
+ #
219
264
  def get_operation request, options = nil
220
265
  raise ::ArgumentError, "request must be provided" if request.nil?
221
266
 
@@ -233,9 +278,11 @@ module Google
233
278
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
234
279
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
235
280
 
236
- header_params = {
237
- "name" => request.name
238
- }
281
+ header_params = {}
282
+ if request.name
283
+ header_params["name"] = request.name
284
+ end
285
+
239
286
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
240
287
  metadata[:"x-goog-request-params"] ||= request_params_header
241
288
 
@@ -288,6 +335,21 @@ module Google
288
335
  #
289
336
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
290
337
  #
338
+ # @example Basic example
339
+ # require "google/longrunning"
340
+ #
341
+ # # Create a client object. The client can be reused for multiple calls.
342
+ # client = Google::Longrunning::Operations::Client.new
343
+ #
344
+ # # Create a request. To set request fields, pass in keyword arguments.
345
+ # request = Google::Longrunning::DeleteOperationRequest.new
346
+ #
347
+ # # Call the delete_operation method.
348
+ # result = client.delete_operation request
349
+ #
350
+ # # The returned object is of type Google::Protobuf::Empty.
351
+ # p result
352
+ #
291
353
  def delete_operation request, options = nil
292
354
  raise ::ArgumentError, "request must be provided" if request.nil?
293
355
 
@@ -305,9 +367,11 @@ module Google
305
367
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
306
368
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
307
369
 
308
- header_params = {
309
- "name" => request.name
310
- }
370
+ header_params = {}
371
+ if request.name
372
+ header_params["name"] = request.name
373
+ end
374
+
311
375
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
312
376
  metadata[:"x-goog-request-params"] ||= request_params_header
313
377
 
@@ -365,6 +429,21 @@ module Google
365
429
  #
366
430
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
367
431
  #
432
+ # @example Basic example
433
+ # require "google/longrunning"
434
+ #
435
+ # # Create a client object. The client can be reused for multiple calls.
436
+ # client = Google::Longrunning::Operations::Client.new
437
+ #
438
+ # # Create a request. To set request fields, pass in keyword arguments.
439
+ # request = Google::Longrunning::CancelOperationRequest.new
440
+ #
441
+ # # Call the cancel_operation method.
442
+ # result = client.cancel_operation request
443
+ #
444
+ # # The returned object is of type Google::Protobuf::Empty.
445
+ # p result
446
+ #
368
447
  def cancel_operation request, options = nil
369
448
  raise ::ArgumentError, "request must be provided" if request.nil?
370
449
 
@@ -382,9 +461,11 @@ module Google
382
461
  gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION
383
462
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
384
463
 
385
- header_params = {
386
- "name" => request.name
387
- }
464
+ header_params = {}
465
+ if request.name
466
+ header_params["name"] = request.name
467
+ end
468
+
388
469
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
389
470
  metadata[:"x-goog-request-params"] ||= request_params_header
390
471
 
@@ -445,6 +526,28 @@ module Google
445
526
  #
446
527
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
447
528
  #
529
+ # @example Basic example
530
+ # require "google/longrunning"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Longrunning::Operations::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Longrunning::WaitOperationRequest.new
537
+ #
538
+ # # Call the wait_operation method.
539
+ # result = client.wait_operation request
540
+ #
541
+ # # The returned object is of type Gapic::Operation. You can use this
542
+ # # object to check the status of an operation, cancel it, or wait
543
+ # # for results. Here is how to block until completion:
544
+ # result.wait_until_done! timeout: 60
545
+ # if result.response?
546
+ # p result.response
547
+ # else
548
+ # puts "Error!"
549
+ # end
550
+ #
448
551
  def wait_operation request, options = nil
449
552
  raise ::ArgumentError, "request must be provided" if request.nil?
450
553
 
@@ -103,6 +103,20 @@ module Google
103
103
  "projects/#{project}/databases/#{database}/collectionGroups/#{collection}/indexes/#{index}"
104
104
  end
105
105
 
106
+ ##
107
+ # Create a fully-qualified Project resource string.
108
+ #
109
+ # The resource will be in the following format:
110
+ #
111
+ # `projects/{project}`
112
+ #
113
+ # @param project [String]
114
+ #
115
+ # @return [::String]
116
+ def project_path project:
117
+ "projects/#{project}"
118
+ end
119
+
106
120
  extend self
107
121
  end
108
122
  end
@@ -33,6 +33,32 @@ module Google
33
33
  module Admin
34
34
  module V1
35
35
  ##
36
+ # The Cloud Firestore Admin API.
37
+ #
38
+ # This API provides several administrative services for Cloud Firestore.
39
+ #
40
+ # Project, Database, Namespace, Collection, Collection Group, and Document are
41
+ # used as defined in the Google Cloud Firestore API.
42
+ #
43
+ # Operation: An Operation represents work being performed in the background.
44
+ #
45
+ # The index service manages Cloud Firestore indexes.
46
+ #
47
+ # Index creation is performed asynchronously.
48
+ # An Operation resource is created for each such asynchronous operation.
49
+ # The state of the operation (including any errors encountered)
50
+ # may be queried via the Operation resource.
51
+ #
52
+ # The Operations collection provides a record of actions performed for the
53
+ # specified Project (including any Operations in progress). Operations are not
54
+ # created directly but through calls on other collections or resources.
55
+ #
56
+ # An Operation that is done may be deleted so that it is no longer listed as
57
+ # part of the Operation collection. Operations are garbage collected after
58
+ # 30 days. By default, ListOperations will only return in progress and failed
59
+ # operations. To list completed operation, issue a ListOperations request with
60
+ # the filter `done: true`.
61
+ #
36
62
  # Operations are created by service `FirestoreAdmin`, but are accessed via
37
63
  # service `google.longrunning.Operations`.
38
64
  #
@@ -22,7 +22,7 @@ module Google
22
22
  module Firestore
23
23
  module Admin
24
24
  module V1
25
- VERSION = "0.3.4"
25
+ VERSION = "0.5.0"
26
26
  end
27
27
  end
28
28
  end
@@ -26,6 +26,8 @@ module Google
26
26
  ##
27
27
  # To load this package, including all its services, and instantiate a client:
28
28
  #
29
+ # @example
30
+ #
29
31
  # require "google/cloud/firestore/admin/v1"
30
32
  # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new
31
33
  #
@@ -0,0 +1,52 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/firestore/admin/v1/database.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/field_behavior_pb'
7
+ require 'google/api/resource_pb'
8
+
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("google/firestore/admin/v1/database.proto", :syntax => :proto3) do
11
+ add_message "google.firestore.admin.v1.Database" do
12
+ optional :name, :string, 1
13
+ optional :location_id, :string, 9
14
+ optional :type, :enum, 10, "google.firestore.admin.v1.Database.DatabaseType"
15
+ optional :concurrency_mode, :enum, 15, "google.firestore.admin.v1.Database.ConcurrencyMode"
16
+ optional :app_engine_integration_mode, :enum, 19, "google.firestore.admin.v1.Database.AppEngineIntegrationMode"
17
+ optional :key_prefix, :string, 20
18
+ optional :etag, :string, 99
19
+ end
20
+ add_enum "google.firestore.admin.v1.Database.DatabaseType" do
21
+ value :DATABASE_TYPE_UNSPECIFIED, 0
22
+ value :FIRESTORE_NATIVE, 1
23
+ value :DATASTORE_MODE, 2
24
+ end
25
+ add_enum "google.firestore.admin.v1.Database.ConcurrencyMode" do
26
+ value :CONCURRENCY_MODE_UNSPECIFIED, 0
27
+ value :OPTIMISTIC, 1
28
+ value :PESSIMISTIC, 2
29
+ value :OPTIMISTIC_WITH_ENTITY_GROUPS, 3
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
35
+ end
36
+ end
37
+ end
38
+
39
+ module Google
40
+ module Cloud
41
+ module Firestore
42
+ module Admin
43
+ module V1
44
+ Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database").msgclass
45
+ Database::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DatabaseType").enummodule
46
+ Database::ConcurrencyMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.ConcurrencyMode").enummodule
47
+ Database::AppEngineIntegrationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.AppEngineIntegrationMode").enummodule
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -3,14 +3,16 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
+ require 'google/api/field_behavior_pb'
6
7
  require 'google/api/resource_pb'
7
8
  require 'google/firestore/admin/v1/index_pb'
8
- require 'google/api/annotations_pb'
9
+
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/firestore/admin/v1/field.proto", :syntax => :proto3) do
11
12
  add_message "google.firestore.admin.v1.Field" do
12
13
  optional :name, :string, 1
13
14
  optional :index_config, :message, 2, "google.firestore.admin.v1.Field.IndexConfig"
15
+ optional :ttl_config, :message, 3, "google.firestore.admin.v1.Field.TtlConfig"
14
16
  end
15
17
  add_message "google.firestore.admin.v1.Field.IndexConfig" do
16
18
  repeated :indexes, :message, 1, "google.firestore.admin.v1.Index"
@@ -18,6 +20,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
18
20
  optional :ancestor_field, :string, 3
19
21
  optional :reverting, :bool, 4
20
22
  end
23
+ add_message "google.firestore.admin.v1.Field.TtlConfig" do
24
+ optional :state, :enum, 1, "google.firestore.admin.v1.Field.TtlConfig.State"
25
+ end
26
+ add_enum "google.firestore.admin.v1.Field.TtlConfig.State" do
27
+ value :STATE_UNSPECIFIED, 0
28
+ value :CREATING, 1
29
+ value :ACTIVE, 2
30
+ value :NEEDS_REPAIR, 3
31
+ end
21
32
  end
22
33
  end
23
34
 
@@ -28,6 +39,8 @@ module Google
28
39
  module V1
29
40
  Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field").msgclass
30
41
  Field::IndexConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.IndexConfig").msgclass
42
+ Field::TtlConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.TtlConfig").msgclass
43
+ Field::TtlConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.TtlConfig.State").enummodule
31
44
  end
32
45
  end
33
46
  end
@@ -7,13 +7,30 @@ require 'google/api/annotations_pb'
7
7
  require 'google/api/client_pb'
8
8
  require 'google/api/field_behavior_pb'
9
9
  require 'google/api/resource_pb'
10
+ require 'google/firestore/admin/v1/database_pb'
10
11
  require 'google/firestore/admin/v1/field_pb'
11
12
  require 'google/firestore/admin/v1/index_pb'
12
13
  require 'google/longrunning/operations_pb'
13
14
  require 'google/protobuf/empty_pb'
14
15
  require 'google/protobuf/field_mask_pb'
16
+
15
17
  Google::Protobuf::DescriptorPool.generated_pool.build do
16
18
  add_file("google/firestore/admin/v1/firestore_admin.proto", :syntax => :proto3) do
19
+ add_message "google.firestore.admin.v1.ListDatabasesRequest" do
20
+ optional :parent, :string, 1
21
+ end
22
+ add_message "google.firestore.admin.v1.ListDatabasesResponse" do
23
+ repeated :databases, :message, 1, "google.firestore.admin.v1.Database"
24
+ end
25
+ add_message "google.firestore.admin.v1.GetDatabaseRequest" do
26
+ optional :name, :string, 1
27
+ end
28
+ add_message "google.firestore.admin.v1.UpdateDatabaseRequest" do
29
+ optional :database, :message, 1, "google.firestore.admin.v1.Database"
30
+ optional :update_mask, :message, 2, "google.protobuf.FieldMask"
31
+ end
32
+ add_message "google.firestore.admin.v1.UpdateDatabaseMetadata" do
33
+ end
17
34
  add_message "google.firestore.admin.v1.CreateIndexRequest" do
18
35
  optional :parent, :string, 1
19
36
  optional :index, :message, 2, "google.firestore.admin.v1.Index"
@@ -69,6 +86,11 @@ module Google
69
86
  module Firestore
70
87
  module Admin
71
88
  module V1
89
+ ListDatabasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesRequest").msgclass
90
+ ListDatabasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesResponse").msgclass
91
+ GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetDatabaseRequest").msgclass
92
+ UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseRequest").msgclass
93
+ UpdateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseMetadata").msgclass
72
94
  CreateIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateIndexRequest").msgclass
73
95
  ListIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesRequest").msgclass
74
96
  ListIndexesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesResponse").msgclass
@@ -1,7 +1,7 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # Source: google/firestore/admin/v1/firestore_admin.proto for package 'Google.Cloud.Firestore.Admin.V1'
3
3
  # Original file comments:
4
- # Copyright 2019 Google LLC.
4
+ # Copyright 2021 Google LLC
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
7
7
  # you may not use this file except in compliance with the License.
@@ -15,7 +15,6 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
  #
18
- #
19
18
 
20
19
  require 'grpc'
21
20
  require 'google/firestore/admin/v1/firestore_admin_pb'
@@ -26,11 +25,37 @@ module Google
26
25
  module Admin
27
26
  module V1
28
27
  module FirestoreAdmin
28
+ # The Cloud Firestore Admin API.
29
+ #
30
+ # This API provides several administrative services for Cloud Firestore.
31
+ #
32
+ # Project, Database, Namespace, Collection, Collection Group, and Document are
33
+ # used as defined in the Google Cloud Firestore API.
34
+ #
35
+ # Operation: An Operation represents work being performed in the background.
36
+ #
37
+ # The index service manages Cloud Firestore indexes.
38
+ #
39
+ # Index creation is performed asynchronously.
40
+ # An Operation resource is created for each such asynchronous operation.
41
+ # The state of the operation (including any errors encountered)
42
+ # may be queried via the Operation resource.
43
+ #
44
+ # The Operations collection provides a record of actions performed for the
45
+ # specified Project (including any Operations in progress). Operations are not
46
+ # created directly but through calls on other collections or resources.
47
+ #
48
+ # An Operation that is done may be deleted so that it is no longer listed as
49
+ # part of the Operation collection. Operations are garbage collected after
50
+ # 30 days. By default, ListOperations will only return in progress and failed
51
+ # operations. To list completed operation, issue a ListOperations request with
52
+ # the filter `done: true`.
53
+ #
29
54
  # Operations are created by service `FirestoreAdmin`, but are accessed via
30
55
  # service `google.longrunning.Operations`.
31
56
  class Service
32
57
 
33
- include GRPC::GenericService
58
+ include ::GRPC::GenericService
34
59
 
35
60
  self.marshal_class_method = :encode
36
61
  self.unmarshal_class_method = :decode
@@ -67,7 +92,7 @@ module Google
67
92
  # Currently, [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] only supports listing fields
68
93
  # that have been explicitly overridden. To issue this query, call
69
94
  # [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] with the filter set to
70
- # `indexConfig.usesAncestorConfig:false`.
95
+ # `indexConfig.usesAncestorConfig:false` .
71
96
  rpc :ListFields, ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse
72
97
  # Exports a copy of all or a subset of documents from Google Cloud Firestore
73
98
  # to another storage system, such as Google Cloud Storage. Recent updates to
@@ -77,6 +102,9 @@ module Google
77
102
  # used once the associated operation is done. If an export operation is
78
103
  # cancelled before completion it may leave partial data behind in Google
79
104
  # Cloud Storage.
105
+ #
106
+ # For more details on export behavior and output format, refer to:
107
+ # https://cloud.google.com/firestore/docs/manage-data/export-import
80
108
  rpc :ExportDocuments, ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Google::Longrunning::Operation
81
109
  # Imports documents into Google Cloud Firestore. Existing documents with the
82
110
  # same name are overwritten. The import occurs in the background and its
@@ -84,6 +112,12 @@ module Google
84
112
  # created. If an ImportDocuments operation is cancelled, it is possible
85
113
  # that a subset of the data has already been imported to Cloud Firestore.
86
114
  rpc :ImportDocuments, ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Google::Longrunning::Operation
115
+ # Gets information about a database.
116
+ rpc :GetDatabase, ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Google::Cloud::Firestore::Admin::V1::Database
117
+ # List all the databases in the project.
118
+ rpc :ListDatabases, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse
119
+ # Updates a database.
120
+ rpc :UpdateDatabase, ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Google::Longrunning::Operation
87
121
  end
88
122
 
89
123
  Stub = Service.rpc_stub_class
@@ -4,7 +4,7 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  require 'google/api/resource_pb'
7
- require 'google/api/annotations_pb'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/firestore/admin/v1/index.proto", :syntax => :proto3) do
10
10
  add_message "google.firestore.admin.v1.Index" do
@@ -3,8 +3,6 @@
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require 'google/type/latlng_pb'
7
- require 'google/api/annotations_pb'
8
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
7
  add_file("google/firestore/admin/v1/location.proto", :syntax => :proto3) do
10
8
  add_message "google.firestore.admin.v1.LocationMetadata" do
@@ -5,7 +5,7 @@ require 'google/protobuf'
5
5
 
6
6
  require 'google/firestore/admin/v1/index_pb'
7
7
  require 'google/protobuf/timestamp_pb'
8
- require 'google/api/annotations_pb'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/firestore/admin/v1/operation.proto", :syntax => :proto3) do
11
11
  add_message "google.firestore.admin.v1.IndexOperationMetadata" do
@@ -24,6 +24,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
24
24
  optional :state, :enum, 5, "google.firestore.admin.v1.OperationState"
25
25
  optional :progress_documents, :message, 6, "google.firestore.admin.v1.Progress"
26
26
  optional :progress_bytes, :message, 7, "google.firestore.admin.v1.Progress"
27
+ optional :ttl_config_delta, :message, 8, "google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta"
27
28
  end
28
29
  add_message "google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta" do
29
30
  optional :change_type, :enum, 1, "google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType"
@@ -34,6 +35,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
34
35
  value :ADD, 1
35
36
  value :REMOVE, 2
36
37
  end
38
+ add_message "google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta" do
39
+ optional :change_type, :enum, 1, "google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType"
40
+ end
41
+ add_enum "google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType" do
42
+ value :CHANGE_TYPE_UNSPECIFIED, 0
43
+ value :ADD, 1
44
+ value :REMOVE, 2
45
+ end
37
46
  add_message "google.firestore.admin.v1.ExportDocumentsMetadata" do
38
47
  optional :start_time, :message, 1, "google.protobuf.Timestamp"
39
48
  optional :end_time, :message, 2, "google.protobuf.Timestamp"
@@ -81,6 +90,8 @@ module Google
81
90
  FieldOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata").msgclass
82
91
  FieldOperationMetadata::IndexConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta").msgclass
83
92
  FieldOperationMetadata::IndexConfigDelta::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType").enummodule
93
+ FieldOperationMetadata::TtlConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta").msgclass
94
+ FieldOperationMetadata::TtlConfigDelta::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType").enummodule
84
95
  ExportDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsMetadata").msgclass
85
96
  ImportDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ImportDocumentsMetadata").msgclass
86
97
  ExportDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsResponse").msgclass
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of