google-cloud-compute-v1 1.2.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
  4. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +90 -52
  5. data/lib/google/cloud/compute/v1/accelerator_types.rb +5 -0
  6. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +2 -2
  7. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +156 -89
  8. data/lib/google/cloud/compute/v1/addresses.rb +3 -0
  9. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +2 -2
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +222 -129
  11. data/lib/google/cloud/compute/v1/autoscalers.rb +3 -0
  12. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +1 -1
  13. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +285 -161
  14. data/lib/google/cloud/compute/v1/backend_buckets.rb +3 -0
  15. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +2 -2
  16. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +383 -221
  17. data/lib/google/cloud/compute/v1/backend_services.rb +3 -0
  18. data/lib/google/cloud/compute/v1/compute_pb.rb +671 -3
  19. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
  20. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +90 -52
  21. data/lib/google/cloud/compute/v1/disk_types.rb +3 -0
  22. data/lib/google/cloud/compute/v1/disks/rest/client.rb +3 -3
  23. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +429 -240
  24. data/lib/google/cloud/compute/v1/disks.rb +3 -0
  25. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
  26. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +189 -102
  27. data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +3 -0
  28. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
  29. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +555 -330
  30. data/lib/google/cloud/compute/v1/firewall_policies.rb +3 -0
  31. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
  32. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +187 -104
  33. data/lib/google/cloud/compute/v1/firewalls.rb +3 -0
  34. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +2 -2
  35. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +258 -146
  36. data/lib/google/cloud/compute/v1/forwarding_rules.rb +3 -0
  37. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
  38. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +121 -66
  39. data/lib/google/cloud/compute/v1/global_addresses.rb +3 -0
  40. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
  41. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +221 -122
  42. data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +3 -0
  43. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
  44. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +219 -126
  45. data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +3 -0
  46. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
  47. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +154 -86
  48. data/lib/google/cloud/compute/v1/global_operations.rb +3 -0
  49. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  50. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +84 -49
  51. data/lib/google/cloud/compute/v1/global_organization_operations.rb +3 -0
  52. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +1 -1
  53. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +154 -85
  54. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +3 -0
  55. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +2 -2
  56. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +218 -127
  57. data/lib/google/cloud/compute/v1/health_checks.rb +3 -0
  58. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +27 -7
  59. data/lib/google/cloud/compute/v1/image_family_views.rb +3 -0
  60. data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
  61. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +354 -194
  62. data/lib/google/cloud/compute/v1/images.rb +3 -0
  63. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +10 -10
  64. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +664 -381
  65. data/lib/google/cloud/compute/v1/instance_group_managers.rb +3 -0
  66. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +4 -4
  67. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +292 -169
  68. data/lib/google/cloud/compute/v1/instance_groups.rb +3 -0
  69. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +1 -1
  70. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +221 -120
  71. data/lib/google/cloud/compute/v1/instance_templates.rb +3 -0
  72. data/lib/google/cloud/compute/v1/instances/rest/client.rb +7 -5
  73. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1503 -845
  74. data/lib/google/cloud/compute/v1/instances.rb +3 -0
  75. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +2 -2
  76. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +190 -109
  77. data/lib/google/cloud/compute/v1/interconnect_attachments.rb +3 -0
  78. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  79. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +57 -29
  80. data/lib/google/cloud/compute/v1/interconnect_locations.rb +3 -0
  81. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +1 -1
  82. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +187 -102
  83. data/lib/google/cloud/compute/v1/interconnects.rb +3 -0
  84. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +60 -25
  85. data/lib/google/cloud/compute/v1/license_codes.rb +3 -0
  86. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
  87. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +221 -120
  88. data/lib/google/cloud/compute/v1/licenses.rb +3 -0
  89. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +1 -1
  90. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +221 -121
  91. data/lib/google/cloud/compute/v1/machine_images.rb +3 -0
  92. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
  93. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +90 -52
  94. data/lib/google/cloud/compute/v1/machine_types.rb +3 -0
  95. data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
  96. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
  97. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +348 -0
  98. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
  99. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +47 -0
  100. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +3 -3
  101. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +293 -168
  102. data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +3 -0
  103. data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
  104. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
  105. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +998 -0
  106. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
  107. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +47 -0
  108. data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
  109. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +350 -202
  110. data/lib/google/cloud/compute/v1/networks.rb +3 -0
  111. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +3 -3
  112. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +428 -242
  113. data/lib/google/cloud/compute/v1/node_groups.rb +3 -0
  114. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +2 -2
  115. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +259 -143
  116. data/lib/google/cloud/compute/v1/node_templates.rb +3 -0
  117. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
  118. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +90 -52
  119. data/lib/google/cloud/compute/v1/node_types.rb +3 -0
  120. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +2 -2
  121. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +225 -126
  122. data/lib/google/cloud/compute/v1/packet_mirrorings.rb +3 -0
  123. data/lib/google/cloud/compute/v1/projects/rest/client.rb +2 -2
  124. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +406 -238
  125. data/lib/google/cloud/compute/v1/projects.rb +3 -0
  126. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +1 -1
  127. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +154 -85
  128. data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +3 -0
  129. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +2 -2
  130. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +190 -108
  131. data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +3 -0
  132. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
  133. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +191 -106
  134. data/lib/google/cloud/compute/v1/region_autoscalers.rb +3 -0
  135. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +1 -1
  136. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +228 -122
  137. data/lib/google/cloud/compute/v1/region_backend_services.rb +3 -0
  138. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +2 -2
  139. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +157 -92
  140. data/lib/google/cloud/compute/v1/region_commitments.rb +3 -0
  141. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  142. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +59 -29
  143. data/lib/google/cloud/compute/v1/region_disk_types.rb +3 -0
  144. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1 -1
  145. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +398 -216
  146. data/lib/google/cloud/compute/v1/region_disks.rb +3 -0
  147. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
  148. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +159 -85
  149. data/lib/google/cloud/compute/v1/region_health_check_services.rb +3 -0
  150. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
  151. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +193 -104
  152. data/lib/google/cloud/compute/v1/region_health_checks.rb +3 -0
  153. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +9 -9
  154. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +633 -358
  155. data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +3 -0
  156. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  157. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +127 -71
  158. data/lib/google/cloud/compute/v1/region_instance_groups.rb +3 -0
  159. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +26 -9
  160. data/lib/google/cloud/compute/v1/region_instances.rb +3 -0
  161. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +1 -1
  162. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +125 -66
  163. data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +3 -0
  164. data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
  165. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
  166. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +1073 -0
  167. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
  168. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +47 -0
  169. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
  170. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -66
  171. data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +3 -0
  172. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  173. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +127 -63
  174. data/lib/google/cloud/compute/v1/region_operations.rb +3 -0
  175. data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
  176. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
  177. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +349 -0
  178. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
  179. data/lib/google/cloud/compute/v1/region_security_policies.rb +47 -0
  180. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
  181. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +125 -66
  182. data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +3 -0
  183. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
  184. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +159 -85
  185. data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +3 -0
  186. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +88 -1
  187. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +249 -99
  188. data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +3 -0
  189. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
  190. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +228 -122
  191. data/lib/google/cloud/compute/v1/region_url_maps.rb +3 -0
  192. data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
  193. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +57 -29
  194. data/lib/google/cloud/compute/v1/regions.rb +3 -0
  195. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +2 -2
  196. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +327 -183
  197. data/lib/google/cloud/compute/v1/reservations.rb +3 -0
  198. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +2 -2
  199. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +259 -143
  200. data/lib/google/cloud/compute/v1/resource_policies.rb +3 -0
  201. data/lib/google/cloud/compute/v1/routers/rest/client.rb +3 -3
  202. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +326 -184
  203. data/lib/google/cloud/compute/v1/routers.rb +3 -0
  204. data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
  205. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +121 -66
  206. data/lib/google/cloud/compute/v1/routes.rb +3 -0
  207. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +97 -5
  208. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +368 -174
  209. data/lib/google/cloud/compute/v1/security_policies.rb +3 -0
  210. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +2 -2
  211. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +293 -162
  212. data/lib/google/cloud/compute/v1/service_attachments.rb +3 -0
  213. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +1 -1
  214. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +255 -138
  215. data/lib/google/cloud/compute/v1/snapshots.rb +3 -0
  216. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +2 -2
  217. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +152 -89
  218. data/lib/google/cloud/compute/v1/ssl_certificates.rb +3 -0
  219. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +2 -2
  220. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +185 -107
  221. data/lib/google/cloud/compute/v1/ssl_policies.rb +3 -0
  222. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +3 -3
  223. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +392 -223
  224. data/lib/google/cloud/compute/v1/subnetworks.rb +3 -0
  225. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +1 -1
  226. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +154 -85
  227. data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +3 -0
  228. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +2 -2
  229. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +218 -127
  230. data/lib/google/cloud/compute/v1/target_http_proxies.rb +3 -0
  231. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -2
  232. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +371 -178
  233. data/lib/google/cloud/compute/v1/target_https_proxies.rb +3 -0
  234. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +2 -2
  235. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +156 -89
  236. data/lib/google/cloud/compute/v1/target_instances.rb +3 -0
  237. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +2 -2
  238. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +361 -203
  239. data/lib/google/cloud/compute/v1/target_pools.rb +3 -0
  240. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +85 -1
  241. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +307 -136
  242. data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +3 -0
  243. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +1 -1
  244. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +187 -104
  245. data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +3 -0
  246. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +2 -2
  247. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +156 -89
  248. data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +3 -0
  249. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +2 -2
  250. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +285 -164
  251. data/lib/google/cloud/compute/v1/url_maps.rb +3 -0
  252. data/lib/google/cloud/compute/v1/version.rb +1 -1
  253. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +2 -2
  254. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +259 -143
  255. data/lib/google/cloud/compute/v1/vpn_gateways.rb +3 -0
  256. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +2 -2
  257. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +156 -89
  258. data/lib/google/cloud/compute/v1/vpn_tunnels.rb +3 -0
  259. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  260. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +127 -63
  261. data/lib/google/cloud/compute/v1/zone_operations.rb +3 -0
  262. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  263. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +57 -29
  264. data/lib/google/cloud/compute/v1/zones.rb +3 -0
  265. data/lib/google/cloud/compute/v1.rb +4 -0
  266. data/proto_docs/google/cloud/compute/v1/compute.rb +1946 -229
  267. metadata +32 -12
@@ -55,10 +55,17 @@ module Google
55
55
  def add_access_config request_pb, options = nil
56
56
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
57
57
 
58
- uri, body, query_string_params = transcode_add_access_config_request request_pb
59
- response = @client_stub.make_post_request(
58
+ verb, uri, query_string_params, body = transcode_add_access_config_request request_pb
59
+ query_string_params = if query_string_params.any?
60
+ query_string_params.to_h { |p| p.split("=", 2) }
61
+ else
62
+ {}
63
+ end
64
+
65
+ response = @client_stub.make_http_request(
66
+ verb,
60
67
  uri: uri,
61
- body: body,
68
+ body: body || "",
62
69
  params: query_string_params,
63
70
  options: options
64
71
  )
@@ -68,23 +75,6 @@ module Google
68
75
  result
69
76
  end
70
77
 
71
- ##
72
- # GRPC transcoding helper method for the add_access_config REST call
73
- #
74
- # @param request_pb [::Google::Cloud::Compute::V1::AddAccessConfigInstanceRequest]
75
- # A request object representing the call parameters. Required.
76
- # @return [Array(String, [String, nil], Hash{String => String})]
77
- # Uri, Body, Query string parameters
78
- def transcode_add_access_config_request request_pb
79
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/addAccessConfig"
80
- body = request_pb.access_config_resource.to_json
81
- query_string_params = {}
82
- query_string_params["networkInterface"] = request_pb.network_interface.to_s
83
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
84
-
85
- [uri, body, query_string_params]
86
- end
87
-
88
78
  ##
89
79
  # Baseline implementation for the add_resource_policies REST call
90
80
  #
@@ -102,10 +92,17 @@ module Google
102
92
  def add_resource_policies request_pb, options = nil
103
93
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
104
94
 
105
- uri, body, query_string_params = transcode_add_resource_policies_request request_pb
106
- response = @client_stub.make_post_request(
95
+ verb, uri, query_string_params, body = transcode_add_resource_policies_request request_pb
96
+ query_string_params = if query_string_params.any?
97
+ query_string_params.to_h { |p| p.split("=", 2) }
98
+ else
99
+ {}
100
+ end
101
+
102
+ response = @client_stub.make_http_request(
103
+ verb,
107
104
  uri: uri,
108
- body: body,
105
+ body: body || "",
109
106
  params: query_string_params,
110
107
  options: options
111
108
  )
@@ -115,22 +112,6 @@ module Google
115
112
  result
116
113
  end
117
114
 
118
- ##
119
- # GRPC transcoding helper method for the add_resource_policies REST call
120
- #
121
- # @param request_pb [::Google::Cloud::Compute::V1::AddResourcePoliciesInstanceRequest]
122
- # A request object representing the call parameters. Required.
123
- # @return [Array(String, [String, nil], Hash{String => String})]
124
- # Uri, Body, Query string parameters
125
- def transcode_add_resource_policies_request request_pb
126
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/addResourcePolicies"
127
- body = request_pb.instances_add_resource_policies_request_resource.to_json
128
- query_string_params = {}
129
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
130
-
131
- [uri, body, query_string_params]
132
- end
133
-
134
115
  ##
135
116
  # Baseline implementation for the aggregated_list REST call
136
117
  #
@@ -148,9 +129,17 @@ module Google
148
129
  def aggregated_list request_pb, options = nil
149
130
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
150
131
 
151
- uri, _body, query_string_params = transcode_aggregated_list_request request_pb
152
- response = @client_stub.make_get_request(
132
+ verb, uri, query_string_params, body = transcode_aggregated_list_request request_pb
133
+ query_string_params = if query_string_params.any?
134
+ query_string_params.to_h { |p| p.split("=", 2) }
135
+ else
136
+ {}
137
+ end
138
+
139
+ response = @client_stub.make_http_request(
140
+ verb,
153
141
  uri: uri,
142
+ body: body || "",
154
143
  params: query_string_params,
155
144
  options: options
156
145
  )
@@ -160,27 +149,6 @@ module Google
160
149
  result
161
150
  end
162
151
 
163
- ##
164
- # GRPC transcoding helper method for the aggregated_list REST call
165
- #
166
- # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstancesRequest]
167
- # A request object representing the call parameters. Required.
168
- # @return [Array(String, [String, nil], Hash{String => String})]
169
- # Uri, Body, Query string parameters
170
- def transcode_aggregated_list_request request_pb
171
- uri = "/compute/v1/projects/#{request_pb.project}/aggregated/instances"
172
- body = nil
173
- query_string_params = {}
174
- query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
175
- query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
176
- query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
177
- query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
178
- query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
179
- query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
180
-
181
- [uri, body, query_string_params]
182
- end
183
-
184
152
  ##
185
153
  # Baseline implementation for the attach_disk REST call
186
154
  #
@@ -198,10 +166,17 @@ module Google
198
166
  def attach_disk request_pb, options = nil
199
167
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
200
168
 
201
- uri, body, query_string_params = transcode_attach_disk_request request_pb
202
- response = @client_stub.make_post_request(
169
+ verb, uri, query_string_params, body = transcode_attach_disk_request request_pb
170
+ query_string_params = if query_string_params.any?
171
+ query_string_params.to_h { |p| p.split("=", 2) }
172
+ else
173
+ {}
174
+ end
175
+
176
+ response = @client_stub.make_http_request(
177
+ verb,
203
178
  uri: uri,
204
- body: body,
179
+ body: body || "",
205
180
  params: query_string_params,
206
181
  options: options
207
182
  )
@@ -211,23 +186,6 @@ module Google
211
186
  result
212
187
  end
213
188
 
214
- ##
215
- # GRPC transcoding helper method for the attach_disk REST call
216
- #
217
- # @param request_pb [::Google::Cloud::Compute::V1::AttachDiskInstanceRequest]
218
- # A request object representing the call parameters. Required.
219
- # @return [Array(String, [String, nil], Hash{String => String})]
220
- # Uri, Body, Query string parameters
221
- def transcode_attach_disk_request request_pb
222
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/attachDisk"
223
- body = request_pb.attached_disk_resource.to_json
224
- query_string_params = {}
225
- query_string_params["forceAttach"] = request_pb.force_attach.to_s if request_pb.has_force_attach?
226
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
227
-
228
- [uri, body, query_string_params]
229
- end
230
-
231
189
  ##
232
190
  # Baseline implementation for the bulk_insert REST call
233
191
  #
@@ -245,10 +203,17 @@ module Google
245
203
  def bulk_insert request_pb, options = nil
246
204
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
247
205
 
248
- uri, body, query_string_params = transcode_bulk_insert_request request_pb
249
- response = @client_stub.make_post_request(
206
+ verb, uri, query_string_params, body = transcode_bulk_insert_request request_pb
207
+ query_string_params = if query_string_params.any?
208
+ query_string_params.to_h { |p| p.split("=", 2) }
209
+ else
210
+ {}
211
+ end
212
+
213
+ response = @client_stub.make_http_request(
214
+ verb,
250
215
  uri: uri,
251
- body: body,
216
+ body: body || "",
252
217
  params: query_string_params,
253
218
  options: options
254
219
  )
@@ -258,22 +223,6 @@ module Google
258
223
  result
259
224
  end
260
225
 
261
- ##
262
- # GRPC transcoding helper method for the bulk_insert REST call
263
- #
264
- # @param request_pb [::Google::Cloud::Compute::V1::BulkInsertInstanceRequest]
265
- # A request object representing the call parameters. Required.
266
- # @return [Array(String, [String, nil], Hash{String => String})]
267
- # Uri, Body, Query string parameters
268
- def transcode_bulk_insert_request request_pb
269
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/bulkInsert"
270
- body = request_pb.bulk_insert_instance_resource_resource.to_json
271
- query_string_params = {}
272
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
273
-
274
- [uri, body, query_string_params]
275
- end
276
-
277
226
  ##
278
227
  # Baseline implementation for the delete REST call
279
228
  #
@@ -291,9 +240,17 @@ module Google
291
240
  def delete request_pb, options = nil
292
241
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
293
242
 
294
- uri, _body, query_string_params = transcode_delete_request request_pb
295
- response = @client_stub.make_delete_request(
243
+ verb, uri, query_string_params, body = transcode_delete_request request_pb
244
+ query_string_params = if query_string_params.any?
245
+ query_string_params.to_h { |p| p.split("=", 2) }
246
+ else
247
+ {}
248
+ end
249
+
250
+ response = @client_stub.make_http_request(
251
+ verb,
296
252
  uri: uri,
253
+ body: body || "",
297
254
  params: query_string_params,
298
255
  options: options
299
256
  )
@@ -303,22 +260,6 @@ module Google
303
260
  result
304
261
  end
305
262
 
306
- ##
307
- # GRPC transcoding helper method for the delete REST call
308
- #
309
- # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceRequest]
310
- # A request object representing the call parameters. Required.
311
- # @return [Array(String, [String, nil], Hash{String => String})]
312
- # Uri, Body, Query string parameters
313
- def transcode_delete_request request_pb
314
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}"
315
- body = nil
316
- query_string_params = {}
317
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
318
-
319
- [uri, body, query_string_params]
320
- end
321
-
322
263
  ##
323
264
  # Baseline implementation for the delete_access_config REST call
324
265
  #
@@ -336,9 +277,17 @@ module Google
336
277
  def delete_access_config request_pb, options = nil
337
278
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
338
279
 
339
- uri, _body, query_string_params = transcode_delete_access_config_request request_pb
340
- response = @client_stub.make_post_request(
280
+ verb, uri, query_string_params, body = transcode_delete_access_config_request request_pb
281
+ query_string_params = if query_string_params.any?
282
+ query_string_params.to_h { |p| p.split("=", 2) }
283
+ else
284
+ {}
285
+ end
286
+
287
+ response = @client_stub.make_http_request(
288
+ verb,
341
289
  uri: uri,
290
+ body: body || "",
342
291
  params: query_string_params,
343
292
  options: options
344
293
  )
@@ -348,24 +297,6 @@ module Google
348
297
  result
349
298
  end
350
299
 
351
- ##
352
- # GRPC transcoding helper method for the delete_access_config REST call
353
- #
354
- # @param request_pb [::Google::Cloud::Compute::V1::DeleteAccessConfigInstanceRequest]
355
- # A request object representing the call parameters. Required.
356
- # @return [Array(String, [String, nil], Hash{String => String})]
357
- # Uri, Body, Query string parameters
358
- def transcode_delete_access_config_request request_pb
359
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/deleteAccessConfig"
360
- body = nil
361
- query_string_params = {}
362
- query_string_params["accessConfig"] = request_pb.access_config.to_s
363
- query_string_params["networkInterface"] = request_pb.network_interface.to_s
364
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
365
-
366
- [uri, body, query_string_params]
367
- end
368
-
369
300
  ##
370
301
  # Baseline implementation for the detach_disk REST call
371
302
  #
@@ -383,9 +314,17 @@ module Google
383
314
  def detach_disk request_pb, options = nil
384
315
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
385
316
 
386
- uri, _body, query_string_params = transcode_detach_disk_request request_pb
387
- response = @client_stub.make_post_request(
317
+ verb, uri, query_string_params, body = transcode_detach_disk_request request_pb
318
+ query_string_params = if query_string_params.any?
319
+ query_string_params.to_h { |p| p.split("=", 2) }
320
+ else
321
+ {}
322
+ end
323
+
324
+ response = @client_stub.make_http_request(
325
+ verb,
388
326
  uri: uri,
327
+ body: body || "",
389
328
  params: query_string_params,
390
329
  options: options
391
330
  )
@@ -395,23 +334,6 @@ module Google
395
334
  result
396
335
  end
397
336
 
398
- ##
399
- # GRPC transcoding helper method for the detach_disk REST call
400
- #
401
- # @param request_pb [::Google::Cloud::Compute::V1::DetachDiskInstanceRequest]
402
- # A request object representing the call parameters. Required.
403
- # @return [Array(String, [String, nil], Hash{String => String})]
404
- # Uri, Body, Query string parameters
405
- def transcode_detach_disk_request request_pb
406
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/detachDisk"
407
- body = nil
408
- query_string_params = {}
409
- query_string_params["deviceName"] = request_pb.device_name.to_s
410
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
411
-
412
- [uri, body, query_string_params]
413
- end
414
-
415
337
  ##
416
338
  # Baseline implementation for the get REST call
417
339
  #
@@ -429,9 +351,18 @@ module Google
429
351
  def get request_pb, options = nil
430
352
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
431
353
 
432
- uri, _body, _query_string_params = transcode_get_request request_pb
433
- response = @client_stub.make_get_request(
354
+ verb, uri, query_string_params, body = transcode_get_request request_pb
355
+ query_string_params = if query_string_params.any?
356
+ query_string_params.to_h { |p| p.split("=", 2) }
357
+ else
358
+ {}
359
+ end
360
+
361
+ response = @client_stub.make_http_request(
362
+ verb,
434
363
  uri: uri,
364
+ body: body || "",
365
+ params: query_string_params,
435
366
  options: options
436
367
  )
437
368
  result = ::Google::Cloud::Compute::V1::Instance.decode_json response.body, ignore_unknown_fields: true
@@ -440,21 +371,6 @@ module Google
440
371
  result
441
372
  end
442
373
 
443
- ##
444
- # GRPC transcoding helper method for the get REST call
445
- #
446
- # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceRequest]
447
- # A request object representing the call parameters. Required.
448
- # @return [Array(String, [String, nil], Hash{String => String})]
449
- # Uri, Body, Query string parameters
450
- def transcode_get_request request_pb
451
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}"
452
- body = nil
453
- query_string_params = {}
454
-
455
- [uri, body, query_string_params]
456
- end
457
-
458
374
  ##
459
375
  # Baseline implementation for the get_effective_firewalls REST call
460
376
  #
@@ -472,9 +388,17 @@ module Google
472
388
  def get_effective_firewalls request_pb, options = nil
473
389
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
474
390
 
475
- uri, _body, query_string_params = transcode_get_effective_firewalls_request request_pb
476
- response = @client_stub.make_get_request(
391
+ verb, uri, query_string_params, body = transcode_get_effective_firewalls_request request_pb
392
+ query_string_params = if query_string_params.any?
393
+ query_string_params.to_h { |p| p.split("=", 2) }
394
+ else
395
+ {}
396
+ end
397
+
398
+ response = @client_stub.make_http_request(
399
+ verb,
477
400
  uri: uri,
401
+ body: body || "",
478
402
  params: query_string_params,
479
403
  options: options
480
404
  )
@@ -484,22 +408,6 @@ module Google
484
408
  result
485
409
  end
486
410
 
487
- ##
488
- # GRPC transcoding helper method for the get_effective_firewalls REST call
489
- #
490
- # @param request_pb [::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest]
491
- # A request object representing the call parameters. Required.
492
- # @return [Array(String, [String, nil], Hash{String => String})]
493
- # Uri, Body, Query string parameters
494
- def transcode_get_effective_firewalls_request request_pb
495
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/getEffectiveFirewalls"
496
- body = nil
497
- query_string_params = {}
498
- query_string_params["networkInterface"] = request_pb.network_interface.to_s
499
-
500
- [uri, body, query_string_params]
501
- end
502
-
503
411
  ##
504
412
  # Baseline implementation for the get_guest_attributes REST call
505
413
  #
@@ -517,9 +425,17 @@ module Google
517
425
  def get_guest_attributes request_pb, options = nil
518
426
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
519
427
 
520
- uri, _body, query_string_params = transcode_get_guest_attributes_request request_pb
521
- response = @client_stub.make_get_request(
428
+ verb, uri, query_string_params, body = transcode_get_guest_attributes_request request_pb
429
+ query_string_params = if query_string_params.any?
430
+ query_string_params.to_h { |p| p.split("=", 2) }
431
+ else
432
+ {}
433
+ end
434
+
435
+ response = @client_stub.make_http_request(
436
+ verb,
522
437
  uri: uri,
438
+ body: body || "",
523
439
  params: query_string_params,
524
440
  options: options
525
441
  )
@@ -529,23 +445,6 @@ module Google
529
445
  result
530
446
  end
531
447
 
532
- ##
533
- # GRPC transcoding helper method for the get_guest_attributes REST call
534
- #
535
- # @param request_pb [::Google::Cloud::Compute::V1::GetGuestAttributesInstanceRequest]
536
- # A request object representing the call parameters. Required.
537
- # @return [Array(String, [String, nil], Hash{String => String})]
538
- # Uri, Body, Query string parameters
539
- def transcode_get_guest_attributes_request request_pb
540
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/getGuestAttributes"
541
- body = nil
542
- query_string_params = {}
543
- query_string_params["queryPath"] = request_pb.query_path.to_s if request_pb.has_query_path?
544
- query_string_params["variableKey"] = request_pb.variable_key.to_s if request_pb.has_variable_key?
545
-
546
- [uri, body, query_string_params]
547
- end
548
-
549
448
  ##
550
449
  # Baseline implementation for the get_iam_policy REST call
551
450
  #
@@ -563,9 +462,17 @@ module Google
563
462
  def get_iam_policy request_pb, options = nil
564
463
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
565
464
 
566
- uri, _body, query_string_params = transcode_get_iam_policy_request request_pb
567
- response = @client_stub.make_get_request(
465
+ verb, uri, query_string_params, body = transcode_get_iam_policy_request request_pb
466
+ query_string_params = if query_string_params.any?
467
+ query_string_params.to_h { |p| p.split("=", 2) }
468
+ else
469
+ {}
470
+ end
471
+
472
+ response = @client_stub.make_http_request(
473
+ verb,
568
474
  uri: uri,
475
+ body: body || "",
569
476
  params: query_string_params,
570
477
  options: options
571
478
  )
@@ -575,22 +482,6 @@ module Google
575
482
  result
576
483
  end
577
484
 
578
- ##
579
- # GRPC transcoding helper method for the get_iam_policy REST call
580
- #
581
- # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInstanceRequest]
582
- # A request object representing the call parameters. Required.
583
- # @return [Array(String, [String, nil], Hash{String => String})]
584
- # Uri, Body, Query string parameters
585
- def transcode_get_iam_policy_request request_pb
586
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/getIamPolicy"
587
- body = nil
588
- query_string_params = {}
589
- query_string_params["optionsRequestedPolicyVersion"] = request_pb.options_requested_policy_version.to_s if request_pb.has_options_requested_policy_version?
590
-
591
- [uri, body, query_string_params]
592
- end
593
-
594
485
  ##
595
486
  # Baseline implementation for the get_screenshot REST call
596
487
  #
@@ -608,9 +499,18 @@ module Google
608
499
  def get_screenshot request_pb, options = nil
609
500
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
610
501
 
611
- uri, _body, _query_string_params = transcode_get_screenshot_request request_pb
612
- response = @client_stub.make_get_request(
502
+ verb, uri, query_string_params, body = transcode_get_screenshot_request request_pb
503
+ query_string_params = if query_string_params.any?
504
+ query_string_params.to_h { |p| p.split("=", 2) }
505
+ else
506
+ {}
507
+ end
508
+
509
+ response = @client_stub.make_http_request(
510
+ verb,
613
511
  uri: uri,
512
+ body: body || "",
513
+ params: query_string_params,
614
514
  options: options
615
515
  )
616
516
  result = ::Google::Cloud::Compute::V1::Screenshot.decode_json response.body, ignore_unknown_fields: true
@@ -619,21 +519,6 @@ module Google
619
519
  result
620
520
  end
621
521
 
622
- ##
623
- # GRPC transcoding helper method for the get_screenshot REST call
624
- #
625
- # @param request_pb [::Google::Cloud::Compute::V1::GetScreenshotInstanceRequest]
626
- # A request object representing the call parameters. Required.
627
- # @return [Array(String, [String, nil], Hash{String => String})]
628
- # Uri, Body, Query string parameters
629
- def transcode_get_screenshot_request request_pb
630
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/screenshot"
631
- body = nil
632
- query_string_params = {}
633
-
634
- [uri, body, query_string_params]
635
- end
636
-
637
522
  ##
638
523
  # Baseline implementation for the get_serial_port_output REST call
639
524
  #
@@ -651,9 +536,17 @@ module Google
651
536
  def get_serial_port_output request_pb, options = nil
652
537
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
653
538
 
654
- uri, _body, query_string_params = transcode_get_serial_port_output_request request_pb
655
- response = @client_stub.make_get_request(
539
+ verb, uri, query_string_params, body = transcode_get_serial_port_output_request request_pb
540
+ query_string_params = if query_string_params.any?
541
+ query_string_params.to_h { |p| p.split("=", 2) }
542
+ else
543
+ {}
544
+ end
545
+
546
+ response = @client_stub.make_http_request(
547
+ verb,
656
548
  uri: uri,
549
+ body: body || "",
657
550
  params: query_string_params,
658
551
  options: options
659
552
  )
@@ -663,23 +556,6 @@ module Google
663
556
  result
664
557
  end
665
558
 
666
- ##
667
- # GRPC transcoding helper method for the get_serial_port_output REST call
668
- #
669
- # @param request_pb [::Google::Cloud::Compute::V1::GetSerialPortOutputInstanceRequest]
670
- # A request object representing the call parameters. Required.
671
- # @return [Array(String, [String, nil], Hash{String => String})]
672
- # Uri, Body, Query string parameters
673
- def transcode_get_serial_port_output_request request_pb
674
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/serialPort"
675
- body = nil
676
- query_string_params = {}
677
- query_string_params["port"] = request_pb.port.to_s if request_pb.has_port?
678
- query_string_params["start"] = request_pb.start.to_s if request_pb.has_start?
679
-
680
- [uri, body, query_string_params]
681
- end
682
-
683
559
  ##
684
560
  # Baseline implementation for the get_shielded_instance_identity REST call
685
561
  #
@@ -697,9 +573,18 @@ module Google
697
573
  def get_shielded_instance_identity request_pb, options = nil
698
574
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
699
575
 
700
- uri, _body, _query_string_params = transcode_get_shielded_instance_identity_request request_pb
701
- response = @client_stub.make_get_request(
576
+ verb, uri, query_string_params, body = transcode_get_shielded_instance_identity_request request_pb
577
+ query_string_params = if query_string_params.any?
578
+ query_string_params.to_h { |p| p.split("=", 2) }
579
+ else
580
+ {}
581
+ end
582
+
583
+ response = @client_stub.make_http_request(
584
+ verb,
702
585
  uri: uri,
586
+ body: body || "",
587
+ params: query_string_params,
703
588
  options: options
704
589
  )
705
590
  result = ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity.decode_json response.body, ignore_unknown_fields: true
@@ -708,21 +593,6 @@ module Google
708
593
  result
709
594
  end
710
595
 
711
- ##
712
- # GRPC transcoding helper method for the get_shielded_instance_identity REST call
713
- #
714
- # @param request_pb [::Google::Cloud::Compute::V1::GetShieldedInstanceIdentityInstanceRequest]
715
- # A request object representing the call parameters. Required.
716
- # @return [Array(String, [String, nil], Hash{String => String})]
717
- # Uri, Body, Query string parameters
718
- def transcode_get_shielded_instance_identity_request request_pb
719
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/getShieldedInstanceIdentity"
720
- body = nil
721
- query_string_params = {}
722
-
723
- [uri, body, query_string_params]
724
- end
725
-
726
596
  ##
727
597
  # Baseline implementation for the insert REST call
728
598
  #
@@ -740,10 +610,17 @@ module Google
740
610
  def insert request_pb, options = nil
741
611
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
742
612
 
743
- uri, body, query_string_params = transcode_insert_request request_pb
744
- response = @client_stub.make_post_request(
613
+ verb, uri, query_string_params, body = transcode_insert_request request_pb
614
+ query_string_params = if query_string_params.any?
615
+ query_string_params.to_h { |p| p.split("=", 2) }
616
+ else
617
+ {}
618
+ end
619
+
620
+ response = @client_stub.make_http_request(
621
+ verb,
745
622
  uri: uri,
746
- body: body,
623
+ body: body || "",
747
624
  params: query_string_params,
748
625
  options: options
749
626
  )
@@ -753,24 +630,6 @@ module Google
753
630
  result
754
631
  end
755
632
 
756
- ##
757
- # GRPC transcoding helper method for the insert REST call
758
- #
759
- # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceRequest]
760
- # A request object representing the call parameters. Required.
761
- # @return [Array(String, [String, nil], Hash{String => String})]
762
- # Uri, Body, Query string parameters
763
- def transcode_insert_request request_pb
764
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances"
765
- body = request_pb.instance_resource.to_json
766
- query_string_params = {}
767
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
768
- query_string_params["sourceInstanceTemplate"] = request_pb.source_instance_template.to_s if request_pb.has_source_instance_template?
769
- query_string_params["sourceMachineImage"] = request_pb.source_machine_image.to_s if request_pb.has_source_machine_image?
770
-
771
- [uri, body, query_string_params]
772
- end
773
-
774
633
  ##
775
634
  # Baseline implementation for the list REST call
776
635
  #
@@ -788,9 +647,17 @@ module Google
788
647
  def list request_pb, options = nil
789
648
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
790
649
 
791
- uri, _body, query_string_params = transcode_list_request request_pb
792
- response = @client_stub.make_get_request(
650
+ verb, uri, query_string_params, body = transcode_list_request request_pb
651
+ query_string_params = if query_string_params.any?
652
+ query_string_params.to_h { |p| p.split("=", 2) }
653
+ else
654
+ {}
655
+ end
656
+
657
+ response = @client_stub.make_http_request(
658
+ verb,
793
659
  uri: uri,
660
+ body: body || "",
794
661
  params: query_string_params,
795
662
  options: options
796
663
  )
@@ -800,26 +667,6 @@ module Google
800
667
  result
801
668
  end
802
669
 
803
- ##
804
- # GRPC transcoding helper method for the list REST call
805
- #
806
- # @param request_pb [::Google::Cloud::Compute::V1::ListInstancesRequest]
807
- # A request object representing the call parameters. Required.
808
- # @return [Array(String, [String, nil], Hash{String => String})]
809
- # Uri, Body, Query string parameters
810
- def transcode_list_request request_pb
811
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances"
812
- body = nil
813
- query_string_params = {}
814
- query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
815
- query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
816
- query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
817
- query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
818
- query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
819
-
820
- [uri, body, query_string_params]
821
- end
822
-
823
670
  ##
824
671
  # Baseline implementation for the list_referrers REST call
825
672
  #
@@ -837,9 +684,17 @@ module Google
837
684
  def list_referrers request_pb, options = nil
838
685
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
839
686
 
840
- uri, _body, query_string_params = transcode_list_referrers_request request_pb
841
- response = @client_stub.make_get_request(
687
+ verb, uri, query_string_params, body = transcode_list_referrers_request request_pb
688
+ query_string_params = if query_string_params.any?
689
+ query_string_params.to_h { |p| p.split("=", 2) }
690
+ else
691
+ {}
692
+ end
693
+
694
+ response = @client_stub.make_http_request(
695
+ verb,
842
696
  uri: uri,
697
+ body: body || "",
843
698
  params: query_string_params,
844
699
  options: options
845
700
  )
@@ -849,26 +704,6 @@ module Google
849
704
  result
850
705
  end
851
706
 
852
- ##
853
- # GRPC transcoding helper method for the list_referrers REST call
854
- #
855
- # @param request_pb [::Google::Cloud::Compute::V1::ListReferrersInstancesRequest]
856
- # A request object representing the call parameters. Required.
857
- # @return [Array(String, [String, nil], Hash{String => String})]
858
- # Uri, Body, Query string parameters
859
- def transcode_list_referrers_request request_pb
860
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/referrers"
861
- body = nil
862
- query_string_params = {}
863
- query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
864
- query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
865
- query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
866
- query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
867
- query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
868
-
869
- [uri, body, query_string_params]
870
- end
871
-
872
707
  ##
873
708
  # Baseline implementation for the remove_resource_policies REST call
874
709
  #
@@ -886,10 +721,17 @@ module Google
886
721
  def remove_resource_policies request_pb, options = nil
887
722
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
888
723
 
889
- uri, body, query_string_params = transcode_remove_resource_policies_request request_pb
890
- response = @client_stub.make_post_request(
724
+ verb, uri, query_string_params, body = transcode_remove_resource_policies_request request_pb
725
+ query_string_params = if query_string_params.any?
726
+ query_string_params.to_h { |p| p.split("=", 2) }
727
+ else
728
+ {}
729
+ end
730
+
731
+ response = @client_stub.make_http_request(
732
+ verb,
891
733
  uri: uri,
892
- body: body,
734
+ body: body || "",
893
735
  params: query_string_params,
894
736
  options: options
895
737
  )
@@ -899,22 +741,6 @@ module Google
899
741
  result
900
742
  end
901
743
 
902
- ##
903
- # GRPC transcoding helper method for the remove_resource_policies REST call
904
- #
905
- # @param request_pb [::Google::Cloud::Compute::V1::RemoveResourcePoliciesInstanceRequest]
906
- # A request object representing the call parameters. Required.
907
- # @return [Array(String, [String, nil], Hash{String => String})]
908
- # Uri, Body, Query string parameters
909
- def transcode_remove_resource_policies_request request_pb
910
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/removeResourcePolicies"
911
- body = request_pb.instances_remove_resource_policies_request_resource.to_json
912
- query_string_params = {}
913
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
914
-
915
- [uri, body, query_string_params]
916
- end
917
-
918
744
  ##
919
745
  # Baseline implementation for the reset REST call
920
746
  #
@@ -932,9 +758,17 @@ module Google
932
758
  def reset request_pb, options = nil
933
759
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
934
760
 
935
- uri, _body, query_string_params = transcode_reset_request request_pb
936
- response = @client_stub.make_post_request(
761
+ verb, uri, query_string_params, body = transcode_reset_request request_pb
762
+ query_string_params = if query_string_params.any?
763
+ query_string_params.to_h { |p| p.split("=", 2) }
764
+ else
765
+ {}
766
+ end
767
+
768
+ response = @client_stub.make_http_request(
769
+ verb,
937
770
  uri: uri,
771
+ body: body || "",
938
772
  params: query_string_params,
939
773
  options: options
940
774
  )
@@ -944,22 +778,6 @@ module Google
944
778
  result
945
779
  end
946
780
 
947
- ##
948
- # GRPC transcoding helper method for the reset REST call
949
- #
950
- # @param request_pb [::Google::Cloud::Compute::V1::ResetInstanceRequest]
951
- # A request object representing the call parameters. Required.
952
- # @return [Array(String, [String, nil], Hash{String => String})]
953
- # Uri, Body, Query string parameters
954
- def transcode_reset_request request_pb
955
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/reset"
956
- body = nil
957
- query_string_params = {}
958
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
959
-
960
- [uri, body, query_string_params]
961
- end
962
-
963
781
  ##
964
782
  # Baseline implementation for the resume REST call
965
783
  #
@@ -977,9 +795,17 @@ module Google
977
795
  def resume request_pb, options = nil
978
796
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
979
797
 
980
- uri, _body, query_string_params = transcode_resume_request request_pb
981
- response = @client_stub.make_post_request(
798
+ verb, uri, query_string_params, body = transcode_resume_request request_pb
799
+ query_string_params = if query_string_params.any?
800
+ query_string_params.to_h { |p| p.split("=", 2) }
801
+ else
802
+ {}
803
+ end
804
+
805
+ response = @client_stub.make_http_request(
806
+ verb,
982
807
  uri: uri,
808
+ body: body || "",
983
809
  params: query_string_params,
984
810
  options: options
985
811
  )
@@ -989,22 +815,6 @@ module Google
989
815
  result
990
816
  end
991
817
 
992
- ##
993
- # GRPC transcoding helper method for the resume REST call
994
- #
995
- # @param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest]
996
- # A request object representing the call parameters. Required.
997
- # @return [Array(String, [String, nil], Hash{String => String})]
998
- # Uri, Body, Query string parameters
999
- def transcode_resume_request request_pb
1000
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/resume"
1001
- body = nil
1002
- query_string_params = {}
1003
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1004
-
1005
- [uri, body, query_string_params]
1006
- end
1007
-
1008
818
  ##
1009
819
  # Baseline implementation for the send_diagnostic_interrupt REST call
1010
820
  #
@@ -1022,9 +832,18 @@ module Google
1022
832
  def send_diagnostic_interrupt request_pb, options = nil
1023
833
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1024
834
 
1025
- uri, _body, _query_string_params = transcode_send_diagnostic_interrupt_request request_pb
1026
- response = @client_stub.make_post_request(
835
+ verb, uri, query_string_params, body = transcode_send_diagnostic_interrupt_request request_pb
836
+ query_string_params = if query_string_params.any?
837
+ query_string_params.to_h { |p| p.split("=", 2) }
838
+ else
839
+ {}
840
+ end
841
+
842
+ response = @client_stub.make_http_request(
843
+ verb,
1027
844
  uri: uri,
845
+ body: body || "",
846
+ params: query_string_params,
1028
847
  options: options
1029
848
  )
1030
849
  result = ::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse.decode_json response.body, ignore_unknown_fields: true
@@ -1033,21 +852,6 @@ module Google
1033
852
  result
1034
853
  end
1035
854
 
1036
- ##
1037
- # GRPC transcoding helper method for the send_diagnostic_interrupt REST call
1038
- #
1039
- # @param request_pb [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest]
1040
- # A request object representing the call parameters. Required.
1041
- # @return [Array(String, [String, nil], Hash{String => String})]
1042
- # Uri, Body, Query string parameters
1043
- def transcode_send_diagnostic_interrupt_request request_pb
1044
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/sendDiagnosticInterrupt"
1045
- body = nil
1046
- query_string_params = {}
1047
-
1048
- [uri, body, query_string_params]
1049
- end
1050
-
1051
855
  ##
1052
856
  # Baseline implementation for the set_deletion_protection REST call
1053
857
  #
@@ -1065,9 +869,17 @@ module Google
1065
869
  def set_deletion_protection request_pb, options = nil
1066
870
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1067
871
 
1068
- uri, _body, query_string_params = transcode_set_deletion_protection_request request_pb
1069
- response = @client_stub.make_post_request(
872
+ verb, uri, query_string_params, body = transcode_set_deletion_protection_request request_pb
873
+ query_string_params = if query_string_params.any?
874
+ query_string_params.to_h { |p| p.split("=", 2) }
875
+ else
876
+ {}
877
+ end
878
+
879
+ response = @client_stub.make_http_request(
880
+ verb,
1070
881
  uri: uri,
882
+ body: body || "",
1071
883
  params: query_string_params,
1072
884
  options: options
1073
885
  )
@@ -1077,23 +889,6 @@ module Google
1077
889
  result
1078
890
  end
1079
891
 
1080
- ##
1081
- # GRPC transcoding helper method for the set_deletion_protection REST call
1082
- #
1083
- # @param request_pb [::Google::Cloud::Compute::V1::SetDeletionProtectionInstanceRequest]
1084
- # A request object representing the call parameters. Required.
1085
- # @return [Array(String, [String, nil], Hash{String => String})]
1086
- # Uri, Body, Query string parameters
1087
- def transcode_set_deletion_protection_request request_pb
1088
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/setDeletionProtection"
1089
- body = nil
1090
- query_string_params = {}
1091
- query_string_params["deletionProtection"] = request_pb.deletion_protection.to_s if request_pb.has_deletion_protection?
1092
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1093
-
1094
- [uri, body, query_string_params]
1095
- end
1096
-
1097
892
  ##
1098
893
  # Baseline implementation for the set_disk_auto_delete REST call
1099
894
  #
@@ -1111,9 +906,17 @@ module Google
1111
906
  def set_disk_auto_delete request_pb, options = nil
1112
907
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1113
908
 
1114
- uri, _body, query_string_params = transcode_set_disk_auto_delete_request request_pb
1115
- response = @client_stub.make_post_request(
909
+ verb, uri, query_string_params, body = transcode_set_disk_auto_delete_request request_pb
910
+ query_string_params = if query_string_params.any?
911
+ query_string_params.to_h { |p| p.split("=", 2) }
912
+ else
913
+ {}
914
+ end
915
+
916
+ response = @client_stub.make_http_request(
917
+ verb,
1116
918
  uri: uri,
919
+ body: body || "",
1117
920
  params: query_string_params,
1118
921
  options: options
1119
922
  )
@@ -1123,24 +926,6 @@ module Google
1123
926
  result
1124
927
  end
1125
928
 
1126
- ##
1127
- # GRPC transcoding helper method for the set_disk_auto_delete REST call
1128
- #
1129
- # @param request_pb [::Google::Cloud::Compute::V1::SetDiskAutoDeleteInstanceRequest]
1130
- # A request object representing the call parameters. Required.
1131
- # @return [Array(String, [String, nil], Hash{String => String})]
1132
- # Uri, Body, Query string parameters
1133
- def transcode_set_disk_auto_delete_request request_pb
1134
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setDiskAutoDelete"
1135
- body = nil
1136
- query_string_params = {}
1137
- query_string_params["autoDelete"] = request_pb.auto_delete.to_s
1138
- query_string_params["deviceName"] = request_pb.device_name.to_s
1139
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1140
-
1141
- [uri, body, query_string_params]
1142
- end
1143
-
1144
929
  ##
1145
930
  # Baseline implementation for the set_iam_policy REST call
1146
931
  #
@@ -1158,10 +943,18 @@ module Google
1158
943
  def set_iam_policy request_pb, options = nil
1159
944
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1160
945
 
1161
- uri, body, _query_string_params = transcode_set_iam_policy_request request_pb
1162
- response = @client_stub.make_post_request(
946
+ verb, uri, query_string_params, body = transcode_set_iam_policy_request request_pb
947
+ query_string_params = if query_string_params.any?
948
+ query_string_params.to_h { |p| p.split("=", 2) }
949
+ else
950
+ {}
951
+ end
952
+
953
+ response = @client_stub.make_http_request(
954
+ verb,
1163
955
  uri: uri,
1164
- body: body,
956
+ body: body || "",
957
+ params: query_string_params,
1165
958
  options: options
1166
959
  )
1167
960
  result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
@@ -1170,21 +963,6 @@ module Google
1170
963
  result
1171
964
  end
1172
965
 
1173
- ##
1174
- # GRPC transcoding helper method for the set_iam_policy REST call
1175
- #
1176
- # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInstanceRequest]
1177
- # A request object representing the call parameters. Required.
1178
- # @return [Array(String, [String, nil], Hash{String => String})]
1179
- # Uri, Body, Query string parameters
1180
- def transcode_set_iam_policy_request request_pb
1181
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/setIamPolicy"
1182
- body = request_pb.zone_set_policy_request_resource.to_json
1183
- query_string_params = {}
1184
-
1185
- [uri, body, query_string_params]
1186
- end
1187
-
1188
966
  ##
1189
967
  # Baseline implementation for the set_labels REST call
1190
968
  #
@@ -1202,10 +980,17 @@ module Google
1202
980
  def set_labels request_pb, options = nil
1203
981
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1204
982
 
1205
- uri, body, query_string_params = transcode_set_labels_request request_pb
1206
- response = @client_stub.make_post_request(
983
+ verb, uri, query_string_params, body = transcode_set_labels_request request_pb
984
+ query_string_params = if query_string_params.any?
985
+ query_string_params.to_h { |p| p.split("=", 2) }
986
+ else
987
+ {}
988
+ end
989
+
990
+ response = @client_stub.make_http_request(
991
+ verb,
1207
992
  uri: uri,
1208
- body: body,
993
+ body: body || "",
1209
994
  params: query_string_params,
1210
995
  options: options
1211
996
  )
@@ -1215,22 +1000,6 @@ module Google
1215
1000
  result
1216
1001
  end
1217
1002
 
1218
- ##
1219
- # GRPC transcoding helper method for the set_labels REST call
1220
- #
1221
- # @param request_pb [::Google::Cloud::Compute::V1::SetLabelsInstanceRequest]
1222
- # A request object representing the call parameters. Required.
1223
- # @return [Array(String, [String, nil], Hash{String => String})]
1224
- # Uri, Body, Query string parameters
1225
- def transcode_set_labels_request request_pb
1226
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setLabels"
1227
- body = request_pb.instances_set_labels_request_resource.to_json
1228
- query_string_params = {}
1229
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1230
-
1231
- [uri, body, query_string_params]
1232
- end
1233
-
1234
1003
  ##
1235
1004
  # Baseline implementation for the set_machine_resources REST call
1236
1005
  #
@@ -1248,10 +1017,17 @@ module Google
1248
1017
  def set_machine_resources request_pb, options = nil
1249
1018
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1250
1019
 
1251
- uri, body, query_string_params = transcode_set_machine_resources_request request_pb
1252
- response = @client_stub.make_post_request(
1020
+ verb, uri, query_string_params, body = transcode_set_machine_resources_request request_pb
1021
+ query_string_params = if query_string_params.any?
1022
+ query_string_params.to_h { |p| p.split("=", 2) }
1023
+ else
1024
+ {}
1025
+ end
1026
+
1027
+ response = @client_stub.make_http_request(
1028
+ verb,
1253
1029
  uri: uri,
1254
- body: body,
1030
+ body: body || "",
1255
1031
  params: query_string_params,
1256
1032
  options: options
1257
1033
  )
@@ -1261,22 +1037,6 @@ module Google
1261
1037
  result
1262
1038
  end
1263
1039
 
1264
- ##
1265
- # GRPC transcoding helper method for the set_machine_resources REST call
1266
- #
1267
- # @param request_pb [::Google::Cloud::Compute::V1::SetMachineResourcesInstanceRequest]
1268
- # A request object representing the call parameters. Required.
1269
- # @return [Array(String, [String, nil], Hash{String => String})]
1270
- # Uri, Body, Query string parameters
1271
- def transcode_set_machine_resources_request request_pb
1272
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMachineResources"
1273
- body = request_pb.instances_set_machine_resources_request_resource.to_json
1274
- query_string_params = {}
1275
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1276
-
1277
- [uri, body, query_string_params]
1278
- end
1279
-
1280
1040
  ##
1281
1041
  # Baseline implementation for the set_machine_type REST call
1282
1042
  #
@@ -1294,10 +1054,17 @@ module Google
1294
1054
  def set_machine_type request_pb, options = nil
1295
1055
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1296
1056
 
1297
- uri, body, query_string_params = transcode_set_machine_type_request request_pb
1298
- response = @client_stub.make_post_request(
1057
+ verb, uri, query_string_params, body = transcode_set_machine_type_request request_pb
1058
+ query_string_params = if query_string_params.any?
1059
+ query_string_params.to_h { |p| p.split("=", 2) }
1060
+ else
1061
+ {}
1062
+ end
1063
+
1064
+ response = @client_stub.make_http_request(
1065
+ verb,
1299
1066
  uri: uri,
1300
- body: body,
1067
+ body: body || "",
1301
1068
  params: query_string_params,
1302
1069
  options: options
1303
1070
  )
@@ -1307,22 +1074,6 @@ module Google
1307
1074
  result
1308
1075
  end
1309
1076
 
1310
- ##
1311
- # GRPC transcoding helper method for the set_machine_type REST call
1312
- #
1313
- # @param request_pb [::Google::Cloud::Compute::V1::SetMachineTypeInstanceRequest]
1314
- # A request object representing the call parameters. Required.
1315
- # @return [Array(String, [String, nil], Hash{String => String})]
1316
- # Uri, Body, Query string parameters
1317
- def transcode_set_machine_type_request request_pb
1318
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMachineType"
1319
- body = request_pb.instances_set_machine_type_request_resource.to_json
1320
- query_string_params = {}
1321
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1322
-
1323
- [uri, body, query_string_params]
1324
- end
1325
-
1326
1077
  ##
1327
1078
  # Baseline implementation for the set_metadata REST call
1328
1079
  #
@@ -1340,10 +1091,17 @@ module Google
1340
1091
  def set_metadata request_pb, options = nil
1341
1092
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1342
1093
 
1343
- uri, body, query_string_params = transcode_set_metadata_request request_pb
1344
- response = @client_stub.make_post_request(
1094
+ verb, uri, query_string_params, body = transcode_set_metadata_request request_pb
1095
+ query_string_params = if query_string_params.any?
1096
+ query_string_params.to_h { |p| p.split("=", 2) }
1097
+ else
1098
+ {}
1099
+ end
1100
+
1101
+ response = @client_stub.make_http_request(
1102
+ verb,
1345
1103
  uri: uri,
1346
- body: body,
1104
+ body: body || "",
1347
1105
  params: query_string_params,
1348
1106
  options: options
1349
1107
  )
@@ -1353,22 +1111,6 @@ module Google
1353
1111
  result
1354
1112
  end
1355
1113
 
1356
- ##
1357
- # GRPC transcoding helper method for the set_metadata REST call
1358
- #
1359
- # @param request_pb [::Google::Cloud::Compute::V1::SetMetadataInstanceRequest]
1360
- # A request object representing the call parameters. Required.
1361
- # @return [Array(String, [String, nil], Hash{String => String})]
1362
- # Uri, Body, Query string parameters
1363
- def transcode_set_metadata_request request_pb
1364
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMetadata"
1365
- body = request_pb.metadata_resource.to_json
1366
- query_string_params = {}
1367
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1368
-
1369
- [uri, body, query_string_params]
1370
- end
1371
-
1372
1114
  ##
1373
1115
  # Baseline implementation for the set_min_cpu_platform REST call
1374
1116
  #
@@ -1386,10 +1128,17 @@ module Google
1386
1128
  def set_min_cpu_platform request_pb, options = nil
1387
1129
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1388
1130
 
1389
- uri, body, query_string_params = transcode_set_min_cpu_platform_request request_pb
1390
- response = @client_stub.make_post_request(
1131
+ verb, uri, query_string_params, body = transcode_set_min_cpu_platform_request request_pb
1132
+ query_string_params = if query_string_params.any?
1133
+ query_string_params.to_h { |p| p.split("=", 2) }
1134
+ else
1135
+ {}
1136
+ end
1137
+
1138
+ response = @client_stub.make_http_request(
1139
+ verb,
1391
1140
  uri: uri,
1392
- body: body,
1141
+ body: body || "",
1393
1142
  params: query_string_params,
1394
1143
  options: options
1395
1144
  )
@@ -1399,22 +1148,6 @@ module Google
1399
1148
  result
1400
1149
  end
1401
1150
 
1402
- ##
1403
- # GRPC transcoding helper method for the set_min_cpu_platform REST call
1404
- #
1405
- # @param request_pb [::Google::Cloud::Compute::V1::SetMinCpuPlatformInstanceRequest]
1406
- # A request object representing the call parameters. Required.
1407
- # @return [Array(String, [String, nil], Hash{String => String})]
1408
- # Uri, Body, Query string parameters
1409
- def transcode_set_min_cpu_platform_request request_pb
1410
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setMinCpuPlatform"
1411
- body = request_pb.instances_set_min_cpu_platform_request_resource.to_json
1412
- query_string_params = {}
1413
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1414
-
1415
- [uri, body, query_string_params]
1416
- end
1417
-
1418
1151
  ##
1419
1152
  # Baseline implementation for the set_scheduling REST call
1420
1153
  #
@@ -1432,10 +1165,17 @@ module Google
1432
1165
  def set_scheduling request_pb, options = nil
1433
1166
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1434
1167
 
1435
- uri, body, query_string_params = transcode_set_scheduling_request request_pb
1436
- response = @client_stub.make_post_request(
1168
+ verb, uri, query_string_params, body = transcode_set_scheduling_request request_pb
1169
+ query_string_params = if query_string_params.any?
1170
+ query_string_params.to_h { |p| p.split("=", 2) }
1171
+ else
1172
+ {}
1173
+ end
1174
+
1175
+ response = @client_stub.make_http_request(
1176
+ verb,
1437
1177
  uri: uri,
1438
- body: body,
1178
+ body: body || "",
1439
1179
  params: query_string_params,
1440
1180
  options: options
1441
1181
  )
@@ -1445,22 +1185,6 @@ module Google
1445
1185
  result
1446
1186
  end
1447
1187
 
1448
- ##
1449
- # GRPC transcoding helper method for the set_scheduling REST call
1450
- #
1451
- # @param request_pb [::Google::Cloud::Compute::V1::SetSchedulingInstanceRequest]
1452
- # A request object representing the call parameters. Required.
1453
- # @return [Array(String, [String, nil], Hash{String => String})]
1454
- # Uri, Body, Query string parameters
1455
- def transcode_set_scheduling_request request_pb
1456
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setScheduling"
1457
- body = request_pb.scheduling_resource.to_json
1458
- query_string_params = {}
1459
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1460
-
1461
- [uri, body, query_string_params]
1462
- end
1463
-
1464
1188
  ##
1465
1189
  # Baseline implementation for the set_service_account REST call
1466
1190
  #
@@ -1478,10 +1202,17 @@ module Google
1478
1202
  def set_service_account request_pb, options = nil
1479
1203
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1480
1204
 
1481
- uri, body, query_string_params = transcode_set_service_account_request request_pb
1482
- response = @client_stub.make_post_request(
1205
+ verb, uri, query_string_params, body = transcode_set_service_account_request request_pb
1206
+ query_string_params = if query_string_params.any?
1207
+ query_string_params.to_h { |p| p.split("=", 2) }
1208
+ else
1209
+ {}
1210
+ end
1211
+
1212
+ response = @client_stub.make_http_request(
1213
+ verb,
1483
1214
  uri: uri,
1484
- body: body,
1215
+ body: body || "",
1485
1216
  params: query_string_params,
1486
1217
  options: options
1487
1218
  )
@@ -1491,22 +1222,6 @@ module Google
1491
1222
  result
1492
1223
  end
1493
1224
 
1494
- ##
1495
- # GRPC transcoding helper method for the set_service_account REST call
1496
- #
1497
- # @param request_pb [::Google::Cloud::Compute::V1::SetServiceAccountInstanceRequest]
1498
- # A request object representing the call parameters. Required.
1499
- # @return [Array(String, [String, nil], Hash{String => String})]
1500
- # Uri, Body, Query string parameters
1501
- def transcode_set_service_account_request request_pb
1502
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setServiceAccount"
1503
- body = request_pb.instances_set_service_account_request_resource.to_json
1504
- query_string_params = {}
1505
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1506
-
1507
- [uri, body, query_string_params]
1508
- end
1509
-
1510
1225
  ##
1511
1226
  # Baseline implementation for the set_shielded_instance_integrity_policy REST call
1512
1227
  #
@@ -1524,10 +1239,17 @@ module Google
1524
1239
  def set_shielded_instance_integrity_policy request_pb, options = nil
1525
1240
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1526
1241
 
1527
- uri, body, query_string_params = transcode_set_shielded_instance_integrity_policy_request request_pb
1528
- response = @client_stub.make_patch_request(
1242
+ verb, uri, query_string_params, body = transcode_set_shielded_instance_integrity_policy_request request_pb
1243
+ query_string_params = if query_string_params.any?
1244
+ query_string_params.to_h { |p| p.split("=", 2) }
1245
+ else
1246
+ {}
1247
+ end
1248
+
1249
+ response = @client_stub.make_http_request(
1250
+ verb,
1529
1251
  uri: uri,
1530
- body: body,
1252
+ body: body || "",
1531
1253
  params: query_string_params,
1532
1254
  options: options
1533
1255
  )
@@ -1537,22 +1259,6 @@ module Google
1537
1259
  result
1538
1260
  end
1539
1261
 
1540
- ##
1541
- # GRPC transcoding helper method for the set_shielded_instance_integrity_policy REST call
1542
- #
1543
- # @param request_pb [::Google::Cloud::Compute::V1::SetShieldedInstanceIntegrityPolicyInstanceRequest]
1544
- # A request object representing the call parameters. Required.
1545
- # @return [Array(String, [String, nil], Hash{String => String})]
1546
- # Uri, Body, Query string parameters
1547
- def transcode_set_shielded_instance_integrity_policy_request request_pb
1548
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setShieldedInstanceIntegrityPolicy"
1549
- body = request_pb.shielded_instance_integrity_policy_resource.to_json
1550
- query_string_params = {}
1551
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1552
-
1553
- [uri, body, query_string_params]
1554
- end
1555
-
1556
1262
  ##
1557
1263
  # Baseline implementation for the set_tags REST call
1558
1264
  #
@@ -1570,10 +1276,17 @@ module Google
1570
1276
  def set_tags request_pb, options = nil
1571
1277
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1572
1278
 
1573
- uri, body, query_string_params = transcode_set_tags_request request_pb
1574
- response = @client_stub.make_post_request(
1279
+ verb, uri, query_string_params, body = transcode_set_tags_request request_pb
1280
+ query_string_params = if query_string_params.any?
1281
+ query_string_params.to_h { |p| p.split("=", 2) }
1282
+ else
1283
+ {}
1284
+ end
1285
+
1286
+ response = @client_stub.make_http_request(
1287
+ verb,
1575
1288
  uri: uri,
1576
- body: body,
1289
+ body: body || "",
1577
1290
  params: query_string_params,
1578
1291
  options: options
1579
1292
  )
@@ -1583,22 +1296,6 @@ module Google
1583
1296
  result
1584
1297
  end
1585
1298
 
1586
- ##
1587
- # GRPC transcoding helper method for the set_tags REST call
1588
- #
1589
- # @param request_pb [::Google::Cloud::Compute::V1::SetTagsInstanceRequest]
1590
- # A request object representing the call parameters. Required.
1591
- # @return [Array(String, [String, nil], Hash{String => String})]
1592
- # Uri, Body, Query string parameters
1593
- def transcode_set_tags_request request_pb
1594
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/setTags"
1595
- body = request_pb.tags_resource.to_json
1596
- query_string_params = {}
1597
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1598
-
1599
- [uri, body, query_string_params]
1600
- end
1601
-
1602
1299
  ##
1603
1300
  # Baseline implementation for the simulate_maintenance_event REST call
1604
1301
  #
@@ -1616,9 +1313,18 @@ module Google
1616
1313
  def simulate_maintenance_event request_pb, options = nil
1617
1314
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1618
1315
 
1619
- uri, _body, _query_string_params = transcode_simulate_maintenance_event_request request_pb
1620
- response = @client_stub.make_post_request(
1316
+ verb, uri, query_string_params, body = transcode_simulate_maintenance_event_request request_pb
1317
+ query_string_params = if query_string_params.any?
1318
+ query_string_params.to_h { |p| p.split("=", 2) }
1319
+ else
1320
+ {}
1321
+ end
1322
+
1323
+ response = @client_stub.make_http_request(
1324
+ verb,
1621
1325
  uri: uri,
1326
+ body: body || "",
1327
+ params: query_string_params,
1622
1328
  options: options
1623
1329
  )
1624
1330
  result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
@@ -1627,21 +1333,6 @@ module Google
1627
1333
  result
1628
1334
  end
1629
1335
 
1630
- ##
1631
- # GRPC transcoding helper method for the simulate_maintenance_event REST call
1632
- #
1633
- # @param request_pb [::Google::Cloud::Compute::V1::SimulateMaintenanceEventInstanceRequest]
1634
- # A request object representing the call parameters. Required.
1635
- # @return [Array(String, [String, nil], Hash{String => String})]
1636
- # Uri, Body, Query string parameters
1637
- def transcode_simulate_maintenance_event_request request_pb
1638
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/simulateMaintenanceEvent"
1639
- body = nil
1640
- query_string_params = {}
1641
-
1642
- [uri, body, query_string_params]
1643
- end
1644
-
1645
1336
  ##
1646
1337
  # Baseline implementation for the start REST call
1647
1338
  #
@@ -1659,9 +1350,17 @@ module Google
1659
1350
  def start request_pb, options = nil
1660
1351
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1661
1352
 
1662
- uri, _body, query_string_params = transcode_start_request request_pb
1663
- response = @client_stub.make_post_request(
1353
+ verb, uri, query_string_params, body = transcode_start_request request_pb
1354
+ query_string_params = if query_string_params.any?
1355
+ query_string_params.to_h { |p| p.split("=", 2) }
1356
+ else
1357
+ {}
1358
+ end
1359
+
1360
+ response = @client_stub.make_http_request(
1361
+ verb,
1664
1362
  uri: uri,
1363
+ body: body || "",
1665
1364
  params: query_string_params,
1666
1365
  options: options
1667
1366
  )
@@ -1671,22 +1370,6 @@ module Google
1671
1370
  result
1672
1371
  end
1673
1372
 
1674
- ##
1675
- # GRPC transcoding helper method for the start REST call
1676
- #
1677
- # @param request_pb [::Google::Cloud::Compute::V1::StartInstanceRequest]
1678
- # A request object representing the call parameters. Required.
1679
- # @return [Array(String, [String, nil], Hash{String => String})]
1680
- # Uri, Body, Query string parameters
1681
- def transcode_start_request request_pb
1682
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/start"
1683
- body = nil
1684
- query_string_params = {}
1685
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1686
-
1687
- [uri, body, query_string_params]
1688
- end
1689
-
1690
1373
  ##
1691
1374
  # Baseline implementation for the start_with_encryption_key REST call
1692
1375
  #
@@ -1704,10 +1387,17 @@ module Google
1704
1387
  def start_with_encryption_key request_pb, options = nil
1705
1388
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1706
1389
 
1707
- uri, body, query_string_params = transcode_start_with_encryption_key_request request_pb
1708
- response = @client_stub.make_post_request(
1390
+ verb, uri, query_string_params, body = transcode_start_with_encryption_key_request request_pb
1391
+ query_string_params = if query_string_params.any?
1392
+ query_string_params.to_h { |p| p.split("=", 2) }
1393
+ else
1394
+ {}
1395
+ end
1396
+
1397
+ response = @client_stub.make_http_request(
1398
+ verb,
1709
1399
  uri: uri,
1710
- body: body,
1400
+ body: body || "",
1711
1401
  params: query_string_params,
1712
1402
  options: options
1713
1403
  )
@@ -1717,22 +1407,6 @@ module Google
1717
1407
  result
1718
1408
  end
1719
1409
 
1720
- ##
1721
- # GRPC transcoding helper method for the start_with_encryption_key REST call
1722
- #
1723
- # @param request_pb [::Google::Cloud::Compute::V1::StartWithEncryptionKeyInstanceRequest]
1724
- # A request object representing the call parameters. Required.
1725
- # @return [Array(String, [String, nil], Hash{String => String})]
1726
- # Uri, Body, Query string parameters
1727
- def transcode_start_with_encryption_key_request request_pb
1728
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/startWithEncryptionKey"
1729
- body = request_pb.instances_start_with_encryption_key_request_resource.to_json
1730
- query_string_params = {}
1731
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1732
-
1733
- [uri, body, query_string_params]
1734
- end
1735
-
1736
1410
  ##
1737
1411
  # Baseline implementation for the stop REST call
1738
1412
  #
@@ -1750,9 +1424,17 @@ module Google
1750
1424
  def stop request_pb, options = nil
1751
1425
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1752
1426
 
1753
- uri, _body, query_string_params = transcode_stop_request request_pb
1754
- response = @client_stub.make_post_request(
1427
+ verb, uri, query_string_params, body = transcode_stop_request request_pb
1428
+ query_string_params = if query_string_params.any?
1429
+ query_string_params.to_h { |p| p.split("=", 2) }
1430
+ else
1431
+ {}
1432
+ end
1433
+
1434
+ response = @client_stub.make_http_request(
1435
+ verb,
1755
1436
  uri: uri,
1437
+ body: body || "",
1756
1438
  params: query_string_params,
1757
1439
  options: options
1758
1440
  )
@@ -1762,22 +1444,6 @@ module Google
1762
1444
  result
1763
1445
  end
1764
1446
 
1765
- ##
1766
- # GRPC transcoding helper method for the stop REST call
1767
- #
1768
- # @param request_pb [::Google::Cloud::Compute::V1::StopInstanceRequest]
1769
- # A request object representing the call parameters. Required.
1770
- # @return [Array(String, [String, nil], Hash{String => String})]
1771
- # Uri, Body, Query string parameters
1772
- def transcode_stop_request request_pb
1773
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/stop"
1774
- body = nil
1775
- query_string_params = {}
1776
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1777
-
1778
- [uri, body, query_string_params]
1779
- end
1780
-
1781
1447
  ##
1782
1448
  # Baseline implementation for the suspend REST call
1783
1449
  #
@@ -1795,9 +1461,17 @@ module Google
1795
1461
  def suspend request_pb, options = nil
1796
1462
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1797
1463
 
1798
- uri, _body, query_string_params = transcode_suspend_request request_pb
1799
- response = @client_stub.make_post_request(
1464
+ verb, uri, query_string_params, body = transcode_suspend_request request_pb
1465
+ query_string_params = if query_string_params.any?
1466
+ query_string_params.to_h { |p| p.split("=", 2) }
1467
+ else
1468
+ {}
1469
+ end
1470
+
1471
+ response = @client_stub.make_http_request(
1472
+ verb,
1800
1473
  uri: uri,
1474
+ body: body || "",
1801
1475
  params: query_string_params,
1802
1476
  options: options
1803
1477
  )
@@ -1807,22 +1481,6 @@ module Google
1807
1481
  result
1808
1482
  end
1809
1483
 
1810
- ##
1811
- # GRPC transcoding helper method for the suspend REST call
1812
- #
1813
- # @param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest]
1814
- # A request object representing the call parameters. Required.
1815
- # @return [Array(String, [String, nil], Hash{String => String})]
1816
- # Uri, Body, Query string parameters
1817
- def transcode_suspend_request request_pb
1818
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/suspend"
1819
- body = nil
1820
- query_string_params = {}
1821
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1822
-
1823
- [uri, body, query_string_params]
1824
- end
1825
-
1826
1484
  ##
1827
1485
  # Baseline implementation for the test_iam_permissions REST call
1828
1486
  #
@@ -1840,10 +1498,18 @@ module Google
1840
1498
  def test_iam_permissions request_pb, options = nil
1841
1499
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1842
1500
 
1843
- uri, body, _query_string_params = transcode_test_iam_permissions_request request_pb
1844
- response = @client_stub.make_post_request(
1501
+ verb, uri, query_string_params, body = transcode_test_iam_permissions_request request_pb
1502
+ query_string_params = if query_string_params.any?
1503
+ query_string_params.to_h { |p| p.split("=", 2) }
1504
+ else
1505
+ {}
1506
+ end
1507
+
1508
+ response = @client_stub.make_http_request(
1509
+ verb,
1845
1510
  uri: uri,
1846
- body: body,
1511
+ body: body || "",
1512
+ params: query_string_params,
1847
1513
  options: options
1848
1514
  )
1849
1515
  result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
@@ -1852,21 +1518,6 @@ module Google
1852
1518
  result
1853
1519
  end
1854
1520
 
1855
- ##
1856
- # GRPC transcoding helper method for the test_iam_permissions REST call
1857
- #
1858
- # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInstanceRequest]
1859
- # A request object representing the call parameters. Required.
1860
- # @return [Array(String, [String, nil], Hash{String => String})]
1861
- # Uri, Body, Query string parameters
1862
- def transcode_test_iam_permissions_request request_pb
1863
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.resource}/testIamPermissions"
1864
- body = request_pb.test_permissions_request_resource.to_json
1865
- query_string_params = {}
1866
-
1867
- [uri, body, query_string_params]
1868
- end
1869
-
1870
1521
  ##
1871
1522
  # Baseline implementation for the update REST call
1872
1523
  #
@@ -1884,10 +1535,17 @@ module Google
1884
1535
  def update request_pb, options = nil
1885
1536
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1886
1537
 
1887
- uri, body, query_string_params = transcode_update_request request_pb
1888
- response = @client_stub.make_put_request(
1538
+ verb, uri, query_string_params, body = transcode_update_request request_pb
1539
+ query_string_params = if query_string_params.any?
1540
+ query_string_params.to_h { |p| p.split("=", 2) }
1541
+ else
1542
+ {}
1543
+ end
1544
+
1545
+ response = @client_stub.make_http_request(
1546
+ verb,
1889
1547
  uri: uri,
1890
- body: body,
1548
+ body: body || "",
1891
1549
  params: query_string_params,
1892
1550
  options: options
1893
1551
  )
@@ -1897,24 +1555,6 @@ module Google
1897
1555
  result
1898
1556
  end
1899
1557
 
1900
- ##
1901
- # GRPC transcoding helper method for the update REST call
1902
- #
1903
- # @param request_pb [::Google::Cloud::Compute::V1::UpdateInstanceRequest]
1904
- # A request object representing the call parameters. Required.
1905
- # @return [Array(String, [String, nil], Hash{String => String})]
1906
- # Uri, Body, Query string parameters
1907
- def transcode_update_request request_pb
1908
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}"
1909
- body = request_pb.instance_resource.to_json
1910
- query_string_params = {}
1911
- query_string_params["minimalAction"] = request_pb.minimal_action.to_s if request_pb.has_minimal_action?
1912
- query_string_params["mostDisruptiveAllowedAction"] = request_pb.most_disruptive_allowed_action.to_s if request_pb.has_most_disruptive_allowed_action?
1913
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1914
-
1915
- [uri, body, query_string_params]
1916
- end
1917
-
1918
1558
  ##
1919
1559
  # Baseline implementation for the update_access_config REST call
1920
1560
  #
@@ -1932,10 +1572,17 @@ module Google
1932
1572
  def update_access_config request_pb, options = nil
1933
1573
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1934
1574
 
1935
- uri, body, query_string_params = transcode_update_access_config_request request_pb
1936
- response = @client_stub.make_post_request(
1575
+ verb, uri, query_string_params, body = transcode_update_access_config_request request_pb
1576
+ query_string_params = if query_string_params.any?
1577
+ query_string_params.to_h { |p| p.split("=", 2) }
1578
+ else
1579
+ {}
1580
+ end
1581
+
1582
+ response = @client_stub.make_http_request(
1583
+ verb,
1937
1584
  uri: uri,
1938
- body: body,
1585
+ body: body || "",
1939
1586
  params: query_string_params,
1940
1587
  options: options
1941
1588
  )
@@ -1945,23 +1592,6 @@ module Google
1945
1592
  result
1946
1593
  end
1947
1594
 
1948
- ##
1949
- # GRPC transcoding helper method for the update_access_config REST call
1950
- #
1951
- # @param request_pb [::Google::Cloud::Compute::V1::UpdateAccessConfigInstanceRequest]
1952
- # A request object representing the call parameters. Required.
1953
- # @return [Array(String, [String, nil], Hash{String => String})]
1954
- # Uri, Body, Query string parameters
1955
- def transcode_update_access_config_request request_pb
1956
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateAccessConfig"
1957
- body = request_pb.access_config_resource.to_json
1958
- query_string_params = {}
1959
- query_string_params["networkInterface"] = request_pb.network_interface.to_s
1960
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
1961
-
1962
- [uri, body, query_string_params]
1963
- end
1964
-
1965
1595
  ##
1966
1596
  # Baseline implementation for the update_display_device REST call
1967
1597
  #
@@ -1979,10 +1609,17 @@ module Google
1979
1609
  def update_display_device request_pb, options = nil
1980
1610
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
1981
1611
 
1982
- uri, body, query_string_params = transcode_update_display_device_request request_pb
1983
- response = @client_stub.make_patch_request(
1612
+ verb, uri, query_string_params, body = transcode_update_display_device_request request_pb
1613
+ query_string_params = if query_string_params.any?
1614
+ query_string_params.to_h { |p| p.split("=", 2) }
1615
+ else
1616
+ {}
1617
+ end
1618
+
1619
+ response = @client_stub.make_http_request(
1620
+ verb,
1984
1621
  uri: uri,
1985
- body: body,
1622
+ body: body || "",
1986
1623
  params: query_string_params,
1987
1624
  options: options
1988
1625
  )
@@ -1992,22 +1629,6 @@ module Google
1992
1629
  result
1993
1630
  end
1994
1631
 
1995
- ##
1996
- # GRPC transcoding helper method for the update_display_device REST call
1997
- #
1998
- # @param request_pb [::Google::Cloud::Compute::V1::UpdateDisplayDeviceInstanceRequest]
1999
- # A request object representing the call parameters. Required.
2000
- # @return [Array(String, [String, nil], Hash{String => String})]
2001
- # Uri, Body, Query string parameters
2002
- def transcode_update_display_device_request request_pb
2003
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateDisplayDevice"
2004
- body = request_pb.display_device_resource.to_json
2005
- query_string_params = {}
2006
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
2007
-
2008
- [uri, body, query_string_params]
2009
- end
2010
-
2011
1632
  ##
2012
1633
  # Baseline implementation for the update_network_interface REST call
2013
1634
  #
@@ -2025,10 +1646,17 @@ module Google
2025
1646
  def update_network_interface request_pb, options = nil
2026
1647
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
2027
1648
 
2028
- uri, body, query_string_params = transcode_update_network_interface_request request_pb
2029
- response = @client_stub.make_patch_request(
1649
+ verb, uri, query_string_params, body = transcode_update_network_interface_request request_pb
1650
+ query_string_params = if query_string_params.any?
1651
+ query_string_params.to_h { |p| p.split("=", 2) }
1652
+ else
1653
+ {}
1654
+ end
1655
+
1656
+ response = @client_stub.make_http_request(
1657
+ verb,
2030
1658
  uri: uri,
2031
- body: body,
1659
+ body: body || "",
2032
1660
  params: query_string_params,
2033
1661
  options: options
2034
1662
  )
@@ -2038,23 +1666,6 @@ module Google
2038
1666
  result
2039
1667
  end
2040
1668
 
2041
- ##
2042
- # GRPC transcoding helper method for the update_network_interface REST call
2043
- #
2044
- # @param request_pb [::Google::Cloud::Compute::V1::UpdateNetworkInterfaceInstanceRequest]
2045
- # A request object representing the call parameters. Required.
2046
- # @return [Array(String, [String, nil], Hash{String => String})]
2047
- # Uri, Body, Query string parameters
2048
- def transcode_update_network_interface_request request_pb
2049
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateNetworkInterface"
2050
- body = request_pb.network_interface_resource.to_json
2051
- query_string_params = {}
2052
- query_string_params["networkInterface"] = request_pb.network_interface.to_s
2053
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
2054
-
2055
- [uri, body, query_string_params]
2056
- end
2057
-
2058
1669
  ##
2059
1670
  # Baseline implementation for the update_shielded_instance_config REST call
2060
1671
  #
@@ -2072,10 +1683,17 @@ module Google
2072
1683
  def update_shielded_instance_config request_pb, options = nil
2073
1684
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
2074
1685
 
2075
- uri, body, query_string_params = transcode_update_shielded_instance_config_request request_pb
2076
- response = @client_stub.make_patch_request(
1686
+ verb, uri, query_string_params, body = transcode_update_shielded_instance_config_request request_pb
1687
+ query_string_params = if query_string_params.any?
1688
+ query_string_params.to_h { |p| p.split("=", 2) }
1689
+ else
1690
+ {}
1691
+ end
1692
+
1693
+ response = @client_stub.make_http_request(
1694
+ verb,
2077
1695
  uri: uri,
2078
- body: body,
1696
+ body: body || "",
2079
1697
  params: query_string_params,
2080
1698
  options: options
2081
1699
  )
@@ -2085,7 +1703,1041 @@ module Google
2085
1703
  result
2086
1704
  end
2087
1705
 
1706
+
1707
+ private
1708
+
1709
+ ##
1710
+ # @private
1711
+ #
1712
+ # GRPC transcoding helper method for the add_access_config REST call
1713
+ #
1714
+ # @param request_pb [::Google::Cloud::Compute::V1::AddAccessConfigInstanceRequest]
1715
+ # A request object representing the call parameters. Required.
1716
+ # @return [Array(String, [String, nil], Hash{String => String})]
1717
+ # Uri, Body, Query string parameters
1718
+ def transcode_add_access_config_request request_pb
1719
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1720
+ .with_bindings(
1721
+ uri_method: :post,
1722
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig",
1723
+ body: "access_config_resource",
1724
+ matches: [
1725
+ ["project", %r{[^/]+}, false],
1726
+ ["zone", %r{[^/]+}, false],
1727
+ ["instance", %r{[^/]+}, false]
1728
+ ]
1729
+ )
1730
+ transcoder.transcode request_pb
1731
+ end
1732
+
1733
+ ##
1734
+ # @private
1735
+ #
1736
+ # GRPC transcoding helper method for the add_resource_policies REST call
1737
+ #
1738
+ # @param request_pb [::Google::Cloud::Compute::V1::AddResourcePoliciesInstanceRequest]
1739
+ # A request object representing the call parameters. Required.
1740
+ # @return [Array(String, [String, nil], Hash{String => String})]
1741
+ # Uri, Body, Query string parameters
1742
+ def transcode_add_resource_policies_request request_pb
1743
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1744
+ .with_bindings(
1745
+ uri_method: :post,
1746
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies",
1747
+ body: "instances_add_resource_policies_request_resource",
1748
+ matches: [
1749
+ ["project", %r{[^/]+}, false],
1750
+ ["zone", %r{[^/]+}, false],
1751
+ ["instance", %r{[^/]+}, false]
1752
+ ]
1753
+ )
1754
+ transcoder.transcode request_pb
1755
+ end
1756
+
1757
+ ##
1758
+ # @private
1759
+ #
1760
+ # GRPC transcoding helper method for the aggregated_list REST call
1761
+ #
1762
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstancesRequest]
1763
+ # A request object representing the call parameters. Required.
1764
+ # @return [Array(String, [String, nil], Hash{String => String})]
1765
+ # Uri, Body, Query string parameters
1766
+ def transcode_aggregated_list_request request_pb
1767
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1768
+ .with_bindings(
1769
+ uri_method: :get,
1770
+ uri_template: "/compute/v1/projects/{project}/aggregated/instances",
1771
+ matches: [
1772
+ ["project", %r{[^/]+}, false]
1773
+ ]
1774
+ )
1775
+ transcoder.transcode request_pb
1776
+ end
1777
+
1778
+ ##
1779
+ # @private
1780
+ #
1781
+ # GRPC transcoding helper method for the attach_disk REST call
1782
+ #
1783
+ # @param request_pb [::Google::Cloud::Compute::V1::AttachDiskInstanceRequest]
1784
+ # A request object representing the call parameters. Required.
1785
+ # @return [Array(String, [String, nil], Hash{String => String})]
1786
+ # Uri, Body, Query string parameters
1787
+ def transcode_attach_disk_request request_pb
1788
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1789
+ .with_bindings(
1790
+ uri_method: :post,
1791
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/attachDisk",
1792
+ body: "attached_disk_resource",
1793
+ matches: [
1794
+ ["project", %r{[^/]+}, false],
1795
+ ["zone", %r{[^/]+}, false],
1796
+ ["instance", %r{[^/]+}, false]
1797
+ ]
1798
+ )
1799
+ transcoder.transcode request_pb
1800
+ end
1801
+
1802
+ ##
1803
+ # @private
1804
+ #
1805
+ # GRPC transcoding helper method for the bulk_insert REST call
1806
+ #
1807
+ # @param request_pb [::Google::Cloud::Compute::V1::BulkInsertInstanceRequest]
1808
+ # A request object representing the call parameters. Required.
1809
+ # @return [Array(String, [String, nil], Hash{String => String})]
1810
+ # Uri, Body, Query string parameters
1811
+ def transcode_bulk_insert_request request_pb
1812
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1813
+ .with_bindings(
1814
+ uri_method: :post,
1815
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/bulkInsert",
1816
+ body: "bulk_insert_instance_resource_resource",
1817
+ matches: [
1818
+ ["project", %r{[^/]+}, false],
1819
+ ["zone", %r{[^/]+}, false]
1820
+ ]
1821
+ )
1822
+ transcoder.transcode request_pb
1823
+ end
1824
+
1825
+ ##
1826
+ # @private
1827
+ #
1828
+ # GRPC transcoding helper method for the delete REST call
1829
+ #
1830
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceRequest]
1831
+ # A request object representing the call parameters. Required.
1832
+ # @return [Array(String, [String, nil], Hash{String => String})]
1833
+ # Uri, Body, Query string parameters
1834
+ def transcode_delete_request request_pb
1835
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1836
+ .with_bindings(
1837
+ uri_method: :delete,
1838
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}",
1839
+ matches: [
1840
+ ["project", %r{[^/]+}, false],
1841
+ ["zone", %r{[^/]+}, false],
1842
+ ["instance", %r{[^/]+}, false]
1843
+ ]
1844
+ )
1845
+ transcoder.transcode request_pb
1846
+ end
1847
+
1848
+ ##
1849
+ # @private
1850
+ #
1851
+ # GRPC transcoding helper method for the delete_access_config REST call
1852
+ #
1853
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteAccessConfigInstanceRequest]
1854
+ # A request object representing the call parameters. Required.
1855
+ # @return [Array(String, [String, nil], Hash{String => String})]
1856
+ # Uri, Body, Query string parameters
1857
+ def transcode_delete_access_config_request request_pb
1858
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1859
+ .with_bindings(
1860
+ uri_method: :post,
1861
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig",
1862
+ matches: [
1863
+ ["project", %r{[^/]+}, false],
1864
+ ["zone", %r{[^/]+}, false],
1865
+ ["instance", %r{[^/]+}, false]
1866
+ ]
1867
+ )
1868
+ transcoder.transcode request_pb
1869
+ end
1870
+
1871
+ ##
1872
+ # @private
1873
+ #
1874
+ # GRPC transcoding helper method for the detach_disk REST call
1875
+ #
1876
+ # @param request_pb [::Google::Cloud::Compute::V1::DetachDiskInstanceRequest]
1877
+ # A request object representing the call parameters. Required.
1878
+ # @return [Array(String, [String, nil], Hash{String => String})]
1879
+ # Uri, Body, Query string parameters
1880
+ def transcode_detach_disk_request request_pb
1881
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1882
+ .with_bindings(
1883
+ uri_method: :post,
1884
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/detachDisk",
1885
+ matches: [
1886
+ ["project", %r{[^/]+}, false],
1887
+ ["zone", %r{[^/]+}, false],
1888
+ ["instance", %r{[^/]+}, false]
1889
+ ]
1890
+ )
1891
+ transcoder.transcode request_pb
1892
+ end
1893
+
1894
+ ##
1895
+ # @private
1896
+ #
1897
+ # GRPC transcoding helper method for the get REST call
1898
+ #
1899
+ # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceRequest]
1900
+ # A request object representing the call parameters. Required.
1901
+ # @return [Array(String, [String, nil], Hash{String => String})]
1902
+ # Uri, Body, Query string parameters
1903
+ def transcode_get_request request_pb
1904
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1905
+ .with_bindings(
1906
+ uri_method: :get,
1907
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}",
1908
+ matches: [
1909
+ ["project", %r{[^/]+}, false],
1910
+ ["zone", %r{[^/]+}, false],
1911
+ ["instance", %r{[^/]+}, false]
1912
+ ]
1913
+ )
1914
+ transcoder.transcode request_pb
1915
+ end
1916
+
1917
+ ##
1918
+ # @private
1919
+ #
1920
+ # GRPC transcoding helper method for the get_effective_firewalls REST call
1921
+ #
1922
+ # @param request_pb [::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest]
1923
+ # A request object representing the call parameters. Required.
1924
+ # @return [Array(String, [String, nil], Hash{String => String})]
1925
+ # Uri, Body, Query string parameters
1926
+ def transcode_get_effective_firewalls_request request_pb
1927
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1928
+ .with_bindings(
1929
+ uri_method: :get,
1930
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls",
1931
+ matches: [
1932
+ ["project", %r{[^/]+}, false],
1933
+ ["zone", %r{[^/]+}, false],
1934
+ ["instance", %r{[^/]+}, false]
1935
+ ]
1936
+ )
1937
+ transcoder.transcode request_pb
1938
+ end
1939
+
1940
+ ##
1941
+ # @private
1942
+ #
1943
+ # GRPC transcoding helper method for the get_guest_attributes REST call
1944
+ #
1945
+ # @param request_pb [::Google::Cloud::Compute::V1::GetGuestAttributesInstanceRequest]
1946
+ # A request object representing the call parameters. Required.
1947
+ # @return [Array(String, [String, nil], Hash{String => String})]
1948
+ # Uri, Body, Query string parameters
1949
+ def transcode_get_guest_attributes_request request_pb
1950
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1951
+ .with_bindings(
1952
+ uri_method: :get,
1953
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes",
1954
+ matches: [
1955
+ ["project", %r{[^/]+}, false],
1956
+ ["zone", %r{[^/]+}, false],
1957
+ ["instance", %r{[^/]+}, false]
1958
+ ]
1959
+ )
1960
+ transcoder.transcode request_pb
1961
+ end
1962
+
1963
+ ##
1964
+ # @private
1965
+ #
1966
+ # GRPC transcoding helper method for the get_iam_policy REST call
1967
+ #
1968
+ # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInstanceRequest]
1969
+ # A request object representing the call parameters. Required.
1970
+ # @return [Array(String, [String, nil], Hash{String => String})]
1971
+ # Uri, Body, Query string parameters
1972
+ def transcode_get_iam_policy_request request_pb
1973
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1974
+ .with_bindings(
1975
+ uri_method: :get,
1976
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy",
1977
+ matches: [
1978
+ ["project", %r{[^/]+}, false],
1979
+ ["zone", %r{[^/]+}, false],
1980
+ ["resource", %r{[^/]+}, false]
1981
+ ]
1982
+ )
1983
+ transcoder.transcode request_pb
1984
+ end
1985
+
1986
+ ##
1987
+ # @private
1988
+ #
1989
+ # GRPC transcoding helper method for the get_screenshot REST call
1990
+ #
1991
+ # @param request_pb [::Google::Cloud::Compute::V1::GetScreenshotInstanceRequest]
1992
+ # A request object representing the call parameters. Required.
1993
+ # @return [Array(String, [String, nil], Hash{String => String})]
1994
+ # Uri, Body, Query string parameters
1995
+ def transcode_get_screenshot_request request_pb
1996
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1997
+ .with_bindings(
1998
+ uri_method: :get,
1999
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/screenshot",
2000
+ matches: [
2001
+ ["project", %r{[^/]+}, false],
2002
+ ["zone", %r{[^/]+}, false],
2003
+ ["instance", %r{[^/]+}, false]
2004
+ ]
2005
+ )
2006
+ transcoder.transcode request_pb
2007
+ end
2008
+
2009
+ ##
2010
+ # @private
2011
+ #
2012
+ # GRPC transcoding helper method for the get_serial_port_output REST call
2013
+ #
2014
+ # @param request_pb [::Google::Cloud::Compute::V1::GetSerialPortOutputInstanceRequest]
2015
+ # A request object representing the call parameters. Required.
2016
+ # @return [Array(String, [String, nil], Hash{String => String})]
2017
+ # Uri, Body, Query string parameters
2018
+ def transcode_get_serial_port_output_request request_pb
2019
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2020
+ .with_bindings(
2021
+ uri_method: :get,
2022
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/serialPort",
2023
+ matches: [
2024
+ ["project", %r{[^/]+}, false],
2025
+ ["zone", %r{[^/]+}, false],
2026
+ ["instance", %r{[^/]+}, false]
2027
+ ]
2028
+ )
2029
+ transcoder.transcode request_pb
2030
+ end
2031
+
2032
+ ##
2033
+ # @private
2034
+ #
2035
+ # GRPC transcoding helper method for the get_shielded_instance_identity REST call
2036
+ #
2037
+ # @param request_pb [::Google::Cloud::Compute::V1::GetShieldedInstanceIdentityInstanceRequest]
2038
+ # A request object representing the call parameters. Required.
2039
+ # @return [Array(String, [String, nil], Hash{String => String})]
2040
+ # Uri, Body, Query string parameters
2041
+ def transcode_get_shielded_instance_identity_request request_pb
2042
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2043
+ .with_bindings(
2044
+ uri_method: :get,
2045
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity",
2046
+ matches: [
2047
+ ["project", %r{[^/]+}, false],
2048
+ ["zone", %r{[^/]+}, false],
2049
+ ["instance", %r{[^/]+}, false]
2050
+ ]
2051
+ )
2052
+ transcoder.transcode request_pb
2053
+ end
2054
+
2055
+ ##
2056
+ # @private
2057
+ #
2058
+ # GRPC transcoding helper method for the insert REST call
2059
+ #
2060
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceRequest]
2061
+ # A request object representing the call parameters. Required.
2062
+ # @return [Array(String, [String, nil], Hash{String => String})]
2063
+ # Uri, Body, Query string parameters
2064
+ def transcode_insert_request request_pb
2065
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2066
+ .with_bindings(
2067
+ uri_method: :post,
2068
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances",
2069
+ body: "instance_resource",
2070
+ matches: [
2071
+ ["project", %r{[^/]+}, false],
2072
+ ["zone", %r{[^/]+}, false]
2073
+ ]
2074
+ )
2075
+ transcoder.transcode request_pb
2076
+ end
2077
+
2078
+ ##
2079
+ # @private
2080
+ #
2081
+ # GRPC transcoding helper method for the list REST call
2082
+ #
2083
+ # @param request_pb [::Google::Cloud::Compute::V1::ListInstancesRequest]
2084
+ # A request object representing the call parameters. Required.
2085
+ # @return [Array(String, [String, nil], Hash{String => String})]
2086
+ # Uri, Body, Query string parameters
2087
+ def transcode_list_request request_pb
2088
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2089
+ .with_bindings(
2090
+ uri_method: :get,
2091
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances",
2092
+ matches: [
2093
+ ["project", %r{[^/]+}, false],
2094
+ ["zone", %r{[^/]+}, false]
2095
+ ]
2096
+ )
2097
+ transcoder.transcode request_pb
2098
+ end
2099
+
2100
+ ##
2101
+ # @private
2102
+ #
2103
+ # GRPC transcoding helper method for the list_referrers REST call
2104
+ #
2105
+ # @param request_pb [::Google::Cloud::Compute::V1::ListReferrersInstancesRequest]
2106
+ # A request object representing the call parameters. Required.
2107
+ # @return [Array(String, [String, nil], Hash{String => String})]
2108
+ # Uri, Body, Query string parameters
2109
+ def transcode_list_referrers_request request_pb
2110
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2111
+ .with_bindings(
2112
+ uri_method: :get,
2113
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/referrers",
2114
+ matches: [
2115
+ ["project", %r{[^/]+}, false],
2116
+ ["zone", %r{[^/]+}, false],
2117
+ ["instance", %r{[^/]+}, false]
2118
+ ]
2119
+ )
2120
+ transcoder.transcode request_pb
2121
+ end
2122
+
2123
+ ##
2124
+ # @private
2125
+ #
2126
+ # GRPC transcoding helper method for the remove_resource_policies REST call
2127
+ #
2128
+ # @param request_pb [::Google::Cloud::Compute::V1::RemoveResourcePoliciesInstanceRequest]
2129
+ # A request object representing the call parameters. Required.
2130
+ # @return [Array(String, [String, nil], Hash{String => String})]
2131
+ # Uri, Body, Query string parameters
2132
+ def transcode_remove_resource_policies_request request_pb
2133
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2134
+ .with_bindings(
2135
+ uri_method: :post,
2136
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies",
2137
+ body: "instances_remove_resource_policies_request_resource",
2138
+ matches: [
2139
+ ["project", %r{[^/]+}, false],
2140
+ ["zone", %r{[^/]+}, false],
2141
+ ["instance", %r{[^/]+}, false]
2142
+ ]
2143
+ )
2144
+ transcoder.transcode request_pb
2145
+ end
2146
+
2147
+ ##
2148
+ # @private
2149
+ #
2150
+ # GRPC transcoding helper method for the reset REST call
2151
+ #
2152
+ # @param request_pb [::Google::Cloud::Compute::V1::ResetInstanceRequest]
2153
+ # A request object representing the call parameters. Required.
2154
+ # @return [Array(String, [String, nil], Hash{String => String})]
2155
+ # Uri, Body, Query string parameters
2156
+ def transcode_reset_request request_pb
2157
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2158
+ .with_bindings(
2159
+ uri_method: :post,
2160
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/reset",
2161
+ matches: [
2162
+ ["project", %r{[^/]+}, false],
2163
+ ["zone", %r{[^/]+}, false],
2164
+ ["instance", %r{[^/]+}, false]
2165
+ ]
2166
+ )
2167
+ transcoder.transcode request_pb
2168
+ end
2169
+
2170
+ ##
2171
+ # @private
2172
+ #
2173
+ # GRPC transcoding helper method for the resume REST call
2174
+ #
2175
+ # @param request_pb [::Google::Cloud::Compute::V1::ResumeInstanceRequest]
2176
+ # A request object representing the call parameters. Required.
2177
+ # @return [Array(String, [String, nil], Hash{String => String})]
2178
+ # Uri, Body, Query string parameters
2179
+ def transcode_resume_request request_pb
2180
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2181
+ .with_bindings(
2182
+ uri_method: :post,
2183
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/resume",
2184
+ matches: [
2185
+ ["project", %r{[^/]+}, false],
2186
+ ["zone", %r{[^/]+}, false],
2187
+ ["instance", %r{[^/]+}, false]
2188
+ ]
2189
+ )
2190
+ transcoder.transcode request_pb
2191
+ end
2192
+
2088
2193
  ##
2194
+ # @private
2195
+ #
2196
+ # GRPC transcoding helper method for the send_diagnostic_interrupt REST call
2197
+ #
2198
+ # @param request_pb [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest]
2199
+ # A request object representing the call parameters. Required.
2200
+ # @return [Array(String, [String, nil], Hash{String => String})]
2201
+ # Uri, Body, Query string parameters
2202
+ def transcode_send_diagnostic_interrupt_request request_pb
2203
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2204
+ .with_bindings(
2205
+ uri_method: :post,
2206
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt",
2207
+ matches: [
2208
+ ["project", %r{[^/]+}, false],
2209
+ ["zone", %r{[^/]+}, false],
2210
+ ["instance", %r{[^/]+}, false]
2211
+ ]
2212
+ )
2213
+ transcoder.transcode request_pb
2214
+ end
2215
+
2216
+ ##
2217
+ # @private
2218
+ #
2219
+ # GRPC transcoding helper method for the set_deletion_protection REST call
2220
+ #
2221
+ # @param request_pb [::Google::Cloud::Compute::V1::SetDeletionProtectionInstanceRequest]
2222
+ # A request object representing the call parameters. Required.
2223
+ # @return [Array(String, [String, nil], Hash{String => String})]
2224
+ # Uri, Body, Query string parameters
2225
+ def transcode_set_deletion_protection_request request_pb
2226
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2227
+ .with_bindings(
2228
+ uri_method: :post,
2229
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection",
2230
+ matches: [
2231
+ ["project", %r{[^/]+}, false],
2232
+ ["zone", %r{[^/]+}, false],
2233
+ ["resource", %r{[^/]+}, false]
2234
+ ]
2235
+ )
2236
+ transcoder.transcode request_pb
2237
+ end
2238
+
2239
+ ##
2240
+ # @private
2241
+ #
2242
+ # GRPC transcoding helper method for the set_disk_auto_delete REST call
2243
+ #
2244
+ # @param request_pb [::Google::Cloud::Compute::V1::SetDiskAutoDeleteInstanceRequest]
2245
+ # A request object representing the call parameters. Required.
2246
+ # @return [Array(String, [String, nil], Hash{String => String})]
2247
+ # Uri, Body, Query string parameters
2248
+ def transcode_set_disk_auto_delete_request request_pb
2249
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2250
+ .with_bindings(
2251
+ uri_method: :post,
2252
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete",
2253
+ matches: [
2254
+ ["project", %r{[^/]+}, false],
2255
+ ["zone", %r{[^/]+}, false],
2256
+ ["instance", %r{[^/]+}, false]
2257
+ ]
2258
+ )
2259
+ transcoder.transcode request_pb
2260
+ end
2261
+
2262
+ ##
2263
+ # @private
2264
+ #
2265
+ # GRPC transcoding helper method for the set_iam_policy REST call
2266
+ #
2267
+ # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInstanceRequest]
2268
+ # A request object representing the call parameters. Required.
2269
+ # @return [Array(String, [String, nil], Hash{String => String})]
2270
+ # Uri, Body, Query string parameters
2271
+ def transcode_set_iam_policy_request request_pb
2272
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2273
+ .with_bindings(
2274
+ uri_method: :post,
2275
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy",
2276
+ body: "zone_set_policy_request_resource",
2277
+ matches: [
2278
+ ["project", %r{[^/]+}, false],
2279
+ ["zone", %r{[^/]+}, false],
2280
+ ["resource", %r{[^/]+}, false]
2281
+ ]
2282
+ )
2283
+ transcoder.transcode request_pb
2284
+ end
2285
+
2286
+ ##
2287
+ # @private
2288
+ #
2289
+ # GRPC transcoding helper method for the set_labels REST call
2290
+ #
2291
+ # @param request_pb [::Google::Cloud::Compute::V1::SetLabelsInstanceRequest]
2292
+ # A request object representing the call parameters. Required.
2293
+ # @return [Array(String, [String, nil], Hash{String => String})]
2294
+ # Uri, Body, Query string parameters
2295
+ def transcode_set_labels_request request_pb
2296
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2297
+ .with_bindings(
2298
+ uri_method: :post,
2299
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setLabels",
2300
+ body: "instances_set_labels_request_resource",
2301
+ matches: [
2302
+ ["project", %r{[^/]+}, false],
2303
+ ["zone", %r{[^/]+}, false],
2304
+ ["instance", %r{[^/]+}, false]
2305
+ ]
2306
+ )
2307
+ transcoder.transcode request_pb
2308
+ end
2309
+
2310
+ ##
2311
+ # @private
2312
+ #
2313
+ # GRPC transcoding helper method for the set_machine_resources REST call
2314
+ #
2315
+ # @param request_pb [::Google::Cloud::Compute::V1::SetMachineResourcesInstanceRequest]
2316
+ # A request object representing the call parameters. Required.
2317
+ # @return [Array(String, [String, nil], Hash{String => String})]
2318
+ # Uri, Body, Query string parameters
2319
+ def transcode_set_machine_resources_request request_pb
2320
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2321
+ .with_bindings(
2322
+ uri_method: :post,
2323
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineResources",
2324
+ body: "instances_set_machine_resources_request_resource",
2325
+ matches: [
2326
+ ["project", %r{[^/]+}, false],
2327
+ ["zone", %r{[^/]+}, false],
2328
+ ["instance", %r{[^/]+}, false]
2329
+ ]
2330
+ )
2331
+ transcoder.transcode request_pb
2332
+ end
2333
+
2334
+ ##
2335
+ # @private
2336
+ #
2337
+ # GRPC transcoding helper method for the set_machine_type REST call
2338
+ #
2339
+ # @param request_pb [::Google::Cloud::Compute::V1::SetMachineTypeInstanceRequest]
2340
+ # A request object representing the call parameters. Required.
2341
+ # @return [Array(String, [String, nil], Hash{String => String})]
2342
+ # Uri, Body, Query string parameters
2343
+ def transcode_set_machine_type_request request_pb
2344
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2345
+ .with_bindings(
2346
+ uri_method: :post,
2347
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMachineType",
2348
+ body: "instances_set_machine_type_request_resource",
2349
+ matches: [
2350
+ ["project", %r{[^/]+}, false],
2351
+ ["zone", %r{[^/]+}, false],
2352
+ ["instance", %r{[^/]+}, false]
2353
+ ]
2354
+ )
2355
+ transcoder.transcode request_pb
2356
+ end
2357
+
2358
+ ##
2359
+ # @private
2360
+ #
2361
+ # GRPC transcoding helper method for the set_metadata REST call
2362
+ #
2363
+ # @param request_pb [::Google::Cloud::Compute::V1::SetMetadataInstanceRequest]
2364
+ # A request object representing the call parameters. Required.
2365
+ # @return [Array(String, [String, nil], Hash{String => String})]
2366
+ # Uri, Body, Query string parameters
2367
+ def transcode_set_metadata_request request_pb
2368
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2369
+ .with_bindings(
2370
+ uri_method: :post,
2371
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMetadata",
2372
+ body: "metadata_resource",
2373
+ matches: [
2374
+ ["project", %r{[^/]+}, false],
2375
+ ["zone", %r{[^/]+}, false],
2376
+ ["instance", %r{[^/]+}, false]
2377
+ ]
2378
+ )
2379
+ transcoder.transcode request_pb
2380
+ end
2381
+
2382
+ ##
2383
+ # @private
2384
+ #
2385
+ # GRPC transcoding helper method for the set_min_cpu_platform REST call
2386
+ #
2387
+ # @param request_pb [::Google::Cloud::Compute::V1::SetMinCpuPlatformInstanceRequest]
2388
+ # A request object representing the call parameters. Required.
2389
+ # @return [Array(String, [String, nil], Hash{String => String})]
2390
+ # Uri, Body, Query string parameters
2391
+ def transcode_set_min_cpu_platform_request request_pb
2392
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2393
+ .with_bindings(
2394
+ uri_method: :post,
2395
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform",
2396
+ body: "instances_set_min_cpu_platform_request_resource",
2397
+ matches: [
2398
+ ["project", %r{[^/]+}, false],
2399
+ ["zone", %r{[^/]+}, false],
2400
+ ["instance", %r{[^/]+}, false]
2401
+ ]
2402
+ )
2403
+ transcoder.transcode request_pb
2404
+ end
2405
+
2406
+ ##
2407
+ # @private
2408
+ #
2409
+ # GRPC transcoding helper method for the set_scheduling REST call
2410
+ #
2411
+ # @param request_pb [::Google::Cloud::Compute::V1::SetSchedulingInstanceRequest]
2412
+ # A request object representing the call parameters. Required.
2413
+ # @return [Array(String, [String, nil], Hash{String => String})]
2414
+ # Uri, Body, Query string parameters
2415
+ def transcode_set_scheduling_request request_pb
2416
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2417
+ .with_bindings(
2418
+ uri_method: :post,
2419
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setScheduling",
2420
+ body: "scheduling_resource",
2421
+ matches: [
2422
+ ["project", %r{[^/]+}, false],
2423
+ ["zone", %r{[^/]+}, false],
2424
+ ["instance", %r{[^/]+}, false]
2425
+ ]
2426
+ )
2427
+ transcoder.transcode request_pb
2428
+ end
2429
+
2430
+ ##
2431
+ # @private
2432
+ #
2433
+ # GRPC transcoding helper method for the set_service_account REST call
2434
+ #
2435
+ # @param request_pb [::Google::Cloud::Compute::V1::SetServiceAccountInstanceRequest]
2436
+ # A request object representing the call parameters. Required.
2437
+ # @return [Array(String, [String, nil], Hash{String => String})]
2438
+ # Uri, Body, Query string parameters
2439
+ def transcode_set_service_account_request request_pb
2440
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2441
+ .with_bindings(
2442
+ uri_method: :post,
2443
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount",
2444
+ body: "instances_set_service_account_request_resource",
2445
+ matches: [
2446
+ ["project", %r{[^/]+}, false],
2447
+ ["zone", %r{[^/]+}, false],
2448
+ ["instance", %r{[^/]+}, false]
2449
+ ]
2450
+ )
2451
+ transcoder.transcode request_pb
2452
+ end
2453
+
2454
+ ##
2455
+ # @private
2456
+ #
2457
+ # GRPC transcoding helper method for the set_shielded_instance_integrity_policy REST call
2458
+ #
2459
+ # @param request_pb [::Google::Cloud::Compute::V1::SetShieldedInstanceIntegrityPolicyInstanceRequest]
2460
+ # A request object representing the call parameters. Required.
2461
+ # @return [Array(String, [String, nil], Hash{String => String})]
2462
+ # Uri, Body, Query string parameters
2463
+ def transcode_set_shielded_instance_integrity_policy_request request_pb
2464
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2465
+ .with_bindings(
2466
+ uri_method: :patch,
2467
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy",
2468
+ body: "shielded_instance_integrity_policy_resource",
2469
+ matches: [
2470
+ ["project", %r{[^/]+}, false],
2471
+ ["zone", %r{[^/]+}, false],
2472
+ ["instance", %r{[^/]+}, false]
2473
+ ]
2474
+ )
2475
+ transcoder.transcode request_pb
2476
+ end
2477
+
2478
+ ##
2479
+ # @private
2480
+ #
2481
+ # GRPC transcoding helper method for the set_tags REST call
2482
+ #
2483
+ # @param request_pb [::Google::Cloud::Compute::V1::SetTagsInstanceRequest]
2484
+ # A request object representing the call parameters. Required.
2485
+ # @return [Array(String, [String, nil], Hash{String => String})]
2486
+ # Uri, Body, Query string parameters
2487
+ def transcode_set_tags_request request_pb
2488
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2489
+ .with_bindings(
2490
+ uri_method: :post,
2491
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/setTags",
2492
+ body: "tags_resource",
2493
+ matches: [
2494
+ ["project", %r{[^/]+}, false],
2495
+ ["zone", %r{[^/]+}, false],
2496
+ ["instance", %r{[^/]+}, false]
2497
+ ]
2498
+ )
2499
+ transcoder.transcode request_pb
2500
+ end
2501
+
2502
+ ##
2503
+ # @private
2504
+ #
2505
+ # GRPC transcoding helper method for the simulate_maintenance_event REST call
2506
+ #
2507
+ # @param request_pb [::Google::Cloud::Compute::V1::SimulateMaintenanceEventInstanceRequest]
2508
+ # A request object representing the call parameters. Required.
2509
+ # @return [Array(String, [String, nil], Hash{String => String})]
2510
+ # Uri, Body, Query string parameters
2511
+ def transcode_simulate_maintenance_event_request request_pb
2512
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2513
+ .with_bindings(
2514
+ uri_method: :post,
2515
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent",
2516
+ matches: [
2517
+ ["project", %r{[^/]+}, false],
2518
+ ["zone", %r{[^/]+}, false],
2519
+ ["instance", %r{[^/]+}, false]
2520
+ ]
2521
+ )
2522
+ transcoder.transcode request_pb
2523
+ end
2524
+
2525
+ ##
2526
+ # @private
2527
+ #
2528
+ # GRPC transcoding helper method for the start REST call
2529
+ #
2530
+ # @param request_pb [::Google::Cloud::Compute::V1::StartInstanceRequest]
2531
+ # A request object representing the call parameters. Required.
2532
+ # @return [Array(String, [String, nil], Hash{String => String})]
2533
+ # Uri, Body, Query string parameters
2534
+ def transcode_start_request request_pb
2535
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2536
+ .with_bindings(
2537
+ uri_method: :post,
2538
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/start",
2539
+ matches: [
2540
+ ["project", %r{[^/]+}, false],
2541
+ ["zone", %r{[^/]+}, false],
2542
+ ["instance", %r{[^/]+}, false]
2543
+ ]
2544
+ )
2545
+ transcoder.transcode request_pb
2546
+ end
2547
+
2548
+ ##
2549
+ # @private
2550
+ #
2551
+ # GRPC transcoding helper method for the start_with_encryption_key REST call
2552
+ #
2553
+ # @param request_pb [::Google::Cloud::Compute::V1::StartWithEncryptionKeyInstanceRequest]
2554
+ # A request object representing the call parameters. Required.
2555
+ # @return [Array(String, [String, nil], Hash{String => String})]
2556
+ # Uri, Body, Query string parameters
2557
+ def transcode_start_with_encryption_key_request request_pb
2558
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2559
+ .with_bindings(
2560
+ uri_method: :post,
2561
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey",
2562
+ body: "instances_start_with_encryption_key_request_resource",
2563
+ matches: [
2564
+ ["project", %r{[^/]+}, false],
2565
+ ["zone", %r{[^/]+}, false],
2566
+ ["instance", %r{[^/]+}, false]
2567
+ ]
2568
+ )
2569
+ transcoder.transcode request_pb
2570
+ end
2571
+
2572
+ ##
2573
+ # @private
2574
+ #
2575
+ # GRPC transcoding helper method for the stop REST call
2576
+ #
2577
+ # @param request_pb [::Google::Cloud::Compute::V1::StopInstanceRequest]
2578
+ # A request object representing the call parameters. Required.
2579
+ # @return [Array(String, [String, nil], Hash{String => String})]
2580
+ # Uri, Body, Query string parameters
2581
+ def transcode_stop_request request_pb
2582
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2583
+ .with_bindings(
2584
+ uri_method: :post,
2585
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/stop",
2586
+ matches: [
2587
+ ["project", %r{[^/]+}, false],
2588
+ ["zone", %r{[^/]+}, false],
2589
+ ["instance", %r{[^/]+}, false]
2590
+ ]
2591
+ )
2592
+ transcoder.transcode request_pb
2593
+ end
2594
+
2595
+ ##
2596
+ # @private
2597
+ #
2598
+ # GRPC transcoding helper method for the suspend REST call
2599
+ #
2600
+ # @param request_pb [::Google::Cloud::Compute::V1::SuspendInstanceRequest]
2601
+ # A request object representing the call parameters. Required.
2602
+ # @return [Array(String, [String, nil], Hash{String => String})]
2603
+ # Uri, Body, Query string parameters
2604
+ def transcode_suspend_request request_pb
2605
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2606
+ .with_bindings(
2607
+ uri_method: :post,
2608
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/suspend",
2609
+ matches: [
2610
+ ["project", %r{[^/]+}, false],
2611
+ ["zone", %r{[^/]+}, false],
2612
+ ["instance", %r{[^/]+}, false]
2613
+ ]
2614
+ )
2615
+ transcoder.transcode request_pb
2616
+ end
2617
+
2618
+ ##
2619
+ # @private
2620
+ #
2621
+ # GRPC transcoding helper method for the test_iam_permissions REST call
2622
+ #
2623
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInstanceRequest]
2624
+ # A request object representing the call parameters. Required.
2625
+ # @return [Array(String, [String, nil], Hash{String => String})]
2626
+ # Uri, Body, Query string parameters
2627
+ def transcode_test_iam_permissions_request request_pb
2628
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2629
+ .with_bindings(
2630
+ uri_method: :post,
2631
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions",
2632
+ body: "test_permissions_request_resource",
2633
+ matches: [
2634
+ ["project", %r{[^/]+}, false],
2635
+ ["zone", %r{[^/]+}, false],
2636
+ ["resource", %r{[^/]+}, false]
2637
+ ]
2638
+ )
2639
+ transcoder.transcode request_pb
2640
+ end
2641
+
2642
+ ##
2643
+ # @private
2644
+ #
2645
+ # GRPC transcoding helper method for the update REST call
2646
+ #
2647
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateInstanceRequest]
2648
+ # A request object representing the call parameters. Required.
2649
+ # @return [Array(String, [String, nil], Hash{String => String})]
2650
+ # Uri, Body, Query string parameters
2651
+ def transcode_update_request request_pb
2652
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2653
+ .with_bindings(
2654
+ uri_method: :put,
2655
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}",
2656
+ body: "instance_resource",
2657
+ matches: [
2658
+ ["project", %r{[^/]+}, false],
2659
+ ["zone", %r{[^/]+}, false],
2660
+ ["instance", %r{[^/]+}, false]
2661
+ ]
2662
+ )
2663
+ transcoder.transcode request_pb
2664
+ end
2665
+
2666
+ ##
2667
+ # @private
2668
+ #
2669
+ # GRPC transcoding helper method for the update_access_config REST call
2670
+ #
2671
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateAccessConfigInstanceRequest]
2672
+ # A request object representing the call parameters. Required.
2673
+ # @return [Array(String, [String, nil], Hash{String => String})]
2674
+ # Uri, Body, Query string parameters
2675
+ def transcode_update_access_config_request request_pb
2676
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2677
+ .with_bindings(
2678
+ uri_method: :post,
2679
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig",
2680
+ body: "access_config_resource",
2681
+ matches: [
2682
+ ["project", %r{[^/]+}, false],
2683
+ ["zone", %r{[^/]+}, false],
2684
+ ["instance", %r{[^/]+}, false]
2685
+ ]
2686
+ )
2687
+ transcoder.transcode request_pb
2688
+ end
2689
+
2690
+ ##
2691
+ # @private
2692
+ #
2693
+ # GRPC transcoding helper method for the update_display_device REST call
2694
+ #
2695
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateDisplayDeviceInstanceRequest]
2696
+ # A request object representing the call parameters. Required.
2697
+ # @return [Array(String, [String, nil], Hash{String => String})]
2698
+ # Uri, Body, Query string parameters
2699
+ def transcode_update_display_device_request request_pb
2700
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2701
+ .with_bindings(
2702
+ uri_method: :patch,
2703
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice",
2704
+ body: "display_device_resource",
2705
+ matches: [
2706
+ ["project", %r{[^/]+}, false],
2707
+ ["zone", %r{[^/]+}, false],
2708
+ ["instance", %r{[^/]+}, false]
2709
+ ]
2710
+ )
2711
+ transcoder.transcode request_pb
2712
+ end
2713
+
2714
+ ##
2715
+ # @private
2716
+ #
2717
+ # GRPC transcoding helper method for the update_network_interface REST call
2718
+ #
2719
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdateNetworkInterfaceInstanceRequest]
2720
+ # A request object representing the call parameters. Required.
2721
+ # @return [Array(String, [String, nil], Hash{String => String})]
2722
+ # Uri, Body, Query string parameters
2723
+ def transcode_update_network_interface_request request_pb
2724
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2725
+ .with_bindings(
2726
+ uri_method: :patch,
2727
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface",
2728
+ body: "network_interface_resource",
2729
+ matches: [
2730
+ ["project", %r{[^/]+}, false],
2731
+ ["zone", %r{[^/]+}, false],
2732
+ ["instance", %r{[^/]+}, false]
2733
+ ]
2734
+ )
2735
+ transcoder.transcode request_pb
2736
+ end
2737
+
2738
+ ##
2739
+ # @private
2740
+ #
2089
2741
  # GRPC transcoding helper method for the update_shielded_instance_config REST call
2090
2742
  #
2091
2743
  # @param request_pb [::Google::Cloud::Compute::V1::UpdateShieldedInstanceConfigInstanceRequest]
@@ -2093,12 +2745,18 @@ module Google
2093
2745
  # @return [Array(String, [String, nil], Hash{String => String})]
2094
2746
  # Uri, Body, Query string parameters
2095
2747
  def transcode_update_shielded_instance_config_request request_pb
2096
- uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instances/#{request_pb.instance}/updateShieldedInstanceConfig"
2097
- body = request_pb.shielded_instance_config_resource.to_json
2098
- query_string_params = {}
2099
- query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
2100
-
2101
- [uri, body, query_string_params]
2748
+ transcoder = Gapic::Rest::GrpcTranscoder.new
2749
+ .with_bindings(
2750
+ uri_method: :patch,
2751
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig",
2752
+ body: "shielded_instance_config_resource",
2753
+ matches: [
2754
+ ["project", %r{[^/]+}, false],
2755
+ ["zone", %r{[^/]+}, false],
2756
+ ["instance", %r{[^/]+}, false]
2757
+ ]
2758
+ )
2759
+ transcoder.transcode request_pb
2102
2760
  end
2103
2761
  end
2104
2762
  end