google-cloud-compute-v1 1.8.0 → 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 +194 -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 +95 -72
  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 +158 -149
  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 +536 -28
  362. data/proto_docs/google/protobuf/duration.rb +98 -0
  363. metadata +14 -5
@@ -163,13 +163,22 @@ module Google
163
163
 
164
164
  # Create credentials
165
165
  credentials = @config.credentials
166
- credentials ||= Credentials.default scope: @config.scope
166
+ # Use self-signed JWT if the endpoint is unchanged from default,
167
+ # but only if the default endpoint does not have a region prefix.
168
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
169
+ !@config.endpoint.split(".").first.include?("-")
170
+ credentials ||= Credentials.default scope: @config.scope,
171
+ enable_self_signed_jwt: enable_self_signed_jwt
167
172
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
168
173
  credentials = Credentials.new credentials, scope: @config.scope
169
174
  end
170
175
 
176
+ @quota_project_id = @config.quota_project
177
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
178
+
171
179
  @global_operations = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::Client.new do |config|
172
180
  config.credentials = credentials
181
+ config.quota_project = @quota_project_id
173
182
  config.endpoint = @config.endpoint
174
183
  end
175
184
 
@@ -197,8 +206,6 @@ module Google
197
206
  # parameters, or to keep all the default parameter values, pass an empty Hash.
198
207
  # @param options [::Gapic::CallOptions, ::Hash]
199
208
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
200
- # Note: currently retry functionality is not implemented. While it is possible
201
- # to set it using ::Gapic::CallOptions, it will not be applied
202
209
  #
203
210
  # @overload add_association(firewall_policy: nil, firewall_policy_association_resource: nil, project: nil, replace_existing_association: nil, request_id: nil)
204
211
  # Pass arguments to `add_association` via keyword arguments. Note that at
@@ -233,17 +240,21 @@ module Google
233
240
  # Customize the options with defaults
234
241
  call_metadata = @config.rpcs.add_association.metadata.to_h
235
242
 
236
- # Set x-goog-api-client header
243
+ # Set x-goog-api-client and x-goog-user-project headers
237
244
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
238
245
  lib_name: @config.lib_name, lib_version: @config.lib_version,
239
246
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
240
247
  transports_version_send: [:rest]
241
248
 
249
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
250
+
242
251
  options.apply_defaults timeout: @config.rpcs.add_association.timeout,
243
- metadata: call_metadata
252
+ metadata: call_metadata,
253
+ retry_policy: @config.rpcs.add_association.retry_policy
244
254
 
245
255
  options.apply_defaults timeout: @config.timeout,
246
- metadata: @config.metadata
256
+ metadata: @config.metadata,
257
+ retry_policy: @config.retry_policy
247
258
 
248
259
  @network_firewall_policies_stub.add_association request, options do |result, response|
249
260
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -257,12 +268,8 @@ module Google
257
268
  yield result, response if block_given?
258
269
  return result
259
270
  end
260
- rescue ::Faraday::Error => e
261
- begin
262
- raise ::Gapic::Rest::Error.wrap_faraday_error e
263
- rescue ::Gapic::Rest::Error => gapic_error
264
- raise ::Google::Cloud::Error.from_error gapic_error
265
- end
271
+ rescue ::Gapic::Rest::Error => e
272
+ raise ::Google::Cloud::Error.from_error(e)
266
273
  end
267
274
 
268
275
  ##
@@ -277,8 +284,6 @@ module Google
277
284
  # parameters, or to keep all the default parameter values, pass an empty Hash.
278
285
  # @param options [::Gapic::CallOptions, ::Hash]
279
286
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
280
- # Note: currently retry functionality is not implemented. While it is possible
281
- # to set it using ::Gapic::CallOptions, it will not be applied
282
287
  #
283
288
  # @overload add_rule(firewall_policy: nil, firewall_policy_rule_resource: nil, max_priority: nil, min_priority: nil, project: nil, request_id: nil)
284
289
  # Pass arguments to `add_rule` via keyword arguments. Note that at
@@ -315,17 +320,21 @@ module Google
315
320
  # Customize the options with defaults
316
321
  call_metadata = @config.rpcs.add_rule.metadata.to_h
317
322
 
318
- # Set x-goog-api-client header
323
+ # Set x-goog-api-client and x-goog-user-project headers
319
324
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
320
325
  lib_name: @config.lib_name, lib_version: @config.lib_version,
321
326
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
322
327
  transports_version_send: [:rest]
323
328
 
329
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
330
+
324
331
  options.apply_defaults timeout: @config.rpcs.add_rule.timeout,
325
- metadata: call_metadata
332
+ metadata: call_metadata,
333
+ retry_policy: @config.rpcs.add_rule.retry_policy
326
334
 
327
335
  options.apply_defaults timeout: @config.timeout,
328
- metadata: @config.metadata
336
+ metadata: @config.metadata,
337
+ retry_policy: @config.retry_policy
329
338
 
330
339
  @network_firewall_policies_stub.add_rule request, options do |result, response|
331
340
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -339,12 +348,8 @@ module Google
339
348
  yield result, response if block_given?
340
349
  return result
341
350
  end
342
- rescue ::Faraday::Error => e
343
- begin
344
- raise ::Gapic::Rest::Error.wrap_faraday_error e
345
- rescue ::Gapic::Rest::Error => gapic_error
346
- raise ::Google::Cloud::Error.from_error gapic_error
347
- end
351
+ rescue ::Gapic::Rest::Error => e
352
+ raise ::Google::Cloud::Error.from_error(e)
348
353
  end
349
354
 
350
355
  ##
@@ -359,8 +364,6 @@ module Google
359
364
  # parameters, or to keep all the default parameter values, pass an empty Hash.
360
365
  # @param options [::Gapic::CallOptions, ::Hash]
361
366
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
362
- # Note: currently retry functionality is not implemented. While it is possible
363
- # to set it using ::Gapic::CallOptions, it will not be applied
364
367
  #
365
368
  # @overload clone_rules(firewall_policy: nil, project: nil, request_id: nil, source_firewall_policy: nil)
366
369
  # Pass arguments to `clone_rules` via keyword arguments. Note that at
@@ -393,17 +396,21 @@ module Google
393
396
  # Customize the options with defaults
394
397
  call_metadata = @config.rpcs.clone_rules.metadata.to_h
395
398
 
396
- # Set x-goog-api-client header
399
+ # Set x-goog-api-client and x-goog-user-project headers
397
400
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
398
401
  lib_name: @config.lib_name, lib_version: @config.lib_version,
399
402
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
400
403
  transports_version_send: [:rest]
401
404
 
405
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
406
+
402
407
  options.apply_defaults timeout: @config.rpcs.clone_rules.timeout,
403
- metadata: call_metadata
408
+ metadata: call_metadata,
409
+ retry_policy: @config.rpcs.clone_rules.retry_policy
404
410
 
405
411
  options.apply_defaults timeout: @config.timeout,
406
- metadata: @config.metadata
412
+ metadata: @config.metadata,
413
+ retry_policy: @config.retry_policy
407
414
 
408
415
  @network_firewall_policies_stub.clone_rules request, options do |result, response|
409
416
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -417,12 +424,8 @@ module Google
417
424
  yield result, response if block_given?
418
425
  return result
419
426
  end
420
- rescue ::Faraday::Error => e
421
- begin
422
- raise ::Gapic::Rest::Error.wrap_faraday_error e
423
- rescue ::Gapic::Rest::Error => gapic_error
424
- raise ::Google::Cloud::Error.from_error gapic_error
425
- end
427
+ rescue ::Gapic::Rest::Error => e
428
+ raise ::Google::Cloud::Error.from_error(e)
426
429
  end
427
430
 
428
431
  ##
@@ -437,8 +440,6 @@ module Google
437
440
  # parameters, or to keep all the default parameter values, pass an empty Hash.
438
441
  # @param options [::Gapic::CallOptions, ::Hash]
439
442
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
440
- # Note: currently retry functionality is not implemented. While it is possible
441
- # to set it using ::Gapic::CallOptions, it will not be applied
442
443
  #
443
444
  # @overload delete(firewall_policy: nil, project: nil, request_id: nil)
444
445
  # Pass arguments to `delete` via keyword arguments. Note that at
@@ -469,17 +470,21 @@ module Google
469
470
  # Customize the options with defaults
470
471
  call_metadata = @config.rpcs.delete.metadata.to_h
471
472
 
472
- # Set x-goog-api-client header
473
+ # Set x-goog-api-client and x-goog-user-project headers
473
474
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
474
475
  lib_name: @config.lib_name, lib_version: @config.lib_version,
475
476
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
476
477
  transports_version_send: [:rest]
477
478
 
479
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
480
+
478
481
  options.apply_defaults timeout: @config.rpcs.delete.timeout,
479
- metadata: call_metadata
482
+ metadata: call_metadata,
483
+ retry_policy: @config.rpcs.delete.retry_policy
480
484
 
481
485
  options.apply_defaults timeout: @config.timeout,
482
- metadata: @config.metadata
486
+ metadata: @config.metadata,
487
+ retry_policy: @config.retry_policy
483
488
 
484
489
  @network_firewall_policies_stub.delete request, options do |result, response|
485
490
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -493,12 +498,8 @@ module Google
493
498
  yield result, response if block_given?
494
499
  return result
495
500
  end
496
- rescue ::Faraday::Error => e
497
- begin
498
- raise ::Gapic::Rest::Error.wrap_faraday_error e
499
- rescue ::Gapic::Rest::Error => gapic_error
500
- raise ::Google::Cloud::Error.from_error gapic_error
501
- end
501
+ rescue ::Gapic::Rest::Error => e
502
+ raise ::Google::Cloud::Error.from_error(e)
502
503
  end
503
504
 
504
505
  ##
@@ -513,8 +514,6 @@ module Google
513
514
  # parameters, or to keep all the default parameter values, pass an empty Hash.
514
515
  # @param options [::Gapic::CallOptions, ::Hash]
515
516
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
516
- # Note: currently retry functionality is not implemented. While it is possible
517
- # to set it using ::Gapic::CallOptions, it will not be applied
518
517
  #
519
518
  # @overload get(firewall_policy: nil, project: nil)
520
519
  # Pass arguments to `get` via keyword arguments. Note that at
@@ -543,28 +542,28 @@ module Google
543
542
  # Customize the options with defaults
544
543
  call_metadata = @config.rpcs.get.metadata.to_h
545
544
 
546
- # Set x-goog-api-client header
545
+ # Set x-goog-api-client and x-goog-user-project headers
547
546
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
548
547
  lib_name: @config.lib_name, lib_version: @config.lib_version,
549
548
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
550
549
  transports_version_send: [:rest]
551
550
 
551
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
552
+
552
553
  options.apply_defaults timeout: @config.rpcs.get.timeout,
553
- metadata: call_metadata
554
+ metadata: call_metadata,
555
+ retry_policy: @config.rpcs.get.retry_policy
554
556
 
555
557
  options.apply_defaults timeout: @config.timeout,
556
- metadata: @config.metadata
558
+ metadata: @config.metadata,
559
+ retry_policy: @config.retry_policy
557
560
 
558
561
  @network_firewall_policies_stub.get request, options do |result, response|
559
562
  yield result, response if block_given?
560
563
  return result
561
564
  end
562
- rescue ::Faraday::Error => e
563
- begin
564
- raise ::Gapic::Rest::Error.wrap_faraday_error e
565
- rescue ::Gapic::Rest::Error => gapic_error
566
- raise ::Google::Cloud::Error.from_error gapic_error
567
- end
565
+ rescue ::Gapic::Rest::Error => e
566
+ raise ::Google::Cloud::Error.from_error(e)
568
567
  end
569
568
 
570
569
  ##
@@ -579,8 +578,6 @@ module Google
579
578
  # parameters, or to keep all the default parameter values, pass an empty Hash.
580
579
  # @param options [::Gapic::CallOptions, ::Hash]
581
580
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
582
- # Note: currently retry functionality is not implemented. While it is possible
583
- # to set it using ::Gapic::CallOptions, it will not be applied
584
581
  #
585
582
  # @overload get_association(firewall_policy: nil, name: nil, project: nil)
586
583
  # Pass arguments to `get_association` via keyword arguments. Note that at
@@ -611,28 +608,28 @@ module Google
611
608
  # Customize the options with defaults
612
609
  call_metadata = @config.rpcs.get_association.metadata.to_h
613
610
 
614
- # Set x-goog-api-client header
611
+ # Set x-goog-api-client and x-goog-user-project headers
615
612
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
616
613
  lib_name: @config.lib_name, lib_version: @config.lib_version,
617
614
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
618
615
  transports_version_send: [:rest]
619
616
 
617
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
618
+
620
619
  options.apply_defaults timeout: @config.rpcs.get_association.timeout,
621
- metadata: call_metadata
620
+ metadata: call_metadata,
621
+ retry_policy: @config.rpcs.get_association.retry_policy
622
622
 
623
623
  options.apply_defaults timeout: @config.timeout,
624
- metadata: @config.metadata
624
+ metadata: @config.metadata,
625
+ retry_policy: @config.retry_policy
625
626
 
626
627
  @network_firewall_policies_stub.get_association request, options do |result, response|
627
628
  yield result, response if block_given?
628
629
  return result
629
630
  end
630
- rescue ::Faraday::Error => e
631
- begin
632
- raise ::Gapic::Rest::Error.wrap_faraday_error e
633
- rescue ::Gapic::Rest::Error => gapic_error
634
- raise ::Google::Cloud::Error.from_error gapic_error
635
- end
631
+ rescue ::Gapic::Rest::Error => e
632
+ raise ::Google::Cloud::Error.from_error(e)
636
633
  end
637
634
 
638
635
  ##
@@ -647,8 +644,6 @@ module Google
647
644
  # parameters, or to keep all the default parameter values, pass an empty Hash.
648
645
  # @param options [::Gapic::CallOptions, ::Hash]
649
646
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
650
- # Note: currently retry functionality is not implemented. While it is possible
651
- # to set it using ::Gapic::CallOptions, it will not be applied
652
647
  #
653
648
  # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil)
654
649
  # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
@@ -679,28 +674,28 @@ module Google
679
674
  # Customize the options with defaults
680
675
  call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
681
676
 
682
- # Set x-goog-api-client header
677
+ # Set x-goog-api-client and x-goog-user-project headers
683
678
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
684
679
  lib_name: @config.lib_name, lib_version: @config.lib_version,
685
680
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
686
681
  transports_version_send: [:rest]
687
682
 
683
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
684
+
688
685
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
689
- metadata: call_metadata
686
+ metadata: call_metadata,
687
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
690
688
 
691
689
  options.apply_defaults timeout: @config.timeout,
692
- metadata: @config.metadata
690
+ metadata: @config.metadata,
691
+ retry_policy: @config.retry_policy
693
692
 
694
693
  @network_firewall_policies_stub.get_iam_policy request, options do |result, response|
695
694
  yield result, response if block_given?
696
695
  return result
697
696
  end
698
- rescue ::Faraday::Error => e
699
- begin
700
- raise ::Gapic::Rest::Error.wrap_faraday_error e
701
- rescue ::Gapic::Rest::Error => gapic_error
702
- raise ::Google::Cloud::Error.from_error gapic_error
703
- end
697
+ rescue ::Gapic::Rest::Error => e
698
+ raise ::Google::Cloud::Error.from_error(e)
704
699
  end
705
700
 
706
701
  ##
@@ -715,8 +710,6 @@ module Google
715
710
  # parameters, or to keep all the default parameter values, pass an empty Hash.
716
711
  # @param options [::Gapic::CallOptions, ::Hash]
717
712
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
718
- # Note: currently retry functionality is not implemented. While it is possible
719
- # to set it using ::Gapic::CallOptions, it will not be applied
720
713
  #
721
714
  # @overload get_rule(firewall_policy: nil, priority: nil, project: nil)
722
715
  # Pass arguments to `get_rule` via keyword arguments. Note that at
@@ -747,28 +740,28 @@ module Google
747
740
  # Customize the options with defaults
748
741
  call_metadata = @config.rpcs.get_rule.metadata.to_h
749
742
 
750
- # Set x-goog-api-client header
743
+ # Set x-goog-api-client and x-goog-user-project headers
751
744
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
752
745
  lib_name: @config.lib_name, lib_version: @config.lib_version,
753
746
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
754
747
  transports_version_send: [:rest]
755
748
 
749
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
750
+
756
751
  options.apply_defaults timeout: @config.rpcs.get_rule.timeout,
757
- metadata: call_metadata
752
+ metadata: call_metadata,
753
+ retry_policy: @config.rpcs.get_rule.retry_policy
758
754
 
759
755
  options.apply_defaults timeout: @config.timeout,
760
- metadata: @config.metadata
756
+ metadata: @config.metadata,
757
+ retry_policy: @config.retry_policy
761
758
 
762
759
  @network_firewall_policies_stub.get_rule request, options do |result, response|
763
760
  yield result, response if block_given?
764
761
  return result
765
762
  end
766
- rescue ::Faraday::Error => e
767
- begin
768
- raise ::Gapic::Rest::Error.wrap_faraday_error e
769
- rescue ::Gapic::Rest::Error => gapic_error
770
- raise ::Google::Cloud::Error.from_error gapic_error
771
- end
763
+ rescue ::Gapic::Rest::Error => e
764
+ raise ::Google::Cloud::Error.from_error(e)
772
765
  end
773
766
 
774
767
  ##
@@ -783,8 +776,6 @@ module Google
783
776
  # parameters, or to keep all the default parameter values, pass an empty Hash.
784
777
  # @param options [::Gapic::CallOptions, ::Hash]
785
778
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
786
- # Note: currently retry functionality is not implemented. While it is possible
787
- # to set it using ::Gapic::CallOptions, it will not be applied
788
779
  #
789
780
  # @overload insert(firewall_policy_resource: nil, project: nil, request_id: nil)
790
781
  # Pass arguments to `insert` via keyword arguments. Note that at
@@ -815,17 +806,21 @@ module Google
815
806
  # Customize the options with defaults
816
807
  call_metadata = @config.rpcs.insert.metadata.to_h
817
808
 
818
- # Set x-goog-api-client header
809
+ # Set x-goog-api-client and x-goog-user-project headers
819
810
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
820
811
  lib_name: @config.lib_name, lib_version: @config.lib_version,
821
812
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
822
813
  transports_version_send: [:rest]
823
814
 
815
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
816
+
824
817
  options.apply_defaults timeout: @config.rpcs.insert.timeout,
825
- metadata: call_metadata
818
+ metadata: call_metadata,
819
+ retry_policy: @config.rpcs.insert.retry_policy
826
820
 
827
821
  options.apply_defaults timeout: @config.timeout,
828
- metadata: @config.metadata
822
+ metadata: @config.metadata,
823
+ retry_policy: @config.retry_policy
829
824
 
830
825
  @network_firewall_policies_stub.insert request, options do |result, response|
831
826
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -839,12 +834,8 @@ module Google
839
834
  yield result, response if block_given?
840
835
  return result
841
836
  end
842
- rescue ::Faraday::Error => e
843
- begin
844
- raise ::Gapic::Rest::Error.wrap_faraday_error e
845
- rescue ::Gapic::Rest::Error => gapic_error
846
- raise ::Google::Cloud::Error.from_error gapic_error
847
- end
837
+ rescue ::Gapic::Rest::Error => e
838
+ raise ::Google::Cloud::Error.from_error(e)
848
839
  end
849
840
 
850
841
  ##
@@ -859,8 +850,6 @@ module Google
859
850
  # parameters, or to keep all the default parameter values, pass an empty Hash.
860
851
  # @param options [::Gapic::CallOptions, ::Hash]
861
852
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
862
- # Note: currently retry functionality is not implemented. While it is possible
863
- # to set it using ::Gapic::CallOptions, it will not be applied
864
853
  #
865
854
  # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
866
855
  # Pass arguments to `list` via keyword arguments. Note that at
@@ -897,29 +886,29 @@ module Google
897
886
  # Customize the options with defaults
898
887
  call_metadata = @config.rpcs.list.metadata.to_h
899
888
 
900
- # Set x-goog-api-client header
889
+ # Set x-goog-api-client and x-goog-user-project headers
901
890
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
902
891
  lib_name: @config.lib_name, lib_version: @config.lib_version,
903
892
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
904
893
  transports_version_send: [:rest]
905
894
 
895
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
896
+
906
897
  options.apply_defaults timeout: @config.rpcs.list.timeout,
907
- metadata: call_metadata
898
+ metadata: call_metadata,
899
+ retry_policy: @config.rpcs.list.retry_policy
908
900
 
909
901
  options.apply_defaults timeout: @config.timeout,
910
- metadata: @config.metadata
902
+ metadata: @config.metadata,
903
+ retry_policy: @config.retry_policy
911
904
 
912
905
  @network_firewall_policies_stub.list request, options do |result, response|
913
906
  result = ::Gapic::Rest::PagedEnumerable.new @network_firewall_policies_stub, :list, "items", request, result, options
914
907
  yield result, response if block_given?
915
908
  return result
916
909
  end
917
- rescue ::Faraday::Error => e
918
- begin
919
- raise ::Gapic::Rest::Error.wrap_faraday_error e
920
- rescue ::Gapic::Rest::Error => gapic_error
921
- raise ::Google::Cloud::Error.from_error gapic_error
922
- end
910
+ rescue ::Gapic::Rest::Error => e
911
+ raise ::Google::Cloud::Error.from_error(e)
923
912
  end
924
913
 
925
914
  ##
@@ -934,8 +923,6 @@ module Google
934
923
  # parameters, or to keep all the default parameter values, pass an empty Hash.
935
924
  # @param options [::Gapic::CallOptions, ::Hash]
936
925
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
937
- # Note: currently retry functionality is not implemented. While it is possible
938
- # to set it using ::Gapic::CallOptions, it will not be applied
939
926
  #
940
927
  # @overload patch(firewall_policy: nil, firewall_policy_resource: nil, project: nil, request_id: nil)
941
928
  # Pass arguments to `patch` via keyword arguments. Note that at
@@ -968,17 +955,21 @@ module Google
968
955
  # Customize the options with defaults
969
956
  call_metadata = @config.rpcs.patch.metadata.to_h
970
957
 
971
- # Set x-goog-api-client header
958
+ # Set x-goog-api-client and x-goog-user-project headers
972
959
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
973
960
  lib_name: @config.lib_name, lib_version: @config.lib_version,
974
961
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
975
962
  transports_version_send: [:rest]
976
963
 
964
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
965
+
977
966
  options.apply_defaults timeout: @config.rpcs.patch.timeout,
978
- metadata: call_metadata
967
+ metadata: call_metadata,
968
+ retry_policy: @config.rpcs.patch.retry_policy
979
969
 
980
970
  options.apply_defaults timeout: @config.timeout,
981
- metadata: @config.metadata
971
+ metadata: @config.metadata,
972
+ retry_policy: @config.retry_policy
982
973
 
983
974
  @network_firewall_policies_stub.patch request, options do |result, response|
984
975
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -992,12 +983,8 @@ module Google
992
983
  yield result, response if block_given?
993
984
  return result
994
985
  end
995
- rescue ::Faraday::Error => e
996
- begin
997
- raise ::Gapic::Rest::Error.wrap_faraday_error e
998
- rescue ::Gapic::Rest::Error => gapic_error
999
- raise ::Google::Cloud::Error.from_error gapic_error
1000
- end
986
+ rescue ::Gapic::Rest::Error => e
987
+ raise ::Google::Cloud::Error.from_error(e)
1001
988
  end
1002
989
 
1003
990
  ##
@@ -1012,8 +999,6 @@ module Google
1012
999
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1013
1000
  # @param options [::Gapic::CallOptions, ::Hash]
1014
1001
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1015
- # Note: currently retry functionality is not implemented. While it is possible
1016
- # to set it using ::Gapic::CallOptions, it will not be applied
1017
1002
  #
1018
1003
  # @overload patch_rule(firewall_policy: nil, firewall_policy_rule_resource: nil, priority: nil, project: nil, request_id: nil)
1019
1004
  # Pass arguments to `patch_rule` via keyword arguments. Note that at
@@ -1048,17 +1033,21 @@ module Google
1048
1033
  # Customize the options with defaults
1049
1034
  call_metadata = @config.rpcs.patch_rule.metadata.to_h
1050
1035
 
1051
- # Set x-goog-api-client header
1036
+ # Set x-goog-api-client and x-goog-user-project headers
1052
1037
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1053
1038
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1054
1039
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1055
1040
  transports_version_send: [:rest]
1056
1041
 
1042
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1043
+
1057
1044
  options.apply_defaults timeout: @config.rpcs.patch_rule.timeout,
1058
- metadata: call_metadata
1045
+ metadata: call_metadata,
1046
+ retry_policy: @config.rpcs.patch_rule.retry_policy
1059
1047
 
1060
1048
  options.apply_defaults timeout: @config.timeout,
1061
- metadata: @config.metadata
1049
+ metadata: @config.metadata,
1050
+ retry_policy: @config.retry_policy
1062
1051
 
1063
1052
  @network_firewall_policies_stub.patch_rule request, options do |result, response|
1064
1053
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -1072,12 +1061,8 @@ module Google
1072
1061
  yield result, response if block_given?
1073
1062
  return result
1074
1063
  end
1075
- rescue ::Faraday::Error => e
1076
- begin
1077
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1078
- rescue ::Gapic::Rest::Error => gapic_error
1079
- raise ::Google::Cloud::Error.from_error gapic_error
1080
- end
1064
+ rescue ::Gapic::Rest::Error => e
1065
+ raise ::Google::Cloud::Error.from_error(e)
1081
1066
  end
1082
1067
 
1083
1068
  ##
@@ -1092,8 +1077,6 @@ module Google
1092
1077
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1093
1078
  # @param options [::Gapic::CallOptions, ::Hash]
1094
1079
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1095
- # Note: currently retry functionality is not implemented. While it is possible
1096
- # to set it using ::Gapic::CallOptions, it will not be applied
1097
1080
  #
1098
1081
  # @overload remove_association(firewall_policy: nil, name: nil, project: nil, request_id: nil)
1099
1082
  # Pass arguments to `remove_association` via keyword arguments. Note that at
@@ -1126,17 +1109,21 @@ module Google
1126
1109
  # Customize the options with defaults
1127
1110
  call_metadata = @config.rpcs.remove_association.metadata.to_h
1128
1111
 
1129
- # Set x-goog-api-client header
1112
+ # Set x-goog-api-client and x-goog-user-project headers
1130
1113
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1131
1114
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1132
1115
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1133
1116
  transports_version_send: [:rest]
1134
1117
 
1118
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1119
+
1135
1120
  options.apply_defaults timeout: @config.rpcs.remove_association.timeout,
1136
- metadata: call_metadata
1121
+ metadata: call_metadata,
1122
+ retry_policy: @config.rpcs.remove_association.retry_policy
1137
1123
 
1138
1124
  options.apply_defaults timeout: @config.timeout,
1139
- metadata: @config.metadata
1125
+ metadata: @config.metadata,
1126
+ retry_policy: @config.retry_policy
1140
1127
 
1141
1128
  @network_firewall_policies_stub.remove_association request, options do |result, response|
1142
1129
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -1150,12 +1137,8 @@ module Google
1150
1137
  yield result, response if block_given?
1151
1138
  return result
1152
1139
  end
1153
- rescue ::Faraday::Error => e
1154
- begin
1155
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1156
- rescue ::Gapic::Rest::Error => gapic_error
1157
- raise ::Google::Cloud::Error.from_error gapic_error
1158
- end
1140
+ rescue ::Gapic::Rest::Error => e
1141
+ raise ::Google::Cloud::Error.from_error(e)
1159
1142
  end
1160
1143
 
1161
1144
  ##
@@ -1170,8 +1153,6 @@ module Google
1170
1153
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1171
1154
  # @param options [::Gapic::CallOptions, ::Hash]
1172
1155
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1173
- # Note: currently retry functionality is not implemented. While it is possible
1174
- # to set it using ::Gapic::CallOptions, it will not be applied
1175
1156
  #
1176
1157
  # @overload remove_rule(firewall_policy: nil, priority: nil, project: nil, request_id: nil)
1177
1158
  # Pass arguments to `remove_rule` via keyword arguments. Note that at
@@ -1204,17 +1185,21 @@ module Google
1204
1185
  # Customize the options with defaults
1205
1186
  call_metadata = @config.rpcs.remove_rule.metadata.to_h
1206
1187
 
1207
- # Set x-goog-api-client header
1188
+ # Set x-goog-api-client and x-goog-user-project headers
1208
1189
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1209
1190
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1210
1191
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1211
1192
  transports_version_send: [:rest]
1212
1193
 
1194
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1195
+
1213
1196
  options.apply_defaults timeout: @config.rpcs.remove_rule.timeout,
1214
- metadata: call_metadata
1197
+ metadata: call_metadata,
1198
+ retry_policy: @config.rpcs.remove_rule.retry_policy
1215
1199
 
1216
1200
  options.apply_defaults timeout: @config.timeout,
1217
- metadata: @config.metadata
1201
+ metadata: @config.metadata,
1202
+ retry_policy: @config.retry_policy
1218
1203
 
1219
1204
  @network_firewall_policies_stub.remove_rule request, options do |result, response|
1220
1205
  result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
@@ -1228,12 +1213,8 @@ module Google
1228
1213
  yield result, response if block_given?
1229
1214
  return result
1230
1215
  end
1231
- rescue ::Faraday::Error => e
1232
- begin
1233
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1234
- rescue ::Gapic::Rest::Error => gapic_error
1235
- raise ::Google::Cloud::Error.from_error gapic_error
1236
- end
1216
+ rescue ::Gapic::Rest::Error => e
1217
+ raise ::Google::Cloud::Error.from_error(e)
1237
1218
  end
1238
1219
 
1239
1220
  ##
@@ -1248,8 +1229,6 @@ module Google
1248
1229
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1249
1230
  # @param options [::Gapic::CallOptions, ::Hash]
1250
1231
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1251
- # Note: currently retry functionality is not implemented. While it is possible
1252
- # to set it using ::Gapic::CallOptions, it will not be applied
1253
1232
  #
1254
1233
  # @overload set_iam_policy(global_set_policy_request_resource: nil, project: nil, resource: nil)
1255
1234
  # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
@@ -1280,28 +1259,28 @@ module Google
1280
1259
  # Customize the options with defaults
1281
1260
  call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1282
1261
 
1283
- # Set x-goog-api-client header
1262
+ # Set x-goog-api-client and x-goog-user-project headers
1284
1263
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1285
1264
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1286
1265
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1287
1266
  transports_version_send: [:rest]
1288
1267
 
1268
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1269
+
1289
1270
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1290
- metadata: call_metadata
1271
+ metadata: call_metadata,
1272
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1291
1273
 
1292
1274
  options.apply_defaults timeout: @config.timeout,
1293
- metadata: @config.metadata
1275
+ metadata: @config.metadata,
1276
+ retry_policy: @config.retry_policy
1294
1277
 
1295
1278
  @network_firewall_policies_stub.set_iam_policy request, options do |result, response|
1296
1279
  yield result, response if block_given?
1297
1280
  return result
1298
1281
  end
1299
- rescue ::Faraday::Error => e
1300
- begin
1301
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1302
- rescue ::Gapic::Rest::Error => gapic_error
1303
- raise ::Google::Cloud::Error.from_error gapic_error
1304
- end
1282
+ rescue ::Gapic::Rest::Error => e
1283
+ raise ::Google::Cloud::Error.from_error(e)
1305
1284
  end
1306
1285
 
1307
1286
  ##
@@ -1316,8 +1295,6 @@ module Google
1316
1295
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1317
1296
  # @param options [::Gapic::CallOptions, ::Hash]
1318
1297
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1319
- # Note: currently retry functionality is not implemented. While it is possible
1320
- # to set it using ::Gapic::CallOptions, it will not be applied
1321
1298
  #
1322
1299
  # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil)
1323
1300
  # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
@@ -1348,52 +1325,58 @@ module Google
1348
1325
  # Customize the options with defaults
1349
1326
  call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1350
1327
 
1351
- # Set x-goog-api-client header
1328
+ # Set x-goog-api-client and x-goog-user-project headers
1352
1329
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1353
1330
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1354
1331
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1355
1332
  transports_version_send: [:rest]
1356
1333
 
1334
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1335
+
1357
1336
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1358
- metadata: call_metadata
1337
+ metadata: call_metadata,
1338
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1359
1339
 
1360
1340
  options.apply_defaults timeout: @config.timeout,
1361
- metadata: @config.metadata
1341
+ metadata: @config.metadata,
1342
+ retry_policy: @config.retry_policy
1362
1343
 
1363
1344
  @network_firewall_policies_stub.test_iam_permissions request, options do |result, response|
1364
1345
  yield result, response if block_given?
1365
1346
  return result
1366
1347
  end
1367
- rescue ::Faraday::Error => e
1368
- begin
1369
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1370
- rescue ::Gapic::Rest::Error => gapic_error
1371
- raise ::Google::Cloud::Error.from_error gapic_error
1372
- end
1348
+ rescue ::Gapic::Rest::Error => e
1349
+ raise ::Google::Cloud::Error.from_error(e)
1373
1350
  end
1374
1351
 
1375
1352
  ##
1376
1353
  # Configuration class for the NetworkFirewallPolicies REST API.
1377
1354
  #
1378
1355
  # This class represents the configuration for NetworkFirewallPolicies REST,
1379
- # providing control over credentials, timeouts, retry behavior, logging.
1356
+ # providing control over timeouts, retry behavior, logging, transport
1357
+ # parameters, and other low-level controls. Certain parameters can also be
1358
+ # applied individually to specific RPCs. See
1359
+ # {::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client::Configuration::Rpcs}
1360
+ # for a list of RPCs that can be configured independently.
1380
1361
  #
1381
1362
  # Configuration can be applied globally to all clients, or to a single client
1382
1363
  # on construction.
1383
1364
  #
1384
- # # Examples
1385
- #
1386
- # To modify the global config, setting the timeout for all calls to 10 seconds:
1387
- #
1388
- # ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Client.configure do |config|
1389
- # config.timeout = 10.0
1390
- # end
1365
+ # @example
1391
1366
  #
1392
- # To apply the above configuration only to a new client:
1367
+ # # Modify the global config, setting the timeout for
1368
+ # # add_association to 20 seconds,
1369
+ # # and all remaining timeouts to 10 seconds.
1370
+ # ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.configure do |config|
1371
+ # config.timeout = 10.0
1372
+ # config.rpcs.add_association.timeout = 20.0
1373
+ # end
1393
1374
  #
1394
- # client = ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Client.new do |config|
1395
- # config.timeout = 10.0
1396
- # end
1375
+ # # Apply the above configuration only to a new client.
1376
+ # client = ::Google::Cloud::Compute::V1::NetworkFirewallPolicies::Rest::Client.new do |config|
1377
+ # config.timeout = 10.0
1378
+ # config.rpcs.add_association.timeout = 20.0
1379
+ # end
1397
1380
  #
1398
1381
  # @!attribute [rw] endpoint
1399
1382
  # The hostname or hostname:port of the service endpoint.
@@ -1422,8 +1405,19 @@ module Google
1422
1405
  # The call timeout in seconds.
1423
1406
  # @return [::Numeric]
1424
1407
  # @!attribute [rw] metadata
1425
- # Additional REST headers to be sent with the call.
1408
+ # Additional headers to be sent with the call.
1426
1409
  # @return [::Hash{::Symbol=>::String}]
1410
+ # @!attribute [rw] retry_policy
1411
+ # The retry policy. The value is a hash with the following keys:
1412
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1413
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1414
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1415
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1416
+ # trigger a retry.
1417
+ # @return [::Hash]
1418
+ # @!attribute [rw] quota_project
1419
+ # A separate project against which to charge quota.
1420
+ # @return [::String]
1427
1421
  #
1428
1422
  class Configuration
1429
1423
  extend ::Gapic::Config
@@ -1438,6 +1432,8 @@ module Google
1438
1432
  config_attr :lib_version, nil, ::String, nil
1439
1433
  config_attr :timeout, nil, ::Numeric, nil
1440
1434
  config_attr :metadata, nil, ::Hash, nil
1435
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1436
+ config_attr :quota_project, nil, ::String, nil
1441
1437
 
1442
1438
  # @private
1443
1439
  def initialize parent_config = nil
@@ -1466,9 +1462,14 @@ module Google
1466
1462
  # the following configuration fields:
1467
1463
  #
1468
1464
  # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1469
- #
1470
- # there is one other field (`retry_policy`) that can be set
1471
- # but is currently not supported for REST Gapic libraries.
1465
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1466
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1467
+ # include the following keys:
1468
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1469
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1470
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1471
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1472
+ # trigger a retry.
1472
1473
  #
1473
1474
  class Rpcs
1474
1475
  ##