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
@@ -236,13 +236,22 @@ module Google
236
236
 
237
237
  # Create credentials
238
238
  credentials = @config.credentials
239
- credentials ||= Credentials.default scope: @config.scope
239
+ # Use self-signed JWT if the endpoint is unchanged from default,
240
+ # but only if the default endpoint does not have a region prefix.
241
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
242
+ !@config.endpoint.split(".").first.include?("-")
243
+ credentials ||= Credentials.default scope: @config.scope,
244
+ enable_self_signed_jwt: enable_self_signed_jwt
240
245
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
241
246
  credentials = Credentials.new credentials, scope: @config.scope
242
247
  end
243
248
 
249
+ @quota_project_id = @config.quota_project
250
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
251
+
244
252
  @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
245
253
  config.credentials = credentials
254
+ config.quota_project = @quota_project_id
246
255
  config.endpoint = @config.endpoint
247
256
  end
248
257
 
@@ -270,8 +279,6 @@ module Google
270
279
  # parameters, or to keep all the default parameter values, pass an empty Hash.
271
280
  # @param options [::Gapic::CallOptions, ::Hash]
272
281
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
273
- # Note: currently retry functionality is not implemented. While it is possible
274
- # to set it using ::Gapic::CallOptions, it will not be applied
275
282
  #
276
283
  # @overload add_access_config(access_config_resource: nil, instance: nil, network_interface: nil, project: nil, request_id: nil, zone: nil)
277
284
  # Pass arguments to `add_access_config` via keyword arguments. Note that at
@@ -308,17 +315,21 @@ module Google
308
315
  # Customize the options with defaults
309
316
  call_metadata = @config.rpcs.add_access_config.metadata.to_h
310
317
 
311
- # Set x-goog-api-client header
318
+ # Set x-goog-api-client and x-goog-user-project headers
312
319
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
313
320
  lib_name: @config.lib_name, lib_version: @config.lib_version,
314
321
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
315
322
  transports_version_send: [:rest]
316
323
 
324
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
325
+
317
326
  options.apply_defaults timeout: @config.rpcs.add_access_config.timeout,
318
- metadata: call_metadata
327
+ metadata: call_metadata,
328
+ retry_policy: @config.rpcs.add_access_config.retry_policy
319
329
 
320
330
  options.apply_defaults timeout: @config.timeout,
321
- metadata: @config.metadata
331
+ metadata: @config.metadata,
332
+ retry_policy: @config.retry_policy
322
333
 
323
334
  @instances_stub.add_access_config request, options do |result, response|
324
335
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -333,12 +344,8 @@ module Google
333
344
  yield result, response if block_given?
334
345
  return result
335
346
  end
336
- rescue ::Faraday::Error => e
337
- begin
338
- raise ::Gapic::Rest::Error.wrap_faraday_error e
339
- rescue ::Gapic::Rest::Error => gapic_error
340
- raise ::Google::Cloud::Error.from_error gapic_error
341
- end
347
+ rescue ::Gapic::Rest::Error => e
348
+ raise ::Google::Cloud::Error.from_error(e)
342
349
  end
343
350
 
344
351
  ##
@@ -353,8 +360,6 @@ module Google
353
360
  # parameters, or to keep all the default parameter values, pass an empty Hash.
354
361
  # @param options [::Gapic::CallOptions, ::Hash]
355
362
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
356
- # Note: currently retry functionality is not implemented. While it is possible
357
- # to set it using ::Gapic::CallOptions, it will not be applied
358
363
  #
359
364
  # @overload add_resource_policies(instance: nil, instances_add_resource_policies_request_resource: nil, project: nil, request_id: nil, zone: nil)
360
365
  # Pass arguments to `add_resource_policies` via keyword arguments. Note that at
@@ -389,17 +394,21 @@ module Google
389
394
  # Customize the options with defaults
390
395
  call_metadata = @config.rpcs.add_resource_policies.metadata.to_h
391
396
 
392
- # Set x-goog-api-client header
397
+ # Set x-goog-api-client and x-goog-user-project headers
393
398
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
394
399
  lib_name: @config.lib_name, lib_version: @config.lib_version,
395
400
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
396
401
  transports_version_send: [:rest]
397
402
 
403
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
404
+
398
405
  options.apply_defaults timeout: @config.rpcs.add_resource_policies.timeout,
399
- metadata: call_metadata
406
+ metadata: call_metadata,
407
+ retry_policy: @config.rpcs.add_resource_policies.retry_policy
400
408
 
401
409
  options.apply_defaults timeout: @config.timeout,
402
- metadata: @config.metadata
410
+ metadata: @config.metadata,
411
+ retry_policy: @config.retry_policy
403
412
 
404
413
  @instances_stub.add_resource_policies request, options do |result, response|
405
414
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -414,12 +423,8 @@ module Google
414
423
  yield result, response if block_given?
415
424
  return result
416
425
  end
417
- rescue ::Faraday::Error => e
418
- begin
419
- raise ::Gapic::Rest::Error.wrap_faraday_error e
420
- rescue ::Gapic::Rest::Error => gapic_error
421
- raise ::Google::Cloud::Error.from_error gapic_error
422
- end
426
+ rescue ::Gapic::Rest::Error => e
427
+ raise ::Google::Cloud::Error.from_error(e)
423
428
  end
424
429
 
425
430
  ##
@@ -434,8 +439,6 @@ module Google
434
439
  # parameters, or to keep all the default parameter values, pass an empty Hash.
435
440
  # @param options [::Gapic::CallOptions, ::Hash]
436
441
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
437
- # Note: currently retry functionality is not implemented. While it is possible
438
- # to set it using ::Gapic::CallOptions, it will not be applied
439
442
  #
440
443
  # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
441
444
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
@@ -474,29 +477,29 @@ module Google
474
477
  # Customize the options with defaults
475
478
  call_metadata = @config.rpcs.aggregated_list.metadata.to_h
476
479
 
477
- # Set x-goog-api-client header
480
+ # Set x-goog-api-client and x-goog-user-project headers
478
481
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
479
482
  lib_name: @config.lib_name, lib_version: @config.lib_version,
480
483
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
481
484
  transports_version_send: [:rest]
482
485
 
486
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
487
+
483
488
  options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
484
- metadata: call_metadata
489
+ metadata: call_metadata,
490
+ retry_policy: @config.rpcs.aggregated_list.retry_policy
485
491
 
486
492
  options.apply_defaults timeout: @config.timeout,
487
- metadata: @config.metadata
493
+ metadata: @config.metadata,
494
+ retry_policy: @config.retry_policy
488
495
 
489
496
  @instances_stub.aggregated_list request, options do |result, response|
490
497
  result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :aggregated_list, "items", request, result, options
491
498
  yield result, response if block_given?
492
499
  return result
493
500
  end
494
- rescue ::Faraday::Error => e
495
- begin
496
- raise ::Gapic::Rest::Error.wrap_faraday_error e
497
- rescue ::Gapic::Rest::Error => gapic_error
498
- raise ::Google::Cloud::Error.from_error gapic_error
499
- end
501
+ rescue ::Gapic::Rest::Error => e
502
+ raise ::Google::Cloud::Error.from_error(e)
500
503
  end
501
504
 
502
505
  ##
@@ -511,8 +514,6 @@ module Google
511
514
  # parameters, or to keep all the default parameter values, pass an empty Hash.
512
515
  # @param options [::Gapic::CallOptions, ::Hash]
513
516
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
514
- # Note: currently retry functionality is not implemented. While it is possible
515
- # to set it using ::Gapic::CallOptions, it will not be applied
516
517
  #
517
518
  # @overload attach_disk(attached_disk_resource: nil, force_attach: nil, instance: nil, project: nil, request_id: nil, zone: nil)
518
519
  # Pass arguments to `attach_disk` via keyword arguments. Note that at
@@ -549,17 +550,21 @@ module Google
549
550
  # Customize the options with defaults
550
551
  call_metadata = @config.rpcs.attach_disk.metadata.to_h
551
552
 
552
- # Set x-goog-api-client header
553
+ # Set x-goog-api-client and x-goog-user-project headers
553
554
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
554
555
  lib_name: @config.lib_name, lib_version: @config.lib_version,
555
556
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
556
557
  transports_version_send: [:rest]
557
558
 
559
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
560
+
558
561
  options.apply_defaults timeout: @config.rpcs.attach_disk.timeout,
559
- metadata: call_metadata
562
+ metadata: call_metadata,
563
+ retry_policy: @config.rpcs.attach_disk.retry_policy
560
564
 
561
565
  options.apply_defaults timeout: @config.timeout,
562
- metadata: @config.metadata
566
+ metadata: @config.metadata,
567
+ retry_policy: @config.retry_policy
563
568
 
564
569
  @instances_stub.attach_disk request, options do |result, response|
565
570
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -574,12 +579,8 @@ module Google
574
579
  yield result, response if block_given?
575
580
  return result
576
581
  end
577
- rescue ::Faraday::Error => e
578
- begin
579
- raise ::Gapic::Rest::Error.wrap_faraday_error e
580
- rescue ::Gapic::Rest::Error => gapic_error
581
- raise ::Google::Cloud::Error.from_error gapic_error
582
- end
582
+ rescue ::Gapic::Rest::Error => e
583
+ raise ::Google::Cloud::Error.from_error(e)
583
584
  end
584
585
 
585
586
  ##
@@ -594,8 +595,6 @@ module Google
594
595
  # parameters, or to keep all the default parameter values, pass an empty Hash.
595
596
  # @param options [::Gapic::CallOptions, ::Hash]
596
597
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
597
- # Note: currently retry functionality is not implemented. While it is possible
598
- # to set it using ::Gapic::CallOptions, it will not be applied
599
598
  #
600
599
  # @overload bulk_insert(bulk_insert_instance_resource_resource: nil, project: nil, request_id: nil, zone: nil)
601
600
  # Pass arguments to `bulk_insert` via keyword arguments. Note that at
@@ -628,17 +627,21 @@ module Google
628
627
  # Customize the options with defaults
629
628
  call_metadata = @config.rpcs.bulk_insert.metadata.to_h
630
629
 
631
- # Set x-goog-api-client header
630
+ # Set x-goog-api-client and x-goog-user-project headers
632
631
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
633
632
  lib_name: @config.lib_name, lib_version: @config.lib_version,
634
633
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
635
634
  transports_version_send: [:rest]
636
635
 
636
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
637
+
637
638
  options.apply_defaults timeout: @config.rpcs.bulk_insert.timeout,
638
- metadata: call_metadata
639
+ metadata: call_metadata,
640
+ retry_policy: @config.rpcs.bulk_insert.retry_policy
639
641
 
640
642
  options.apply_defaults timeout: @config.timeout,
641
- metadata: @config.metadata
643
+ metadata: @config.metadata,
644
+ retry_policy: @config.retry_policy
642
645
 
643
646
  @instances_stub.bulk_insert request, options do |result, response|
644
647
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -653,12 +656,8 @@ module Google
653
656
  yield result, response if block_given?
654
657
  return result
655
658
  end
656
- rescue ::Faraday::Error => e
657
- begin
658
- raise ::Gapic::Rest::Error.wrap_faraday_error e
659
- rescue ::Gapic::Rest::Error => gapic_error
660
- raise ::Google::Cloud::Error.from_error gapic_error
661
- end
659
+ rescue ::Gapic::Rest::Error => e
660
+ raise ::Google::Cloud::Error.from_error(e)
662
661
  end
663
662
 
664
663
  ##
@@ -673,8 +672,6 @@ module Google
673
672
  # parameters, or to keep all the default parameter values, pass an empty Hash.
674
673
  # @param options [::Gapic::CallOptions, ::Hash]
675
674
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
676
- # Note: currently retry functionality is not implemented. While it is possible
677
- # to set it using ::Gapic::CallOptions, it will not be applied
678
675
  #
679
676
  # @overload delete(instance: nil, project: nil, request_id: nil, zone: nil)
680
677
  # Pass arguments to `delete` via keyword arguments. Note that at
@@ -707,17 +704,21 @@ module Google
707
704
  # Customize the options with defaults
708
705
  call_metadata = @config.rpcs.delete.metadata.to_h
709
706
 
710
- # Set x-goog-api-client header
707
+ # Set x-goog-api-client and x-goog-user-project headers
711
708
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
712
709
  lib_name: @config.lib_name, lib_version: @config.lib_version,
713
710
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
714
711
  transports_version_send: [:rest]
715
712
 
713
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
714
+
716
715
  options.apply_defaults timeout: @config.rpcs.delete.timeout,
717
- metadata: call_metadata
716
+ metadata: call_metadata,
717
+ retry_policy: @config.rpcs.delete.retry_policy
718
718
 
719
719
  options.apply_defaults timeout: @config.timeout,
720
- metadata: @config.metadata
720
+ metadata: @config.metadata,
721
+ retry_policy: @config.retry_policy
721
722
 
722
723
  @instances_stub.delete request, options do |result, response|
723
724
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -732,12 +733,8 @@ module Google
732
733
  yield result, response if block_given?
733
734
  return result
734
735
  end
735
- rescue ::Faraday::Error => e
736
- begin
737
- raise ::Gapic::Rest::Error.wrap_faraday_error e
738
- rescue ::Gapic::Rest::Error => gapic_error
739
- raise ::Google::Cloud::Error.from_error gapic_error
740
- end
736
+ rescue ::Gapic::Rest::Error => e
737
+ raise ::Google::Cloud::Error.from_error(e)
741
738
  end
742
739
 
743
740
  ##
@@ -752,8 +749,6 @@ module Google
752
749
  # parameters, or to keep all the default parameter values, pass an empty Hash.
753
750
  # @param options [::Gapic::CallOptions, ::Hash]
754
751
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
755
- # Note: currently retry functionality is not implemented. While it is possible
756
- # to set it using ::Gapic::CallOptions, it will not be applied
757
752
  #
758
753
  # @overload delete_access_config(access_config: nil, instance: nil, network_interface: nil, project: nil, request_id: nil, zone: nil)
759
754
  # Pass arguments to `delete_access_config` via keyword arguments. Note that at
@@ -790,17 +785,21 @@ module Google
790
785
  # Customize the options with defaults
791
786
  call_metadata = @config.rpcs.delete_access_config.metadata.to_h
792
787
 
793
- # Set x-goog-api-client header
788
+ # Set x-goog-api-client and x-goog-user-project headers
794
789
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
795
790
  lib_name: @config.lib_name, lib_version: @config.lib_version,
796
791
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
797
792
  transports_version_send: [:rest]
798
793
 
794
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
795
+
799
796
  options.apply_defaults timeout: @config.rpcs.delete_access_config.timeout,
800
- metadata: call_metadata
797
+ metadata: call_metadata,
798
+ retry_policy: @config.rpcs.delete_access_config.retry_policy
801
799
 
802
800
  options.apply_defaults timeout: @config.timeout,
803
- metadata: @config.metadata
801
+ metadata: @config.metadata,
802
+ retry_policy: @config.retry_policy
804
803
 
805
804
  @instances_stub.delete_access_config request, options do |result, response|
806
805
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -815,12 +814,8 @@ module Google
815
814
  yield result, response if block_given?
816
815
  return result
817
816
  end
818
- rescue ::Faraday::Error => e
819
- begin
820
- raise ::Gapic::Rest::Error.wrap_faraday_error e
821
- rescue ::Gapic::Rest::Error => gapic_error
822
- raise ::Google::Cloud::Error.from_error gapic_error
823
- end
817
+ rescue ::Gapic::Rest::Error => e
818
+ raise ::Google::Cloud::Error.from_error(e)
824
819
  end
825
820
 
826
821
  ##
@@ -835,8 +830,6 @@ module Google
835
830
  # parameters, or to keep all the default parameter values, pass an empty Hash.
836
831
  # @param options [::Gapic::CallOptions, ::Hash]
837
832
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
838
- # Note: currently retry functionality is not implemented. While it is possible
839
- # to set it using ::Gapic::CallOptions, it will not be applied
840
833
  #
841
834
  # @overload detach_disk(device_name: nil, instance: nil, project: nil, request_id: nil, zone: nil)
842
835
  # Pass arguments to `detach_disk` via keyword arguments. Note that at
@@ -871,17 +864,21 @@ module Google
871
864
  # Customize the options with defaults
872
865
  call_metadata = @config.rpcs.detach_disk.metadata.to_h
873
866
 
874
- # Set x-goog-api-client header
867
+ # Set x-goog-api-client and x-goog-user-project headers
875
868
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
876
869
  lib_name: @config.lib_name, lib_version: @config.lib_version,
877
870
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
878
871
  transports_version_send: [:rest]
879
872
 
873
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
874
+
880
875
  options.apply_defaults timeout: @config.rpcs.detach_disk.timeout,
881
- metadata: call_metadata
876
+ metadata: call_metadata,
877
+ retry_policy: @config.rpcs.detach_disk.retry_policy
882
878
 
883
879
  options.apply_defaults timeout: @config.timeout,
884
- metadata: @config.metadata
880
+ metadata: @config.metadata,
881
+ retry_policy: @config.retry_policy
885
882
 
886
883
  @instances_stub.detach_disk request, options do |result, response|
887
884
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -896,12 +893,8 @@ module Google
896
893
  yield result, response if block_given?
897
894
  return result
898
895
  end
899
- rescue ::Faraday::Error => e
900
- begin
901
- raise ::Gapic::Rest::Error.wrap_faraday_error e
902
- rescue ::Gapic::Rest::Error => gapic_error
903
- raise ::Google::Cloud::Error.from_error gapic_error
904
- end
896
+ rescue ::Gapic::Rest::Error => e
897
+ raise ::Google::Cloud::Error.from_error(e)
905
898
  end
906
899
 
907
900
  ##
@@ -916,8 +909,6 @@ module Google
916
909
  # parameters, or to keep all the default parameter values, pass an empty Hash.
917
910
  # @param options [::Gapic::CallOptions, ::Hash]
918
911
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
919
- # Note: currently retry functionality is not implemented. While it is possible
920
- # to set it using ::Gapic::CallOptions, it will not be applied
921
912
  #
922
913
  # @overload get(instance: nil, project: nil, zone: nil)
923
914
  # Pass arguments to `get` via keyword arguments. Note that at
@@ -948,28 +939,28 @@ module Google
948
939
  # Customize the options with defaults
949
940
  call_metadata = @config.rpcs.get.metadata.to_h
950
941
 
951
- # Set x-goog-api-client header
942
+ # Set x-goog-api-client and x-goog-user-project headers
952
943
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
953
944
  lib_name: @config.lib_name, lib_version: @config.lib_version,
954
945
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
955
946
  transports_version_send: [:rest]
956
947
 
948
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
949
+
957
950
  options.apply_defaults timeout: @config.rpcs.get.timeout,
958
- metadata: call_metadata
951
+ metadata: call_metadata,
952
+ retry_policy: @config.rpcs.get.retry_policy
959
953
 
960
954
  options.apply_defaults timeout: @config.timeout,
961
- metadata: @config.metadata
955
+ metadata: @config.metadata,
956
+ retry_policy: @config.retry_policy
962
957
 
963
958
  @instances_stub.get request, options do |result, response|
964
959
  yield result, response if block_given?
965
960
  return result
966
961
  end
967
- rescue ::Faraday::Error => e
968
- begin
969
- raise ::Gapic::Rest::Error.wrap_faraday_error e
970
- rescue ::Gapic::Rest::Error => gapic_error
971
- raise ::Google::Cloud::Error.from_error gapic_error
972
- end
962
+ rescue ::Gapic::Rest::Error => e
963
+ raise ::Google::Cloud::Error.from_error(e)
973
964
  end
974
965
 
975
966
  ##
@@ -984,8 +975,6 @@ module Google
984
975
  # parameters, or to keep all the default parameter values, pass an empty Hash.
985
976
  # @param options [::Gapic::CallOptions, ::Hash]
986
977
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
987
- # Note: currently retry functionality is not implemented. While it is possible
988
- # to set it using ::Gapic::CallOptions, it will not be applied
989
978
  #
990
979
  # @overload get_effective_firewalls(instance: nil, network_interface: nil, project: nil, zone: nil)
991
980
  # Pass arguments to `get_effective_firewalls` via keyword arguments. Note that at
@@ -1018,28 +1007,28 @@ module Google
1018
1007
  # Customize the options with defaults
1019
1008
  call_metadata = @config.rpcs.get_effective_firewalls.metadata.to_h
1020
1009
 
1021
- # Set x-goog-api-client header
1010
+ # Set x-goog-api-client and x-goog-user-project headers
1022
1011
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1023
1012
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1024
1013
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1025
1014
  transports_version_send: [:rest]
1026
1015
 
1016
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1017
+
1027
1018
  options.apply_defaults timeout: @config.rpcs.get_effective_firewalls.timeout,
1028
- metadata: call_metadata
1019
+ metadata: call_metadata,
1020
+ retry_policy: @config.rpcs.get_effective_firewalls.retry_policy
1029
1021
 
1030
1022
  options.apply_defaults timeout: @config.timeout,
1031
- metadata: @config.metadata
1023
+ metadata: @config.metadata,
1024
+ retry_policy: @config.retry_policy
1032
1025
 
1033
1026
  @instances_stub.get_effective_firewalls request, options do |result, response|
1034
1027
  yield result, response if block_given?
1035
1028
  return result
1036
1029
  end
1037
- rescue ::Faraday::Error => e
1038
- begin
1039
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1040
- rescue ::Gapic::Rest::Error => gapic_error
1041
- raise ::Google::Cloud::Error.from_error gapic_error
1042
- end
1030
+ rescue ::Gapic::Rest::Error => e
1031
+ raise ::Google::Cloud::Error.from_error(e)
1043
1032
  end
1044
1033
 
1045
1034
  ##
@@ -1054,8 +1043,6 @@ module Google
1054
1043
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1055
1044
  # @param options [::Gapic::CallOptions, ::Hash]
1056
1045
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1057
- # Note: currently retry functionality is not implemented. While it is possible
1058
- # to set it using ::Gapic::CallOptions, it will not be applied
1059
1046
  #
1060
1047
  # @overload get_guest_attributes(instance: nil, project: nil, query_path: nil, variable_key: nil, zone: nil)
1061
1048
  # Pass arguments to `get_guest_attributes` via keyword arguments. Note that at
@@ -1090,28 +1077,28 @@ module Google
1090
1077
  # Customize the options with defaults
1091
1078
  call_metadata = @config.rpcs.get_guest_attributes.metadata.to_h
1092
1079
 
1093
- # Set x-goog-api-client header
1080
+ # Set x-goog-api-client and x-goog-user-project headers
1094
1081
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1095
1082
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1096
1083
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1097
1084
  transports_version_send: [:rest]
1098
1085
 
1086
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1087
+
1099
1088
  options.apply_defaults timeout: @config.rpcs.get_guest_attributes.timeout,
1100
- metadata: call_metadata
1089
+ metadata: call_metadata,
1090
+ retry_policy: @config.rpcs.get_guest_attributes.retry_policy
1101
1091
 
1102
1092
  options.apply_defaults timeout: @config.timeout,
1103
- metadata: @config.metadata
1093
+ metadata: @config.metadata,
1094
+ retry_policy: @config.retry_policy
1104
1095
 
1105
1096
  @instances_stub.get_guest_attributes request, options do |result, response|
1106
1097
  yield result, response if block_given?
1107
1098
  return result
1108
1099
  end
1109
- rescue ::Faraday::Error => e
1110
- begin
1111
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1112
- rescue ::Gapic::Rest::Error => gapic_error
1113
- raise ::Google::Cloud::Error.from_error gapic_error
1114
- end
1100
+ rescue ::Gapic::Rest::Error => e
1101
+ raise ::Google::Cloud::Error.from_error(e)
1115
1102
  end
1116
1103
 
1117
1104
  ##
@@ -1126,8 +1113,6 @@ module Google
1126
1113
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1127
1114
  # @param options [::Gapic::CallOptions, ::Hash]
1128
1115
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1129
- # Note: currently retry functionality is not implemented. While it is possible
1130
- # to set it using ::Gapic::CallOptions, it will not be applied
1131
1116
  #
1132
1117
  # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil, zone: nil)
1133
1118
  # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
@@ -1160,28 +1145,28 @@ module Google
1160
1145
  # Customize the options with defaults
1161
1146
  call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
1162
1147
 
1163
- # Set x-goog-api-client header
1148
+ # Set x-goog-api-client and x-goog-user-project headers
1164
1149
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1165
1150
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1166
1151
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1167
1152
  transports_version_send: [:rest]
1168
1153
 
1154
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1155
+
1169
1156
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
1170
- metadata: call_metadata
1157
+ metadata: call_metadata,
1158
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
1171
1159
 
1172
1160
  options.apply_defaults timeout: @config.timeout,
1173
- metadata: @config.metadata
1161
+ metadata: @config.metadata,
1162
+ retry_policy: @config.retry_policy
1174
1163
 
1175
1164
  @instances_stub.get_iam_policy request, options do |result, response|
1176
1165
  yield result, response if block_given?
1177
1166
  return result
1178
1167
  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
1168
+ rescue ::Gapic::Rest::Error => e
1169
+ raise ::Google::Cloud::Error.from_error(e)
1185
1170
  end
1186
1171
 
1187
1172
  ##
@@ -1196,8 +1181,6 @@ module Google
1196
1181
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1197
1182
  # @param options [::Gapic::CallOptions, ::Hash]
1198
1183
  # 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
1184
  #
1202
1185
  # @overload get_screenshot(instance: nil, project: nil, zone: nil)
1203
1186
  # Pass arguments to `get_screenshot` via keyword arguments. Note that at
@@ -1228,28 +1211,28 @@ module Google
1228
1211
  # Customize the options with defaults
1229
1212
  call_metadata = @config.rpcs.get_screenshot.metadata.to_h
1230
1213
 
1231
- # Set x-goog-api-client header
1214
+ # Set x-goog-api-client and x-goog-user-project headers
1232
1215
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1233
1216
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1234
1217
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1235
1218
  transports_version_send: [:rest]
1236
1219
 
1220
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1221
+
1237
1222
  options.apply_defaults timeout: @config.rpcs.get_screenshot.timeout,
1238
- metadata: call_metadata
1223
+ metadata: call_metadata,
1224
+ retry_policy: @config.rpcs.get_screenshot.retry_policy
1239
1225
 
1240
1226
  options.apply_defaults timeout: @config.timeout,
1241
- metadata: @config.metadata
1227
+ metadata: @config.metadata,
1228
+ retry_policy: @config.retry_policy
1242
1229
 
1243
1230
  @instances_stub.get_screenshot request, options do |result, response|
1244
1231
  yield result, response if block_given?
1245
1232
  return result
1246
1233
  end
1247
- rescue ::Faraday::Error => e
1248
- begin
1249
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1250
- rescue ::Gapic::Rest::Error => gapic_error
1251
- raise ::Google::Cloud::Error.from_error gapic_error
1252
- end
1234
+ rescue ::Gapic::Rest::Error => e
1235
+ raise ::Google::Cloud::Error.from_error(e)
1253
1236
  end
1254
1237
 
1255
1238
  ##
@@ -1264,8 +1247,6 @@ module Google
1264
1247
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1265
1248
  # @param options [::Gapic::CallOptions, ::Hash]
1266
1249
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1267
- # Note: currently retry functionality is not implemented. While it is possible
1268
- # to set it using ::Gapic::CallOptions, it will not be applied
1269
1250
  #
1270
1251
  # @overload get_serial_port_output(instance: nil, port: nil, project: nil, start: nil, zone: nil)
1271
1252
  # Pass arguments to `get_serial_port_output` via keyword arguments. Note that at
@@ -1300,28 +1281,28 @@ module Google
1300
1281
  # Customize the options with defaults
1301
1282
  call_metadata = @config.rpcs.get_serial_port_output.metadata.to_h
1302
1283
 
1303
- # Set x-goog-api-client header
1284
+ # Set x-goog-api-client and x-goog-user-project headers
1304
1285
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1305
1286
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1306
1287
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1307
1288
  transports_version_send: [:rest]
1308
1289
 
1290
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1291
+
1309
1292
  options.apply_defaults timeout: @config.rpcs.get_serial_port_output.timeout,
1310
- metadata: call_metadata
1293
+ metadata: call_metadata,
1294
+ retry_policy: @config.rpcs.get_serial_port_output.retry_policy
1311
1295
 
1312
1296
  options.apply_defaults timeout: @config.timeout,
1313
- metadata: @config.metadata
1297
+ metadata: @config.metadata,
1298
+ retry_policy: @config.retry_policy
1314
1299
 
1315
1300
  @instances_stub.get_serial_port_output request, options do |result, response|
1316
1301
  yield result, response if block_given?
1317
1302
  return result
1318
1303
  end
1319
- rescue ::Faraday::Error => e
1320
- begin
1321
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1322
- rescue ::Gapic::Rest::Error => gapic_error
1323
- raise ::Google::Cloud::Error.from_error gapic_error
1324
- end
1304
+ rescue ::Gapic::Rest::Error => e
1305
+ raise ::Google::Cloud::Error.from_error(e)
1325
1306
  end
1326
1307
 
1327
1308
  ##
@@ -1336,8 +1317,6 @@ module Google
1336
1317
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1337
1318
  # @param options [::Gapic::CallOptions, ::Hash]
1338
1319
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1339
- # Note: currently retry functionality is not implemented. While it is possible
1340
- # to set it using ::Gapic::CallOptions, it will not be applied
1341
1320
  #
1342
1321
  # @overload get_shielded_instance_identity(instance: nil, project: nil, zone: nil)
1343
1322
  # Pass arguments to `get_shielded_instance_identity` via keyword arguments. Note that at
@@ -1368,28 +1347,28 @@ module Google
1368
1347
  # Customize the options with defaults
1369
1348
  call_metadata = @config.rpcs.get_shielded_instance_identity.metadata.to_h
1370
1349
 
1371
- # Set x-goog-api-client header
1350
+ # Set x-goog-api-client and x-goog-user-project headers
1372
1351
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1373
1352
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1374
1353
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1375
1354
  transports_version_send: [:rest]
1376
1355
 
1356
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1357
+
1377
1358
  options.apply_defaults timeout: @config.rpcs.get_shielded_instance_identity.timeout,
1378
- metadata: call_metadata
1359
+ metadata: call_metadata,
1360
+ retry_policy: @config.rpcs.get_shielded_instance_identity.retry_policy
1379
1361
 
1380
1362
  options.apply_defaults timeout: @config.timeout,
1381
- metadata: @config.metadata
1363
+ metadata: @config.metadata,
1364
+ retry_policy: @config.retry_policy
1382
1365
 
1383
1366
  @instances_stub.get_shielded_instance_identity request, options do |result, response|
1384
1367
  yield result, response if block_given?
1385
1368
  return result
1386
1369
  end
1387
- rescue ::Faraday::Error => e
1388
- begin
1389
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1390
- rescue ::Gapic::Rest::Error => gapic_error
1391
- raise ::Google::Cloud::Error.from_error gapic_error
1392
- end
1370
+ rescue ::Gapic::Rest::Error => e
1371
+ raise ::Google::Cloud::Error.from_error(e)
1393
1372
  end
1394
1373
 
1395
1374
  ##
@@ -1404,8 +1383,6 @@ module Google
1404
1383
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1405
1384
  # @param options [::Gapic::CallOptions, ::Hash]
1406
1385
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1407
- # Note: currently retry functionality is not implemented. While it is possible
1408
- # to set it using ::Gapic::CallOptions, it will not be applied
1409
1386
  #
1410
1387
  # @overload insert(instance_resource: nil, project: nil, request_id: nil, source_instance_template: nil, source_machine_image: nil, zone: nil)
1411
1388
  # Pass arguments to `insert` via keyword arguments. Note that at
@@ -1442,17 +1419,21 @@ module Google
1442
1419
  # Customize the options with defaults
1443
1420
  call_metadata = @config.rpcs.insert.metadata.to_h
1444
1421
 
1445
- # Set x-goog-api-client header
1422
+ # Set x-goog-api-client and x-goog-user-project headers
1446
1423
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1447
1424
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1448
1425
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1449
1426
  transports_version_send: [:rest]
1450
1427
 
1428
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1429
+
1451
1430
  options.apply_defaults timeout: @config.rpcs.insert.timeout,
1452
- metadata: call_metadata
1431
+ metadata: call_metadata,
1432
+ retry_policy: @config.rpcs.insert.retry_policy
1453
1433
 
1454
1434
  options.apply_defaults timeout: @config.timeout,
1455
- metadata: @config.metadata
1435
+ metadata: @config.metadata,
1436
+ retry_policy: @config.retry_policy
1456
1437
 
1457
1438
  @instances_stub.insert request, options do |result, response|
1458
1439
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -1467,12 +1448,8 @@ module Google
1467
1448
  yield result, response if block_given?
1468
1449
  return result
1469
1450
  end
1470
- rescue ::Faraday::Error => e
1471
- begin
1472
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1473
- rescue ::Gapic::Rest::Error => gapic_error
1474
- raise ::Google::Cloud::Error.from_error gapic_error
1475
- end
1451
+ rescue ::Gapic::Rest::Error => e
1452
+ raise ::Google::Cloud::Error.from_error(e)
1476
1453
  end
1477
1454
 
1478
1455
  ##
@@ -1487,8 +1464,6 @@ module Google
1487
1464
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1488
1465
  # @param options [::Gapic::CallOptions, ::Hash]
1489
1466
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1490
- # Note: currently retry functionality is not implemented. While it is possible
1491
- # to set it using ::Gapic::CallOptions, it will not be applied
1492
1467
  #
1493
1468
  # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
1494
1469
  # Pass arguments to `list` via keyword arguments. Note that at
@@ -1527,29 +1502,29 @@ module Google
1527
1502
  # Customize the options with defaults
1528
1503
  call_metadata = @config.rpcs.list.metadata.to_h
1529
1504
 
1530
- # Set x-goog-api-client header
1505
+ # Set x-goog-api-client and x-goog-user-project headers
1531
1506
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1532
1507
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1533
1508
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1534
1509
  transports_version_send: [:rest]
1535
1510
 
1511
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1512
+
1536
1513
  options.apply_defaults timeout: @config.rpcs.list.timeout,
1537
- metadata: call_metadata
1514
+ metadata: call_metadata,
1515
+ retry_policy: @config.rpcs.list.retry_policy
1538
1516
 
1539
1517
  options.apply_defaults timeout: @config.timeout,
1540
- metadata: @config.metadata
1518
+ metadata: @config.metadata,
1519
+ retry_policy: @config.retry_policy
1541
1520
 
1542
1521
  @instances_stub.list request, options do |result, response|
1543
1522
  result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list, "items", request, result, options
1544
1523
  yield result, response if block_given?
1545
1524
  return result
1546
1525
  end
1547
- rescue ::Faraday::Error => e
1548
- begin
1549
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1550
- rescue ::Gapic::Rest::Error => gapic_error
1551
- raise ::Google::Cloud::Error.from_error gapic_error
1552
- end
1526
+ rescue ::Gapic::Rest::Error => e
1527
+ raise ::Google::Cloud::Error.from_error(e)
1553
1528
  end
1554
1529
 
1555
1530
  ##
@@ -1564,8 +1539,6 @@ module Google
1564
1539
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1565
1540
  # @param options [::Gapic::CallOptions, ::Hash]
1566
1541
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1567
- # Note: currently retry functionality is not implemented. While it is possible
1568
- # to set it using ::Gapic::CallOptions, it will not be applied
1569
1542
  #
1570
1543
  # @overload list_referrers(filter: nil, instance: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
1571
1544
  # Pass arguments to `list_referrers` via keyword arguments. Note that at
@@ -1606,29 +1579,29 @@ module Google
1606
1579
  # Customize the options with defaults
1607
1580
  call_metadata = @config.rpcs.list_referrers.metadata.to_h
1608
1581
 
1609
- # Set x-goog-api-client header
1582
+ # Set x-goog-api-client and x-goog-user-project headers
1610
1583
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1611
1584
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1612
1585
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1613
1586
  transports_version_send: [:rest]
1614
1587
 
1588
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1589
+
1615
1590
  options.apply_defaults timeout: @config.rpcs.list_referrers.timeout,
1616
- metadata: call_metadata
1591
+ metadata: call_metadata,
1592
+ retry_policy: @config.rpcs.list_referrers.retry_policy
1617
1593
 
1618
1594
  options.apply_defaults timeout: @config.timeout,
1619
- metadata: @config.metadata
1595
+ metadata: @config.metadata,
1596
+ retry_policy: @config.retry_policy
1620
1597
 
1621
1598
  @instances_stub.list_referrers request, options do |result, response|
1622
1599
  result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list_referrers, "items", request, result, options
1623
1600
  yield result, response if block_given?
1624
1601
  return result
1625
1602
  end
1626
- rescue ::Faraday::Error => e
1627
- begin
1628
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1629
- rescue ::Gapic::Rest::Error => gapic_error
1630
- raise ::Google::Cloud::Error.from_error gapic_error
1631
- end
1603
+ rescue ::Gapic::Rest::Error => e
1604
+ raise ::Google::Cloud::Error.from_error(e)
1632
1605
  end
1633
1606
 
1634
1607
  ##
@@ -1643,8 +1616,6 @@ module Google
1643
1616
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1644
1617
  # @param options [::Gapic::CallOptions, ::Hash]
1645
1618
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1646
- # Note: currently retry functionality is not implemented. While it is possible
1647
- # to set it using ::Gapic::CallOptions, it will not be applied
1648
1619
  #
1649
1620
  # @overload remove_resource_policies(instance: nil, instances_remove_resource_policies_request_resource: nil, project: nil, request_id: nil, zone: nil)
1650
1621
  # Pass arguments to `remove_resource_policies` via keyword arguments. Note that at
@@ -1679,17 +1650,21 @@ module Google
1679
1650
  # Customize the options with defaults
1680
1651
  call_metadata = @config.rpcs.remove_resource_policies.metadata.to_h
1681
1652
 
1682
- # Set x-goog-api-client header
1653
+ # Set x-goog-api-client and x-goog-user-project headers
1683
1654
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1684
1655
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1685
1656
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1686
1657
  transports_version_send: [:rest]
1687
1658
 
1659
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1660
+
1688
1661
  options.apply_defaults timeout: @config.rpcs.remove_resource_policies.timeout,
1689
- metadata: call_metadata
1662
+ metadata: call_metadata,
1663
+ retry_policy: @config.rpcs.remove_resource_policies.retry_policy
1690
1664
 
1691
1665
  options.apply_defaults timeout: @config.timeout,
1692
- metadata: @config.metadata
1666
+ metadata: @config.metadata,
1667
+ retry_policy: @config.retry_policy
1693
1668
 
1694
1669
  @instances_stub.remove_resource_policies request, options do |result, response|
1695
1670
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -1704,12 +1679,8 @@ module Google
1704
1679
  yield result, response if block_given?
1705
1680
  return result
1706
1681
  end
1707
- rescue ::Faraday::Error => e
1708
- begin
1709
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1710
- rescue ::Gapic::Rest::Error => gapic_error
1711
- raise ::Google::Cloud::Error.from_error gapic_error
1712
- end
1682
+ rescue ::Gapic::Rest::Error => e
1683
+ raise ::Google::Cloud::Error.from_error(e)
1713
1684
  end
1714
1685
 
1715
1686
  ##
@@ -1724,8 +1695,6 @@ module Google
1724
1695
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1725
1696
  # @param options [::Gapic::CallOptions, ::Hash]
1726
1697
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1727
- # Note: currently retry functionality is not implemented. While it is possible
1728
- # to set it using ::Gapic::CallOptions, it will not be applied
1729
1698
  #
1730
1699
  # @overload reset(instance: nil, project: nil, request_id: nil, zone: nil)
1731
1700
  # Pass arguments to `reset` via keyword arguments. Note that at
@@ -1758,17 +1727,21 @@ module Google
1758
1727
  # Customize the options with defaults
1759
1728
  call_metadata = @config.rpcs.reset.metadata.to_h
1760
1729
 
1761
- # Set x-goog-api-client header
1730
+ # Set x-goog-api-client and x-goog-user-project headers
1762
1731
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1763
1732
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1764
1733
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1765
1734
  transports_version_send: [:rest]
1766
1735
 
1736
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1737
+
1767
1738
  options.apply_defaults timeout: @config.rpcs.reset.timeout,
1768
- metadata: call_metadata
1739
+ metadata: call_metadata,
1740
+ retry_policy: @config.rpcs.reset.retry_policy
1769
1741
 
1770
1742
  options.apply_defaults timeout: @config.timeout,
1771
- metadata: @config.metadata
1743
+ metadata: @config.metadata,
1744
+ retry_policy: @config.retry_policy
1772
1745
 
1773
1746
  @instances_stub.reset request, options do |result, response|
1774
1747
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -1783,12 +1756,8 @@ module Google
1783
1756
  yield result, response if block_given?
1784
1757
  return result
1785
1758
  end
1786
- rescue ::Faraday::Error => e
1787
- begin
1788
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1789
- rescue ::Gapic::Rest::Error => gapic_error
1790
- raise ::Google::Cloud::Error.from_error gapic_error
1791
- end
1759
+ rescue ::Gapic::Rest::Error => e
1760
+ raise ::Google::Cloud::Error.from_error(e)
1792
1761
  end
1793
1762
 
1794
1763
  ##
@@ -1803,8 +1772,6 @@ module Google
1803
1772
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1804
1773
  # @param options [::Gapic::CallOptions, ::Hash]
1805
1774
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1806
- # Note: currently retry functionality is not implemented. While it is possible
1807
- # to set it using ::Gapic::CallOptions, it will not be applied
1808
1775
  #
1809
1776
  # @overload resume(instance: nil, project: nil, request_id: nil, zone: nil)
1810
1777
  # Pass arguments to `resume` via keyword arguments. Note that at
@@ -1837,17 +1804,21 @@ module Google
1837
1804
  # Customize the options with defaults
1838
1805
  call_metadata = @config.rpcs.resume.metadata.to_h
1839
1806
 
1840
- # Set x-goog-api-client header
1807
+ # Set x-goog-api-client and x-goog-user-project headers
1841
1808
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1842
1809
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1843
1810
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1844
1811
  transports_version_send: [:rest]
1845
1812
 
1813
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1814
+
1846
1815
  options.apply_defaults timeout: @config.rpcs.resume.timeout,
1847
- metadata: call_metadata
1816
+ metadata: call_metadata,
1817
+ retry_policy: @config.rpcs.resume.retry_policy
1848
1818
 
1849
1819
  options.apply_defaults timeout: @config.timeout,
1850
- metadata: @config.metadata
1820
+ metadata: @config.metadata,
1821
+ retry_policy: @config.retry_policy
1851
1822
 
1852
1823
  @instances_stub.resume request, options do |result, response|
1853
1824
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -1862,12 +1833,8 @@ module Google
1862
1833
  yield result, response if block_given?
1863
1834
  return result
1864
1835
  end
1865
- rescue ::Faraday::Error => e
1866
- begin
1867
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1868
- rescue ::Gapic::Rest::Error => gapic_error
1869
- raise ::Google::Cloud::Error.from_error gapic_error
1870
- end
1836
+ rescue ::Gapic::Rest::Error => e
1837
+ raise ::Google::Cloud::Error.from_error(e)
1871
1838
  end
1872
1839
 
1873
1840
  ##
@@ -1882,8 +1849,6 @@ module Google
1882
1849
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1883
1850
  # @param options [::Gapic::CallOptions, ::Hash]
1884
1851
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1885
- # Note: currently retry functionality is not implemented. While it is possible
1886
- # to set it using ::Gapic::CallOptions, it will not be applied
1887
1852
  #
1888
1853
  # @overload send_diagnostic_interrupt(instance: nil, project: nil, zone: nil)
1889
1854
  # Pass arguments to `send_diagnostic_interrupt` via keyword arguments. Note that at
@@ -1914,28 +1879,28 @@ module Google
1914
1879
  # Customize the options with defaults
1915
1880
  call_metadata = @config.rpcs.send_diagnostic_interrupt.metadata.to_h
1916
1881
 
1917
- # Set x-goog-api-client header
1882
+ # Set x-goog-api-client and x-goog-user-project headers
1918
1883
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1919
1884
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1920
1885
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1921
1886
  transports_version_send: [:rest]
1922
1887
 
1888
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1889
+
1923
1890
  options.apply_defaults timeout: @config.rpcs.send_diagnostic_interrupt.timeout,
1924
- metadata: call_metadata
1891
+ metadata: call_metadata,
1892
+ retry_policy: @config.rpcs.send_diagnostic_interrupt.retry_policy
1925
1893
 
1926
1894
  options.apply_defaults timeout: @config.timeout,
1927
- metadata: @config.metadata
1895
+ metadata: @config.metadata,
1896
+ retry_policy: @config.retry_policy
1928
1897
 
1929
1898
  @instances_stub.send_diagnostic_interrupt request, options do |result, response|
1930
1899
  yield result, response if block_given?
1931
1900
  return result
1932
1901
  end
1933
- rescue ::Faraday::Error => e
1934
- begin
1935
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1936
- rescue ::Gapic::Rest::Error => gapic_error
1937
- raise ::Google::Cloud::Error.from_error gapic_error
1938
- end
1902
+ rescue ::Gapic::Rest::Error => e
1903
+ raise ::Google::Cloud::Error.from_error(e)
1939
1904
  end
1940
1905
 
1941
1906
  ##
@@ -1950,8 +1915,6 @@ module Google
1950
1915
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1951
1916
  # @param options [::Gapic::CallOptions, ::Hash]
1952
1917
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1953
- # Note: currently retry functionality is not implemented. While it is possible
1954
- # to set it using ::Gapic::CallOptions, it will not be applied
1955
1918
  #
1956
1919
  # @overload set_deletion_protection(deletion_protection: nil, project: nil, request_id: nil, resource: nil, zone: nil)
1957
1920
  # Pass arguments to `set_deletion_protection` via keyword arguments. Note that at
@@ -1986,17 +1949,21 @@ module Google
1986
1949
  # Customize the options with defaults
1987
1950
  call_metadata = @config.rpcs.set_deletion_protection.metadata.to_h
1988
1951
 
1989
- # Set x-goog-api-client header
1952
+ # Set x-goog-api-client and x-goog-user-project headers
1990
1953
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1991
1954
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1992
1955
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1993
1956
  transports_version_send: [:rest]
1994
1957
 
1958
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1959
+
1995
1960
  options.apply_defaults timeout: @config.rpcs.set_deletion_protection.timeout,
1996
- metadata: call_metadata
1961
+ metadata: call_metadata,
1962
+ retry_policy: @config.rpcs.set_deletion_protection.retry_policy
1997
1963
 
1998
1964
  options.apply_defaults timeout: @config.timeout,
1999
- metadata: @config.metadata
1965
+ metadata: @config.metadata,
1966
+ retry_policy: @config.retry_policy
2000
1967
 
2001
1968
  @instances_stub.set_deletion_protection request, options do |result, response|
2002
1969
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2011,12 +1978,8 @@ module Google
2011
1978
  yield result, response if block_given?
2012
1979
  return result
2013
1980
  end
2014
- rescue ::Faraday::Error => e
2015
- begin
2016
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2017
- rescue ::Gapic::Rest::Error => gapic_error
2018
- raise ::Google::Cloud::Error.from_error gapic_error
2019
- end
1981
+ rescue ::Gapic::Rest::Error => e
1982
+ raise ::Google::Cloud::Error.from_error(e)
2020
1983
  end
2021
1984
 
2022
1985
  ##
@@ -2031,8 +1994,6 @@ module Google
2031
1994
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2032
1995
  # @param options [::Gapic::CallOptions, ::Hash]
2033
1996
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2034
- # Note: currently retry functionality is not implemented. While it is possible
2035
- # to set it using ::Gapic::CallOptions, it will not be applied
2036
1997
  #
2037
1998
  # @overload set_disk_auto_delete(auto_delete: nil, device_name: nil, instance: nil, project: nil, request_id: nil, zone: nil)
2038
1999
  # Pass arguments to `set_disk_auto_delete` via keyword arguments. Note that at
@@ -2069,17 +2030,21 @@ module Google
2069
2030
  # Customize the options with defaults
2070
2031
  call_metadata = @config.rpcs.set_disk_auto_delete.metadata.to_h
2071
2032
 
2072
- # Set x-goog-api-client header
2033
+ # Set x-goog-api-client and x-goog-user-project headers
2073
2034
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2074
2035
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2075
2036
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2076
2037
  transports_version_send: [:rest]
2077
2038
 
2039
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2040
+
2078
2041
  options.apply_defaults timeout: @config.rpcs.set_disk_auto_delete.timeout,
2079
- metadata: call_metadata
2042
+ metadata: call_metadata,
2043
+ retry_policy: @config.rpcs.set_disk_auto_delete.retry_policy
2080
2044
 
2081
2045
  options.apply_defaults timeout: @config.timeout,
2082
- metadata: @config.metadata
2046
+ metadata: @config.metadata,
2047
+ retry_policy: @config.retry_policy
2083
2048
 
2084
2049
  @instances_stub.set_disk_auto_delete request, options do |result, response|
2085
2050
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2094,12 +2059,8 @@ module Google
2094
2059
  yield result, response if block_given?
2095
2060
  return result
2096
2061
  end
2097
- rescue ::Faraday::Error => e
2098
- begin
2099
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2100
- rescue ::Gapic::Rest::Error => gapic_error
2101
- raise ::Google::Cloud::Error.from_error gapic_error
2102
- end
2062
+ rescue ::Gapic::Rest::Error => e
2063
+ raise ::Google::Cloud::Error.from_error(e)
2103
2064
  end
2104
2065
 
2105
2066
  ##
@@ -2114,8 +2075,6 @@ module Google
2114
2075
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2115
2076
  # @param options [::Gapic::CallOptions, ::Hash]
2116
2077
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2117
- # Note: currently retry functionality is not implemented. While it is possible
2118
- # to set it using ::Gapic::CallOptions, it will not be applied
2119
2078
  #
2120
2079
  # @overload set_iam_policy(project: nil, resource: nil, zone: nil, zone_set_policy_request_resource: nil)
2121
2080
  # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
@@ -2148,28 +2107,28 @@ module Google
2148
2107
  # Customize the options with defaults
2149
2108
  call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
2150
2109
 
2151
- # Set x-goog-api-client header
2110
+ # Set x-goog-api-client and x-goog-user-project headers
2152
2111
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2153
2112
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2154
2113
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2155
2114
  transports_version_send: [:rest]
2156
2115
 
2116
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2117
+
2157
2118
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
2158
- metadata: call_metadata
2119
+ metadata: call_metadata,
2120
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
2159
2121
 
2160
2122
  options.apply_defaults timeout: @config.timeout,
2161
- metadata: @config.metadata
2123
+ metadata: @config.metadata,
2124
+ retry_policy: @config.retry_policy
2162
2125
 
2163
2126
  @instances_stub.set_iam_policy request, options do |result, response|
2164
2127
  yield result, response if block_given?
2165
2128
  return result
2166
2129
  end
2167
- rescue ::Faraday::Error => e
2168
- begin
2169
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2170
- rescue ::Gapic::Rest::Error => gapic_error
2171
- raise ::Google::Cloud::Error.from_error gapic_error
2172
- end
2130
+ rescue ::Gapic::Rest::Error => e
2131
+ raise ::Google::Cloud::Error.from_error(e)
2173
2132
  end
2174
2133
 
2175
2134
  ##
@@ -2184,8 +2143,6 @@ module Google
2184
2143
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2185
2144
  # @param options [::Gapic::CallOptions, ::Hash]
2186
2145
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2187
- # Note: currently retry functionality is not implemented. While it is possible
2188
- # to set it using ::Gapic::CallOptions, it will not be applied
2189
2146
  #
2190
2147
  # @overload set_labels(instance: nil, instances_set_labels_request_resource: nil, project: nil, request_id: nil, zone: nil)
2191
2148
  # Pass arguments to `set_labels` via keyword arguments. Note that at
@@ -2220,17 +2177,21 @@ module Google
2220
2177
  # Customize the options with defaults
2221
2178
  call_metadata = @config.rpcs.set_labels.metadata.to_h
2222
2179
 
2223
- # Set x-goog-api-client header
2180
+ # Set x-goog-api-client and x-goog-user-project headers
2224
2181
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2225
2182
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2226
2183
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2227
2184
  transports_version_send: [:rest]
2228
2185
 
2186
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2187
+
2229
2188
  options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
2230
- metadata: call_metadata
2189
+ metadata: call_metadata,
2190
+ retry_policy: @config.rpcs.set_labels.retry_policy
2231
2191
 
2232
2192
  options.apply_defaults timeout: @config.timeout,
2233
- metadata: @config.metadata
2193
+ metadata: @config.metadata,
2194
+ retry_policy: @config.retry_policy
2234
2195
 
2235
2196
  @instances_stub.set_labels request, options do |result, response|
2236
2197
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2245,12 +2206,8 @@ module Google
2245
2206
  yield result, response if block_given?
2246
2207
  return result
2247
2208
  end
2248
- rescue ::Faraday::Error => e
2249
- begin
2250
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2251
- rescue ::Gapic::Rest::Error => gapic_error
2252
- raise ::Google::Cloud::Error.from_error gapic_error
2253
- end
2209
+ rescue ::Gapic::Rest::Error => e
2210
+ raise ::Google::Cloud::Error.from_error(e)
2254
2211
  end
2255
2212
 
2256
2213
  ##
@@ -2265,8 +2222,6 @@ module Google
2265
2222
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2266
2223
  # @param options [::Gapic::CallOptions, ::Hash]
2267
2224
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2268
- # Note: currently retry functionality is not implemented. While it is possible
2269
- # to set it using ::Gapic::CallOptions, it will not be applied
2270
2225
  #
2271
2226
  # @overload set_machine_resources(instance: nil, instances_set_machine_resources_request_resource: nil, project: nil, request_id: nil, zone: nil)
2272
2227
  # Pass arguments to `set_machine_resources` via keyword arguments. Note that at
@@ -2301,17 +2256,21 @@ module Google
2301
2256
  # Customize the options with defaults
2302
2257
  call_metadata = @config.rpcs.set_machine_resources.metadata.to_h
2303
2258
 
2304
- # Set x-goog-api-client header
2259
+ # Set x-goog-api-client and x-goog-user-project headers
2305
2260
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2306
2261
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2307
2262
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2308
2263
  transports_version_send: [:rest]
2309
2264
 
2265
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2266
+
2310
2267
  options.apply_defaults timeout: @config.rpcs.set_machine_resources.timeout,
2311
- metadata: call_metadata
2268
+ metadata: call_metadata,
2269
+ retry_policy: @config.rpcs.set_machine_resources.retry_policy
2312
2270
 
2313
2271
  options.apply_defaults timeout: @config.timeout,
2314
- metadata: @config.metadata
2272
+ metadata: @config.metadata,
2273
+ retry_policy: @config.retry_policy
2315
2274
 
2316
2275
  @instances_stub.set_machine_resources request, options do |result, response|
2317
2276
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2326,12 +2285,8 @@ module Google
2326
2285
  yield result, response if block_given?
2327
2286
  return result
2328
2287
  end
2329
- rescue ::Faraday::Error => e
2330
- begin
2331
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2332
- rescue ::Gapic::Rest::Error => gapic_error
2333
- raise ::Google::Cloud::Error.from_error gapic_error
2334
- end
2288
+ rescue ::Gapic::Rest::Error => e
2289
+ raise ::Google::Cloud::Error.from_error(e)
2335
2290
  end
2336
2291
 
2337
2292
  ##
@@ -2346,8 +2301,6 @@ module Google
2346
2301
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2347
2302
  # @param options [::Gapic::CallOptions, ::Hash]
2348
2303
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2349
- # Note: currently retry functionality is not implemented. While it is possible
2350
- # to set it using ::Gapic::CallOptions, it will not be applied
2351
2304
  #
2352
2305
  # @overload set_machine_type(instance: nil, instances_set_machine_type_request_resource: nil, project: nil, request_id: nil, zone: nil)
2353
2306
  # Pass arguments to `set_machine_type` via keyword arguments. Note that at
@@ -2382,17 +2335,21 @@ module Google
2382
2335
  # Customize the options with defaults
2383
2336
  call_metadata = @config.rpcs.set_machine_type.metadata.to_h
2384
2337
 
2385
- # Set x-goog-api-client header
2338
+ # Set x-goog-api-client and x-goog-user-project headers
2386
2339
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2387
2340
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2388
2341
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2389
2342
  transports_version_send: [:rest]
2390
2343
 
2344
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2345
+
2391
2346
  options.apply_defaults timeout: @config.rpcs.set_machine_type.timeout,
2392
- metadata: call_metadata
2347
+ metadata: call_metadata,
2348
+ retry_policy: @config.rpcs.set_machine_type.retry_policy
2393
2349
 
2394
2350
  options.apply_defaults timeout: @config.timeout,
2395
- metadata: @config.metadata
2351
+ metadata: @config.metadata,
2352
+ retry_policy: @config.retry_policy
2396
2353
 
2397
2354
  @instances_stub.set_machine_type request, options do |result, response|
2398
2355
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2407,12 +2364,8 @@ module Google
2407
2364
  yield result, response if block_given?
2408
2365
  return result
2409
2366
  end
2410
- rescue ::Faraday::Error => e
2411
- begin
2412
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2413
- rescue ::Gapic::Rest::Error => gapic_error
2414
- raise ::Google::Cloud::Error.from_error gapic_error
2415
- end
2367
+ rescue ::Gapic::Rest::Error => e
2368
+ raise ::Google::Cloud::Error.from_error(e)
2416
2369
  end
2417
2370
 
2418
2371
  ##
@@ -2427,8 +2380,6 @@ module Google
2427
2380
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2428
2381
  # @param options [::Gapic::CallOptions, ::Hash]
2429
2382
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2430
- # Note: currently retry functionality is not implemented. While it is possible
2431
- # to set it using ::Gapic::CallOptions, it will not be applied
2432
2383
  #
2433
2384
  # @overload set_metadata(instance: nil, metadata_resource: nil, project: nil, request_id: nil, zone: nil)
2434
2385
  # Pass arguments to `set_metadata` via keyword arguments. Note that at
@@ -2463,17 +2414,21 @@ module Google
2463
2414
  # Customize the options with defaults
2464
2415
  call_metadata = @config.rpcs.set_metadata.metadata.to_h
2465
2416
 
2466
- # Set x-goog-api-client header
2417
+ # Set x-goog-api-client and x-goog-user-project headers
2467
2418
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2468
2419
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2469
2420
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2470
2421
  transports_version_send: [:rest]
2471
2422
 
2423
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2424
+
2472
2425
  options.apply_defaults timeout: @config.rpcs.set_metadata.timeout,
2473
- metadata: call_metadata
2426
+ metadata: call_metadata,
2427
+ retry_policy: @config.rpcs.set_metadata.retry_policy
2474
2428
 
2475
2429
  options.apply_defaults timeout: @config.timeout,
2476
- metadata: @config.metadata
2430
+ metadata: @config.metadata,
2431
+ retry_policy: @config.retry_policy
2477
2432
 
2478
2433
  @instances_stub.set_metadata request, options do |result, response|
2479
2434
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2488,12 +2443,8 @@ module Google
2488
2443
  yield result, response if block_given?
2489
2444
  return result
2490
2445
  end
2491
- rescue ::Faraday::Error => e
2492
- begin
2493
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2494
- rescue ::Gapic::Rest::Error => gapic_error
2495
- raise ::Google::Cloud::Error.from_error gapic_error
2496
- end
2446
+ rescue ::Gapic::Rest::Error => e
2447
+ raise ::Google::Cloud::Error.from_error(e)
2497
2448
  end
2498
2449
 
2499
2450
  ##
@@ -2508,8 +2459,6 @@ module Google
2508
2459
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2509
2460
  # @param options [::Gapic::CallOptions, ::Hash]
2510
2461
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2511
- # Note: currently retry functionality is not implemented. While it is possible
2512
- # to set it using ::Gapic::CallOptions, it will not be applied
2513
2462
  #
2514
2463
  # @overload set_min_cpu_platform(instance: nil, instances_set_min_cpu_platform_request_resource: nil, project: nil, request_id: nil, zone: nil)
2515
2464
  # Pass arguments to `set_min_cpu_platform` via keyword arguments. Note that at
@@ -2544,17 +2493,21 @@ module Google
2544
2493
  # Customize the options with defaults
2545
2494
  call_metadata = @config.rpcs.set_min_cpu_platform.metadata.to_h
2546
2495
 
2547
- # Set x-goog-api-client header
2496
+ # Set x-goog-api-client and x-goog-user-project headers
2548
2497
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2549
2498
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2550
2499
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2551
2500
  transports_version_send: [:rest]
2552
2501
 
2502
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2503
+
2553
2504
  options.apply_defaults timeout: @config.rpcs.set_min_cpu_platform.timeout,
2554
- metadata: call_metadata
2505
+ metadata: call_metadata,
2506
+ retry_policy: @config.rpcs.set_min_cpu_platform.retry_policy
2555
2507
 
2556
2508
  options.apply_defaults timeout: @config.timeout,
2557
- metadata: @config.metadata
2509
+ metadata: @config.metadata,
2510
+ retry_policy: @config.retry_policy
2558
2511
 
2559
2512
  @instances_stub.set_min_cpu_platform request, options do |result, response|
2560
2513
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2569,12 +2522,8 @@ module Google
2569
2522
  yield result, response if block_given?
2570
2523
  return result
2571
2524
  end
2572
- rescue ::Faraday::Error => e
2573
- begin
2574
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2575
- rescue ::Gapic::Rest::Error => gapic_error
2576
- raise ::Google::Cloud::Error.from_error gapic_error
2577
- end
2525
+ rescue ::Gapic::Rest::Error => e
2526
+ raise ::Google::Cloud::Error.from_error(e)
2578
2527
  end
2579
2528
 
2580
2529
  ##
@@ -2589,8 +2538,6 @@ module Google
2589
2538
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2590
2539
  # @param options [::Gapic::CallOptions, ::Hash]
2591
2540
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2592
- # Note: currently retry functionality is not implemented. While it is possible
2593
- # to set it using ::Gapic::CallOptions, it will not be applied
2594
2541
  #
2595
2542
  # @overload set_scheduling(instance: nil, project: nil, request_id: nil, scheduling_resource: nil, zone: nil)
2596
2543
  # Pass arguments to `set_scheduling` via keyword arguments. Note that at
@@ -2625,17 +2572,21 @@ module Google
2625
2572
  # Customize the options with defaults
2626
2573
  call_metadata = @config.rpcs.set_scheduling.metadata.to_h
2627
2574
 
2628
- # Set x-goog-api-client header
2575
+ # Set x-goog-api-client and x-goog-user-project headers
2629
2576
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2630
2577
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2631
2578
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2632
2579
  transports_version_send: [:rest]
2633
2580
 
2581
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2582
+
2634
2583
  options.apply_defaults timeout: @config.rpcs.set_scheduling.timeout,
2635
- metadata: call_metadata
2584
+ metadata: call_metadata,
2585
+ retry_policy: @config.rpcs.set_scheduling.retry_policy
2636
2586
 
2637
2587
  options.apply_defaults timeout: @config.timeout,
2638
- metadata: @config.metadata
2588
+ metadata: @config.metadata,
2589
+ retry_policy: @config.retry_policy
2639
2590
 
2640
2591
  @instances_stub.set_scheduling request, options do |result, response|
2641
2592
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2650,12 +2601,8 @@ module Google
2650
2601
  yield result, response if block_given?
2651
2602
  return result
2652
2603
  end
2653
- rescue ::Faraday::Error => e
2654
- begin
2655
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2656
- rescue ::Gapic::Rest::Error => gapic_error
2657
- raise ::Google::Cloud::Error.from_error gapic_error
2658
- end
2604
+ rescue ::Gapic::Rest::Error => e
2605
+ raise ::Google::Cloud::Error.from_error(e)
2659
2606
  end
2660
2607
 
2661
2608
  ##
@@ -2670,8 +2617,6 @@ module Google
2670
2617
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2671
2618
  # @param options [::Gapic::CallOptions, ::Hash]
2672
2619
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2673
- # Note: currently retry functionality is not implemented. While it is possible
2674
- # to set it using ::Gapic::CallOptions, it will not be applied
2675
2620
  #
2676
2621
  # @overload set_service_account(instance: nil, instances_set_service_account_request_resource: nil, project: nil, request_id: nil, zone: nil)
2677
2622
  # Pass arguments to `set_service_account` via keyword arguments. Note that at
@@ -2706,17 +2651,21 @@ module Google
2706
2651
  # Customize the options with defaults
2707
2652
  call_metadata = @config.rpcs.set_service_account.metadata.to_h
2708
2653
 
2709
- # Set x-goog-api-client header
2654
+ # Set x-goog-api-client and x-goog-user-project headers
2710
2655
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2711
2656
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2712
2657
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2713
2658
  transports_version_send: [:rest]
2714
2659
 
2660
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2661
+
2715
2662
  options.apply_defaults timeout: @config.rpcs.set_service_account.timeout,
2716
- metadata: call_metadata
2663
+ metadata: call_metadata,
2664
+ retry_policy: @config.rpcs.set_service_account.retry_policy
2717
2665
 
2718
2666
  options.apply_defaults timeout: @config.timeout,
2719
- metadata: @config.metadata
2667
+ metadata: @config.metadata,
2668
+ retry_policy: @config.retry_policy
2720
2669
 
2721
2670
  @instances_stub.set_service_account request, options do |result, response|
2722
2671
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2731,12 +2680,8 @@ module Google
2731
2680
  yield result, response if block_given?
2732
2681
  return result
2733
2682
  end
2734
- rescue ::Faraday::Error => e
2735
- begin
2736
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2737
- rescue ::Gapic::Rest::Error => gapic_error
2738
- raise ::Google::Cloud::Error.from_error gapic_error
2739
- end
2683
+ rescue ::Gapic::Rest::Error => e
2684
+ raise ::Google::Cloud::Error.from_error(e)
2740
2685
  end
2741
2686
 
2742
2687
  ##
@@ -2751,8 +2696,6 @@ module Google
2751
2696
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2752
2697
  # @param options [::Gapic::CallOptions, ::Hash]
2753
2698
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2754
- # Note: currently retry functionality is not implemented. While it is possible
2755
- # to set it using ::Gapic::CallOptions, it will not be applied
2756
2699
  #
2757
2700
  # @overload set_shielded_instance_integrity_policy(instance: nil, project: nil, request_id: nil, shielded_instance_integrity_policy_resource: nil, zone: nil)
2758
2701
  # Pass arguments to `set_shielded_instance_integrity_policy` via keyword arguments. Note that at
@@ -2787,17 +2730,21 @@ module Google
2787
2730
  # Customize the options with defaults
2788
2731
  call_metadata = @config.rpcs.set_shielded_instance_integrity_policy.metadata.to_h
2789
2732
 
2790
- # Set x-goog-api-client header
2733
+ # Set x-goog-api-client and x-goog-user-project headers
2791
2734
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2792
2735
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2793
2736
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2794
2737
  transports_version_send: [:rest]
2795
2738
 
2739
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2740
+
2796
2741
  options.apply_defaults timeout: @config.rpcs.set_shielded_instance_integrity_policy.timeout,
2797
- metadata: call_metadata
2742
+ metadata: call_metadata,
2743
+ retry_policy: @config.rpcs.set_shielded_instance_integrity_policy.retry_policy
2798
2744
 
2799
2745
  options.apply_defaults timeout: @config.timeout,
2800
- metadata: @config.metadata
2746
+ metadata: @config.metadata,
2747
+ retry_policy: @config.retry_policy
2801
2748
 
2802
2749
  @instances_stub.set_shielded_instance_integrity_policy request, options do |result, response|
2803
2750
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2812,12 +2759,8 @@ module Google
2812
2759
  yield result, response if block_given?
2813
2760
  return result
2814
2761
  end
2815
- rescue ::Faraday::Error => e
2816
- begin
2817
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2818
- rescue ::Gapic::Rest::Error => gapic_error
2819
- raise ::Google::Cloud::Error.from_error gapic_error
2820
- end
2762
+ rescue ::Gapic::Rest::Error => e
2763
+ raise ::Google::Cloud::Error.from_error(e)
2821
2764
  end
2822
2765
 
2823
2766
  ##
@@ -2832,8 +2775,6 @@ module Google
2832
2775
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2833
2776
  # @param options [::Gapic::CallOptions, ::Hash]
2834
2777
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2835
- # Note: currently retry functionality is not implemented. While it is possible
2836
- # to set it using ::Gapic::CallOptions, it will not be applied
2837
2778
  #
2838
2779
  # @overload set_tags(instance: nil, project: nil, request_id: nil, tags_resource: nil, zone: nil)
2839
2780
  # Pass arguments to `set_tags` via keyword arguments. Note that at
@@ -2868,17 +2809,21 @@ module Google
2868
2809
  # Customize the options with defaults
2869
2810
  call_metadata = @config.rpcs.set_tags.metadata.to_h
2870
2811
 
2871
- # Set x-goog-api-client header
2812
+ # Set x-goog-api-client and x-goog-user-project headers
2872
2813
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2873
2814
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2874
2815
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2875
2816
  transports_version_send: [:rest]
2876
2817
 
2818
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2819
+
2877
2820
  options.apply_defaults timeout: @config.rpcs.set_tags.timeout,
2878
- metadata: call_metadata
2821
+ metadata: call_metadata,
2822
+ retry_policy: @config.rpcs.set_tags.retry_policy
2879
2823
 
2880
2824
  options.apply_defaults timeout: @config.timeout,
2881
- metadata: @config.metadata
2825
+ metadata: @config.metadata,
2826
+ retry_policy: @config.retry_policy
2882
2827
 
2883
2828
  @instances_stub.set_tags request, options do |result, response|
2884
2829
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2893,12 +2838,8 @@ module Google
2893
2838
  yield result, response if block_given?
2894
2839
  return result
2895
2840
  end
2896
- rescue ::Faraday::Error => e
2897
- begin
2898
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2899
- rescue ::Gapic::Rest::Error => gapic_error
2900
- raise ::Google::Cloud::Error.from_error gapic_error
2901
- end
2841
+ rescue ::Gapic::Rest::Error => e
2842
+ raise ::Google::Cloud::Error.from_error(e)
2902
2843
  end
2903
2844
 
2904
2845
  ##
@@ -2913,8 +2854,6 @@ module Google
2913
2854
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2914
2855
  # @param options [::Gapic::CallOptions, ::Hash]
2915
2856
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2916
- # Note: currently retry functionality is not implemented. While it is possible
2917
- # to set it using ::Gapic::CallOptions, it will not be applied
2918
2857
  #
2919
2858
  # @overload simulate_maintenance_event(instance: nil, project: nil, zone: nil)
2920
2859
  # Pass arguments to `simulate_maintenance_event` via keyword arguments. Note that at
@@ -2945,17 +2884,21 @@ module Google
2945
2884
  # Customize the options with defaults
2946
2885
  call_metadata = @config.rpcs.simulate_maintenance_event.metadata.to_h
2947
2886
 
2948
- # Set x-goog-api-client header
2887
+ # Set x-goog-api-client and x-goog-user-project headers
2949
2888
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2950
2889
  lib_name: @config.lib_name, lib_version: @config.lib_version,
2951
2890
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2952
2891
  transports_version_send: [:rest]
2953
2892
 
2893
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2894
+
2954
2895
  options.apply_defaults timeout: @config.rpcs.simulate_maintenance_event.timeout,
2955
- metadata: call_metadata
2896
+ metadata: call_metadata,
2897
+ retry_policy: @config.rpcs.simulate_maintenance_event.retry_policy
2956
2898
 
2957
2899
  options.apply_defaults timeout: @config.timeout,
2958
- metadata: @config.metadata
2900
+ metadata: @config.metadata,
2901
+ retry_policy: @config.retry_policy
2959
2902
 
2960
2903
  @instances_stub.simulate_maintenance_event request, options do |result, response|
2961
2904
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -2970,12 +2913,8 @@ module Google
2970
2913
  yield result, response if block_given?
2971
2914
  return result
2972
2915
  end
2973
- rescue ::Faraday::Error => e
2974
- begin
2975
- raise ::Gapic::Rest::Error.wrap_faraday_error e
2976
- rescue ::Gapic::Rest::Error => gapic_error
2977
- raise ::Google::Cloud::Error.from_error gapic_error
2978
- end
2916
+ rescue ::Gapic::Rest::Error => e
2917
+ raise ::Google::Cloud::Error.from_error(e)
2979
2918
  end
2980
2919
 
2981
2920
  ##
@@ -2990,8 +2929,6 @@ module Google
2990
2929
  # parameters, or to keep all the default parameter values, pass an empty Hash.
2991
2930
  # @param options [::Gapic::CallOptions, ::Hash]
2992
2931
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2993
- # Note: currently retry functionality is not implemented. While it is possible
2994
- # to set it using ::Gapic::CallOptions, it will not be applied
2995
2932
  #
2996
2933
  # @overload start(instance: nil, project: nil, request_id: nil, zone: nil)
2997
2934
  # Pass arguments to `start` via keyword arguments. Note that at
@@ -3024,17 +2961,21 @@ module Google
3024
2961
  # Customize the options with defaults
3025
2962
  call_metadata = @config.rpcs.start.metadata.to_h
3026
2963
 
3027
- # Set x-goog-api-client header
2964
+ # Set x-goog-api-client and x-goog-user-project headers
3028
2965
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3029
2966
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3030
2967
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3031
2968
  transports_version_send: [:rest]
3032
2969
 
2970
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2971
+
3033
2972
  options.apply_defaults timeout: @config.rpcs.start.timeout,
3034
- metadata: call_metadata
2973
+ metadata: call_metadata,
2974
+ retry_policy: @config.rpcs.start.retry_policy
3035
2975
 
3036
2976
  options.apply_defaults timeout: @config.timeout,
3037
- metadata: @config.metadata
2977
+ metadata: @config.metadata,
2978
+ retry_policy: @config.retry_policy
3038
2979
 
3039
2980
  @instances_stub.start request, options do |result, response|
3040
2981
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3049,12 +2990,8 @@ module Google
3049
2990
  yield result, response if block_given?
3050
2991
  return result
3051
2992
  end
3052
- rescue ::Faraday::Error => e
3053
- begin
3054
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3055
- rescue ::Gapic::Rest::Error => gapic_error
3056
- raise ::Google::Cloud::Error.from_error gapic_error
3057
- end
2993
+ rescue ::Gapic::Rest::Error => e
2994
+ raise ::Google::Cloud::Error.from_error(e)
3058
2995
  end
3059
2996
 
3060
2997
  ##
@@ -3069,8 +3006,6 @@ module Google
3069
3006
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3070
3007
  # @param options [::Gapic::CallOptions, ::Hash]
3071
3008
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3072
- # Note: currently retry functionality is not implemented. While it is possible
3073
- # to set it using ::Gapic::CallOptions, it will not be applied
3074
3009
  #
3075
3010
  # @overload start_with_encryption_key(instance: nil, instances_start_with_encryption_key_request_resource: nil, project: nil, request_id: nil, zone: nil)
3076
3011
  # Pass arguments to `start_with_encryption_key` via keyword arguments. Note that at
@@ -3105,17 +3040,21 @@ module Google
3105
3040
  # Customize the options with defaults
3106
3041
  call_metadata = @config.rpcs.start_with_encryption_key.metadata.to_h
3107
3042
 
3108
- # Set x-goog-api-client header
3043
+ # Set x-goog-api-client and x-goog-user-project headers
3109
3044
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3110
3045
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3111
3046
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3112
3047
  transports_version_send: [:rest]
3113
3048
 
3049
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3050
+
3114
3051
  options.apply_defaults timeout: @config.rpcs.start_with_encryption_key.timeout,
3115
- metadata: call_metadata
3052
+ metadata: call_metadata,
3053
+ retry_policy: @config.rpcs.start_with_encryption_key.retry_policy
3116
3054
 
3117
3055
  options.apply_defaults timeout: @config.timeout,
3118
- metadata: @config.metadata
3056
+ metadata: @config.metadata,
3057
+ retry_policy: @config.retry_policy
3119
3058
 
3120
3059
  @instances_stub.start_with_encryption_key request, options do |result, response|
3121
3060
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3130,12 +3069,8 @@ module Google
3130
3069
  yield result, response if block_given?
3131
3070
  return result
3132
3071
  end
3133
- rescue ::Faraday::Error => e
3134
- begin
3135
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3136
- rescue ::Gapic::Rest::Error => gapic_error
3137
- raise ::Google::Cloud::Error.from_error gapic_error
3138
- end
3072
+ rescue ::Gapic::Rest::Error => e
3073
+ raise ::Google::Cloud::Error.from_error(e)
3139
3074
  end
3140
3075
 
3141
3076
  ##
@@ -3150,14 +3085,14 @@ module Google
3150
3085
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3151
3086
  # @param options [::Gapic::CallOptions, ::Hash]
3152
3087
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3153
- # Note: currently retry functionality is not implemented. While it is possible
3154
- # to set it using ::Gapic::CallOptions, it will not be applied
3155
3088
  #
3156
- # @overload stop(instance: nil, project: nil, request_id: nil, zone: nil)
3089
+ # @overload stop(discard_local_ssd: nil, instance: nil, project: nil, request_id: nil, zone: nil)
3157
3090
  # Pass arguments to `stop` via keyword arguments. Note that at
3158
3091
  # least one keyword argument is required. To specify no parameters, or to keep all
3159
3092
  # the default parameter values, pass an empty Hash as a request object (see above).
3160
3093
  #
3094
+ # @param discard_local_ssd [::Boolean]
3095
+ # If true, discard the contents of any attached localSSD partitions. Default value is false.
3161
3096
  # @param instance [::String]
3162
3097
  # Name of the instance resource to stop.
3163
3098
  # @param project [::String]
@@ -3184,17 +3119,21 @@ module Google
3184
3119
  # Customize the options with defaults
3185
3120
  call_metadata = @config.rpcs.stop.metadata.to_h
3186
3121
 
3187
- # Set x-goog-api-client header
3122
+ # Set x-goog-api-client and x-goog-user-project headers
3188
3123
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3189
3124
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3190
3125
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3191
3126
  transports_version_send: [:rest]
3192
3127
 
3128
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3129
+
3193
3130
  options.apply_defaults timeout: @config.rpcs.stop.timeout,
3194
- metadata: call_metadata
3131
+ metadata: call_metadata,
3132
+ retry_policy: @config.rpcs.stop.retry_policy
3195
3133
 
3196
3134
  options.apply_defaults timeout: @config.timeout,
3197
- metadata: @config.metadata
3135
+ metadata: @config.metadata,
3136
+ retry_policy: @config.retry_policy
3198
3137
 
3199
3138
  @instances_stub.stop request, options do |result, response|
3200
3139
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3209,12 +3148,8 @@ module Google
3209
3148
  yield result, response if block_given?
3210
3149
  return result
3211
3150
  end
3212
- rescue ::Faraday::Error => e
3213
- begin
3214
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3215
- rescue ::Gapic::Rest::Error => gapic_error
3216
- raise ::Google::Cloud::Error.from_error gapic_error
3217
- end
3151
+ rescue ::Gapic::Rest::Error => e
3152
+ raise ::Google::Cloud::Error.from_error(e)
3218
3153
  end
3219
3154
 
3220
3155
  ##
@@ -3229,14 +3164,14 @@ module Google
3229
3164
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3230
3165
  # @param options [::Gapic::CallOptions, ::Hash]
3231
3166
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3232
- # Note: currently retry functionality is not implemented. While it is possible
3233
- # to set it using ::Gapic::CallOptions, it will not be applied
3234
3167
  #
3235
- # @overload suspend(instance: nil, project: nil, request_id: nil, zone: nil)
3168
+ # @overload suspend(discard_local_ssd: nil, instance: nil, project: nil, request_id: nil, zone: nil)
3236
3169
  # Pass arguments to `suspend` via keyword arguments. Note that at
3237
3170
  # least one keyword argument is required. To specify no parameters, or to keep all
3238
3171
  # the default parameter values, pass an empty Hash as a request object (see above).
3239
3172
  #
3173
+ # @param discard_local_ssd [::Boolean]
3174
+ # If true, discard the contents of any attached localSSD partitions. Default value is false.
3240
3175
  # @param instance [::String]
3241
3176
  # Name of the instance resource to suspend.
3242
3177
  # @param project [::String]
@@ -3263,17 +3198,21 @@ module Google
3263
3198
  # Customize the options with defaults
3264
3199
  call_metadata = @config.rpcs.suspend.metadata.to_h
3265
3200
 
3266
- # Set x-goog-api-client header
3201
+ # Set x-goog-api-client and x-goog-user-project headers
3267
3202
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3268
3203
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3269
3204
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3270
3205
  transports_version_send: [:rest]
3271
3206
 
3207
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3208
+
3272
3209
  options.apply_defaults timeout: @config.rpcs.suspend.timeout,
3273
- metadata: call_metadata
3210
+ metadata: call_metadata,
3211
+ retry_policy: @config.rpcs.suspend.retry_policy
3274
3212
 
3275
3213
  options.apply_defaults timeout: @config.timeout,
3276
- metadata: @config.metadata
3214
+ metadata: @config.metadata,
3215
+ retry_policy: @config.retry_policy
3277
3216
 
3278
3217
  @instances_stub.suspend request, options do |result, response|
3279
3218
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3288,12 +3227,8 @@ module Google
3288
3227
  yield result, response if block_given?
3289
3228
  return result
3290
3229
  end
3291
- rescue ::Faraday::Error => e
3292
- begin
3293
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3294
- rescue ::Gapic::Rest::Error => gapic_error
3295
- raise ::Google::Cloud::Error.from_error gapic_error
3296
- end
3230
+ rescue ::Gapic::Rest::Error => e
3231
+ raise ::Google::Cloud::Error.from_error(e)
3297
3232
  end
3298
3233
 
3299
3234
  ##
@@ -3308,8 +3243,6 @@ module Google
3308
3243
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3309
3244
  # @param options [::Gapic::CallOptions, ::Hash]
3310
3245
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3311
- # Note: currently retry functionality is not implemented. While it is possible
3312
- # to set it using ::Gapic::CallOptions, it will not be applied
3313
3246
  #
3314
3247
  # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil, zone: nil)
3315
3248
  # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
@@ -3342,28 +3275,28 @@ module Google
3342
3275
  # Customize the options with defaults
3343
3276
  call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
3344
3277
 
3345
- # Set x-goog-api-client header
3278
+ # Set x-goog-api-client and x-goog-user-project headers
3346
3279
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3347
3280
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3348
3281
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3349
3282
  transports_version_send: [:rest]
3350
3283
 
3284
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3285
+
3351
3286
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
3352
- metadata: call_metadata
3287
+ metadata: call_metadata,
3288
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
3353
3289
 
3354
3290
  options.apply_defaults timeout: @config.timeout,
3355
- metadata: @config.metadata
3291
+ metadata: @config.metadata,
3292
+ retry_policy: @config.retry_policy
3356
3293
 
3357
3294
  @instances_stub.test_iam_permissions request, options do |result, response|
3358
3295
  yield result, response if block_given?
3359
3296
  return result
3360
3297
  end
3361
- rescue ::Faraday::Error => e
3362
- begin
3363
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3364
- rescue ::Gapic::Rest::Error => gapic_error
3365
- raise ::Google::Cloud::Error.from_error gapic_error
3366
- end
3298
+ rescue ::Gapic::Rest::Error => e
3299
+ raise ::Google::Cloud::Error.from_error(e)
3367
3300
  end
3368
3301
 
3369
3302
  ##
@@ -3378,8 +3311,6 @@ module Google
3378
3311
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3379
3312
  # @param options [::Gapic::CallOptions, ::Hash]
3380
3313
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3381
- # Note: currently retry functionality is not implemented. While it is possible
3382
- # to set it using ::Gapic::CallOptions, it will not be applied
3383
3314
  #
3384
3315
  # @overload update(instance: nil, instance_resource: nil, minimal_action: nil, most_disruptive_allowed_action: nil, project: nil, request_id: nil, zone: nil)
3385
3316
  # Pass arguments to `update` via keyword arguments. Note that at
@@ -3420,17 +3351,21 @@ module Google
3420
3351
  # Customize the options with defaults
3421
3352
  call_metadata = @config.rpcs.update.metadata.to_h
3422
3353
 
3423
- # Set x-goog-api-client header
3354
+ # Set x-goog-api-client and x-goog-user-project headers
3424
3355
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3425
3356
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3426
3357
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3427
3358
  transports_version_send: [:rest]
3428
3359
 
3360
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3361
+
3429
3362
  options.apply_defaults timeout: @config.rpcs.update.timeout,
3430
- metadata: call_metadata
3363
+ metadata: call_metadata,
3364
+ retry_policy: @config.rpcs.update.retry_policy
3431
3365
 
3432
3366
  options.apply_defaults timeout: @config.timeout,
3433
- metadata: @config.metadata
3367
+ metadata: @config.metadata,
3368
+ retry_policy: @config.retry_policy
3434
3369
 
3435
3370
  @instances_stub.update request, options do |result, response|
3436
3371
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3445,12 +3380,8 @@ module Google
3445
3380
  yield result, response if block_given?
3446
3381
  return result
3447
3382
  end
3448
- rescue ::Faraday::Error => e
3449
- begin
3450
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3451
- rescue ::Gapic::Rest::Error => gapic_error
3452
- raise ::Google::Cloud::Error.from_error gapic_error
3453
- end
3383
+ rescue ::Gapic::Rest::Error => e
3384
+ raise ::Google::Cloud::Error.from_error(e)
3454
3385
  end
3455
3386
 
3456
3387
  ##
@@ -3465,8 +3396,6 @@ module Google
3465
3396
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3466
3397
  # @param options [::Gapic::CallOptions, ::Hash]
3467
3398
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3468
- # Note: currently retry functionality is not implemented. While it is possible
3469
- # to set it using ::Gapic::CallOptions, it will not be applied
3470
3399
  #
3471
3400
  # @overload update_access_config(access_config_resource: nil, instance: nil, network_interface: nil, project: nil, request_id: nil, zone: nil)
3472
3401
  # Pass arguments to `update_access_config` via keyword arguments. Note that at
@@ -3503,17 +3432,21 @@ module Google
3503
3432
  # Customize the options with defaults
3504
3433
  call_metadata = @config.rpcs.update_access_config.metadata.to_h
3505
3434
 
3506
- # Set x-goog-api-client header
3435
+ # Set x-goog-api-client and x-goog-user-project headers
3507
3436
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3508
3437
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3509
3438
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3510
3439
  transports_version_send: [:rest]
3511
3440
 
3441
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3442
+
3512
3443
  options.apply_defaults timeout: @config.rpcs.update_access_config.timeout,
3513
- metadata: call_metadata
3444
+ metadata: call_metadata,
3445
+ retry_policy: @config.rpcs.update_access_config.retry_policy
3514
3446
 
3515
3447
  options.apply_defaults timeout: @config.timeout,
3516
- metadata: @config.metadata
3448
+ metadata: @config.metadata,
3449
+ retry_policy: @config.retry_policy
3517
3450
 
3518
3451
  @instances_stub.update_access_config request, options do |result, response|
3519
3452
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3528,12 +3461,8 @@ module Google
3528
3461
  yield result, response if block_given?
3529
3462
  return result
3530
3463
  end
3531
- rescue ::Faraday::Error => e
3532
- begin
3533
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3534
- rescue ::Gapic::Rest::Error => gapic_error
3535
- raise ::Google::Cloud::Error.from_error gapic_error
3536
- end
3464
+ rescue ::Gapic::Rest::Error => e
3465
+ raise ::Google::Cloud::Error.from_error(e)
3537
3466
  end
3538
3467
 
3539
3468
  ##
@@ -3548,8 +3477,6 @@ module Google
3548
3477
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3549
3478
  # @param options [::Gapic::CallOptions, ::Hash]
3550
3479
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3551
- # Note: currently retry functionality is not implemented. While it is possible
3552
- # to set it using ::Gapic::CallOptions, it will not be applied
3553
3480
  #
3554
3481
  # @overload update_display_device(display_device_resource: nil, instance: nil, project: nil, request_id: nil, zone: nil)
3555
3482
  # Pass arguments to `update_display_device` via keyword arguments. Note that at
@@ -3584,17 +3511,21 @@ module Google
3584
3511
  # Customize the options with defaults
3585
3512
  call_metadata = @config.rpcs.update_display_device.metadata.to_h
3586
3513
 
3587
- # Set x-goog-api-client header
3514
+ # Set x-goog-api-client and x-goog-user-project headers
3588
3515
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3589
3516
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3590
3517
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3591
3518
  transports_version_send: [:rest]
3592
3519
 
3520
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3521
+
3593
3522
  options.apply_defaults timeout: @config.rpcs.update_display_device.timeout,
3594
- metadata: call_metadata
3523
+ metadata: call_metadata,
3524
+ retry_policy: @config.rpcs.update_display_device.retry_policy
3595
3525
 
3596
3526
  options.apply_defaults timeout: @config.timeout,
3597
- metadata: @config.metadata
3527
+ metadata: @config.metadata,
3528
+ retry_policy: @config.retry_policy
3598
3529
 
3599
3530
  @instances_stub.update_display_device request, options do |result, response|
3600
3531
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3609,12 +3540,8 @@ module Google
3609
3540
  yield result, response if block_given?
3610
3541
  return result
3611
3542
  end
3612
- rescue ::Faraday::Error => e
3613
- begin
3614
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3615
- rescue ::Gapic::Rest::Error => gapic_error
3616
- raise ::Google::Cloud::Error.from_error gapic_error
3617
- end
3543
+ rescue ::Gapic::Rest::Error => e
3544
+ raise ::Google::Cloud::Error.from_error(e)
3618
3545
  end
3619
3546
 
3620
3547
  ##
@@ -3629,8 +3556,6 @@ module Google
3629
3556
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3630
3557
  # @param options [::Gapic::CallOptions, ::Hash]
3631
3558
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3632
- # Note: currently retry functionality is not implemented. While it is possible
3633
- # to set it using ::Gapic::CallOptions, it will not be applied
3634
3559
  #
3635
3560
  # @overload update_network_interface(instance: nil, network_interface: nil, network_interface_resource: nil, project: nil, request_id: nil, zone: nil)
3636
3561
  # Pass arguments to `update_network_interface` via keyword arguments. Note that at
@@ -3667,17 +3592,21 @@ module Google
3667
3592
  # Customize the options with defaults
3668
3593
  call_metadata = @config.rpcs.update_network_interface.metadata.to_h
3669
3594
 
3670
- # Set x-goog-api-client header
3595
+ # Set x-goog-api-client and x-goog-user-project headers
3671
3596
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3672
3597
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3673
3598
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3674
3599
  transports_version_send: [:rest]
3675
3600
 
3601
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3602
+
3676
3603
  options.apply_defaults timeout: @config.rpcs.update_network_interface.timeout,
3677
- metadata: call_metadata
3604
+ metadata: call_metadata,
3605
+ retry_policy: @config.rpcs.update_network_interface.retry_policy
3678
3606
 
3679
3607
  options.apply_defaults timeout: @config.timeout,
3680
- metadata: @config.metadata
3608
+ metadata: @config.metadata,
3609
+ retry_policy: @config.retry_policy
3681
3610
 
3682
3611
  @instances_stub.update_network_interface request, options do |result, response|
3683
3612
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3692,12 +3621,8 @@ module Google
3692
3621
  yield result, response if block_given?
3693
3622
  return result
3694
3623
  end
3695
- rescue ::Faraday::Error => e
3696
- begin
3697
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3698
- rescue ::Gapic::Rest::Error => gapic_error
3699
- raise ::Google::Cloud::Error.from_error gapic_error
3700
- end
3624
+ rescue ::Gapic::Rest::Error => e
3625
+ raise ::Google::Cloud::Error.from_error(e)
3701
3626
  end
3702
3627
 
3703
3628
  ##
@@ -3712,8 +3637,6 @@ module Google
3712
3637
  # parameters, or to keep all the default parameter values, pass an empty Hash.
3713
3638
  # @param options [::Gapic::CallOptions, ::Hash]
3714
3639
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3715
- # Note: currently retry functionality is not implemented. While it is possible
3716
- # to set it using ::Gapic::CallOptions, it will not be applied
3717
3640
  #
3718
3641
  # @overload update_shielded_instance_config(instance: nil, project: nil, request_id: nil, shielded_instance_config_resource: nil, zone: nil)
3719
3642
  # Pass arguments to `update_shielded_instance_config` via keyword arguments. Note that at
@@ -3748,17 +3671,21 @@ module Google
3748
3671
  # Customize the options with defaults
3749
3672
  call_metadata = @config.rpcs.update_shielded_instance_config.metadata.to_h
3750
3673
 
3751
- # Set x-goog-api-client header
3674
+ # Set x-goog-api-client and x-goog-user-project headers
3752
3675
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3753
3676
  lib_name: @config.lib_name, lib_version: @config.lib_version,
3754
3677
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3755
3678
  transports_version_send: [:rest]
3756
3679
 
3680
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3681
+
3757
3682
  options.apply_defaults timeout: @config.rpcs.update_shielded_instance_config.timeout,
3758
- metadata: call_metadata
3683
+ metadata: call_metadata,
3684
+ retry_policy: @config.rpcs.update_shielded_instance_config.retry_policy
3759
3685
 
3760
3686
  options.apply_defaults timeout: @config.timeout,
3761
- metadata: @config.metadata
3687
+ metadata: @config.metadata,
3688
+ retry_policy: @config.retry_policy
3762
3689
 
3763
3690
  @instances_stub.update_shielded_instance_config request, options do |result, response|
3764
3691
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -3773,36 +3700,38 @@ module Google
3773
3700
  yield result, response if block_given?
3774
3701
  return result
3775
3702
  end
3776
- rescue ::Faraday::Error => e
3777
- begin
3778
- raise ::Gapic::Rest::Error.wrap_faraday_error e
3779
- rescue ::Gapic::Rest::Error => gapic_error
3780
- raise ::Google::Cloud::Error.from_error gapic_error
3781
- end
3703
+ rescue ::Gapic::Rest::Error => e
3704
+ raise ::Google::Cloud::Error.from_error(e)
3782
3705
  end
3783
3706
 
3784
3707
  ##
3785
3708
  # Configuration class for the Instances REST API.
3786
3709
  #
3787
3710
  # This class represents the configuration for Instances REST,
3788
- # providing control over credentials, timeouts, retry behavior, logging.
3711
+ # providing control over timeouts, retry behavior, logging, transport
3712
+ # parameters, and other low-level controls. Certain parameters can also be
3713
+ # applied individually to specific RPCs. See
3714
+ # {::Google::Cloud::Compute::V1::Instances::Rest::Client::Configuration::Rpcs}
3715
+ # for a list of RPCs that can be configured independently.
3789
3716
  #
3790
3717
  # Configuration can be applied globally to all clients, or to a single client
3791
3718
  # on construction.
3792
3719
  #
3793
- # # Examples
3794
- #
3795
- # To modify the global config, setting the timeout for all calls to 10 seconds:
3796
- #
3797
- # ::Google::Cloud::Compute::V1::Instances::Client.configure do |config|
3798
- # config.timeout = 10.0
3799
- # end
3720
+ # @example
3800
3721
  #
3801
- # To apply the above configuration only to a new client:
3722
+ # # Modify the global config, setting the timeout for
3723
+ # # add_access_config to 20 seconds,
3724
+ # # and all remaining timeouts to 10 seconds.
3725
+ # ::Google::Cloud::Compute::V1::Instances::Rest::Client.configure do |config|
3726
+ # config.timeout = 10.0
3727
+ # config.rpcs.add_access_config.timeout = 20.0
3728
+ # end
3802
3729
  #
3803
- # client = ::Google::Cloud::Compute::V1::Instances::Client.new do |config|
3804
- # config.timeout = 10.0
3805
- # end
3730
+ # # Apply the above configuration only to a new client.
3731
+ # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new do |config|
3732
+ # config.timeout = 10.0
3733
+ # config.rpcs.add_access_config.timeout = 20.0
3734
+ # end
3806
3735
  #
3807
3736
  # @!attribute [rw] endpoint
3808
3737
  # The hostname or hostname:port of the service endpoint.
@@ -3831,8 +3760,19 @@ module Google
3831
3760
  # The call timeout in seconds.
3832
3761
  # @return [::Numeric]
3833
3762
  # @!attribute [rw] metadata
3834
- # Additional REST headers to be sent with the call.
3763
+ # Additional headers to be sent with the call.
3835
3764
  # @return [::Hash{::Symbol=>::String}]
3765
+ # @!attribute [rw] retry_policy
3766
+ # The retry policy. The value is a hash with the following keys:
3767
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3768
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3769
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3770
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3771
+ # trigger a retry.
3772
+ # @return [::Hash]
3773
+ # @!attribute [rw] quota_project
3774
+ # A separate project against which to charge quota.
3775
+ # @return [::String]
3836
3776
  #
3837
3777
  class Configuration
3838
3778
  extend ::Gapic::Config
@@ -3847,6 +3787,8 @@ module Google
3847
3787
  config_attr :lib_version, nil, ::String, nil
3848
3788
  config_attr :timeout, nil, ::Numeric, nil
3849
3789
  config_attr :metadata, nil, ::Hash, nil
3790
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3791
+ config_attr :quota_project, nil, ::String, nil
3850
3792
 
3851
3793
  # @private
3852
3794
  def initialize parent_config = nil
@@ -3875,9 +3817,14 @@ module Google
3875
3817
  # the following configuration fields:
3876
3818
  #
3877
3819
  # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3878
- #
3879
- # there is one other field (`retry_policy`) that can be set
3880
- # but is currently not supported for REST Gapic libraries.
3820
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
3821
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
3822
+ # include the following keys:
3823
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3824
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3825
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3826
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3827
+ # trigger a retry.
3881
3828
  #
3882
3829
  class Rpcs
3883
3830
  ##