google-cloud-datastore-admin-v1 0.4.2 → 0.5.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/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +3 -3
- data/lib/google/cloud/datastore/admin/v1/datastore_admin/client.rb +208 -62
- data/lib/google/cloud/datastore/admin/v1/datastore_admin/operations.rb +145 -33
- data/lib/google/cloud/datastore/admin/v1/version.rb +1 -1
- data/lib/google/datastore/admin/v1/datastore_admin_pb.rb +8 -2
- data/lib/google/datastore/admin/v1/datastore_admin_services_pb.rb +2 -2
- data/lib/google/datastore/admin/v1/index_pb.rb +2 -2
- data/lib/google/datastore/admin/v1/migration_pb.rb +65 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/datastore/admin/v1/datastore_admin.rb +21 -0
- data/proto_docs/google/datastore/admin/v1/migration.rb +133 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ca6046c780883224fe1f4ed29bc1edfbf7182502322a7e708b0dcdecb752d87
|
4
|
+
data.tar.gz: 7c6d51c70eef7acdf489f206bca97213d6a8f003d4e9a12b39e0b8da45b223f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49db6a1584b623fb5baa755bec8abb6607bc884f061e08a1dab40d342a8d04df867114fea30814ad6ae6a3a86c11ca4a5388ba1a1bee719a2b64223772c0f4c4
|
7
|
+
data.tar.gz: 4bdefb78cf08b84c514d51c0afc239a40a94eee74555780451b3be1077e022ff3093c03466583fef72384e93163df5d3411bdf6d9976c14a08d7345b32938b6b
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ https://github.com/googleapis/google-cloud-ruby
|
|
9
9
|
This gem is a _versioned_ client. It provides basic client classes for a
|
10
10
|
specific version of the Firestore in Datastore mode Admin V1 API. Most users should consider using
|
11
11
|
the main client gem,
|
12
|
-
[google-cloud-datastore
|
12
|
+
[google-cloud-datastore](https://rubygems.org/gems/google-cloud-datastore).
|
13
13
|
See the section below titled *Which client should I use?* for more information.
|
14
14
|
|
15
15
|
## Installation
|
@@ -83,7 +83,7 @@ about the Ruby support schedule.
|
|
83
83
|
## Which client should I use?
|
84
84
|
|
85
85
|
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
86
|
-
client library with a name such as `google-cloud-datastore
|
86
|
+
client library with a name such as `google-cloud-datastore`,
|
87
87
|
and lower-level _versioned_ client libraries with names such as
|
88
88
|
`google-cloud-datastore-admin-v1`.
|
89
89
|
_In most cases, you should install the main client._
|
@@ -110,7 +110,7 @@ service version.
|
|
110
110
|
|
111
111
|
We recommend that most users install the main client gem for a service. You can
|
112
112
|
identify this gem as the one _without_ a version in its name, e.g.
|
113
|
-
`google-cloud-datastore
|
113
|
+
`google-cloud-datastore`.
|
114
114
|
The main client is recommended because it will embody the best practices for
|
115
115
|
accessing the service, and may also provide more convenient interfaces or
|
116
116
|
tighter integration into frameworks and third-party libraries. In addition, the
|
@@ -100,13 +100,12 @@ module Google
|
|
100
100
|
# See {::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client::Configuration}
|
101
101
|
# for a description of the configuration fields.
|
102
102
|
#
|
103
|
-
#
|
103
|
+
# @example
|
104
104
|
#
|
105
|
-
#
|
106
|
-
#
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# end
|
105
|
+
# # Modify the configuration for all DatastoreAdmin clients
|
106
|
+
# ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.configure do |config|
|
107
|
+
# config.timeout = 10.0
|
108
|
+
# end
|
110
109
|
#
|
111
110
|
# @yield [config] Configure the Client client.
|
112
111
|
# @yieldparam config [Client::Configuration]
|
@@ -171,19 +170,15 @@ module Google
|
|
171
170
|
##
|
172
171
|
# Create a new DatastoreAdmin client object.
|
173
172
|
#
|
174
|
-
#
|
175
|
-
#
|
176
|
-
# To create a new DatastoreAdmin client with the default
|
177
|
-
# configuration:
|
173
|
+
# @example
|
178
174
|
#
|
179
|
-
#
|
175
|
+
# # Create a client using the default configuration
|
176
|
+
# client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
|
180
177
|
#
|
181
|
-
#
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
# config.timeout = 10.0
|
186
|
-
# end
|
178
|
+
# # Create a client using a custom configuration
|
179
|
+
# client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new do |config|
|
180
|
+
# config.timeout = 10.0
|
181
|
+
# end
|
187
182
|
#
|
188
183
|
# @yield [config] Configure the DatastoreAdmin client.
|
189
184
|
# @yieldparam config [Client::Configuration]
|
@@ -203,10 +198,9 @@ module Google
|
|
203
198
|
|
204
199
|
# Create credentials
|
205
200
|
credentials = @config.credentials
|
206
|
-
# Use self-signed JWT if the
|
201
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
207
202
|
# but only if the default endpoint does not have a region prefix.
|
208
|
-
enable_self_signed_jwt = @config.
|
209
|
-
@config.endpoint == Client.configure.endpoint &&
|
203
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
210
204
|
!@config.endpoint.split(".").first.include?("-")
|
211
205
|
credentials ||= Credentials.default scope: @config.scope,
|
212
206
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -218,6 +212,7 @@ module Google
|
|
218
212
|
|
219
213
|
@operations_client = Operations.new do |config|
|
220
214
|
config.credentials = credentials
|
215
|
+
config.quota_project = @quota_project_id
|
221
216
|
config.endpoint = @config.endpoint
|
222
217
|
end
|
223
218
|
|
@@ -298,6 +293,28 @@ module Google
|
|
298
293
|
#
|
299
294
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
300
295
|
#
|
296
|
+
# @example Basic example
|
297
|
+
# require "google/cloud/datastore/admin/v1"
|
298
|
+
#
|
299
|
+
# # Create a client object. The client can be reused for multiple calls.
|
300
|
+
# client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
|
301
|
+
#
|
302
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
303
|
+
# request = Google::Cloud::Datastore::Admin::V1::ExportEntitiesRequest.new
|
304
|
+
#
|
305
|
+
# # Call the export_entities method.
|
306
|
+
# result = client.export_entities request
|
307
|
+
#
|
308
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
309
|
+
# # object to check the status of an operation, cancel it, or wait
|
310
|
+
# # for results. Here is how to block until completion:
|
311
|
+
# result.wait_until_done! timeout: 60
|
312
|
+
# if result.response?
|
313
|
+
# p result.response
|
314
|
+
# else
|
315
|
+
# puts "Error!"
|
316
|
+
# end
|
317
|
+
#
|
301
318
|
def export_entities request, options = nil
|
302
319
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
303
320
|
|
@@ -315,16 +332,20 @@ module Google
|
|
315
332
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
316
333
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
317
334
|
|
318
|
-
header_params = {
|
319
|
-
|
320
|
-
|
335
|
+
header_params = {}
|
336
|
+
if request.project_id
|
337
|
+
header_params["project_id"] = request.project_id
|
338
|
+
end
|
339
|
+
|
321
340
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
322
341
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
323
342
|
|
324
343
|
options.apply_defaults timeout: @config.rpcs.export_entities.timeout,
|
325
344
|
metadata: metadata,
|
326
345
|
retry_policy: @config.rpcs.export_entities.retry_policy
|
327
|
-
|
346
|
+
|
347
|
+
options.apply_defaults timeout: @config.timeout,
|
348
|
+
metadata: @config.metadata,
|
328
349
|
retry_policy: @config.retry_policy
|
329
350
|
|
330
351
|
@datastore_admin_stub.call_rpc :export_entities, request, options: options do |response, operation|
|
@@ -390,6 +411,28 @@ module Google
|
|
390
411
|
#
|
391
412
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
392
413
|
#
|
414
|
+
# @example Basic example
|
415
|
+
# require "google/cloud/datastore/admin/v1"
|
416
|
+
#
|
417
|
+
# # Create a client object. The client can be reused for multiple calls.
|
418
|
+
# client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
|
419
|
+
#
|
420
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
421
|
+
# request = Google::Cloud::Datastore::Admin::V1::ImportEntitiesRequest.new
|
422
|
+
#
|
423
|
+
# # Call the import_entities method.
|
424
|
+
# result = client.import_entities request
|
425
|
+
#
|
426
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
427
|
+
# # object to check the status of an operation, cancel it, or wait
|
428
|
+
# # for results. Here is how to block until completion:
|
429
|
+
# result.wait_until_done! timeout: 60
|
430
|
+
# if result.response?
|
431
|
+
# p result.response
|
432
|
+
# else
|
433
|
+
# puts "Error!"
|
434
|
+
# end
|
435
|
+
#
|
393
436
|
def import_entities request, options = nil
|
394
437
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
395
438
|
|
@@ -407,16 +450,20 @@ module Google
|
|
407
450
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
408
451
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
409
452
|
|
410
|
-
header_params = {
|
411
|
-
|
412
|
-
|
453
|
+
header_params = {}
|
454
|
+
if request.project_id
|
455
|
+
header_params["project_id"] = request.project_id
|
456
|
+
end
|
457
|
+
|
413
458
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
414
459
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
415
460
|
|
416
461
|
options.apply_defaults timeout: @config.rpcs.import_entities.timeout,
|
417
462
|
metadata: metadata,
|
418
463
|
retry_policy: @config.rpcs.import_entities.retry_policy
|
419
|
-
|
464
|
+
|
465
|
+
options.apply_defaults timeout: @config.timeout,
|
466
|
+
metadata: @config.metadata,
|
420
467
|
retry_policy: @config.retry_policy
|
421
468
|
|
422
469
|
@datastore_admin_stub.call_rpc :import_entities, request, options: options do |response, operation|
|
@@ -473,6 +520,28 @@ module Google
|
|
473
520
|
#
|
474
521
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
475
522
|
#
|
523
|
+
# @example Basic example
|
524
|
+
# require "google/cloud/datastore/admin/v1"
|
525
|
+
#
|
526
|
+
# # Create a client object. The client can be reused for multiple calls.
|
527
|
+
# client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
|
528
|
+
#
|
529
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
530
|
+
# request = Google::Cloud::Datastore::Admin::V1::CreateIndexRequest.new
|
531
|
+
#
|
532
|
+
# # Call the create_index method.
|
533
|
+
# result = client.create_index request
|
534
|
+
#
|
535
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
536
|
+
# # object to check the status of an operation, cancel it, or wait
|
537
|
+
# # for results. Here is how to block until completion:
|
538
|
+
# result.wait_until_done! timeout: 60
|
539
|
+
# if result.response?
|
540
|
+
# p result.response
|
541
|
+
# else
|
542
|
+
# puts "Error!"
|
543
|
+
# end
|
544
|
+
#
|
476
545
|
def create_index request, options = nil
|
477
546
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
478
547
|
|
@@ -490,16 +559,20 @@ module Google
|
|
490
559
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
491
560
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
492
561
|
|
493
|
-
header_params = {
|
494
|
-
|
495
|
-
|
562
|
+
header_params = {}
|
563
|
+
if request.project_id
|
564
|
+
header_params["project_id"] = request.project_id
|
565
|
+
end
|
566
|
+
|
496
567
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
497
568
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
498
569
|
|
499
570
|
options.apply_defaults timeout: @config.rpcs.create_index.timeout,
|
500
571
|
metadata: metadata,
|
501
572
|
retry_policy: @config.rpcs.create_index.retry_policy
|
502
|
-
|
573
|
+
|
574
|
+
options.apply_defaults timeout: @config.timeout,
|
575
|
+
metadata: @config.metadata,
|
503
576
|
retry_policy: @config.retry_policy
|
504
577
|
|
505
578
|
@datastore_admin_stub.call_rpc :create_index, request, options: options do |response, operation|
|
@@ -551,6 +624,28 @@ module Google
|
|
551
624
|
#
|
552
625
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
553
626
|
#
|
627
|
+
# @example Basic example
|
628
|
+
# require "google/cloud/datastore/admin/v1"
|
629
|
+
#
|
630
|
+
# # Create a client object. The client can be reused for multiple calls.
|
631
|
+
# client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
|
632
|
+
#
|
633
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
634
|
+
# request = Google::Cloud::Datastore::Admin::V1::DeleteIndexRequest.new
|
635
|
+
#
|
636
|
+
# # Call the delete_index method.
|
637
|
+
# result = client.delete_index request
|
638
|
+
#
|
639
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
640
|
+
# # object to check the status of an operation, cancel it, or wait
|
641
|
+
# # for results. Here is how to block until completion:
|
642
|
+
# result.wait_until_done! timeout: 60
|
643
|
+
# if result.response?
|
644
|
+
# p result.response
|
645
|
+
# else
|
646
|
+
# puts "Error!"
|
647
|
+
# end
|
648
|
+
#
|
554
649
|
def delete_index request, options = nil
|
555
650
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
556
651
|
|
@@ -568,17 +663,23 @@ module Google
|
|
568
663
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
569
664
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
570
665
|
|
571
|
-
header_params = {
|
572
|
-
|
573
|
-
"
|
574
|
-
|
666
|
+
header_params = {}
|
667
|
+
if request.project_id
|
668
|
+
header_params["project_id"] = request.project_id
|
669
|
+
end
|
670
|
+
if request.index_id
|
671
|
+
header_params["index_id"] = request.index_id
|
672
|
+
end
|
673
|
+
|
575
674
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
576
675
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
577
676
|
|
578
677
|
options.apply_defaults timeout: @config.rpcs.delete_index.timeout,
|
579
678
|
metadata: metadata,
|
580
679
|
retry_policy: @config.rpcs.delete_index.retry_policy
|
581
|
-
|
680
|
+
|
681
|
+
options.apply_defaults timeout: @config.timeout,
|
682
|
+
metadata: @config.metadata,
|
582
683
|
retry_policy: @config.retry_policy
|
583
684
|
|
584
685
|
@datastore_admin_stub.call_rpc :delete_index, request, options: options do |response, operation|
|
@@ -621,6 +722,21 @@ module Google
|
|
621
722
|
#
|
622
723
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
623
724
|
#
|
725
|
+
# @example Basic example
|
726
|
+
# require "google/cloud/datastore/admin/v1"
|
727
|
+
#
|
728
|
+
# # Create a client object. The client can be reused for multiple calls.
|
729
|
+
# client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
|
730
|
+
#
|
731
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
732
|
+
# request = Google::Cloud::Datastore::Admin::V1::GetIndexRequest.new
|
733
|
+
#
|
734
|
+
# # Call the get_index method.
|
735
|
+
# result = client.get_index request
|
736
|
+
#
|
737
|
+
# # The returned object is of type Google::Cloud::Datastore::Admin::V1::Index.
|
738
|
+
# p result
|
739
|
+
#
|
624
740
|
def get_index request, options = nil
|
625
741
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
626
742
|
|
@@ -638,17 +754,23 @@ module Google
|
|
638
754
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
639
755
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
640
756
|
|
641
|
-
header_params = {
|
642
|
-
|
643
|
-
"
|
644
|
-
|
757
|
+
header_params = {}
|
758
|
+
if request.project_id
|
759
|
+
header_params["project_id"] = request.project_id
|
760
|
+
end
|
761
|
+
if request.index_id
|
762
|
+
header_params["index_id"] = request.index_id
|
763
|
+
end
|
764
|
+
|
645
765
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
646
766
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
647
767
|
|
648
768
|
options.apply_defaults timeout: @config.rpcs.get_index.timeout,
|
649
769
|
metadata: metadata,
|
650
770
|
retry_policy: @config.rpcs.get_index.retry_policy
|
651
|
-
|
771
|
+
|
772
|
+
options.apply_defaults timeout: @config.timeout,
|
773
|
+
metadata: @config.metadata,
|
652
774
|
retry_policy: @config.retry_policy
|
653
775
|
|
654
776
|
@datastore_admin_stub.call_rpc :get_index, request, options: options do |response, operation|
|
@@ -696,6 +818,27 @@ module Google
|
|
696
818
|
#
|
697
819
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
698
820
|
#
|
821
|
+
# @example Basic example
|
822
|
+
# require "google/cloud/datastore/admin/v1"
|
823
|
+
#
|
824
|
+
# # Create a client object. The client can be reused for multiple calls.
|
825
|
+
# client = Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new
|
826
|
+
#
|
827
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
828
|
+
# request = Google::Cloud::Datastore::Admin::V1::ListIndexesRequest.new
|
829
|
+
#
|
830
|
+
# # Call the list_indexes method.
|
831
|
+
# result = client.list_indexes request
|
832
|
+
#
|
833
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
834
|
+
# # iterate over all elements by calling #each, and the enumerable
|
835
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
836
|
+
# # methods are also available for managing paging directly.
|
837
|
+
# result.each do |response|
|
838
|
+
# # Each element is of type ::Google::Cloud::Datastore::Admin::V1::Index.
|
839
|
+
# p response
|
840
|
+
# end
|
841
|
+
#
|
699
842
|
def list_indexes request, options = nil
|
700
843
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
701
844
|
|
@@ -713,16 +856,20 @@ module Google
|
|
713
856
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
714
857
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
715
858
|
|
716
|
-
header_params = {
|
717
|
-
|
718
|
-
|
859
|
+
header_params = {}
|
860
|
+
if request.project_id
|
861
|
+
header_params["project_id"] = request.project_id
|
862
|
+
end
|
863
|
+
|
719
864
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
720
865
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
721
866
|
|
722
867
|
options.apply_defaults timeout: @config.rpcs.list_indexes.timeout,
|
723
868
|
metadata: metadata,
|
724
869
|
retry_policy: @config.rpcs.list_indexes.retry_policy
|
725
|
-
|
870
|
+
|
871
|
+
options.apply_defaults timeout: @config.timeout,
|
872
|
+
metadata: @config.metadata,
|
726
873
|
retry_policy: @config.retry_policy
|
727
874
|
|
728
875
|
@datastore_admin_stub.call_rpc :list_indexes, request, options: options do |response, operation|
|
@@ -747,22 +894,21 @@ module Google
|
|
747
894
|
# Configuration can be applied globally to all clients, or to a single client
|
748
895
|
# on construction.
|
749
896
|
#
|
750
|
-
#
|
751
|
-
#
|
752
|
-
#
|
753
|
-
# to 20 seconds,
|
754
|
-
#
|
755
|
-
#
|
756
|
-
#
|
757
|
-
#
|
758
|
-
#
|
759
|
-
#
|
760
|
-
#
|
761
|
-
#
|
762
|
-
#
|
763
|
-
#
|
764
|
-
#
|
765
|
-
# end
|
897
|
+
# @example
|
898
|
+
#
|
899
|
+
# # Modify the global config, setting the timeout for
|
900
|
+
# # export_entities to 20 seconds,
|
901
|
+
# # and all remaining timeouts to 10 seconds.
|
902
|
+
# ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.configure do |config|
|
903
|
+
# config.timeout = 10.0
|
904
|
+
# config.rpcs.export_entities.timeout = 20.0
|
905
|
+
# end
|
906
|
+
#
|
907
|
+
# # Apply the above configuration only to a new client.
|
908
|
+
# client = ::Google::Cloud::Datastore::Admin::V1::DatastoreAdmin::Client.new do |config|
|
909
|
+
# config.timeout = 10.0
|
910
|
+
# config.rpcs.export_entities.timeout = 20.0
|
911
|
+
# end
|
766
912
|
#
|
767
913
|
# @!attribute [rw] endpoint
|
768
914
|
# The hostname or hostname:port of the service endpoint.
|
@@ -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,16 +182,20 @@ module Google
|
|
161
182
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
162
183
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
163
184
|
|
164
|
-
header_params = {
|
165
|
-
|
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
|
|
170
193
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
171
194
|
metadata: metadata,
|
172
195
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
173
|
-
|
196
|
+
|
197
|
+
options.apply_defaults timeout: @config.timeout,
|
198
|
+
metadata: @config.metadata,
|
174
199
|
retry_policy: @config.retry_policy
|
175
200
|
|
176
201
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -214,6 +239,28 @@ module Google
|
|
214
239
|
#
|
215
240
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
216
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
|
+
#
|
217
264
|
def get_operation request, options = nil
|
218
265
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
219
266
|
|
@@ -231,16 +278,20 @@ module Google
|
|
231
278
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
232
279
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
233
280
|
|
234
|
-
header_params = {
|
235
|
-
|
236
|
-
|
281
|
+
header_params = {}
|
282
|
+
if request.name
|
283
|
+
header_params["name"] = request.name
|
284
|
+
end
|
285
|
+
|
237
286
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
238
287
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
239
288
|
|
240
289
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
241
290
|
metadata: metadata,
|
242
291
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
243
|
-
|
292
|
+
|
293
|
+
options.apply_defaults timeout: @config.timeout,
|
294
|
+
metadata: @config.metadata,
|
244
295
|
retry_policy: @config.retry_policy
|
245
296
|
|
246
297
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -284,6 +335,21 @@ module Google
|
|
284
335
|
#
|
285
336
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
286
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
|
+
#
|
287
353
|
def delete_operation request, options = nil
|
288
354
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
289
355
|
|
@@ -301,16 +367,20 @@ module Google
|
|
301
367
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
302
368
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
303
369
|
|
304
|
-
header_params = {
|
305
|
-
|
306
|
-
|
370
|
+
header_params = {}
|
371
|
+
if request.name
|
372
|
+
header_params["name"] = request.name
|
373
|
+
end
|
374
|
+
|
307
375
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
308
376
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
309
377
|
|
310
378
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
311
379
|
metadata: metadata,
|
312
380
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
313
|
-
|
381
|
+
|
382
|
+
options.apply_defaults timeout: @config.timeout,
|
383
|
+
metadata: @config.metadata,
|
314
384
|
retry_policy: @config.retry_policy
|
315
385
|
|
316
386
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -359,6 +429,21 @@ module Google
|
|
359
429
|
#
|
360
430
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
361
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
|
+
#
|
362
447
|
def cancel_operation request, options = nil
|
363
448
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
364
449
|
|
@@ -376,16 +461,20 @@ module Google
|
|
376
461
|
gapic_version: ::Google::Cloud::Datastore::Admin::V1::VERSION
|
377
462
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
378
463
|
|
379
|
-
header_params = {
|
380
|
-
|
381
|
-
|
464
|
+
header_params = {}
|
465
|
+
if request.name
|
466
|
+
header_params["name"] = request.name
|
467
|
+
end
|
468
|
+
|
382
469
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
383
470
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
384
471
|
|
385
472
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
386
473
|
metadata: metadata,
|
387
474
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
388
|
-
|
475
|
+
|
476
|
+
options.apply_defaults timeout: @config.timeout,
|
477
|
+
metadata: @config.metadata,
|
389
478
|
retry_policy: @config.retry_policy
|
390
479
|
|
391
480
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -437,6 +526,28 @@ module Google
|
|
437
526
|
#
|
438
527
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
439
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
|
+
#
|
440
551
|
def wait_operation request, options = nil
|
441
552
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
442
553
|
|
@@ -457,7 +568,9 @@ module Google
|
|
457
568
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
458
569
|
metadata: metadata,
|
459
570
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
460
|
-
|
571
|
+
|
572
|
+
options.apply_defaults timeout: @config.timeout,
|
573
|
+
metadata: @config.metadata,
|
461
574
|
retry_policy: @config.retry_policy
|
462
575
|
|
463
576
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -482,22 +595,21 @@ module Google
|
|
482
595
|
# Configuration can be applied globally to all clients, or to a single client
|
483
596
|
# on construction.
|
484
597
|
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
# to 20 seconds,
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
#
|
500
|
-
# end
|
598
|
+
# @example
|
599
|
+
#
|
600
|
+
# # Modify the global config, setting the timeout for
|
601
|
+
# # list_operations to 20 seconds,
|
602
|
+
# # and all remaining timeouts to 10 seconds.
|
603
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
604
|
+
# config.timeout = 10.0
|
605
|
+
# config.rpcs.list_operations.timeout = 20.0
|
606
|
+
# end
|
607
|
+
#
|
608
|
+
# # Apply the above configuration only to a new client.
|
609
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
610
|
+
# config.timeout = 10.0
|
611
|
+
# config.rpcs.list_operations.timeout = 20.0
|
612
|
+
# end
|
501
613
|
#
|
502
614
|
# @!attribute [rw] endpoint
|
503
615
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,14 +1,15 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/datastore/admin/v1/datastore_admin.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
9
7
|
require 'google/datastore/admin/v1/index_pb'
|
8
|
+
require 'google/datastore/admin/v1/migration_pb'
|
10
9
|
require 'google/longrunning/operations_pb'
|
11
10
|
require 'google/protobuf/timestamp_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
12
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
14
|
add_file("google/datastore/admin/v1/datastore_admin.proto", :syntax => :proto3) do
|
14
15
|
add_message "google.datastore.admin.v1.CommonMetadata" do
|
@@ -92,6 +93,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
92
93
|
optional :progress_entities, :message, 2, "google.datastore.admin.v1.Progress"
|
93
94
|
optional :index_id, :string, 3
|
94
95
|
end
|
96
|
+
add_message "google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata" do
|
97
|
+
optional :migration_state, :enum, 1, "google.datastore.admin.v1.MigrationState"
|
98
|
+
optional :migration_step, :enum, 2, "google.datastore.admin.v1.MigrationStep"
|
99
|
+
end
|
95
100
|
add_enum "google.datastore.admin.v1.OperationType" do
|
96
101
|
value :OPERATION_TYPE_UNSPECIFIED, 0
|
97
102
|
value :EXPORT_ENTITIES, 1
|
@@ -122,6 +127,7 @@ module Google
|
|
122
127
|
ListIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.ListIndexesRequest").msgclass
|
123
128
|
ListIndexesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.ListIndexesResponse").msgclass
|
124
129
|
IndexOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.IndexOperationMetadata").msgclass
|
130
|
+
DatastoreFirestoreMigrationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata").msgclass
|
125
131
|
OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.OperationType").enummodule
|
126
132
|
end
|
127
133
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/datastore/admin/v1/datastore_admin.proto for package 'Google.Cloud.Datastore.Admin.V1'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright
|
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.
|
@@ -88,7 +88,7 @@ module Google
|
|
88
88
|
# but are accessed via service google.longrunning.Operations.
|
89
89
|
class Service
|
90
90
|
|
91
|
-
include GRPC::GenericService
|
91
|
+
include ::GRPC::GenericService
|
92
92
|
|
93
93
|
self.marshal_class_method = :encode
|
94
94
|
self.unmarshal_class_method = :decode
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/datastore/admin/v1/index.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/field_behavior_pb'
|
7
5
|
require 'google/api/annotations_pb'
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("google/datastore/admin/v1/index.proto", :syntax => :proto3) do
|
10
10
|
add_message "google.datastore.admin.v1.Index" do
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/datastore/admin/v1/migration.proto
|
3
|
+
|
4
|
+
require 'google/api/annotations_pb'
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("google/datastore/admin/v1/migration.proto", :syntax => :proto3) do
|
9
|
+
add_message "google.datastore.admin.v1.MigrationStateEvent" do
|
10
|
+
optional :state, :enum, 1, "google.datastore.admin.v1.MigrationState"
|
11
|
+
end
|
12
|
+
add_message "google.datastore.admin.v1.MigrationProgressEvent" do
|
13
|
+
optional :step, :enum, 1, "google.datastore.admin.v1.MigrationStep"
|
14
|
+
oneof :step_details do
|
15
|
+
optional :prepare_step_details, :message, 2, "google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails"
|
16
|
+
optional :redirect_writes_step_details, :message, 3, "google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
add_message "google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails" do
|
20
|
+
optional :concurrency_mode, :enum, 1, "google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode"
|
21
|
+
end
|
22
|
+
add_message "google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails" do
|
23
|
+
optional :concurrency_mode, :enum, 1, "google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode"
|
24
|
+
end
|
25
|
+
add_enum "google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode" do
|
26
|
+
value :CONCURRENCY_MODE_UNSPECIFIED, 0
|
27
|
+
value :PESSIMISTIC, 1
|
28
|
+
value :OPTIMISTIC, 2
|
29
|
+
end
|
30
|
+
add_enum "google.datastore.admin.v1.MigrationState" do
|
31
|
+
value :MIGRATION_STATE_UNSPECIFIED, 0
|
32
|
+
value :RUNNING, 1
|
33
|
+
value :PAUSED, 2
|
34
|
+
value :COMPLETE, 3
|
35
|
+
end
|
36
|
+
add_enum "google.datastore.admin.v1.MigrationStep" do
|
37
|
+
value :MIGRATION_STEP_UNSPECIFIED, 0
|
38
|
+
value :PREPARE, 6
|
39
|
+
value :START, 1
|
40
|
+
value :APPLY_WRITES_SYNCHRONOUSLY, 7
|
41
|
+
value :COPY_AND_VERIFY, 2
|
42
|
+
value :REDIRECT_EVENTUALLY_CONSISTENT_READS, 3
|
43
|
+
value :REDIRECT_STRONGLY_CONSISTENT_READS, 4
|
44
|
+
value :REDIRECT_WRITES, 5
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
module Google
|
50
|
+
module Cloud
|
51
|
+
module Datastore
|
52
|
+
module Admin
|
53
|
+
module V1
|
54
|
+
MigrationStateEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationStateEvent").msgclass
|
55
|
+
MigrationProgressEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationProgressEvent").msgclass
|
56
|
+
MigrationProgressEvent::PrepareStepDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails").msgclass
|
57
|
+
MigrationProgressEvent::RedirectWritesStepDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails").msgclass
|
58
|
+
MigrationProgressEvent::ConcurrencyMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode").enummodule
|
59
|
+
MigrationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationState").enummodule
|
60
|
+
MigrationStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.datastore.admin.v1.MigrationStep").enummodule
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -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
|
-
#
|
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
|
-
#
|
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
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
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
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
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
|
@@ -367,6 +367,27 @@ module Google
|
|
367
367
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
368
368
|
end
|
369
369
|
|
370
|
+
# Metadata for Datastore to Firestore migration operations.
|
371
|
+
#
|
372
|
+
# The DatastoreFirestoreMigration operation is not started by the end-user via
|
373
|
+
# an explicit "creation" method. This is an intentional deviation from the LRO
|
374
|
+
# design pattern.
|
375
|
+
#
|
376
|
+
# This singleton resource can be accessed at:
|
377
|
+
# `projects/{project_id}/datastore-firestore-migration`
|
378
|
+
# @!attribute [rw] migration_state
|
379
|
+
# @return [::Google::Cloud::Datastore::Admin::V1::MigrationState]
|
380
|
+
# The current state of migration from Cloud Datastore to Cloud Firestore in
|
381
|
+
# Datastore mode.
|
382
|
+
# @!attribute [rw] migration_step
|
383
|
+
# @return [::Google::Cloud::Datastore::Admin::V1::MigrationStep]
|
384
|
+
# The current step of migration from Cloud Datastore to Cloud Firestore in
|
385
|
+
# Datastore mode.
|
386
|
+
class DatastoreFirestoreMigrationMetadata
|
387
|
+
include ::Google::Protobuf::MessageExts
|
388
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
389
|
+
end
|
390
|
+
|
370
391
|
# Operation types.
|
371
392
|
module OperationType
|
372
393
|
# Unspecified.
|
@@ -0,0 +1,133 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2022 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Datastore
|
23
|
+
module Admin
|
24
|
+
module V1
|
25
|
+
# An event signifying a change in state of a [migration from Cloud Datastore to
|
26
|
+
# Cloud Firestore in Datastore
|
27
|
+
# mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
|
28
|
+
# @!attribute [rw] state
|
29
|
+
# @return [::Google::Cloud::Datastore::Admin::V1::MigrationState]
|
30
|
+
# The new state of the migration.
|
31
|
+
class MigrationStateEvent
|
32
|
+
include ::Google::Protobuf::MessageExts
|
33
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
34
|
+
end
|
35
|
+
|
36
|
+
# An event signifying the start of a new step in a [migration from Cloud
|
37
|
+
# Datastore to Cloud Firestore in Datastore
|
38
|
+
# mode](https://cloud.google.com/datastore/docs/upgrade-to-firestore).
|
39
|
+
# @!attribute [rw] step
|
40
|
+
# @return [::Google::Cloud::Datastore::Admin::V1::MigrationStep]
|
41
|
+
# The step that is starting.
|
42
|
+
#
|
43
|
+
# An event with step set to `START` indicates that the migration
|
44
|
+
# has been reverted back to the initial pre-migration state.
|
45
|
+
# @!attribute [rw] prepare_step_details
|
46
|
+
# @return [::Google::Cloud::Datastore::Admin::V1::MigrationProgressEvent::PrepareStepDetails]
|
47
|
+
# Details for the `PREPARE` step.
|
48
|
+
# @!attribute [rw] redirect_writes_step_details
|
49
|
+
# @return [::Google::Cloud::Datastore::Admin::V1::MigrationProgressEvent::RedirectWritesStepDetails]
|
50
|
+
# Details for the `REDIRECT_WRITES` step.
|
51
|
+
class MigrationProgressEvent
|
52
|
+
include ::Google::Protobuf::MessageExts
|
53
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
54
|
+
|
55
|
+
# Details for the `PREPARE` step.
|
56
|
+
# @!attribute [rw] concurrency_mode
|
57
|
+
# @return [::Google::Cloud::Datastore::Admin::V1::MigrationProgressEvent::ConcurrencyMode]
|
58
|
+
# The concurrency mode this database will use when it reaches the
|
59
|
+
# `REDIRECT_WRITES` step.
|
60
|
+
class PrepareStepDetails
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
end
|
64
|
+
|
65
|
+
# Details for the `REDIRECT_WRITES` step.
|
66
|
+
# @!attribute [rw] concurrency_mode
|
67
|
+
# @return [::Google::Cloud::Datastore::Admin::V1::MigrationProgressEvent::ConcurrencyMode]
|
68
|
+
# Ths concurrency mode for this database.
|
69
|
+
class RedirectWritesStepDetails
|
70
|
+
include ::Google::Protobuf::MessageExts
|
71
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
72
|
+
end
|
73
|
+
|
74
|
+
# Concurrency modes for transactions in Cloud Firestore.
|
75
|
+
module ConcurrencyMode
|
76
|
+
# Unspecified.
|
77
|
+
CONCURRENCY_MODE_UNSPECIFIED = 0
|
78
|
+
|
79
|
+
# Pessimistic concurrency.
|
80
|
+
PESSIMISTIC = 1
|
81
|
+
|
82
|
+
# Optimistic concurrency.
|
83
|
+
OPTIMISTIC = 2
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
# States for a migration.
|
88
|
+
module MigrationState
|
89
|
+
# Unspecified.
|
90
|
+
MIGRATION_STATE_UNSPECIFIED = 0
|
91
|
+
|
92
|
+
# The migration is running.
|
93
|
+
RUNNING = 1
|
94
|
+
|
95
|
+
# The migration is paused.
|
96
|
+
PAUSED = 2
|
97
|
+
|
98
|
+
# The migration is complete.
|
99
|
+
COMPLETE = 3
|
100
|
+
end
|
101
|
+
|
102
|
+
# Steps in a migration.
|
103
|
+
module MigrationStep
|
104
|
+
# Unspecified.
|
105
|
+
MIGRATION_STEP_UNSPECIFIED = 0
|
106
|
+
|
107
|
+
# Pre-migration: the database is prepared for migration.
|
108
|
+
PREPARE = 6
|
109
|
+
|
110
|
+
# Start of migration.
|
111
|
+
START = 1
|
112
|
+
|
113
|
+
# Writes are applied synchronously to at least one replica.
|
114
|
+
APPLY_WRITES_SYNCHRONOUSLY = 7
|
115
|
+
|
116
|
+
# Data is copied to Cloud Firestore and then verified to match the data in
|
117
|
+
# Cloud Datastore.
|
118
|
+
COPY_AND_VERIFY = 2
|
119
|
+
|
120
|
+
# Eventually-consistent reads are redirected to Cloud Firestore.
|
121
|
+
REDIRECT_EVENTUALLY_CONSISTENT_READS = 3
|
122
|
+
|
123
|
+
# Strongly-consistent reads are redirected to Cloud Firestore.
|
124
|
+
REDIRECT_STRONGLY_CONSISTENT_READS = 4
|
125
|
+
|
126
|
+
# Writes are redirected to Cloud Firestore.
|
127
|
+
REDIRECT_WRITES = 5
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-datastore-admin-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -159,8 +159,7 @@ dependencies:
|
|
159
159
|
description: Firestore in Datastore mode is a NoSQL document database built for automatic
|
160
160
|
scaling, high performance, and ease of application development. Note that google-cloud-datastore-admin-v1
|
161
161
|
is a version-specific client library. For most uses, we recommend installing the
|
162
|
-
main client library google-cloud-datastore
|
163
|
-
details.
|
162
|
+
main client library google-cloud-datastore instead. See the readme for more details.
|
164
163
|
email: googleapis-packages@google.com
|
165
164
|
executables: []
|
166
165
|
extensions: []
|
@@ -180,11 +179,13 @@ files:
|
|
180
179
|
- lib/google/datastore/admin/v1/datastore_admin_pb.rb
|
181
180
|
- lib/google/datastore/admin/v1/datastore_admin_services_pb.rb
|
182
181
|
- lib/google/datastore/admin/v1/index_pb.rb
|
182
|
+
- lib/google/datastore/admin/v1/migration_pb.rb
|
183
183
|
- proto_docs/README.md
|
184
184
|
- proto_docs/google/api/field_behavior.rb
|
185
185
|
- proto_docs/google/api/resource.rb
|
186
186
|
- proto_docs/google/datastore/admin/v1/datastore_admin.rb
|
187
187
|
- proto_docs/google/datastore/admin/v1/index.rb
|
188
|
+
- proto_docs/google/datastore/admin/v1/migration.rb
|
188
189
|
- proto_docs/google/longrunning/operations.rb
|
189
190
|
- proto_docs/google/protobuf/any.rb
|
190
191
|
- proto_docs/google/protobuf/duration.rb
|
@@ -210,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
211
|
- !ruby/object:Gem::Version
|
211
212
|
version: '0'
|
212
213
|
requirements: []
|
213
|
-
rubygems_version: 3.
|
214
|
+
rubygems_version: 3.3.4
|
214
215
|
signing_key:
|
215
216
|
specification_version: 4
|
216
217
|
summary: API Client library for the Firestore in Datastore mode Admin V1 API
|