google-cloud-compute-v1 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +181 -14
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +330 -20
  4. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +64 -0
  5. data/lib/google/cloud/compute/v1/advice/credentials.rb +52 -0
  6. data/lib/google/cloud/compute/v1/advice/rest/client.rb +431 -0
  7. data/lib/google/cloud/compute/v1/advice/rest/service_stub.rb +144 -0
  8. data/lib/google/cloud/compute/v1/advice/rest.rb +51 -0
  9. data/lib/google/cloud/compute/v1/advice.rb +47 -0
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +334 -21
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +64 -0
  12. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +198 -23
  13. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +499 -40
  14. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +62 -0
  15. data/lib/google/cloud/compute/v1/compute_pb.rb +281 -25
  16. data/lib/google/cloud/compute/v1/cross_site_networks/credentials.rb +52 -0
  17. data/lib/google/cloud/compute/v1/cross_site_networks/rest/client.rb +975 -0
  18. data/lib/google/cloud/compute/v1/cross_site_networks/rest/service_stub.rb +391 -0
  19. data/lib/google/cloud/compute/v1/cross_site_networks/rest.rb +51 -0
  20. data/lib/google/cloud/compute/v1/cross_site_networks.rb +47 -0
  21. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +181 -14
  22. data/lib/google/cloud/compute/v1/disks/rest/client.rb +390 -42
  23. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +118 -11
  24. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +240 -25
  25. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +238 -13
  26. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +63 -0
  27. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +258 -23
  28. data/lib/google/cloud/compute/v1/future_reservations/credentials.rb +52 -0
  29. data/lib/google/cloud/compute/v1/future_reservations/rest/client.rb +1287 -0
  30. data/lib/google/cloud/compute/v1/future_reservations/rest/service_stub.rb +520 -0
  31. data/lib/google/cloud/compute/v1/future_reservations/rest.rb +51 -0
  32. data/lib/google/cloud/compute/v1/future_reservations.rb +47 -0
  33. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +217 -10
  34. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +63 -0
  35. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +151 -15
  36. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +246 -21
  37. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +203 -18
  38. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +91 -9
  39. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +128 -10
  40. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +333 -21
  41. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +63 -0
  42. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +2 -1
  43. data/lib/google/cloud/compute/v1/images/rest/client.rb +161 -18
  44. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +159 -24
  45. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +920 -95
  46. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +473 -40
  47. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +64 -0
  48. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +13 -1
  49. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +220 -20
  50. data/lib/google/cloud/compute/v1/instances/rest/client.rb +1144 -99
  51. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +127 -0
  52. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +235 -21
  53. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +139 -14
  54. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +242 -21
  55. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +139 -14
  56. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +87 -7
  57. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +87 -7
  58. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +145 -14
  59. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +9 -2
  60. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +161 -16
  61. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +124 -13
  62. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +181 -14
  63. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +232 -20
  64. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +138 -12
  65. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +361 -37
  66. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +354 -33
  67. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +85 -6
  68. data/lib/google/cloud/compute/v1/networks/rest/client.rb +281 -23
  69. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +381 -32
  70. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +213 -19
  71. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +181 -14
  72. data/lib/google/cloud/compute/v1/organization_security_policies/credentials.rb +52 -0
  73. data/lib/google/cloud/compute/v1/organization_security_policies/rest/client.rb +2259 -0
  74. data/lib/google/cloud/compute/v1/organization_security_policies/rest/service_stub.rb +1054 -0
  75. data/lib/google/cloud/compute/v1/organization_security_policies/rest.rb +51 -0
  76. data/lib/google/cloud/compute/v1/organization_security_policies.rb +47 -0
  77. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +226 -19
  78. data/lib/google/cloud/compute/v1/preview_features/credentials.rb +52 -0
  79. data/lib/google/cloud/compute/v1/preview_features/rest/client.rb +739 -0
  80. data/lib/google/cloud/compute/v1/preview_features/rest/service_stub.rb +267 -0
  81. data/lib/google/cloud/compute/v1/preview_features/rest.rb +51 -0
  82. data/lib/google/cloud/compute/v1/preview_features.rb +47 -0
  83. data/lib/google/cloud/compute/v1/projects/rest/client.rb +346 -30
  84. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +154 -12
  85. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +255 -22
  86. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +238 -13
  87. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +64 -0
  88. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +260 -26
  89. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +212 -18
  90. data/lib/google/cloud/compute/v1/region_composite_health_checks/credentials.rb +52 -0
  91. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/client.rb +1268 -0
  92. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/service_stub.rb +521 -0
  93. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest.rb +51 -0
  94. data/lib/google/cloud/compute/v1/region_composite_health_checks.rb +47 -0
  95. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +83 -5
  96. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +269 -29
  97. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/credentials.rb +52 -0
  98. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/client.rb +1268 -0
  99. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/service_stub.rb +521 -0
  100. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest.rb +51 -0
  101. data/lib/google/cloud/compute/v1/region_health_aggregation_policies.rb +47 -0
  102. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +427 -17
  103. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +125 -0
  104. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +238 -13
  105. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +64 -0
  106. data/lib/google/cloud/compute/v1/region_health_sources/credentials.rb +52 -0
  107. data/lib/google/cloud/compute/v1/region_health_sources/rest/client.rb +1268 -0
  108. data/lib/google/cloud/compute/v1/region_health_sources/rest/service_stub.rb +521 -0
  109. data/lib/google/cloud/compute/v1/region_health_sources/rest.rb +51 -0
  110. data/lib/google/cloud/compute/v1/region_health_sources.rb +47 -0
  111. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +750 -64
  112. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +280 -14
  113. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +64 -0
  114. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +115 -10
  115. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +15 -2
  116. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +139 -13
  117. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +264 -28
  118. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +213 -20
  119. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +399 -11
  120. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -0
  121. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +107 -10
  122. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +149 -14
  123. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +116 -10
  124. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +220 -20
  125. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +126 -10
  126. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +158 -14
  127. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +113 -9
  128. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +104 -14
  129. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +85 -6
  130. data/lib/google/cloud/compute/v1/regions/rest/client.rb +120 -7
  131. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +396 -11
  132. data/lib/google/cloud/compute/v1/reservation_blocks/rest/service_stub.rb +194 -0
  133. data/lib/google/cloud/compute/v1/reservation_slots/credentials.rb +52 -0
  134. data/lib/google/cloud/compute/v1/reservation_slots/rest/client.rb +863 -0
  135. data/lib/google/cloud/compute/v1/reservation_slots/rest/service_stub.rb +338 -0
  136. data/lib/google/cloud/compute/v1/reservation_slots/rest.rb +51 -0
  137. data/lib/google/cloud/compute/v1/reservation_slots.rb +47 -0
  138. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +642 -12
  139. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +327 -3
  140. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +257 -24
  141. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +224 -19
  142. data/lib/google/cloud/compute/v1/rest.rb +10 -0
  143. data/lib/google/cloud/compute/v1/routers/rest/client.rb +555 -50
  144. data/lib/google/cloud/compute/v1/routes/rest/client.rb +202 -8
  145. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +63 -0
  146. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +316 -26
  147. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +234 -22
  148. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +13 -1
  149. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +130 -13
  150. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +210 -17
  151. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +315 -27
  152. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +181 -14
  153. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +321 -28
  154. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +378 -34
  155. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +128 -10
  156. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +240 -20
  157. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +306 -30
  158. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +320 -20
  159. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +64 -0
  160. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +387 -26
  161. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +64 -0
  162. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +281 -19
  163. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +63 -0
  164. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +329 -20
  165. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +63 -0
  166. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +224 -19
  167. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +354 -24
  168. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +63 -0
  169. data/lib/google/cloud/compute/v1/version.rb +1 -1
  170. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +224 -19
  171. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +224 -19
  172. data/lib/google/cloud/compute/v1/wire_groups/credentials.rb +52 -0
  173. data/lib/google/cloud/compute/v1/wire_groups/rest/client.rb +980 -0
  174. data/lib/google/cloud/compute/v1/wire_groups/rest/service_stub.rb +396 -0
  175. data/lib/google/cloud/compute/v1/wire_groups/rest.rb +51 -0
  176. data/lib/google/cloud/compute/v1/wire_groups.rb +47 -0
  177. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +106 -10
  178. data/lib/google/cloud/compute/v1/zones/rest/client.rb +83 -5
  179. data/lib/google/cloud/compute/v1.rb +10 -0
  180. data/proto_docs/google/api/client.rb +149 -29
  181. data/proto_docs/google/cloud/compute/v1/compute.rb +44226 -5514
  182. metadata +52 -2
@@ -87,6 +87,8 @@ module Google
87
87
 
88
88
  default_config.rpcs.patch.timeout = 600.0
89
89
 
90
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
91
+
90
92
  default_config.rpcs.update.timeout = 600.0
91
93
 
92
94
  default_config
@@ -230,7 +232,19 @@ module Google
230
232
  # @param project [::String]
231
233
  # Project ID for this request.
232
234
  # @param request_id [::String]
233
- # 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).
235
+ # An optional request ID to identify requests. Specify a unique request ID so
236
+ # that if you must retry your request, the server will know to ignore the
237
+ # request if it has already been completed.
238
+ #
239
+ # For example, consider a situation where you make an initial request and
240
+ # the request times out. If you make the request again with the same
241
+ # request ID, the server can check if original operation with the same
242
+ # request ID was received, and if so, will ignore the second request. This
243
+ # prevents clients from accidentally creating duplicate commitments.
244
+ #
245
+ # The request ID must be
246
+ # a valid UUID with the exception that zero UUID is not supported
247
+ # (00000000-0000-0000-0000-000000000000).
234
248
  # @yield [result, operation] Access the result along with the TransportOperation object
235
249
  # @yieldparam result [::Gapic::GenericLRO::Operation]
236
250
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -379,7 +393,8 @@ module Google
379
393
  end
380
394
 
381
395
  ##
382
- # Creates a firewall rule in the specified project using the data included in the request.
396
+ # Creates a firewall rule in the specified project using the data
397
+ # included in the request.
383
398
  #
384
399
  # @overload insert(request, options = nil)
385
400
  # Pass arguments to `insert` via a request object, either of type
@@ -401,7 +416,19 @@ module Google
401
416
  # @param project [::String]
402
417
  # Project ID for this request.
403
418
  # @param request_id [::String]
404
- # 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).
419
+ # An optional request ID to identify requests. Specify a unique request ID so
420
+ # that if you must retry your request, the server will know to ignore the
421
+ # request if it has already been completed.
422
+ #
423
+ # For example, consider a situation where you make an initial request and
424
+ # the request times out. If you make the request again with the same
425
+ # request ID, the server can check if original operation with the same
426
+ # request ID was received, and if so, will ignore the second request. This
427
+ # prevents clients from accidentally creating duplicate commitments.
428
+ #
429
+ # The request ID must be
430
+ # a valid UUID with the exception that zero UUID is not supported
431
+ # (00000000-0000-0000-0000-000000000000).
405
432
  # @yield [result, operation] Access the result along with the TransportOperation object
406
433
  # @yieldparam result [::Gapic::GenericLRO::Operation]
407
434
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -470,7 +497,8 @@ module Google
470
497
  end
471
498
 
472
499
  ##
473
- # Retrieves the list of firewall rules available to the specified project.
500
+ # Retrieves the list of firewall rules available to the specified
501
+ # project.
474
502
  #
475
503
  # @overload list(request, options = nil)
476
504
  # Pass arguments to `list` via a request object, either of type
@@ -488,17 +516,95 @@ module Google
488
516
  # the default parameter values, pass an empty Hash as a request object (see above).
489
517
  #
490
518
  # @param filter [::String]
491
- # 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.
519
+ # A filter expression that filters resources listed in the response. Most
520
+ # Compute resources support two types of filter expressions:
521
+ # expressions that support regular expressions and expressions that follow
522
+ # API improvement proposal AIP-160.
523
+ # These two types of filter expressions cannot be mixed in one request.
524
+ #
525
+ # If you want to use AIP-160, your expression must specify the field name, an
526
+ # operator, and the value that you want to use for filtering. The value
527
+ # must be a string, a number, or a boolean. The operator
528
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
529
+ #
530
+ # For example, if you are filtering Compute Engine instances, you can
531
+ # exclude instances named `example-instance` by specifying
532
+ # `name != example-instance`.
533
+ #
534
+ # The `:*` comparison can be used to test whether a key has been defined.
535
+ # For example, to find all objects with `owner` label use:
536
+ # ```
537
+ # labels.owner:*
538
+ # ```
539
+ #
540
+ # You can also filter nested fields. For example, you could specify
541
+ # `scheduling.automaticRestart = false` to include instances only
542
+ # if they are not scheduled for automatic restarts. You can use filtering
543
+ # on nested fields to filter based onresource labels.
544
+ #
545
+ # To filter on multiple expressions, provide each separate expression within
546
+ # parentheses. For example:
547
+ # ```
548
+ # (scheduling.automaticRestart = true)
549
+ # (cpuPlatform = "Intel Skylake")
550
+ # ```
551
+ # By default, each expression is an `AND` expression. However, you
552
+ # can include `AND` and `OR` expressions explicitly.
553
+ # For example:
554
+ # ```
555
+ # (cpuPlatform = "Intel Skylake") OR
556
+ # (cpuPlatform = "Intel Broadwell") AND
557
+ # (scheduling.automaticRestart = true)
558
+ # ```
559
+ #
560
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
561
+ # (not equal) operator against a single un-parenthesized expression with or
562
+ # without quotes or against multiple parenthesized expressions. Examples:
563
+ #
564
+ # `fieldname eq unquoted literal`
565
+ # `fieldname eq 'single quoted literal'`
566
+ # `fieldname eq "double quoted literal"`
567
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
568
+ #
569
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
570
+ # The literal value must match the entire field.
571
+ #
572
+ # For example, to filter for instances that do not end with name "instance",
573
+ # you would use `name ne .*instance`.
574
+ #
575
+ # You cannot combine constraints on multiple fields using regular
576
+ # expressions.
492
577
  # @param max_results [::Integer]
493
- # 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`)
578
+ # The maximum number of results per page that should be returned.
579
+ # If the number of available results is larger than `maxResults`,
580
+ # Compute Engine returns a `nextPageToken` that can be used to get
581
+ # the next page of results in subsequent list requests. Acceptable values are
582
+ # `0` to `500`, inclusive. (Default: `500`)
494
583
  # @param order_by [::String]
495
- # 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.
584
+ # Sorts list results by a certain order. By default, results
585
+ # are returned in alphanumerical order based on the resource name.
586
+ #
587
+ # You can also sort results in descending order based on the creation
588
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
589
+ # results based on the `creationTimestamp` field in
590
+ # reverse chronological order (newest result first). Use this to sort
591
+ # resources like operations so that the newest operation is returned first.
592
+ #
593
+ # Currently, only sorting by `name` or
594
+ # `creationTimestamp desc` is supported.
496
595
  # @param page_token [::String]
497
- # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
596
+ # Specifies a page token to use. Set `pageToken` to the
597
+ # `nextPageToken` returned by a previous list request to get
598
+ # the next page of results.
498
599
  # @param project [::String]
499
600
  # Project ID for this request.
500
601
  # @param return_partial_success [::Boolean]
501
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
602
+ # Opt-in for partial success behavior which provides partial results in case
603
+ # of failure. The default value is false.
604
+ #
605
+ # For example, when partial success behavior is enabled, aggregatedList for a
606
+ # single zone scope either returns all resources in the zone or no resources,
607
+ # with an error code.
502
608
  # @yield [result, operation] Access the result along with the TransportOperation object
503
609
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Firewall>]
504
610
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -560,7 +666,10 @@ module Google
560
666
  end
561
667
 
562
668
  ##
563
- # Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
669
+ # Updates the specified firewall rule with the data included in the
670
+ # request. This method supportsPATCH
671
+ # semantics and uses theJSON merge
672
+ # patch format and processing rules.
564
673
  #
565
674
  # @overload patch(request, options = nil)
566
675
  # Pass arguments to `patch` via a request object, either of type
@@ -584,7 +693,19 @@ module Google
584
693
  # @param project [::String]
585
694
  # Project ID for this request.
586
695
  # @param request_id [::String]
587
- # 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).
696
+ # An optional request ID to identify requests. Specify a unique request ID so
697
+ # that if you must retry your request, the server will know to ignore the
698
+ # request if it has already been completed.
699
+ #
700
+ # For example, consider a situation where you make an initial request and
701
+ # the request times out. If you make the request again with the same
702
+ # request ID, the server can check if original operation with the same
703
+ # request ID was received, and if so, will ignore the second request. This
704
+ # prevents clients from accidentally creating duplicate commitments.
705
+ #
706
+ # The request ID must be
707
+ # a valid UUID with the exception that zero UUID is not supported
708
+ # (00000000-0000-0000-0000-000000000000).
588
709
  # @yield [result, operation] Access the result along with the TransportOperation object
589
710
  # @yieldparam result [::Gapic::GenericLRO::Operation]
590
711
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -653,7 +774,92 @@ module Google
653
774
  end
654
775
 
655
776
  ##
656
- # Updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.
777
+ # Returns permissions that a caller has on the specified resource.
778
+ #
779
+ # @overload test_iam_permissions(request, options = nil)
780
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
781
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsFirewallRequest} or an equivalent Hash.
782
+ #
783
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsFirewallRequest, ::Hash]
784
+ # A request object representing the call parameters. Required. To specify no
785
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
786
+ # @param options [::Gapic::CallOptions, ::Hash]
787
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
788
+ #
789
+ # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil)
790
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
791
+ # least one keyword argument is required. To specify no parameters, or to keep all
792
+ # the default parameter values, pass an empty Hash as a request object (see above).
793
+ #
794
+ # @param project [::String]
795
+ # Project ID for this request.
796
+ # @param resource [::String]
797
+ # Name or id of the resource for this request.
798
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
799
+ # The body resource for this request
800
+ # @yield [result, operation] Access the result along with the TransportOperation object
801
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
802
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
803
+ #
804
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
805
+ #
806
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
807
+ #
808
+ # @example Basic example
809
+ # require "google/cloud/compute/v1"
810
+ #
811
+ # # Create a client object. The client can be reused for multiple calls.
812
+ # client = Google::Cloud::Compute::V1::Firewalls::Rest::Client.new
813
+ #
814
+ # # Create a request. To set request fields, pass in keyword arguments.
815
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsFirewallRequest.new
816
+ #
817
+ # # Call the test_iam_permissions method.
818
+ # result = client.test_iam_permissions request
819
+ #
820
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
821
+ # p result
822
+ #
823
+ def test_iam_permissions request, options = nil
824
+ raise ::ArgumentError, "request must be provided" if request.nil?
825
+
826
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsFirewallRequest
827
+
828
+ # Converts hash and nil to an options object
829
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
830
+
831
+ # Customize the options with defaults
832
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
833
+
834
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
835
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
836
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
837
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
838
+ transports_version_send: [:rest]
839
+
840
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
841
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
842
+
843
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
844
+ metadata: call_metadata,
845
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
846
+
847
+ options.apply_defaults timeout: @config.timeout,
848
+ metadata: @config.metadata,
849
+ retry_policy: @config.retry_policy
850
+
851
+ @firewalls_stub.test_iam_permissions request, options do |result, operation|
852
+ yield result, operation if block_given?
853
+ end
854
+ rescue ::Gapic::Rest::Error => e
855
+ raise ::Google::Cloud::Error.from_error(e)
856
+ end
857
+
858
+ ##
859
+ # Updates the specified firewall rule with the data included in the
860
+ # request.
861
+ # Note that all fields will be updated if using PUT, even fields that are not
862
+ # specified. To update individual fields, please use PATCH instead.
657
863
  #
658
864
  # @overload update(request, options = nil)
659
865
  # Pass arguments to `update` via a request object, either of type
@@ -677,7 +883,19 @@ module Google
677
883
  # @param project [::String]
678
884
  # Project ID for this request.
679
885
  # @param request_id [::String]
680
- # 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).
886
+ # An optional request ID to identify requests. Specify a unique request ID so
887
+ # that if you must retry your request, the server will know to ignore the
888
+ # request if it has already been completed.
889
+ #
890
+ # For example, consider a situation where you make an initial request and
891
+ # the request times out. If you make the request again with the same
892
+ # request ID, the server can check if original operation with the same
893
+ # request ID was received, and if so, will ignore the second request. This
894
+ # prevents clients from accidentally creating duplicate commitments.
895
+ #
896
+ # The request ID must be
897
+ # a valid UUID with the exception that zero UUID is not supported
898
+ # (00000000-0000-0000-0000-000000000000).
681
899
  # @yield [result, operation] Access the result along with the TransportOperation object
682
900
  # @yieldparam result [::Gapic::GenericLRO::Operation]
683
901
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -917,6 +1135,11 @@ module Google
917
1135
  #
918
1136
  attr_reader :patch
919
1137
  ##
1138
+ # RPC-specific configuration for `test_iam_permissions`
1139
+ # @return [::Gapic::Config::Method]
1140
+ #
1141
+ attr_reader :test_iam_permissions
1142
+ ##
920
1143
  # RPC-specific configuration for `update`
921
1144
  # @return [::Gapic::Config::Method]
922
1145
  #
@@ -934,6 +1157,8 @@ module Google
934
1157
  @list = ::Gapic::Config::Method.new list_config
935
1158
  patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
936
1159
  @patch = ::Gapic::Config::Method.new patch_config
1160
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1161
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
937
1162
  update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
938
1163
  @update = ::Gapic::Config::Method.new update_config
939
1164
 
@@ -273,6 +273,46 @@ module Google
273
273
  end
274
274
  end
275
275
 
276
+ ##
277
+ # Baseline implementation for the test_iam_permissions REST call
278
+ #
279
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsFirewallRequest]
280
+ # A request object representing the call parameters. Required.
281
+ # @param options [::Gapic::CallOptions]
282
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
283
+ #
284
+ # @yield [result, operation] Access the result along with the TransportOperation object
285
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
286
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
287
+ #
288
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
289
+ # A result object deserialized from the server's reply
290
+ def test_iam_permissions request_pb, options = nil
291
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
292
+
293
+ verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
294
+ query_string_params = if query_string_params.any?
295
+ query_string_params.to_h { |p| p.split "=", 2 }
296
+ else
297
+ {}
298
+ end
299
+
300
+ response = @client_stub.make_http_request(
301
+ verb,
302
+ uri: uri,
303
+ body: body || "",
304
+ params: query_string_params,
305
+ method_name: "test_iam_permissions",
306
+ options: options
307
+ )
308
+ operation = ::Gapic::Rest::TransportOperation.new response
309
+ result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
310
+ catch :response do
311
+ yield result, operation if block_given?
312
+ result
313
+ end
314
+ end
315
+
276
316
  ##
277
317
  # Baseline implementation for the update REST call
278
318
  #
@@ -423,6 +463,29 @@ module Google
423
463
  transcoder.transcode request_pb
424
464
  end
425
465
 
466
+ ##
467
+ # @private
468
+ #
469
+ # GRPC transcoding helper method for the test_iam_permissions REST call
470
+ #
471
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsFirewallRequest]
472
+ # A request object representing the call parameters. Required.
473
+ # @return [Array(String, [String, nil], Hash{String => String})]
474
+ # Uri, Body, Query string parameters
475
+ def self.transcode_test_iam_permissions_request request_pb
476
+ transcoder = Gapic::Rest::GrpcTranscoder.new
477
+ .with_bindings(
478
+ uri_method: :post,
479
+ uri_template: "/compute/v1/projects/{project}/global/firewalls/{resource}/testIamPermissions",
480
+ body: "test_permissions_request_resource",
481
+ matches: [
482
+ ["project", %r{^[^/]+/?$}, false],
483
+ ["resource", %r{^[^/]+/?$}, false]
484
+ ]
485
+ )
486
+ transcoder.transcode request_pb
487
+ end
488
+
426
489
  ##
427
490
  # @private
428
491
  #