google-cloud-compute-v1 1.7.1 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (363) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +76 -50
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +9 -10
  4. data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +20 -0
  5. data/lib/google/cloud/compute/v1/accelerator_types.rb +2 -2
  6. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +104 -83
  7. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +15 -16
  8. data/lib/google/cloud/compute/v1/addresses/rest.rb +18 -0
  9. data/lib/google/cloud/compute/v1/addresses.rb +2 -2
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +113 -94
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +17 -18
  12. data/lib/google/cloud/compute/v1/autoscalers/rest.rb +18 -0
  13. data/lib/google/cloud/compute/v1/autoscalers.rb +2 -2
  14. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +131 -116
  15. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +21 -22
  16. data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +18 -0
  17. data/lib/google/cloud/compute/v1/backend_buckets.rb +2 -2
  18. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +176 -171
  19. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +31 -32
  20. data/lib/google/cloud/compute/v1/backend_services/rest.rb +18 -0
  21. data/lib/google/cloud/compute/v1/backend_services.rb +2 -2
  22. data/lib/google/cloud/compute/v1/compute_pb.rb +260 -0
  23. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +76 -50
  24. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +9 -10
  25. data/lib/google/cloud/compute/v1/disk_types/rest.rb +18 -0
  26. data/lib/google/cloud/compute/v1/disk_types.rb +2 -2
  27. data/lib/google/cloud/compute/v1/disks/rest/client.rb +167 -160
  28. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +29 -30
  29. data/lib/google/cloud/compute/v1/disks/rest.rb +18 -0
  30. data/lib/google/cloud/compute/v1/disks.rb +2 -2
  31. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +104 -83
  32. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +15 -16
  33. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +18 -0
  34. data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +2 -2
  35. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +212 -215
  36. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +39 -40
  37. data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +18 -0
  38. data/lib/google/cloud/compute/v1/firewall_policies.rb +2 -2
  39. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +104 -83
  40. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +15 -16
  41. data/lib/google/cloud/compute/v1/firewalls/rest.rb +18 -0
  42. data/lib/google/cloud/compute/v1/firewalls.rb +2 -2
  43. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +122 -105
  44. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +19 -20
  45. data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +18 -0
  46. data/lib/google/cloud/compute/v1/forwarding_rules.rb +2 -2
  47. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +95 -72
  48. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +13 -14
  49. data/lib/google/cloud/compute/v1/global_addresses/rest.rb +18 -0
  50. data/lib/google/cloud/compute/v1/global_addresses.rb +2 -2
  51. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -94
  52. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +17 -18
  53. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +18 -0
  54. data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +2 -2
  55. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +113 -94
  56. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +17 -18
  57. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +18 -0
  58. data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +2 -2
  59. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +94 -72
  60. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +13 -14
  61. data/lib/google/cloud/compute/v1/global_operations/rest.rb +18 -0
  62. data/lib/google/cloud/compute/v1/global_operations.rb +2 -2
  63. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +76 -50
  64. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +9 -10
  65. data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +18 -0
  66. data/lib/google/cloud/compute/v1/global_organization_operations.rb +2 -2
  67. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +95 -72
  68. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +13 -14
  69. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +18 -0
  70. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +2 -2
  71. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +113 -94
  72. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +17 -18
  73. data/lib/google/cloud/compute/v1/health_checks/rest.rb +18 -0
  74. data/lib/google/cloud/compute/v1/health_checks.rb +2 -2
  75. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +58 -28
  76. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +5 -6
  77. data/lib/google/cloud/compute/v1/image_family_views/rest.rb +18 -0
  78. data/lib/google/cloud/compute/v1/image_family_views.rb +2 -2
  79. data/lib/google/cloud/compute/v1/images/rest/client.rb +149 -138
  80. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +25 -26
  81. data/lib/google/cloud/compute/v1/images/rest.rb +18 -0
  82. data/lib/google/cloud/compute/v1/images.rb +2 -2
  83. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +230 -237
  84. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +43 -44
  85. data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +18 -0
  86. data/lib/google/cloud/compute/v1/instance_group_managers.rb +2 -2
  87. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +131 -116
  88. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +21 -22
  89. data/lib/google/cloud/compute/v1/instance_groups/rest.rb +18 -0
  90. data/lib/google/cloud/compute/v1/instance_groups.rb +2 -2
  91. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +113 -94
  92. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +17 -18
  93. data/lib/google/cloud/compute/v1/instance_templates/rest.rb +18 -0
  94. data/lib/google/cloud/compute/v1/instance_templates.rb +2 -2
  95. data/lib/google/cloud/compute/v1/instances/rest/client.rb +461 -514
  96. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +93 -94
  97. data/lib/google/cloud/compute/v1/instances/rest.rb +18 -0
  98. data/lib/google/cloud/compute/v1/instances.rb +2 -2
  99. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +113 -94
  100. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +17 -18
  101. data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +18 -0
  102. data/lib/google/cloud/compute/v1/interconnect_attachments.rb +2 -2
  103. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +67 -39
  104. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +7 -8
  105. data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +18 -0
  106. data/lib/google/cloud/compute/v1/interconnect_locations.rb +2 -2
  107. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +119 -100
  108. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +17 -18
  109. data/lib/google/cloud/compute/v1/interconnects/rest.rb +18 -0
  110. data/lib/google/cloud/compute/v1/interconnects.rb +2 -2
  111. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +67 -39
  112. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +7 -8
  113. data/lib/google/cloud/compute/v1/license_codes/rest.rb +18 -0
  114. data/lib/google/cloud/compute/v1/license_codes.rb +2 -2
  115. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -94
  116. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +17 -18
  117. data/lib/google/cloud/compute/v1/licenses/rest.rb +18 -0
  118. data/lib/google/cloud/compute/v1/licenses.rb +2 -2
  119. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -94
  120. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +17 -18
  121. data/lib/google/cloud/compute/v1/machine_images/rest.rb +18 -0
  122. data/lib/google/cloud/compute/v1/machine_images.rb +2 -2
  123. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +76 -50
  124. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +9 -10
  125. data/lib/google/cloud/compute/v1/machine_types/rest.rb +18 -0
  126. data/lib/google/cloud/compute/v1/machine_types.rb +2 -2
  127. data/lib/google/cloud/compute/v1/network_attachments/credentials.rb +52 -0
  128. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +945 -0
  129. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +527 -0
  130. data/lib/google/cloud/compute/v1/network_attachments/rest.rb +51 -0
  131. data/lib/google/cloud/compute/v1/network_attachments.rb +47 -0
  132. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +95 -72
  133. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +13 -14
  134. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +18 -0
  135. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +2 -2
  136. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +131 -116
  137. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +21 -22
  138. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +18 -0
  139. data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +2 -2
  140. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +194 -193
  141. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +35 -36
  142. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +18 -0
  143. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +2 -2
  144. data/lib/google/cloud/compute/v1/networks/rest/client.rb +149 -138
  145. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +25 -26
  146. data/lib/google/cloud/compute/v1/networks/rest.rb +18 -0
  147. data/lib/google/cloud/compute/v1/networks.rb +2 -2
  148. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +167 -160
  149. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +29 -30
  150. data/lib/google/cloud/compute/v1/node_groups/rest.rb +18 -0
  151. data/lib/google/cloud/compute/v1/node_groups.rb +2 -2
  152. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +122 -105
  153. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +19 -20
  154. data/lib/google/cloud/compute/v1/node_templates/rest.rb +18 -0
  155. data/lib/google/cloud/compute/v1/node_templates.rb +2 -2
  156. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +76 -50
  157. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +9 -10
  158. data/lib/google/cloud/compute/v1/node_types/rest.rb +18 -0
  159. data/lib/google/cloud/compute/v1/node_types.rb +2 -2
  160. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +113 -94
  161. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +17 -18
  162. data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +18 -0
  163. data/lib/google/cloud/compute/v1/packet_mirrorings.rb +2 -2
  164. data/lib/google/cloud/compute/v1/projects/rest/client.rb +167 -160
  165. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +29 -30
  166. data/lib/google/cloud/compute/v1/projects/rest.rb +18 -0
  167. data/lib/google/cloud/compute/v1/projects.rb +2 -2
  168. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +95 -72
  169. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +13 -14
  170. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +18 -0
  171. data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +2 -2
  172. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +104 -83
  173. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +15 -16
  174. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +18 -0
  175. data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +2 -2
  176. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +104 -83
  177. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +15 -16
  178. data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +18 -0
  179. data/lib/google/cloud/compute/v1/region_autoscalers.rb +2 -2
  180. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +131 -116
  181. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +21 -22
  182. data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +18 -0
  183. data/lib/google/cloud/compute/v1/region_backend_services.rb +2 -2
  184. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +95 -72
  185. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +13 -14
  186. data/lib/google/cloud/compute/v1/region_commitments/rest.rb +18 -0
  187. data/lib/google/cloud/compute/v1/region_commitments.rb +2 -2
  188. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +67 -39
  189. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +7 -8
  190. data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +18 -0
  191. data/lib/google/cloud/compute/v1/region_disk_types.rb +2 -2
  192. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +158 -149
  193. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +27 -28
  194. data/lib/google/cloud/compute/v1/region_disks/rest.rb +18 -0
  195. data/lib/google/cloud/compute/v1/region_disks.rb +2 -2
  196. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +95 -72
  197. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +13 -14
  198. data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +18 -0
  199. data/lib/google/cloud/compute/v1/region_health_check_services.rb +2 -2
  200. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +104 -83
  201. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +15 -16
  202. data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +18 -0
  203. data/lib/google/cloud/compute/v1/region_health_checks.rb +2 -2
  204. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +221 -226
  205. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +41 -42
  206. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +18 -0
  207. data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +2 -2
  208. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +86 -61
  209. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +11 -12
  210. data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +18 -0
  211. data/lib/google/cloud/compute/v1/region_instance_groups.rb +2 -2
  212. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +59 -28
  213. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +5 -6
  214. data/lib/google/cloud/compute/v1/region_instances/rest.rb +18 -0
  215. data/lib/google/cloud/compute/v1/region_instances.rb +2 -2
  216. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +86 -61
  217. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +11 -12
  218. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +18 -0
  219. data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +2 -2
  220. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +203 -204
  221. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +37 -38
  222. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +18 -0
  223. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +2 -2
  224. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +86 -61
  225. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +11 -12
  226. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +18 -0
  227. data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +2 -2
  228. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +85 -61
  229. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +11 -12
  230. data/lib/google/cloud/compute/v1/region_operations/rest.rb +18 -0
  231. data/lib/google/cloud/compute/v1/region_operations.rb +2 -2
  232. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +96 -73
  233. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +13 -14
  234. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +18 -0
  235. data/lib/google/cloud/compute/v1/region_security_policies.rb +2 -2
  236. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +86 -61
  237. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +11 -12
  238. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +18 -0
  239. data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +2 -2
  240. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +104 -83
  241. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +15 -16
  242. data/lib/google/cloud/compute/v1/region_ssl_policies/rest.rb +18 -0
  243. data/lib/google/cloud/compute/v1/region_ssl_policies.rb +2 -2
  244. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +95 -72
  245. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +13 -14
  246. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +18 -0
  247. data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +2 -2
  248. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -94
  249. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +17 -18
  250. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +18 -0
  251. data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +2 -2
  252. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +86 -61
  253. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +11 -12
  254. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest.rb +18 -0
  255. data/lib/google/cloud/compute/v1/region_target_tcp_proxies.rb +2 -2
  256. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -94
  257. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +17 -18
  258. data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +18 -0
  259. data/lib/google/cloud/compute/v1/region_url_maps.rb +2 -2
  260. data/lib/google/cloud/compute/v1/regions/rest/client.rb +67 -39
  261. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +7 -8
  262. data/lib/google/cloud/compute/v1/regions/rest.rb +18 -0
  263. data/lib/google/cloud/compute/v1/regions.rb +2 -2
  264. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +140 -127
  265. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +23 -24
  266. data/lib/google/cloud/compute/v1/reservations/rest.rb +18 -0
  267. data/lib/google/cloud/compute/v1/reservations.rb +2 -2
  268. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +122 -105
  269. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +19 -20
  270. data/lib/google/cloud/compute/v1/resource_policies/rest.rb +18 -0
  271. data/lib/google/cloud/compute/v1/resource_policies.rb +2 -2
  272. data/lib/google/cloud/compute/v1/rest.rb +124 -0
  273. data/lib/google/cloud/compute/v1/routers/rest/client.rb +140 -127
  274. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +23 -24
  275. data/lib/google/cloud/compute/v1/routers/rest.rb +18 -0
  276. data/lib/google/cloud/compute/v1/routers.rb +2 -2
  277. data/lib/google/cloud/compute/v1/routes/rest/client.rb +86 -61
  278. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +11 -12
  279. data/lib/google/cloud/compute/v1/routes/rest.rb +18 -0
  280. data/lib/google/cloud/compute/v1/routes.rb +2 -2
  281. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +159 -150
  282. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +27 -28
  283. data/lib/google/cloud/compute/v1/security_policies/rest.rb +18 -0
  284. data/lib/google/cloud/compute/v1/security_policies.rb +2 -2
  285. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +131 -116
  286. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +21 -22
  287. data/lib/google/cloud/compute/v1/service_attachments/rest.rb +18 -0
  288. data/lib/google/cloud/compute/v1/service_attachments.rb +2 -2
  289. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +122 -105
  290. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +19 -20
  291. data/lib/google/cloud/compute/v1/snapshots/rest.rb +18 -0
  292. data/lib/google/cloud/compute/v1/snapshots.rb +2 -2
  293. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +95 -72
  294. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +13 -14
  295. data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +18 -0
  296. data/lib/google/cloud/compute/v1/ssl_certificates.rb +2 -2
  297. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +113 -94
  298. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +17 -18
  299. data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +18 -0
  300. data/lib/google/cloud/compute/v1/ssl_policies.rb +2 -2
  301. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +158 -149
  302. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +27 -28
  303. data/lib/google/cloud/compute/v1/subnetworks/rest.rb +18 -0
  304. data/lib/google/cloud/compute/v1/subnetworks.rb +2 -2
  305. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +95 -72
  306. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +13 -14
  307. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +18 -0
  308. data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +2 -2
  309. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +113 -94
  310. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +17 -18
  311. data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +18 -0
  312. data/lib/google/cloud/compute/v1/target_http_proxies.rb +2 -2
  313. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +149 -138
  314. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +25 -26
  315. data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +18 -0
  316. data/lib/google/cloud/compute/v1/target_https_proxies.rb +2 -2
  317. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +95 -72
  318. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +13 -14
  319. data/lib/google/cloud/compute/v1/target_instances/rest.rb +18 -0
  320. data/lib/google/cloud/compute/v1/target_instances.rb +2 -2
  321. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +149 -138
  322. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +25 -26
  323. data/lib/google/cloud/compute/v1/target_pools/rest.rb +18 -0
  324. data/lib/google/cloud/compute/v1/target_pools.rb +2 -2
  325. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +131 -116
  326. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +21 -22
  327. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +18 -0
  328. data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +2 -2
  329. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +191 -83
  330. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +72 -15
  331. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +18 -0
  332. data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +2 -2
  333. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +104 -83
  334. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +15 -16
  335. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +18 -0
  336. data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +2 -2
  337. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +131 -116
  338. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +21 -22
  339. data/lib/google/cloud/compute/v1/url_maps/rest.rb +18 -0
  340. data/lib/google/cloud/compute/v1/url_maps.rb +2 -2
  341. data/lib/google/cloud/compute/v1/version.rb +1 -1
  342. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +122 -105
  343. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +19 -20
  344. data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +18 -0
  345. data/lib/google/cloud/compute/v1/vpn_gateways.rb +2 -2
  346. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +104 -83
  347. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +15 -16
  348. data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +18 -0
  349. data/lib/google/cloud/compute/v1/vpn_tunnels.rb +2 -2
  350. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +85 -61
  351. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +11 -12
  352. data/lib/google/cloud/compute/v1/zone_operations/rest.rb +18 -0
  353. data/lib/google/cloud/compute/v1/zone_operations.rb +2 -2
  354. data/lib/google/cloud/compute/v1/zones/rest/client.rb +67 -39
  355. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +7 -8
  356. data/lib/google/cloud/compute/v1/zones/rest.rb +18 -0
  357. data/lib/google/cloud/compute/v1/zones.rb +2 -2
  358. data/lib/google/cloud/compute/v1.rb +3 -2
  359. data/proto_docs/google/api/client.rb +318 -0
  360. data/proto_docs/google/api/launch_stage.rb +71 -0
  361. data/proto_docs/google/cloud/compute/v1/compute.rb +761 -86
  362. data/proto_docs/google/protobuf/duration.rb +98 -0
  363. metadata +14 -5
@@ -168,13 +168,22 @@ module Google
168
168
 
169
169
  # Create credentials
170
170
  credentials = @config.credentials
171
- credentials ||= Credentials.default scope: @config.scope
171
+ # Use self-signed JWT if the endpoint is unchanged from default,
172
+ # but only if the default endpoint does not have a region prefix.
173
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
174
+ !@config.endpoint.split(".").first.include?("-")
175
+ credentials ||= Credentials.default scope: @config.scope,
176
+ enable_self_signed_jwt: enable_self_signed_jwt
172
177
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
173
178
  credentials = Credentials.new credentials, scope: @config.scope
174
179
  end
175
180
 
181
+ @quota_project_id = @config.quota_project
182
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
183
+
176
184
  @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
177
185
  config.credentials = credentials
186
+ config.quota_project = @quota_project_id
178
187
  config.endpoint = @config.endpoint
179
188
  end
180
189
 
@@ -202,8 +211,6 @@ module Google
202
211
  # parameters, or to keep all the default parameter values, pass an empty Hash.
203
212
  # @param options [::Gapic::CallOptions, ::Hash]
204
213
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
205
- # Note: currently retry functionality is not implemented. While it is possible
206
- # to set it using ::Gapic::CallOptions, it will not be applied
207
214
  #
208
215
  # @overload add_association(firewall_policy: nil, firewall_policy_association_resource: nil, project: nil, region: nil, replace_existing_association: nil, request_id: nil)
209
216
  # Pass arguments to `add_association` via keyword arguments. Note that at
@@ -240,17 +247,21 @@ module Google
240
247
  # Customize the options with defaults
241
248
  call_metadata = @config.rpcs.add_association.metadata.to_h
242
249
 
243
- # Set x-goog-api-client header
250
+ # Set x-goog-api-client and x-goog-user-project headers
244
251
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
245
252
  lib_name: @config.lib_name, lib_version: @config.lib_version,
246
253
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
247
254
  transports_version_send: [:rest]
248
255
 
256
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
257
+
249
258
  options.apply_defaults timeout: @config.rpcs.add_association.timeout,
250
- metadata: call_metadata
259
+ metadata: call_metadata,
260
+ retry_policy: @config.rpcs.add_association.retry_policy
251
261
 
252
262
  options.apply_defaults timeout: @config.timeout,
253
- metadata: @config.metadata
263
+ metadata: @config.metadata,
264
+ retry_policy: @config.retry_policy
254
265
 
255
266
  @region_network_firewall_policies_stub.add_association request, options do |result, response|
256
267
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -265,12 +276,8 @@ module Google
265
276
  yield result, response if block_given?
266
277
  return result
267
278
  end
268
- rescue ::Faraday::Error => e
269
- begin
270
- raise ::Gapic::Rest::Error.wrap_faraday_error e
271
- rescue ::Gapic::Rest::Error => gapic_error
272
- raise ::Google::Cloud::Error.from_error gapic_error
273
- end
279
+ rescue ::Gapic::Rest::Error => e
280
+ raise ::Google::Cloud::Error.from_error(e)
274
281
  end
275
282
 
276
283
  ##
@@ -285,8 +292,6 @@ module Google
285
292
  # parameters, or to keep all the default parameter values, pass an empty Hash.
286
293
  # @param options [::Gapic::CallOptions, ::Hash]
287
294
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
288
- # Note: currently retry functionality is not implemented. While it is possible
289
- # to set it using ::Gapic::CallOptions, it will not be applied
290
295
  #
291
296
  # @overload add_rule(firewall_policy: nil, firewall_policy_rule_resource: nil, max_priority: nil, min_priority: nil, project: nil, region: nil, request_id: nil)
292
297
  # Pass arguments to `add_rule` via keyword arguments. Note that at
@@ -325,17 +330,21 @@ module Google
325
330
  # Customize the options with defaults
326
331
  call_metadata = @config.rpcs.add_rule.metadata.to_h
327
332
 
328
- # Set x-goog-api-client header
333
+ # Set x-goog-api-client and x-goog-user-project headers
329
334
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
330
335
  lib_name: @config.lib_name, lib_version: @config.lib_version,
331
336
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
332
337
  transports_version_send: [:rest]
333
338
 
339
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
+
334
341
  options.apply_defaults timeout: @config.rpcs.add_rule.timeout,
335
- metadata: call_metadata
342
+ metadata: call_metadata,
343
+ retry_policy: @config.rpcs.add_rule.retry_policy
336
344
 
337
345
  options.apply_defaults timeout: @config.timeout,
338
- metadata: @config.metadata
346
+ metadata: @config.metadata,
347
+ retry_policy: @config.retry_policy
339
348
 
340
349
  @region_network_firewall_policies_stub.add_rule request, options do |result, response|
341
350
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -350,12 +359,8 @@ module Google
350
359
  yield result, response if block_given?
351
360
  return result
352
361
  end
353
- rescue ::Faraday::Error => e
354
- begin
355
- raise ::Gapic::Rest::Error.wrap_faraday_error e
356
- rescue ::Gapic::Rest::Error => gapic_error
357
- raise ::Google::Cloud::Error.from_error gapic_error
358
- end
362
+ rescue ::Gapic::Rest::Error => e
363
+ raise ::Google::Cloud::Error.from_error(e)
359
364
  end
360
365
 
361
366
  ##
@@ -370,8 +375,6 @@ module Google
370
375
  # parameters, or to keep all the default parameter values, pass an empty Hash.
371
376
  # @param options [::Gapic::CallOptions, ::Hash]
372
377
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
373
- # Note: currently retry functionality is not implemented. While it is possible
374
- # to set it using ::Gapic::CallOptions, it will not be applied
375
378
  #
376
379
  # @overload clone_rules(firewall_policy: nil, project: nil, region: nil, request_id: nil, source_firewall_policy: nil)
377
380
  # Pass arguments to `clone_rules` via keyword arguments. Note that at
@@ -406,17 +409,21 @@ module Google
406
409
  # Customize the options with defaults
407
410
  call_metadata = @config.rpcs.clone_rules.metadata.to_h
408
411
 
409
- # Set x-goog-api-client header
412
+ # Set x-goog-api-client and x-goog-user-project headers
410
413
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
411
414
  lib_name: @config.lib_name, lib_version: @config.lib_version,
412
415
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
413
416
  transports_version_send: [:rest]
414
417
 
418
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
419
+
415
420
  options.apply_defaults timeout: @config.rpcs.clone_rules.timeout,
416
- metadata: call_metadata
421
+ metadata: call_metadata,
422
+ retry_policy: @config.rpcs.clone_rules.retry_policy
417
423
 
418
424
  options.apply_defaults timeout: @config.timeout,
419
- metadata: @config.metadata
425
+ metadata: @config.metadata,
426
+ retry_policy: @config.retry_policy
420
427
 
421
428
  @region_network_firewall_policies_stub.clone_rules request, options do |result, response|
422
429
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -431,12 +438,8 @@ module Google
431
438
  yield result, response if block_given?
432
439
  return result
433
440
  end
434
- rescue ::Faraday::Error => e
435
- begin
436
- raise ::Gapic::Rest::Error.wrap_faraday_error e
437
- rescue ::Gapic::Rest::Error => gapic_error
438
- raise ::Google::Cloud::Error.from_error gapic_error
439
- end
441
+ rescue ::Gapic::Rest::Error => e
442
+ raise ::Google::Cloud::Error.from_error(e)
440
443
  end
441
444
 
442
445
  ##
@@ -451,8 +454,6 @@ module Google
451
454
  # parameters, or to keep all the default parameter values, pass an empty Hash.
452
455
  # @param options [::Gapic::CallOptions, ::Hash]
453
456
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
454
- # Note: currently retry functionality is not implemented. While it is possible
455
- # to set it using ::Gapic::CallOptions, it will not be applied
456
457
  #
457
458
  # @overload delete(firewall_policy: nil, project: nil, region: nil, request_id: nil)
458
459
  # Pass arguments to `delete` via keyword arguments. Note that at
@@ -485,17 +486,21 @@ module Google
485
486
  # Customize the options with defaults
486
487
  call_metadata = @config.rpcs.delete.metadata.to_h
487
488
 
488
- # Set x-goog-api-client header
489
+ # Set x-goog-api-client and x-goog-user-project headers
489
490
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
490
491
  lib_name: @config.lib_name, lib_version: @config.lib_version,
491
492
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
492
493
  transports_version_send: [:rest]
493
494
 
495
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
496
+
494
497
  options.apply_defaults timeout: @config.rpcs.delete.timeout,
495
- metadata: call_metadata
498
+ metadata: call_metadata,
499
+ retry_policy: @config.rpcs.delete.retry_policy
496
500
 
497
501
  options.apply_defaults timeout: @config.timeout,
498
- metadata: @config.metadata
502
+ metadata: @config.metadata,
503
+ retry_policy: @config.retry_policy
499
504
 
500
505
  @region_network_firewall_policies_stub.delete request, options do |result, response|
501
506
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -510,12 +515,8 @@ module Google
510
515
  yield result, response if block_given?
511
516
  return result
512
517
  end
513
- rescue ::Faraday::Error => e
514
- begin
515
- raise ::Gapic::Rest::Error.wrap_faraday_error e
516
- rescue ::Gapic::Rest::Error => gapic_error
517
- raise ::Google::Cloud::Error.from_error gapic_error
518
- end
518
+ rescue ::Gapic::Rest::Error => e
519
+ raise ::Google::Cloud::Error.from_error(e)
519
520
  end
520
521
 
521
522
  ##
@@ -530,8 +531,6 @@ module Google
530
531
  # parameters, or to keep all the default parameter values, pass an empty Hash.
531
532
  # @param options [::Gapic::CallOptions, ::Hash]
532
533
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
533
- # Note: currently retry functionality is not implemented. While it is possible
534
- # to set it using ::Gapic::CallOptions, it will not be applied
535
534
  #
536
535
  # @overload get(firewall_policy: nil, project: nil, region: nil)
537
536
  # Pass arguments to `get` via keyword arguments. Note that at
@@ -562,28 +561,28 @@ module Google
562
561
  # Customize the options with defaults
563
562
  call_metadata = @config.rpcs.get.metadata.to_h
564
563
 
565
- # Set x-goog-api-client header
564
+ # Set x-goog-api-client and x-goog-user-project headers
566
565
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
567
566
  lib_name: @config.lib_name, lib_version: @config.lib_version,
568
567
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
569
568
  transports_version_send: [:rest]
570
569
 
570
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
571
+
571
572
  options.apply_defaults timeout: @config.rpcs.get.timeout,
572
- metadata: call_metadata
573
+ metadata: call_metadata,
574
+ retry_policy: @config.rpcs.get.retry_policy
573
575
 
574
576
  options.apply_defaults timeout: @config.timeout,
575
- metadata: @config.metadata
577
+ metadata: @config.metadata,
578
+ retry_policy: @config.retry_policy
576
579
 
577
580
  @region_network_firewall_policies_stub.get request, options do |result, response|
578
581
  yield result, response if block_given?
579
582
  return result
580
583
  end
581
- rescue ::Faraday::Error => e
582
- begin
583
- raise ::Gapic::Rest::Error.wrap_faraday_error e
584
- rescue ::Gapic::Rest::Error => gapic_error
585
- raise ::Google::Cloud::Error.from_error gapic_error
586
- end
584
+ rescue ::Gapic::Rest::Error => e
585
+ raise ::Google::Cloud::Error.from_error(e)
587
586
  end
588
587
 
589
588
  ##
@@ -598,8 +597,6 @@ module Google
598
597
  # parameters, or to keep all the default parameter values, pass an empty Hash.
599
598
  # @param options [::Gapic::CallOptions, ::Hash]
600
599
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
601
- # Note: currently retry functionality is not implemented. While it is possible
602
- # to set it using ::Gapic::CallOptions, it will not be applied
603
600
  #
604
601
  # @overload get_association(firewall_policy: nil, name: nil, project: nil, region: nil)
605
602
  # Pass arguments to `get_association` via keyword arguments. Note that at
@@ -632,28 +629,28 @@ module Google
632
629
  # Customize the options with defaults
633
630
  call_metadata = @config.rpcs.get_association.metadata.to_h
634
631
 
635
- # Set x-goog-api-client header
632
+ # Set x-goog-api-client and x-goog-user-project headers
636
633
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
637
634
  lib_name: @config.lib_name, lib_version: @config.lib_version,
638
635
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
639
636
  transports_version_send: [:rest]
640
637
 
638
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
639
+
641
640
  options.apply_defaults timeout: @config.rpcs.get_association.timeout,
642
- metadata: call_metadata
641
+ metadata: call_metadata,
642
+ retry_policy: @config.rpcs.get_association.retry_policy
643
643
 
644
644
  options.apply_defaults timeout: @config.timeout,
645
- metadata: @config.metadata
645
+ metadata: @config.metadata,
646
+ retry_policy: @config.retry_policy
646
647
 
647
648
  @region_network_firewall_policies_stub.get_association request, options do |result, response|
648
649
  yield result, response if block_given?
649
650
  return result
650
651
  end
651
- rescue ::Faraday::Error => e
652
- begin
653
- raise ::Gapic::Rest::Error.wrap_faraday_error e
654
- rescue ::Gapic::Rest::Error => gapic_error
655
- raise ::Google::Cloud::Error.from_error gapic_error
656
- end
652
+ rescue ::Gapic::Rest::Error => e
653
+ raise ::Google::Cloud::Error.from_error(e)
657
654
  end
658
655
 
659
656
  ##
@@ -668,8 +665,6 @@ module Google
668
665
  # parameters, or to keep all the default parameter values, pass an empty Hash.
669
666
  # @param options [::Gapic::CallOptions, ::Hash]
670
667
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
671
- # Note: currently retry functionality is not implemented. While it is possible
672
- # to set it using ::Gapic::CallOptions, it will not be applied
673
668
  #
674
669
  # @overload get_effective_firewalls(network: nil, project: nil, region: nil)
675
670
  # Pass arguments to `get_effective_firewalls` via keyword arguments. Note that at
@@ -700,28 +695,28 @@ module Google
700
695
  # Customize the options with defaults
701
696
  call_metadata = @config.rpcs.get_effective_firewalls.metadata.to_h
702
697
 
703
- # Set x-goog-api-client header
698
+ # Set x-goog-api-client and x-goog-user-project headers
704
699
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
705
700
  lib_name: @config.lib_name, lib_version: @config.lib_version,
706
701
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
707
702
  transports_version_send: [:rest]
708
703
 
704
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
705
+
709
706
  options.apply_defaults timeout: @config.rpcs.get_effective_firewalls.timeout,
710
- metadata: call_metadata
707
+ metadata: call_metadata,
708
+ retry_policy: @config.rpcs.get_effective_firewalls.retry_policy
711
709
 
712
710
  options.apply_defaults timeout: @config.timeout,
713
- metadata: @config.metadata
711
+ metadata: @config.metadata,
712
+ retry_policy: @config.retry_policy
714
713
 
715
714
  @region_network_firewall_policies_stub.get_effective_firewalls request, options do |result, response|
716
715
  yield result, response if block_given?
717
716
  return result
718
717
  end
719
- rescue ::Faraday::Error => e
720
- begin
721
- raise ::Gapic::Rest::Error.wrap_faraday_error e
722
- rescue ::Gapic::Rest::Error => gapic_error
723
- raise ::Google::Cloud::Error.from_error gapic_error
724
- end
718
+ rescue ::Gapic::Rest::Error => e
719
+ raise ::Google::Cloud::Error.from_error(e)
725
720
  end
726
721
 
727
722
  ##
@@ -736,8 +731,6 @@ module Google
736
731
  # parameters, or to keep all the default parameter values, pass an empty Hash.
737
732
  # @param options [::Gapic::CallOptions, ::Hash]
738
733
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
739
- # Note: currently retry functionality is not implemented. While it is possible
740
- # to set it using ::Gapic::CallOptions, it will not be applied
741
734
  #
742
735
  # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, region: nil, resource: nil)
743
736
  # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
@@ -770,28 +763,28 @@ module Google
770
763
  # Customize the options with defaults
771
764
  call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
772
765
 
773
- # Set x-goog-api-client header
766
+ # Set x-goog-api-client and x-goog-user-project headers
774
767
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
775
768
  lib_name: @config.lib_name, lib_version: @config.lib_version,
776
769
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
777
770
  transports_version_send: [:rest]
778
771
 
772
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
773
+
779
774
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
780
- metadata: call_metadata
775
+ metadata: call_metadata,
776
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
781
777
 
782
778
  options.apply_defaults timeout: @config.timeout,
783
- metadata: @config.metadata
779
+ metadata: @config.metadata,
780
+ retry_policy: @config.retry_policy
784
781
 
785
782
  @region_network_firewall_policies_stub.get_iam_policy request, options do |result, response|
786
783
  yield result, response if block_given?
787
784
  return result
788
785
  end
789
- rescue ::Faraday::Error => e
790
- begin
791
- raise ::Gapic::Rest::Error.wrap_faraday_error e
792
- rescue ::Gapic::Rest::Error => gapic_error
793
- raise ::Google::Cloud::Error.from_error gapic_error
794
- end
786
+ rescue ::Gapic::Rest::Error => e
787
+ raise ::Google::Cloud::Error.from_error(e)
795
788
  end
796
789
 
797
790
  ##
@@ -806,8 +799,6 @@ module Google
806
799
  # parameters, or to keep all the default parameter values, pass an empty Hash.
807
800
  # @param options [::Gapic::CallOptions, ::Hash]
808
801
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
809
- # Note: currently retry functionality is not implemented. While it is possible
810
- # to set it using ::Gapic::CallOptions, it will not be applied
811
802
  #
812
803
  # @overload get_rule(firewall_policy: nil, priority: nil, project: nil, region: nil)
813
804
  # Pass arguments to `get_rule` via keyword arguments. Note that at
@@ -840,28 +831,28 @@ module Google
840
831
  # Customize the options with defaults
841
832
  call_metadata = @config.rpcs.get_rule.metadata.to_h
842
833
 
843
- # Set x-goog-api-client header
834
+ # Set x-goog-api-client and x-goog-user-project headers
844
835
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
845
836
  lib_name: @config.lib_name, lib_version: @config.lib_version,
846
837
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
847
838
  transports_version_send: [:rest]
848
839
 
840
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
841
+
849
842
  options.apply_defaults timeout: @config.rpcs.get_rule.timeout,
850
- metadata: call_metadata
843
+ metadata: call_metadata,
844
+ retry_policy: @config.rpcs.get_rule.retry_policy
851
845
 
852
846
  options.apply_defaults timeout: @config.timeout,
853
- metadata: @config.metadata
847
+ metadata: @config.metadata,
848
+ retry_policy: @config.retry_policy
854
849
 
855
850
  @region_network_firewall_policies_stub.get_rule request, options do |result, response|
856
851
  yield result, response if block_given?
857
852
  return result
858
853
  end
859
- rescue ::Faraday::Error => e
860
- begin
861
- raise ::Gapic::Rest::Error.wrap_faraday_error e
862
- rescue ::Gapic::Rest::Error => gapic_error
863
- raise ::Google::Cloud::Error.from_error gapic_error
864
- end
854
+ rescue ::Gapic::Rest::Error => e
855
+ raise ::Google::Cloud::Error.from_error(e)
865
856
  end
866
857
 
867
858
  ##
@@ -876,8 +867,6 @@ module Google
876
867
  # parameters, or to keep all the default parameter values, pass an empty Hash.
877
868
  # @param options [::Gapic::CallOptions, ::Hash]
878
869
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
879
- # Note: currently retry functionality is not implemented. While it is possible
880
- # to set it using ::Gapic::CallOptions, it will not be applied
881
870
  #
882
871
  # @overload insert(firewall_policy_resource: nil, project: nil, region: nil, request_id: nil)
883
872
  # Pass arguments to `insert` via keyword arguments. Note that at
@@ -910,17 +899,21 @@ module Google
910
899
  # Customize the options with defaults
911
900
  call_metadata = @config.rpcs.insert.metadata.to_h
912
901
 
913
- # Set x-goog-api-client header
902
+ # Set x-goog-api-client and x-goog-user-project headers
914
903
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
915
904
  lib_name: @config.lib_name, lib_version: @config.lib_version,
916
905
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
917
906
  transports_version_send: [:rest]
918
907
 
908
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
909
+
919
910
  options.apply_defaults timeout: @config.rpcs.insert.timeout,
920
- metadata: call_metadata
911
+ metadata: call_metadata,
912
+ retry_policy: @config.rpcs.insert.retry_policy
921
913
 
922
914
  options.apply_defaults timeout: @config.timeout,
923
- metadata: @config.metadata
915
+ metadata: @config.metadata,
916
+ retry_policy: @config.retry_policy
924
917
 
925
918
  @region_network_firewall_policies_stub.insert request, options do |result, response|
926
919
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -935,12 +928,8 @@ module Google
935
928
  yield result, response if block_given?
936
929
  return result
937
930
  end
938
- rescue ::Faraday::Error => e
939
- begin
940
- raise ::Gapic::Rest::Error.wrap_faraday_error e
941
- rescue ::Gapic::Rest::Error => gapic_error
942
- raise ::Google::Cloud::Error.from_error gapic_error
943
- end
931
+ rescue ::Gapic::Rest::Error => e
932
+ raise ::Google::Cloud::Error.from_error(e)
944
933
  end
945
934
 
946
935
  ##
@@ -955,8 +944,6 @@ module Google
955
944
  # parameters, or to keep all the default parameter values, pass an empty Hash.
956
945
  # @param options [::Gapic::CallOptions, ::Hash]
957
946
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
958
- # Note: currently retry functionality is not implemented. While it is possible
959
- # to set it using ::Gapic::CallOptions, it will not be applied
960
947
  #
961
948
  # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
962
949
  # Pass arguments to `list` via keyword arguments. Note that at
@@ -995,29 +982,29 @@ module Google
995
982
  # Customize the options with defaults
996
983
  call_metadata = @config.rpcs.list.metadata.to_h
997
984
 
998
- # Set x-goog-api-client header
985
+ # Set x-goog-api-client and x-goog-user-project headers
999
986
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1000
987
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1001
988
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1002
989
  transports_version_send: [:rest]
1003
990
 
991
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
992
+
1004
993
  options.apply_defaults timeout: @config.rpcs.list.timeout,
1005
- metadata: call_metadata
994
+ metadata: call_metadata,
995
+ retry_policy: @config.rpcs.list.retry_policy
1006
996
 
1007
997
  options.apply_defaults timeout: @config.timeout,
1008
- metadata: @config.metadata
998
+ metadata: @config.metadata,
999
+ retry_policy: @config.retry_policy
1009
1000
 
1010
1001
  @region_network_firewall_policies_stub.list request, options do |result, response|
1011
1002
  result = ::Gapic::Rest::PagedEnumerable.new @region_network_firewall_policies_stub, :list, "items", request, result, options
1012
1003
  yield result, response if block_given?
1013
1004
  return result
1014
1005
  end
1015
- rescue ::Faraday::Error => e
1016
- begin
1017
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1018
- rescue ::Gapic::Rest::Error => gapic_error
1019
- raise ::Google::Cloud::Error.from_error gapic_error
1020
- end
1006
+ rescue ::Gapic::Rest::Error => e
1007
+ raise ::Google::Cloud::Error.from_error(e)
1021
1008
  end
1022
1009
 
1023
1010
  ##
@@ -1032,8 +1019,6 @@ module Google
1032
1019
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1033
1020
  # @param options [::Gapic::CallOptions, ::Hash]
1034
1021
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1035
- # Note: currently retry functionality is not implemented. While it is possible
1036
- # to set it using ::Gapic::CallOptions, it will not be applied
1037
1022
  #
1038
1023
  # @overload patch(firewall_policy: nil, firewall_policy_resource: nil, project: nil, region: nil, request_id: nil)
1039
1024
  # Pass arguments to `patch` via keyword arguments. Note that at
@@ -1068,17 +1053,21 @@ module Google
1068
1053
  # Customize the options with defaults
1069
1054
  call_metadata = @config.rpcs.patch.metadata.to_h
1070
1055
 
1071
- # Set x-goog-api-client header
1056
+ # Set x-goog-api-client and x-goog-user-project headers
1072
1057
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1073
1058
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1074
1059
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1075
1060
  transports_version_send: [:rest]
1076
1061
 
1062
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1063
+
1077
1064
  options.apply_defaults timeout: @config.rpcs.patch.timeout,
1078
- metadata: call_metadata
1065
+ metadata: call_metadata,
1066
+ retry_policy: @config.rpcs.patch.retry_policy
1079
1067
 
1080
1068
  options.apply_defaults timeout: @config.timeout,
1081
- metadata: @config.metadata
1069
+ metadata: @config.metadata,
1070
+ retry_policy: @config.retry_policy
1082
1071
 
1083
1072
  @region_network_firewall_policies_stub.patch request, options do |result, response|
1084
1073
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1093,12 +1082,8 @@ module Google
1093
1082
  yield result, response if block_given?
1094
1083
  return result
1095
1084
  end
1096
- rescue ::Faraday::Error => e
1097
- begin
1098
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1099
- rescue ::Gapic::Rest::Error => gapic_error
1100
- raise ::Google::Cloud::Error.from_error gapic_error
1101
- end
1085
+ rescue ::Gapic::Rest::Error => e
1086
+ raise ::Google::Cloud::Error.from_error(e)
1102
1087
  end
1103
1088
 
1104
1089
  ##
@@ -1113,8 +1098,6 @@ module Google
1113
1098
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1114
1099
  # @param options [::Gapic::CallOptions, ::Hash]
1115
1100
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1116
- # Note: currently retry functionality is not implemented. While it is possible
1117
- # to set it using ::Gapic::CallOptions, it will not be applied
1118
1101
  #
1119
1102
  # @overload patch_rule(firewall_policy: nil, firewall_policy_rule_resource: nil, priority: nil, project: nil, region: nil, request_id: nil)
1120
1103
  # Pass arguments to `patch_rule` via keyword arguments. Note that at
@@ -1151,17 +1134,21 @@ module Google
1151
1134
  # Customize the options with defaults
1152
1135
  call_metadata = @config.rpcs.patch_rule.metadata.to_h
1153
1136
 
1154
- # Set x-goog-api-client header
1137
+ # Set x-goog-api-client and x-goog-user-project headers
1155
1138
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1156
1139
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1157
1140
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1158
1141
  transports_version_send: [:rest]
1159
1142
 
1143
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1144
+
1160
1145
  options.apply_defaults timeout: @config.rpcs.patch_rule.timeout,
1161
- metadata: call_metadata
1146
+ metadata: call_metadata,
1147
+ retry_policy: @config.rpcs.patch_rule.retry_policy
1162
1148
 
1163
1149
  options.apply_defaults timeout: @config.timeout,
1164
- metadata: @config.metadata
1150
+ metadata: @config.metadata,
1151
+ retry_policy: @config.retry_policy
1165
1152
 
1166
1153
  @region_network_firewall_policies_stub.patch_rule request, options do |result, response|
1167
1154
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1176,12 +1163,8 @@ module Google
1176
1163
  yield result, response if block_given?
1177
1164
  return result
1178
1165
  end
1179
- rescue ::Faraday::Error => e
1180
- begin
1181
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1182
- rescue ::Gapic::Rest::Error => gapic_error
1183
- raise ::Google::Cloud::Error.from_error gapic_error
1184
- end
1166
+ rescue ::Gapic::Rest::Error => e
1167
+ raise ::Google::Cloud::Error.from_error(e)
1185
1168
  end
1186
1169
 
1187
1170
  ##
@@ -1196,8 +1179,6 @@ module Google
1196
1179
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1197
1180
  # @param options [::Gapic::CallOptions, ::Hash]
1198
1181
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1199
- # Note: currently retry functionality is not implemented. While it is possible
1200
- # to set it using ::Gapic::CallOptions, it will not be applied
1201
1182
  #
1202
1183
  # @overload remove_association(firewall_policy: nil, name: nil, project: nil, region: nil, request_id: nil)
1203
1184
  # Pass arguments to `remove_association` via keyword arguments. Note that at
@@ -1232,17 +1213,21 @@ module Google
1232
1213
  # Customize the options with defaults
1233
1214
  call_metadata = @config.rpcs.remove_association.metadata.to_h
1234
1215
 
1235
- # Set x-goog-api-client header
1216
+ # Set x-goog-api-client and x-goog-user-project headers
1236
1217
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1237
1218
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1238
1219
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1239
1220
  transports_version_send: [:rest]
1240
1221
 
1222
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1223
+
1241
1224
  options.apply_defaults timeout: @config.rpcs.remove_association.timeout,
1242
- metadata: call_metadata
1225
+ metadata: call_metadata,
1226
+ retry_policy: @config.rpcs.remove_association.retry_policy
1243
1227
 
1244
1228
  options.apply_defaults timeout: @config.timeout,
1245
- metadata: @config.metadata
1229
+ metadata: @config.metadata,
1230
+ retry_policy: @config.retry_policy
1246
1231
 
1247
1232
  @region_network_firewall_policies_stub.remove_association request, options do |result, response|
1248
1233
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1257,12 +1242,8 @@ module Google
1257
1242
  yield result, response if block_given?
1258
1243
  return result
1259
1244
  end
1260
- rescue ::Faraday::Error => e
1261
- begin
1262
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1263
- rescue ::Gapic::Rest::Error => gapic_error
1264
- raise ::Google::Cloud::Error.from_error gapic_error
1265
- end
1245
+ rescue ::Gapic::Rest::Error => e
1246
+ raise ::Google::Cloud::Error.from_error(e)
1266
1247
  end
1267
1248
 
1268
1249
  ##
@@ -1277,8 +1258,6 @@ module Google
1277
1258
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1278
1259
  # @param options [::Gapic::CallOptions, ::Hash]
1279
1260
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1280
- # Note: currently retry functionality is not implemented. While it is possible
1281
- # to set it using ::Gapic::CallOptions, it will not be applied
1282
1261
  #
1283
1262
  # @overload remove_rule(firewall_policy: nil, priority: nil, project: nil, region: nil, request_id: nil)
1284
1263
  # Pass arguments to `remove_rule` via keyword arguments. Note that at
@@ -1313,17 +1292,21 @@ module Google
1313
1292
  # Customize the options with defaults
1314
1293
  call_metadata = @config.rpcs.remove_rule.metadata.to_h
1315
1294
 
1316
- # Set x-goog-api-client header
1295
+ # Set x-goog-api-client and x-goog-user-project headers
1317
1296
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1318
1297
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1319
1298
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1320
1299
  transports_version_send: [:rest]
1321
1300
 
1301
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1302
+
1322
1303
  options.apply_defaults timeout: @config.rpcs.remove_rule.timeout,
1323
- metadata: call_metadata
1304
+ metadata: call_metadata,
1305
+ retry_policy: @config.rpcs.remove_rule.retry_policy
1324
1306
 
1325
1307
  options.apply_defaults timeout: @config.timeout,
1326
- metadata: @config.metadata
1308
+ metadata: @config.metadata,
1309
+ retry_policy: @config.retry_policy
1327
1310
 
1328
1311
  @region_network_firewall_policies_stub.remove_rule request, options do |result, response|
1329
1312
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1338,12 +1321,8 @@ module Google
1338
1321
  yield result, response if block_given?
1339
1322
  return result
1340
1323
  end
1341
- rescue ::Faraday::Error => e
1342
- begin
1343
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1344
- rescue ::Gapic::Rest::Error => gapic_error
1345
- raise ::Google::Cloud::Error.from_error gapic_error
1346
- end
1324
+ rescue ::Gapic::Rest::Error => e
1325
+ raise ::Google::Cloud::Error.from_error(e)
1347
1326
  end
1348
1327
 
1349
1328
  ##
@@ -1358,8 +1337,6 @@ module Google
1358
1337
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1359
1338
  # @param options [::Gapic::CallOptions, ::Hash]
1360
1339
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1361
- # Note: currently retry functionality is not implemented. While it is possible
1362
- # to set it using ::Gapic::CallOptions, it will not be applied
1363
1340
  #
1364
1341
  # @overload set_iam_policy(project: nil, region: nil, region_set_policy_request_resource: nil, resource: nil)
1365
1342
  # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
@@ -1392,28 +1369,28 @@ module Google
1392
1369
  # Customize the options with defaults
1393
1370
  call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1394
1371
 
1395
- # Set x-goog-api-client header
1372
+ # Set x-goog-api-client and x-goog-user-project headers
1396
1373
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1397
1374
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1398
1375
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1399
1376
  transports_version_send: [:rest]
1400
1377
 
1378
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1379
+
1401
1380
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1402
- metadata: call_metadata
1381
+ metadata: call_metadata,
1382
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1403
1383
 
1404
1384
  options.apply_defaults timeout: @config.timeout,
1405
- metadata: @config.metadata
1385
+ metadata: @config.metadata,
1386
+ retry_policy: @config.retry_policy
1406
1387
 
1407
1388
  @region_network_firewall_policies_stub.set_iam_policy request, options do |result, response|
1408
1389
  yield result, response if block_given?
1409
1390
  return result
1410
1391
  end
1411
- rescue ::Faraday::Error => e
1412
- begin
1413
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1414
- rescue ::Gapic::Rest::Error => gapic_error
1415
- raise ::Google::Cloud::Error.from_error gapic_error
1416
- end
1392
+ rescue ::Gapic::Rest::Error => e
1393
+ raise ::Google::Cloud::Error.from_error(e)
1417
1394
  end
1418
1395
 
1419
1396
  ##
@@ -1428,8 +1405,6 @@ module Google
1428
1405
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1429
1406
  # @param options [::Gapic::CallOptions, ::Hash]
1430
1407
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1431
- # Note: currently retry functionality is not implemented. While it is possible
1432
- # to set it using ::Gapic::CallOptions, it will not be applied
1433
1408
  #
1434
1409
  # @overload test_iam_permissions(project: nil, region: nil, resource: nil, test_permissions_request_resource: nil)
1435
1410
  # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
@@ -1462,52 +1437,58 @@ module Google
1462
1437
  # Customize the options with defaults
1463
1438
  call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1464
1439
 
1465
- # Set x-goog-api-client header
1440
+ # Set x-goog-api-client and x-goog-user-project headers
1466
1441
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1467
1442
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1468
1443
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1469
1444
  transports_version_send: [:rest]
1470
1445
 
1446
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1447
+
1471
1448
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1472
- metadata: call_metadata
1449
+ metadata: call_metadata,
1450
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1473
1451
 
1474
1452
  options.apply_defaults timeout: @config.timeout,
1475
- metadata: @config.metadata
1453
+ metadata: @config.metadata,
1454
+ retry_policy: @config.retry_policy
1476
1455
 
1477
1456
  @region_network_firewall_policies_stub.test_iam_permissions request, options do |result, response|
1478
1457
  yield result, response if block_given?
1479
1458
  return result
1480
1459
  end
1481
- rescue ::Faraday::Error => e
1482
- begin
1483
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1484
- rescue ::Gapic::Rest::Error => gapic_error
1485
- raise ::Google::Cloud::Error.from_error gapic_error
1486
- end
1460
+ rescue ::Gapic::Rest::Error => e
1461
+ raise ::Google::Cloud::Error.from_error(e)
1487
1462
  end
1488
1463
 
1489
1464
  ##
1490
1465
  # Configuration class for the RegionNetworkFirewallPolicies REST API.
1491
1466
  #
1492
1467
  # This class represents the configuration for RegionNetworkFirewallPolicies REST,
1493
- # providing control over credentials, timeouts, retry behavior, logging.
1468
+ # providing control over timeouts, retry behavior, logging, transport
1469
+ # parameters, and other low-level controls. Certain parameters can also be
1470
+ # applied individually to specific RPCs. See
1471
+ # {::Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client::Configuration::Rpcs}
1472
+ # for a list of RPCs that can be configured independently.
1494
1473
  #
1495
1474
  # Configuration can be applied globally to all clients, or to a single client
1496
1475
  # on construction.
1497
1476
  #
1498
- # # Examples
1499
- #
1500
- # To modify the global config, setting the timeout for all calls to 10 seconds:
1501
- #
1502
- # ::Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Client.configure do |config|
1503
- # config.timeout = 10.0
1504
- # end
1477
+ # @example
1505
1478
  #
1506
- # To apply the above configuration only to a new client:
1479
+ # # Modify the global config, setting the timeout for
1480
+ # # add_association to 20 seconds,
1481
+ # # and all remaining timeouts to 10 seconds.
1482
+ # ::Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.configure do |config|
1483
+ # config.timeout = 10.0
1484
+ # config.rpcs.add_association.timeout = 20.0
1485
+ # end
1507
1486
  #
1508
- # client = ::Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Client.new do |config|
1509
- # config.timeout = 10.0
1510
- # end
1487
+ # # Apply the above configuration only to a new client.
1488
+ # client = ::Google::Cloud::Compute::V1::RegionNetworkFirewallPolicies::Rest::Client.new do |config|
1489
+ # config.timeout = 10.0
1490
+ # config.rpcs.add_association.timeout = 20.0
1491
+ # end
1511
1492
  #
1512
1493
  # @!attribute [rw] endpoint
1513
1494
  # The hostname or hostname:port of the service endpoint.
@@ -1536,8 +1517,19 @@ module Google
1536
1517
  # The call timeout in seconds.
1537
1518
  # @return [::Numeric]
1538
1519
  # @!attribute [rw] metadata
1539
- # Additional REST headers to be sent with the call.
1520
+ # Additional headers to be sent with the call.
1540
1521
  # @return [::Hash{::Symbol=>::String}]
1522
+ # @!attribute [rw] retry_policy
1523
+ # The retry policy. The value is a hash with the following keys:
1524
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1525
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1526
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1527
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1528
+ # trigger a retry.
1529
+ # @return [::Hash]
1530
+ # @!attribute [rw] quota_project
1531
+ # A separate project against which to charge quota.
1532
+ # @return [::String]
1541
1533
  #
1542
1534
  class Configuration
1543
1535
  extend ::Gapic::Config
@@ -1552,6 +1544,8 @@ module Google
1552
1544
  config_attr :lib_version, nil, ::String, nil
1553
1545
  config_attr :timeout, nil, ::Numeric, nil
1554
1546
  config_attr :metadata, nil, ::Hash, nil
1547
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1548
+ config_attr :quota_project, nil, ::String, nil
1555
1549
 
1556
1550
  # @private
1557
1551
  def initialize parent_config = nil
@@ -1580,9 +1574,14 @@ module Google
1580
1574
  # the following configuration fields:
1581
1575
  #
1582
1576
  # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1583
- #
1584
- # there is one other field (`retry_policy`) that can be set
1585
- # but is currently not supported for REST Gapic libraries.
1577
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1578
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1579
+ # include the following keys:
1580
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1581
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1582
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1583
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1584
+ # trigger a retry.
1586
1585
  #
1587
1586
  class Rpcs
1588
1587
  ##