google-cloud-memcache-v1 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1bc6ad70ed40e55d1d4340a54c0f508971097955468c063e24db09792b6403b0
4
- data.tar.gz: 3067886824d642dacf03d7b87a2b7af3aae89ea48a05c3f97bc1ee3b1d2cea49
3
+ metadata.gz: 9d5b101df76e47180f366a6a5acc49c7de7963dfdae129935d69e6602234d6cc
4
+ data.tar.gz: 24951d294951436cb68e372826f2db88819ce0a9b566a559731ee9e4390231c9
5
5
  SHA512:
6
- metadata.gz: d848f3b0cf229dcc6b6a35848a75e2ff15872ec9007b73ed45546f94f0c303ffc3f0fff558075b95613cb0997633994cad4e8169b2c632be01cc9e615f4c06d3
7
- data.tar.gz: 836c5c947ca656741ea092d958eb7eb5f5ea844683cc8a36abc562f721bfff865289039e65a19dd8a6a5739f3ddf4cea10ecde152858793bf0d3ff9b823fe90e
6
+ metadata.gz: 4f85333ead1097df6ae3c8d5cc2782be2d7d15c3f81e9a7ae53ac98e62614678010f728394674d868a2983135ff72565d7f84f784501b1c423cfccb07428fc29
7
+ data.tar.gz: 5c0c96605b6b8cdf226e5657ba35b951a169da6ce21e3fdb309402323d3ed7be068ebd4f285aefa24efceb15d13267f3d092dcce0fcf616d3834d2b02debfa1e
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Google Cloud Memorystore for Memcached V1 API
2
2
 
3
- API Client library for the Google Cloud Memorystore for Memcached V1 API
3
+ Google Cloud Memorystore for Memcached API is used for creating and managing Memcached instances in GCP.
4
4
 
5
5
  Google Cloud Memorystore for Memcached API is used for creating and managing Memcached instances in GCP.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "gapic/config"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Memcache
24
+ ##
25
+ # @example Loading just the REST part of this package, including all its services, and instantiating a REST client
26
+ #
27
+ # require "google/cloud/memcache/v1/rest"
28
+ # client = ::Google::Cloud::Memcache::V1::CloudMemcache::Rest::Client.new
29
+ #
30
+ module V1
31
+ ##
32
+ # @private
33
+ # Initialize the mixin bindings configuration
34
+ #
35
+ def self.configure
36
+ @configure ||= begin
37
+ namespace = ["Google", "Cloud", "Memcache"]
38
+ parent_config = while namespace.any?
39
+ parent_name = namespace.join "::"
40
+ parent_const = const_get parent_name
41
+ break parent_const.configure if parent_const.respond_to? :configure
42
+ namespace.pop
43
+ end
44
+
45
+ default_config = Configuration.new parent_config
46
+ default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [
47
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
48
+ uri_method: :get,
49
+ uri_template: "/v1/{name}",
50
+ matches: [
51
+ ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
52
+ ],
53
+ body: nil
54
+ )
55
+ ]
56
+ default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [
57
+
58
+ Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation(
59
+ uri_method: :get,
60
+ uri_template: "/v1/{name}/locations",
61
+ matches: [
62
+ ["name", %r{^projects/[^/]+/?$}, false]
63
+ ],
64
+ body: nil
65
+ )
66
+ ]
67
+ default_config
68
+ end
69
+ yield @configure if block_given?
70
+ @configure
71
+ end
72
+
73
+ ##
74
+ # @private
75
+ # Configuration class for the google.cloud.memcache.v1 package.
76
+ #
77
+ # This class contains common configuration for all services
78
+ # of the google.cloud.memcache.v1 package.
79
+ #
80
+ # This configuration is for internal use of the client library classes,
81
+ # and it is not intended that the end-users will read or change it.
82
+ #
83
+ class Configuration
84
+ extend ::Gapic::Config
85
+
86
+ # @private
87
+ # Overrides for http bindings for the RPC of the mixins for this package.
88
+ # Services in this package should use these when creating clients for the mixin services.
89
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
90
+ config_attr :bindings_override, {}, ::Hash, nil
91
+
92
+ # @private
93
+ def initialize parent_config = nil
94
+ @parent_config = parent_config unless parent_config.nil?
95
+
96
+ yield self if block_given?
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/memcache/v1/cloud_memcache_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -92,6 +93,8 @@ module Google
92
93
 
93
94
  default_config.rpcs.apply_parameters.timeout = 1200.0
94
95
 
96
+ default_config.rpcs.reschedule_maintenance.timeout = 1200.0
97
+
95
98
  default_config
96
99
  end
97
100
  yield @configure if block_given?
@@ -167,6 +170,12 @@ module Google
167
170
  config.endpoint = @config.endpoint
168
171
  end
169
172
 
173
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
174
+ config.credentials = credentials
175
+ config.quota_project = @quota_project_id
176
+ config.endpoint = @config.endpoint
177
+ end
178
+
170
179
  @cloud_memcache_stub = ::Gapic::ServiceStub.new(
171
180
  ::Google::Cloud::Memcache::V1::CloudMemcache::Stub,
172
181
  credentials: credentials,
@@ -183,6 +192,13 @@ module Google
183
192
  #
184
193
  attr_reader :operations_client
185
194
 
195
+ ##
196
+ # Get the associated client for mix-in of the Locations.
197
+ #
198
+ # @return [Google::Cloud::Location::Locations::Client]
199
+ #
200
+ attr_reader :location_client
201
+
186
202
  # Service calls
187
203
 
188
204
  ##
@@ -211,16 +227,15 @@ module Google
211
227
  # The maximum number of items to return.
212
228
  #
213
229
  # If not specified, a default value of 1000 will be used by the service.
214
- # Regardless of the page_size value, the response may include a partial list
215
- # and a caller should only rely on response's
216
- # [next_page_token][CloudMemcache.ListInstancesResponse.next_page_token]
230
+ # Regardless of the `page_size` value, the response may include a partial
231
+ # list and a caller should only rely on response's
232
+ # {::Google::Cloud::Memcache::V1::ListInstancesResponse#next_page_token `next_page_token`}
217
233
  # to determine if there are more instances left to be queried.
218
234
  # @param page_token [::String]
219
- # The next_page_token value returned from a previous List request,
220
- # if any.
235
+ # The `next_page_token` value returned from a previous List request, if any.
221
236
  # @param filter [::String]
222
237
  # List filter. For example, exclude all Memcached instances with name as
223
- # my-instance by specifying "name != my-instance".
238
+ # my-instance by specifying `"name != my-instance"`.
224
239
  # @param order_by [::String]
225
240
  # Sort results. Supported values are "name", "name desc" or "" (unsorted).
226
241
  #
@@ -244,13 +259,11 @@ module Google
244
259
  # # Call the list_instances method.
245
260
  # result = client.list_instances request
246
261
  #
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|
262
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
263
+ # # over elements, and API calls will be issued to fetch pages as needed.
264
+ # result.each do |item|
252
265
  # # Each element is of type ::Google::Cloud::Memcache::V1::Instance.
253
- # p response
266
+ # p item
254
267
  # end
255
268
  #
256
269
  def list_instances request, options = nil
@@ -412,9 +425,9 @@ module Google
412
425
  # * Must start with a letter.
413
426
  # * Must be between 1-40 characters.
414
427
  # * Must end with a number or a letter.
415
- # * Must be unique within the user project / location
428
+ # * Must be unique within the user project / location.
416
429
  #
417
- # If any of the above are not met, will raise an invalid argument error.
430
+ # If any of the above are not met, the API raises an invalid argument error.
418
431
  # @param instance [::Google::Cloud::Memcache::V1::Instance, ::Hash]
419
432
  # Required. A Memcached Instance
420
433
  #
@@ -438,14 +451,14 @@ module Google
438
451
  # # Call the create_instance method.
439
452
  # result = client.create_instance request
440
453
  #
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:
454
+ # # The returned object is of type Gapic::Operation. You can use it to
455
+ # # check the status of an operation, cancel it, or wait for results.
456
+ # # Here is how to wait for a response.
444
457
  # result.wait_until_done! timeout: 60
445
458
  # if result.response?
446
459
  # p result.response
447
460
  # else
448
- # puts "Error!"
461
+ # puts "No response received."
449
462
  # end
450
463
  #
451
464
  def create_instance request, options = nil
@@ -510,6 +523,7 @@ module Google
510
523
  #
511
524
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
512
525
  # Required. Mask of fields to update.
526
+ #
513
527
  # * `displayName`
514
528
  # @param instance [::Google::Cloud::Memcache::V1::Instance, ::Hash]
515
529
  # Required. A Memcached Instance.
@@ -535,14 +549,14 @@ module Google
535
549
  # # Call the update_instance method.
536
550
  # result = client.update_instance request
537
551
  #
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:
552
+ # # The returned object is of type Gapic::Operation. You can use it to
553
+ # # check the status of an operation, cancel it, or wait for results.
554
+ # # Here is how to wait for a response.
541
555
  # result.wait_until_done! timeout: 60
542
556
  # if result.response?
543
557
  # p result.response
544
558
  # else
545
- # puts "Error!"
559
+ # puts "No response received."
546
560
  # end
547
561
  #
548
562
  def update_instance request, options = nil
@@ -588,9 +602,10 @@ module Google
588
602
  end
589
603
 
590
604
  ##
591
- # Updates the defined Memcached Parameters for an existing Instance.
605
+ # Updates the defined Memcached parameters for an existing instance.
592
606
  # This method only stages the parameters, it must be followed by
593
- # ApplyParameters to apply the parameters to nodes of the Memcached Instance.
607
+ # `ApplyParameters` to apply the parameters to nodes of the Memcached
608
+ # instance.
594
609
  #
595
610
  # @overload update_parameters(request, options = nil)
596
611
  # Pass arguments to `update_parameters` via a request object, either of type
@@ -635,14 +650,14 @@ module Google
635
650
  # # Call the update_parameters method.
636
651
  # result = client.update_parameters request
637
652
  #
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:
653
+ # # The returned object is of type Gapic::Operation. You can use it to
654
+ # # check the status of an operation, cancel it, or wait for results.
655
+ # # Here is how to wait for a response.
641
656
  # result.wait_until_done! timeout: 60
642
657
  # if result.response?
643
658
  # p result.response
644
659
  # else
645
- # puts "Error!"
660
+ # puts "No response received."
646
661
  # end
647
662
  #
648
663
  def update_parameters request, options = nil
@@ -730,14 +745,14 @@ module Google
730
745
  # # Call the delete_instance method.
731
746
  # result = client.delete_instance request
732
747
  #
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:
748
+ # # The returned object is of type Gapic::Operation. You can use it to
749
+ # # check the status of an operation, cancel it, or wait for results.
750
+ # # Here is how to wait for a response.
736
751
  # result.wait_until_done! timeout: 60
737
752
  # if result.response?
738
753
  # p result.response
739
754
  # else
740
- # puts "Error!"
755
+ # puts "No response received."
741
756
  # end
742
757
  #
743
758
  def delete_instance request, options = nil
@@ -783,7 +798,7 @@ module Google
783
798
  end
784
799
 
785
800
  ##
786
- # ApplyParameters will restart the set of specified nodes in order to update
801
+ # `ApplyParameters` restarts the set of specified nodes in order to update
787
802
  # them to the current set of parameters for the Memcached Instance.
788
803
  #
789
804
  # @overload apply_parameters(request, options = nil)
@@ -805,11 +820,11 @@ module Google
805
820
  # Required. Resource name of the Memcached instance for which parameter group updates
806
821
  # should be applied.
807
822
  # @param node_ids [::Array<::String>]
808
- # Nodes to which we should apply the instance-level parameter group.
823
+ # Nodes to which the instance-level parameter group is applied.
809
824
  # @param apply_all [::Boolean]
810
825
  # Whether to apply instance-level parameter group to all nodes. If set to
811
- # true, will explicitly restrict users from specifying any nodes, and apply
812
- # parameter group updates to all nodes within the instance.
826
+ # true, users are restricted from specifying individual nodes, and
827
+ # `ApplyParameters` updates all nodes within the instance.
813
828
  #
814
829
  # @yield [response, operation] Access the result along with the RPC operation
815
830
  # @yieldparam response [::Gapic::Operation]
@@ -831,14 +846,14 @@ module Google
831
846
  # # Call the apply_parameters method.
832
847
  # result = client.apply_parameters request
833
848
  #
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:
849
+ # # The returned object is of type Gapic::Operation. You can use it to
850
+ # # check the status of an operation, cancel it, or wait for results.
851
+ # # Here is how to wait for a response.
837
852
  # result.wait_until_done! timeout: 60
838
853
  # if result.response?
839
854
  # p result.response
840
855
  # else
841
- # puts "Error!"
856
+ # puts "No response received."
842
857
  # end
843
858
  #
844
859
  def apply_parameters request, options = nil
@@ -883,6 +898,107 @@ module Google
883
898
  raise ::Google::Cloud::Error.from_error(e)
884
899
  end
885
900
 
901
+ ##
902
+ # Reschedules upcoming maintenance event.
903
+ #
904
+ # @overload reschedule_maintenance(request, options = nil)
905
+ # Pass arguments to `reschedule_maintenance` via a request object, either of type
906
+ # {::Google::Cloud::Memcache::V1::RescheduleMaintenanceRequest} or an equivalent Hash.
907
+ #
908
+ # @param request [::Google::Cloud::Memcache::V1::RescheduleMaintenanceRequest, ::Hash]
909
+ # A request object representing the call parameters. Required. To specify no
910
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
911
+ # @param options [::Gapic::CallOptions, ::Hash]
912
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
913
+ #
914
+ # @overload reschedule_maintenance(instance: nil, reschedule_type: nil, schedule_time: nil)
915
+ # Pass arguments to `reschedule_maintenance` via keyword arguments. Note that at
916
+ # least one keyword argument is required. To specify no parameters, or to keep all
917
+ # the default parameter values, pass an empty Hash as a request object (see above).
918
+ #
919
+ # @param instance [::String]
920
+ # Required. Memcache instance resource name using the form:
921
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
922
+ # where `location_id` refers to a GCP region.
923
+ # @param reschedule_type [::Google::Cloud::Memcache::V1::RescheduleMaintenanceRequest::RescheduleType]
924
+ # Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
925
+ # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash]
926
+ # Timestamp when the maintenance shall be rescheduled to if
927
+ # reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
928
+ # example `2012-11-15T16:19:00.094Z`.
929
+ #
930
+ # @yield [response, operation] Access the result along with the RPC operation
931
+ # @yieldparam response [::Gapic::Operation]
932
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
933
+ #
934
+ # @return [::Gapic::Operation]
935
+ #
936
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
937
+ #
938
+ # @example Basic example
939
+ # require "google/cloud/memcache/v1"
940
+ #
941
+ # # Create a client object. The client can be reused for multiple calls.
942
+ # client = Google::Cloud::Memcache::V1::CloudMemcache::Client.new
943
+ #
944
+ # # Create a request. To set request fields, pass in keyword arguments.
945
+ # request = Google::Cloud::Memcache::V1::RescheduleMaintenanceRequest.new
946
+ #
947
+ # # Call the reschedule_maintenance method.
948
+ # result = client.reschedule_maintenance request
949
+ #
950
+ # # The returned object is of type Gapic::Operation. You can use it to
951
+ # # check the status of an operation, cancel it, or wait for results.
952
+ # # Here is how to wait for a response.
953
+ # result.wait_until_done! timeout: 60
954
+ # if result.response?
955
+ # p result.response
956
+ # else
957
+ # puts "No response received."
958
+ # end
959
+ #
960
+ def reschedule_maintenance request, options = nil
961
+ raise ::ArgumentError, "request must be provided" if request.nil?
962
+
963
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Memcache::V1::RescheduleMaintenanceRequest
964
+
965
+ # Converts hash and nil to an options object
966
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
967
+
968
+ # Customize the options with defaults
969
+ metadata = @config.rpcs.reschedule_maintenance.metadata.to_h
970
+
971
+ # Set x-goog-api-client and x-goog-user-project headers
972
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
973
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
974
+ gapic_version: ::Google::Cloud::Memcache::V1::VERSION
975
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
976
+
977
+ header_params = {}
978
+ if request.instance
979
+ header_params["instance"] = request.instance
980
+ end
981
+
982
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
983
+ metadata[:"x-goog-request-params"] ||= request_params_header
984
+
985
+ options.apply_defaults timeout: @config.rpcs.reschedule_maintenance.timeout,
986
+ metadata: metadata,
987
+ retry_policy: @config.rpcs.reschedule_maintenance.retry_policy
988
+
989
+ options.apply_defaults timeout: @config.timeout,
990
+ metadata: @config.metadata,
991
+ retry_policy: @config.retry_policy
992
+
993
+ @cloud_memcache_stub.call_rpc :reschedule_maintenance, request, options: options do |response, operation|
994
+ response = ::Gapic::Operation.new response, @operations_client, options: options
995
+ yield response, operation if block_given?
996
+ return response
997
+ end
998
+ rescue ::GRPC::BadStatus => e
999
+ raise ::Google::Cloud::Error.from_error(e)
1000
+ end
1001
+
886
1002
  ##
887
1003
  # Configuration class for the CloudMemcache API.
888
1004
  #
@@ -1053,6 +1169,11 @@ module Google
1053
1169
  # @return [::Gapic::Config::Method]
1054
1170
  #
1055
1171
  attr_reader :apply_parameters
1172
+ ##
1173
+ # RPC-specific configuration for `reschedule_maintenance`
1174
+ # @return [::Gapic::Config::Method]
1175
+ #
1176
+ attr_reader :reschedule_maintenance
1056
1177
 
1057
1178
  # @private
1058
1179
  def initialize parent_rpcs = nil
@@ -1070,6 +1191,8 @@ module Google
1070
1191
  @delete_instance = ::Gapic::Config::Method.new delete_instance_config
1071
1192
  apply_parameters_config = parent_rpcs.apply_parameters if parent_rpcs.respond_to? :apply_parameters
1072
1193
  @apply_parameters = ::Gapic::Config::Method.new apply_parameters_config
1194
+ reschedule_maintenance_config = parent_rpcs.reschedule_maintenance if parent_rpcs.respond_to? :reschedule_maintenance
1195
+ @reschedule_maintenance = ::Gapic::Config::Method.new reschedule_maintenance_config
1073
1196
 
1074
1197
  yield self if block_given?
1075
1198
  end
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
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|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
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:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
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:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil