google-cloud-compute-v1 1.7.1 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (363) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +76 -50
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +9 -10
  4. data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +20 -0
  5. data/lib/google/cloud/compute/v1/accelerator_types.rb +2 -2
  6. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +104 -83
  7. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +15 -16
  8. data/lib/google/cloud/compute/v1/addresses/rest.rb +18 -0
  9. data/lib/google/cloud/compute/v1/addresses.rb +2 -2
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +113 -94
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +17 -18
  12. data/lib/google/cloud/compute/v1/autoscalers/rest.rb +18 -0
  13. data/lib/google/cloud/compute/v1/autoscalers.rb +2 -2
  14. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +131 -116
  15. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +21 -22
  16. data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +18 -0
  17. data/lib/google/cloud/compute/v1/backend_buckets.rb +2 -2
  18. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +176 -171
  19. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +31 -32
  20. data/lib/google/cloud/compute/v1/backend_services/rest.rb +18 -0
  21. data/lib/google/cloud/compute/v1/backend_services.rb +2 -2
  22. data/lib/google/cloud/compute/v1/compute_pb.rb +260 -0
  23. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +76 -50
  24. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +9 -10
  25. data/lib/google/cloud/compute/v1/disk_types/rest.rb +18 -0
  26. data/lib/google/cloud/compute/v1/disk_types.rb +2 -2
  27. data/lib/google/cloud/compute/v1/disks/rest/client.rb +167 -160
  28. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +29 -30
  29. data/lib/google/cloud/compute/v1/disks/rest.rb +18 -0
  30. data/lib/google/cloud/compute/v1/disks.rb +2 -2
  31. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +104 -83
  32. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +15 -16
  33. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +18 -0
  34. data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +2 -2
  35. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +212 -215
  36. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +39 -40
  37. data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +18 -0
  38. data/lib/google/cloud/compute/v1/firewall_policies.rb +2 -2
  39. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +104 -83
  40. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +15 -16
  41. data/lib/google/cloud/compute/v1/firewalls/rest.rb +18 -0
  42. data/lib/google/cloud/compute/v1/firewalls.rb +2 -2
  43. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +122 -105
  44. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +19 -20
  45. data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +18 -0
  46. data/lib/google/cloud/compute/v1/forwarding_rules.rb +2 -2
  47. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +95 -72
  48. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +13 -14
  49. data/lib/google/cloud/compute/v1/global_addresses/rest.rb +18 -0
  50. data/lib/google/cloud/compute/v1/global_addresses.rb +2 -2
  51. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +113 -94
  52. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +17 -18
  53. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +18 -0
  54. data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +2 -2
  55. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +113 -94
  56. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +17 -18
  57. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +18 -0
  58. data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +2 -2
  59. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +94 -72
  60. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +13 -14
  61. data/lib/google/cloud/compute/v1/global_operations/rest.rb +18 -0
  62. data/lib/google/cloud/compute/v1/global_operations.rb +2 -2
  63. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +76 -50
  64. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +9 -10
  65. data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +18 -0
  66. data/lib/google/cloud/compute/v1/global_organization_operations.rb +2 -2
  67. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +95 -72
  68. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +13 -14
  69. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +18 -0
  70. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +2 -2
  71. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +113 -94
  72. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +17 -18
  73. data/lib/google/cloud/compute/v1/health_checks/rest.rb +18 -0
  74. data/lib/google/cloud/compute/v1/health_checks.rb +2 -2
  75. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +58 -28
  76. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +5 -6
  77. data/lib/google/cloud/compute/v1/image_family_views/rest.rb +18 -0
  78. data/lib/google/cloud/compute/v1/image_family_views.rb +2 -2
  79. data/lib/google/cloud/compute/v1/images/rest/client.rb +149 -138
  80. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +25 -26
  81. data/lib/google/cloud/compute/v1/images/rest.rb +18 -0
  82. data/lib/google/cloud/compute/v1/images.rb +2 -2
  83. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +230 -237
  84. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +43 -44
  85. data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +18 -0
  86. data/lib/google/cloud/compute/v1/instance_group_managers.rb +2 -2
  87. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +131 -116
  88. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +21 -22
  89. data/lib/google/cloud/compute/v1/instance_groups/rest.rb +18 -0
  90. data/lib/google/cloud/compute/v1/instance_groups.rb +2 -2
  91. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +113 -94
  92. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +17 -18
  93. data/lib/google/cloud/compute/v1/instance_templates/rest.rb +18 -0
  94. data/lib/google/cloud/compute/v1/instance_templates.rb +2 -2
  95. data/lib/google/cloud/compute/v1/instances/rest/client.rb +461 -514
  96. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +93 -94
  97. data/lib/google/cloud/compute/v1/instances/rest.rb +18 -0
  98. data/lib/google/cloud/compute/v1/instances.rb +2 -2
  99. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +113 -94
  100. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +17 -18
  101. data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +18 -0
  102. data/lib/google/cloud/compute/v1/interconnect_attachments.rb +2 -2
  103. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +67 -39
  104. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +7 -8
  105. data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +18 -0
  106. data/lib/google/cloud/compute/v1/interconnect_locations.rb +2 -2
  107. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +119 -100
  108. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +17 -18
  109. data/lib/google/cloud/compute/v1/interconnects/rest.rb +18 -0
  110. data/lib/google/cloud/compute/v1/interconnects.rb +2 -2
  111. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +67 -39
  112. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +7 -8
  113. data/lib/google/cloud/compute/v1/license_codes/rest.rb +18 -0
  114. data/lib/google/cloud/compute/v1/license_codes.rb +2 -2
  115. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +113 -94
  116. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +17 -18
  117. data/lib/google/cloud/compute/v1/licenses/rest.rb +18 -0
  118. data/lib/google/cloud/compute/v1/licenses.rb +2 -2
  119. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +113 -94
  120. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +17 -18
  121. data/lib/google/cloud/compute/v1/machine_images/rest.rb +18 -0
  122. data/lib/google/cloud/compute/v1/machine_images.rb +2 -2
  123. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +76 -50
  124. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +9 -10
  125. data/lib/google/cloud/compute/v1/machine_types/rest.rb +18 -0
  126. data/lib/google/cloud/compute/v1/machine_types.rb +2 -2
  127. data/lib/google/cloud/compute/v1/network_attachments/credentials.rb +52 -0
  128. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +945 -0
  129. data/lib/google/cloud/compute/v1/network_attachments/rest/service_stub.rb +527 -0
  130. data/lib/google/cloud/compute/v1/network_attachments/rest.rb +51 -0
  131. data/lib/google/cloud/compute/v1/network_attachments.rb +47 -0
  132. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +95 -72
  133. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +13 -14
  134. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +18 -0
  135. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +2 -2
  136. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +131 -116
  137. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +21 -22
  138. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +18 -0
  139. data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +2 -2
  140. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +194 -193
  141. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +35 -36
  142. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +18 -0
  143. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +2 -2
  144. data/lib/google/cloud/compute/v1/networks/rest/client.rb +149 -138
  145. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +25 -26
  146. data/lib/google/cloud/compute/v1/networks/rest.rb +18 -0
  147. data/lib/google/cloud/compute/v1/networks.rb +2 -2
  148. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +167 -160
  149. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +29 -30
  150. data/lib/google/cloud/compute/v1/node_groups/rest.rb +18 -0
  151. data/lib/google/cloud/compute/v1/node_groups.rb +2 -2
  152. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +122 -105
  153. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +19 -20
  154. data/lib/google/cloud/compute/v1/node_templates/rest.rb +18 -0
  155. data/lib/google/cloud/compute/v1/node_templates.rb +2 -2
  156. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +76 -50
  157. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +9 -10
  158. data/lib/google/cloud/compute/v1/node_types/rest.rb +18 -0
  159. data/lib/google/cloud/compute/v1/node_types.rb +2 -2
  160. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +113 -94
  161. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +17 -18
  162. data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +18 -0
  163. data/lib/google/cloud/compute/v1/packet_mirrorings.rb +2 -2
  164. data/lib/google/cloud/compute/v1/projects/rest/client.rb +167 -160
  165. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +29 -30
  166. data/lib/google/cloud/compute/v1/projects/rest.rb +18 -0
  167. data/lib/google/cloud/compute/v1/projects.rb +2 -2
  168. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +95 -72
  169. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +13 -14
  170. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +18 -0
  171. data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +2 -2
  172. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +104 -83
  173. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +15 -16
  174. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +18 -0
  175. data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +2 -2
  176. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +104 -83
  177. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +15 -16
  178. data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +18 -0
  179. data/lib/google/cloud/compute/v1/region_autoscalers.rb +2 -2
  180. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +131 -116
  181. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +21 -22
  182. data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +18 -0
  183. data/lib/google/cloud/compute/v1/region_backend_services.rb +2 -2
  184. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +95 -72
  185. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +13 -14
  186. data/lib/google/cloud/compute/v1/region_commitments/rest.rb +18 -0
  187. data/lib/google/cloud/compute/v1/region_commitments.rb +2 -2
  188. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +67 -39
  189. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +7 -8
  190. data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +18 -0
  191. data/lib/google/cloud/compute/v1/region_disk_types.rb +2 -2
  192. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +158 -149
  193. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +27 -28
  194. data/lib/google/cloud/compute/v1/region_disks/rest.rb +18 -0
  195. data/lib/google/cloud/compute/v1/region_disks.rb +2 -2
  196. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +95 -72
  197. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +13 -14
  198. data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +18 -0
  199. data/lib/google/cloud/compute/v1/region_health_check_services.rb +2 -2
  200. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +104 -83
  201. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +15 -16
  202. data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +18 -0
  203. data/lib/google/cloud/compute/v1/region_health_checks.rb +2 -2
  204. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +221 -226
  205. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +41 -42
  206. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +18 -0
  207. data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +2 -2
  208. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +86 -61
  209. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +11 -12
  210. data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +18 -0
  211. data/lib/google/cloud/compute/v1/region_instance_groups.rb +2 -2
  212. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +59 -28
  213. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +5 -6
  214. data/lib/google/cloud/compute/v1/region_instances/rest.rb +18 -0
  215. data/lib/google/cloud/compute/v1/region_instances.rb +2 -2
  216. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +86 -61
  217. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +11 -12
  218. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +18 -0
  219. data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +2 -2
  220. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +203 -204
  221. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +37 -38
  222. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +18 -0
  223. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +2 -2
  224. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +86 -61
  225. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +11 -12
  226. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +18 -0
  227. data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +2 -2
  228. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +85 -61
  229. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +11 -12
  230. data/lib/google/cloud/compute/v1/region_operations/rest.rb +18 -0
  231. data/lib/google/cloud/compute/v1/region_operations.rb +2 -2
  232. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +96 -73
  233. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +13 -14
  234. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +18 -0
  235. data/lib/google/cloud/compute/v1/region_security_policies.rb +2 -2
  236. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +86 -61
  237. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +11 -12
  238. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +18 -0
  239. data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +2 -2
  240. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +104 -83
  241. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/service_stub.rb +15 -16
  242. data/lib/google/cloud/compute/v1/region_ssl_policies/rest.rb +18 -0
  243. data/lib/google/cloud/compute/v1/region_ssl_policies.rb +2 -2
  244. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +95 -72
  245. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +13 -14
  246. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +18 -0
  247. data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +2 -2
  248. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +113 -94
  249. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +17 -18
  250. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +18 -0
  251. data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +2 -2
  252. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +86 -61
  253. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/service_stub.rb +11 -12
  254. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest.rb +18 -0
  255. data/lib/google/cloud/compute/v1/region_target_tcp_proxies.rb +2 -2
  256. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +113 -94
  257. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +17 -18
  258. data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +18 -0
  259. data/lib/google/cloud/compute/v1/region_url_maps.rb +2 -2
  260. data/lib/google/cloud/compute/v1/regions/rest/client.rb +67 -39
  261. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +7 -8
  262. data/lib/google/cloud/compute/v1/regions/rest.rb +18 -0
  263. data/lib/google/cloud/compute/v1/regions.rb +2 -2
  264. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +140 -127
  265. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +23 -24
  266. data/lib/google/cloud/compute/v1/reservations/rest.rb +18 -0
  267. data/lib/google/cloud/compute/v1/reservations.rb +2 -2
  268. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +122 -105
  269. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +19 -20
  270. data/lib/google/cloud/compute/v1/resource_policies/rest.rb +18 -0
  271. data/lib/google/cloud/compute/v1/resource_policies.rb +2 -2
  272. data/lib/google/cloud/compute/v1/rest.rb +124 -0
  273. data/lib/google/cloud/compute/v1/routers/rest/client.rb +140 -127
  274. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +23 -24
  275. data/lib/google/cloud/compute/v1/routers/rest.rb +18 -0
  276. data/lib/google/cloud/compute/v1/routers.rb +2 -2
  277. data/lib/google/cloud/compute/v1/routes/rest/client.rb +86 -61
  278. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +11 -12
  279. data/lib/google/cloud/compute/v1/routes/rest.rb +18 -0
  280. data/lib/google/cloud/compute/v1/routes.rb +2 -2
  281. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +159 -150
  282. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +27 -28
  283. data/lib/google/cloud/compute/v1/security_policies/rest.rb +18 -0
  284. data/lib/google/cloud/compute/v1/security_policies.rb +2 -2
  285. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +131 -116
  286. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +21 -22
  287. data/lib/google/cloud/compute/v1/service_attachments/rest.rb +18 -0
  288. data/lib/google/cloud/compute/v1/service_attachments.rb +2 -2
  289. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +122 -105
  290. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +19 -20
  291. data/lib/google/cloud/compute/v1/snapshots/rest.rb +18 -0
  292. data/lib/google/cloud/compute/v1/snapshots.rb +2 -2
  293. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +95 -72
  294. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +13 -14
  295. data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +18 -0
  296. data/lib/google/cloud/compute/v1/ssl_certificates.rb +2 -2
  297. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +113 -94
  298. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +17 -18
  299. data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +18 -0
  300. data/lib/google/cloud/compute/v1/ssl_policies.rb +2 -2
  301. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +158 -149
  302. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +27 -28
  303. data/lib/google/cloud/compute/v1/subnetworks/rest.rb +18 -0
  304. data/lib/google/cloud/compute/v1/subnetworks.rb +2 -2
  305. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +95 -72
  306. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +13 -14
  307. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +18 -0
  308. data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +2 -2
  309. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +113 -94
  310. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +17 -18
  311. data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +18 -0
  312. data/lib/google/cloud/compute/v1/target_http_proxies.rb +2 -2
  313. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +149 -138
  314. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +25 -26
  315. data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +18 -0
  316. data/lib/google/cloud/compute/v1/target_https_proxies.rb +2 -2
  317. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +95 -72
  318. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +13 -14
  319. data/lib/google/cloud/compute/v1/target_instances/rest.rb +18 -0
  320. data/lib/google/cloud/compute/v1/target_instances.rb +2 -2
  321. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +149 -138
  322. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +25 -26
  323. data/lib/google/cloud/compute/v1/target_pools/rest.rb +18 -0
  324. data/lib/google/cloud/compute/v1/target_pools.rb +2 -2
  325. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +131 -116
  326. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +21 -22
  327. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +18 -0
  328. data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +2 -2
  329. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +191 -83
  330. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +72 -15
  331. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +18 -0
  332. data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +2 -2
  333. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +104 -83
  334. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +15 -16
  335. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +18 -0
  336. data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +2 -2
  337. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +131 -116
  338. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +21 -22
  339. data/lib/google/cloud/compute/v1/url_maps/rest.rb +18 -0
  340. data/lib/google/cloud/compute/v1/url_maps.rb +2 -2
  341. data/lib/google/cloud/compute/v1/version.rb +1 -1
  342. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +122 -105
  343. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +19 -20
  344. data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +18 -0
  345. data/lib/google/cloud/compute/v1/vpn_gateways.rb +2 -2
  346. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +104 -83
  347. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +15 -16
  348. data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +18 -0
  349. data/lib/google/cloud/compute/v1/vpn_tunnels.rb +2 -2
  350. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +85 -61
  351. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +11 -12
  352. data/lib/google/cloud/compute/v1/zone_operations/rest.rb +18 -0
  353. data/lib/google/cloud/compute/v1/zone_operations.rb +2 -2
  354. data/lib/google/cloud/compute/v1/zones/rest/client.rb +67 -39
  355. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +7 -8
  356. data/lib/google/cloud/compute/v1/zones/rest.rb +18 -0
  357. data/lib/google/cloud/compute/v1/zones.rb +2 -2
  358. data/lib/google/cloud/compute/v1.rb +3 -2
  359. data/proto_docs/google/api/client.rb +318 -0
  360. data/proto_docs/google/api/launch_stage.rb +71 -0
  361. data/proto_docs/google/cloud/compute/v1/compute.rb +761 -86
  362. data/proto_docs/google/protobuf/duration.rb +98 -0
  363. metadata +14 -5
@@ -163,13 +163,22 @@ module Google
163
163
 
164
164
  # Create credentials
165
165
  credentials = @config.credentials
166
- credentials ||= Credentials.default scope: @config.scope
166
+ # Use self-signed JWT if the endpoint is unchanged from default,
167
+ # but only if the default endpoint does not have a region prefix.
168
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
169
+ !@config.endpoint.split(".").first.include?("-")
170
+ credentials ||= Credentials.default scope: @config.scope,
171
+ enable_self_signed_jwt: enable_self_signed_jwt
167
172
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
168
173
  credentials = Credentials.new credentials, scope: @config.scope
169
174
  end
170
175
 
176
+ @quota_project_id = @config.quota_project
177
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
178
+
171
179
  @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
172
180
  config.credentials = credentials
181
+ config.quota_project = @quota_project_id
173
182
  config.endpoint = @config.endpoint
174
183
  end
175
184
 
@@ -197,8 +206,6 @@ module Google
197
206
  # parameters, or to keep all the default parameter values, pass an empty Hash.
198
207
  # @param options [::Gapic::CallOptions, ::Hash]
199
208
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
200
- # Note: currently retry functionality is not implemented. While it is possible
201
- # to set it using ::Gapic::CallOptions, it will not be applied
202
209
  #
203
210
  # @overload abandon_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_abandon_instances_request_resource: nil, request_id: nil)
204
211
  # Pass arguments to `abandon_instances` via keyword arguments. Note that at
@@ -233,17 +240,21 @@ module Google
233
240
  # Customize the options with defaults
234
241
  call_metadata = @config.rpcs.abandon_instances.metadata.to_h
235
242
 
236
- # Set x-goog-api-client header
243
+ # Set x-goog-api-client and x-goog-user-project headers
237
244
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
238
245
  lib_name: @config.lib_name, lib_version: @config.lib_version,
239
246
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
240
247
  transports_version_send: [:rest]
241
248
 
249
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
250
+
242
251
  options.apply_defaults timeout: @config.rpcs.abandon_instances.timeout,
243
- metadata: call_metadata
252
+ metadata: call_metadata,
253
+ retry_policy: @config.rpcs.abandon_instances.retry_policy
244
254
 
245
255
  options.apply_defaults timeout: @config.timeout,
246
- metadata: @config.metadata
256
+ metadata: @config.metadata,
257
+ retry_policy: @config.retry_policy
247
258
 
248
259
  @region_instance_group_managers_stub.abandon_instances request, options do |result, response|
249
260
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -258,12 +269,8 @@ module Google
258
269
  yield result, response if block_given?
259
270
  return result
260
271
  end
261
- rescue ::Faraday::Error => e
262
- begin
263
- raise ::Gapic::Rest::Error.wrap_faraday_error e
264
- rescue ::Gapic::Rest::Error => gapic_error
265
- raise ::Google::Cloud::Error.from_error gapic_error
266
- end
272
+ rescue ::Gapic::Rest::Error => e
273
+ raise ::Google::Cloud::Error.from_error(e)
267
274
  end
268
275
 
269
276
  ##
@@ -278,8 +285,6 @@ module Google
278
285
  # parameters, or to keep all the default parameter values, pass an empty Hash.
279
286
  # @param options [::Gapic::CallOptions, ::Hash]
280
287
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
281
- # Note: currently retry functionality is not implemented. While it is possible
282
- # to set it using ::Gapic::CallOptions, it will not be applied
283
288
  #
284
289
  # @overload apply_updates_to_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_apply_updates_request_resource: nil)
285
290
  # Pass arguments to `apply_updates_to_instances` via keyword arguments. Note that at
@@ -312,17 +317,21 @@ module Google
312
317
  # Customize the options with defaults
313
318
  call_metadata = @config.rpcs.apply_updates_to_instances.metadata.to_h
314
319
 
315
- # Set x-goog-api-client header
320
+ # Set x-goog-api-client and x-goog-user-project headers
316
321
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
317
322
  lib_name: @config.lib_name, lib_version: @config.lib_version,
318
323
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
319
324
  transports_version_send: [:rest]
320
325
 
326
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
327
+
321
328
  options.apply_defaults timeout: @config.rpcs.apply_updates_to_instances.timeout,
322
- metadata: call_metadata
329
+ metadata: call_metadata,
330
+ retry_policy: @config.rpcs.apply_updates_to_instances.retry_policy
323
331
 
324
332
  options.apply_defaults timeout: @config.timeout,
325
- metadata: @config.metadata
333
+ metadata: @config.metadata,
334
+ retry_policy: @config.retry_policy
326
335
 
327
336
  @region_instance_group_managers_stub.apply_updates_to_instances request, options do |result, response|
328
337
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -337,12 +346,8 @@ module Google
337
346
  yield result, response if block_given?
338
347
  return result
339
348
  end
340
- rescue ::Faraday::Error => e
341
- begin
342
- raise ::Gapic::Rest::Error.wrap_faraday_error e
343
- rescue ::Gapic::Rest::Error => gapic_error
344
- raise ::Google::Cloud::Error.from_error gapic_error
345
- end
349
+ rescue ::Gapic::Rest::Error => e
350
+ raise ::Google::Cloud::Error.from_error(e)
346
351
  end
347
352
 
348
353
  ##
@@ -357,8 +362,6 @@ module Google
357
362
  # parameters, or to keep all the default parameter values, pass an empty Hash.
358
363
  # @param options [::Gapic::CallOptions, ::Hash]
359
364
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
360
- # Note: currently retry functionality is not implemented. While it is possible
361
- # to set it using ::Gapic::CallOptions, it will not be applied
362
365
  #
363
366
  # @overload create_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_create_instances_request_resource: nil, request_id: nil)
364
367
  # Pass arguments to `create_instances` via keyword arguments. Note that at
@@ -393,17 +396,21 @@ module Google
393
396
  # Customize the options with defaults
394
397
  call_metadata = @config.rpcs.create_instances.metadata.to_h
395
398
 
396
- # Set x-goog-api-client header
399
+ # Set x-goog-api-client and x-goog-user-project headers
397
400
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
398
401
  lib_name: @config.lib_name, lib_version: @config.lib_version,
399
402
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
400
403
  transports_version_send: [:rest]
401
404
 
405
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
406
+
402
407
  options.apply_defaults timeout: @config.rpcs.create_instances.timeout,
403
- metadata: call_metadata
408
+ metadata: call_metadata,
409
+ retry_policy: @config.rpcs.create_instances.retry_policy
404
410
 
405
411
  options.apply_defaults timeout: @config.timeout,
406
- metadata: @config.metadata
412
+ metadata: @config.metadata,
413
+ retry_policy: @config.retry_policy
407
414
 
408
415
  @region_instance_group_managers_stub.create_instances request, options do |result, response|
409
416
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -418,12 +425,8 @@ module Google
418
425
  yield result, response if block_given?
419
426
  return result
420
427
  end
421
- rescue ::Faraday::Error => e
422
- begin
423
- raise ::Gapic::Rest::Error.wrap_faraday_error e
424
- rescue ::Gapic::Rest::Error => gapic_error
425
- raise ::Google::Cloud::Error.from_error gapic_error
426
- end
428
+ rescue ::Gapic::Rest::Error => e
429
+ raise ::Google::Cloud::Error.from_error(e)
427
430
  end
428
431
 
429
432
  ##
@@ -438,8 +441,6 @@ module Google
438
441
  # parameters, or to keep all the default parameter values, pass an empty Hash.
439
442
  # @param options [::Gapic::CallOptions, ::Hash]
440
443
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
441
- # Note: currently retry functionality is not implemented. While it is possible
442
- # to set it using ::Gapic::CallOptions, it will not be applied
443
444
  #
444
445
  # @overload delete(instance_group_manager: nil, project: nil, region: nil, request_id: nil)
445
446
  # Pass arguments to `delete` via keyword arguments. Note that at
@@ -472,17 +473,21 @@ module Google
472
473
  # Customize the options with defaults
473
474
  call_metadata = @config.rpcs.delete.metadata.to_h
474
475
 
475
- # Set x-goog-api-client header
476
+ # Set x-goog-api-client and x-goog-user-project headers
476
477
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
477
478
  lib_name: @config.lib_name, lib_version: @config.lib_version,
478
479
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
479
480
  transports_version_send: [:rest]
480
481
 
482
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
483
+
481
484
  options.apply_defaults timeout: @config.rpcs.delete.timeout,
482
- metadata: call_metadata
485
+ metadata: call_metadata,
486
+ retry_policy: @config.rpcs.delete.retry_policy
483
487
 
484
488
  options.apply_defaults timeout: @config.timeout,
485
- metadata: @config.metadata
489
+ metadata: @config.metadata,
490
+ retry_policy: @config.retry_policy
486
491
 
487
492
  @region_instance_group_managers_stub.delete request, options do |result, response|
488
493
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -497,12 +502,8 @@ module Google
497
502
  yield result, response if block_given?
498
503
  return result
499
504
  end
500
- rescue ::Faraday::Error => e
501
- begin
502
- raise ::Gapic::Rest::Error.wrap_faraday_error e
503
- rescue ::Gapic::Rest::Error => gapic_error
504
- raise ::Google::Cloud::Error.from_error gapic_error
505
- end
505
+ rescue ::Gapic::Rest::Error => e
506
+ raise ::Google::Cloud::Error.from_error(e)
506
507
  end
507
508
 
508
509
  ##
@@ -517,8 +518,6 @@ module Google
517
518
  # parameters, or to keep all the default parameter values, pass an empty Hash.
518
519
  # @param options [::Gapic::CallOptions, ::Hash]
519
520
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
520
- # Note: currently retry functionality is not implemented. While it is possible
521
- # to set it using ::Gapic::CallOptions, it will not be applied
522
521
  #
523
522
  # @overload delete_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_delete_instances_request_resource: nil, request_id: nil)
524
523
  # Pass arguments to `delete_instances` via keyword arguments. Note that at
@@ -553,17 +552,21 @@ module Google
553
552
  # Customize the options with defaults
554
553
  call_metadata = @config.rpcs.delete_instances.metadata.to_h
555
554
 
556
- # Set x-goog-api-client header
555
+ # Set x-goog-api-client and x-goog-user-project headers
557
556
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
558
557
  lib_name: @config.lib_name, lib_version: @config.lib_version,
559
558
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
560
559
  transports_version_send: [:rest]
561
560
 
561
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
562
+
562
563
  options.apply_defaults timeout: @config.rpcs.delete_instances.timeout,
563
- metadata: call_metadata
564
+ metadata: call_metadata,
565
+ retry_policy: @config.rpcs.delete_instances.retry_policy
564
566
 
565
567
  options.apply_defaults timeout: @config.timeout,
566
- metadata: @config.metadata
568
+ metadata: @config.metadata,
569
+ retry_policy: @config.retry_policy
567
570
 
568
571
  @region_instance_group_managers_stub.delete_instances request, options do |result, response|
569
572
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -578,12 +581,8 @@ module Google
578
581
  yield result, response if block_given?
579
582
  return result
580
583
  end
581
- rescue ::Faraday::Error => e
582
- begin
583
- raise ::Gapic::Rest::Error.wrap_faraday_error e
584
- rescue ::Gapic::Rest::Error => gapic_error
585
- raise ::Google::Cloud::Error.from_error gapic_error
586
- end
584
+ rescue ::Gapic::Rest::Error => e
585
+ raise ::Google::Cloud::Error.from_error(e)
587
586
  end
588
587
 
589
588
  ##
@@ -598,8 +597,6 @@ module Google
598
597
  # parameters, or to keep all the default parameter values, pass an empty Hash.
599
598
  # @param options [::Gapic::CallOptions, ::Hash]
600
599
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
601
- # Note: currently retry functionality is not implemented. While it is possible
602
- # to set it using ::Gapic::CallOptions, it will not be applied
603
600
  #
604
601
  # @overload delete_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_delete_instance_config_req_resource: nil)
605
602
  # Pass arguments to `delete_per_instance_configs` via keyword arguments. Note that at
@@ -632,17 +629,21 @@ module Google
632
629
  # Customize the options with defaults
633
630
  call_metadata = @config.rpcs.delete_per_instance_configs.metadata.to_h
634
631
 
635
- # Set x-goog-api-client header
632
+ # Set x-goog-api-client and x-goog-user-project headers
636
633
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
637
634
  lib_name: @config.lib_name, lib_version: @config.lib_version,
638
635
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
639
636
  transports_version_send: [:rest]
640
637
 
638
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
639
+
641
640
  options.apply_defaults timeout: @config.rpcs.delete_per_instance_configs.timeout,
642
- metadata: call_metadata
641
+ metadata: call_metadata,
642
+ retry_policy: @config.rpcs.delete_per_instance_configs.retry_policy
643
643
 
644
644
  options.apply_defaults timeout: @config.timeout,
645
- metadata: @config.metadata
645
+ metadata: @config.metadata,
646
+ retry_policy: @config.retry_policy
646
647
 
647
648
  @region_instance_group_managers_stub.delete_per_instance_configs request, options do |result, response|
648
649
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -657,12 +658,8 @@ module Google
657
658
  yield result, response if block_given?
658
659
  return result
659
660
  end
660
- rescue ::Faraday::Error => e
661
- begin
662
- raise ::Gapic::Rest::Error.wrap_faraday_error e
663
- rescue ::Gapic::Rest::Error => gapic_error
664
- raise ::Google::Cloud::Error.from_error gapic_error
665
- end
661
+ rescue ::Gapic::Rest::Error => e
662
+ raise ::Google::Cloud::Error.from_error(e)
666
663
  end
667
664
 
668
665
  ##
@@ -677,8 +674,6 @@ module Google
677
674
  # parameters, or to keep all the default parameter values, pass an empty Hash.
678
675
  # @param options [::Gapic::CallOptions, ::Hash]
679
676
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
680
- # Note: currently retry functionality is not implemented. While it is possible
681
- # to set it using ::Gapic::CallOptions, it will not be applied
682
677
  #
683
678
  # @overload get(instance_group_manager: nil, project: nil, region: nil)
684
679
  # Pass arguments to `get` via keyword arguments. Note that at
@@ -709,28 +704,28 @@ module Google
709
704
  # Customize the options with defaults
710
705
  call_metadata = @config.rpcs.get.metadata.to_h
711
706
 
712
- # Set x-goog-api-client header
707
+ # Set x-goog-api-client and x-goog-user-project headers
713
708
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
714
709
  lib_name: @config.lib_name, lib_version: @config.lib_version,
715
710
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
716
711
  transports_version_send: [:rest]
717
712
 
713
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
714
+
718
715
  options.apply_defaults timeout: @config.rpcs.get.timeout,
719
- metadata: call_metadata
716
+ metadata: call_metadata,
717
+ retry_policy: @config.rpcs.get.retry_policy
720
718
 
721
719
  options.apply_defaults timeout: @config.timeout,
722
- metadata: @config.metadata
720
+ metadata: @config.metadata,
721
+ retry_policy: @config.retry_policy
723
722
 
724
723
  @region_instance_group_managers_stub.get request, options do |result, response|
725
724
  yield result, response if block_given?
726
725
  return result
727
726
  end
728
- rescue ::Faraday::Error => e
729
- begin
730
- raise ::Gapic::Rest::Error.wrap_faraday_error e
731
- rescue ::Gapic::Rest::Error => gapic_error
732
- raise ::Google::Cloud::Error.from_error gapic_error
733
- end
727
+ rescue ::Gapic::Rest::Error => e
728
+ raise ::Google::Cloud::Error.from_error(e)
734
729
  end
735
730
 
736
731
  ##
@@ -745,8 +740,6 @@ module Google
745
740
  # parameters, or to keep all the default parameter values, pass an empty Hash.
746
741
  # @param options [::Gapic::CallOptions, ::Hash]
747
742
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
748
- # Note: currently retry functionality is not implemented. While it is possible
749
- # to set it using ::Gapic::CallOptions, it will not be applied
750
743
  #
751
744
  # @overload insert(instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil)
752
745
  # Pass arguments to `insert` via keyword arguments. Note that at
@@ -779,17 +772,21 @@ module Google
779
772
  # Customize the options with defaults
780
773
  call_metadata = @config.rpcs.insert.metadata.to_h
781
774
 
782
- # Set x-goog-api-client header
775
+ # Set x-goog-api-client and x-goog-user-project headers
783
776
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
784
777
  lib_name: @config.lib_name, lib_version: @config.lib_version,
785
778
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
786
779
  transports_version_send: [:rest]
787
780
 
781
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
782
+
788
783
  options.apply_defaults timeout: @config.rpcs.insert.timeout,
789
- metadata: call_metadata
784
+ metadata: call_metadata,
785
+ retry_policy: @config.rpcs.insert.retry_policy
790
786
 
791
787
  options.apply_defaults timeout: @config.timeout,
792
- metadata: @config.metadata
788
+ metadata: @config.metadata,
789
+ retry_policy: @config.retry_policy
793
790
 
794
791
  @region_instance_group_managers_stub.insert request, options do |result, response|
795
792
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -804,12 +801,8 @@ module Google
804
801
  yield result, response if block_given?
805
802
  return result
806
803
  end
807
- rescue ::Faraday::Error => e
808
- begin
809
- raise ::Gapic::Rest::Error.wrap_faraday_error e
810
- rescue ::Gapic::Rest::Error => gapic_error
811
- raise ::Google::Cloud::Error.from_error gapic_error
812
- end
804
+ rescue ::Gapic::Rest::Error => e
805
+ raise ::Google::Cloud::Error.from_error(e)
813
806
  end
814
807
 
815
808
  ##
@@ -824,8 +817,6 @@ module Google
824
817
  # parameters, or to keep all the default parameter values, pass an empty Hash.
825
818
  # @param options [::Gapic::CallOptions, ::Hash]
826
819
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
827
- # Note: currently retry functionality is not implemented. While it is possible
828
- # to set it using ::Gapic::CallOptions, it will not be applied
829
820
  #
830
821
  # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
831
822
  # Pass arguments to `list` via keyword arguments. Note that at
@@ -864,29 +855,29 @@ module Google
864
855
  # Customize the options with defaults
865
856
  call_metadata = @config.rpcs.list.metadata.to_h
866
857
 
867
- # Set x-goog-api-client header
858
+ # Set x-goog-api-client and x-goog-user-project headers
868
859
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
869
860
  lib_name: @config.lib_name, lib_version: @config.lib_version,
870
861
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
871
862
  transports_version_send: [:rest]
872
863
 
864
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
865
+
873
866
  options.apply_defaults timeout: @config.rpcs.list.timeout,
874
- metadata: call_metadata
867
+ metadata: call_metadata,
868
+ retry_policy: @config.rpcs.list.retry_policy
875
869
 
876
870
  options.apply_defaults timeout: @config.timeout,
877
- metadata: @config.metadata
871
+ metadata: @config.metadata,
872
+ retry_policy: @config.retry_policy
878
873
 
879
874
  @region_instance_group_managers_stub.list request, options do |result, response|
880
875
  result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list, "items", request, result, options
881
876
  yield result, response if block_given?
882
877
  return result
883
878
  end
884
- rescue ::Faraday::Error => e
885
- begin
886
- raise ::Gapic::Rest::Error.wrap_faraday_error e
887
- rescue ::Gapic::Rest::Error => gapic_error
888
- raise ::Google::Cloud::Error.from_error gapic_error
889
- end
879
+ rescue ::Gapic::Rest::Error => e
880
+ raise ::Google::Cloud::Error.from_error(e)
890
881
  end
891
882
 
892
883
  ##
@@ -901,8 +892,6 @@ module Google
901
892
  # parameters, or to keep all the default parameter values, pass an empty Hash.
902
893
  # @param options [::Gapic::CallOptions, ::Hash]
903
894
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
904
- # Note: currently retry functionality is not implemented. While it is possible
905
- # to set it using ::Gapic::CallOptions, it will not be applied
906
895
  #
907
896
  # @overload list_errors(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
908
897
  # Pass arguments to `list_errors` via keyword arguments. Note that at
@@ -943,29 +932,29 @@ module Google
943
932
  # Customize the options with defaults
944
933
  call_metadata = @config.rpcs.list_errors.metadata.to_h
945
934
 
946
- # Set x-goog-api-client header
935
+ # Set x-goog-api-client and x-goog-user-project headers
947
936
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
948
937
  lib_name: @config.lib_name, lib_version: @config.lib_version,
949
938
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
950
939
  transports_version_send: [:rest]
951
940
 
941
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
942
+
952
943
  options.apply_defaults timeout: @config.rpcs.list_errors.timeout,
953
- metadata: call_metadata
944
+ metadata: call_metadata,
945
+ retry_policy: @config.rpcs.list_errors.retry_policy
954
946
 
955
947
  options.apply_defaults timeout: @config.timeout,
956
- metadata: @config.metadata
948
+ metadata: @config.metadata,
949
+ retry_policy: @config.retry_policy
957
950
 
958
951
  @region_instance_group_managers_stub.list_errors request, options do |result, response|
959
952
  result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_errors, "items", request, result, options
960
953
  yield result, response if block_given?
961
954
  return result
962
955
  end
963
- rescue ::Faraday::Error => e
964
- begin
965
- raise ::Gapic::Rest::Error.wrap_faraday_error e
966
- rescue ::Gapic::Rest::Error => gapic_error
967
- raise ::Google::Cloud::Error.from_error gapic_error
968
- end
956
+ rescue ::Gapic::Rest::Error => e
957
+ raise ::Google::Cloud::Error.from_error(e)
969
958
  end
970
959
 
971
960
  ##
@@ -980,8 +969,6 @@ module Google
980
969
  # parameters, or to keep all the default parameter values, pass an empty Hash.
981
970
  # @param options [::Gapic::CallOptions, ::Hash]
982
971
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
983
- # Note: currently retry functionality is not implemented. While it is possible
984
- # to set it using ::Gapic::CallOptions, it will not be applied
985
972
  #
986
973
  # @overload list_managed_instances(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
987
974
  # Pass arguments to `list_managed_instances` via keyword arguments. Note that at
@@ -1022,29 +1009,29 @@ module Google
1022
1009
  # Customize the options with defaults
1023
1010
  call_metadata = @config.rpcs.list_managed_instances.metadata.to_h
1024
1011
 
1025
- # Set x-goog-api-client header
1012
+ # Set x-goog-api-client and x-goog-user-project headers
1026
1013
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1027
1014
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1028
1015
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1029
1016
  transports_version_send: [:rest]
1030
1017
 
1018
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1019
+
1031
1020
  options.apply_defaults timeout: @config.rpcs.list_managed_instances.timeout,
1032
- metadata: call_metadata
1021
+ metadata: call_metadata,
1022
+ retry_policy: @config.rpcs.list_managed_instances.retry_policy
1033
1023
 
1034
1024
  options.apply_defaults timeout: @config.timeout,
1035
- metadata: @config.metadata
1025
+ metadata: @config.metadata,
1026
+ retry_policy: @config.retry_policy
1036
1027
 
1037
1028
  @region_instance_group_managers_stub.list_managed_instances request, options do |result, response|
1038
1029
  result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_managed_instances, "managed_instances", request, result, options
1039
1030
  yield result, response if block_given?
1040
1031
  return result
1041
1032
  end
1042
- rescue ::Faraday::Error => e
1043
- begin
1044
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1045
- rescue ::Gapic::Rest::Error => gapic_error
1046
- raise ::Google::Cloud::Error.from_error gapic_error
1047
- end
1033
+ rescue ::Gapic::Rest::Error => e
1034
+ raise ::Google::Cloud::Error.from_error(e)
1048
1035
  end
1049
1036
 
1050
1037
  ##
@@ -1059,8 +1046,6 @@ module Google
1059
1046
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1060
1047
  # @param options [::Gapic::CallOptions, ::Hash]
1061
1048
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1062
- # Note: currently retry functionality is not implemented. While it is possible
1063
- # to set it using ::Gapic::CallOptions, it will not be applied
1064
1049
  #
1065
1050
  # @overload list_per_instance_configs(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
1066
1051
  # Pass arguments to `list_per_instance_configs` via keyword arguments. Note that at
@@ -1101,29 +1086,29 @@ module Google
1101
1086
  # Customize the options with defaults
1102
1087
  call_metadata = @config.rpcs.list_per_instance_configs.metadata.to_h
1103
1088
 
1104
- # Set x-goog-api-client header
1089
+ # Set x-goog-api-client and x-goog-user-project headers
1105
1090
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1106
1091
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1107
1092
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1108
1093
  transports_version_send: [:rest]
1109
1094
 
1095
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1096
+
1110
1097
  options.apply_defaults timeout: @config.rpcs.list_per_instance_configs.timeout,
1111
- metadata: call_metadata
1098
+ metadata: call_metadata,
1099
+ retry_policy: @config.rpcs.list_per_instance_configs.retry_policy
1112
1100
 
1113
1101
  options.apply_defaults timeout: @config.timeout,
1114
- metadata: @config.metadata
1102
+ metadata: @config.metadata,
1103
+ retry_policy: @config.retry_policy
1115
1104
 
1116
1105
  @region_instance_group_managers_stub.list_per_instance_configs request, options do |result, response|
1117
1106
  result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_managers_stub, :list_per_instance_configs, "items", request, result, options
1118
1107
  yield result, response if block_given?
1119
1108
  return result
1120
1109
  end
1121
- rescue ::Faraday::Error => e
1122
- begin
1123
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1124
- rescue ::Gapic::Rest::Error => gapic_error
1125
- raise ::Google::Cloud::Error.from_error gapic_error
1126
- end
1110
+ rescue ::Gapic::Rest::Error => e
1111
+ raise ::Google::Cloud::Error.from_error(e)
1127
1112
  end
1128
1113
 
1129
1114
  ##
@@ -1138,8 +1123,6 @@ module Google
1138
1123
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1139
1124
  # @param options [::Gapic::CallOptions, ::Hash]
1140
1125
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1141
- # Note: currently retry functionality is not implemented. While it is possible
1142
- # to set it using ::Gapic::CallOptions, it will not be applied
1143
1126
  #
1144
1127
  # @overload patch(instance_group_manager: nil, instance_group_manager_resource: nil, project: nil, region: nil, request_id: nil)
1145
1128
  # Pass arguments to `patch` via keyword arguments. Note that at
@@ -1174,17 +1157,21 @@ module Google
1174
1157
  # Customize the options with defaults
1175
1158
  call_metadata = @config.rpcs.patch.metadata.to_h
1176
1159
 
1177
- # Set x-goog-api-client header
1160
+ # Set x-goog-api-client and x-goog-user-project headers
1178
1161
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1179
1162
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1180
1163
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1181
1164
  transports_version_send: [:rest]
1182
1165
 
1166
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1167
+
1183
1168
  options.apply_defaults timeout: @config.rpcs.patch.timeout,
1184
- metadata: call_metadata
1169
+ metadata: call_metadata,
1170
+ retry_policy: @config.rpcs.patch.retry_policy
1185
1171
 
1186
1172
  options.apply_defaults timeout: @config.timeout,
1187
- metadata: @config.metadata
1173
+ metadata: @config.metadata,
1174
+ retry_policy: @config.retry_policy
1188
1175
 
1189
1176
  @region_instance_group_managers_stub.patch request, options do |result, response|
1190
1177
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1199,12 +1186,8 @@ module Google
1199
1186
  yield result, response if block_given?
1200
1187
  return result
1201
1188
  end
1202
- rescue ::Faraday::Error => e
1203
- begin
1204
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1205
- rescue ::Gapic::Rest::Error => gapic_error
1206
- raise ::Google::Cloud::Error.from_error gapic_error
1207
- end
1189
+ rescue ::Gapic::Rest::Error => e
1190
+ raise ::Google::Cloud::Error.from_error(e)
1208
1191
  end
1209
1192
 
1210
1193
  ##
@@ -1219,8 +1202,6 @@ module Google
1219
1202
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1220
1203
  # @param options [::Gapic::CallOptions, ::Hash]
1221
1204
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1222
- # Note: currently retry functionality is not implemented. While it is possible
1223
- # to set it using ::Gapic::CallOptions, it will not be applied
1224
1205
  #
1225
1206
  # @overload patch_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_patch_instance_config_req_resource: nil, request_id: nil)
1226
1207
  # Pass arguments to `patch_per_instance_configs` via keyword arguments. Note that at
@@ -1255,17 +1236,21 @@ module Google
1255
1236
  # Customize the options with defaults
1256
1237
  call_metadata = @config.rpcs.patch_per_instance_configs.metadata.to_h
1257
1238
 
1258
- # Set x-goog-api-client header
1239
+ # Set x-goog-api-client and x-goog-user-project headers
1259
1240
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1260
1241
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1261
1242
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1262
1243
  transports_version_send: [:rest]
1263
1244
 
1245
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1246
+
1264
1247
  options.apply_defaults timeout: @config.rpcs.patch_per_instance_configs.timeout,
1265
- metadata: call_metadata
1248
+ metadata: call_metadata,
1249
+ retry_policy: @config.rpcs.patch_per_instance_configs.retry_policy
1266
1250
 
1267
1251
  options.apply_defaults timeout: @config.timeout,
1268
- metadata: @config.metadata
1252
+ metadata: @config.metadata,
1253
+ retry_policy: @config.retry_policy
1269
1254
 
1270
1255
  @region_instance_group_managers_stub.patch_per_instance_configs request, options do |result, response|
1271
1256
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1280,12 +1265,8 @@ module Google
1280
1265
  yield result, response if block_given?
1281
1266
  return result
1282
1267
  end
1283
- rescue ::Faraday::Error => e
1284
- begin
1285
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1286
- rescue ::Gapic::Rest::Error => gapic_error
1287
- raise ::Google::Cloud::Error.from_error gapic_error
1288
- end
1268
+ rescue ::Gapic::Rest::Error => e
1269
+ raise ::Google::Cloud::Error.from_error(e)
1289
1270
  end
1290
1271
 
1291
1272
  ##
@@ -1300,8 +1281,6 @@ module Google
1300
1281
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1301
1282
  # @param options [::Gapic::CallOptions, ::Hash]
1302
1283
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1303
- # Note: currently retry functionality is not implemented. While it is possible
1304
- # to set it using ::Gapic::CallOptions, it will not be applied
1305
1284
  #
1306
1285
  # @overload recreate_instances(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_recreate_request_resource: nil, request_id: nil)
1307
1286
  # Pass arguments to `recreate_instances` via keyword arguments. Note that at
@@ -1336,17 +1315,21 @@ module Google
1336
1315
  # Customize the options with defaults
1337
1316
  call_metadata = @config.rpcs.recreate_instances.metadata.to_h
1338
1317
 
1339
- # Set x-goog-api-client header
1318
+ # Set x-goog-api-client and x-goog-user-project headers
1340
1319
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1341
1320
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1342
1321
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1343
1322
  transports_version_send: [:rest]
1344
1323
 
1324
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1325
+
1345
1326
  options.apply_defaults timeout: @config.rpcs.recreate_instances.timeout,
1346
- metadata: call_metadata
1327
+ metadata: call_metadata,
1328
+ retry_policy: @config.rpcs.recreate_instances.retry_policy
1347
1329
 
1348
1330
  options.apply_defaults timeout: @config.timeout,
1349
- metadata: @config.metadata
1331
+ metadata: @config.metadata,
1332
+ retry_policy: @config.retry_policy
1350
1333
 
1351
1334
  @region_instance_group_managers_stub.recreate_instances request, options do |result, response|
1352
1335
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1361,12 +1344,8 @@ module Google
1361
1344
  yield result, response if block_given?
1362
1345
  return result
1363
1346
  end
1364
- rescue ::Faraday::Error => e
1365
- begin
1366
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1367
- rescue ::Gapic::Rest::Error => gapic_error
1368
- raise ::Google::Cloud::Error.from_error gapic_error
1369
- end
1347
+ rescue ::Gapic::Rest::Error => e
1348
+ raise ::Google::Cloud::Error.from_error(e)
1370
1349
  end
1371
1350
 
1372
1351
  ##
@@ -1381,8 +1360,6 @@ module Google
1381
1360
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1382
1361
  # @param options [::Gapic::CallOptions, ::Hash]
1383
1362
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1384
- # Note: currently retry functionality is not implemented. While it is possible
1385
- # to set it using ::Gapic::CallOptions, it will not be applied
1386
1363
  #
1387
1364
  # @overload resize(instance_group_manager: nil, project: nil, region: nil, request_id: nil, size: nil)
1388
1365
  # Pass arguments to `resize` via keyword arguments. Note that at
@@ -1417,17 +1394,21 @@ module Google
1417
1394
  # Customize the options with defaults
1418
1395
  call_metadata = @config.rpcs.resize.metadata.to_h
1419
1396
 
1420
- # Set x-goog-api-client header
1397
+ # Set x-goog-api-client and x-goog-user-project headers
1421
1398
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1422
1399
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1423
1400
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1424
1401
  transports_version_send: [:rest]
1425
1402
 
1403
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1404
+
1426
1405
  options.apply_defaults timeout: @config.rpcs.resize.timeout,
1427
- metadata: call_metadata
1406
+ metadata: call_metadata,
1407
+ retry_policy: @config.rpcs.resize.retry_policy
1428
1408
 
1429
1409
  options.apply_defaults timeout: @config.timeout,
1430
- metadata: @config.metadata
1410
+ metadata: @config.metadata,
1411
+ retry_policy: @config.retry_policy
1431
1412
 
1432
1413
  @region_instance_group_managers_stub.resize request, options do |result, response|
1433
1414
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1442,12 +1423,8 @@ module Google
1442
1423
  yield result, response if block_given?
1443
1424
  return result
1444
1425
  end
1445
- rescue ::Faraday::Error => e
1446
- begin
1447
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1448
- rescue ::Gapic::Rest::Error => gapic_error
1449
- raise ::Google::Cloud::Error.from_error gapic_error
1450
- end
1426
+ rescue ::Gapic::Rest::Error => e
1427
+ raise ::Google::Cloud::Error.from_error(e)
1451
1428
  end
1452
1429
 
1453
1430
  ##
@@ -1462,8 +1439,6 @@ module Google
1462
1439
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1463
1440
  # @param options [::Gapic::CallOptions, ::Hash]
1464
1441
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1465
- # Note: currently retry functionality is not implemented. While it is possible
1466
- # to set it using ::Gapic::CallOptions, it will not be applied
1467
1442
  #
1468
1443
  # @overload set_instance_template(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_set_template_request_resource: nil, request_id: nil)
1469
1444
  # Pass arguments to `set_instance_template` via keyword arguments. Note that at
@@ -1498,17 +1473,21 @@ module Google
1498
1473
  # Customize the options with defaults
1499
1474
  call_metadata = @config.rpcs.set_instance_template.metadata.to_h
1500
1475
 
1501
- # Set x-goog-api-client header
1476
+ # Set x-goog-api-client and x-goog-user-project headers
1502
1477
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1503
1478
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1504
1479
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1505
1480
  transports_version_send: [:rest]
1506
1481
 
1482
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1483
+
1507
1484
  options.apply_defaults timeout: @config.rpcs.set_instance_template.timeout,
1508
- metadata: call_metadata
1485
+ metadata: call_metadata,
1486
+ retry_policy: @config.rpcs.set_instance_template.retry_policy
1509
1487
 
1510
1488
  options.apply_defaults timeout: @config.timeout,
1511
- metadata: @config.metadata
1489
+ metadata: @config.metadata,
1490
+ retry_policy: @config.retry_policy
1512
1491
 
1513
1492
  @region_instance_group_managers_stub.set_instance_template request, options do |result, response|
1514
1493
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1523,12 +1502,8 @@ module Google
1523
1502
  yield result, response if block_given?
1524
1503
  return result
1525
1504
  end
1526
- rescue ::Faraday::Error => e
1527
- begin
1528
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1529
- rescue ::Gapic::Rest::Error => gapic_error
1530
- raise ::Google::Cloud::Error.from_error gapic_error
1531
- end
1505
+ rescue ::Gapic::Rest::Error => e
1506
+ raise ::Google::Cloud::Error.from_error(e)
1532
1507
  end
1533
1508
 
1534
1509
  ##
@@ -1543,8 +1518,6 @@ module Google
1543
1518
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1544
1519
  # @param options [::Gapic::CallOptions, ::Hash]
1545
1520
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1546
- # Note: currently retry functionality is not implemented. While it is possible
1547
- # to set it using ::Gapic::CallOptions, it will not be applied
1548
1521
  #
1549
1522
  # @overload set_target_pools(instance_group_manager: nil, project: nil, region: nil, region_instance_group_managers_set_target_pools_request_resource: nil, request_id: nil)
1550
1523
  # Pass arguments to `set_target_pools` via keyword arguments. Note that at
@@ -1579,17 +1552,21 @@ module Google
1579
1552
  # Customize the options with defaults
1580
1553
  call_metadata = @config.rpcs.set_target_pools.metadata.to_h
1581
1554
 
1582
- # Set x-goog-api-client header
1555
+ # Set x-goog-api-client and x-goog-user-project headers
1583
1556
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1584
1557
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1585
1558
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1586
1559
  transports_version_send: [:rest]
1587
1560
 
1561
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1562
+
1588
1563
  options.apply_defaults timeout: @config.rpcs.set_target_pools.timeout,
1589
- metadata: call_metadata
1564
+ metadata: call_metadata,
1565
+ retry_policy: @config.rpcs.set_target_pools.retry_policy
1590
1566
 
1591
1567
  options.apply_defaults timeout: @config.timeout,
1592
- metadata: @config.metadata
1568
+ metadata: @config.metadata,
1569
+ retry_policy: @config.retry_policy
1593
1570
 
1594
1571
  @region_instance_group_managers_stub.set_target_pools request, options do |result, response|
1595
1572
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1604,12 +1581,8 @@ module Google
1604
1581
  yield result, response if block_given?
1605
1582
  return result
1606
1583
  end
1607
- rescue ::Faraday::Error => e
1608
- begin
1609
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1610
- rescue ::Gapic::Rest::Error => gapic_error
1611
- raise ::Google::Cloud::Error.from_error gapic_error
1612
- end
1584
+ rescue ::Gapic::Rest::Error => e
1585
+ raise ::Google::Cloud::Error.from_error(e)
1613
1586
  end
1614
1587
 
1615
1588
  ##
@@ -1624,8 +1597,6 @@ module Google
1624
1597
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1625
1598
  # @param options [::Gapic::CallOptions, ::Hash]
1626
1599
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1627
- # Note: currently retry functionality is not implemented. While it is possible
1628
- # to set it using ::Gapic::CallOptions, it will not be applied
1629
1600
  #
1630
1601
  # @overload update_per_instance_configs(instance_group_manager: nil, project: nil, region: nil, region_instance_group_manager_update_instance_config_req_resource: nil, request_id: nil)
1631
1602
  # Pass arguments to `update_per_instance_configs` via keyword arguments. Note that at
@@ -1660,17 +1631,21 @@ module Google
1660
1631
  # Customize the options with defaults
1661
1632
  call_metadata = @config.rpcs.update_per_instance_configs.metadata.to_h
1662
1633
 
1663
- # Set x-goog-api-client header
1634
+ # Set x-goog-api-client and x-goog-user-project headers
1664
1635
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1665
1636
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1666
1637
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1667
1638
  transports_version_send: [:rest]
1668
1639
 
1640
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1641
+
1669
1642
  options.apply_defaults timeout: @config.rpcs.update_per_instance_configs.timeout,
1670
- metadata: call_metadata
1643
+ metadata: call_metadata,
1644
+ retry_policy: @config.rpcs.update_per_instance_configs.retry_policy
1671
1645
 
1672
1646
  options.apply_defaults timeout: @config.timeout,
1673
- metadata: @config.metadata
1647
+ metadata: @config.metadata,
1648
+ retry_policy: @config.retry_policy
1674
1649
 
1675
1650
  @region_instance_group_managers_stub.update_per_instance_configs request, options do |result, response|
1676
1651
  result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
@@ -1685,36 +1660,38 @@ module Google
1685
1660
  yield result, response if block_given?
1686
1661
  return result
1687
1662
  end
1688
- rescue ::Faraday::Error => e
1689
- begin
1690
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1691
- rescue ::Gapic::Rest::Error => gapic_error
1692
- raise ::Google::Cloud::Error.from_error gapic_error
1693
- end
1663
+ rescue ::Gapic::Rest::Error => e
1664
+ raise ::Google::Cloud::Error.from_error(e)
1694
1665
  end
1695
1666
 
1696
1667
  ##
1697
1668
  # Configuration class for the RegionInstanceGroupManagers REST API.
1698
1669
  #
1699
1670
  # This class represents the configuration for RegionInstanceGroupManagers REST,
1700
- # providing control over credentials, timeouts, retry behavior, logging.
1671
+ # providing control over timeouts, retry behavior, logging, transport
1672
+ # parameters, and other low-level controls. Certain parameters can also be
1673
+ # applied individually to specific RPCs. See
1674
+ # {::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client::Configuration::Rpcs}
1675
+ # for a list of RPCs that can be configured independently.
1701
1676
  #
1702
1677
  # Configuration can be applied globally to all clients, or to a single client
1703
1678
  # on construction.
1704
1679
  #
1705
- # # Examples
1706
- #
1707
- # To modify the global config, setting the timeout for all calls to 10 seconds:
1708
- #
1709
- # ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Client.configure do |config|
1710
- # config.timeout = 10.0
1711
- # end
1680
+ # @example
1712
1681
  #
1713
- # To apply the above configuration only to a new client:
1682
+ # # Modify the global config, setting the timeout for
1683
+ # # abandon_instances to 20 seconds,
1684
+ # # and all remaining timeouts to 10 seconds.
1685
+ # ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.configure do |config|
1686
+ # config.timeout = 10.0
1687
+ # config.rpcs.abandon_instances.timeout = 20.0
1688
+ # end
1714
1689
  #
1715
- # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Client.new do |config|
1716
- # config.timeout = 10.0
1717
- # end
1690
+ # # Apply the above configuration only to a new client.
1691
+ # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagers::Rest::Client.new do |config|
1692
+ # config.timeout = 10.0
1693
+ # config.rpcs.abandon_instances.timeout = 20.0
1694
+ # end
1718
1695
  #
1719
1696
  # @!attribute [rw] endpoint
1720
1697
  # The hostname or hostname:port of the service endpoint.
@@ -1743,8 +1720,19 @@ module Google
1743
1720
  # The call timeout in seconds.
1744
1721
  # @return [::Numeric]
1745
1722
  # @!attribute [rw] metadata
1746
- # Additional REST headers to be sent with the call.
1723
+ # Additional headers to be sent with the call.
1747
1724
  # @return [::Hash{::Symbol=>::String}]
1725
+ # @!attribute [rw] retry_policy
1726
+ # The retry policy. The value is a hash with the following keys:
1727
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1728
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1729
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1730
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1731
+ # trigger a retry.
1732
+ # @return [::Hash]
1733
+ # @!attribute [rw] quota_project
1734
+ # A separate project against which to charge quota.
1735
+ # @return [::String]
1748
1736
  #
1749
1737
  class Configuration
1750
1738
  extend ::Gapic::Config
@@ -1759,6 +1747,8 @@ module Google
1759
1747
  config_attr :lib_version, nil, ::String, nil
1760
1748
  config_attr :timeout, nil, ::Numeric, nil
1761
1749
  config_attr :metadata, nil, ::Hash, nil
1750
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1751
+ config_attr :quota_project, nil, ::String, nil
1762
1752
 
1763
1753
  # @private
1764
1754
  def initialize parent_config = nil
@@ -1787,9 +1777,14 @@ module Google
1787
1777
  # the following configuration fields:
1788
1778
  #
1789
1779
  # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1790
- #
1791
- # there is one other field (`retry_policy`) that can be set
1792
- # but is currently not supported for REST Gapic libraries.
1780
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1781
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1782
+ # include the following keys:
1783
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1784
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1785
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1786
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1787
+ # trigger a retry.
1793
1788
  #
1794
1789
  class Rpcs
1795
1790
  ##