google-cloud-compute-v1 0.5.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +7 -25
  4. data/README.md +4 -4
  5. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
  6. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +37 -8
  7. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +59 -14
  8. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +158 -19
  9. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
  10. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +169 -23
  11. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
  12. data/lib/google/cloud/compute/v1/compute_pb.rb +534 -2
  13. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
  14. data/lib/google/cloud/compute/v1/disks/rest/client.rb +93 -24
  15. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +44 -10
  16. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +98 -31
  17. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +2 -2
  18. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +54 -13
  19. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +70 -17
  20. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
  21. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +64 -16
  22. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +55 -14
  23. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
  24. data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
  25. data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
  26. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  27. data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
  28. data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
  29. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +47 -13
  30. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +55 -14
  31. data/lib/google/cloud/compute/v1/images/rest/client.rb +64 -16
  32. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +172 -47
  33. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +71 -18
  34. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
  35. data/lib/google/cloud/compute/v1/instances/rest/client.rb +521 -96
  36. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +91 -0
  37. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +48 -11
  38. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  39. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +44 -10
  40. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
  41. data/lib/google/cloud/compute/v1/machine_images/credentials.rb +52 -0
  42. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +804 -0
  43. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
  44. data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
  45. data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
  46. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
  47. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
  48. data/lib/google/cloud/compute/v1/networks/rest/client.rb +85 -23
  49. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +82 -21
  50. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +37 -8
  51. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
  52. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +48 -11
  53. data/lib/google/cloud/compute/v1/projects/rest/client.rb +107 -31
  54. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +47 -13
  55. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +51 -14
  56. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +58 -13
  57. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +58 -13
  58. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +116 -5
  59. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
  60. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  61. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +92 -23
  62. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +47 -10
  63. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +58 -13
  64. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +171 -46
  65. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +26 -5
  66. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
  67. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +36 -7
  68. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +38 -9
  69. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  70. data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
  71. data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
  72. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +38 -9
  73. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +47 -10
  74. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +62 -17
  75. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +58 -13
  76. data/lib/google/cloud/compute/v1/regions/rest/client.rb +3 -3
  77. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +138 -11
  78. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
  79. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +37 -8
  80. data/lib/google/cloud/compute/v1/routers/rest/client.rb +60 -15
  81. data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
  82. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +75 -20
  83. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +51 -14
  84. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +116 -7
  85. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
  86. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +37 -10
  87. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +45 -11
  88. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +71 -18
  89. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +47 -13
  90. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +56 -15
  91. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -24
  92. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +37 -8
  93. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +92 -23
  94. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +74 -19
  95. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +54 -13
  96. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +37 -8
  97. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +65 -17
  98. data/lib/google/cloud/compute/v1/version.rb +1 -1
  99. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +48 -11
  100. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +37 -8
  101. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  102. data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
  103. data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
  104. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  105. data/lib/google/cloud/compute/v1.rb +3 -0
  106. data/proto_docs/README.md +1 -1
  107. data/proto_docs/google/api/resource.rb +10 -71
  108. data/proto_docs/google/cloud/compute/v1/compute.rb +1647 -330
  109. metadata +14 -7
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/compute/v1/compute_pb"
21
21
  require "google/cloud/compute/v1/region_instance_group_managers/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -167,9 +168,21 @@ module Google
167
168
  credentials = Credentials.new credentials, scope: @config.scope
168
169
  end
169
170
 
171
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
172
+ config.credentials = credentials
173
+ config.endpoint = @config.endpoint
174
+ end
175
+
170
176
  @region_instance_group_managers_stub = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
171
177
  end
172
178
 
179
+ ##
180
+ # Get the associated client for long-running operations via RegionOperations.
181
+ #
182
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
183
+ #
184
+ attr_reader :region_operations
185
+
173
186
  # Service calls
174
187
 
175
188
  ##
@@ -203,10 +216,10 @@ module Google
203
216
  # @param request_id [::String]
204
217
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
205
218
  # @yield [result, response] Access the result along with the Faraday response object
206
- # @yieldparam result [::Gapic::Rest::BaseOperation]
219
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
207
220
  # @yieldparam response [::Faraday::Response]
208
221
  #
209
- # @return [::Gapic::Rest::BaseOperation]
222
+ # @return [::Gapic::GenericLRO::Operation]
210
223
  #
211
224
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
212
225
  def abandon_instances request, options = nil
@@ -233,7 +246,15 @@ module Google
233
246
  metadata: @config.metadata
234
247
 
235
248
  @region_instance_group_managers_stub.abandon_instances request, options do |result, response|
236
- result = ::Gapic::Rest::BaseOperation.new result
249
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
250
+ operation: result,
251
+ client: region_operations,
252
+ request_values: {
253
+ "project" => request.project,
254
+ "region" => request.region
255
+ },
256
+ options: options
257
+ )
237
258
  yield result, response if block_given?
238
259
  return result
239
260
  end
@@ -271,10 +292,10 @@ module Google
271
292
  # @param region_instance_group_managers_apply_updates_request_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersApplyUpdatesRequest, ::Hash]
272
293
  # The body resource for this request
273
294
  # @yield [result, response] Access the result along with the Faraday response object
274
- # @yieldparam result [::Gapic::Rest::BaseOperation]
295
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
275
296
  # @yieldparam response [::Faraday::Response]
276
297
  #
277
- # @return [::Gapic::Rest::BaseOperation]
298
+ # @return [::Gapic::GenericLRO::Operation]
278
299
  #
279
300
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
280
301
  def apply_updates_to_instances request, options = nil
@@ -301,7 +322,15 @@ module Google
301
322
  metadata: @config.metadata
302
323
 
303
324
  @region_instance_group_managers_stub.apply_updates_to_instances request, options do |result, response|
304
- result = ::Gapic::Rest::BaseOperation.new result
325
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
326
+ operation: result,
327
+ client: region_operations,
328
+ request_values: {
329
+ "project" => request.project,
330
+ "region" => request.region
331
+ },
332
+ options: options
333
+ )
305
334
  yield result, response if block_given?
306
335
  return result
307
336
  end
@@ -341,10 +370,10 @@ module Google
341
370
  # @param request_id [::String]
342
371
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
343
372
  # @yield [result, response] Access the result along with the Faraday response object
344
- # @yieldparam result [::Gapic::Rest::BaseOperation]
373
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
345
374
  # @yieldparam response [::Faraday::Response]
346
375
  #
347
- # @return [::Gapic::Rest::BaseOperation]
376
+ # @return [::Gapic::GenericLRO::Operation]
348
377
  #
349
378
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
350
379
  def create_instances request, options = nil
@@ -371,7 +400,15 @@ module Google
371
400
  metadata: @config.metadata
372
401
 
373
402
  @region_instance_group_managers_stub.create_instances request, options do |result, response|
374
- result = ::Gapic::Rest::BaseOperation.new result
403
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
404
+ operation: result,
405
+ client: region_operations,
406
+ request_values: {
407
+ "project" => request.project,
408
+ "region" => request.region
409
+ },
410
+ options: options
411
+ )
375
412
  yield result, response if block_given?
376
413
  return result
377
414
  end
@@ -409,10 +446,10 @@ module Google
409
446
  # @param request_id [::String]
410
447
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
411
448
  # @yield [result, response] Access the result along with the Faraday response object
412
- # @yieldparam result [::Gapic::Rest::BaseOperation]
449
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
413
450
  # @yieldparam response [::Faraday::Response]
414
451
  #
415
- # @return [::Gapic::Rest::BaseOperation]
452
+ # @return [::Gapic::GenericLRO::Operation]
416
453
  #
417
454
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
418
455
  def delete request, options = nil
@@ -439,7 +476,15 @@ module Google
439
476
  metadata: @config.metadata
440
477
 
441
478
  @region_instance_group_managers_stub.delete request, options do |result, response|
442
- result = ::Gapic::Rest::BaseOperation.new result
479
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
480
+ operation: result,
481
+ client: region_operations,
482
+ request_values: {
483
+ "project" => request.project,
484
+ "region" => request.region
485
+ },
486
+ options: options
487
+ )
443
488
  yield result, response if block_given?
444
489
  return result
445
490
  end
@@ -479,10 +524,10 @@ module Google
479
524
  # @param request_id [::String]
480
525
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
481
526
  # @yield [result, response] Access the result along with the Faraday response object
482
- # @yieldparam result [::Gapic::Rest::BaseOperation]
527
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
483
528
  # @yieldparam response [::Faraday::Response]
484
529
  #
485
- # @return [::Gapic::Rest::BaseOperation]
530
+ # @return [::Gapic::GenericLRO::Operation]
486
531
  #
487
532
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
488
533
  def delete_instances request, options = nil
@@ -509,7 +554,15 @@ module Google
509
554
  metadata: @config.metadata
510
555
 
511
556
  @region_instance_group_managers_stub.delete_instances request, options do |result, response|
512
- result = ::Gapic::Rest::BaseOperation.new result
557
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
558
+ operation: result,
559
+ client: region_operations,
560
+ request_values: {
561
+ "project" => request.project,
562
+ "region" => request.region
563
+ },
564
+ options: options
565
+ )
513
566
  yield result, response if block_given?
514
567
  return result
515
568
  end
@@ -547,10 +600,10 @@ module Google
547
600
  # @param region_instance_group_manager_delete_instance_config_req_resource [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerDeleteInstanceConfigReq, ::Hash]
548
601
  # The body resource for this request
549
602
  # @yield [result, response] Access the result along with the Faraday response object
550
- # @yieldparam result [::Gapic::Rest::BaseOperation]
603
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
551
604
  # @yieldparam response [::Faraday::Response]
552
605
  #
553
- # @return [::Gapic::Rest::BaseOperation]
606
+ # @return [::Gapic::GenericLRO::Operation]
554
607
  #
555
608
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
556
609
  def delete_per_instance_configs request, options = nil
@@ -577,7 +630,15 @@ module Google
577
630
  metadata: @config.metadata
578
631
 
579
632
  @region_instance_group_managers_stub.delete_per_instance_configs request, options do |result, response|
580
- result = ::Gapic::Rest::BaseOperation.new result
633
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
634
+ operation: result,
635
+ client: region_operations,
636
+ request_values: {
637
+ "project" => request.project,
638
+ "region" => request.region
639
+ },
640
+ options: options
641
+ )
581
642
  yield result, response if block_given?
582
643
  return result
583
644
  end
@@ -680,10 +741,10 @@ module Google
680
741
  # @param request_id [::String]
681
742
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
682
743
  # @yield [result, response] Access the result along with the Faraday response object
683
- # @yieldparam result [::Gapic::Rest::BaseOperation]
744
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
684
745
  # @yieldparam response [::Faraday::Response]
685
746
  #
686
- # @return [::Gapic::Rest::BaseOperation]
747
+ # @return [::Gapic::GenericLRO::Operation]
687
748
  #
688
749
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
689
750
  def insert request, options = nil
@@ -710,7 +771,15 @@ module Google
710
771
  metadata: @config.metadata
711
772
 
712
773
  @region_instance_group_managers_stub.insert request, options do |result, response|
713
- result = ::Gapic::Rest::BaseOperation.new result
774
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
775
+ operation: result,
776
+ client: region_operations,
777
+ request_values: {
778
+ "project" => request.project,
779
+ "region" => request.region
780
+ },
781
+ options: options
782
+ )
714
783
  yield result, response if block_given?
715
784
  return result
716
785
  end
@@ -740,7 +809,7 @@ module Google
740
809
  # the default parameter values, pass an empty Hash as a request object (see above).
741
810
  #
742
811
  # @param filter [::String]
743
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
812
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
744
813
  # @param max_results [::Integer]
745
814
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
746
815
  # @param order_by [::String]
@@ -814,7 +883,7 @@ module Google
814
883
  # the default parameter values, pass an empty Hash as a request object (see above).
815
884
  #
816
885
  # @param filter [::String]
817
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
886
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
818
887
  # @param instance_group_manager [::String]
819
888
  # The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]\\{0,61}[a-z0-9])?)|1-9\\{0,19}.
820
889
  # @param max_results [::Integer]
@@ -890,7 +959,7 @@ module Google
890
959
  # the default parameter values, pass an empty Hash as a request object (see above).
891
960
  #
892
961
  # @param filter [::String]
893
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
962
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
894
963
  # @param instance_group_manager [::String]
895
964
  # The name of the managed instance group.
896
965
  # @param max_results [::Integer]
@@ -966,7 +1035,7 @@ module Google
966
1035
  # the default parameter values, pass an empty Hash as a request object (see above).
967
1036
  #
968
1037
  # @param filter [::String]
969
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
1038
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
970
1039
  # @param instance_group_manager [::String]
971
1040
  # The name of the managed instance group. It should conform to RFC1035.
972
1041
  # @param max_results [::Integer]
@@ -1052,10 +1121,10 @@ module Google
1052
1121
  # @param request_id [::String]
1053
1122
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1054
1123
  # @yield [result, response] Access the result along with the Faraday response object
1055
- # @yieldparam result [::Gapic::Rest::BaseOperation]
1124
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1056
1125
  # @yieldparam response [::Faraday::Response]
1057
1126
  #
1058
- # @return [::Gapic::Rest::BaseOperation]
1127
+ # @return [::Gapic::GenericLRO::Operation]
1059
1128
  #
1060
1129
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1061
1130
  def patch request, options = nil
@@ -1082,7 +1151,15 @@ module Google
1082
1151
  metadata: @config.metadata
1083
1152
 
1084
1153
  @region_instance_group_managers_stub.patch request, options do |result, response|
1085
- result = ::Gapic::Rest::BaseOperation.new result
1154
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1155
+ operation: result,
1156
+ client: region_operations,
1157
+ request_values: {
1158
+ "project" => request.project,
1159
+ "region" => request.region
1160
+ },
1161
+ options: options
1162
+ )
1086
1163
  yield result, response if block_given?
1087
1164
  return result
1088
1165
  end
@@ -1122,10 +1199,10 @@ module Google
1122
1199
  # @param request_id [::String]
1123
1200
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1124
1201
  # @yield [result, response] Access the result along with the Faraday response object
1125
- # @yieldparam result [::Gapic::Rest::BaseOperation]
1202
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1126
1203
  # @yieldparam response [::Faraday::Response]
1127
1204
  #
1128
- # @return [::Gapic::Rest::BaseOperation]
1205
+ # @return [::Gapic::GenericLRO::Operation]
1129
1206
  #
1130
1207
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1131
1208
  def patch_per_instance_configs request, options = nil
@@ -1152,7 +1229,15 @@ module Google
1152
1229
  metadata: @config.metadata
1153
1230
 
1154
1231
  @region_instance_group_managers_stub.patch_per_instance_configs request, options do |result, response|
1155
- result = ::Gapic::Rest::BaseOperation.new result
1232
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1233
+ operation: result,
1234
+ client: region_operations,
1235
+ request_values: {
1236
+ "project" => request.project,
1237
+ "region" => request.region
1238
+ },
1239
+ options: options
1240
+ )
1156
1241
  yield result, response if block_given?
1157
1242
  return result
1158
1243
  end
@@ -1192,10 +1277,10 @@ module Google
1192
1277
  # @param request_id [::String]
1193
1278
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1194
1279
  # @yield [result, response] Access the result along with the Faraday response object
1195
- # @yieldparam result [::Gapic::Rest::BaseOperation]
1280
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1196
1281
  # @yieldparam response [::Faraday::Response]
1197
1282
  #
1198
- # @return [::Gapic::Rest::BaseOperation]
1283
+ # @return [::Gapic::GenericLRO::Operation]
1199
1284
  #
1200
1285
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1201
1286
  def recreate_instances request, options = nil
@@ -1222,7 +1307,15 @@ module Google
1222
1307
  metadata: @config.metadata
1223
1308
 
1224
1309
  @region_instance_group_managers_stub.recreate_instances request, options do |result, response|
1225
- result = ::Gapic::Rest::BaseOperation.new result
1310
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1311
+ operation: result,
1312
+ client: region_operations,
1313
+ request_values: {
1314
+ "project" => request.project,
1315
+ "region" => request.region
1316
+ },
1317
+ options: options
1318
+ )
1226
1319
  yield result, response if block_given?
1227
1320
  return result
1228
1321
  end
@@ -1262,10 +1355,10 @@ module Google
1262
1355
  # @param size [::Integer]
1263
1356
  # Number of instances that should exist in this instance group manager.
1264
1357
  # @yield [result, response] Access the result along with the Faraday response object
1265
- # @yieldparam result [::Gapic::Rest::BaseOperation]
1358
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1266
1359
  # @yieldparam response [::Faraday::Response]
1267
1360
  #
1268
- # @return [::Gapic::Rest::BaseOperation]
1361
+ # @return [::Gapic::GenericLRO::Operation]
1269
1362
  #
1270
1363
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1271
1364
  def resize request, options = nil
@@ -1292,7 +1385,15 @@ module Google
1292
1385
  metadata: @config.metadata
1293
1386
 
1294
1387
  @region_instance_group_managers_stub.resize request, options do |result, response|
1295
- result = ::Gapic::Rest::BaseOperation.new result
1388
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1389
+ operation: result,
1390
+ client: region_operations,
1391
+ request_values: {
1392
+ "project" => request.project,
1393
+ "region" => request.region
1394
+ },
1395
+ options: options
1396
+ )
1296
1397
  yield result, response if block_given?
1297
1398
  return result
1298
1399
  end
@@ -1332,10 +1433,10 @@ module Google
1332
1433
  # @param request_id [::String]
1333
1434
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1334
1435
  # @yield [result, response] Access the result along with the Faraday response object
1335
- # @yieldparam result [::Gapic::Rest::BaseOperation]
1436
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1336
1437
  # @yieldparam response [::Faraday::Response]
1337
1438
  #
1338
- # @return [::Gapic::Rest::BaseOperation]
1439
+ # @return [::Gapic::GenericLRO::Operation]
1339
1440
  #
1340
1441
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1341
1442
  def set_instance_template request, options = nil
@@ -1362,7 +1463,15 @@ module Google
1362
1463
  metadata: @config.metadata
1363
1464
 
1364
1465
  @region_instance_group_managers_stub.set_instance_template request, options do |result, response|
1365
- result = ::Gapic::Rest::BaseOperation.new result
1466
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1467
+ operation: result,
1468
+ client: region_operations,
1469
+ request_values: {
1470
+ "project" => request.project,
1471
+ "region" => request.region
1472
+ },
1473
+ options: options
1474
+ )
1366
1475
  yield result, response if block_given?
1367
1476
  return result
1368
1477
  end
@@ -1402,10 +1511,10 @@ module Google
1402
1511
  # @param request_id [::String]
1403
1512
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1404
1513
  # @yield [result, response] Access the result along with the Faraday response object
1405
- # @yieldparam result [::Gapic::Rest::BaseOperation]
1514
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1406
1515
  # @yieldparam response [::Faraday::Response]
1407
1516
  #
1408
- # @return [::Gapic::Rest::BaseOperation]
1517
+ # @return [::Gapic::GenericLRO::Operation]
1409
1518
  #
1410
1519
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1411
1520
  def set_target_pools request, options = nil
@@ -1432,7 +1541,15 @@ module Google
1432
1541
  metadata: @config.metadata
1433
1542
 
1434
1543
  @region_instance_group_managers_stub.set_target_pools request, options do |result, response|
1435
- result = ::Gapic::Rest::BaseOperation.new result
1544
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1545
+ operation: result,
1546
+ client: region_operations,
1547
+ request_values: {
1548
+ "project" => request.project,
1549
+ "region" => request.region
1550
+ },
1551
+ options: options
1552
+ )
1436
1553
  yield result, response if block_given?
1437
1554
  return result
1438
1555
  end
@@ -1472,10 +1589,10 @@ module Google
1472
1589
  # @param request_id [::String]
1473
1590
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1474
1591
  # @yield [result, response] Access the result along with the Faraday response object
1475
- # @yieldparam result [::Gapic::Rest::BaseOperation]
1592
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
1476
1593
  # @yieldparam response [::Faraday::Response]
1477
1594
  #
1478
- # @return [::Gapic::Rest::BaseOperation]
1595
+ # @return [::Gapic::GenericLRO::Operation]
1479
1596
  #
1480
1597
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1481
1598
  def update_per_instance_configs request, options = nil
@@ -1502,7 +1619,15 @@ module Google
1502
1619
  metadata: @config.metadata
1503
1620
 
1504
1621
  @region_instance_group_managers_stub.update_per_instance_configs request, options do |result, response|
1505
- result = ::Gapic::Rest::BaseOperation.new result
1622
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
1623
+ operation: result,
1624
+ client: region_operations,
1625
+ request_values: {
1626
+ "project" => request.project,
1627
+ "region" => request.region
1628
+ },
1629
+ options: options
1630
+ )
1506
1631
  yield result, response if block_given?
1507
1632
  return result
1508
1633
  end
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/compute/v1/compute_pb"
21
21
  require "google/cloud/compute/v1/region_instance_groups/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -134,9 +135,21 @@ module Google
134
135
  credentials = Credentials.new credentials, scope: @config.scope
135
136
  end
136
137
 
138
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
139
+ config.credentials = credentials
140
+ config.endpoint = @config.endpoint
141
+ end
142
+
137
143
  @region_instance_groups_stub = ::Google::Cloud::Compute::V1::RegionInstanceGroups::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
138
144
  end
139
145
 
146
+ ##
147
+ # Get the associated client for long-running operations via RegionOperations.
148
+ #
149
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
150
+ #
151
+ attr_reader :region_operations
152
+
140
153
  # Service calls
141
154
 
142
155
  ##
@@ -225,7 +238,7 @@ module Google
225
238
  # the default parameter values, pass an empty Hash as a request object (see above).
226
239
  #
227
240
  # @param filter [::String]
228
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
241
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
229
242
  # @param max_results [::Integer]
230
243
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
231
244
  # @param order_by [::String]
@@ -299,7 +312,7 @@ module Google
299
312
  # the default parameter values, pass an empty Hash as a request object (see above).
300
313
  #
301
314
  # @param filter [::String]
302
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
315
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
303
316
  # @param instance_group [::String]
304
317
  # Name of the regional instance group for which we want to list the instances.
305
318
  # @param max_results [::Integer]
@@ -387,10 +400,10 @@ module Google
387
400
  # @param request_id [::String]
388
401
  # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
389
402
  # @yield [result, response] Access the result along with the Faraday response object
390
- # @yieldparam result [::Gapic::Rest::BaseOperation]
403
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
391
404
  # @yieldparam response [::Faraday::Response]
392
405
  #
393
- # @return [::Gapic::Rest::BaseOperation]
406
+ # @return [::Gapic::GenericLRO::Operation]
394
407
  #
395
408
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
396
409
  def set_named_ports request, options = nil
@@ -417,7 +430,15 @@ module Google
417
430
  metadata: @config.metadata
418
431
 
419
432
  @region_instance_groups_stub.set_named_ports request, options do |result, response|
420
- result = ::Gapic::Rest::BaseOperation.new result
433
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
434
+ operation: result,
435
+ client: region_operations,
436
+ request_values: {
437
+ "project" => request.project,
438
+ "region" => request.region
439
+ },
440
+ options: options
441
+ )
421
442
  yield result, response if block_given?
422
443
  return result
423
444
  end