google-cloud-memcache-v1 0.2.3 → 0.3.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 +11 -6
- data/lib/google/cloud/memcache/v1/cloud_memcache/client.rb +182 -21
- data/lib/google/cloud/memcache/v1/cloud_memcache/operations.rb +118 -12
- data/lib/google/cloud/memcache/v1/cloud_memcache_pb.rb +1 -0
- data/lib/google/cloud/memcache/v1/cloud_memcache_services_pb.rb +1 -1
- data/lib/google/cloud/memcache/v1/version.rb +1 -1
- data/lib/google/cloud/memcache/v1.rb +2 -0
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/protobuf/any.rb +3 -3
- metadata +12 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1bc6ad70ed40e55d1d4340a54c0f508971097955468c063e24db09792b6403b0
|
|
4
|
+
data.tar.gz: 3067886824d642dacf03d7b87a2b7af3aae89ea48a05c3f97bc1ee3b1d2cea49
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d848f3b0cf229dcc6b6a35848a75e2ff15872ec9007b73ed45546f94f0c303ffc3f0fff558075b95613cb0997633994cad4e8169b2c632be01cc9e615f4c06d3
|
|
7
|
+
data.tar.gz: 836c5c947ca656741ea092d958eb7eb5f5ea844683cc8a36abc562f721bfff865289039e65a19dd8a6a5739f3ddf4cea10ecde152858793bf0d3ff9b823fe90e
|
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
|
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Memcache::V1::ListInstancesRequest.new # (request fie
|
|
|
37
37
|
response = client.list_instances request
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
View the [Client Library Documentation](https://
|
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-memcache-v1/latest)
|
|
41
41
|
for class and method documentation.
|
|
42
42
|
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/memorystore/docs/memcached/)
|
|
@@ -69,16 +69,21 @@ module GRPC
|
|
|
69
69
|
end
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
|
|
73
|
+
## Google Cloud Samples
|
|
74
|
+
|
|
75
|
+
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
|
76
|
+
|
|
72
77
|
## Supported Ruby Versions
|
|
73
78
|
|
|
74
|
-
This library is supported on Ruby 2.
|
|
79
|
+
This library is supported on Ruby 2.6+.
|
|
75
80
|
|
|
76
81
|
Google provides official support for Ruby versions that are actively supported
|
|
77
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
|
78
|
-
in security maintenance, and not end of life.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
83
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
|
84
|
+
still work, but are unsupported and not recommended. See
|
|
85
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
|
86
|
+
support schedule.
|
|
82
87
|
|
|
83
88
|
## Which client should I use?
|
|
84
89
|
|
|
@@ -163,6 +163,7 @@ module Google
|
|
|
163
163
|
|
|
164
164
|
@operations_client = Operations.new do |config|
|
|
165
165
|
config.credentials = credentials
|
|
166
|
+
config.quota_project = @quota_project_id
|
|
166
167
|
config.endpoint = @config.endpoint
|
|
167
168
|
end
|
|
168
169
|
|
|
@@ -231,6 +232,27 @@ module Google
|
|
|
231
232
|
#
|
|
232
233
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
233
234
|
#
|
|
235
|
+
# @example Basic example
|
|
236
|
+
# require "google/cloud/memcache/v1"
|
|
237
|
+
#
|
|
238
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
239
|
+
# client = Google::Cloud::Memcache::V1::CloudMemcache::Client.new
|
|
240
|
+
#
|
|
241
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
242
|
+
# request = Google::Cloud::Memcache::V1::ListInstancesRequest.new
|
|
243
|
+
#
|
|
244
|
+
# # Call the list_instances method.
|
|
245
|
+
# result = client.list_instances request
|
|
246
|
+
#
|
|
247
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
|
248
|
+
# # iterate over all elements by calling #each, and the enumerable
|
|
249
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
|
250
|
+
# # methods are also available for managing paging directly.
|
|
251
|
+
# result.each do |response|
|
|
252
|
+
# # Each element is of type ::Google::Cloud::Memcache::V1::Instance.
|
|
253
|
+
# p response
|
|
254
|
+
# end
|
|
255
|
+
#
|
|
234
256
|
def list_instances request, options = nil
|
|
235
257
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
236
258
|
|
|
@@ -248,9 +270,11 @@ module Google
|
|
|
248
270
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
249
271
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
250
272
|
|
|
251
|
-
header_params = {
|
|
252
|
-
|
|
253
|
-
|
|
273
|
+
header_params = {}
|
|
274
|
+
if request.parent
|
|
275
|
+
header_params["parent"] = request.parent
|
|
276
|
+
end
|
|
277
|
+
|
|
254
278
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
255
279
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
256
280
|
|
|
@@ -302,6 +326,21 @@ module Google
|
|
|
302
326
|
#
|
|
303
327
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
304
328
|
#
|
|
329
|
+
# @example Basic example
|
|
330
|
+
# require "google/cloud/memcache/v1"
|
|
331
|
+
#
|
|
332
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
333
|
+
# client = Google::Cloud::Memcache::V1::CloudMemcache::Client.new
|
|
334
|
+
#
|
|
335
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
336
|
+
# request = Google::Cloud::Memcache::V1::GetInstanceRequest.new
|
|
337
|
+
#
|
|
338
|
+
# # Call the get_instance method.
|
|
339
|
+
# result = client.get_instance request
|
|
340
|
+
#
|
|
341
|
+
# # The returned object is of type Google::Cloud::Memcache::V1::Instance.
|
|
342
|
+
# p result
|
|
343
|
+
#
|
|
305
344
|
def get_instance request, options = nil
|
|
306
345
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
307
346
|
|
|
@@ -319,9 +358,11 @@ module Google
|
|
|
319
358
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
320
359
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
321
360
|
|
|
322
|
-
header_params = {
|
|
323
|
-
|
|
324
|
-
|
|
361
|
+
header_params = {}
|
|
362
|
+
if request.name
|
|
363
|
+
header_params["name"] = request.name
|
|
364
|
+
end
|
|
365
|
+
|
|
325
366
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
326
367
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
327
368
|
|
|
@@ -385,6 +426,28 @@ module Google
|
|
|
385
426
|
#
|
|
386
427
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
387
428
|
#
|
|
429
|
+
# @example Basic example
|
|
430
|
+
# require "google/cloud/memcache/v1"
|
|
431
|
+
#
|
|
432
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
433
|
+
# client = Google::Cloud::Memcache::V1::CloudMemcache::Client.new
|
|
434
|
+
#
|
|
435
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
436
|
+
# request = Google::Cloud::Memcache::V1::CreateInstanceRequest.new
|
|
437
|
+
#
|
|
438
|
+
# # Call the create_instance method.
|
|
439
|
+
# result = client.create_instance request
|
|
440
|
+
#
|
|
441
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
442
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
443
|
+
# # for results. Here is how to block until completion:
|
|
444
|
+
# result.wait_until_done! timeout: 60
|
|
445
|
+
# if result.response?
|
|
446
|
+
# p result.response
|
|
447
|
+
# else
|
|
448
|
+
# puts "Error!"
|
|
449
|
+
# end
|
|
450
|
+
#
|
|
388
451
|
def create_instance request, options = nil
|
|
389
452
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
390
453
|
|
|
@@ -402,9 +465,11 @@ module Google
|
|
|
402
465
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
403
466
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
404
467
|
|
|
405
|
-
header_params = {
|
|
406
|
-
|
|
407
|
-
|
|
468
|
+
header_params = {}
|
|
469
|
+
if request.parent
|
|
470
|
+
header_params["parent"] = request.parent
|
|
471
|
+
end
|
|
472
|
+
|
|
408
473
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
409
474
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
410
475
|
|
|
@@ -458,6 +523,28 @@ module Google
|
|
|
458
523
|
#
|
|
459
524
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
460
525
|
#
|
|
526
|
+
# @example Basic example
|
|
527
|
+
# require "google/cloud/memcache/v1"
|
|
528
|
+
#
|
|
529
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
530
|
+
# client = Google::Cloud::Memcache::V1::CloudMemcache::Client.new
|
|
531
|
+
#
|
|
532
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
533
|
+
# request = Google::Cloud::Memcache::V1::UpdateInstanceRequest.new
|
|
534
|
+
#
|
|
535
|
+
# # Call the update_instance method.
|
|
536
|
+
# result = client.update_instance request
|
|
537
|
+
#
|
|
538
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
539
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
540
|
+
# # for results. Here is how to block until completion:
|
|
541
|
+
# result.wait_until_done! timeout: 60
|
|
542
|
+
# if result.response?
|
|
543
|
+
# p result.response
|
|
544
|
+
# else
|
|
545
|
+
# puts "Error!"
|
|
546
|
+
# end
|
|
547
|
+
#
|
|
461
548
|
def update_instance request, options = nil
|
|
462
549
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
463
550
|
|
|
@@ -475,9 +562,11 @@ module Google
|
|
|
475
562
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
476
563
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
477
564
|
|
|
478
|
-
header_params = {
|
|
479
|
-
|
|
480
|
-
|
|
565
|
+
header_params = {}
|
|
566
|
+
if request.instance&.name
|
|
567
|
+
header_params["instance.name"] = request.instance.name
|
|
568
|
+
end
|
|
569
|
+
|
|
481
570
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
482
571
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
483
572
|
|
|
@@ -534,6 +623,28 @@ module Google
|
|
|
534
623
|
#
|
|
535
624
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
536
625
|
#
|
|
626
|
+
# @example Basic example
|
|
627
|
+
# require "google/cloud/memcache/v1"
|
|
628
|
+
#
|
|
629
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
630
|
+
# client = Google::Cloud::Memcache::V1::CloudMemcache::Client.new
|
|
631
|
+
#
|
|
632
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
633
|
+
# request = Google::Cloud::Memcache::V1::UpdateParametersRequest.new
|
|
634
|
+
#
|
|
635
|
+
# # Call the update_parameters method.
|
|
636
|
+
# result = client.update_parameters request
|
|
637
|
+
#
|
|
638
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
639
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
640
|
+
# # for results. Here is how to block until completion:
|
|
641
|
+
# result.wait_until_done! timeout: 60
|
|
642
|
+
# if result.response?
|
|
643
|
+
# p result.response
|
|
644
|
+
# else
|
|
645
|
+
# puts "Error!"
|
|
646
|
+
# end
|
|
647
|
+
#
|
|
537
648
|
def update_parameters request, options = nil
|
|
538
649
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
539
650
|
|
|
@@ -551,9 +662,11 @@ module Google
|
|
|
551
662
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
552
663
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
553
664
|
|
|
554
|
-
header_params = {
|
|
555
|
-
|
|
556
|
-
|
|
665
|
+
header_params = {}
|
|
666
|
+
if request.name
|
|
667
|
+
header_params["name"] = request.name
|
|
668
|
+
end
|
|
669
|
+
|
|
557
670
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
558
671
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
559
672
|
|
|
@@ -605,6 +718,28 @@ module Google
|
|
|
605
718
|
#
|
|
606
719
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
607
720
|
#
|
|
721
|
+
# @example Basic example
|
|
722
|
+
# require "google/cloud/memcache/v1"
|
|
723
|
+
#
|
|
724
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
725
|
+
# client = Google::Cloud::Memcache::V1::CloudMemcache::Client.new
|
|
726
|
+
#
|
|
727
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
728
|
+
# request = Google::Cloud::Memcache::V1::DeleteInstanceRequest.new
|
|
729
|
+
#
|
|
730
|
+
# # Call the delete_instance method.
|
|
731
|
+
# result = client.delete_instance request
|
|
732
|
+
#
|
|
733
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
734
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
735
|
+
# # for results. Here is how to block until completion:
|
|
736
|
+
# result.wait_until_done! timeout: 60
|
|
737
|
+
# if result.response?
|
|
738
|
+
# p result.response
|
|
739
|
+
# else
|
|
740
|
+
# puts "Error!"
|
|
741
|
+
# end
|
|
742
|
+
#
|
|
608
743
|
def delete_instance request, options = nil
|
|
609
744
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
610
745
|
|
|
@@ -622,9 +757,11 @@ module Google
|
|
|
622
757
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
623
758
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
624
759
|
|
|
625
|
-
header_params = {
|
|
626
|
-
|
|
627
|
-
|
|
760
|
+
header_params = {}
|
|
761
|
+
if request.name
|
|
762
|
+
header_params["name"] = request.name
|
|
763
|
+
end
|
|
764
|
+
|
|
628
765
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
629
766
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
630
767
|
|
|
@@ -682,6 +819,28 @@ module Google
|
|
|
682
819
|
#
|
|
683
820
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
684
821
|
#
|
|
822
|
+
# @example Basic example
|
|
823
|
+
# require "google/cloud/memcache/v1"
|
|
824
|
+
#
|
|
825
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
826
|
+
# client = Google::Cloud::Memcache::V1::CloudMemcache::Client.new
|
|
827
|
+
#
|
|
828
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
829
|
+
# request = Google::Cloud::Memcache::V1::ApplyParametersRequest.new
|
|
830
|
+
#
|
|
831
|
+
# # Call the apply_parameters method.
|
|
832
|
+
# result = client.apply_parameters request
|
|
833
|
+
#
|
|
834
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
835
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
836
|
+
# # for results. Here is how to block until completion:
|
|
837
|
+
# result.wait_until_done! timeout: 60
|
|
838
|
+
# if result.response?
|
|
839
|
+
# p result.response
|
|
840
|
+
# else
|
|
841
|
+
# puts "Error!"
|
|
842
|
+
# end
|
|
843
|
+
#
|
|
685
844
|
def apply_parameters request, options = nil
|
|
686
845
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
687
846
|
|
|
@@ -699,9 +858,11 @@ module Google
|
|
|
699
858
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
700
859
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
701
860
|
|
|
702
|
-
header_params = {
|
|
703
|
-
|
|
704
|
-
|
|
861
|
+
header_params = {}
|
|
862
|
+
if request.name
|
|
863
|
+
header_params["name"] = request.name
|
|
864
|
+
end
|
|
865
|
+
|
|
705
866
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
706
867
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
707
868
|
|
|
@@ -95,6 +95,9 @@ module Google
|
|
|
95
95
|
channel_args: @config.channel_args,
|
|
96
96
|
interceptors: @config.interceptors
|
|
97
97
|
)
|
|
98
|
+
|
|
99
|
+
# Used by an LRO wrapper for some methods of this service
|
|
100
|
+
@operations_client = self
|
|
98
101
|
end
|
|
99
102
|
|
|
100
103
|
# Service calls
|
|
@@ -143,6 +146,27 @@ module Google
|
|
|
143
146
|
#
|
|
144
147
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
145
148
|
#
|
|
149
|
+
# @example Basic example
|
|
150
|
+
# require "google/longrunning"
|
|
151
|
+
#
|
|
152
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
153
|
+
# client = Google::Longrunning::Operations::Client.new
|
|
154
|
+
#
|
|
155
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
156
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
|
157
|
+
#
|
|
158
|
+
# # Call the list_operations method.
|
|
159
|
+
# result = client.list_operations request
|
|
160
|
+
#
|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
|
162
|
+
# # iterate over all elements by calling #each, and the enumerable
|
|
163
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
|
164
|
+
# # methods are also available for managing paging directly.
|
|
165
|
+
# result.each do |response|
|
|
166
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
|
167
|
+
# p response
|
|
168
|
+
# end
|
|
169
|
+
#
|
|
146
170
|
def list_operations request, options = nil
|
|
147
171
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
148
172
|
|
|
@@ -160,9 +184,11 @@ module Google
|
|
|
160
184
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
161
185
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
162
186
|
|
|
163
|
-
header_params = {
|
|
164
|
-
|
|
165
|
-
|
|
187
|
+
header_params = {}
|
|
188
|
+
if request.name
|
|
189
|
+
header_params["name"] = request.name
|
|
190
|
+
end
|
|
191
|
+
|
|
166
192
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
167
193
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
168
194
|
|
|
@@ -215,6 +241,28 @@ module Google
|
|
|
215
241
|
#
|
|
216
242
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
217
243
|
#
|
|
244
|
+
# @example Basic example
|
|
245
|
+
# require "google/longrunning"
|
|
246
|
+
#
|
|
247
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
248
|
+
# client = Google::Longrunning::Operations::Client.new
|
|
249
|
+
#
|
|
250
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
251
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
|
252
|
+
#
|
|
253
|
+
# # Call the get_operation method.
|
|
254
|
+
# result = client.get_operation request
|
|
255
|
+
#
|
|
256
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
257
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
258
|
+
# # for results. Here is how to block until completion:
|
|
259
|
+
# result.wait_until_done! timeout: 60
|
|
260
|
+
# if result.response?
|
|
261
|
+
# p result.response
|
|
262
|
+
# else
|
|
263
|
+
# puts "Error!"
|
|
264
|
+
# end
|
|
265
|
+
#
|
|
218
266
|
def get_operation request, options = nil
|
|
219
267
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
220
268
|
|
|
@@ -232,9 +280,11 @@ module Google
|
|
|
232
280
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
233
281
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
234
282
|
|
|
235
|
-
header_params = {
|
|
236
|
-
|
|
237
|
-
|
|
283
|
+
header_params = {}
|
|
284
|
+
if request.name
|
|
285
|
+
header_params["name"] = request.name
|
|
286
|
+
end
|
|
287
|
+
|
|
238
288
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
239
289
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
240
290
|
|
|
@@ -287,6 +337,21 @@ module Google
|
|
|
287
337
|
#
|
|
288
338
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
289
339
|
#
|
|
340
|
+
# @example Basic example
|
|
341
|
+
# require "google/longrunning"
|
|
342
|
+
#
|
|
343
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
344
|
+
# client = Google::Longrunning::Operations::Client.new
|
|
345
|
+
#
|
|
346
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
347
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
|
348
|
+
#
|
|
349
|
+
# # Call the delete_operation method.
|
|
350
|
+
# result = client.delete_operation request
|
|
351
|
+
#
|
|
352
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
353
|
+
# p result
|
|
354
|
+
#
|
|
290
355
|
def delete_operation request, options = nil
|
|
291
356
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
292
357
|
|
|
@@ -304,9 +369,11 @@ module Google
|
|
|
304
369
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
305
370
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
306
371
|
|
|
307
|
-
header_params = {
|
|
308
|
-
|
|
309
|
-
|
|
372
|
+
header_params = {}
|
|
373
|
+
if request.name
|
|
374
|
+
header_params["name"] = request.name
|
|
375
|
+
end
|
|
376
|
+
|
|
310
377
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
311
378
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
312
379
|
|
|
@@ -364,6 +431,21 @@ module Google
|
|
|
364
431
|
#
|
|
365
432
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
366
433
|
#
|
|
434
|
+
# @example Basic example
|
|
435
|
+
# require "google/longrunning"
|
|
436
|
+
#
|
|
437
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
438
|
+
# client = Google::Longrunning::Operations::Client.new
|
|
439
|
+
#
|
|
440
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
441
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
|
442
|
+
#
|
|
443
|
+
# # Call the cancel_operation method.
|
|
444
|
+
# result = client.cancel_operation request
|
|
445
|
+
#
|
|
446
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
447
|
+
# p result
|
|
448
|
+
#
|
|
367
449
|
def cancel_operation request, options = nil
|
|
368
450
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
369
451
|
|
|
@@ -381,9 +463,11 @@ module Google
|
|
|
381
463
|
gapic_version: ::Google::Cloud::Memcache::V1::VERSION
|
|
382
464
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
383
465
|
|
|
384
|
-
header_params = {
|
|
385
|
-
|
|
386
|
-
|
|
466
|
+
header_params = {}
|
|
467
|
+
if request.name
|
|
468
|
+
header_params["name"] = request.name
|
|
469
|
+
end
|
|
470
|
+
|
|
387
471
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
388
472
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
389
473
|
|
|
@@ -444,6 +528,28 @@ module Google
|
|
|
444
528
|
#
|
|
445
529
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
446
530
|
#
|
|
531
|
+
# @example Basic example
|
|
532
|
+
# require "google/longrunning"
|
|
533
|
+
#
|
|
534
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
535
|
+
# client = Google::Longrunning::Operations::Client.new
|
|
536
|
+
#
|
|
537
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
538
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
|
539
|
+
#
|
|
540
|
+
# # Call the wait_operation method.
|
|
541
|
+
# result = client.wait_operation request
|
|
542
|
+
#
|
|
543
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
544
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
545
|
+
# # for results. Here is how to block until completion:
|
|
546
|
+
# result.wait_until_done! timeout: 60
|
|
547
|
+
# if result.response?
|
|
548
|
+
# p result.response
|
|
549
|
+
# else
|
|
550
|
+
# puts "Error!"
|
|
551
|
+
# end
|
|
552
|
+
#
|
|
447
553
|
def wait_operation request, options = nil
|
|
448
554
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
449
555
|
|
|
@@ -10,6 +10,7 @@ require 'google/api/resource_pb'
|
|
|
10
10
|
require 'google/longrunning/operations_pb'
|
|
11
11
|
require 'google/protobuf/field_mask_pb'
|
|
12
12
|
require 'google/protobuf/timestamp_pb'
|
|
13
|
+
|
|
13
14
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
14
15
|
add_file("google/cloud/memcache/v1/cloud_memcache.proto", :syntax => :proto3) do
|
|
15
16
|
add_message "google.cloud.memcache.v1.Instance" do
|
|
@@ -41,7 +41,7 @@ module Google
|
|
|
41
41
|
# * `projects/my-memcached-project/locations/us-central1/instances/my-memcached`
|
|
42
42
|
class Service
|
|
43
43
|
|
|
44
|
-
include GRPC::GenericService
|
|
44
|
+
include ::GRPC::GenericService
|
|
45
45
|
|
|
46
46
|
self.marshal_class_method = :encode
|
|
47
47
|
self.unmarshal_class_method = :decode
|
|
@@ -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
|
|
@@ -44,7 +44,7 @@ module Google
|
|
|
44
44
|
# foo = any.unpack(Foo.class);
|
|
45
45
|
# }
|
|
46
46
|
#
|
|
47
|
-
#
|
|
47
|
+
# Example 3: Pack and unpack a message in Python.
|
|
48
48
|
#
|
|
49
49
|
# foo = Foo(...)
|
|
50
50
|
# any = Any()
|
|
@@ -54,7 +54,7 @@ module Google
|
|
|
54
54
|
# any.Unpack(foo)
|
|
55
55
|
# ...
|
|
56
56
|
#
|
|
57
|
-
#
|
|
57
|
+
# Example 4: Pack and unpack a message in Go
|
|
58
58
|
#
|
|
59
59
|
# foo := &pb.Foo{...}
|
|
60
60
|
# any, err := anypb.New(foo)
|
|
@@ -75,7 +75,7 @@ module Google
|
|
|
75
75
|
#
|
|
76
76
|
#
|
|
77
77
|
# JSON
|
|
78
|
-
#
|
|
78
|
+
#
|
|
79
79
|
# The JSON representation of an `Any` value uses the regular
|
|
80
80
|
# representation of the deserialized, embedded message, with an
|
|
81
81
|
# additional field `@type` which contains the type URL. Example:
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-memcache-v1
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.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-07-05 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.10'
|
|
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.10'
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: 2.a
|
|
@@ -50,28 +50,28 @@ dependencies:
|
|
|
50
50
|
requirements:
|
|
51
51
|
- - "~>"
|
|
52
52
|
- !ruby/object:Gem::Version
|
|
53
|
-
version: 1.
|
|
53
|
+
version: 1.26.1
|
|
54
54
|
type: :development
|
|
55
55
|
prerelease: false
|
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: 1.
|
|
60
|
+
version: 1.26.1
|
|
61
61
|
- !ruby/object:Gem::Dependency
|
|
62
62
|
name: minitest
|
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '5.
|
|
67
|
+
version: '5.16'
|
|
68
68
|
type: :development
|
|
69
69
|
prerelease: false
|
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
|
71
71
|
requirements:
|
|
72
72
|
- - "~>"
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: '5.
|
|
74
|
+
version: '5.16'
|
|
75
75
|
- !ruby/object:Gem::Dependency
|
|
76
76
|
name: minitest-focus
|
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -106,14 +106,14 @@ dependencies:
|
|
|
106
106
|
requirements:
|
|
107
107
|
- - ">="
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '
|
|
109
|
+
version: '13.0'
|
|
110
110
|
type: :development
|
|
111
111
|
prerelease: false
|
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
114
|
- - ">="
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '
|
|
116
|
+
version: '13.0'
|
|
117
117
|
- !ruby/object:Gem::Dependency
|
|
118
118
|
name: redcarpet
|
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -202,14 +202,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
202
202
|
requirements:
|
|
203
203
|
- - ">="
|
|
204
204
|
- !ruby/object:Gem::Version
|
|
205
|
-
version: '2.
|
|
205
|
+
version: '2.6'
|
|
206
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
207
|
requirements:
|
|
208
208
|
- - ">="
|
|
209
209
|
- !ruby/object:Gem::Version
|
|
210
210
|
version: '0'
|
|
211
211
|
requirements: []
|
|
212
|
-
rubygems_version: 3.
|
|
212
|
+
rubygems_version: 3.3.14
|
|
213
213
|
signing_key:
|
|
214
214
|
specification_version: 4
|
|
215
215
|
summary: API Client library for the Google Cloud Memorystore for Memcached V1 API
|