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
@@ -71,6 +71,11 @@ module Google
71
71
  end
72
72
  default_config = Client::Configuration.new parent_config
73
73
 
74
+ default_config.rpcs.aggregated_list.timeout = 600.0
75
+ default_config.rpcs.aggregated_list.retry_policy = {
76
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
77
+ }
78
+
74
79
  default_config.rpcs.delete.timeout = 600.0
75
80
 
76
81
  default_config.rpcs.get.timeout = 600.0
@@ -85,6 +90,8 @@ module Google
85
90
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
86
91
  }
87
92
 
93
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
94
+
88
95
  default_config
89
96
  end
90
97
  yield @configure if block_given?
@@ -203,6 +210,186 @@ module Google
203
210
 
204
211
  # Service calls
205
212
 
213
+ ##
214
+ # Retrieves the list of all NotificationEndpoint resources,
215
+ # regional and global, available to the specified project.
216
+ #
217
+ # @overload aggregated_list(request, options = nil)
218
+ # Pass arguments to `aggregated_list` via a request object, either of type
219
+ # {::Google::Cloud::Compute::V1::AggregatedListRegionNotificationEndpointsRequest} or an equivalent Hash.
220
+ #
221
+ # @param request [::Google::Cloud::Compute::V1::AggregatedListRegionNotificationEndpointsRequest, ::Hash]
222
+ # A request object representing the call parameters. Required. To specify no
223
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
224
+ # @param options [::Gapic::CallOptions, ::Hash]
225
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
226
+ #
227
+ # @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)
228
+ # Pass arguments to `aggregated_list` via keyword arguments. Note that at
229
+ # least one keyword argument is required. To specify no parameters, or to keep all
230
+ # the default parameter values, pass an empty Hash as a request object (see above).
231
+ #
232
+ # @param filter [::String]
233
+ # A filter expression that filters resources listed in the response. Most
234
+ # Compute resources support two types of filter expressions:
235
+ # expressions that support regular expressions and expressions that follow
236
+ # API improvement proposal AIP-160.
237
+ # These two types of filter expressions cannot be mixed in one request.
238
+ #
239
+ # If you want to use AIP-160, your expression must specify the field name, an
240
+ # operator, and the value that you want to use for filtering. The value
241
+ # must be a string, a number, or a boolean. The operator
242
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
243
+ #
244
+ # For example, if you are filtering Compute Engine instances, you can
245
+ # exclude instances named `example-instance` by specifying
246
+ # `name != example-instance`.
247
+ #
248
+ # The `:*` comparison can be used to test whether a key has been defined.
249
+ # For example, to find all objects with `owner` label use:
250
+ # ```
251
+ # labels.owner:*
252
+ # ```
253
+ #
254
+ # You can also filter nested fields. For example, you could specify
255
+ # `scheduling.automaticRestart = false` to include instances only
256
+ # if they are not scheduled for automatic restarts. You can use filtering
257
+ # on nested fields to filter based onresource labels.
258
+ #
259
+ # To filter on multiple expressions, provide each separate expression within
260
+ # parentheses. For example:
261
+ # ```
262
+ # (scheduling.automaticRestart = true)
263
+ # (cpuPlatform = "Intel Skylake")
264
+ # ```
265
+ # By default, each expression is an `AND` expression. However, you
266
+ # can include `AND` and `OR` expressions explicitly.
267
+ # For example:
268
+ # ```
269
+ # (cpuPlatform = "Intel Skylake") OR
270
+ # (cpuPlatform = "Intel Broadwell") AND
271
+ # (scheduling.automaticRestart = true)
272
+ # ```
273
+ #
274
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
275
+ # (not equal) operator against a single un-parenthesized expression with or
276
+ # without quotes or against multiple parenthesized expressions. Examples:
277
+ #
278
+ # `fieldname eq unquoted literal`
279
+ # `fieldname eq 'single quoted literal'`
280
+ # `fieldname eq "double quoted literal"`
281
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
282
+ #
283
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
284
+ # The literal value must match the entire field.
285
+ #
286
+ # For example, to filter for instances that do not end with name "instance",
287
+ # you would use `name ne .*instance`.
288
+ #
289
+ # You cannot combine constraints on multiple fields using regular
290
+ # expressions.
291
+ # @param include_all_scopes [::Boolean]
292
+ # Indicates whether every visible scope for each scope type (zone, region,
293
+ # global) should be included in the response. For new resource types added
294
+ # after this field, the flag has no effect as new resource types will always
295
+ # include every visible scope for each scope type in response. For resource
296
+ # types which predate this field, if this flag is omitted or false, only
297
+ # scopes of the scope types where the resource type is expected to be found
298
+ # will be included.
299
+ # @param max_results [::Integer]
300
+ # The maximum number of results per page that should be returned.
301
+ # If the number of available results is larger than `maxResults`,
302
+ # Compute Engine returns a `nextPageToken` that can be used to get
303
+ # the next page of results in subsequent list requests. Acceptable values are
304
+ # `0` to `500`, inclusive. (Default: `500`)
305
+ # @param order_by [::String]
306
+ # Sorts list results by a certain order. By default, results
307
+ # are returned in alphanumerical order based on the resource name.
308
+ #
309
+ # You can also sort results in descending order based on the creation
310
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
311
+ # results based on the `creationTimestamp` field in
312
+ # reverse chronological order (newest result first). Use this to sort
313
+ # resources like operations so that the newest operation is returned first.
314
+ #
315
+ # Currently, only sorting by `name` or
316
+ # `creationTimestamp desc` is supported.
317
+ # @param page_token [::String]
318
+ # Specifies a page token to use. Set `pageToken` to the
319
+ # `nextPageToken` returned by a previous list request to get
320
+ # the next page of results.
321
+ # @param project [::String]
322
+ # Name of the project scoping this request.
323
+ # @param return_partial_success [::Boolean]
324
+ # Opt-in for partial success behavior which provides partial results in case
325
+ # of failure. The default value is false.
326
+ #
327
+ # For example, when partial success behavior is enabled, aggregatedList for a
328
+ # single zone scope either returns all resources in the zone or no resources,
329
+ # with an error code.
330
+ # @param service_project_number [::Integer]
331
+ # The Shared VPC service project id or service project number for which
332
+ # aggregated list request is invoked for subnetworks list-usable api.
333
+ # @yield [result, operation] Access the result along with the TransportOperation object
334
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NotificationEndpointsScopedList>]
335
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
336
+ #
337
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NotificationEndpointsScopedList>]
338
+ #
339
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
340
+ #
341
+ # @example Basic example
342
+ # require "google/cloud/compute/v1"
343
+ #
344
+ # # Create a client object. The client can be reused for multiple calls.
345
+ # client = Google::Cloud::Compute::V1::RegionNotificationEndpoints::Rest::Client.new
346
+ #
347
+ # # Create a request. To set request fields, pass in keyword arguments.
348
+ # request = Google::Cloud::Compute::V1::AggregatedListRegionNotificationEndpointsRequest.new
349
+ #
350
+ # # Call the aggregated_list method.
351
+ # result = client.aggregated_list request
352
+ #
353
+ # # The returned object is of type Google::Cloud::Compute::V1::NotificationEndpointAggregatedList.
354
+ # p result
355
+ #
356
+ def aggregated_list request, options = nil
357
+ raise ::ArgumentError, "request must be provided" if request.nil?
358
+
359
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListRegionNotificationEndpointsRequest
360
+
361
+ # Converts hash and nil to an options object
362
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
363
+
364
+ # Customize the options with defaults
365
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
366
+
367
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
368
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
369
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
370
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
371
+ transports_version_send: [:rest]
372
+
373
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
374
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
375
+
376
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
377
+ metadata: call_metadata,
378
+ retry_policy: @config.rpcs.aggregated_list.retry_policy
379
+
380
+ options.apply_defaults timeout: @config.timeout,
381
+ metadata: @config.metadata,
382
+ retry_policy: @config.retry_policy
383
+
384
+ @region_notification_endpoints_stub.aggregated_list request, options do |result, operation|
385
+ result = ::Gapic::Rest::PagedEnumerable.new @region_notification_endpoints_stub, :aggregated_list, "items", request, result, options
386
+ yield result, operation if block_given?
387
+ throw :response, result
388
+ end
389
+ rescue ::Gapic::Rest::Error => e
390
+ raise ::Google::Cloud::Error.from_error(e)
391
+ end
392
+
206
393
  ##
207
394
  # Deletes the specified NotificationEndpoint in the given region
208
395
  #
@@ -228,7 +415,19 @@ module Google
228
415
  # @param region [::String]
229
416
  # Name of the region scoping this request.
230
417
  # @param request_id [::String]
231
- # 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).
418
+ # An optional request ID to identify requests. Specify a unique request ID so
419
+ # that if you must retry your request, the server will know to ignore the
420
+ # request if it has already been completed.
421
+ #
422
+ # For example, consider a situation where you make an initial request and
423
+ # the request times out. If you make the request again with the same
424
+ # request ID, the server can check if original operation with the same
425
+ # request ID was received, and if so, will ignore the second request. This
426
+ # prevents clients from accidentally creating duplicate commitments.
427
+ #
428
+ # The request ID must be
429
+ # a valid UUID with the exception that zero UUID is not supported
430
+ # (00000000-0000-0000-0000-000000000000).
232
431
  # @yield [result, operation] Access the result along with the TransportOperation object
233
432
  # @yieldparam result [::Gapic::GenericLRO::Operation]
234
433
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -380,7 +579,8 @@ module Google
380
579
  end
381
580
 
382
581
  ##
383
- # Create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.
582
+ # Create a NotificationEndpoint in the specified project in the given region
583
+ # using the parameters that are included in the request.
384
584
  #
385
585
  # @overload insert(request, options = nil)
386
586
  # Pass arguments to `insert` via a request object, either of type
@@ -404,7 +604,19 @@ module Google
404
604
  # @param region [::String]
405
605
  # Name of the region scoping this request.
406
606
  # @param request_id [::String]
407
- # 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).
607
+ # An optional request ID to identify requests. Specify a unique request ID so
608
+ # that if you must retry your request, the server will know to ignore the
609
+ # request if it has already been completed.
610
+ #
611
+ # For example, consider a situation where you make an initial request and
612
+ # the request times out. If you make the request again with the same
613
+ # request ID, the server can check if original operation with the same
614
+ # request ID was received, and if so, will ignore the second request. This
615
+ # prevents clients from accidentally creating duplicate commitments.
616
+ #
617
+ # The request ID must be
618
+ # a valid UUID with the exception that zero UUID is not supported
619
+ # (00000000-0000-0000-0000-000000000000).
408
620
  # @yield [result, operation] Access the result along with the TransportOperation object
409
621
  # @yieldparam result [::Gapic::GenericLRO::Operation]
410
622
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -492,19 +704,97 @@ module Google
492
704
  # the default parameter values, pass an empty Hash as a request object (see above).
493
705
  #
494
706
  # @param filter [::String]
495
- # 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.
707
+ # A filter expression that filters resources listed in the response. Most
708
+ # Compute resources support two types of filter expressions:
709
+ # expressions that support regular expressions and expressions that follow
710
+ # API improvement proposal AIP-160.
711
+ # These two types of filter expressions cannot be mixed in one request.
712
+ #
713
+ # If you want to use AIP-160, your expression must specify the field name, an
714
+ # operator, and the value that you want to use for filtering. The value
715
+ # must be a string, a number, or a boolean. The operator
716
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
717
+ #
718
+ # For example, if you are filtering Compute Engine instances, you can
719
+ # exclude instances named `example-instance` by specifying
720
+ # `name != example-instance`.
721
+ #
722
+ # The `:*` comparison can be used to test whether a key has been defined.
723
+ # For example, to find all objects with `owner` label use:
724
+ # ```
725
+ # labels.owner:*
726
+ # ```
727
+ #
728
+ # You can also filter nested fields. For example, you could specify
729
+ # `scheduling.automaticRestart = false` to include instances only
730
+ # if they are not scheduled for automatic restarts. You can use filtering
731
+ # on nested fields to filter based onresource labels.
732
+ #
733
+ # To filter on multiple expressions, provide each separate expression within
734
+ # parentheses. For example:
735
+ # ```
736
+ # (scheduling.automaticRestart = true)
737
+ # (cpuPlatform = "Intel Skylake")
738
+ # ```
739
+ # By default, each expression is an `AND` expression. However, you
740
+ # can include `AND` and `OR` expressions explicitly.
741
+ # For example:
742
+ # ```
743
+ # (cpuPlatform = "Intel Skylake") OR
744
+ # (cpuPlatform = "Intel Broadwell") AND
745
+ # (scheduling.automaticRestart = true)
746
+ # ```
747
+ #
748
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
749
+ # (not equal) operator against a single un-parenthesized expression with or
750
+ # without quotes or against multiple parenthesized expressions. Examples:
751
+ #
752
+ # `fieldname eq unquoted literal`
753
+ # `fieldname eq 'single quoted literal'`
754
+ # `fieldname eq "double quoted literal"`
755
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
756
+ #
757
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
758
+ # The literal value must match the entire field.
759
+ #
760
+ # For example, to filter for instances that do not end with name "instance",
761
+ # you would use `name ne .*instance`.
762
+ #
763
+ # You cannot combine constraints on multiple fields using regular
764
+ # expressions.
496
765
  # @param max_results [::Integer]
497
- # 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`)
766
+ # The maximum number of results per page that should be returned.
767
+ # If the number of available results is larger than `maxResults`,
768
+ # Compute Engine returns a `nextPageToken` that can be used to get
769
+ # the next page of results in subsequent list requests. Acceptable values are
770
+ # `0` to `500`, inclusive. (Default: `500`)
498
771
  # @param order_by [::String]
499
- # 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.
772
+ # Sorts list results by a certain order. By default, results
773
+ # are returned in alphanumerical order based on the resource name.
774
+ #
775
+ # You can also sort results in descending order based on the creation
776
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
777
+ # results based on the `creationTimestamp` field in
778
+ # reverse chronological order (newest result first). Use this to sort
779
+ # resources like operations so that the newest operation is returned first.
780
+ #
781
+ # Currently, only sorting by `name` or
782
+ # `creationTimestamp desc` is supported.
500
783
  # @param page_token [::String]
501
- # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
784
+ # Specifies a page token to use. Set `pageToken` to the
785
+ # `nextPageToken` returned by a previous list request to get
786
+ # the next page of results.
502
787
  # @param project [::String]
503
788
  # Project ID for this request.
504
789
  # @param region [::String]
505
790
  # Name of the region scoping this request.
506
791
  # @param return_partial_success [::Boolean]
507
- # 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.
792
+ # Opt-in for partial success behavior which provides partial results in case
793
+ # of failure. The default value is false.
794
+ #
795
+ # For example, when partial success behavior is enabled, aggregatedList for a
796
+ # single zone scope either returns all resources in the zone or no resources,
797
+ # with an error code.
508
798
  # @yield [result, operation] Access the result along with the TransportOperation object
509
799
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::NotificationEndpoint>]
510
800
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -565,6 +855,90 @@ module Google
565
855
  raise ::Google::Cloud::Error.from_error(e)
566
856
  end
567
857
 
858
+ ##
859
+ # Returns permissions that a caller has on the specified resource.
860
+ #
861
+ # @overload test_iam_permissions(request, options = nil)
862
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
863
+ # {::Google::Cloud::Compute::V1::TestIamPermissionsRegionNotificationEndpointRequest} or an equivalent Hash.
864
+ #
865
+ # @param request [::Google::Cloud::Compute::V1::TestIamPermissionsRegionNotificationEndpointRequest, ::Hash]
866
+ # A request object representing the call parameters. Required. To specify no
867
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
868
+ # @param options [::Gapic::CallOptions, ::Hash]
869
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
870
+ #
871
+ # @overload test_iam_permissions(project: nil, region: nil, resource: nil, test_permissions_request_resource: nil)
872
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
873
+ # least one keyword argument is required. To specify no parameters, or to keep all
874
+ # the default parameter values, pass an empty Hash as a request object (see above).
875
+ #
876
+ # @param project [::String]
877
+ # Project ID for this request.
878
+ # @param region [::String]
879
+ # The name of the region for this request.
880
+ # @param resource [::String]
881
+ # Name or id of the resource for this request.
882
+ # @param test_permissions_request_resource [::Google::Cloud::Compute::V1::TestPermissionsRequest, ::Hash]
883
+ # The body resource for this request
884
+ # @yield [result, operation] Access the result along with the TransportOperation object
885
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
886
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
887
+ #
888
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
889
+ #
890
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
891
+ #
892
+ # @example Basic example
893
+ # require "google/cloud/compute/v1"
894
+ #
895
+ # # Create a client object. The client can be reused for multiple calls.
896
+ # client = Google::Cloud::Compute::V1::RegionNotificationEndpoints::Rest::Client.new
897
+ #
898
+ # # Create a request. To set request fields, pass in keyword arguments.
899
+ # request = Google::Cloud::Compute::V1::TestIamPermissionsRegionNotificationEndpointRequest.new
900
+ #
901
+ # # Call the test_iam_permissions method.
902
+ # result = client.test_iam_permissions request
903
+ #
904
+ # # The returned object is of type Google::Cloud::Compute::V1::TestPermissionsResponse.
905
+ # p result
906
+ #
907
+ def test_iam_permissions request, options = nil
908
+ raise ::ArgumentError, "request must be provided" if request.nil?
909
+
910
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::TestIamPermissionsRegionNotificationEndpointRequest
911
+
912
+ # Converts hash and nil to an options object
913
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
914
+
915
+ # Customize the options with defaults
916
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
917
+
918
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
919
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
920
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
921
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
922
+ transports_version_send: [:rest]
923
+
924
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
925
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
926
+
927
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
928
+ metadata: call_metadata,
929
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
930
+
931
+ options.apply_defaults timeout: @config.timeout,
932
+ metadata: @config.metadata,
933
+ retry_policy: @config.retry_policy
934
+
935
+ @region_notification_endpoints_stub.test_iam_permissions request, options do |result, operation|
936
+ yield result, operation if block_given?
937
+ end
938
+ rescue ::Gapic::Rest::Error => e
939
+ raise ::Google::Cloud::Error.from_error(e)
940
+ end
941
+
568
942
  ##
569
943
  # Configuration class for the RegionNotificationEndpoints REST API.
570
944
  #
@@ -581,17 +955,17 @@ module Google
581
955
  # @example
582
956
  #
583
957
  # # Modify the global config, setting the timeout for
584
- # # delete to 20 seconds,
958
+ # # aggregated_list to 20 seconds,
585
959
  # # and all remaining timeouts to 10 seconds.
586
960
  # ::Google::Cloud::Compute::V1::RegionNotificationEndpoints::Rest::Client.configure do |config|
587
961
  # config.timeout = 10.0
588
- # config.rpcs.delete.timeout = 20.0
962
+ # config.rpcs.aggregated_list.timeout = 20.0
589
963
  # end
590
964
  #
591
965
  # # Apply the above configuration only to a new client.
592
966
  # client = ::Google::Cloud::Compute::V1::RegionNotificationEndpoints::Rest::Client.new do |config|
593
967
  # config.timeout = 10.0
594
- # config.rpcs.delete.timeout = 20.0
968
+ # config.rpcs.aggregated_list.timeout = 20.0
595
969
  # end
596
970
  #
597
971
  # @!attribute [rw] endpoint
@@ -711,6 +1085,11 @@ module Google
711
1085
  # trigger a retry.
712
1086
  #
713
1087
  class Rpcs
1088
+ ##
1089
+ # RPC-specific configuration for `aggregated_list`
1090
+ # @return [::Gapic::Config::Method]
1091
+ #
1092
+ attr_reader :aggregated_list
714
1093
  ##
715
1094
  # RPC-specific configuration for `delete`
716
1095
  # @return [::Gapic::Config::Method]
@@ -731,9 +1110,16 @@ module Google
731
1110
  # @return [::Gapic::Config::Method]
732
1111
  #
733
1112
  attr_reader :list
1113
+ ##
1114
+ # RPC-specific configuration for `test_iam_permissions`
1115
+ # @return [::Gapic::Config::Method]
1116
+ #
1117
+ attr_reader :test_iam_permissions
734
1118
 
735
1119
  # @private
736
1120
  def initialize parent_rpcs = nil
1121
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
1122
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
737
1123
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
738
1124
  @delete = ::Gapic::Config::Method.new delete_config
739
1125
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
@@ -742,6 +1128,8 @@ module Google
742
1128
  @insert = ::Gapic::Config::Method.new insert_config
743
1129
  list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
744
1130
  @list = ::Gapic::Config::Method.new list_config
1131
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
1132
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
745
1133
 
746
1134
  yield self if block_given?
747
1135
  end
@@ -73,6 +73,46 @@ module Google
73
73
  stub ? @client_stub.stub_logger : @client_stub.logger
74
74
  end
75
75
 
76
+ ##
77
+ # Baseline implementation for the aggregated_list REST call
78
+ #
79
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListRegionNotificationEndpointsRequest]
80
+ # A request object representing the call parameters. Required.
81
+ # @param options [::Gapic::CallOptions]
82
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
83
+ #
84
+ # @yield [result, operation] Access the result along with the TransportOperation object
85
+ # @yieldparam result [::Google::Cloud::Compute::V1::NotificationEndpointAggregatedList]
86
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
87
+ #
88
+ # @return [::Google::Cloud::Compute::V1::NotificationEndpointAggregatedList]
89
+ # A result object deserialized from the server's reply
90
+ def aggregated_list request_pb, options = nil
91
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
92
+
93
+ verb, uri, query_string_params, body = ServiceStub.transcode_aggregated_list_request request_pb
94
+ query_string_params = if query_string_params.any?
95
+ query_string_params.to_h { |p| p.split "=", 2 }
96
+ else
97
+ {}
98
+ end
99
+
100
+ response = @client_stub.make_http_request(
101
+ verb,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "aggregated_list",
106
+ options: options
107
+ )
108
+ operation = ::Gapic::Rest::TransportOperation.new response
109
+ result = ::Google::Cloud::Compute::V1::NotificationEndpointAggregatedList.decode_json response.body, ignore_unknown_fields: true
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
114
+ end
115
+
76
116
  ##
77
117
  # Baseline implementation for the delete REST call
78
118
  #
@@ -233,6 +273,67 @@ module Google
233
273
  end
234
274
  end
235
275
 
276
+ ##
277
+ # Baseline implementation for the test_iam_permissions REST call
278
+ #
279
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsRegionNotificationEndpointRequest]
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
+
316
+ ##
317
+ # @private
318
+ #
319
+ # GRPC transcoding helper method for the aggregated_list REST call
320
+ #
321
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListRegionNotificationEndpointsRequest]
322
+ # A request object representing the call parameters. Required.
323
+ # @return [Array(String, [String, nil], Hash{String => String})]
324
+ # Uri, Body, Query string parameters
325
+ def self.transcode_aggregated_list_request request_pb
326
+ transcoder = Gapic::Rest::GrpcTranscoder.new
327
+ .with_bindings(
328
+ uri_method: :get,
329
+ uri_template: "/compute/v1/projects/{project}/aggregated/notificationEndpoints",
330
+ matches: [
331
+ ["project", %r{^[^/]+/?$}, false]
332
+ ]
333
+ )
334
+ transcoder.transcode request_pb
335
+ end
336
+
236
337
  ##
237
338
  # @private
238
339
  #
@@ -323,6 +424,30 @@ module Google
323
424
  )
324
425
  transcoder.transcode request_pb
325
426
  end
427
+
428
+ ##
429
+ # @private
430
+ #
431
+ # GRPC transcoding helper method for the test_iam_permissions REST call
432
+ #
433
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsRegionNotificationEndpointRequest]
434
+ # A request object representing the call parameters. Required.
435
+ # @return [Array(String, [String, nil], Hash{String => String})]
436
+ # Uri, Body, Query string parameters
437
+ def self.transcode_test_iam_permissions_request request_pb
438
+ transcoder = Gapic::Rest::GrpcTranscoder.new
439
+ .with_bindings(
440
+ uri_method: :post,
441
+ uri_template: "/compute/v1/projects/{project}/regions/{region}/notificationEndpoints/{resource}/testIamPermissions",
442
+ body: "test_permissions_request_resource",
443
+ matches: [
444
+ ["project", %r{^[^/]+/?$}, false],
445
+ ["region", %r{^[^/]+/?$}, false],
446
+ ["resource", %r{^[^/]+/?$}, false]
447
+ ]
448
+ )
449
+ transcoder.transcode request_pb
450
+ end
326
451
  end
327
452
  end
328
453
  end