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/service_attachments/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -150,9 +151,21 @@ module Google
150
151
  credentials = Credentials.new credentials, scope: @config.scope
151
152
  end
152
153
 
154
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
155
+ config.credentials = credentials
156
+ config.endpoint = @config.endpoint
157
+ end
158
+
153
159
  @service_attachments_stub = ::Google::Cloud::Compute::V1::ServiceAttachments::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
154
160
  end
155
161
 
162
+ ##
163
+ # Get the associated client for long-running operations via RegionOperations.
164
+ #
165
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
166
+ #
167
+ attr_reader :region_operations
168
+
156
169
  # Service calls
157
170
 
158
171
  ##
@@ -176,7 +189,7 @@ module Google
176
189
  # the default parameter values, pass an empty Hash as a request object (see above).
177
190
  #
178
191
  # @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) ```
192
+ # 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
193
  # @param include_all_scopes [::Boolean]
181
194
  # 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
195
  # @param max_results [::Integer]
@@ -254,14 +267,14 @@ module Google
254
267
  # @param region [::String]
255
268
  # Name of the region of this request.
256
269
  # @param request_id [::String]
257
- # 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). end_interface: MixerMutationRequestBuilder
270
+ # 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).
258
271
  # @param service_attachment [::String]
259
272
  # Name of the ServiceAttachment resource to delete.
260
273
  # @yield [result, response] Access the result along with the Faraday response object
261
- # @yieldparam result [::Gapic::Rest::BaseOperation]
274
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
262
275
  # @yieldparam response [::Faraday::Response]
263
276
  #
264
- # @return [::Gapic::Rest::BaseOperation]
277
+ # @return [::Gapic::GenericLRO::Operation]
265
278
  #
266
279
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
267
280
  def delete request, options = nil
@@ -288,7 +301,15 @@ module Google
288
301
  metadata: @config.metadata
289
302
 
290
303
  @service_attachments_stub.delete request, options do |result, response|
291
- result = ::Gapic::Rest::BaseOperation.new result
304
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
305
+ operation: result,
306
+ client: region_operations,
307
+ request_values: {
308
+ "project" => request.project,
309
+ "region" => request.region
310
+ },
311
+ options: options
312
+ )
292
313
  yield result, response if block_given?
293
314
  return result
294
315
  end
@@ -454,14 +475,14 @@ module Google
454
475
  # @param region [::String]
455
476
  # Name of the region of this request.
456
477
  # @param request_id [::String]
457
- # 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). end_interface: MixerMutationRequestBuilder
478
+ # 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).
458
479
  # @param service_attachment_resource [::Google::Cloud::Compute::V1::ServiceAttachment, ::Hash]
459
480
  # The body resource for this request
460
481
  # @yield [result, response] Access the result along with the Faraday response object
461
- # @yieldparam result [::Gapic::Rest::BaseOperation]
482
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
462
483
  # @yieldparam response [::Faraday::Response]
463
484
  #
464
- # @return [::Gapic::Rest::BaseOperation]
485
+ # @return [::Gapic::GenericLRO::Operation]
465
486
  #
466
487
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
467
488
  def insert request, options = nil
@@ -488,7 +509,15 @@ module Google
488
509
  metadata: @config.metadata
489
510
 
490
511
  @service_attachments_stub.insert request, options do |result, response|
491
- result = ::Gapic::Rest::BaseOperation.new result
512
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
513
+ operation: result,
514
+ client: region_operations,
515
+ request_values: {
516
+ "project" => request.project,
517
+ "region" => request.region
518
+ },
519
+ options: options
520
+ )
492
521
  yield result, response if block_given?
493
522
  return result
494
523
  end
@@ -518,7 +547,7 @@ module Google
518
547
  # the default parameter values, pass an empty Hash as a request object (see above).
519
548
  #
520
549
  # @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) ```
550
+ # 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
551
  # @param max_results [::Integer]
523
552
  # 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
553
  # @param order_by [::String]
@@ -596,16 +625,16 @@ module Google
596
625
  # @param region [::String]
597
626
  # The region scoping this request and should conform to RFC1035.
598
627
  # @param request_id [::String]
599
- # 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). end_interface: MixerMutationRequestBuilder
628
+ # 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).
600
629
  # @param service_attachment [::String]
601
630
  # The resource id of the ServiceAttachment to patch. It should conform to RFC1035 resource name or be a string form on an unsigned long number.
602
631
  # @param service_attachment_resource [::Google::Cloud::Compute::V1::ServiceAttachment, ::Hash]
603
632
  # The body resource for this request
604
633
  # @yield [result, response] Access the result along with the Faraday response object
605
- # @yieldparam result [::Gapic::Rest::BaseOperation]
634
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
606
635
  # @yieldparam response [::Faraday::Response]
607
636
  #
608
- # @return [::Gapic::Rest::BaseOperation]
637
+ # @return [::Gapic::GenericLRO::Operation]
609
638
  #
610
639
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
611
640
  def patch request, options = nil
@@ -632,7 +661,15 @@ module Google
632
661
  metadata: @config.metadata
633
662
 
634
663
  @service_attachments_stub.patch request, options do |result, response|
635
- result = ::Gapic::Rest::BaseOperation.new result
664
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
665
+ operation: result,
666
+ client: region_operations,
667
+ request_values: {
668
+ "project" => request.project,
669
+ "region" => request.region
670
+ },
671
+ options: options
672
+ )
636
673
  yield result, response if block_given?
637
674
  return result
638
675
  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/snapshots/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -76,6 +77,8 @@ module Google
76
77
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
77
78
  }
78
79
 
80
+ default_config.rpcs.insert.timeout = 600.0
81
+
79
82
  default_config.rpcs.list.timeout = 600.0
80
83
  default_config.rpcs.list.retry_policy = {
81
84
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
@@ -143,9 +146,21 @@ module Google
143
146
  credentials = Credentials.new credentials, scope: @config.scope
144
147
  end
145
148
 
149
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
150
+ config.credentials = credentials
151
+ config.endpoint = @config.endpoint
152
+ end
153
+
146
154
  @snapshots_stub = ::Google::Cloud::Compute::V1::Snapshots::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
147
155
  end
148
156
 
157
+ ##
158
+ # Get the associated client for long-running operations via GlobalOperations.
159
+ #
160
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
161
+ #
162
+ attr_reader :global_operations
163
+
149
164
  # Service calls
150
165
 
151
166
  ##
@@ -175,10 +190,10 @@ module Google
175
190
  # @param snapshot [::String]
176
191
  # Name of the Snapshot resource to delete.
177
192
  # @yield [result, response] Access the result along with the Faraday response object
178
- # @yieldparam result [::Gapic::Rest::BaseOperation]
193
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
179
194
  # @yieldparam response [::Faraday::Response]
180
195
  #
181
- # @return [::Gapic::Rest::BaseOperation]
196
+ # @return [::Gapic::GenericLRO::Operation]
182
197
  #
183
198
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
184
199
  def delete request, options = nil
@@ -205,7 +220,14 @@ module Google
205
220
  metadata: @config.metadata
206
221
 
207
222
  @snapshots_stub.delete request, options do |result, response|
208
- result = ::Gapic::Rest::BaseOperation.new result
223
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
224
+ operation: result,
225
+ client: global_operations,
226
+ request_values: {
227
+ "project" => request.project
228
+ },
229
+ options: options
230
+ )
209
231
  yield result, response if block_given?
210
232
  return result
211
233
  end
@@ -342,6 +364,79 @@ module Google
342
364
  raise ::Google::Cloud::Error.from_error(gapic_error)
343
365
  end
344
366
 
367
+ ##
368
+ # Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project.
369
+ #
370
+ # @overload insert(request, options = nil)
371
+ # Pass arguments to `insert` via a request object, either of type
372
+ # {::Google::Cloud::Compute::V1::InsertSnapshotRequest} or an equivalent Hash.
373
+ #
374
+ # @param request [::Google::Cloud::Compute::V1::InsertSnapshotRequest, ::Hash]
375
+ # A request object representing the call parameters. Required. To specify no
376
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
377
+ # @param options [::Gapic::CallOptions, ::Hash]
378
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
379
+ # Note: currently retry functionality is not implemented. While it is possible
380
+ # to set it using ::Gapic::CallOptions, it will not be applied
381
+ #
382
+ # @overload insert(project: nil, request_id: nil, snapshot_resource: nil)
383
+ # Pass arguments to `insert` via keyword arguments. Note that at
384
+ # least one keyword argument is required. To specify no parameters, or to keep all
385
+ # the default parameter values, pass an empty Hash as a request object (see above).
386
+ #
387
+ # @param project [::String]
388
+ # Project ID for this request.
389
+ # @param request_id [::String]
390
+ # 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).
391
+ # @param snapshot_resource [::Google::Cloud::Compute::V1::Snapshot, ::Hash]
392
+ # The body resource for this request
393
+ # @yield [result, response] Access the result along with the Faraday response object
394
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
395
+ # @yieldparam response [::Faraday::Response]
396
+ #
397
+ # @return [::Gapic::GenericLRO::Operation]
398
+ #
399
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ def insert request, options = nil
401
+ raise ::ArgumentError, "request must be provided" if request.nil?
402
+
403
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertSnapshotRequest
404
+
405
+ # Converts hash and nil to an options object
406
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
407
+
408
+ # Customize the options with defaults
409
+ call_metadata = @config.rpcs.insert.metadata.to_h
410
+
411
+ # Set x-goog-api-client header
412
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
413
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
414
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
415
+ transports_version_send: [:rest]
416
+
417
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
418
+ metadata: call_metadata
419
+
420
+ options.apply_defaults timeout: @config.timeout,
421
+ metadata: @config.metadata
422
+
423
+ @snapshots_stub.insert request, options do |result, response|
424
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
425
+ operation: result,
426
+ client: global_operations,
427
+ request_values: {
428
+ "project" => request.project
429
+ },
430
+ options: options
431
+ )
432
+ yield result, response if block_given?
433
+ return result
434
+ end
435
+ rescue ::Faraday::Error => e
436
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
437
+ raise ::Google::Cloud::Error.from_error(gapic_error)
438
+ end
439
+
345
440
  ##
346
441
  # Retrieves the list of Snapshot resources contained within the specified project.
347
442
  #
@@ -363,7 +458,7 @@ module Google
363
458
  # the default parameter values, pass an empty Hash as a request object (see above).
364
459
  #
365
460
  # @param filter [::String]
366
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
461
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
367
462
  # @param max_results [::Integer]
368
463
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
369
464
  # @param order_by [::String]
@@ -506,10 +601,10 @@ module Google
506
601
  # @param resource [::String]
507
602
  # Name or id of the resource for this request.
508
603
  # @yield [result, response] Access the result along with the Faraday response object
509
- # @yieldparam result [::Gapic::Rest::BaseOperation]
604
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
510
605
  # @yieldparam response [::Faraday::Response]
511
606
  #
512
- # @return [::Gapic::Rest::BaseOperation]
607
+ # @return [::Gapic::GenericLRO::Operation]
513
608
  #
514
609
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
515
610
  def set_labels request, options = nil
@@ -536,7 +631,14 @@ module Google
536
631
  metadata: @config.metadata
537
632
 
538
633
  @snapshots_stub.set_labels request, options do |result, response|
539
- result = ::Gapic::Rest::BaseOperation.new result
634
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
635
+ operation: result,
636
+ client: global_operations,
637
+ request_values: {
638
+ "project" => request.project
639
+ },
640
+ options: options
641
+ )
540
642
  yield result, response if block_given?
541
643
  return result
542
644
  end
@@ -725,6 +827,11 @@ module Google
725
827
  #
726
828
  attr_reader :get_iam_policy
727
829
  ##
830
+ # RPC-specific configuration for `insert`
831
+ # @return [::Gapic::Config::Method]
832
+ #
833
+ attr_reader :insert
834
+ ##
728
835
  # RPC-specific configuration for `list`
729
836
  # @return [::Gapic::Config::Method]
730
837
  #
@@ -753,6 +860,8 @@ module Google
753
860
  @get = ::Gapic::Config::Method.new get_config
754
861
  get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
755
862
  @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
863
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
864
+ @insert = ::Gapic::Config::Method.new insert_config
756
865
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
757
866
  @list = ::Gapic::Config::Method.new list_config
758
867
  set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
@@ -171,6 +171,52 @@ module Google
171
171
  [uri, body, query_string_params]
172
172
  end
173
173
 
174
+ ##
175
+ # Baseline implementation for the insert REST call
176
+ #
177
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertSnapshotRequest]
178
+ # A request object representing the call parameters. Required.
179
+ # @param options [::Gapic::CallOptions]
180
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
181
+ #
182
+ # @yield [result, response] Access the result along with the Faraday response object
183
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
184
+ # @yieldparam response [::Faraday::Response]
185
+ #
186
+ # @return [::Google::Cloud::Compute::V1::Operation]
187
+ # A result object deserialized from the server's reply
188
+ def insert request_pb, options = nil
189
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
190
+
191
+ uri, body, query_string_params = transcode_insert_request request_pb
192
+ response = @client_stub.make_post_request(
193
+ uri: uri,
194
+ body: body,
195
+ params: query_string_params,
196
+ options: options
197
+ )
198
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
199
+
200
+ yield result, response if block_given?
201
+ result
202
+ end
203
+
204
+ ##
205
+ # GRPC transcoding helper method for the insert REST call
206
+ #
207
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertSnapshotRequest]
208
+ # A request object representing the call parameters. Required.
209
+ # @return [Array(String, [String, nil], Hash{String => String})]
210
+ # Uri, Body, Query string parameters
211
+ def transcode_insert_request request_pb
212
+ uri = "/compute/v1/projects/#{request_pb.project}/global/snapshots"
213
+ body = request_pb.snapshot_resource.to_json
214
+ query_string_params = {}
215
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
216
+
217
+ [uri, body, query_string_params]
218
+ end
219
+
174
220
  ##
175
221
  # Baseline implementation for the list REST call
176
222
  #
@@ -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/ssl_certificates/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_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
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
144
+ config.credentials = credentials
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
142
148
  @ssl_certificates_stub = ::Google::Cloud::Compute::V1::SslCertificates::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
143
149
  end
144
150
 
151
+ ##
152
+ # Get the associated client for long-running operations via GlobalOperations.
153
+ #
154
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
155
+ #
156
+ attr_reader :global_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]
@@ -241,14 +254,14 @@ module Google
241
254
  # @param project [::String]
242
255
  # Project ID for this request.
243
256
  # @param request_id [::String]
244
- # 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). end_interface: MixerMutationRequestBuilder
257
+ # 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).
245
258
  # @param ssl_certificate [::String]
246
259
  # Name of the SslCertificate resource to delete.
247
260
  # @yield [result, response] Access the result along with the Faraday response object
248
- # @yieldparam result [::Gapic::Rest::BaseOperation]
261
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
249
262
  # @yieldparam response [::Faraday::Response]
250
263
  #
251
- # @return [::Gapic::Rest::BaseOperation]
264
+ # @return [::Gapic::GenericLRO::Operation]
252
265
  #
253
266
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
254
267
  def delete request, options = nil
@@ -275,7 +288,14 @@ module Google
275
288
  metadata: @config.metadata
276
289
 
277
290
  @ssl_certificates_stub.delete request, options do |result, response|
278
- result = ::Gapic::Rest::BaseOperation.new result
291
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
292
+ operation: result,
293
+ client: global_operations,
294
+ request_values: {
295
+ "project" => request.project
296
+ },
297
+ options: options
298
+ )
279
299
  yield result, response if block_given?
280
300
  return result
281
301
  end
@@ -370,14 +390,14 @@ module Google
370
390
  # @param project [::String]
371
391
  # Project ID for this request.
372
392
  # @param request_id [::String]
373
- # 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). end_interface: MixerMutationRequestBuilder
393
+ # 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).
374
394
  # @param ssl_certificate_resource [::Google::Cloud::Compute::V1::SslCertificate, ::Hash]
375
395
  # The body resource for this request
376
396
  # @yield [result, response] Access the result along with the Faraday response object
377
- # @yieldparam result [::Gapic::Rest::BaseOperation]
397
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
378
398
  # @yieldparam response [::Faraday::Response]
379
399
  #
380
- # @return [::Gapic::Rest::BaseOperation]
400
+ # @return [::Gapic::GenericLRO::Operation]
381
401
  #
382
402
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
383
403
  def insert request, options = nil
@@ -404,7 +424,14 @@ module Google
404
424
  metadata: @config.metadata
405
425
 
406
426
  @ssl_certificates_stub.insert request, options do |result, response|
407
- result = ::Gapic::Rest::BaseOperation.new result
427
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
428
+ operation: result,
429
+ client: global_operations,
430
+ request_values: {
431
+ "project" => request.project
432
+ },
433
+ options: options
434
+ )
408
435
  yield result, response if block_given?
409
436
  return result
410
437
  end
@@ -434,7 +461,7 @@ module Google
434
461
  # the default parameter values, pass an empty Hash as a request object (see above).
435
462
  #
436
463
  # @param filter [::String]
437
- # 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) ```
464
+ # 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) ```
438
465
  # @param max_results [::Integer]
439
466
  # 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`)
440
467
  # @param order_by [::String]