google-cloud-compute-v1 1.1.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -0
  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 +84 -22
  7. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +95 -26
  8. data/lib/google/cloud/compute/v1/compute_pb.rb +671 -3
  9. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
  10. data/lib/google/cloud/compute/v1/disks/rest/client.rb +93 -24
  11. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +44 -10
  12. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +98 -31
  13. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +2 -2
  14. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +54 -13
  15. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +70 -17
  16. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +34 -7
  17. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +64 -16
  18. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +55 -14
  19. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
  20. data/lib/google/cloud/compute/v1/global_operations/rest/nonstandard_lro.rb +68 -0
  21. data/lib/google/cloud/compute/v1/global_operations.rb +1 -0
  22. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  23. data/lib/google/cloud/compute/v1/global_organization_operations/rest/nonstandard_lro.rb +68 -0
  24. data/lib/google/cloud/compute/v1/global_organization_operations.rb +1 -0
  25. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +44 -10
  26. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +55 -14
  27. data/lib/google/cloud/compute/v1/images/rest/client.rb +64 -16
  28. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +177 -52
  29. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +72 -19
  30. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +34 -7
  31. data/lib/google/cloud/compute/v1/instances/rest/client.rb +372 -101
  32. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +48 -11
  33. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  34. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +44 -10
  35. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +34 -7
  36. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +34 -7
  37. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
  38. data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
  39. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
  40. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +279 -0
  41. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
  42. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +44 -0
  43. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +60 -15
  44. data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
  45. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
  46. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +778 -0
  47. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
  48. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +44 -0
  49. data/lib/google/cloud/compute/v1/networks/rest/client.rb +85 -23
  50. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +82 -21
  51. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +37 -8
  52. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
  53. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +48 -11
  54. data/lib/google/cloud/compute/v1/projects/rest/client.rb +105 -29
  55. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +44 -10
  56. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +48 -11
  57. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +58 -13
  58. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +58 -13
  59. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +37 -8
  60. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  61. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +91 -22
  62. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +47 -10
  63. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +58 -13
  64. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +176 -51
  65. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +26 -5
  66. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +24 -3
  67. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +36 -7
  68. data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
  69. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
  70. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +823 -0
  71. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
  72. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +44 -0
  73. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +36 -7
  74. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  75. data/lib/google/cloud/compute/v1/region_operations/rest/nonstandard_lro.rb +68 -0
  76. data/lib/google/cloud/compute/v1/region_operations.rb +1 -0
  77. data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
  78. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
  79. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +276 -0
  80. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
  81. data/lib/google/cloud/compute/v1/region_security_policies.rb +44 -0
  82. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +36 -7
  83. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +47 -10
  84. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +145 -13
  85. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +46 -0
  86. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +58 -13
  87. data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
  88. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +59 -14
  89. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +37 -8
  90. data/lib/google/cloud/compute/v1/routers/rest/client.rb +60 -15
  91. data/lib/google/cloud/compute/v1/routes/rest/client.rb +34 -7
  92. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +170 -23
  93. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +55 -1
  94. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +48 -11
  95. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +44 -10
  96. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +35 -8
  97. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +45 -11
  98. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +71 -18
  99. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +44 -10
  100. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +55 -14
  101. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +169 -23
  102. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +46 -0
  103. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +37 -8
  104. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +92 -23
  105. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +158 -19
  106. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +46 -0
  107. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +54 -13
  108. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +37 -8
  109. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +65 -17
  110. data/lib/google/cloud/compute/v1/version.rb +1 -1
  111. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +48 -11
  112. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +37 -8
  113. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  114. data/lib/google/cloud/compute/v1/zone_operations/rest/nonstandard_lro.rb +68 -0
  115. data/lib/google/cloud/compute/v1/zone_operations.rb +1 -0
  116. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  117. data/lib/google/cloud/compute/v1.rb +6 -0
  118. data/proto_docs/google/cloud/compute/v1/compute.rb +1946 -229
  119. metadata +27 -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/security_policies/rest/service_stub"
22
+ require "google/cloud/compute/v1/global_operations/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -66,6 +67,11 @@ module Google
66
67
 
67
68
  default_config.rpcs.add_rule.timeout = 600.0
68
69
 
70
+ default_config.rpcs.aggregated_list.timeout = 600.0
71
+ default_config.rpcs.aggregated_list.retry_policy = {
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
73
+ }
74
+
69
75
  default_config.rpcs.delete.timeout = 600.0
70
76
 
71
77
  default_config.rpcs.get.timeout = 600.0
@@ -152,9 +158,21 @@ module Google
152
158
  credentials = Credentials.new credentials, scope: @config.scope
153
159
  end
154
160
 
161
+ @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
162
+ config.credentials = credentials
163
+ config.endpoint = @config.endpoint
164
+ end
165
+
155
166
  @security_policies_stub = ::Google::Cloud::Compute::V1::SecurityPolicies::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
156
167
  end
157
168
 
169
+ ##
170
+ # Get the associated client for long-running operations via GlobalOperations.
171
+ #
172
+ # @return [::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client]
173
+ #
174
+ attr_reader :global_operations
175
+
158
176
  # Service calls
159
177
 
160
178
  ##
@@ -172,7 +190,7 @@ module Google
172
190
  # Note: currently retry functionality is not implemented. While it is possible
173
191
  # to set it using ::Gapic::CallOptions, it will not be applied
174
192
  #
175
- # @overload add_rule(project: nil, security_policy: nil, security_policy_rule_resource: nil)
193
+ # @overload add_rule(project: nil, security_policy: nil, security_policy_rule_resource: nil, validate_only: nil)
176
194
  # Pass arguments to `add_rule` via keyword arguments. Note that at
177
195
  # least one keyword argument is required. To specify no parameters, or to keep all
178
196
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -183,11 +201,13 @@ module Google
183
201
  # Name of the security policy to update.
184
202
  # @param security_policy_rule_resource [::Google::Cloud::Compute::V1::SecurityPolicyRule, ::Hash]
185
203
  # The body resource for this request
204
+ # @param validate_only [::Boolean]
205
+ # If true, the request will not be committed.
186
206
  # @yield [result, response] Access the result along with the Faraday response object
187
- # @yieldparam result [::Gapic::Rest::BaseOperation]
207
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
188
208
  # @yieldparam response [::Faraday::Response]
189
209
  #
190
- # @return [::Gapic::Rest::BaseOperation]
210
+ # @return [::Gapic::GenericLRO::Operation]
191
211
  #
192
212
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
193
213
  def add_rule request, options = nil
@@ -214,7 +234,88 @@ module Google
214
234
  metadata: @config.metadata
215
235
 
216
236
  @security_policies_stub.add_rule request, options do |result, response|
217
- result = ::Gapic::Rest::BaseOperation.new result
237
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
238
+ operation: result,
239
+ client: global_operations,
240
+ request_values: {
241
+ "project" => request.project
242
+ },
243
+ options: options
244
+ )
245
+ yield result, response if block_given?
246
+ return result
247
+ end
248
+ rescue ::Faraday::Error => e
249
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
250
+ raise ::Google::Cloud::Error.from_error(gapic_error)
251
+ end
252
+
253
+ ##
254
+ # Retrieves the list of all SecurityPolicy resources, regional and global, available to the specified project.
255
+ #
256
+ # @overload aggregated_list(request, options = nil)
257
+ # Pass arguments to `aggregated_list` via a request object, either of type
258
+ # {::Google::Cloud::Compute::V1::AggregatedListSecurityPoliciesRequest} or an equivalent Hash.
259
+ #
260
+ # @param request [::Google::Cloud::Compute::V1::AggregatedListSecurityPoliciesRequest, ::Hash]
261
+ # A request object representing the call parameters. Required. To specify no
262
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
263
+ # @param options [::Gapic::CallOptions, ::Hash]
264
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
265
+ # Note: currently retry functionality is not implemented. While it is possible
266
+ # to set it using ::Gapic::CallOptions, it will not be applied
267
+ #
268
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
269
+ # Pass arguments to `aggregated_list` via keyword arguments. Note that at
270
+ # least one keyword argument is required. To specify no parameters, or to keep all
271
+ # the default parameter values, pass an empty Hash as a request object (see above).
272
+ #
273
+ # @param filter [::String]
274
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your 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) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
275
+ # @param include_all_scopes [::Boolean]
276
+ # 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.
277
+ # @param max_results [::Integer]
278
+ # 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`)
279
+ # @param order_by [::String]
280
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
281
+ # @param page_token [::String]
282
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
283
+ # @param project [::String]
284
+ # Name of the project scoping this request.
285
+ # @param return_partial_success [::Boolean]
286
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
287
+ # @yield [result, response] Access the result along with the Faraday response object
288
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SecurityPoliciesScopedList>]
289
+ # @yieldparam response [::Faraday::Response]
290
+ #
291
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::SecurityPoliciesScopedList>]
292
+ #
293
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
294
+ def aggregated_list request, options = nil
295
+ raise ::ArgumentError, "request must be provided" if request.nil?
296
+
297
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListSecurityPoliciesRequest
298
+
299
+ # Converts hash and nil to an options object
300
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
301
+
302
+ # Customize the options with defaults
303
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
304
+
305
+ # Set x-goog-api-client header
306
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
307
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
308
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
309
+ transports_version_send: [:rest]
310
+
311
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
312
+ metadata: call_metadata
313
+
314
+ options.apply_defaults timeout: @config.timeout,
315
+ metadata: @config.metadata
316
+
317
+ @security_policies_stub.aggregated_list request, options do |result, response|
318
+ result = ::Gapic::Rest::PagedEnumerable.new @security_policies_stub, :aggregated_list, "items", request, result, options
218
319
  yield result, response if block_given?
219
320
  return result
220
321
  end
@@ -250,10 +351,10 @@ module Google
250
351
  # @param security_policy [::String]
251
352
  # Name of the security policy to delete.
252
353
  # @yield [result, response] Access the result along with the Faraday response object
253
- # @yieldparam result [::Gapic::Rest::BaseOperation]
354
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
254
355
  # @yieldparam response [::Faraday::Response]
255
356
  #
256
- # @return [::Gapic::Rest::BaseOperation]
357
+ # @return [::Gapic::GenericLRO::Operation]
257
358
  #
258
359
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
259
360
  def delete request, options = nil
@@ -280,7 +381,14 @@ module Google
280
381
  metadata: @config.metadata
281
382
 
282
383
  @security_policies_stub.delete request, options do |result, response|
283
- result = ::Gapic::Rest::BaseOperation.new result
384
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
385
+ operation: result,
386
+ client: global_operations,
387
+ request_values: {
388
+ "project" => request.project
389
+ },
390
+ options: options
391
+ )
284
392
  yield result, response if block_given?
285
393
  return result
286
394
  end
@@ -432,7 +540,7 @@ module Google
432
540
  # Note: currently retry functionality is not implemented. While it is possible
433
541
  # to set it using ::Gapic::CallOptions, it will not be applied
434
542
  #
435
- # @overload insert(project: nil, request_id: nil, security_policy_resource: nil)
543
+ # @overload insert(project: nil, request_id: nil, security_policy_resource: nil, validate_only: nil)
436
544
  # Pass arguments to `insert` via keyword arguments. Note that at
437
545
  # least one keyword argument is required. To specify no parameters, or to keep all
438
546
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -443,11 +551,13 @@ module Google
443
551
  # 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).
444
552
  # @param security_policy_resource [::Google::Cloud::Compute::V1::SecurityPolicy, ::Hash]
445
553
  # The body resource for this request
554
+ # @param validate_only [::Boolean]
555
+ # If true, the request will not be committed.
446
556
  # @yield [result, response] Access the result along with the Faraday response object
447
- # @yieldparam result [::Gapic::Rest::BaseOperation]
557
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
448
558
  # @yieldparam response [::Faraday::Response]
449
559
  #
450
- # @return [::Gapic::Rest::BaseOperation]
560
+ # @return [::Gapic::GenericLRO::Operation]
451
561
  #
452
562
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
453
563
  def insert request, options = nil
@@ -474,7 +584,14 @@ module Google
474
584
  metadata: @config.metadata
475
585
 
476
586
  @security_policies_stub.insert request, options do |result, response|
477
- result = ::Gapic::Rest::BaseOperation.new result
587
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
588
+ operation: result,
589
+ client: global_operations,
590
+ request_values: {
591
+ "project" => request.project
592
+ },
593
+ options: options
594
+ )
478
595
  yield result, response if block_given?
479
596
  return result
480
597
  end
@@ -504,7 +621,7 @@ module Google
504
621
  # the default parameter values, pass an empty Hash as a request object (see above).
505
622
  #
506
623
  # @param filter [::String]
507
- # 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) ```
624
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your 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) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
508
625
  # @param max_results [::Integer]
509
626
  # 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`)
510
627
  # @param order_by [::String]
@@ -576,7 +693,7 @@ module Google
576
693
  # the default parameter values, pass an empty Hash as a request object (see above).
577
694
  #
578
695
  # @param filter [::String]
579
- # 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) ```
696
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your 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) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
580
697
  # @param max_results [::Integer]
581
698
  # 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`)
582
699
  # @param order_by [::String]
@@ -655,10 +772,10 @@ module Google
655
772
  # @param security_policy_resource [::Google::Cloud::Compute::V1::SecurityPolicy, ::Hash]
656
773
  # The body resource for this request
657
774
  # @yield [result, response] Access the result along with the Faraday response object
658
- # @yieldparam result [::Gapic::Rest::BaseOperation]
775
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
659
776
  # @yieldparam response [::Faraday::Response]
660
777
  #
661
- # @return [::Gapic::Rest::BaseOperation]
778
+ # @return [::Gapic::GenericLRO::Operation]
662
779
  #
663
780
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
664
781
  def patch request, options = nil
@@ -685,7 +802,14 @@ module Google
685
802
  metadata: @config.metadata
686
803
 
687
804
  @security_policies_stub.patch request, options do |result, response|
688
- result = ::Gapic::Rest::BaseOperation.new result
805
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
806
+ operation: result,
807
+ client: global_operations,
808
+ request_values: {
809
+ "project" => request.project
810
+ },
811
+ options: options
812
+ )
689
813
  yield result, response if block_given?
690
814
  return result
691
815
  end
@@ -709,7 +833,7 @@ module Google
709
833
  # Note: currently retry functionality is not implemented. While it is possible
710
834
  # to set it using ::Gapic::CallOptions, it will not be applied
711
835
  #
712
- # @overload patch_rule(priority: nil, project: nil, security_policy: nil, security_policy_rule_resource: nil)
836
+ # @overload patch_rule(priority: nil, project: nil, security_policy: nil, security_policy_rule_resource: nil, validate_only: nil)
713
837
  # Pass arguments to `patch_rule` via keyword arguments. Note that at
714
838
  # least one keyword argument is required. To specify no parameters, or to keep all
715
839
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -722,11 +846,13 @@ module Google
722
846
  # Name of the security policy to update.
723
847
  # @param security_policy_rule_resource [::Google::Cloud::Compute::V1::SecurityPolicyRule, ::Hash]
724
848
  # The body resource for this request
849
+ # @param validate_only [::Boolean]
850
+ # If true, the request will not be committed.
725
851
  # @yield [result, response] Access the result along with the Faraday response object
726
- # @yieldparam result [::Gapic::Rest::BaseOperation]
852
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
727
853
  # @yieldparam response [::Faraday::Response]
728
854
  #
729
- # @return [::Gapic::Rest::BaseOperation]
855
+ # @return [::Gapic::GenericLRO::Operation]
730
856
  #
731
857
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
732
858
  def patch_rule request, options = nil
@@ -753,7 +879,14 @@ module Google
753
879
  metadata: @config.metadata
754
880
 
755
881
  @security_policies_stub.patch_rule request, options do |result, response|
756
- result = ::Gapic::Rest::BaseOperation.new result
882
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
883
+ operation: result,
884
+ client: global_operations,
885
+ request_values: {
886
+ "project" => request.project
887
+ },
888
+ options: options
889
+ )
757
890
  yield result, response if block_given?
758
891
  return result
759
892
  end
@@ -789,10 +922,10 @@ module Google
789
922
  # @param security_policy [::String]
790
923
  # Name of the security policy to update.
791
924
  # @yield [result, response] Access the result along with the Faraday response object
792
- # @yieldparam result [::Gapic::Rest::BaseOperation]
925
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
793
926
  # @yieldparam response [::Faraday::Response]
794
927
  #
795
- # @return [::Gapic::Rest::BaseOperation]
928
+ # @return [::Gapic::GenericLRO::Operation]
796
929
  #
797
930
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
798
931
  def remove_rule request, options = nil
@@ -819,7 +952,14 @@ module Google
819
952
  metadata: @config.metadata
820
953
 
821
954
  @security_policies_stub.remove_rule request, options do |result, response|
822
- result = ::Gapic::Rest::BaseOperation.new result
955
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
956
+ operation: result,
957
+ client: global_operations,
958
+ request_values: {
959
+ "project" => request.project
960
+ },
961
+ options: options
962
+ )
823
963
  yield result, response if block_given?
824
964
  return result
825
965
  end
@@ -933,6 +1073,11 @@ module Google
933
1073
  #
934
1074
  attr_reader :add_rule
935
1075
  ##
1076
+ # RPC-specific configuration for `aggregated_list`
1077
+ # @return [::Gapic::Config::Method]
1078
+ #
1079
+ attr_reader :aggregated_list
1080
+ ##
936
1081
  # RPC-specific configuration for `delete`
937
1082
  # @return [::Gapic::Config::Method]
938
1083
  #
@@ -982,6 +1127,8 @@ module Google
982
1127
  def initialize parent_rpcs = nil
983
1128
  add_rule_config = parent_rpcs.add_rule if parent_rpcs.respond_to? :add_rule
984
1129
  @add_rule = ::Gapic::Config::Method.new add_rule_config
1130
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
1131
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
985
1132
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
986
1133
  @delete = ::Gapic::Config::Method.new delete_config
987
1134
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
@@ -55,10 +55,11 @@ module Google
55
55
  def add_rule request_pb, options = nil
56
56
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
57
57
 
58
- uri, body, _query_string_params = transcode_add_rule_request request_pb
58
+ uri, body, query_string_params = transcode_add_rule_request request_pb
59
59
  response = @client_stub.make_post_request(
60
60
  uri: uri,
61
61
  body: body,
62
+ params: query_string_params,
62
63
  options: options
63
64
  )
64
65
  result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
@@ -78,6 +79,57 @@ module Google
78
79
  uri = "/compute/v1/projects/#{request_pb.project}/global/securityPolicies/#{request_pb.security_policy}/addRule"
79
80
  body = request_pb.security_policy_rule_resource.to_json
80
81
  query_string_params = {}
82
+ query_string_params["validateOnly"] = request_pb.validate_only.to_s if request_pb.has_validate_only?
83
+
84
+ [uri, body, query_string_params]
85
+ end
86
+
87
+ ##
88
+ # Baseline implementation for the aggregated_list REST call
89
+ #
90
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListSecurityPoliciesRequest]
91
+ # A request object representing the call parameters. Required.
92
+ # @param options [::Gapic::CallOptions]
93
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
94
+ #
95
+ # @yield [result, response] Access the result along with the Faraday response object
96
+ # @yieldparam result [::Google::Cloud::Compute::V1::SecurityPoliciesAggregatedList]
97
+ # @yieldparam response [::Faraday::Response]
98
+ #
99
+ # @return [::Google::Cloud::Compute::V1::SecurityPoliciesAggregatedList]
100
+ # A result object deserialized from the server's reply
101
+ def aggregated_list request_pb, options = nil
102
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
103
+
104
+ uri, _body, query_string_params = transcode_aggregated_list_request request_pb
105
+ response = @client_stub.make_get_request(
106
+ uri: uri,
107
+ params: query_string_params,
108
+ options: options
109
+ )
110
+ result = ::Google::Cloud::Compute::V1::SecurityPoliciesAggregatedList.decode_json response.body, ignore_unknown_fields: true
111
+
112
+ yield result, response if block_given?
113
+ result
114
+ end
115
+
116
+ ##
117
+ # GRPC transcoding helper method for the aggregated_list REST call
118
+ #
119
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListSecurityPoliciesRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @return [Array(String, [String, nil], Hash{String => String})]
122
+ # Uri, Body, Query string parameters
123
+ def transcode_aggregated_list_request request_pb
124
+ uri = "/compute/v1/projects/#{request_pb.project}/aggregated/securityPolicies"
125
+ body = nil
126
+ query_string_params = {}
127
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
128
+ query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
129
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
130
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
131
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
132
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
81
133
 
82
134
  [uri, body, query_string_params]
83
135
  end
@@ -257,6 +309,7 @@ module Google
257
309
  body = request_pb.security_policy_resource.to_json
258
310
  query_string_params = {}
259
311
  query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
312
+ query_string_params["validateOnly"] = request_pb.validate_only.to_s if request_pb.has_validate_only?
260
313
 
261
314
  [uri, body, query_string_params]
262
315
  end
@@ -447,6 +500,7 @@ module Google
447
500
  body = request_pb.security_policy_rule_resource.to_json
448
501
  query_string_params = {}
449
502
  query_string_params["priority"] = request_pb.priority.to_s if request_pb.has_priority?
503
+ query_string_params["validateOnly"] = request_pb.validate_only.to_s if request_pb.has_validate_only?
450
504
 
451
505
  [uri, body, query_string_params]
452
506
  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/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, 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) ```
192
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your 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) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
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]
@@ -258,10 +271,10 @@ module Google
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
@@ -458,10 +479,10 @@ module Google
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, 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) ```
550
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your 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) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
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]
@@ -602,10 +631,10 @@ module Google
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