google-cloud-compute-v1 1.0.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
  4. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +37 -8
  5. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +59 -14
  6. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +158 -19
  7. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +46 -0
  8. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +169 -23
  9. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +46 -0
  10. data/lib/google/cloud/compute/v1/compute_pb.rb +1117 -9
  11. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
  12. data/lib/google/cloud/compute/v1/disks/rest/client.rb +94 -25
  13. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +44 -10
  14. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +98 -31
  15. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +1 -1
  16. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +54 -13
  17. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +70 -17
  18. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
  19. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +64 -16
  20. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +55 -14
  21. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
  22. data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
  23. data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
  24. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  25. data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
  26. data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
  27. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +47 -13
  28. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +55 -14
  29. data/lib/google/cloud/compute/v1/images/rest/client.rb +64 -16
  30. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +172 -47
  31. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +71 -18
  32. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
  33. data/lib/google/cloud/compute/v1/instances/rest/client.rb +524 -97
  34. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +91 -0
  35. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +48 -11
  36. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  37. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +44 -10
  38. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
  39. data/lib/google/cloud/compute/v1/machine_images/credentials.rb +52 -0
  40. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +804 -0
  41. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +363 -0
  42. data/lib/google/cloud/compute/v1/machine_images/rest.rb +33 -0
  43. data/lib/google/cloud/compute/v1/machine_images.rb +44 -0
  44. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
  45. data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
  46. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
  47. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +279 -0
  48. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
  49. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +44 -0
  50. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
  51. data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
  52. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
  53. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +778 -0
  54. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
  55. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +44 -0
  56. data/lib/google/cloud/compute/v1/networks/rest/client.rb +85 -23
  57. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +82 -21
  58. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +37 -8
  59. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
  60. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +48 -11
  61. data/lib/google/cloud/compute/v1/projects/rest/client.rb +107 -31
  62. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +47 -13
  63. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +51 -14
  64. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +58 -13
  65. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +58 -13
  66. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +116 -5
  67. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +48 -0
  68. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  69. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +92 -23
  70. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +47 -10
  71. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +58 -13
  72. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +171 -46
  73. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +26 -5
  74. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
  75. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +36 -7
  76. data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
  77. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
  78. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +823 -0
  79. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
  80. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +44 -0
  81. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +38 -9
  82. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  83. data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
  84. data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
  85. data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
  86. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
  87. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +276 -0
  88. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
  89. data/lib/google/cloud/compute/v1/region_security_policies.rb +44 -0
  90. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +38 -9
  91. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +47 -10
  92. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +149 -17
  93. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +46 -0
  94. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +58 -13
  95. data/lib/google/cloud/compute/v1/regions/rest/client.rb +3 -3
  96. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +138 -11
  97. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +48 -0
  98. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +37 -8
  99. data/lib/google/cloud/compute/v1/routers/rest/client.rb +60 -15
  100. data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
  101. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +161 -20
  102. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +50 -0
  103. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +51 -14
  104. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +116 -7
  105. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +46 -0
  106. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +37 -10
  107. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +45 -11
  108. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +71 -18
  109. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +47 -13
  110. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +56 -15
  111. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -24
  112. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +37 -8
  113. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +92 -23
  114. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +74 -19
  115. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +54 -13
  116. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +37 -8
  117. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +65 -17
  118. data/lib/google/cloud/compute/v1/version.rb +1 -1
  119. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +48 -11
  120. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +37 -8
  121. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  122. data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
  123. data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
  124. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  125. data/lib/google/cloud/compute/v1.rb +7 -0
  126. data/proto_docs/google/cloud/compute/v1/compute.rb +3236 -422
  127. metadata +32 -3
@@ -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/reservations/rest/service_stub"
22
+ require "google/cloud/compute/v1/zone_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -94,6 +95,8 @@ module Google
94
95
 
95
96
  default_config.rpcs.test_iam_permissions.timeout = 600.0
96
97
 
98
+ default_config.rpcs.update.timeout = 600.0
99
+
97
100
  default_config
98
101
  end
99
102
  yield @configure if block_given?
@@ -150,9 +153,21 @@ module Google
150
153
  credentials = Credentials.new credentials, scope: @config.scope
151
154
  end
152
155
 
156
+ @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
157
+ config.credentials = credentials
158
+ config.endpoint = @config.endpoint
159
+ end
160
+
153
161
  @reservations_stub = ::Google::Cloud::Compute::V1::Reservations::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
154
162
  end
155
163
 
164
+ ##
165
+ # Get the associated client for long-running operations via ZoneOperations.
166
+ #
167
+ # @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
168
+ #
169
+ attr_reader :zone_operations
170
+
156
171
  # Service calls
157
172
 
158
173
  ##
@@ -176,7 +191,7 @@ module Google
176
191
  # the default parameter values, pass an empty Hash as a request object (see above).
177
192
  #
178
193
  # @param filter [::String]
179
- # 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) ```
194
+ # 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) ```
180
195
  # @param include_all_scopes [::Boolean]
181
196
  # 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.
182
197
  # @param max_results [::Integer]
@@ -258,10 +273,10 @@ module Google
258
273
  # @param zone [::String]
259
274
  # Name of the zone for this request.
260
275
  # @yield [result, response] Access the result along with the Faraday response object
261
- # @yieldparam result [::Gapic::Rest::BaseOperation]
276
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
262
277
  # @yieldparam response [::Faraday::Response]
263
278
  #
264
- # @return [::Gapic::Rest::BaseOperation]
279
+ # @return [::Gapic::GenericLRO::Operation]
265
280
  #
266
281
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
267
282
  def delete request, options = nil
@@ -288,7 +303,15 @@ module Google
288
303
  metadata: @config.metadata
289
304
 
290
305
  @reservations_stub.delete request, options do |result, response|
291
- result = ::Gapic::Rest::BaseOperation.new result
306
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
307
+ operation: result,
308
+ client: zone_operations,
309
+ request_values: {
310
+ "project" => request.project,
311
+ "zone" => request.zone
312
+ },
313
+ options: options
314
+ )
292
315
  yield result, response if block_given?
293
316
  return result
294
317
  end
@@ -458,10 +481,10 @@ module Google
458
481
  # @param zone [::String]
459
482
  # Name of the zone for this request.
460
483
  # @yield [result, response] Access the result along with the Faraday response object
461
- # @yieldparam result [::Gapic::Rest::BaseOperation]
484
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
462
485
  # @yieldparam response [::Faraday::Response]
463
486
  #
464
- # @return [::Gapic::Rest::BaseOperation]
487
+ # @return [::Gapic::GenericLRO::Operation]
465
488
  #
466
489
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
467
490
  def insert request, options = nil
@@ -488,7 +511,15 @@ module Google
488
511
  metadata: @config.metadata
489
512
 
490
513
  @reservations_stub.insert request, options do |result, response|
491
- result = ::Gapic::Rest::BaseOperation.new result
514
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
515
+ operation: result,
516
+ client: zone_operations,
517
+ request_values: {
518
+ "project" => request.project,
519
+ "zone" => request.zone
520
+ },
521
+ options: options
522
+ )
492
523
  yield result, response if block_given?
493
524
  return result
494
525
  end
@@ -518,7 +549,7 @@ module Google
518
549
  # the default parameter values, pass an empty Hash as a request object (see above).
519
550
  #
520
551
  # @param filter [::String]
521
- # 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) ```
552
+ # 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) ```
522
553
  # @param max_results [::Integer]
523
554
  # 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`)
524
555
  # @param order_by [::String]
@@ -602,10 +633,10 @@ module Google
602
633
  # @param zone [::String]
603
634
  # Name of the zone for this request.
604
635
  # @yield [result, response] Access the result along with the Faraday response object
605
- # @yieldparam result [::Gapic::Rest::BaseOperation]
636
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
606
637
  # @yieldparam response [::Faraday::Response]
607
638
  #
608
- # @return [::Gapic::Rest::BaseOperation]
639
+ # @return [::Gapic::GenericLRO::Operation]
609
640
  #
610
641
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
611
642
  def resize request, options = nil
@@ -632,7 +663,15 @@ module Google
632
663
  metadata: @config.metadata
633
664
 
634
665
  @reservations_stub.resize request, options do |result, response|
635
- result = ::Gapic::Rest::BaseOperation.new result
666
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
667
+ operation: result,
668
+ client: zone_operations,
669
+ request_values: {
670
+ "project" => request.project,
671
+ "zone" => request.zone
672
+ },
673
+ options: options
674
+ )
636
675
  yield result, response if block_given?
637
676
  return result
638
677
  end
@@ -775,6 +814,87 @@ module Google
775
814
  raise ::Google::Cloud::Error.from_error(gapic_error)
776
815
  end
777
816
 
817
+ ##
818
+ # Update share settings of the reservation.
819
+ #
820
+ # @overload update(request, options = nil)
821
+ # Pass arguments to `update` via a request object, either of type
822
+ # {::Google::Cloud::Compute::V1::UpdateReservationRequest} or an equivalent Hash.
823
+ #
824
+ # @param request [::Google::Cloud::Compute::V1::UpdateReservationRequest, ::Hash]
825
+ # A request object representing the call parameters. Required. To specify no
826
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
827
+ # @param options [::Gapic::CallOptions, ::Hash]
828
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
829
+ # Note: currently retry functionality is not implemented. While it is possible
830
+ # to set it using ::Gapic::CallOptions, it will not be applied
831
+ #
832
+ # @overload update(paths: nil, project: nil, request_id: nil, reservation: nil, reservation_resource: nil, update_mask: nil, zone: nil)
833
+ # Pass arguments to `update` via keyword arguments. Note that at
834
+ # least one keyword argument is required. To specify no parameters, or to keep all
835
+ # the default parameter values, pass an empty Hash as a request object (see above).
836
+ #
837
+ # @param paths [::String]
838
+ # @param project [::String]
839
+ # Project ID for this request.
840
+ # @param request_id [::String]
841
+ # 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).
842
+ # @param reservation [::String]
843
+ # Name of the reservation to update.
844
+ # @param reservation_resource [::Google::Cloud::Compute::V1::Reservation, ::Hash]
845
+ # The body resource for this request
846
+ # @param update_mask [::String]
847
+ # Update_mask indicates fields to be updated as part of this request.
848
+ # @param zone [::String]
849
+ # Name of the zone for this request.
850
+ # @yield [result, response] Access the result along with the Faraday response object
851
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
852
+ # @yieldparam response [::Faraday::Response]
853
+ #
854
+ # @return [::Gapic::GenericLRO::Operation]
855
+ #
856
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
857
+ def update request, options = nil
858
+ raise ::ArgumentError, "request must be provided" if request.nil?
859
+
860
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::UpdateReservationRequest
861
+
862
+ # Converts hash and nil to an options object
863
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
864
+
865
+ # Customize the options with defaults
866
+ call_metadata = @config.rpcs.update.metadata.to_h
867
+
868
+ # Set x-goog-api-client header
869
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
870
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
871
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
872
+ transports_version_send: [:rest]
873
+
874
+ options.apply_defaults timeout: @config.rpcs.update.timeout,
875
+ metadata: call_metadata
876
+
877
+ options.apply_defaults timeout: @config.timeout,
878
+ metadata: @config.metadata
879
+
880
+ @reservations_stub.update request, options do |result, response|
881
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
882
+ operation: result,
883
+ client: zone_operations,
884
+ request_values: {
885
+ "project" => request.project,
886
+ "zone" => request.zone
887
+ },
888
+ options: options
889
+ )
890
+ yield result, response if block_given?
891
+ return result
892
+ end
893
+ rescue ::Faraday::Error => e
894
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
895
+ raise ::Google::Cloud::Error.from_error(gapic_error)
896
+ end
897
+
778
898
  ##
779
899
  # Configuration class for the Reservations REST API.
780
900
  #
@@ -919,6 +1039,11 @@ module Google
919
1039
  # @return [::Gapic::Config::Method]
920
1040
  #
921
1041
  attr_reader :test_iam_permissions
1042
+ ##
1043
+ # RPC-specific configuration for `update`
1044
+ # @return [::Gapic::Config::Method]
1045
+ #
1046
+ attr_reader :update
922
1047
 
923
1048
  # @private
924
1049
  def initialize parent_rpcs = nil
@@ -940,6 +1065,8 @@ module Google
940
1065
  @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
941
1066
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
942
1067
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
1068
+ update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
1069
+ @update = ::Gapic::Config::Method.new update_config
943
1070
 
944
1071
  yield self if block_given?
945
1072
  end
@@ -449,6 +449,54 @@ module Google
449
449
 
450
450
  [uri, body, query_string_params]
451
451
  end
452
+
453
+ ##
454
+ # Baseline implementation for the update REST call
455
+ #
456
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateReservationRequest]
457
+ # A request object representing the call parameters. Required.
458
+ # @param options [::Gapic::CallOptions]
459
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
460
+ #
461
+ # @yield [result, response] Access the result along with the Faraday response object
462
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
463
+ # @yieldparam response [::Faraday::Response]
464
+ #
465
+ # @return [::Google::Cloud::Compute::V1::Operation]
466
+ # A result object deserialized from the server's reply
467
+ def update request_pb, options = nil
468
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
469
+
470
+ uri, body, query_string_params = transcode_update_request request_pb
471
+ response = @client_stub.make_patch_request(
472
+ uri: uri,
473
+ body: body,
474
+ params: query_string_params,
475
+ options: options
476
+ )
477
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
478
+
479
+ yield result, response if block_given?
480
+ result
481
+ end
482
+
483
+ ##
484
+ # GRPC transcoding helper method for the update REST call
485
+ #
486
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateReservationRequest]
487
+ # A request object representing the call parameters. Required.
488
+ # @return [Array(String, [String, nil], Hash{String => String})]
489
+ # Uri, Body, Query string parameters
490
+ def transcode_update_request request_pb
491
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/reservations/#{request_pb.reservation}"
492
+ body = request_pb.reservation_resource.to_json
493
+ query_string_params = {}
494
+ query_string_params["paths"] = request_pb.paths.to_s if request_pb.has_paths?
495
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
496
+ query_string_params["updateMask"] = request_pb.update_mask.to_s if request_pb.has_update_mask?
497
+
498
+ [uri, body, query_string_params]
499
+ end
452
500
  end
453
501
  end
454
502
  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/resource_policies/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
  @resource_policies_stub = ::Google::Cloud::Compute::V1::ResourcePolicies::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 resource_policy [::String]
257
270
  # Name of the resource policy 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
  @resource_policies_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
@@ -456,10 +477,10 @@ module Google
456
477
  # @param resource_policy_resource [::Google::Cloud::Compute::V1::ResourcePolicy, ::Hash]
457
478
  # The body resource for this request
458
479
  # @yield [result, response] Access the result along with the Faraday response object
459
- # @yieldparam result [::Gapic::Rest::BaseOperation]
480
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
460
481
  # @yieldparam response [::Faraday::Response]
461
482
  #
462
- # @return [::Gapic::Rest::BaseOperation]
483
+ # @return [::Gapic::GenericLRO::Operation]
463
484
  #
464
485
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
465
486
  def insert request, options = nil
@@ -486,7 +507,15 @@ module Google
486
507
  metadata: @config.metadata
487
508
 
488
509
  @resource_policies_stub.insert request, options do |result, response|
489
- result = ::Gapic::Rest::BaseOperation.new result
510
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
511
+ operation: result,
512
+ client: region_operations,
513
+ request_values: {
514
+ "project" => request.project,
515
+ "region" => request.region
516
+ },
517
+ options: options
518
+ )
490
519
  yield result, response if block_given?
491
520
  return result
492
521
  end
@@ -516,7 +545,7 @@ module Google
516
545
  # the default parameter values, pass an empty Hash as a request object (see above).
517
546
  #
518
547
  # @param filter [::String]
519
- # 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) ```
548
+ # 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) ```
520
549
  # @param max_results [::Integer]
521
550
  # 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`)
522
551
  # @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/routers/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -155,9 +156,21 @@ module Google
155
156
  credentials = Credentials.new credentials, scope: @config.scope
156
157
  end
157
158
 
159
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
160
+ config.credentials = credentials
161
+ config.endpoint = @config.endpoint
162
+ end
163
+
158
164
  @routers_stub = ::Google::Cloud::Compute::V1::Routers::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
159
165
  end
160
166
 
167
+ ##
168
+ # Get the associated client for long-running operations via RegionOperations.
169
+ #
170
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
171
+ #
172
+ attr_reader :region_operations
173
+
161
174
  # Service calls
162
175
 
163
176
  ##
@@ -181,7 +194,7 @@ module Google
181
194
  # the default parameter values, pass an empty Hash as a request object (see above).
182
195
  #
183
196
  # @param filter [::String]
184
- # 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) ```
197
+ # 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) ```
185
198
  # @param include_all_scopes [::Boolean]
186
199
  # 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.
187
200
  # @param max_results [::Integer]
@@ -263,10 +276,10 @@ module Google
263
276
  # @param router [::String]
264
277
  # Name of the Router resource to delete.
265
278
  # @yield [result, response] Access the result along with the Faraday response object
266
- # @yieldparam result [::Gapic::Rest::BaseOperation]
279
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
267
280
  # @yieldparam response [::Faraday::Response]
268
281
  #
269
- # @return [::Gapic::Rest::BaseOperation]
282
+ # @return [::Gapic::GenericLRO::Operation]
270
283
  #
271
284
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
272
285
  def delete request, options = nil
@@ -293,7 +306,15 @@ module Google
293
306
  metadata: @config.metadata
294
307
 
295
308
  @routers_stub.delete request, options do |result, response|
296
- result = ::Gapic::Rest::BaseOperation.new result
309
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
310
+ operation: result,
311
+ client: region_operations,
312
+ request_values: {
313
+ "project" => request.project,
314
+ "region" => request.region
315
+ },
316
+ options: options
317
+ )
297
318
  yield result, response if block_given?
298
319
  return result
299
320
  end
@@ -388,7 +409,7 @@ module Google
388
409
  # the default parameter values, pass an empty Hash as a request object (see above).
389
410
  #
390
411
  # @param filter [::String]
391
- # 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) ```
412
+ # 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) ```
392
413
  # @param max_results [::Integer]
393
414
  # 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`)
394
415
  # @param order_by [::String]
@@ -537,10 +558,10 @@ module Google
537
558
  # @param router_resource [::Google::Cloud::Compute::V1::Router, ::Hash]
538
559
  # The body resource for this request
539
560
  # @yield [result, response] Access the result along with the Faraday response object
540
- # @yieldparam result [::Gapic::Rest::BaseOperation]
561
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
541
562
  # @yieldparam response [::Faraday::Response]
542
563
  #
543
- # @return [::Gapic::Rest::BaseOperation]
564
+ # @return [::Gapic::GenericLRO::Operation]
544
565
  #
545
566
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
546
567
  def insert request, options = nil
@@ -567,7 +588,15 @@ module Google
567
588
  metadata: @config.metadata
568
589
 
569
590
  @routers_stub.insert request, options do |result, response|
570
- result = ::Gapic::Rest::BaseOperation.new result
591
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
592
+ operation: result,
593
+ client: region_operations,
594
+ request_values: {
595
+ "project" => request.project,
596
+ "region" => request.region
597
+ },
598
+ options: options
599
+ )
571
600
  yield result, response if block_given?
572
601
  return result
573
602
  end
@@ -597,7 +626,7 @@ module Google
597
626
  # the default parameter values, pass an empty Hash as a request object (see above).
598
627
  #
599
628
  # @param filter [::String]
600
- # 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) ```
629
+ # 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) ```
601
630
  # @param max_results [::Integer]
602
631
  # 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`)
603
632
  # @param order_by [::String]
@@ -681,10 +710,10 @@ module Google
681
710
  # @param router_resource [::Google::Cloud::Compute::V1::Router, ::Hash]
682
711
  # The body resource for this request
683
712
  # @yield [result, response] Access the result along with the Faraday response object
684
- # @yieldparam result [::Gapic::Rest::BaseOperation]
713
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
685
714
  # @yieldparam response [::Faraday::Response]
686
715
  #
687
- # @return [::Gapic::Rest::BaseOperation]
716
+ # @return [::Gapic::GenericLRO::Operation]
688
717
  #
689
718
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
690
719
  def patch request, options = nil
@@ -711,7 +740,15 @@ module Google
711
740
  metadata: @config.metadata
712
741
 
713
742
  @routers_stub.patch request, options do |result, response|
714
- result = ::Gapic::Rest::BaseOperation.new result
743
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
744
+ operation: result,
745
+ client: region_operations,
746
+ request_values: {
747
+ "project" => request.project,
748
+ "region" => request.region
749
+ },
750
+ options: options
751
+ )
715
752
  yield result, response if block_given?
716
753
  return result
717
754
  end
@@ -818,10 +855,10 @@ module Google
818
855
  # @param router_resource [::Google::Cloud::Compute::V1::Router, ::Hash]
819
856
  # The body resource for this request
820
857
  # @yield [result, response] Access the result along with the Faraday response object
821
- # @yieldparam result [::Gapic::Rest::BaseOperation]
858
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
822
859
  # @yieldparam response [::Faraday::Response]
823
860
  #
824
- # @return [::Gapic::Rest::BaseOperation]
861
+ # @return [::Gapic::GenericLRO::Operation]
825
862
  #
826
863
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
827
864
  def update request, options = nil
@@ -848,7 +885,15 @@ module Google
848
885
  metadata: @config.metadata
849
886
 
850
887
  @routers_stub.update request, options do |result, response|
851
- result = ::Gapic::Rest::BaseOperation.new result
888
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
889
+ operation: result,
890
+ client: region_operations,
891
+ request_values: {
892
+ "project" => request.project,
893
+ "region" => request.region
894
+ },
895
+ options: options
896
+ )
852
897
  yield result, response if block_given?
853
898
  return result
854
899
  end