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_health_check_services/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -136,9 +137,21 @@ module Google
136
137
  credentials = Credentials.new credentials, scope: @config.scope
137
138
  end
138
139
 
140
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
141
+ config.credentials = credentials
142
+ config.endpoint = @config.endpoint
143
+ end
144
+
139
145
  @region_health_check_services_stub = ::Google::Cloud::Compute::V1::RegionHealthCheckServices::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
140
146
  end
141
147
 
148
+ ##
149
+ # Get the associated client for long-running operations via RegionOperations.
150
+ #
151
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
152
+ #
153
+ attr_reader :region_operations
154
+
142
155
  # Service calls
143
156
 
144
157
  ##
@@ -170,10 +183,10 @@ module Google
170
183
  # @param request_id [::String]
171
184
  # 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).
172
185
  # @yield [result, response] Access the result along with the Faraday response object
173
- # @yieldparam result [::Gapic::Rest::BaseOperation]
186
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
174
187
  # @yieldparam response [::Faraday::Response]
175
188
  #
176
- # @return [::Gapic::Rest::BaseOperation]
189
+ # @return [::Gapic::GenericLRO::Operation]
177
190
  #
178
191
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
179
192
  def delete request, options = nil
@@ -200,7 +213,15 @@ module Google
200
213
  metadata: @config.metadata
201
214
 
202
215
  @region_health_check_services_stub.delete request, options do |result, response|
203
- result = ::Gapic::Rest::BaseOperation.new result
216
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
217
+ operation: result,
218
+ client: region_operations,
219
+ request_values: {
220
+ "project" => request.project,
221
+ "region" => request.region
222
+ },
223
+ options: options
224
+ )
204
225
  yield result, response if block_given?
205
226
  return result
206
227
  end
@@ -303,10 +324,10 @@ module Google
303
324
  # @param request_id [::String]
304
325
  # 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).
305
326
  # @yield [result, response] Access the result along with the Faraday response object
306
- # @yieldparam result [::Gapic::Rest::BaseOperation]
327
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
307
328
  # @yieldparam response [::Faraday::Response]
308
329
  #
309
- # @return [::Gapic::Rest::BaseOperation]
330
+ # @return [::Gapic::GenericLRO::Operation]
310
331
  #
311
332
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
312
333
  def insert request, options = nil
@@ -333,7 +354,15 @@ module Google
333
354
  metadata: @config.metadata
334
355
 
335
356
  @region_health_check_services_stub.insert request, options do |result, response|
336
- result = ::Gapic::Rest::BaseOperation.new result
357
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
358
+ operation: result,
359
+ client: region_operations,
360
+ request_values: {
361
+ "project" => request.project,
362
+ "region" => request.region
363
+ },
364
+ options: options
365
+ )
337
366
  yield result, response if block_given?
338
367
  return result
339
368
  end
@@ -363,7 +392,7 @@ module Google
363
392
  # the default parameter values, pass an empty Hash as a request object (see above).
364
393
  #
365
394
  # @param filter [::String]
366
- # 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) ```
395
+ # 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) ```
367
396
  # @param max_results [::Integer]
368
397
  # 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`)
369
398
  # @param order_by [::String]
@@ -447,10 +476,10 @@ module Google
447
476
  # @param request_id [::String]
448
477
  # 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).
449
478
  # @yield [result, response] Access the result along with the Faraday response object
450
- # @yieldparam result [::Gapic::Rest::BaseOperation]
479
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
451
480
  # @yieldparam response [::Faraday::Response]
452
481
  #
453
- # @return [::Gapic::Rest::BaseOperation]
482
+ # @return [::Gapic::GenericLRO::Operation]
454
483
  #
455
484
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
456
485
  def patch request, options = nil
@@ -477,7 +506,15 @@ module Google
477
506
  metadata: @config.metadata
478
507
 
479
508
  @region_health_check_services_stub.patch request, options do |result, response|
480
- result = ::Gapic::Rest::BaseOperation.new result
509
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
510
+ operation: result,
511
+ client: region_operations,
512
+ request_values: {
513
+ "project" => request.project,
514
+ "region" => request.region
515
+ },
516
+ options: options
517
+ )
481
518
  yield result, response if block_given?
482
519
  return result
483
520
  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_health_checks/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -138,9 +139,21 @@ module Google
138
139
  credentials = Credentials.new credentials, scope: @config.scope
139
140
  end
140
141
 
142
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.endpoint = @config.endpoint
145
+ end
146
+
141
147
  @region_health_checks_stub = ::Google::Cloud::Compute::V1::RegionHealthChecks::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
142
148
  end
143
149
 
150
+ ##
151
+ # Get the associated client for long-running operations via RegionOperations.
152
+ #
153
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
154
+ #
155
+ attr_reader :region_operations
156
+
144
157
  # Service calls
145
158
 
146
159
  ##
@@ -172,10 +185,10 @@ module Google
172
185
  # @param request_id [::String]
173
186
  # 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).
174
187
  # @yield [result, response] Access the result along with the Faraday response object
175
- # @yieldparam result [::Gapic::Rest::BaseOperation]
188
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
176
189
  # @yieldparam response [::Faraday::Response]
177
190
  #
178
- # @return [::Gapic::Rest::BaseOperation]
191
+ # @return [::Gapic::GenericLRO::Operation]
179
192
  #
180
193
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
181
194
  def delete request, options = nil
@@ -202,7 +215,15 @@ module Google
202
215
  metadata: @config.metadata
203
216
 
204
217
  @region_health_checks_stub.delete request, options do |result, response|
205
- result = ::Gapic::Rest::BaseOperation.new result
218
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
219
+ operation: result,
220
+ client: region_operations,
221
+ request_values: {
222
+ "project" => request.project,
223
+ "region" => request.region
224
+ },
225
+ options: options
226
+ )
206
227
  yield result, response if block_given?
207
228
  return result
208
229
  end
@@ -305,10 +326,10 @@ module Google
305
326
  # @param request_id [::String]
306
327
  # 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).
307
328
  # @yield [result, response] Access the result along with the Faraday response object
308
- # @yieldparam result [::Gapic::Rest::BaseOperation]
329
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
309
330
  # @yieldparam response [::Faraday::Response]
310
331
  #
311
- # @return [::Gapic::Rest::BaseOperation]
332
+ # @return [::Gapic::GenericLRO::Operation]
312
333
  #
313
334
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
314
335
  def insert request, options = nil
@@ -335,7 +356,15 @@ module Google
335
356
  metadata: @config.metadata
336
357
 
337
358
  @region_health_checks_stub.insert request, options do |result, response|
338
- result = ::Gapic::Rest::BaseOperation.new result
359
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
360
+ operation: result,
361
+ client: region_operations,
362
+ request_values: {
363
+ "project" => request.project,
364
+ "region" => request.region
365
+ },
366
+ options: options
367
+ )
339
368
  yield result, response if block_given?
340
369
  return result
341
370
  end
@@ -365,7 +394,7 @@ module Google
365
394
  # the default parameter values, pass an empty Hash as a request object (see above).
366
395
  #
367
396
  # @param filter [::String]
368
- # 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) ```
397
+ # 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) ```
369
398
  # @param max_results [::Integer]
370
399
  # 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`)
371
400
  # @param order_by [::String]
@@ -449,10 +478,10 @@ module Google
449
478
  # @param request_id [::String]
450
479
  # 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).
451
480
  # @yield [result, response] Access the result along with the Faraday response object
452
- # @yieldparam result [::Gapic::Rest::BaseOperation]
481
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
453
482
  # @yieldparam response [::Faraday::Response]
454
483
  #
455
- # @return [::Gapic::Rest::BaseOperation]
484
+ # @return [::Gapic::GenericLRO::Operation]
456
485
  #
457
486
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
458
487
  def patch request, options = nil
@@ -479,7 +508,15 @@ module Google
479
508
  metadata: @config.metadata
480
509
 
481
510
  @region_health_checks_stub.patch request, options do |result, response|
482
- result = ::Gapic::Rest::BaseOperation.new result
511
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
512
+ operation: result,
513
+ client: region_operations,
514
+ request_values: {
515
+ "project" => request.project,
516
+ "region" => request.region
517
+ },
518
+ options: options
519
+ )
483
520
  yield result, response if block_given?
484
521
  return result
485
522
  end
@@ -519,10 +556,10 @@ module Google
519
556
  # @param request_id [::String]
520
557
  # 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).
521
558
  # @yield [result, response] Access the result along with the Faraday response object
522
- # @yieldparam result [::Gapic::Rest::BaseOperation]
559
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
523
560
  # @yieldparam response [::Faraday::Response]
524
561
  #
525
- # @return [::Gapic::Rest::BaseOperation]
562
+ # @return [::Gapic::GenericLRO::Operation]
526
563
  #
527
564
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
528
565
  def update request, options = nil
@@ -549,7 +586,15 @@ module Google
549
586
  metadata: @config.metadata
550
587
 
551
588
  @region_health_checks_stub.update request, options do |result, response|
552
- result = ::Gapic::Rest::BaseOperation.new result
589
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
590
+ operation: result,
591
+ client: region_operations,
592
+ request_values: {
593
+ "project" => request.project,
594
+ "region" => request.region
595
+ },
596
+ options: options
597
+ )
553
598
  yield result, response if block_given?
554
599
  return result
555
600
  end