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/target_tcp_proxies/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_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
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.endpoint = @config.endpoint
145
+ end
146
+
141
147
  @target_tcp_proxies_stub = ::Google::Cloud::Compute::V1::TargetTcpProxies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
142
148
  end
143
149
 
150
+ ##
151
+ # Get the associated client for long-running operations via GlobalOperations.
152
+ #
153
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
154
+ #
155
+ attr_reader :global_operations
156
+
144
157
  # Service calls
145
158
 
146
159
  ##
@@ -170,10 +183,10 @@ module Google
170
183
  # @param target_tcp_proxy [::String]
171
184
  # Name of the TargetTcpProxy resource to delete.
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,14 @@ module Google
200
213
  metadata: @config.metadata
201
214
 
202
215
  @target_tcp_proxies_stub.delete request, options do |result, response|
203
- result = ::Gapic::Rest::BaseOperation.new result
216
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
217
+ operation: result,
218
+ client: global_operations,
219
+ request_values: {
220
+ "project" => request.project
221
+ },
222
+ options: options
223
+ )
204
224
  yield result, response if block_given?
205
225
  return result
206
226
  end
@@ -299,10 +319,10 @@ module Google
299
319
  # @param target_tcp_proxy_resource [::Google::Cloud::Compute::V1::TargetTcpProxy, ::Hash]
300
320
  # The body resource for this request
301
321
  # @yield [result, response] Access the result along with the Faraday response object
302
- # @yieldparam result [::Gapic::Rest::BaseOperation]
322
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
303
323
  # @yieldparam response [::Faraday::Response]
304
324
  #
305
- # @return [::Gapic::Rest::BaseOperation]
325
+ # @return [::Gapic::GenericLRO::Operation]
306
326
  #
307
327
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
308
328
  def insert request, options = nil
@@ -329,7 +349,14 @@ module Google
329
349
  metadata: @config.metadata
330
350
 
331
351
  @target_tcp_proxies_stub.insert request, options do |result, response|
332
- result = ::Gapic::Rest::BaseOperation.new result
352
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
353
+ operation: result,
354
+ client: global_operations,
355
+ request_values: {
356
+ "project" => request.project
357
+ },
358
+ options: options
359
+ )
333
360
  yield result, response if block_given?
334
361
  return result
335
362
  end
@@ -359,7 +386,7 @@ module Google
359
386
  # the default parameter values, pass an empty Hash as a request object (see above).
360
387
  #
361
388
  # @param filter [::String]
362
- # 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) ```
389
+ # 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) ```
363
390
  # @param max_results [::Integer]
364
391
  # 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`)
365
392
  # @param order_by [::String]
@@ -439,10 +466,10 @@ module Google
439
466
  # @param target_tcp_proxy [::String]
440
467
  # Name of the TargetTcpProxy resource whose BackendService resource is to be set.
441
468
  # @yield [result, response] Access the result along with the Faraday response object
442
- # @yieldparam result [::Gapic::Rest::BaseOperation]
469
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
443
470
  # @yieldparam response [::Faraday::Response]
444
471
  #
445
- # @return [::Gapic::Rest::BaseOperation]
472
+ # @return [::Gapic::GenericLRO::Operation]
446
473
  #
447
474
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
448
475
  def set_backend_service request, options = nil
@@ -469,7 +496,14 @@ module Google
469
496
  metadata: @config.metadata
470
497
 
471
498
  @target_tcp_proxies_stub.set_backend_service request, options do |result, response|
472
- result = ::Gapic::Rest::BaseOperation.new result
499
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
500
+ operation: result,
501
+ client: global_operations,
502
+ request_values: {
503
+ "project" => request.project
504
+ },
505
+ options: options
506
+ )
473
507
  yield result, response if block_given?
474
508
  return result
475
509
  end
@@ -507,10 +541,10 @@ module Google
507
541
  # @param target_tcp_proxy [::String]
508
542
  # Name of the TargetTcpProxy resource whose ProxyHeader is to be set.
509
543
  # @yield [result, response] Access the result along with the Faraday response object
510
- # @yieldparam result [::Gapic::Rest::BaseOperation]
544
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
511
545
  # @yieldparam response [::Faraday::Response]
512
546
  #
513
- # @return [::Gapic::Rest::BaseOperation]
547
+ # @return [::Gapic::GenericLRO::Operation]
514
548
  #
515
549
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
516
550
  def set_proxy_header request, options = nil
@@ -537,7 +571,14 @@ module Google
537
571
  metadata: @config.metadata
538
572
 
539
573
  @target_tcp_proxies_stub.set_proxy_header request, options do |result, response|
540
- result = ::Gapic::Rest::BaseOperation.new result
574
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
575
+ operation: result,
576
+ client: global_operations,
577
+ request_values: {
578
+ "project" => request.project
579
+ },
580
+ options: options
581
+ )
541
582
  yield result, response if block_given?
542
583
  return result
543
584
  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/target_vpn_gateways/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -139,9 +140,21 @@ module Google
139
140
  credentials = Credentials.new credentials, scope: @config.scope
140
141
  end
141
142
 
143
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
144
+ config.credentials = credentials
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
142
148
  @target_vpn_gateways_stub = ::Google::Cloud::Compute::V1::TargetVpnGateways::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
143
149
  end
144
150
 
151
+ ##
152
+ # Get the associated client for long-running operations via RegionOperations.
153
+ #
154
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
155
+ #
156
+ attr_reader :region_operations
157
+
145
158
  # Service calls
146
159
 
147
160
  ##
@@ -165,7 +178,7 @@ module Google
165
178
  # the default parameter values, pass an empty Hash as a request object (see above).
166
179
  #
167
180
  # @param filter [::String]
168
- # 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) ```
181
+ # 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) ```
169
182
  # @param include_all_scopes [::Boolean]
170
183
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
171
184
  # @param max_results [::Integer]
@@ -247,10 +260,10 @@ module Google
247
260
  # @param target_vpn_gateway [::String]
248
261
  # Name of the target VPN gateway to delete.
249
262
  # @yield [result, response] Access the result along with the Faraday response object
250
- # @yieldparam result [::Gapic::Rest::BaseOperation]
263
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
251
264
  # @yieldparam response [::Faraday::Response]
252
265
  #
253
- # @return [::Gapic::Rest::BaseOperation]
266
+ # @return [::Gapic::GenericLRO::Operation]
254
267
  #
255
268
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
256
269
  def delete request, options = nil
@@ -277,7 +290,15 @@ module Google
277
290
  metadata: @config.metadata
278
291
 
279
292
  @target_vpn_gateways_stub.delete request, options do |result, response|
280
- result = ::Gapic::Rest::BaseOperation.new result
293
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
294
+ operation: result,
295
+ client: region_operations,
296
+ request_values: {
297
+ "project" => request.project,
298
+ "region" => request.region
299
+ },
300
+ options: options
301
+ )
281
302
  yield result, response if block_given?
282
303
  return result
283
304
  end
@@ -380,10 +401,10 @@ module Google
380
401
  # @param target_vpn_gateway_resource [::Google::Cloud::Compute::V1::TargetVpnGateway, ::Hash]
381
402
  # The body resource for this request
382
403
  # @yield [result, response] Access the result along with the Faraday response object
383
- # @yieldparam result [::Gapic::Rest::BaseOperation]
404
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
384
405
  # @yieldparam response [::Faraday::Response]
385
406
  #
386
- # @return [::Gapic::Rest::BaseOperation]
407
+ # @return [::Gapic::GenericLRO::Operation]
387
408
  #
388
409
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
389
410
  def insert request, options = nil
@@ -410,7 +431,15 @@ module Google
410
431
  metadata: @config.metadata
411
432
 
412
433
  @target_vpn_gateways_stub.insert request, options do |result, response|
413
- result = ::Gapic::Rest::BaseOperation.new result
434
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
435
+ operation: result,
436
+ client: region_operations,
437
+ request_values: {
438
+ "project" => request.project,
439
+ "region" => request.region
440
+ },
441
+ options: options
442
+ )
414
443
  yield result, response if block_given?
415
444
  return result
416
445
  end
@@ -440,7 +469,7 @@ module Google
440
469
  # the default parameter values, pass an empty Hash as a request object (see above).
441
470
  #
442
471
  # @param filter [::String]
443
- # 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) ```
472
+ # 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) ```
444
473
  # @param max_results [::Integer]
445
474
  # 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`)
446
475
  # @param order_by [::String]
@@ -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/url_maps/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -147,9 +148,21 @@ module Google
147
148
  credentials = Credentials.new credentials, scope: @config.scope
148
149
  end
149
150
 
151
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
152
+ config.credentials = credentials
153
+ config.endpoint = @config.endpoint
154
+ end
155
+
150
156
  @url_maps_stub = ::Google::Cloud::Compute::V1::UrlMaps::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
151
157
  end
152
158
 
159
+ ##
160
+ # Get the associated client for long-running operations via GlobalOperations.
161
+ #
162
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
163
+ #
164
+ attr_reader :global_operations
165
+
153
166
  # Service calls
154
167
 
155
168
  ##
@@ -173,7 +186,7 @@ module Google
173
186
  # the default parameter values, pass an empty Hash as a request object (see above).
174
187
  #
175
188
  # @param filter [::String]
176
- # 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) ```
189
+ # 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) ```
177
190
  # @param include_all_scopes [::Boolean]
178
191
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
179
192
  # @param max_results [::Integer]
@@ -253,10 +266,10 @@ module Google
253
266
  # @param url_map [::String]
254
267
  # Name of the UrlMap resource to delete.
255
268
  # @yield [result, response] Access the result along with the Faraday response object
256
- # @yieldparam result [::Gapic::Rest::BaseOperation]
269
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
257
270
  # @yieldparam response [::Faraday::Response]
258
271
  #
259
- # @return [::Gapic::Rest::BaseOperation]
272
+ # @return [::Gapic::GenericLRO::Operation]
260
273
  #
261
274
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
262
275
  def delete request, options = nil
@@ -283,7 +296,14 @@ module Google
283
296
  metadata: @config.metadata
284
297
 
285
298
  @url_maps_stub.delete request, options do |result, response|
286
- result = ::Gapic::Rest::BaseOperation.new result
299
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
300
+ operation: result,
301
+ client: global_operations,
302
+ request_values: {
303
+ "project" => request.project
304
+ },
305
+ options: options
306
+ )
287
307
  yield result, response if block_given?
288
308
  return result
289
309
  end
@@ -382,10 +402,10 @@ module Google
382
402
  # @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
383
403
  # The body resource for this request
384
404
  # @yield [result, response] Access the result along with the Faraday response object
385
- # @yieldparam result [::Gapic::Rest::BaseOperation]
405
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
386
406
  # @yieldparam response [::Faraday::Response]
387
407
  #
388
- # @return [::Gapic::Rest::BaseOperation]
408
+ # @return [::Gapic::GenericLRO::Operation]
389
409
  #
390
410
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
391
411
  def insert request, options = nil
@@ -412,7 +432,14 @@ module Google
412
432
  metadata: @config.metadata
413
433
 
414
434
  @url_maps_stub.insert request, options do |result, response|
415
- result = ::Gapic::Rest::BaseOperation.new result
435
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
436
+ operation: result,
437
+ client: global_operations,
438
+ request_values: {
439
+ "project" => request.project
440
+ },
441
+ options: options
442
+ )
416
443
  yield result, response if block_given?
417
444
  return result
418
445
  end
@@ -450,10 +477,10 @@ module Google
450
477
  # @param url_map [::String]
451
478
  # Name of the UrlMap scoping this request.
452
479
  # @yield [result, response] Access the result along with the Faraday response object
453
- # @yieldparam result [::Gapic::Rest::BaseOperation]
480
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
454
481
  # @yieldparam response [::Faraday::Response]
455
482
  #
456
- # @return [::Gapic::Rest::BaseOperation]
483
+ # @return [::Gapic::GenericLRO::Operation]
457
484
  #
458
485
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
459
486
  def invalidate_cache request, options = nil
@@ -480,7 +507,14 @@ module Google
480
507
  metadata: @config.metadata
481
508
 
482
509
  @url_maps_stub.invalidate_cache request, options do |result, response|
483
- result = ::Gapic::Rest::BaseOperation.new result
510
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
511
+ operation: result,
512
+ client: global_operations,
513
+ request_values: {
514
+ "project" => request.project
515
+ },
516
+ options: options
517
+ )
484
518
  yield result, response if block_given?
485
519
  return result
486
520
  end
@@ -510,7 +544,7 @@ module Google
510
544
  # the default parameter values, pass an empty Hash as a request object (see above).
511
545
  #
512
546
  # @param filter [::String]
513
- # 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) ```
547
+ # 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) ```
514
548
  # @param max_results [::Integer]
515
549
  # 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`)
516
550
  # @param order_by [::String]
@@ -590,10 +624,10 @@ module Google
590
624
  # @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
591
625
  # The body resource for this request
592
626
  # @yield [result, response] Access the result along with the Faraday response object
593
- # @yieldparam result [::Gapic::Rest::BaseOperation]
627
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
594
628
  # @yieldparam response [::Faraday::Response]
595
629
  #
596
- # @return [::Gapic::Rest::BaseOperation]
630
+ # @return [::Gapic::GenericLRO::Operation]
597
631
  #
598
632
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
599
633
  def patch request, options = nil
@@ -620,7 +654,14 @@ module Google
620
654
  metadata: @config.metadata
621
655
 
622
656
  @url_maps_stub.patch request, options do |result, response|
623
- result = ::Gapic::Rest::BaseOperation.new result
657
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
658
+ operation: result,
659
+ client: global_operations,
660
+ request_values: {
661
+ "project" => request.project
662
+ },
663
+ options: options
664
+ )
624
665
  yield result, response if block_given?
625
666
  return result
626
667
  end
@@ -658,10 +699,10 @@ module Google
658
699
  # @param url_map_resource [::Google::Cloud::Compute::V1::UrlMap, ::Hash]
659
700
  # The body resource for this request
660
701
  # @yield [result, response] Access the result along with the Faraday response object
661
- # @yieldparam result [::Gapic::Rest::BaseOperation]
702
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
662
703
  # @yieldparam response [::Faraday::Response]
663
704
  #
664
- # @return [::Gapic::Rest::BaseOperation]
705
+ # @return [::Gapic::GenericLRO::Operation]
665
706
  #
666
707
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
667
708
  def update request, options = nil
@@ -688,7 +729,14 @@ module Google
688
729
  metadata: @config.metadata
689
730
 
690
731
  @url_maps_stub.update request, options do |result, response|
691
- result = ::Gapic::Rest::BaseOperation.new result
732
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
733
+ operation: result,
734
+ client: global_operations,
735
+ request_values: {
736
+ "project" => request.project
737
+ },
738
+ options: options
739
+ )
692
740
  yield result, response if block_given?
693
741
  return result
694
742
  end
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Compute
23
23
  module V1
24
- VERSION = "0.5.0"
24
+ VERSION = "1.2.0"
25
25
  end
26
26
  end
27
27
  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/vpn_gateways/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -148,9 +149,21 @@ module Google
148
149
  credentials = Credentials.new credentials, scope: @config.scope
149
150
  end
150
151
 
152
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
153
+ config.credentials = credentials
154
+ config.endpoint = @config.endpoint
155
+ end
156
+
151
157
  @vpn_gateways_stub = ::Google::Cloud::Compute::V1::VpnGateways::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
152
158
  end
153
159
 
160
+ ##
161
+ # Get the associated client for long-running operations via RegionOperations.
162
+ #
163
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
164
+ #
165
+ attr_reader :region_operations
166
+
154
167
  # Service calls
155
168
 
156
169
  ##
@@ -174,7 +187,7 @@ module Google
174
187
  # the default parameter values, pass an empty Hash as a request object (see above).
175
188
  #
176
189
  # @param filter [::String]
177
- # 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) ```
190
+ # 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) ```
178
191
  # @param include_all_scopes [::Boolean]
179
192
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
180
193
  # @param max_results [::Integer]
@@ -256,10 +269,10 @@ module Google
256
269
  # @param vpn_gateway [::String]
257
270
  # Name of the VPN gateway to delete.
258
271
  # @yield [result, response] Access the result along with the Faraday response object
259
- # @yieldparam result [::Gapic::Rest::BaseOperation]
272
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
260
273
  # @yieldparam response [::Faraday::Response]
261
274
  #
262
- # @return [::Gapic::Rest::BaseOperation]
275
+ # @return [::Gapic::GenericLRO::Operation]
263
276
  #
264
277
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
265
278
  def delete request, options = nil
@@ -286,7 +299,15 @@ module Google
286
299
  metadata: @config.metadata
287
300
 
288
301
  @vpn_gateways_stub.delete request, options do |result, response|
289
- result = ::Gapic::Rest::BaseOperation.new result
302
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
303
+ operation: result,
304
+ client: region_operations,
305
+ request_values: {
306
+ "project" => request.project,
307
+ "region" => request.region
308
+ },
309
+ options: options
310
+ )
290
311
  yield result, response if block_given?
291
312
  return result
292
313
  end
@@ -454,10 +475,10 @@ module Google
454
475
  # @param vpn_gateway_resource [::Google::Cloud::Compute::V1::VpnGateway, ::Hash]
455
476
  # The body resource for this request
456
477
  # @yield [result, response] Access the result along with the Faraday response object
457
- # @yieldparam result [::Gapic::Rest::BaseOperation]
478
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
458
479
  # @yieldparam response [::Faraday::Response]
459
480
  #
460
- # @return [::Gapic::Rest::BaseOperation]
481
+ # @return [::Gapic::GenericLRO::Operation]
461
482
  #
462
483
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
463
484
  def insert request, options = nil
@@ -484,7 +505,15 @@ module Google
484
505
  metadata: @config.metadata
485
506
 
486
507
  @vpn_gateways_stub.insert request, options do |result, response|
487
- result = ::Gapic::Rest::BaseOperation.new result
508
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
509
+ operation: result,
510
+ client: region_operations,
511
+ request_values: {
512
+ "project" => request.project,
513
+ "region" => request.region
514
+ },
515
+ options: options
516
+ )
488
517
  yield result, response if block_given?
489
518
  return result
490
519
  end
@@ -514,7 +543,7 @@ module Google
514
543
  # the default parameter values, pass an empty Hash as a request object (see above).
515
544
  #
516
545
  # @param filter [::String]
517
- # 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) ```
546
+ # 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) ```
518
547
  # @param max_results [::Integer]
519
548
  # 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`)
520
549
  # @param order_by [::String]
@@ -598,10 +627,10 @@ module Google
598
627
  # @param resource [::String]
599
628
  # Name or id of the resource for this request.
600
629
  # @yield [result, response] Access the result along with the Faraday response object
601
- # @yieldparam result [::Gapic::Rest::BaseOperation]
630
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
602
631
  # @yieldparam response [::Faraday::Response]
603
632
  #
604
- # @return [::Gapic::Rest::BaseOperation]
633
+ # @return [::Gapic::GenericLRO::Operation]
605
634
  #
606
635
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
607
636
  def set_labels request, options = nil
@@ -628,7 +657,15 @@ module Google
628
657
  metadata: @config.metadata
629
658
 
630
659
  @vpn_gateways_stub.set_labels request, options do |result, response|
631
- result = ::Gapic::Rest::BaseOperation.new result
660
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
661
+ operation: result,
662
+ client: region_operations,
663
+ request_values: {
664
+ "project" => request.project,
665
+ "region" => request.region
666
+ },
667
+ options: options
668
+ )
632
669
  yield result, response if block_given?
633
670
  return result
634
671
  end