google-cloud-compute-v1 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +4 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +4 -3
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +4 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +277 -1
  6. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +182 -0
  7. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +196 -3
  8. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +120 -0
  9. data/lib/google/cloud/compute/v1/compute_pb.rb +79 -1
  10. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +4 -3
  11. data/lib/google/cloud/compute/v1/disks/rest/client.rb +4 -3
  12. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
  13. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
  14. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
  15. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +4 -3
  16. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
  17. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
  18. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
  19. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +4 -3
  20. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  21. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +1 -1
  22. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +4 -3
  23. data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
  24. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +7 -6
  25. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +5 -4
  26. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +4 -3
  27. data/lib/google/cloud/compute/v1/instances/rest/client.rb +109 -4
  28. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +62 -0
  29. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +4 -3
  30. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  31. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +1 -1
  32. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +94 -2
  33. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +60 -0
  34. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
  35. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +1 -1
  36. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +4 -3
  37. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +108 -3
  38. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +62 -0
  39. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +3 -2
  40. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +5 -4
  41. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1 -1
  42. data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
  43. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +5 -4
  44. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +4 -3
  45. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +4 -3
  46. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +4 -3
  47. data/lib/google/cloud/compute/v1/projects/rest/client.rb +2 -2
  48. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +202 -4
  49. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +120 -0
  50. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +208 -3
  51. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +122 -0
  52. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
  53. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +301 -1
  54. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +184 -0
  55. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +4 -3
  56. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  57. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1 -1
  58. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
  59. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
  60. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +4 -4
  61. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  62. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +1 -1
  63. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +314 -4
  64. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +185 -0
  65. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1 -1
  66. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
  67. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  68. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +417 -5
  69. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +246 -0
  70. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
  71. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +2 -2
  72. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
  73. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +1 -1
  74. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +1 -1
  75. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
  76. data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
  77. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +4 -3
  78. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +4 -3
  79. data/lib/google/cloud/compute/v1/rest.rb +1 -0
  80. data/lib/google/cloud/compute/v1/routers/rest/client.rb +101 -4
  81. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +61 -0
  82. data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
  83. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +11 -6
  84. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +4 -3
  85. data/lib/google/cloud/compute/v1/snapshot_settings_service/credentials.rb +52 -0
  86. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +480 -0
  87. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/service_stub.rb +167 -0
  88. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +51 -0
  89. data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +47 -0
  90. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +1 -1
  91. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +4 -3
  92. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +5 -4
  93. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +5 -4
  94. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +1 -1
  95. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +4 -3
  96. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +4 -3
  97. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +108 -3
  98. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +62 -0
  99. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +108 -3
  100. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +62 -0
  101. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +1 -1
  102. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +4 -3
  103. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +4 -3
  104. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +4 -3
  105. data/lib/google/cloud/compute/v1/version.rb +1 -1
  106. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +4 -3
  107. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +4 -3
  108. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  109. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  110. data/lib/google/cloud/compute/v1.rb +1 -0
  111. data/proto_docs/google/api/client.rb +13 -0
  112. data/proto_docs/google/cloud/compute/v1/compute.rb +1654 -196
  113. data/proto_docs/google/protobuf/any.rb +144 -0
  114. metadata +8 -2
@@ -70,6 +70,8 @@ module Google
70
70
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
71
71
  }
72
72
 
73
+ default_config.rpcs.announce.timeout = 600.0
74
+
73
75
  default_config.rpcs.delete.timeout = 600.0
74
76
 
75
77
  default_config.rpcs.get.timeout = 600.0
@@ -86,6 +88,8 @@ module Google
86
88
 
87
89
  default_config.rpcs.patch.timeout = 600.0
88
90
 
91
+ default_config.rpcs.withdraw.timeout = 600.0
92
+
89
93
  default_config
90
94
  end
91
95
  yield @configure if block_given?
@@ -181,13 +185,13 @@ module Google
181
185
  # @param options [::Gapic::CallOptions, ::Hash]
182
186
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
183
187
  #
184
- # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
188
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, service_project_number: nil)
185
189
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
186
190
  # least one keyword argument is required. To specify no parameters, or to keep all
187
191
  # the default parameter values, pass an empty Hash as a request object (see above).
188
192
  #
189
193
  # @param filter [::String]
190
- # 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`.
194
+ # 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
191
195
  # @param include_all_scopes [::Boolean]
192
196
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
193
197
  # @param max_results [::Integer]
@@ -200,6 +204,7 @@ module Google
200
204
  # Name of the project scoping this request.
201
205
  # @param return_partial_success [::Boolean]
202
206
  # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
207
+ # @param service_project_number [::Integer]
203
208
  # @yield [result, operation] Access the result along with the TransportOperation object
204
209
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::PublicDelegatedPrefixesScopedList>]
205
210
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -259,6 +264,99 @@ module Google
259
264
  raise ::Google::Cloud::Error.from_error(e)
260
265
  end
261
266
 
267
+ ##
268
+ # Announces the specified PublicDelegatedPrefix in the given region.
269
+ #
270
+ # @overload announce(request, options = nil)
271
+ # Pass arguments to `announce` via a request object, either of type
272
+ # {::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest} or an equivalent Hash.
273
+ #
274
+ # @param request [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest, ::Hash]
275
+ # A request object representing the call parameters. Required. To specify no
276
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
277
+ # @param options [::Gapic::CallOptions, ::Hash]
278
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
279
+ #
280
+ # @overload announce(project: nil, public_delegated_prefix: nil, region: nil, request_id: nil)
281
+ # Pass arguments to `announce` via keyword arguments. Note that at
282
+ # least one keyword argument is required. To specify no parameters, or to keep all
283
+ # the default parameter values, pass an empty Hash as a request object (see above).
284
+ #
285
+ # @param project [::String]
286
+ # Project ID for this request.
287
+ # @param public_delegated_prefix [::String]
288
+ # The name of the public delegated prefix. It should comply with RFC1035.
289
+ # @param region [::String]
290
+ # The name of the region where the public delegated prefix is located. It should comply with RFC1035.
291
+ # @param request_id [::String]
292
+ # 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).
293
+ # @yield [result, operation] Access the result along with the TransportOperation object
294
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
295
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
296
+ #
297
+ # @return [::Gapic::GenericLRO::Operation]
298
+ #
299
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
300
+ #
301
+ # @example Basic example
302
+ # require "google/cloud/compute/v1"
303
+ #
304
+ # # Create a client object. The client can be reused for multiple calls.
305
+ # client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
306
+ #
307
+ # # Create a request. To set request fields, pass in keyword arguments.
308
+ # request = Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest.new
309
+ #
310
+ # # Call the announce method.
311
+ # result = client.announce request
312
+ #
313
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
314
+ # p result
315
+ #
316
+ def announce request, options = nil
317
+ raise ::ArgumentError, "request must be provided" if request.nil?
318
+
319
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest
320
+
321
+ # Converts hash and nil to an options object
322
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
323
+
324
+ # Customize the options with defaults
325
+ call_metadata = @config.rpcs.announce.metadata.to_h
326
+
327
+ # Set x-goog-api-client and x-goog-user-project headers
328
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
329
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
330
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
331
+ transports_version_send: [:rest]
332
+
333
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
334
+
335
+ options.apply_defaults timeout: @config.rpcs.announce.timeout,
336
+ metadata: call_metadata,
337
+ retry_policy: @config.rpcs.announce.retry_policy
338
+
339
+ options.apply_defaults timeout: @config.timeout,
340
+ metadata: @config.metadata,
341
+ retry_policy: @config.retry_policy
342
+
343
+ @public_delegated_prefixes_stub.announce request, options do |result, response|
344
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
345
+ operation: result,
346
+ client: region_operations,
347
+ request_values: {
348
+ "project" => request.project,
349
+ "region" => request.region
350
+ },
351
+ options: options
352
+ )
353
+ yield result, response if block_given?
354
+ return result
355
+ end
356
+ rescue ::Gapic::Rest::Error => e
357
+ raise ::Google::Cloud::Error.from_error(e)
358
+ end
359
+
262
360
  ##
263
361
  # Deletes the specified PublicDelegatedPrefix in the given region.
264
362
  #
@@ -546,7 +644,7 @@ module Google
546
644
  # the default parameter values, pass an empty Hash as a request object (see above).
547
645
  #
548
646
  # @param filter [::String]
549
- # 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`.
647
+ # 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
550
648
  # @param max_results [::Integer]
551
649
  # 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`)
552
650
  # @param order_by [::String]
@@ -713,6 +811,99 @@ module Google
713
811
  raise ::Google::Cloud::Error.from_error(e)
714
812
  end
715
813
 
814
+ ##
815
+ # Withdraws the specified PublicDelegatedPrefix in the given region.
816
+ #
817
+ # @overload withdraw(request, options = nil)
818
+ # Pass arguments to `withdraw` via a request object, either of type
819
+ # {::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest} or an equivalent Hash.
820
+ #
821
+ # @param request [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest, ::Hash]
822
+ # A request object representing the call parameters. Required. To specify no
823
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
824
+ # @param options [::Gapic::CallOptions, ::Hash]
825
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
826
+ #
827
+ # @overload withdraw(project: nil, public_delegated_prefix: nil, region: nil, request_id: nil)
828
+ # Pass arguments to `withdraw` via keyword arguments. Note that at
829
+ # least one keyword argument is required. To specify no parameters, or to keep all
830
+ # the default parameter values, pass an empty Hash as a request object (see above).
831
+ #
832
+ # @param project [::String]
833
+ # Project ID for this request.
834
+ # @param public_delegated_prefix [::String]
835
+ # The name of the public delegated prefix. It should comply with RFC1035.
836
+ # @param region [::String]
837
+ # The name of the region where the public delegated prefix is located. It should comply with RFC1035.
838
+ # @param request_id [::String]
839
+ # 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).
840
+ # @yield [result, operation] Access the result along with the TransportOperation object
841
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
842
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
843
+ #
844
+ # @return [::Gapic::GenericLRO::Operation]
845
+ #
846
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
847
+ #
848
+ # @example Basic example
849
+ # require "google/cloud/compute/v1"
850
+ #
851
+ # # Create a client object. The client can be reused for multiple calls.
852
+ # client = Google::Cloud::Compute::V1::PublicDelegatedPrefixes::Rest::Client.new
853
+ #
854
+ # # Create a request. To set request fields, pass in keyword arguments.
855
+ # request = Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest.new
856
+ #
857
+ # # Call the withdraw method.
858
+ # result = client.withdraw request
859
+ #
860
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
861
+ # p result
862
+ #
863
+ def withdraw request, options = nil
864
+ raise ::ArgumentError, "request must be provided" if request.nil?
865
+
866
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest
867
+
868
+ # Converts hash and nil to an options object
869
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
870
+
871
+ # Customize the options with defaults
872
+ call_metadata = @config.rpcs.withdraw.metadata.to_h
873
+
874
+ # Set x-goog-api-client and x-goog-user-project headers
875
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
876
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
877
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
878
+ transports_version_send: [:rest]
879
+
880
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
881
+
882
+ options.apply_defaults timeout: @config.rpcs.withdraw.timeout,
883
+ metadata: call_metadata,
884
+ retry_policy: @config.rpcs.withdraw.retry_policy
885
+
886
+ options.apply_defaults timeout: @config.timeout,
887
+ metadata: @config.metadata,
888
+ retry_policy: @config.retry_policy
889
+
890
+ @public_delegated_prefixes_stub.withdraw request, options do |result, response|
891
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
892
+ operation: result,
893
+ client: region_operations,
894
+ request_values: {
895
+ "project" => request.project,
896
+ "region" => request.region
897
+ },
898
+ options: options
899
+ )
900
+ yield result, response if block_given?
901
+ return result
902
+ end
903
+ rescue ::Gapic::Rest::Error => e
904
+ raise ::Google::Cloud::Error.from_error(e)
905
+ end
906
+
716
907
  ##
717
908
  # Configuration class for the PublicDelegatedPrefixes REST API.
718
909
  #
@@ -844,6 +1035,11 @@ module Google
844
1035
  #
845
1036
  attr_reader :aggregated_list
846
1037
  ##
1038
+ # RPC-specific configuration for `announce`
1039
+ # @return [::Gapic::Config::Method]
1040
+ #
1041
+ attr_reader :announce
1042
+ ##
847
1043
  # RPC-specific configuration for `delete`
848
1044
  # @return [::Gapic::Config::Method]
849
1045
  #
@@ -868,11 +1064,18 @@ module Google
868
1064
  # @return [::Gapic::Config::Method]
869
1065
  #
870
1066
  attr_reader :patch
1067
+ ##
1068
+ # RPC-specific configuration for `withdraw`
1069
+ # @return [::Gapic::Config::Method]
1070
+ #
1071
+ attr_reader :withdraw
871
1072
 
872
1073
  # @private
873
1074
  def initialize parent_rpcs = nil
874
1075
  aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
875
1076
  @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
1077
+ announce_config = parent_rpcs.announce if parent_rpcs.respond_to? :announce
1078
+ @announce = ::Gapic::Config::Method.new announce_config
876
1079
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
877
1080
  @delete = ::Gapic::Config::Method.new delete_config
878
1081
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
@@ -883,6 +1086,8 @@ module Google
883
1086
  @list = ::Gapic::Config::Method.new list_config
884
1087
  patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
885
1088
  @patch = ::Gapic::Config::Method.new patch_config
1089
+ withdraw_config = parent_rpcs.withdraw if parent_rpcs.respond_to? :withdraw
1090
+ @withdraw = ::Gapic::Config::Method.new withdraw_config
886
1091
 
887
1092
  yield self if block_given?
888
1093
  end
@@ -78,6 +78,44 @@ module Google
78
78
  result
79
79
  end
80
80
 
81
+ ##
82
+ # Baseline implementation for the announce REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Cloud::Compute::V1::Operation]
94
+ # A result object deserialized from the server's reply
95
+ def announce request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_announce_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split "=", 2 }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
81
119
  ##
82
120
  # Baseline implementation for the delete REST call
83
121
  #
@@ -268,6 +306,44 @@ module Google
268
306
  result
269
307
  end
270
308
 
309
+ ##
310
+ # Baseline implementation for the withdraw REST call
311
+ #
312
+ # @param request_pb [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest]
313
+ # A request object representing the call parameters. Required.
314
+ # @param options [::Gapic::CallOptions]
315
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
316
+ #
317
+ # @yield [result, operation] Access the result along with the TransportOperation object
318
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
319
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
320
+ #
321
+ # @return [::Google::Cloud::Compute::V1::Operation]
322
+ # A result object deserialized from the server's reply
323
+ def withdraw request_pb, options = nil
324
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
325
+
326
+ verb, uri, query_string_params, body = ServiceStub.transcode_withdraw_request request_pb
327
+ query_string_params = if query_string_params.any?
328
+ query_string_params.to_h { |p| p.split "=", 2 }
329
+ else
330
+ {}
331
+ end
332
+
333
+ response = @client_stub.make_http_request(
334
+ verb,
335
+ uri: uri,
336
+ body: body || "",
337
+ params: query_string_params,
338
+ options: options
339
+ )
340
+ operation = ::Gapic::Rest::TransportOperation.new response
341
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
342
+
343
+ yield result, operation if block_given?
344
+ result
345
+ end
346
+
271
347
  ##
272
348
  # @private
273
349
  #
@@ -289,6 +365,29 @@ module Google
289
365
  transcoder.transcode request_pb
290
366
  end
291
367
 
368
+ ##
369
+ # @private
370
+ #
371
+ # GRPC transcoding helper method for the announce REST call
372
+ #
373
+ # @param request_pb [::Google::Cloud::Compute::V1::AnnouncePublicDelegatedPrefixeRequest]
374
+ # A request object representing the call parameters. Required.
375
+ # @return [Array(String, [String, nil], Hash{String => String})]
376
+ # Uri, Body, Query string parameters
377
+ def self.transcode_announce_request request_pb
378
+ transcoder = Gapic::Rest::GrpcTranscoder.new
379
+ .with_bindings(
380
+ uri_method: :post,
381
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/announce",
382
+ matches: [
383
+ ["project", %r{^[^/]+/?$}, false],
384
+ ["region", %r{^[^/]+/?$}, false],
385
+ ["public_delegated_prefix", %r{^[^/]+/?$}, false]
386
+ ]
387
+ )
388
+ transcoder.transcode request_pb
389
+ end
390
+
292
391
  ##
293
392
  # @private
294
393
  #
@@ -403,6 +502,29 @@ module Google
403
502
  )
404
503
  transcoder.transcode request_pb
405
504
  end
505
+
506
+ ##
507
+ # @private
508
+ #
509
+ # GRPC transcoding helper method for the withdraw REST call
510
+ #
511
+ # @param request_pb [::Google::Cloud::Compute::V1::WithdrawPublicDelegatedPrefixeRequest]
512
+ # A request object representing the call parameters. Required.
513
+ # @return [Array(String, [String, nil], Hash{String => String})]
514
+ # Uri, Body, Query string parameters
515
+ def self.transcode_withdraw_request request_pb
516
+ transcoder = Gapic::Rest::GrpcTranscoder.new
517
+ .with_bindings(
518
+ uri_method: :post,
519
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/publicDelegatedPrefixes/{public_delegated_prefix}/withdraw",
520
+ matches: [
521
+ ["project", %r{^[^/]+/?$}, false],
522
+ ["region", %r{^[^/]+/?$}, false],
523
+ ["public_delegated_prefix", %r{^[^/]+/?$}, false]
524
+ ]
525
+ )
526
+ transcoder.transcode request_pb
527
+ end
406
528
  end
407
529
  end
408
530
  end
@@ -452,7 +452,7 @@ module Google
452
452
  # the default parameter values, pass an empty Hash as a request object (see above).
453
453
  #
454
454
  # @param filter [::String]
455
- # 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`.
455
+ # 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. These two types of filter expressions cannot be mixed in one request. 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 `:*` 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`. You cannot combine constraints on multiple fields using regular expressions.
456
456
  # @param max_results [::Integer]
457
457
  # 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`)
458
458
  # @param order_by [::String]