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
@@ -154,13 +154,22 @@ module Google
154
154
 
155
155
  # Create credentials
156
156
  credentials = @config.credentials
157
- credentials ||= Credentials.default scope: @config.scope
157
+ # Use self-signed JWT if the endpoint is unchanged from default,
158
+ # but only if the default endpoint does not have a region prefix.
159
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
160
+ !@config.endpoint.split(".").first.include?("-")
161
+ credentials ||= Credentials.default scope: @config.scope,
162
+ enable_self_signed_jwt: enable_self_signed_jwt
158
163
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
159
164
  credentials = Credentials.new credentials, scope: @config.scope
160
165
  end
161
166
 
167
+ @quota_project_id = @config.quota_project
168
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
169
+
162
170
  @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client.new do |config|
163
171
  config.credentials = credentials
172
+ config.quota_project = @quota_project_id
164
173
  config.endpoint = @config.endpoint
165
174
  end
166
175
 
@@ -188,8 +197,6 @@ module Google
188
197
  # parameters, or to keep all the default parameter values, pass an empty Hash.
189
198
  # @param options [::Gapic::CallOptions, ::Hash]
190
199
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
191
- # Note: currently retry functionality is not implemented. While it is possible
192
- # to set it using ::Gapic::CallOptions, it will not be applied
193
200
  #
194
201
  # @overload add_nodes(node_group: nil, node_groups_add_nodes_request_resource: nil, project: nil, request_id: nil, zone: nil)
195
202
  # Pass arguments to `add_nodes` via keyword arguments. Note that at
@@ -224,17 +231,21 @@ module Google
224
231
  # Customize the options with defaults
225
232
  call_metadata = @config.rpcs.add_nodes.metadata.to_h
226
233
 
227
- # Set x-goog-api-client header
234
+ # Set x-goog-api-client and x-goog-user-project headers
228
235
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
229
236
  lib_name: @config.lib_name, lib_version: @config.lib_version,
230
237
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
231
238
  transports_version_send: [:rest]
232
239
 
240
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
241
+
233
242
  options.apply_defaults timeout: @config.rpcs.add_nodes.timeout,
234
- metadata: call_metadata
243
+ metadata: call_metadata,
244
+ retry_policy: @config.rpcs.add_nodes.retry_policy
235
245
 
236
246
  options.apply_defaults timeout: @config.timeout,
237
- metadata: @config.metadata
247
+ metadata: @config.metadata,
248
+ retry_policy: @config.retry_policy
238
249
 
239
250
  @node_groups_stub.add_nodes request, options do |result, response|
240
251
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -249,12 +260,8 @@ module Google
249
260
  yield result, response if block_given?
250
261
  return result
251
262
  end
252
- rescue ::Faraday::Error => e
253
- begin
254
- raise ::Gapic::Rest::Error.wrap_faraday_error e
255
- rescue ::Gapic::Rest::Error => gapic_error
256
- raise ::Google::Cloud::Error.from_error gapic_error
257
- end
263
+ rescue ::Gapic::Rest::Error => e
264
+ raise ::Google::Cloud::Error.from_error(e)
258
265
  end
259
266
 
260
267
  ##
@@ -269,8 +276,6 @@ module Google
269
276
  # parameters, or to keep all the default parameter values, pass an empty Hash.
270
277
  # @param options [::Gapic::CallOptions, ::Hash]
271
278
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
272
- # Note: currently retry functionality is not implemented. While it is possible
273
- # to set it using ::Gapic::CallOptions, it will not be applied
274
279
  #
275
280
  # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
276
281
  # Pass arguments to `aggregated_list` via keyword arguments. Note that at
@@ -309,29 +314,29 @@ module Google
309
314
  # Customize the options with defaults
310
315
  call_metadata = @config.rpcs.aggregated_list.metadata.to_h
311
316
 
312
- # Set x-goog-api-client header
317
+ # Set x-goog-api-client and x-goog-user-project headers
313
318
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
314
319
  lib_name: @config.lib_name, lib_version: @config.lib_version,
315
320
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
316
321
  transports_version_send: [:rest]
317
322
 
323
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
324
+
318
325
  options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
319
- metadata: call_metadata
326
+ metadata: call_metadata,
327
+ retry_policy: @config.rpcs.aggregated_list.retry_policy
320
328
 
321
329
  options.apply_defaults timeout: @config.timeout,
322
- metadata: @config.metadata
330
+ metadata: @config.metadata,
331
+ retry_policy: @config.retry_policy
323
332
 
324
333
  @node_groups_stub.aggregated_list request, options do |result, response|
325
334
  result = ::Gapic::Rest::PagedEnumerable.new @node_groups_stub, :aggregated_list, "items", request, result, options
326
335
  yield result, response if block_given?
327
336
  return result
328
337
  end
329
- rescue ::Faraday::Error => e
330
- begin
331
- raise ::Gapic::Rest::Error.wrap_faraday_error e
332
- rescue ::Gapic::Rest::Error => gapic_error
333
- raise ::Google::Cloud::Error.from_error gapic_error
334
- end
338
+ rescue ::Gapic::Rest::Error => e
339
+ raise ::Google::Cloud::Error.from_error(e)
335
340
  end
336
341
 
337
342
  ##
@@ -346,8 +351,6 @@ module Google
346
351
  # parameters, or to keep all the default parameter values, pass an empty Hash.
347
352
  # @param options [::Gapic::CallOptions, ::Hash]
348
353
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
349
- # Note: currently retry functionality is not implemented. While it is possible
350
- # to set it using ::Gapic::CallOptions, it will not be applied
351
354
  #
352
355
  # @overload delete(node_group: nil, project: nil, request_id: nil, zone: nil)
353
356
  # Pass arguments to `delete` via keyword arguments. Note that at
@@ -380,17 +383,21 @@ module Google
380
383
  # Customize the options with defaults
381
384
  call_metadata = @config.rpcs.delete.metadata.to_h
382
385
 
383
- # Set x-goog-api-client header
386
+ # Set x-goog-api-client and x-goog-user-project headers
384
387
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
385
388
  lib_name: @config.lib_name, lib_version: @config.lib_version,
386
389
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
387
390
  transports_version_send: [:rest]
388
391
 
392
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
393
+
389
394
  options.apply_defaults timeout: @config.rpcs.delete.timeout,
390
- metadata: call_metadata
395
+ metadata: call_metadata,
396
+ retry_policy: @config.rpcs.delete.retry_policy
391
397
 
392
398
  options.apply_defaults timeout: @config.timeout,
393
- metadata: @config.metadata
399
+ metadata: @config.metadata,
400
+ retry_policy: @config.retry_policy
394
401
 
395
402
  @node_groups_stub.delete request, options do |result, response|
396
403
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -405,12 +412,8 @@ module Google
405
412
  yield result, response if block_given?
406
413
  return result
407
414
  end
408
- rescue ::Faraday::Error => e
409
- begin
410
- raise ::Gapic::Rest::Error.wrap_faraday_error e
411
- rescue ::Gapic::Rest::Error => gapic_error
412
- raise ::Google::Cloud::Error.from_error gapic_error
413
- end
415
+ rescue ::Gapic::Rest::Error => e
416
+ raise ::Google::Cloud::Error.from_error(e)
414
417
  end
415
418
 
416
419
  ##
@@ -425,8 +428,6 @@ module Google
425
428
  # parameters, or to keep all the default parameter values, pass an empty Hash.
426
429
  # @param options [::Gapic::CallOptions, ::Hash]
427
430
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
428
- # Note: currently retry functionality is not implemented. While it is possible
429
- # to set it using ::Gapic::CallOptions, it will not be applied
430
431
  #
431
432
  # @overload delete_nodes(node_group: nil, node_groups_delete_nodes_request_resource: nil, project: nil, request_id: nil, zone: nil)
432
433
  # Pass arguments to `delete_nodes` via keyword arguments. Note that at
@@ -461,17 +462,21 @@ module Google
461
462
  # Customize the options with defaults
462
463
  call_metadata = @config.rpcs.delete_nodes.metadata.to_h
463
464
 
464
- # Set x-goog-api-client header
465
+ # Set x-goog-api-client and x-goog-user-project headers
465
466
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
466
467
  lib_name: @config.lib_name, lib_version: @config.lib_version,
467
468
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
468
469
  transports_version_send: [:rest]
469
470
 
471
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
472
+
470
473
  options.apply_defaults timeout: @config.rpcs.delete_nodes.timeout,
471
- metadata: call_metadata
474
+ metadata: call_metadata,
475
+ retry_policy: @config.rpcs.delete_nodes.retry_policy
472
476
 
473
477
  options.apply_defaults timeout: @config.timeout,
474
- metadata: @config.metadata
478
+ metadata: @config.metadata,
479
+ retry_policy: @config.retry_policy
475
480
 
476
481
  @node_groups_stub.delete_nodes request, options do |result, response|
477
482
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -486,12 +491,8 @@ module Google
486
491
  yield result, response if block_given?
487
492
  return result
488
493
  end
489
- rescue ::Faraday::Error => e
490
- begin
491
- raise ::Gapic::Rest::Error.wrap_faraday_error e
492
- rescue ::Gapic::Rest::Error => gapic_error
493
- raise ::Google::Cloud::Error.from_error gapic_error
494
- end
494
+ rescue ::Gapic::Rest::Error => e
495
+ raise ::Google::Cloud::Error.from_error(e)
495
496
  end
496
497
 
497
498
  ##
@@ -506,8 +507,6 @@ module Google
506
507
  # parameters, or to keep all the default parameter values, pass an empty Hash.
507
508
  # @param options [::Gapic::CallOptions, ::Hash]
508
509
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
509
- # Note: currently retry functionality is not implemented. While it is possible
510
- # to set it using ::Gapic::CallOptions, it will not be applied
511
510
  #
512
511
  # @overload get(node_group: nil, project: nil, zone: nil)
513
512
  # Pass arguments to `get` via keyword arguments. Note that at
@@ -538,28 +537,28 @@ module Google
538
537
  # Customize the options with defaults
539
538
  call_metadata = @config.rpcs.get.metadata.to_h
540
539
 
541
- # Set x-goog-api-client header
540
+ # Set x-goog-api-client and x-goog-user-project headers
542
541
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
543
542
  lib_name: @config.lib_name, lib_version: @config.lib_version,
544
543
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
545
544
  transports_version_send: [:rest]
546
545
 
546
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
547
+
547
548
  options.apply_defaults timeout: @config.rpcs.get.timeout,
548
- metadata: call_metadata
549
+ metadata: call_metadata,
550
+ retry_policy: @config.rpcs.get.retry_policy
549
551
 
550
552
  options.apply_defaults timeout: @config.timeout,
551
- metadata: @config.metadata
553
+ metadata: @config.metadata,
554
+ retry_policy: @config.retry_policy
552
555
 
553
556
  @node_groups_stub.get request, options do |result, response|
554
557
  yield result, response if block_given?
555
558
  return result
556
559
  end
557
- rescue ::Faraday::Error => e
558
- begin
559
- raise ::Gapic::Rest::Error.wrap_faraday_error e
560
- rescue ::Gapic::Rest::Error => gapic_error
561
- raise ::Google::Cloud::Error.from_error gapic_error
562
- end
560
+ rescue ::Gapic::Rest::Error => e
561
+ raise ::Google::Cloud::Error.from_error(e)
563
562
  end
564
563
 
565
564
  ##
@@ -574,8 +573,6 @@ module Google
574
573
  # parameters, or to keep all the default parameter values, pass an empty Hash.
575
574
  # @param options [::Gapic::CallOptions, ::Hash]
576
575
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
577
- # Note: currently retry functionality is not implemented. While it is possible
578
- # to set it using ::Gapic::CallOptions, it will not be applied
579
576
  #
580
577
  # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil, zone: nil)
581
578
  # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
@@ -608,28 +605,28 @@ module Google
608
605
  # Customize the options with defaults
609
606
  call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
610
607
 
611
- # Set x-goog-api-client header
608
+ # Set x-goog-api-client and x-goog-user-project headers
612
609
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
613
610
  lib_name: @config.lib_name, lib_version: @config.lib_version,
614
611
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
615
612
  transports_version_send: [:rest]
616
613
 
614
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
615
+
617
616
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
618
- metadata: call_metadata
617
+ metadata: call_metadata,
618
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
619
619
 
620
620
  options.apply_defaults timeout: @config.timeout,
621
- metadata: @config.metadata
621
+ metadata: @config.metadata,
622
+ retry_policy: @config.retry_policy
622
623
 
623
624
  @node_groups_stub.get_iam_policy request, options do |result, response|
624
625
  yield result, response if block_given?
625
626
  return result
626
627
  end
627
- rescue ::Faraday::Error => e
628
- begin
629
- raise ::Gapic::Rest::Error.wrap_faraday_error e
630
- rescue ::Gapic::Rest::Error => gapic_error
631
- raise ::Google::Cloud::Error.from_error gapic_error
632
- end
628
+ rescue ::Gapic::Rest::Error => e
629
+ raise ::Google::Cloud::Error.from_error(e)
633
630
  end
634
631
 
635
632
  ##
@@ -644,8 +641,6 @@ module Google
644
641
  # parameters, or to keep all the default parameter values, pass an empty Hash.
645
642
  # @param options [::Gapic::CallOptions, ::Hash]
646
643
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
647
- # Note: currently retry functionality is not implemented. While it is possible
648
- # to set it using ::Gapic::CallOptions, it will not be applied
649
644
  #
650
645
  # @overload insert(initial_node_count: nil, node_group_resource: nil, project: nil, request_id: nil, zone: nil)
651
646
  # Pass arguments to `insert` via keyword arguments. Note that at
@@ -680,17 +675,21 @@ module Google
680
675
  # Customize the options with defaults
681
676
  call_metadata = @config.rpcs.insert.metadata.to_h
682
677
 
683
- # Set x-goog-api-client header
678
+ # Set x-goog-api-client and x-goog-user-project headers
684
679
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
685
680
  lib_name: @config.lib_name, lib_version: @config.lib_version,
686
681
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
687
682
  transports_version_send: [:rest]
688
683
 
684
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
685
+
689
686
  options.apply_defaults timeout: @config.rpcs.insert.timeout,
690
- metadata: call_metadata
687
+ metadata: call_metadata,
688
+ retry_policy: @config.rpcs.insert.retry_policy
691
689
 
692
690
  options.apply_defaults timeout: @config.timeout,
693
- metadata: @config.metadata
691
+ metadata: @config.metadata,
692
+ retry_policy: @config.retry_policy
694
693
 
695
694
  @node_groups_stub.insert request, options do |result, response|
696
695
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -705,12 +704,8 @@ module Google
705
704
  yield result, response if block_given?
706
705
  return result
707
706
  end
708
- rescue ::Faraday::Error => e
709
- begin
710
- raise ::Gapic::Rest::Error.wrap_faraday_error e
711
- rescue ::Gapic::Rest::Error => gapic_error
712
- raise ::Google::Cloud::Error.from_error gapic_error
713
- end
707
+ rescue ::Gapic::Rest::Error => e
708
+ raise ::Google::Cloud::Error.from_error(e)
714
709
  end
715
710
 
716
711
  ##
@@ -725,8 +720,6 @@ module Google
725
720
  # parameters, or to keep all the default parameter values, pass an empty Hash.
726
721
  # @param options [::Gapic::CallOptions, ::Hash]
727
722
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
728
- # Note: currently retry functionality is not implemented. While it is possible
729
- # to set it using ::Gapic::CallOptions, it will not be applied
730
723
  #
731
724
  # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
732
725
  # Pass arguments to `list` via keyword arguments. Note that at
@@ -765,29 +758,29 @@ module Google
765
758
  # Customize the options with defaults
766
759
  call_metadata = @config.rpcs.list.metadata.to_h
767
760
 
768
- # Set x-goog-api-client header
761
+ # Set x-goog-api-client and x-goog-user-project headers
769
762
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
770
763
  lib_name: @config.lib_name, lib_version: @config.lib_version,
771
764
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
772
765
  transports_version_send: [:rest]
773
766
 
767
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
768
+
774
769
  options.apply_defaults timeout: @config.rpcs.list.timeout,
775
- metadata: call_metadata
770
+ metadata: call_metadata,
771
+ retry_policy: @config.rpcs.list.retry_policy
776
772
 
777
773
  options.apply_defaults timeout: @config.timeout,
778
- metadata: @config.metadata
774
+ metadata: @config.metadata,
775
+ retry_policy: @config.retry_policy
779
776
 
780
777
  @node_groups_stub.list request, options do |result, response|
781
778
  result = ::Gapic::Rest::PagedEnumerable.new @node_groups_stub, :list, "items", request, result, options
782
779
  yield result, response if block_given?
783
780
  return result
784
781
  end
785
- rescue ::Faraday::Error => e
786
- begin
787
- raise ::Gapic::Rest::Error.wrap_faraday_error e
788
- rescue ::Gapic::Rest::Error => gapic_error
789
- raise ::Google::Cloud::Error.from_error gapic_error
790
- end
782
+ rescue ::Gapic::Rest::Error => e
783
+ raise ::Google::Cloud::Error.from_error(e)
791
784
  end
792
785
 
793
786
  ##
@@ -802,8 +795,6 @@ module Google
802
795
  # parameters, or to keep all the default parameter values, pass an empty Hash.
803
796
  # @param options [::Gapic::CallOptions, ::Hash]
804
797
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
805
- # Note: currently retry functionality is not implemented. While it is possible
806
- # to set it using ::Gapic::CallOptions, it will not be applied
807
798
  #
808
799
  # @overload list_nodes(filter: nil, max_results: nil, node_group: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
809
800
  # Pass arguments to `list_nodes` via keyword arguments. Note that at
@@ -844,29 +835,29 @@ module Google
844
835
  # Customize the options with defaults
845
836
  call_metadata = @config.rpcs.list_nodes.metadata.to_h
846
837
 
847
- # Set x-goog-api-client header
838
+ # Set x-goog-api-client and x-goog-user-project headers
848
839
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
849
840
  lib_name: @config.lib_name, lib_version: @config.lib_version,
850
841
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
851
842
  transports_version_send: [:rest]
852
843
 
844
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
845
+
853
846
  options.apply_defaults timeout: @config.rpcs.list_nodes.timeout,
854
- metadata: call_metadata
847
+ metadata: call_metadata,
848
+ retry_policy: @config.rpcs.list_nodes.retry_policy
855
849
 
856
850
  options.apply_defaults timeout: @config.timeout,
857
- metadata: @config.metadata
851
+ metadata: @config.metadata,
852
+ retry_policy: @config.retry_policy
858
853
 
859
854
  @node_groups_stub.list_nodes request, options do |result, response|
860
855
  result = ::Gapic::Rest::PagedEnumerable.new @node_groups_stub, :list_nodes, "items", request, result, options
861
856
  yield result, response if block_given?
862
857
  return result
863
858
  end
864
- rescue ::Faraday::Error => e
865
- begin
866
- raise ::Gapic::Rest::Error.wrap_faraday_error e
867
- rescue ::Gapic::Rest::Error => gapic_error
868
- raise ::Google::Cloud::Error.from_error gapic_error
869
- end
859
+ rescue ::Gapic::Rest::Error => e
860
+ raise ::Google::Cloud::Error.from_error(e)
870
861
  end
871
862
 
872
863
  ##
@@ -881,8 +872,6 @@ module Google
881
872
  # parameters, or to keep all the default parameter values, pass an empty Hash.
882
873
  # @param options [::Gapic::CallOptions, ::Hash]
883
874
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
884
- # Note: currently retry functionality is not implemented. While it is possible
885
- # to set it using ::Gapic::CallOptions, it will not be applied
886
875
  #
887
876
  # @overload patch(node_group: nil, node_group_resource: nil, project: nil, request_id: nil, zone: nil)
888
877
  # Pass arguments to `patch` via keyword arguments. Note that at
@@ -917,17 +906,21 @@ module Google
917
906
  # Customize the options with defaults
918
907
  call_metadata = @config.rpcs.patch.metadata.to_h
919
908
 
920
- # Set x-goog-api-client header
909
+ # Set x-goog-api-client and x-goog-user-project headers
921
910
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
922
911
  lib_name: @config.lib_name, lib_version: @config.lib_version,
923
912
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
924
913
  transports_version_send: [:rest]
925
914
 
915
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
916
+
926
917
  options.apply_defaults timeout: @config.rpcs.patch.timeout,
927
- metadata: call_metadata
918
+ metadata: call_metadata,
919
+ retry_policy: @config.rpcs.patch.retry_policy
928
920
 
929
921
  options.apply_defaults timeout: @config.timeout,
930
- metadata: @config.metadata
922
+ metadata: @config.metadata,
923
+ retry_policy: @config.retry_policy
931
924
 
932
925
  @node_groups_stub.patch request, options do |result, response|
933
926
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -942,12 +935,8 @@ module Google
942
935
  yield result, response if block_given?
943
936
  return result
944
937
  end
945
- rescue ::Faraday::Error => e
946
- begin
947
- raise ::Gapic::Rest::Error.wrap_faraday_error e
948
- rescue ::Gapic::Rest::Error => gapic_error
949
- raise ::Google::Cloud::Error.from_error gapic_error
950
- end
938
+ rescue ::Gapic::Rest::Error => e
939
+ raise ::Google::Cloud::Error.from_error(e)
951
940
  end
952
941
 
953
942
  ##
@@ -962,8 +951,6 @@ module Google
962
951
  # parameters, or to keep all the default parameter values, pass an empty Hash.
963
952
  # @param options [::Gapic::CallOptions, ::Hash]
964
953
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
965
- # Note: currently retry functionality is not implemented. While it is possible
966
- # to set it using ::Gapic::CallOptions, it will not be applied
967
954
  #
968
955
  # @overload set_iam_policy(project: nil, resource: nil, zone: nil, zone_set_policy_request_resource: nil)
969
956
  # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
@@ -996,28 +983,28 @@ module Google
996
983
  # Customize the options with defaults
997
984
  call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
998
985
 
999
- # Set x-goog-api-client header
986
+ # Set x-goog-api-client and x-goog-user-project headers
1000
987
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1001
988
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1002
989
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1003
990
  transports_version_send: [:rest]
1004
991
 
992
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
993
+
1005
994
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1006
- metadata: call_metadata
995
+ metadata: call_metadata,
996
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
1007
997
 
1008
998
  options.apply_defaults timeout: @config.timeout,
1009
- metadata: @config.metadata
999
+ metadata: @config.metadata,
1000
+ retry_policy: @config.retry_policy
1010
1001
 
1011
1002
  @node_groups_stub.set_iam_policy request, options do |result, response|
1012
1003
  yield result, response if block_given?
1013
1004
  return result
1014
1005
  end
1015
- rescue ::Faraday::Error => e
1016
- begin
1017
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1018
- rescue ::Gapic::Rest::Error => gapic_error
1019
- raise ::Google::Cloud::Error.from_error gapic_error
1020
- end
1006
+ rescue ::Gapic::Rest::Error => e
1007
+ raise ::Google::Cloud::Error.from_error(e)
1021
1008
  end
1022
1009
 
1023
1010
  ##
@@ -1032,8 +1019,6 @@ module Google
1032
1019
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1033
1020
  # @param options [::Gapic::CallOptions, ::Hash]
1034
1021
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1035
- # Note: currently retry functionality is not implemented. While it is possible
1036
- # to set it using ::Gapic::CallOptions, it will not be applied
1037
1022
  #
1038
1023
  # @overload set_node_template(node_group: nil, node_groups_set_node_template_request_resource: nil, project: nil, request_id: nil, zone: nil)
1039
1024
  # Pass arguments to `set_node_template` via keyword arguments. Note that at
@@ -1068,17 +1053,21 @@ module Google
1068
1053
  # Customize the options with defaults
1069
1054
  call_metadata = @config.rpcs.set_node_template.metadata.to_h
1070
1055
 
1071
- # Set x-goog-api-client header
1056
+ # Set x-goog-api-client and x-goog-user-project headers
1072
1057
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1073
1058
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1074
1059
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1075
1060
  transports_version_send: [:rest]
1076
1061
 
1062
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1063
+
1077
1064
  options.apply_defaults timeout: @config.rpcs.set_node_template.timeout,
1078
- metadata: call_metadata
1065
+ metadata: call_metadata,
1066
+ retry_policy: @config.rpcs.set_node_template.retry_policy
1079
1067
 
1080
1068
  options.apply_defaults timeout: @config.timeout,
1081
- metadata: @config.metadata
1069
+ metadata: @config.metadata,
1070
+ retry_policy: @config.retry_policy
1082
1071
 
1083
1072
  @node_groups_stub.set_node_template request, options do |result, response|
1084
1073
  result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
@@ -1093,12 +1082,8 @@ module Google
1093
1082
  yield result, response if block_given?
1094
1083
  return result
1095
1084
  end
1096
- rescue ::Faraday::Error => e
1097
- begin
1098
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1099
- rescue ::Gapic::Rest::Error => gapic_error
1100
- raise ::Google::Cloud::Error.from_error gapic_error
1101
- end
1085
+ rescue ::Gapic::Rest::Error => e
1086
+ raise ::Google::Cloud::Error.from_error(e)
1102
1087
  end
1103
1088
 
1104
1089
  ##
@@ -1113,8 +1098,6 @@ module Google
1113
1098
  # parameters, or to keep all the default parameter values, pass an empty Hash.
1114
1099
  # @param options [::Gapic::CallOptions, ::Hash]
1115
1100
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1116
- # Note: currently retry functionality is not implemented. While it is possible
1117
- # to set it using ::Gapic::CallOptions, it will not be applied
1118
1101
  #
1119
1102
  # @overload test_iam_permissions(project: nil, resource: nil, test_permissions_request_resource: nil, zone: nil)
1120
1103
  # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
@@ -1147,52 +1130,58 @@ module Google
1147
1130
  # Customize the options with defaults
1148
1131
  call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
1149
1132
 
1150
- # Set x-goog-api-client header
1133
+ # Set x-goog-api-client and x-goog-user-project headers
1151
1134
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1152
1135
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1153
1136
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1154
1137
  transports_version_send: [:rest]
1155
1138
 
1139
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1140
+
1156
1141
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
1157
- metadata: call_metadata
1142
+ metadata: call_metadata,
1143
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
1158
1144
 
1159
1145
  options.apply_defaults timeout: @config.timeout,
1160
- metadata: @config.metadata
1146
+ metadata: @config.metadata,
1147
+ retry_policy: @config.retry_policy
1161
1148
 
1162
1149
  @node_groups_stub.test_iam_permissions request, options do |result, response|
1163
1150
  yield result, response if block_given?
1164
1151
  return result
1165
1152
  end
1166
- rescue ::Faraday::Error => e
1167
- begin
1168
- raise ::Gapic::Rest::Error.wrap_faraday_error e
1169
- rescue ::Gapic::Rest::Error => gapic_error
1170
- raise ::Google::Cloud::Error.from_error gapic_error
1171
- end
1153
+ rescue ::Gapic::Rest::Error => e
1154
+ raise ::Google::Cloud::Error.from_error(e)
1172
1155
  end
1173
1156
 
1174
1157
  ##
1175
1158
  # Configuration class for the NodeGroups REST API.
1176
1159
  #
1177
1160
  # This class represents the configuration for NodeGroups REST,
1178
- # providing control over credentials, timeouts, retry behavior, logging.
1161
+ # providing control over timeouts, retry behavior, logging, transport
1162
+ # parameters, and other low-level controls. Certain parameters can also be
1163
+ # applied individually to specific RPCs. See
1164
+ # {::Google::Cloud::Compute::V1::NodeGroups::Rest::Client::Configuration::Rpcs}
1165
+ # for a list of RPCs that can be configured independently.
1179
1166
  #
1180
1167
  # Configuration can be applied globally to all clients, or to a single client
1181
1168
  # on construction.
1182
1169
  #
1183
- # # Examples
1184
- #
1185
- # To modify the global config, setting the timeout for all calls to 10 seconds:
1186
- #
1187
- # ::Google::Cloud::Compute::V1::NodeGroups::Client.configure do |config|
1188
- # config.timeout = 10.0
1189
- # end
1170
+ # @example
1190
1171
  #
1191
- # To apply the above configuration only to a new client:
1172
+ # # Modify the global config, setting the timeout for
1173
+ # # add_nodes to 20 seconds,
1174
+ # # and all remaining timeouts to 10 seconds.
1175
+ # ::Google::Cloud::Compute::V1::NodeGroups::Rest::Client.configure do |config|
1176
+ # config.timeout = 10.0
1177
+ # config.rpcs.add_nodes.timeout = 20.0
1178
+ # end
1192
1179
  #
1193
- # client = ::Google::Cloud::Compute::V1::NodeGroups::Client.new do |config|
1194
- # config.timeout = 10.0
1195
- # end
1180
+ # # Apply the above configuration only to a new client.
1181
+ # client = ::Google::Cloud::Compute::V1::NodeGroups::Rest::Client.new do |config|
1182
+ # config.timeout = 10.0
1183
+ # config.rpcs.add_nodes.timeout = 20.0
1184
+ # end
1196
1185
  #
1197
1186
  # @!attribute [rw] endpoint
1198
1187
  # The hostname or hostname:port of the service endpoint.
@@ -1221,8 +1210,19 @@ module Google
1221
1210
  # The call timeout in seconds.
1222
1211
  # @return [::Numeric]
1223
1212
  # @!attribute [rw] metadata
1224
- # Additional REST headers to be sent with the call.
1213
+ # Additional headers to be sent with the call.
1225
1214
  # @return [::Hash{::Symbol=>::String}]
1215
+ # @!attribute [rw] retry_policy
1216
+ # The retry policy. The value is a hash with the following keys:
1217
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1218
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1219
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1220
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1221
+ # trigger a retry.
1222
+ # @return [::Hash]
1223
+ # @!attribute [rw] quota_project
1224
+ # A separate project against which to charge quota.
1225
+ # @return [::String]
1226
1226
  #
1227
1227
  class Configuration
1228
1228
  extend ::Gapic::Config
@@ -1237,6 +1237,8 @@ module Google
1237
1237
  config_attr :lib_version, nil, ::String, nil
1238
1238
  config_attr :timeout, nil, ::Numeric, nil
1239
1239
  config_attr :metadata, nil, ::Hash, nil
1240
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1241
+ config_attr :quota_project, nil, ::String, nil
1240
1242
 
1241
1243
  # @private
1242
1244
  def initialize parent_config = nil
@@ -1265,9 +1267,14 @@ module Google
1265
1267
  # the following configuration fields:
1266
1268
  #
1267
1269
  # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1268
- #
1269
- # there is one other field (`retry_policy`) that can be set
1270
- # but is currently not supported for REST Gapic libraries.
1270
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1271
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1272
+ # include the following keys:
1273
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1274
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1275
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1276
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1277
+ # trigger a retry.
1271
1278
  #
1272
1279
  class Rpcs
1273
1280
  ##