google-cloud-compute-v1 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +19 -37
  4. data/README.md +4 -30
  5. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +127 -90
  6. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +188 -0
  7. data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +0 -2
  8. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +172 -130
  9. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +279 -0
  10. data/lib/google/cloud/compute/v1/addresses/rest.rb +0 -2
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +218 -172
  12. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +373 -0
  13. data/lib/google/cloud/compute/v1/autoscalers/rest.rb +0 -2
  14. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +236 -185
  15. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +413 -0
  16. data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +0 -2
  17. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +308 -253
  18. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +553 -0
  19. data/lib/google/cloud/compute/v1/backend_services/rest.rb +0 -2
  20. data/lib/google/cloud/compute/v1/compute_pb.rb +8507 -7466
  21. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +127 -90
  22. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +188 -0
  23. data/lib/google/cloud/compute/v1/disk_types/rest.rb +0 -2
  24. data/lib/google/cloud/compute/v1/disks/rest/client.rb +345 -272
  25. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +644 -0
  26. data/lib/google/cloud/compute/v1/disks/rest.rb +0 -2
  27. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +184 -129
  28. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +317 -0
  29. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +0 -2
  30. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +476 -343
  31. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +869 -0
  32. data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +0 -2
  33. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +191 -145
  34. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +321 -0
  35. data/lib/google/cloud/compute/v1/firewalls/rest.rb +0 -2
  36. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +296 -171
  37. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +417 -0
  38. data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +0 -2
  39. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +145 -103
  40. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +229 -0
  41. data/lib/google/cloud/compute/v1/global_addresses/rest.rb +0 -2
  42. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +265 -144
  43. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +365 -0
  44. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +0 -2
  45. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +215 -172
  46. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +370 -0
  47. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +0 -2
  48. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +165 -118
  49. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +274 -0
  50. data/lib/google/cloud/compute/v1/global_operations/rest.rb +0 -2
  51. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +118 -76
  52. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +186 -0
  53. data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +0 -2
  54. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +175 -124
  55. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +275 -0
  56. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +0 -2
  57. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +218 -172
  58. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +371 -0
  59. data/lib/google/cloud/compute/v1/health_checks/rest.rb +0 -2
  60. data/lib/google/cloud/compute/v1/image_family_views/credentials.rb +53 -0
  61. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +318 -0
  62. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +89 -0
  63. data/lib/google/cloud/compute/v1/image_family_views/rest.rb +33 -0
  64. data/lib/google/cloud/compute/v1/image_family_views.rb +44 -0
  65. data/lib/google/cloud/compute/v1/images/rest/client.rb +291 -209
  66. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +542 -0
  67. data/lib/google/cloud/compute/v1/images/rest.rb +0 -2
  68. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +526 -477
  69. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +974 -0
  70. data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +0 -2
  71. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +271 -233
  72. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +467 -0
  73. data/lib/google/cloud/compute/v1/instance_groups/rest.rb +0 -2
  74. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +202 -139
  75. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +362 -0
  76. data/lib/google/cloud/compute/v1/instance_templates/rest.rb +0 -2
  77. data/lib/google/cloud/compute/v1/instances/rest/client.rb +1186 -797
  78. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +2018 -0
  79. data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
  80. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +195 -151
  81. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +326 -0
  82. data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +0 -2
  83. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +100 -63
  84. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +138 -0
  85. data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +0 -2
  86. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +189 -135
  87. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +318 -0
  88. data/lib/google/cloud/compute/v1/interconnects/rest.rb +0 -2
  89. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +93 -50
  90. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +133 -0
  91. data/lib/google/cloud/compute/v1/license_codes/rest.rb +0 -2
  92. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +209 -146
  93. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +362 -0
  94. data/lib/google/cloud/compute/v1/licenses/rest.rb +0 -2
  95. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +127 -90
  96. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +188 -0
  97. data/lib/google/cloud/compute/v1/machine_types/rest.rb +0 -2
  98. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +261 -213
  99. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +465 -0
  100. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +0 -2
  101. data/lib/google/cloud/compute/v1/networks/rest/client.rb +363 -234
  102. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +553 -0
  103. data/lib/google/cloud/compute/v1/networks/rest.rb +0 -2
  104. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +345 -277
  105. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +646 -0
  106. data/lib/google/cloud/compute/v1/node_groups/rest.rb +0 -2
  107. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +229 -166
  108. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +412 -0
  109. data/lib/google/cloud/compute/v1/node_templates/rest.rb +0 -2
  110. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +127 -90
  111. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +188 -0
  112. data/lib/google/cloud/compute/v1/node_types/rest.rb +0 -2
  113. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +213 -163
  114. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +369 -0
  115. data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +0 -2
  116. data/lib/google/cloud/compute/v1/projects/rest/client.rb +351 -288
  117. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +643 -0
  118. data/lib/google/cloud/compute/v1/projects/rest.rb +0 -2
  119. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +175 -124
  120. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +275 -0
  121. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +0 -2
  122. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +203 -151
  123. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +325 -0
  124. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +0 -2
  125. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +191 -145
  126. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +323 -0
  127. data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +0 -2
  128. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +212 -160
  129. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +365 -0
  130. data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +0 -2
  131. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +151 -112
  132. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +234 -0
  133. data/lib/google/cloud/compute/v1/region_commitments/rest.rb +0 -2
  134. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +100 -63
  135. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +138 -0
  136. data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +0 -2
  137. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +318 -245
  138. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +593 -0
  139. data/lib/google/cloud/compute/v1/region_disks/rest.rb +0 -2
  140. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +168 -124
  141. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +275 -0
  142. data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +0 -2
  143. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +191 -145
  144. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +321 -0
  145. data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +0 -2
  146. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +498 -445
  147. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +924 -0
  148. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +0 -2
  149. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +148 -113
  150. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +234 -0
  151. data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +0 -2
  152. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +76 -45
  153. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +92 -0
  154. data/lib/google/cloud/compute/v1/region_instances/rest.rb +0 -2
  155. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +145 -103
  156. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +229 -0
  157. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +0 -2
  158. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +145 -103
  159. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +229 -0
  160. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +0 -2
  161. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +137 -90
  162. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +224 -0
  163. data/lib/google/cloud/compute/v1/region_operations/rest.rb +0 -2
  164. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +145 -103
  165. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +229 -0
  166. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +0 -2
  167. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +168 -124
  168. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +275 -0
  169. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +0 -2
  170. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +191 -145
  171. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +321 -0
  172. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +0 -2
  173. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +205 -137
  174. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +365 -0
  175. data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +0 -2
  176. data/lib/google/cloud/compute/v1/regions/rest/client.rb +100 -63
  177. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +138 -0
  178. data/lib/google/cloud/compute/v1/regions/rest.rb +0 -2
  179. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +252 -187
  180. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +458 -0
  181. data/lib/google/cloud/compute/v1/reservations/rest.rb +0 -2
  182. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +229 -166
  183. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +412 -0
  184. data/lib/google/cloud/compute/v1/resource_policies/rest.rb +0 -2
  185. data/lib/google/cloud/compute/v1/routers/rest/client.rb +284 -222
  186. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +507 -0
  187. data/lib/google/cloud/compute/v1/routers/rest.rb +0 -2
  188. data/lib/google/cloud/compute/v1/routes/rest/client.rb +145 -103
  189. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +229 -0
  190. data/lib/google/cloud/compute/v1/routes/rest.rb +0 -2
  191. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +277 -205
  192. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +504 -0
  193. data/lib/google/cloud/compute/v1/security_policies/rest.rb +0 -2
  194. data/lib/google/cloud/compute/v1/service_attachments/credentials.rb +52 -0
  195. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +954 -0
  196. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +458 -0
  197. data/lib/google/cloud/compute/v1/service_attachments/rest.rb +33 -0
  198. data/lib/google/cloud/compute/v1/service_attachments.rb +44 -0
  199. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +201 -135
  200. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +360 -0
  201. data/lib/google/cloud/compute/v1/snapshots/rest.rb +0 -2
  202. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +172 -130
  203. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +279 -0
  204. data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +0 -2
  205. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +192 -149
  206. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +324 -0
  207. data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +0 -2
  208. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +325 -256
  209. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +600 -0
  210. data/lib/google/cloud/compute/v1/subnetworks/rest.rb +0 -2
  211. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +168 -124
  212. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +275 -0
  213. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +0 -2
  214. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +219 -173
  215. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +371 -0
  216. data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +0 -2
  217. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +340 -213
  218. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +509 -0
  219. data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +0 -2
  220. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +172 -130
  221. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +279 -0
  222. data/lib/google/cloud/compute/v1/target_instances/rest.rb +0 -2
  223. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +305 -247
  224. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +554 -0
  225. data/lib/google/cloud/compute/v1/target_pools/rest.rb +0 -2
  226. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +237 -187
  227. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +413 -0
  228. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +0 -2
  229. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +191 -145
  230. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +321 -0
  231. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +0 -2
  232. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +172 -130
  233. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +279 -0
  234. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +0 -2
  235. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +260 -208
  236. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +461 -0
  237. data/lib/google/cloud/compute/v1/url_maps/rest.rb +0 -2
  238. data/lib/google/cloud/compute/v1/version.rb +1 -1
  239. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +234 -174
  240. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +412 -0
  241. data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +0 -2
  242. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +172 -130
  243. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +279 -0
  244. data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +0 -2
  245. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +137 -90
  246. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +224 -0
  247. data/lib/google/cloud/compute/v1/zone_operations/rest.rb +0 -2
  248. data/lib/google/cloud/compute/v1/zones/rest/client.rb +100 -63
  249. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +138 -0
  250. data/lib/google/cloud/compute/v1/zones/rest.rb +0 -2
  251. data/lib/google/cloud/compute/v1.rb +7 -0
  252. data/proto_docs/README.md +1 -1
  253. data/proto_docs/google/api/field_behavior.rb +6 -0
  254. data/proto_docs/google/api/resource.rb +10 -71
  255. data/proto_docs/google/cloud/compute/v1/compute.rb +18964 -19481
  256. data/proto_docs/google/cloud/extended_operations.rb +51 -0
  257. metadata +110 -9
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/instances/rest/service_stub"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -31,8 +32,6 @@ module Google
31
32
  # The Instances API.
32
33
  #
33
34
  class Client
34
- include GrpcTranscoding
35
-
36
35
  # @private
37
36
  attr_reader :instances_stub
38
37
 
@@ -42,13 +41,12 @@ module Google
42
41
  # See {::Google::Cloud::Compute::V1::Instances::Rest::Client::Configuration}
43
42
  # for a description of the configuration fields.
44
43
  #
45
- # ## Example
46
- #
47
- # To modify the configuration for all Instances clients:
44
+ # @example
48
45
  #
49
- # ::Google::Cloud::Compute::V1::Instances::Rest::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
46
+ # # Modify the configuration for all Instances clients
47
+ # ::Google::Cloud::Compute::V1::Instances::Rest::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
52
50
  #
53
51
  # @yield [config] Configure the Client client.
54
52
  # @yieldparam config [Client::Configuration]
@@ -66,6 +64,122 @@ module Google
66
64
  end
67
65
  default_config = Client::Configuration.new parent_config
68
66
 
67
+ default_config.rpcs.add_access_config.timeout = 600.0
68
+
69
+ default_config.rpcs.add_resource_policies.timeout = 600.0
70
+
71
+ default_config.rpcs.aggregated_list.timeout = 600.0
72
+ default_config.rpcs.aggregated_list.retry_policy = {
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
74
+ }
75
+
76
+ default_config.rpcs.attach_disk.timeout = 600.0
77
+
78
+ default_config.rpcs.bulk_insert.timeout = 600.0
79
+
80
+ default_config.rpcs.delete.timeout = 600.0
81
+
82
+ default_config.rpcs.delete_access_config.timeout = 600.0
83
+
84
+ default_config.rpcs.detach_disk.timeout = 600.0
85
+
86
+ default_config.rpcs.get.timeout = 600.0
87
+ default_config.rpcs.get.retry_policy = {
88
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
89
+ }
90
+
91
+ default_config.rpcs.get_effective_firewalls.timeout = 600.0
92
+ default_config.rpcs.get_effective_firewalls.retry_policy = {
93
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
94
+ }
95
+
96
+ default_config.rpcs.get_guest_attributes.timeout = 600.0
97
+ default_config.rpcs.get_guest_attributes.retry_policy = {
98
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
99
+ }
100
+
101
+ default_config.rpcs.get_iam_policy.timeout = 600.0
102
+ default_config.rpcs.get_iam_policy.retry_policy = {
103
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
104
+ }
105
+
106
+ default_config.rpcs.get_screenshot.timeout = 600.0
107
+ default_config.rpcs.get_screenshot.retry_policy = {
108
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
109
+ }
110
+
111
+ default_config.rpcs.get_serial_port_output.timeout = 600.0
112
+ default_config.rpcs.get_serial_port_output.retry_policy = {
113
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
114
+ }
115
+
116
+ default_config.rpcs.get_shielded_instance_identity.timeout = 600.0
117
+ default_config.rpcs.get_shielded_instance_identity.retry_policy = {
118
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
119
+ }
120
+
121
+ default_config.rpcs.insert.timeout = 600.0
122
+
123
+ default_config.rpcs.list.timeout = 600.0
124
+ default_config.rpcs.list.retry_policy = {
125
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
126
+ }
127
+
128
+ default_config.rpcs.list_referrers.timeout = 600.0
129
+ default_config.rpcs.list_referrers.retry_policy = {
130
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
131
+ }
132
+
133
+ default_config.rpcs.remove_resource_policies.timeout = 600.0
134
+
135
+ default_config.rpcs.reset.timeout = 600.0
136
+
137
+ default_config.rpcs.send_diagnostic_interrupt.timeout = 600.0
138
+
139
+ default_config.rpcs.set_deletion_protection.timeout = 600.0
140
+
141
+ default_config.rpcs.set_disk_auto_delete.timeout = 600.0
142
+
143
+ default_config.rpcs.set_iam_policy.timeout = 600.0
144
+
145
+ default_config.rpcs.set_labels.timeout = 600.0
146
+
147
+ default_config.rpcs.set_machine_resources.timeout = 600.0
148
+
149
+ default_config.rpcs.set_machine_type.timeout = 600.0
150
+
151
+ default_config.rpcs.set_metadata.timeout = 600.0
152
+
153
+ default_config.rpcs.set_min_cpu_platform.timeout = 600.0
154
+
155
+ default_config.rpcs.set_scheduling.timeout = 600.0
156
+
157
+ default_config.rpcs.set_service_account.timeout = 600.0
158
+
159
+ default_config.rpcs.set_shielded_instance_integrity_policy.timeout = 600.0
160
+
161
+ default_config.rpcs.set_tags.timeout = 600.0
162
+
163
+ default_config.rpcs.simulate_maintenance_event.timeout = 600.0
164
+
165
+ default_config.rpcs.start.timeout = 600.0
166
+
167
+ default_config.rpcs.start_with_encryption_key.timeout = 600.0
168
+
169
+ default_config.rpcs.stop.timeout = 600.0
170
+
171
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
172
+
173
+ default_config.rpcs.update.timeout = 600.0
174
+
175
+ default_config.rpcs.update_access_config.timeout = 600.0
176
+
177
+ default_config.rpcs.update_display_device.timeout = 600.0
178
+
179
+ default_config.rpcs.update_network_interface.timeout = 600.0
180
+
181
+ default_config.rpcs.update_shielded_instance_config.timeout = 600.0
182
+
69
183
  default_config
70
184
  end
71
185
  yield @configure if block_given?
@@ -95,28 +209,20 @@ module Google
95
209
  ##
96
210
  # Create a new Instances REST client object.
97
211
  #
98
- # ## Examples
99
- #
100
- # To create a new Instances REST client with the default
101
- # configuration:
212
+ # @example
102
213
  #
103
- # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new
214
+ # # Create a client using the default configuration
215
+ # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new
104
216
  #
105
- # To create a new Instances REST client with a custom
106
- # configuration:
107
- #
108
- # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new do |config|
109
- # config.timeout = 10.0
110
- # end
217
+ # # Create a client using a custom configuration
218
+ # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new do |config|
219
+ # config.timeout = 10.0
220
+ # end
111
221
  #
112
222
  # @yield [config] Configure the Instances client.
113
223
  # @yieldparam config [Client::Configuration]
114
224
  #
115
225
  def initialize
116
- # These require statements are intentionally placed here to initialize
117
- # the REST modules only when it's required.
118
- require "gapic/rest"
119
-
120
226
  # Create the configuration object
121
227
  @config = Configuration.new Client.configure
122
228
 
@@ -126,11 +232,11 @@ module Google
126
232
  # Create credentials
127
233
  credentials = @config.credentials
128
234
  credentials ||= Credentials.default scope: @config.scope
129
- if credentials.is_a?(String) || credentials.is_a?(Hash)
235
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
130
236
  credentials = Credentials.new credentials, scope: @config.scope
131
237
  end
132
238
 
133
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: @config.endpoint, credentials: credentials
239
+ @instances_stub = ::Google::Cloud::Compute::V1::Instances::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
134
240
  end
135
241
 
136
242
  # Service calls
@@ -164,18 +270,14 @@ module Google
164
270
  # @param project [::String]
165
271
  # Project ID for this request.
166
272
  # @param request_id [::String]
167
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
168
- #
169
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
170
- #
171
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
273
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
172
274
  # @param zone [::String]
173
275
  # The name of the zone for this request.
174
- # @yield [result, env] Access the result along with the Faraday environment object
175
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
276
+ # @yield [result, response] Access the result along with the Faraday response object
277
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
176
278
  # @yieldparam response [::Faraday::Response]
177
279
  #
178
- # @return [::Google::Cloud::Compute::V1::Operation]
280
+ # @return [::Gapic::Rest::BaseOperation]
179
281
  #
180
282
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
181
283
  def add_access_config request, options = nil
@@ -187,7 +289,7 @@ module Google
187
289
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
188
290
 
189
291
  # Customize the options with defaults
190
- call_metadata = {}
292
+ call_metadata = @config.rpcs.add_access_config.metadata.to_h
191
293
 
192
294
  # Set x-goog-api-client header
193
295
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -195,20 +297,17 @@ module Google
195
297
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
196
298
  transports_version_send: [:rest]
197
299
 
198
- options.apply_defaults timeout: @config.timeout,
300
+ options.apply_defaults timeout: @config.rpcs.add_access_config.timeout,
199
301
  metadata: call_metadata
200
302
 
201
- uri, body, query_string_params = transcode_add_access_config request
202
- response = @client_stub.make_post_request(
203
- uri: uri,
204
- body: body,
205
- params: query_string_params,
206
- options: options
207
- )
208
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
209
-
210
- yield result, response if block_given?
211
- result
303
+ options.apply_defaults timeout: @config.timeout,
304
+ metadata: @config.metadata
305
+
306
+ @instances_stub.add_access_config request, options do |result, response|
307
+ result = ::Gapic::Rest::BaseOperation.new result
308
+ yield result, response if block_given?
309
+ return result
310
+ end
212
311
  rescue ::Faraday::Error => e
213
312
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
214
313
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -241,18 +340,14 @@ module Google
241
340
  # @param project [::String]
242
341
  # Project ID for this request.
243
342
  # @param request_id [::String]
244
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
245
- #
246
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
247
- #
248
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
343
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
249
344
  # @param zone [::String]
250
345
  # The name of the zone for this request.
251
- # @yield [result, env] Access the result along with the Faraday environment object
252
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
346
+ # @yield [result, response] Access the result along with the Faraday response object
347
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
253
348
  # @yieldparam response [::Faraday::Response]
254
349
  #
255
- # @return [::Google::Cloud::Compute::V1::Operation]
350
+ # @return [::Gapic::Rest::BaseOperation]
256
351
  #
257
352
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
258
353
  def add_resource_policies request, options = nil
@@ -264,7 +359,7 @@ module Google
264
359
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
265
360
 
266
361
  # Customize the options with defaults
267
- call_metadata = {}
362
+ call_metadata = @config.rpcs.add_resource_policies.metadata.to_h
268
363
 
269
364
  # Set x-goog-api-client header
270
365
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -272,27 +367,24 @@ module Google
272
367
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
273
368
  transports_version_send: [:rest]
274
369
 
275
- options.apply_defaults timeout: @config.timeout,
370
+ options.apply_defaults timeout: @config.rpcs.add_resource_policies.timeout,
276
371
  metadata: call_metadata
277
372
 
278
- uri, body, query_string_params = transcode_add_resource_policies request
279
- response = @client_stub.make_post_request(
280
- uri: uri,
281
- body: body,
282
- params: query_string_params,
283
- options: options
284
- )
285
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
286
-
287
- yield result, response if block_given?
288
- result
373
+ options.apply_defaults timeout: @config.timeout,
374
+ metadata: @config.metadata
375
+
376
+ @instances_stub.add_resource_policies request, options do |result, response|
377
+ result = ::Gapic::Rest::BaseOperation.new result
378
+ yield result, response if block_given?
379
+ return result
380
+ end
289
381
  rescue ::Faraday::Error => e
290
382
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
291
383
  raise ::Google::Cloud::Error.from_error(gapic_error)
292
384
  end
293
385
 
294
386
  ##
295
- # Retrieves aggregated list of all of the instances in your project across all regions and zones.
387
+ # Retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances.
296
388
  #
297
389
  # @overload aggregated_list(request, options = nil)
298
390
  # Pass arguments to `aggregated_list` via a request object, either of type
@@ -312,34 +404,24 @@ module Google
312
404
  # the default parameter values, pass an empty Hash as a request object (see above).
313
405
  #
314
406
  # @param filter [::String]
315
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
316
- #
317
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
318
- #
319
- # You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
320
- #
321
- # To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
407
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
322
408
  # @param include_all_scopes [::Boolean]
323
409
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
324
410
  # @param max_results [::Integer]
325
411
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
326
412
  # @param order_by [::String]
327
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
328
- #
329
- # You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
330
- #
331
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
413
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
332
414
  # @param page_token [::String]
333
415
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
334
416
  # @param project [::String]
335
417
  # Project ID for this request.
336
418
  # @param return_partial_success [::Boolean]
337
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
338
- # @yield [result, env] Access the result along with the Faraday environment object
339
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceAggregatedList]
419
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
420
+ # @yield [result, response] Access the result along with the Faraday response object
421
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstancesScopedList>]
340
422
  # @yieldparam response [::Faraday::Response]
341
423
  #
342
- # @return [::Google::Cloud::Compute::V1::InstanceAggregatedList]
424
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstancesScopedList>]
343
425
  #
344
426
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
345
427
  def aggregated_list request, options = nil
@@ -351,7 +433,7 @@ module Google
351
433
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
352
434
 
353
435
  # Customize the options with defaults
354
- call_metadata = {}
436
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
355
437
 
356
438
  # Set x-goog-api-client header
357
439
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -359,19 +441,17 @@ module Google
359
441
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
360
442
  transports_version_send: [:rest]
361
443
 
362
- options.apply_defaults timeout: @config.timeout,
444
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
363
445
  metadata: call_metadata
364
446
 
365
- uri, _body, query_string_params = transcode_aggregated_list request
366
- response = @client_stub.make_get_request(
367
- uri: uri,
368
- params: query_string_params,
369
- options: options
370
- )
371
- result = ::Google::Cloud::Compute::V1::InstanceAggregatedList.decode_json response.body, ignore_unknown_fields: true
447
+ options.apply_defaults timeout: @config.timeout,
448
+ metadata: @config.metadata
372
449
 
373
- yield result, response if block_given?
374
- result
450
+ @instances_stub.aggregated_list request, options do |result, response|
451
+ result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :aggregated_list, "items", request, result, options
452
+ yield result, response if block_given?
453
+ return result
454
+ end
375
455
  rescue ::Faraday::Error => e
376
456
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
377
457
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -406,18 +486,14 @@ module Google
406
486
  # @param project [::String]
407
487
  # Project ID for this request.
408
488
  # @param request_id [::String]
409
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
410
- #
411
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
412
- #
413
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
489
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
414
490
  # @param zone [::String]
415
491
  # The name of the zone for this request.
416
- # @yield [result, env] Access the result along with the Faraday environment object
417
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
492
+ # @yield [result, response] Access the result along with the Faraday response object
493
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
418
494
  # @yieldparam response [::Faraday::Response]
419
495
  #
420
- # @return [::Google::Cloud::Compute::V1::Operation]
496
+ # @return [::Gapic::Rest::BaseOperation]
421
497
  #
422
498
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
423
499
  def attach_disk request, options = nil
@@ -429,7 +505,7 @@ module Google
429
505
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
430
506
 
431
507
  # Customize the options with defaults
432
- call_metadata = {}
508
+ call_metadata = @config.rpcs.attach_disk.metadata.to_h
433
509
 
434
510
  # Set x-goog-api-client header
435
511
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -437,27 +513,92 @@ module Google
437
513
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
438
514
  transports_version_send: [:rest]
439
515
 
516
+ options.apply_defaults timeout: @config.rpcs.attach_disk.timeout,
517
+ metadata: call_metadata
518
+
440
519
  options.apply_defaults timeout: @config.timeout,
520
+ metadata: @config.metadata
521
+
522
+ @instances_stub.attach_disk request, options do |result, response|
523
+ result = ::Gapic::Rest::BaseOperation.new result
524
+ yield result, response if block_given?
525
+ return result
526
+ end
527
+ rescue ::Faraday::Error => e
528
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
529
+ raise ::Google::Cloud::Error.from_error(gapic_error)
530
+ end
531
+
532
+ ##
533
+ # Creates multiple instances. Count specifies the number of instances to create.
534
+ #
535
+ # @overload bulk_insert(request, options = nil)
536
+ # Pass arguments to `bulk_insert` via a request object, either of type
537
+ # {::Google::Cloud::Compute::V1::BulkInsertInstanceRequest} or an equivalent Hash.
538
+ #
539
+ # @param request [::Google::Cloud::Compute::V1::BulkInsertInstanceRequest, ::Hash]
540
+ # A request object representing the call parameters. Required. To specify no
541
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
542
+ # @param options [::Gapic::CallOptions, ::Hash]
543
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
544
+ # Note: currently retry functionality is not implemented. While it is possible
545
+ # to set it using ::Gapic::CallOptions, it will not be applied
546
+ #
547
+ # @overload bulk_insert(bulk_insert_instance_resource_resource: nil, project: nil, request_id: nil, zone: nil)
548
+ # Pass arguments to `bulk_insert` via keyword arguments. Note that at
549
+ # least one keyword argument is required. To specify no parameters, or to keep all
550
+ # the default parameter values, pass an empty Hash as a request object (see above).
551
+ #
552
+ # @param bulk_insert_instance_resource_resource [::Google::Cloud::Compute::V1::BulkInsertInstanceResource, ::Hash]
553
+ # The body resource for this request
554
+ # @param project [::String]
555
+ # Project ID for this request.
556
+ # @param request_id [::String]
557
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
558
+ # @param zone [::String]
559
+ # The name of the zone for this request.
560
+ # @yield [result, response] Access the result along with the Faraday response object
561
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
562
+ # @yieldparam response [::Faraday::Response]
563
+ #
564
+ # @return [::Gapic::Rest::BaseOperation]
565
+ #
566
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
567
+ def bulk_insert request, options = nil
568
+ raise ::ArgumentError, "request must be provided" if request.nil?
569
+
570
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkInsertInstanceRequest
571
+
572
+ # Converts hash and nil to an options object
573
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
574
+
575
+ # Customize the options with defaults
576
+ call_metadata = @config.rpcs.bulk_insert.metadata.to_h
577
+
578
+ # Set x-goog-api-client header
579
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
580
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
581
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
582
+ transports_version_send: [:rest]
583
+
584
+ options.apply_defaults timeout: @config.rpcs.bulk_insert.timeout,
441
585
  metadata: call_metadata
442
586
 
443
- uri, body, query_string_params = transcode_attach_disk request
444
- response = @client_stub.make_post_request(
445
- uri: uri,
446
- body: body,
447
- params: query_string_params,
448
- options: options
449
- )
450
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
451
-
452
- yield result, response if block_given?
453
- result
587
+ options.apply_defaults timeout: @config.timeout,
588
+ metadata: @config.metadata
589
+
590
+ @instances_stub.bulk_insert request, options do |result, response|
591
+ result = ::Gapic::Rest::BaseOperation.new result
592
+ yield result, response if block_given?
593
+ return result
594
+ end
454
595
  rescue ::Faraday::Error => e
455
596
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
456
597
  raise ::Google::Cloud::Error.from_error(gapic_error)
457
598
  end
458
599
 
459
600
  ##
460
- # Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
601
+ # Deletes the specified Instance resource. For more information, see Deleting an instance.
461
602
  #
462
603
  # @overload delete(request, options = nil)
463
604
  # Pass arguments to `delete` via a request object, either of type
@@ -481,18 +622,14 @@ module Google
481
622
  # @param project [::String]
482
623
  # Project ID for this request.
483
624
  # @param request_id [::String]
484
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
485
- #
486
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
487
- #
488
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
625
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
489
626
  # @param zone [::String]
490
627
  # The name of the zone for this request.
491
- # @yield [result, env] Access the result along with the Faraday environment object
492
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
628
+ # @yield [result, response] Access the result along with the Faraday response object
629
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
493
630
  # @yieldparam response [::Faraday::Response]
494
631
  #
495
- # @return [::Google::Cloud::Compute::V1::Operation]
632
+ # @return [::Gapic::Rest::BaseOperation]
496
633
  #
497
634
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
498
635
  def delete request, options = nil
@@ -504,7 +641,7 @@ module Google
504
641
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
505
642
 
506
643
  # Customize the options with defaults
507
- call_metadata = {}
644
+ call_metadata = @config.rpcs.delete.metadata.to_h
508
645
 
509
646
  # Set x-goog-api-client header
510
647
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -512,19 +649,17 @@ module Google
512
649
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
513
650
  transports_version_send: [:rest]
514
651
 
515
- options.apply_defaults timeout: @config.timeout,
652
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
516
653
  metadata: call_metadata
517
654
 
518
- uri, _body, query_string_params = transcode_delete request
519
- response = @client_stub.make_delete_request(
520
- uri: uri,
521
- params: query_string_params,
522
- options: options
523
- )
524
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
655
+ options.apply_defaults timeout: @config.timeout,
656
+ metadata: @config.metadata
525
657
 
526
- yield result, response if block_given?
527
- result
658
+ @instances_stub.delete request, options do |result, response|
659
+ result = ::Gapic::Rest::BaseOperation.new result
660
+ yield result, response if block_given?
661
+ return result
662
+ end
528
663
  rescue ::Faraday::Error => e
529
664
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
530
665
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -559,18 +694,14 @@ module Google
559
694
  # @param project [::String]
560
695
  # Project ID for this request.
561
696
  # @param request_id [::String]
562
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
563
- #
564
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
565
- #
566
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
697
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
567
698
  # @param zone [::String]
568
699
  # The name of the zone for this request.
569
- # @yield [result, env] Access the result along with the Faraday environment object
570
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
700
+ # @yield [result, response] Access the result along with the Faraday response object
701
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
571
702
  # @yieldparam response [::Faraday::Response]
572
703
  #
573
- # @return [::Google::Cloud::Compute::V1::Operation]
704
+ # @return [::Gapic::Rest::BaseOperation]
574
705
  #
575
706
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
576
707
  def delete_access_config request, options = nil
@@ -582,7 +713,7 @@ module Google
582
713
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
583
714
 
584
715
  # Customize the options with defaults
585
- call_metadata = {}
716
+ call_metadata = @config.rpcs.delete_access_config.metadata.to_h
586
717
 
587
718
  # Set x-goog-api-client header
588
719
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -590,19 +721,17 @@ module Google
590
721
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
591
722
  transports_version_send: [:rest]
592
723
 
593
- options.apply_defaults timeout: @config.timeout,
724
+ options.apply_defaults timeout: @config.rpcs.delete_access_config.timeout,
594
725
  metadata: call_metadata
595
726
 
596
- uri, _body, query_string_params = transcode_delete_access_config request
597
- response = @client_stub.make_post_request(
598
- uri: uri,
599
- params: query_string_params,
600
- options: options
601
- )
602
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
727
+ options.apply_defaults timeout: @config.timeout,
728
+ metadata: @config.metadata
603
729
 
604
- yield result, response if block_given?
605
- result
730
+ @instances_stub.delete_access_config request, options do |result, response|
731
+ result = ::Gapic::Rest::BaseOperation.new result
732
+ yield result, response if block_given?
733
+ return result
734
+ end
606
735
  rescue ::Faraday::Error => e
607
736
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
608
737
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -635,18 +764,14 @@ module Google
635
764
  # @param project [::String]
636
765
  # Project ID for this request.
637
766
  # @param request_id [::String]
638
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
639
- #
640
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
641
- #
642
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
767
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
643
768
  # @param zone [::String]
644
769
  # The name of the zone for this request.
645
- # @yield [result, env] Access the result along with the Faraday environment object
646
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
770
+ # @yield [result, response] Access the result along with the Faraday response object
771
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
647
772
  # @yieldparam response [::Faraday::Response]
648
773
  #
649
- # @return [::Google::Cloud::Compute::V1::Operation]
774
+ # @return [::Gapic::Rest::BaseOperation]
650
775
  #
651
776
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
652
777
  def detach_disk request, options = nil
@@ -658,7 +783,7 @@ module Google
658
783
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
659
784
 
660
785
  # Customize the options with defaults
661
- call_metadata = {}
786
+ call_metadata = @config.rpcs.detach_disk.metadata.to_h
662
787
 
663
788
  # Set x-goog-api-client header
664
789
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -666,19 +791,17 @@ module Google
666
791
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
667
792
  transports_version_send: [:rest]
668
793
 
669
- options.apply_defaults timeout: @config.timeout,
794
+ options.apply_defaults timeout: @config.rpcs.detach_disk.timeout,
670
795
  metadata: call_metadata
671
796
 
672
- uri, _body, query_string_params = transcode_detach_disk request
673
- response = @client_stub.make_post_request(
674
- uri: uri,
675
- params: query_string_params,
676
- options: options
677
- )
678
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
797
+ options.apply_defaults timeout: @config.timeout,
798
+ metadata: @config.metadata
679
799
 
680
- yield result, response if block_given?
681
- result
800
+ @instances_stub.detach_disk request, options do |result, response|
801
+ result = ::Gapic::Rest::BaseOperation.new result
802
+ yield result, response if block_given?
803
+ return result
804
+ end
682
805
  rescue ::Faraday::Error => e
683
806
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
684
807
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -710,7 +833,7 @@ module Google
710
833
  # Project ID for this request.
711
834
  # @param zone [::String]
712
835
  # The name of the zone for this request.
713
- # @yield [result, env] Access the result along with the Faraday environment object
836
+ # @yield [result, response] Access the result along with the Faraday response object
714
837
  # @yieldparam result [::Google::Cloud::Compute::V1::Instance]
715
838
  # @yieldparam response [::Faraday::Response]
716
839
  #
@@ -726,7 +849,7 @@ module Google
726
849
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
727
850
 
728
851
  # Customize the options with defaults
729
- call_metadata = {}
852
+ call_metadata = @config.rpcs.get.metadata.to_h
730
853
 
731
854
  # Set x-goog-api-client header
732
855
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -734,18 +857,83 @@ module Google
734
857
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
735
858
  transports_version_send: [:rest]
736
859
 
860
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
861
+ metadata: call_metadata
862
+
737
863
  options.apply_defaults timeout: @config.timeout,
864
+ metadata: @config.metadata
865
+
866
+ @instances_stub.get request, options do |result, response|
867
+ yield result, response if block_given?
868
+ return result
869
+ end
870
+ rescue ::Faraday::Error => e
871
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
872
+ raise ::Google::Cloud::Error.from_error(gapic_error)
873
+ end
874
+
875
+ ##
876
+ # Returns effective firewalls applied to an interface of the instance.
877
+ #
878
+ # @overload get_effective_firewalls(request, options = nil)
879
+ # Pass arguments to `get_effective_firewalls` via a request object, either of type
880
+ # {::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest} or an equivalent Hash.
881
+ #
882
+ # @param request [::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest, ::Hash]
883
+ # A request object representing the call parameters. Required. To specify no
884
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
885
+ # @param options [::Gapic::CallOptions, ::Hash]
886
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
887
+ # Note: currently retry functionality is not implemented. While it is possible
888
+ # to set it using ::Gapic::CallOptions, it will not be applied
889
+ #
890
+ # @overload get_effective_firewalls(instance: nil, network_interface: nil, project: nil, zone: nil)
891
+ # Pass arguments to `get_effective_firewalls` via keyword arguments. Note that at
892
+ # least one keyword argument is required. To specify no parameters, or to keep all
893
+ # the default parameter values, pass an empty Hash as a request object (see above).
894
+ #
895
+ # @param instance [::String]
896
+ # Name of the instance scoping this request.
897
+ # @param network_interface [::String]
898
+ # The name of the network interface to get the effective firewalls.
899
+ # @param project [::String]
900
+ # Project ID for this request.
901
+ # @param zone [::String]
902
+ # The name of the zone for this request.
903
+ # @yield [result, response] Access the result along with the Faraday response object
904
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse]
905
+ # @yieldparam response [::Faraday::Response]
906
+ #
907
+ # @return [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse]
908
+ #
909
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
910
+ def get_effective_firewalls request, options = nil
911
+ raise ::ArgumentError, "request must be provided" if request.nil?
912
+
913
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest
914
+
915
+ # Converts hash and nil to an options object
916
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
917
+
918
+ # Customize the options with defaults
919
+ call_metadata = @config.rpcs.get_effective_firewalls.metadata.to_h
920
+
921
+ # Set x-goog-api-client header
922
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
923
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
924
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
925
+ transports_version_send: [:rest]
926
+
927
+ options.apply_defaults timeout: @config.rpcs.get_effective_firewalls.timeout,
738
928
  metadata: call_metadata
739
929
 
740
- uri, _body, _query_string_params = transcode_get request
741
- response = @client_stub.make_get_request(
742
- uri: uri,
743
- options: options
744
- )
745
- result = ::Google::Cloud::Compute::V1::Instance.decode_json response.body, ignore_unknown_fields: true
930
+ options.apply_defaults timeout: @config.timeout,
931
+ metadata: @config.metadata
746
932
 
747
- yield result, response if block_given?
748
- result
933
+ @instances_stub.get_effective_firewalls request, options do |result, response|
934
+ yield result, response if block_given?
935
+ return result
936
+ end
749
937
  rescue ::Faraday::Error => e
750
938
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
751
939
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -781,7 +969,7 @@ module Google
781
969
  # Specifies the key for the guest attributes entry.
782
970
  # @param zone [::String]
783
971
  # The name of the zone for this request.
784
- # @yield [result, env] Access the result along with the Faraday environment object
972
+ # @yield [result, response] Access the result along with the Faraday response object
785
973
  # @yieldparam result [::Google::Cloud::Compute::V1::GuestAttributes]
786
974
  # @yieldparam response [::Faraday::Response]
787
975
  #
@@ -797,7 +985,7 @@ module Google
797
985
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
798
986
 
799
987
  # Customize the options with defaults
800
- call_metadata = {}
988
+ call_metadata = @config.rpcs.get_guest_attributes.metadata.to_h
801
989
 
802
990
  # Set x-goog-api-client header
803
991
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -805,19 +993,16 @@ module Google
805
993
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
806
994
  transports_version_send: [:rest]
807
995
 
808
- options.apply_defaults timeout: @config.timeout,
996
+ options.apply_defaults timeout: @config.rpcs.get_guest_attributes.timeout,
809
997
  metadata: call_metadata
810
998
 
811
- uri, _body, query_string_params = transcode_get_guest_attributes request
812
- response = @client_stub.make_get_request(
813
- uri: uri,
814
- params: query_string_params,
815
- options: options
816
- )
817
- result = ::Google::Cloud::Compute::V1::GuestAttributes.decode_json response.body, ignore_unknown_fields: true
999
+ options.apply_defaults timeout: @config.timeout,
1000
+ metadata: @config.metadata
818
1001
 
819
- yield result, response if block_given?
820
- result
1002
+ @instances_stub.get_guest_attributes request, options do |result, response|
1003
+ yield result, response if block_given?
1004
+ return result
1005
+ end
821
1006
  rescue ::Faraday::Error => e
822
1007
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
823
1008
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -851,7 +1036,7 @@ module Google
851
1036
  # Name or id of the resource for this request.
852
1037
  # @param zone [::String]
853
1038
  # The name of the zone for this request.
854
- # @yield [result, env] Access the result along with the Faraday environment object
1039
+ # @yield [result, response] Access the result along with the Faraday response object
855
1040
  # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
856
1041
  # @yieldparam response [::Faraday::Response]
857
1042
  #
@@ -867,7 +1052,7 @@ module Google
867
1052
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
868
1053
 
869
1054
  # Customize the options with defaults
870
- call_metadata = {}
1055
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
871
1056
 
872
1057
  # Set x-goog-api-client header
873
1058
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -875,19 +1060,16 @@ module Google
875
1060
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
876
1061
  transports_version_send: [:rest]
877
1062
 
878
- options.apply_defaults timeout: @config.timeout,
1063
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
879
1064
  metadata: call_metadata
880
1065
 
881
- uri, _body, query_string_params = transcode_get_iam_policy request
882
- response = @client_stub.make_get_request(
883
- uri: uri,
884
- params: query_string_params,
885
- options: options
886
- )
887
- result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
1066
+ options.apply_defaults timeout: @config.timeout,
1067
+ metadata: @config.metadata
888
1068
 
889
- yield result, response if block_given?
890
- result
1069
+ @instances_stub.get_iam_policy request, options do |result, response|
1070
+ yield result, response if block_given?
1071
+ return result
1072
+ end
891
1073
  rescue ::Faraday::Error => e
892
1074
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
893
1075
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -919,7 +1101,7 @@ module Google
919
1101
  # Project ID for this request.
920
1102
  # @param zone [::String]
921
1103
  # The name of the zone for this request.
922
- # @yield [result, env] Access the result along with the Faraday environment object
1104
+ # @yield [result, response] Access the result along with the Faraday response object
923
1105
  # @yieldparam result [::Google::Cloud::Compute::V1::Screenshot]
924
1106
  # @yieldparam response [::Faraday::Response]
925
1107
  #
@@ -935,7 +1117,7 @@ module Google
935
1117
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
936
1118
 
937
1119
  # Customize the options with defaults
938
- call_metadata = {}
1120
+ call_metadata = @config.rpcs.get_screenshot.metadata.to_h
939
1121
 
940
1122
  # Set x-goog-api-client header
941
1123
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -943,18 +1125,16 @@ module Google
943
1125
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
944
1126
  transports_version_send: [:rest]
945
1127
 
946
- options.apply_defaults timeout: @config.timeout,
1128
+ options.apply_defaults timeout: @config.rpcs.get_screenshot.timeout,
947
1129
  metadata: call_metadata
948
1130
 
949
- uri, _body, _query_string_params = transcode_get_screenshot request
950
- response = @client_stub.make_get_request(
951
- uri: uri,
952
- options: options
953
- )
954
- result = ::Google::Cloud::Compute::V1::Screenshot.decode_json response.body, ignore_unknown_fields: true
1131
+ options.apply_defaults timeout: @config.timeout,
1132
+ metadata: @config.metadata
955
1133
 
956
- yield result, response if block_given?
957
- result
1134
+ @instances_stub.get_screenshot request, options do |result, response|
1135
+ yield result, response if block_given?
1136
+ return result
1137
+ end
958
1138
  rescue ::Faraday::Error => e
959
1139
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
960
1140
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -986,15 +1166,11 @@ module Google
986
1166
  # Specifies which COM or serial port to retrieve data from.
987
1167
  # @param project [::String]
988
1168
  # Project ID for this request.
989
- # @param start [::String]
990
- # Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`.
991
- #
992
- # If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value.
993
- #
994
- # You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.
1169
+ # @param start [::Integer]
1170
+ # Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.
995
1171
  # @param zone [::String]
996
1172
  # The name of the zone for this request.
997
- # @yield [result, env] Access the result along with the Faraday environment object
1173
+ # @yield [result, response] Access the result along with the Faraday response object
998
1174
  # @yieldparam result [::Google::Cloud::Compute::V1::SerialPortOutput]
999
1175
  # @yieldparam response [::Faraday::Response]
1000
1176
  #
@@ -1010,7 +1186,7 @@ module Google
1010
1186
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1011
1187
 
1012
1188
  # Customize the options with defaults
1013
- call_metadata = {}
1189
+ call_metadata = @config.rpcs.get_serial_port_output.metadata.to_h
1014
1190
 
1015
1191
  # Set x-goog-api-client header
1016
1192
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1018,19 +1194,16 @@ module Google
1018
1194
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1019
1195
  transports_version_send: [:rest]
1020
1196
 
1021
- options.apply_defaults timeout: @config.timeout,
1197
+ options.apply_defaults timeout: @config.rpcs.get_serial_port_output.timeout,
1022
1198
  metadata: call_metadata
1023
1199
 
1024
- uri, _body, query_string_params = transcode_get_serial_port_output request
1025
- response = @client_stub.make_get_request(
1026
- uri: uri,
1027
- params: query_string_params,
1028
- options: options
1029
- )
1030
- result = ::Google::Cloud::Compute::V1::SerialPortOutput.decode_json response.body, ignore_unknown_fields: true
1200
+ options.apply_defaults timeout: @config.timeout,
1201
+ metadata: @config.metadata
1031
1202
 
1032
- yield result, response if block_given?
1033
- result
1203
+ @instances_stub.get_serial_port_output request, options do |result, response|
1204
+ yield result, response if block_given?
1205
+ return result
1206
+ end
1034
1207
  rescue ::Faraday::Error => e
1035
1208
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1036
1209
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1062,7 +1235,7 @@ module Google
1062
1235
  # Project ID for this request.
1063
1236
  # @param zone [::String]
1064
1237
  # The name of the zone for this request.
1065
- # @yield [result, env] Access the result along with the Faraday environment object
1238
+ # @yield [result, response] Access the result along with the Faraday response object
1066
1239
  # @yieldparam result [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity]
1067
1240
  # @yieldparam response [::Faraday::Response]
1068
1241
  #
@@ -1078,7 +1251,7 @@ module Google
1078
1251
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1079
1252
 
1080
1253
  # Customize the options with defaults
1081
- call_metadata = {}
1254
+ call_metadata = @config.rpcs.get_shielded_instance_identity.metadata.to_h
1082
1255
 
1083
1256
  # Set x-goog-api-client header
1084
1257
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1086,18 +1259,16 @@ module Google
1086
1259
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1087
1260
  transports_version_send: [:rest]
1088
1261
 
1089
- options.apply_defaults timeout: @config.timeout,
1262
+ options.apply_defaults timeout: @config.rpcs.get_shielded_instance_identity.timeout,
1090
1263
  metadata: call_metadata
1091
1264
 
1092
- uri, _body, _query_string_params = transcode_get_shielded_instance_identity request
1093
- response = @client_stub.make_get_request(
1094
- uri: uri,
1095
- options: options
1096
- )
1097
- result = ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity.decode_json response.body, ignore_unknown_fields: true
1265
+ options.apply_defaults timeout: @config.timeout,
1266
+ metadata: @config.metadata
1098
1267
 
1099
- yield result, response if block_given?
1100
- result
1268
+ @instances_stub.get_shielded_instance_identity request, options do |result, response|
1269
+ yield result, response if block_given?
1270
+ return result
1271
+ end
1101
1272
  rescue ::Faraday::Error => e
1102
1273
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1103
1274
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1128,25 +1299,16 @@ module Google
1128
1299
  # @param project [::String]
1129
1300
  # Project ID for this request.
1130
1301
  # @param request_id [::String]
1131
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1132
- #
1133
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1134
- #
1135
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1302
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1136
1303
  # @param source_instance_template [::String]
1137
- # Specifies instance template to create the instance.
1138
- #
1139
- # This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template:
1140
- # - https://www.googleapis.com/compute/v1/projects/project/global/instanceTemplates/instanceTemplate
1141
- # - projects/project/global/instanceTemplates/instanceTemplate
1142
- # - global/instanceTemplates/instanceTemplate
1304
+ # Specifies instance template to create the instance. This field is optional. It can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/project /global/instanceTemplates/instanceTemplate - projects/project/global/instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate
1143
1305
  # @param zone [::String]
1144
1306
  # The name of the zone for this request.
1145
- # @yield [result, env] Access the result along with the Faraday environment object
1146
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1307
+ # @yield [result, response] Access the result along with the Faraday response object
1308
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1147
1309
  # @yieldparam response [::Faraday::Response]
1148
1310
  #
1149
- # @return [::Google::Cloud::Compute::V1::Operation]
1311
+ # @return [::Gapic::Rest::BaseOperation]
1150
1312
  #
1151
1313
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1152
1314
  def insert request, options = nil
@@ -1158,7 +1320,7 @@ module Google
1158
1320
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1159
1321
 
1160
1322
  # Customize the options with defaults
1161
- call_metadata = {}
1323
+ call_metadata = @config.rpcs.insert.metadata.to_h
1162
1324
 
1163
1325
  # Set x-goog-api-client header
1164
1326
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1166,20 +1328,17 @@ module Google
1166
1328
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1167
1329
  transports_version_send: [:rest]
1168
1330
 
1169
- options.apply_defaults timeout: @config.timeout,
1331
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
1170
1332
  metadata: call_metadata
1171
1333
 
1172
- uri, body, query_string_params = transcode_insert request
1173
- response = @client_stub.make_post_request(
1174
- uri: uri,
1175
- body: body,
1176
- params: query_string_params,
1177
- options: options
1178
- )
1179
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1180
-
1181
- yield result, response if block_given?
1182
- result
1334
+ options.apply_defaults timeout: @config.timeout,
1335
+ metadata: @config.metadata
1336
+
1337
+ @instances_stub.insert request, options do |result, response|
1338
+ result = ::Gapic::Rest::BaseOperation.new result
1339
+ yield result, response if block_given?
1340
+ return result
1341
+ end
1183
1342
  rescue ::Faraday::Error => e
1184
1343
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1185
1344
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1206,34 +1365,24 @@ module Google
1206
1365
  # the default parameter values, pass an empty Hash as a request object (see above).
1207
1366
  #
1208
1367
  # @param filter [::String]
1209
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
1210
- #
1211
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1212
- #
1213
- # You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
1214
- #
1215
- # To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
1368
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
1216
1369
  # @param max_results [::Integer]
1217
1370
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1218
1371
  # @param order_by [::String]
1219
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1220
- #
1221
- # You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1222
- #
1223
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1372
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1224
1373
  # @param page_token [::String]
1225
1374
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
1226
1375
  # @param project [::String]
1227
1376
  # Project ID for this request.
1228
1377
  # @param return_partial_success [::Boolean]
1229
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
1378
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1230
1379
  # @param zone [::String]
1231
1380
  # The name of the zone for this request.
1232
- # @yield [result, env] Access the result along with the Faraday environment object
1233
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceList]
1381
+ # @yield [result, response] Access the result along with the Faraday response object
1382
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Instance>]
1234
1383
  # @yieldparam response [::Faraday::Response]
1235
1384
  #
1236
- # @return [::Google::Cloud::Compute::V1::InstanceList]
1385
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Instance>]
1237
1386
  #
1238
1387
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1239
1388
  def list request, options = nil
@@ -1245,7 +1394,7 @@ module Google
1245
1394
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1246
1395
 
1247
1396
  # Customize the options with defaults
1248
- call_metadata = {}
1397
+ call_metadata = @config.rpcs.list.metadata.to_h
1249
1398
 
1250
1399
  # Set x-goog-api-client header
1251
1400
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1253,19 +1402,17 @@ module Google
1253
1402
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1254
1403
  transports_version_send: [:rest]
1255
1404
 
1256
- options.apply_defaults timeout: @config.timeout,
1405
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
1257
1406
  metadata: call_metadata
1258
1407
 
1259
- uri, _body, query_string_params = transcode_list request
1260
- response = @client_stub.make_get_request(
1261
- uri: uri,
1262
- params: query_string_params,
1263
- options: options
1264
- )
1265
- result = ::Google::Cloud::Compute::V1::InstanceList.decode_json response.body, ignore_unknown_fields: true
1408
+ options.apply_defaults timeout: @config.timeout,
1409
+ metadata: @config.metadata
1266
1410
 
1267
- yield result, response if block_given?
1268
- result
1411
+ @instances_stub.list request, options do |result, response|
1412
+ result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list, "items", request, result, options
1413
+ yield result, response if block_given?
1414
+ return result
1415
+ end
1269
1416
  rescue ::Faraday::Error => e
1270
1417
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1271
1418
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1292,36 +1439,26 @@ module Google
1292
1439
  # the default parameter values, pass an empty Hash as a request object (see above).
1293
1440
  #
1294
1441
  # @param filter [::String]
1295
- # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`.
1296
- #
1297
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1298
- #
1299
- # You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
1300
- #
1301
- # To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
1442
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
1302
1443
  # @param instance [::String]
1303
1444
  # Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.
1304
1445
  # @param max_results [::Integer]
1305
1446
  # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1306
1447
  # @param order_by [::String]
1307
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1308
- #
1309
- # You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1310
- #
1311
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1448
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1312
1449
  # @param page_token [::String]
1313
1450
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
1314
1451
  # @param project [::String]
1315
1452
  # Project ID for this request.
1316
1453
  # @param return_partial_success [::Boolean]
1317
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
1454
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1318
1455
  # @param zone [::String]
1319
1456
  # The name of the zone for this request.
1320
- # @yield [result, env] Access the result along with the Faraday environment object
1321
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceListReferrers]
1457
+ # @yield [result, response] Access the result along with the Faraday response object
1458
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Reference>]
1322
1459
  # @yieldparam response [::Faraday::Response]
1323
1460
  #
1324
- # @return [::Google::Cloud::Compute::V1::InstanceListReferrers]
1461
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Reference>]
1325
1462
  #
1326
1463
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1327
1464
  def list_referrers request, options = nil
@@ -1333,7 +1470,7 @@ module Google
1333
1470
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1334
1471
 
1335
1472
  # Customize the options with defaults
1336
- call_metadata = {}
1473
+ call_metadata = @config.rpcs.list_referrers.metadata.to_h
1337
1474
 
1338
1475
  # Set x-goog-api-client header
1339
1476
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1341,19 +1478,17 @@ module Google
1341
1478
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1342
1479
  transports_version_send: [:rest]
1343
1480
 
1344
- options.apply_defaults timeout: @config.timeout,
1481
+ options.apply_defaults timeout: @config.rpcs.list_referrers.timeout,
1345
1482
  metadata: call_metadata
1346
1483
 
1347
- uri, _body, query_string_params = transcode_list_referrers request
1348
- response = @client_stub.make_get_request(
1349
- uri: uri,
1350
- params: query_string_params,
1351
- options: options
1352
- )
1353
- result = ::Google::Cloud::Compute::V1::InstanceListReferrers.decode_json response.body, ignore_unknown_fields: true
1484
+ options.apply_defaults timeout: @config.timeout,
1485
+ metadata: @config.metadata
1354
1486
 
1355
- yield result, response if block_given?
1356
- result
1487
+ @instances_stub.list_referrers request, options do |result, response|
1488
+ result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list_referrers, "items", request, result, options
1489
+ yield result, response if block_given?
1490
+ return result
1491
+ end
1357
1492
  rescue ::Faraday::Error => e
1358
1493
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1359
1494
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1386,18 +1521,14 @@ module Google
1386
1521
  # @param project [::String]
1387
1522
  # Project ID for this request.
1388
1523
  # @param request_id [::String]
1389
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1390
- #
1391
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1392
- #
1393
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1524
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1394
1525
  # @param zone [::String]
1395
1526
  # The name of the zone for this request.
1396
- # @yield [result, env] Access the result along with the Faraday environment object
1397
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1527
+ # @yield [result, response] Access the result along with the Faraday response object
1528
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1398
1529
  # @yieldparam response [::Faraday::Response]
1399
1530
  #
1400
- # @return [::Google::Cloud::Compute::V1::Operation]
1531
+ # @return [::Gapic::Rest::BaseOperation]
1401
1532
  #
1402
1533
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1403
1534
  def remove_resource_policies request, options = nil
@@ -1409,7 +1540,7 @@ module Google
1409
1540
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1410
1541
 
1411
1542
  # Customize the options with defaults
1412
- call_metadata = {}
1543
+ call_metadata = @config.rpcs.remove_resource_policies.metadata.to_h
1413
1544
 
1414
1545
  # Set x-goog-api-client header
1415
1546
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1417,20 +1548,17 @@ module Google
1417
1548
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1418
1549
  transports_version_send: [:rest]
1419
1550
 
1420
- options.apply_defaults timeout: @config.timeout,
1551
+ options.apply_defaults timeout: @config.rpcs.remove_resource_policies.timeout,
1421
1552
  metadata: call_metadata
1422
1553
 
1423
- uri, body, query_string_params = transcode_remove_resource_policies request
1424
- response = @client_stub.make_post_request(
1425
- uri: uri,
1426
- body: body,
1427
- params: query_string_params,
1428
- options: options
1429
- )
1430
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1431
-
1432
- yield result, response if block_given?
1433
- result
1554
+ options.apply_defaults timeout: @config.timeout,
1555
+ metadata: @config.metadata
1556
+
1557
+ @instances_stub.remove_resource_policies request, options do |result, response|
1558
+ result = ::Gapic::Rest::BaseOperation.new result
1559
+ yield result, response if block_given?
1560
+ return result
1561
+ end
1434
1562
  rescue ::Faraday::Error => e
1435
1563
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1436
1564
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1461,18 +1589,14 @@ module Google
1461
1589
  # @param project [::String]
1462
1590
  # Project ID for this request.
1463
1591
  # @param request_id [::String]
1464
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1465
- #
1466
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1467
- #
1468
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1592
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1469
1593
  # @param zone [::String]
1470
1594
  # The name of the zone for this request.
1471
- # @yield [result, env] Access the result along with the Faraday environment object
1472
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1595
+ # @yield [result, response] Access the result along with the Faraday response object
1596
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1473
1597
  # @yieldparam response [::Faraday::Response]
1474
1598
  #
1475
- # @return [::Google::Cloud::Compute::V1::Operation]
1599
+ # @return [::Gapic::Rest::BaseOperation]
1476
1600
  #
1477
1601
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1478
1602
  def reset request, options = nil
@@ -1484,7 +1608,7 @@ module Google
1484
1608
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1485
1609
 
1486
1610
  # Customize the options with defaults
1487
- call_metadata = {}
1611
+ call_metadata = @config.rpcs.reset.metadata.to_h
1488
1612
 
1489
1613
  # Set x-goog-api-client header
1490
1614
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1492,19 +1616,82 @@ module Google
1492
1616
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1493
1617
  transports_version_send: [:rest]
1494
1618
 
1619
+ options.apply_defaults timeout: @config.rpcs.reset.timeout,
1620
+ metadata: call_metadata
1621
+
1495
1622
  options.apply_defaults timeout: @config.timeout,
1623
+ metadata: @config.metadata
1624
+
1625
+ @instances_stub.reset request, options do |result, response|
1626
+ result = ::Gapic::Rest::BaseOperation.new result
1627
+ yield result, response if block_given?
1628
+ return result
1629
+ end
1630
+ rescue ::Faraday::Error => e
1631
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1632
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1633
+ end
1634
+
1635
+ ##
1636
+ # Sends diagnostic interrupt to the instance.
1637
+ #
1638
+ # @overload send_diagnostic_interrupt(request, options = nil)
1639
+ # Pass arguments to `send_diagnostic_interrupt` via a request object, either of type
1640
+ # {::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest} or an equivalent Hash.
1641
+ #
1642
+ # @param request [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest, ::Hash]
1643
+ # A request object representing the call parameters. Required. To specify no
1644
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1645
+ # @param options [::Gapic::CallOptions, ::Hash]
1646
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1647
+ # Note: currently retry functionality is not implemented. While it is possible
1648
+ # to set it using ::Gapic::CallOptions, it will not be applied
1649
+ #
1650
+ # @overload send_diagnostic_interrupt(instance: nil, project: nil, zone: nil)
1651
+ # Pass arguments to `send_diagnostic_interrupt` via keyword arguments. Note that at
1652
+ # least one keyword argument is required. To specify no parameters, or to keep all
1653
+ # the default parameter values, pass an empty Hash as a request object (see above).
1654
+ #
1655
+ # @param instance [::String]
1656
+ # Name of the instance scoping this request.
1657
+ # @param project [::String]
1658
+ # Project ID for this request.
1659
+ # @param zone [::String]
1660
+ # The name of the zone for this request.
1661
+ # @yield [result, response] Access the result along with the Faraday response object
1662
+ # @yieldparam result [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse]
1663
+ # @yieldparam response [::Faraday::Response]
1664
+ #
1665
+ # @return [::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceResponse]
1666
+ #
1667
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1668
+ def send_diagnostic_interrupt request, options = nil
1669
+ raise ::ArgumentError, "request must be provided" if request.nil?
1670
+
1671
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SendDiagnosticInterruptInstanceRequest
1672
+
1673
+ # Converts hash and nil to an options object
1674
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1675
+
1676
+ # Customize the options with defaults
1677
+ call_metadata = @config.rpcs.send_diagnostic_interrupt.metadata.to_h
1678
+
1679
+ # Set x-goog-api-client header
1680
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1681
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1682
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1683
+ transports_version_send: [:rest]
1684
+
1685
+ options.apply_defaults timeout: @config.rpcs.send_diagnostic_interrupt.timeout,
1496
1686
  metadata: call_metadata
1497
1687
 
1498
- uri, _body, query_string_params = transcode_reset request
1499
- response = @client_stub.make_post_request(
1500
- uri: uri,
1501
- params: query_string_params,
1502
- options: options
1503
- )
1504
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1688
+ options.apply_defaults timeout: @config.timeout,
1689
+ metadata: @config.metadata
1505
1690
 
1506
- yield result, response if block_given?
1507
- result
1691
+ @instances_stub.send_diagnostic_interrupt request, options do |result, response|
1692
+ yield result, response if block_given?
1693
+ return result
1694
+ end
1508
1695
  rescue ::Faraday::Error => e
1509
1696
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1510
1697
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1535,20 +1722,16 @@ module Google
1535
1722
  # @param project [::String]
1536
1723
  # Project ID for this request.
1537
1724
  # @param request_id [::String]
1538
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1539
- #
1540
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1541
- #
1542
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1725
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1543
1726
  # @param resource [::String]
1544
1727
  # Name or id of the resource for this request.
1545
1728
  # @param zone [::String]
1546
1729
  # The name of the zone for this request.
1547
- # @yield [result, env] Access the result along with the Faraday environment object
1548
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1730
+ # @yield [result, response] Access the result along with the Faraday response object
1731
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1549
1732
  # @yieldparam response [::Faraday::Response]
1550
1733
  #
1551
- # @return [::Google::Cloud::Compute::V1::Operation]
1734
+ # @return [::Gapic::Rest::BaseOperation]
1552
1735
  #
1553
1736
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1554
1737
  def set_deletion_protection request, options = nil
@@ -1560,7 +1743,7 @@ module Google
1560
1743
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1561
1744
 
1562
1745
  # Customize the options with defaults
1563
- call_metadata = {}
1746
+ call_metadata = @config.rpcs.set_deletion_protection.metadata.to_h
1564
1747
 
1565
1748
  # Set x-goog-api-client header
1566
1749
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1568,19 +1751,17 @@ module Google
1568
1751
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1569
1752
  transports_version_send: [:rest]
1570
1753
 
1571
- options.apply_defaults timeout: @config.timeout,
1754
+ options.apply_defaults timeout: @config.rpcs.set_deletion_protection.timeout,
1572
1755
  metadata: call_metadata
1573
1756
 
1574
- uri, _body, query_string_params = transcode_set_deletion_protection request
1575
- response = @client_stub.make_post_request(
1576
- uri: uri,
1577
- params: query_string_params,
1578
- options: options
1579
- )
1580
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1757
+ options.apply_defaults timeout: @config.timeout,
1758
+ metadata: @config.metadata
1581
1759
 
1582
- yield result, response if block_given?
1583
- result
1760
+ @instances_stub.set_deletion_protection request, options do |result, response|
1761
+ result = ::Gapic::Rest::BaseOperation.new result
1762
+ yield result, response if block_given?
1763
+ return result
1764
+ end
1584
1765
  rescue ::Faraday::Error => e
1585
1766
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1586
1767
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1615,18 +1796,14 @@ module Google
1615
1796
  # @param project [::String]
1616
1797
  # Project ID for this request.
1617
1798
  # @param request_id [::String]
1618
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1619
- #
1620
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1621
- #
1622
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1799
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1623
1800
  # @param zone [::String]
1624
1801
  # The name of the zone for this request.
1625
- # @yield [result, env] Access the result along with the Faraday environment object
1626
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1802
+ # @yield [result, response] Access the result along with the Faraday response object
1803
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1627
1804
  # @yieldparam response [::Faraday::Response]
1628
1805
  #
1629
- # @return [::Google::Cloud::Compute::V1::Operation]
1806
+ # @return [::Gapic::Rest::BaseOperation]
1630
1807
  #
1631
1808
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1632
1809
  def set_disk_auto_delete request, options = nil
@@ -1638,7 +1815,7 @@ module Google
1638
1815
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1639
1816
 
1640
1817
  # Customize the options with defaults
1641
- call_metadata = {}
1818
+ call_metadata = @config.rpcs.set_disk_auto_delete.metadata.to_h
1642
1819
 
1643
1820
  # Set x-goog-api-client header
1644
1821
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1646,19 +1823,17 @@ module Google
1646
1823
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1647
1824
  transports_version_send: [:rest]
1648
1825
 
1649
- options.apply_defaults timeout: @config.timeout,
1826
+ options.apply_defaults timeout: @config.rpcs.set_disk_auto_delete.timeout,
1650
1827
  metadata: call_metadata
1651
1828
 
1652
- uri, _body, query_string_params = transcode_set_disk_auto_delete request
1653
- response = @client_stub.make_post_request(
1654
- uri: uri,
1655
- params: query_string_params,
1656
- options: options
1657
- )
1658
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1829
+ options.apply_defaults timeout: @config.timeout,
1830
+ metadata: @config.metadata
1659
1831
 
1660
- yield result, response if block_given?
1661
- result
1832
+ @instances_stub.set_disk_auto_delete request, options do |result, response|
1833
+ result = ::Gapic::Rest::BaseOperation.new result
1834
+ yield result, response if block_given?
1835
+ return result
1836
+ end
1662
1837
  rescue ::Faraday::Error => e
1663
1838
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1664
1839
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1692,7 +1867,7 @@ module Google
1692
1867
  # The name of the zone for this request.
1693
1868
  # @param zone_set_policy_request_resource [::Google::Cloud::Compute::V1::ZoneSetPolicyRequest, ::Hash]
1694
1869
  # The body resource for this request
1695
- # @yield [result, env] Access the result along with the Faraday environment object
1870
+ # @yield [result, response] Access the result along with the Faraday response object
1696
1871
  # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
1697
1872
  # @yieldparam response [::Faraday::Response]
1698
1873
  #
@@ -1708,7 +1883,7 @@ module Google
1708
1883
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1709
1884
 
1710
1885
  # Customize the options with defaults
1711
- call_metadata = {}
1886
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1712
1887
 
1713
1888
  # Set x-goog-api-client header
1714
1889
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1716,19 +1891,16 @@ module Google
1716
1891
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1717
1892
  transports_version_send: [:rest]
1718
1893
 
1719
- options.apply_defaults timeout: @config.timeout,
1894
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1720
1895
  metadata: call_metadata
1721
1896
 
1722
- uri, body, _query_string_params = transcode_set_iam_policy request
1723
- response = @client_stub.make_post_request(
1724
- uri: uri,
1725
- body: body,
1726
- options: options
1727
- )
1728
- result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
1897
+ options.apply_defaults timeout: @config.timeout,
1898
+ metadata: @config.metadata
1729
1899
 
1730
- yield result, response if block_given?
1731
- result
1900
+ @instances_stub.set_iam_policy request, options do |result, response|
1901
+ yield result, response if block_given?
1902
+ return result
1903
+ end
1732
1904
  rescue ::Faraday::Error => e
1733
1905
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1734
1906
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1761,18 +1933,14 @@ module Google
1761
1933
  # @param project [::String]
1762
1934
  # Project ID for this request.
1763
1935
  # @param request_id [::String]
1764
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1765
- #
1766
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1767
- #
1768
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1936
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1769
1937
  # @param zone [::String]
1770
1938
  # The name of the zone for this request.
1771
- # @yield [result, env] Access the result along with the Faraday environment object
1772
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1939
+ # @yield [result, response] Access the result along with the Faraday response object
1940
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1773
1941
  # @yieldparam response [::Faraday::Response]
1774
1942
  #
1775
- # @return [::Google::Cloud::Compute::V1::Operation]
1943
+ # @return [::Gapic::Rest::BaseOperation]
1776
1944
  #
1777
1945
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1778
1946
  def set_labels request, options = nil
@@ -1784,7 +1952,7 @@ module Google
1784
1952
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1785
1953
 
1786
1954
  # Customize the options with defaults
1787
- call_metadata = {}
1955
+ call_metadata = @config.rpcs.set_labels.metadata.to_h
1788
1956
 
1789
1957
  # Set x-goog-api-client header
1790
1958
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1792,20 +1960,17 @@ module Google
1792
1960
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1793
1961
  transports_version_send: [:rest]
1794
1962
 
1795
- options.apply_defaults timeout: @config.timeout,
1963
+ options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
1796
1964
  metadata: call_metadata
1797
1965
 
1798
- uri, body, query_string_params = transcode_set_labels request
1799
- response = @client_stub.make_post_request(
1800
- uri: uri,
1801
- body: body,
1802
- params: query_string_params,
1803
- options: options
1804
- )
1805
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1806
-
1807
- yield result, response if block_given?
1808
- result
1966
+ options.apply_defaults timeout: @config.timeout,
1967
+ metadata: @config.metadata
1968
+
1969
+ @instances_stub.set_labels request, options do |result, response|
1970
+ result = ::Gapic::Rest::BaseOperation.new result
1971
+ yield result, response if block_given?
1972
+ return result
1973
+ end
1809
1974
  rescue ::Faraday::Error => e
1810
1975
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1811
1976
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1838,18 +2003,14 @@ module Google
1838
2003
  # @param project [::String]
1839
2004
  # Project ID for this request.
1840
2005
  # @param request_id [::String]
1841
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1842
- #
1843
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1844
- #
1845
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2006
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1846
2007
  # @param zone [::String]
1847
2008
  # The name of the zone for this request.
1848
- # @yield [result, env] Access the result along with the Faraday environment object
1849
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2009
+ # @yield [result, response] Access the result along with the Faraday response object
2010
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1850
2011
  # @yieldparam response [::Faraday::Response]
1851
2012
  #
1852
- # @return [::Google::Cloud::Compute::V1::Operation]
2013
+ # @return [::Gapic::Rest::BaseOperation]
1853
2014
  #
1854
2015
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1855
2016
  def set_machine_resources request, options = nil
@@ -1861,7 +2022,7 @@ module Google
1861
2022
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1862
2023
 
1863
2024
  # Customize the options with defaults
1864
- call_metadata = {}
2025
+ call_metadata = @config.rpcs.set_machine_resources.metadata.to_h
1865
2026
 
1866
2027
  # Set x-goog-api-client header
1867
2028
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1869,20 +2030,17 @@ module Google
1869
2030
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1870
2031
  transports_version_send: [:rest]
1871
2032
 
1872
- options.apply_defaults timeout: @config.timeout,
2033
+ options.apply_defaults timeout: @config.rpcs.set_machine_resources.timeout,
1873
2034
  metadata: call_metadata
1874
2035
 
1875
- uri, body, query_string_params = transcode_set_machine_resources request
1876
- response = @client_stub.make_post_request(
1877
- uri: uri,
1878
- body: body,
1879
- params: query_string_params,
1880
- options: options
1881
- )
1882
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1883
-
1884
- yield result, response if block_given?
1885
- result
2036
+ options.apply_defaults timeout: @config.timeout,
2037
+ metadata: @config.metadata
2038
+
2039
+ @instances_stub.set_machine_resources request, options do |result, response|
2040
+ result = ::Gapic::Rest::BaseOperation.new result
2041
+ yield result, response if block_given?
2042
+ return result
2043
+ end
1886
2044
  rescue ::Faraday::Error => e
1887
2045
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1888
2046
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1915,18 +2073,14 @@ module Google
1915
2073
  # @param project [::String]
1916
2074
  # Project ID for this request.
1917
2075
  # @param request_id [::String]
1918
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1919
- #
1920
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1921
- #
1922
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2076
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
1923
2077
  # @param zone [::String]
1924
2078
  # The name of the zone for this request.
1925
- # @yield [result, env] Access the result along with the Faraday environment object
1926
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2079
+ # @yield [result, response] Access the result along with the Faraday response object
2080
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1927
2081
  # @yieldparam response [::Faraday::Response]
1928
2082
  #
1929
- # @return [::Google::Cloud::Compute::V1::Operation]
2083
+ # @return [::Gapic::Rest::BaseOperation]
1930
2084
  #
1931
2085
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1932
2086
  def set_machine_type request, options = nil
@@ -1938,7 +2092,7 @@ module Google
1938
2092
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1939
2093
 
1940
2094
  # Customize the options with defaults
1941
- call_metadata = {}
2095
+ call_metadata = @config.rpcs.set_machine_type.metadata.to_h
1942
2096
 
1943
2097
  # Set x-goog-api-client header
1944
2098
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1946,20 +2100,17 @@ module Google
1946
2100
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1947
2101
  transports_version_send: [:rest]
1948
2102
 
1949
- options.apply_defaults timeout: @config.timeout,
2103
+ options.apply_defaults timeout: @config.rpcs.set_machine_type.timeout,
1950
2104
  metadata: call_metadata
1951
2105
 
1952
- uri, body, query_string_params = transcode_set_machine_type request
1953
- response = @client_stub.make_post_request(
1954
- uri: uri,
1955
- body: body,
1956
- params: query_string_params,
1957
- options: options
1958
- )
1959
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1960
-
1961
- yield result, response if block_given?
1962
- result
2106
+ options.apply_defaults timeout: @config.timeout,
2107
+ metadata: @config.metadata
2108
+
2109
+ @instances_stub.set_machine_type request, options do |result, response|
2110
+ result = ::Gapic::Rest::BaseOperation.new result
2111
+ yield result, response if block_given?
2112
+ return result
2113
+ end
1963
2114
  rescue ::Faraday::Error => e
1964
2115
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1965
2116
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1992,18 +2143,14 @@ module Google
1992
2143
  # @param project [::String]
1993
2144
  # Project ID for this request.
1994
2145
  # @param request_id [::String]
1995
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1996
- #
1997
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1998
- #
1999
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2146
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2000
2147
  # @param zone [::String]
2001
2148
  # The name of the zone for this request.
2002
- # @yield [result, env] Access the result along with the Faraday environment object
2003
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2149
+ # @yield [result, response] Access the result along with the Faraday response object
2150
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2004
2151
  # @yieldparam response [::Faraday::Response]
2005
2152
  #
2006
- # @return [::Google::Cloud::Compute::V1::Operation]
2153
+ # @return [::Gapic::Rest::BaseOperation]
2007
2154
  #
2008
2155
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2009
2156
  def set_metadata request, options = nil
@@ -2015,7 +2162,7 @@ module Google
2015
2162
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2016
2163
 
2017
2164
  # Customize the options with defaults
2018
- call_metadata = {}
2165
+ call_metadata = @config.rpcs.set_metadata.metadata.to_h
2019
2166
 
2020
2167
  # Set x-goog-api-client header
2021
2168
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2023,20 +2170,17 @@ module Google
2023
2170
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2024
2171
  transports_version_send: [:rest]
2025
2172
 
2026
- options.apply_defaults timeout: @config.timeout,
2173
+ options.apply_defaults timeout: @config.rpcs.set_metadata.timeout,
2027
2174
  metadata: call_metadata
2028
2175
 
2029
- uri, body, query_string_params = transcode_set_metadata request
2030
- response = @client_stub.make_post_request(
2031
- uri: uri,
2032
- body: body,
2033
- params: query_string_params,
2034
- options: options
2035
- )
2036
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2037
-
2038
- yield result, response if block_given?
2039
- result
2176
+ options.apply_defaults timeout: @config.timeout,
2177
+ metadata: @config.metadata
2178
+
2179
+ @instances_stub.set_metadata request, options do |result, response|
2180
+ result = ::Gapic::Rest::BaseOperation.new result
2181
+ yield result, response if block_given?
2182
+ return result
2183
+ end
2040
2184
  rescue ::Faraday::Error => e
2041
2185
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2042
2186
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2069,18 +2213,14 @@ module Google
2069
2213
  # @param project [::String]
2070
2214
  # Project ID for this request.
2071
2215
  # @param request_id [::String]
2072
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2073
- #
2074
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2075
- #
2076
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2216
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2077
2217
  # @param zone [::String]
2078
2218
  # The name of the zone for this request.
2079
- # @yield [result, env] Access the result along with the Faraday environment object
2080
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2219
+ # @yield [result, response] Access the result along with the Faraday response object
2220
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2081
2221
  # @yieldparam response [::Faraday::Response]
2082
2222
  #
2083
- # @return [::Google::Cloud::Compute::V1::Operation]
2223
+ # @return [::Gapic::Rest::BaseOperation]
2084
2224
  #
2085
2225
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2086
2226
  def set_min_cpu_platform request, options = nil
@@ -2092,7 +2232,7 @@ module Google
2092
2232
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2093
2233
 
2094
2234
  # Customize the options with defaults
2095
- call_metadata = {}
2235
+ call_metadata = @config.rpcs.set_min_cpu_platform.metadata.to_h
2096
2236
 
2097
2237
  # Set x-goog-api-client header
2098
2238
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2100,20 +2240,17 @@ module Google
2100
2240
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2101
2241
  transports_version_send: [:rest]
2102
2242
 
2103
- options.apply_defaults timeout: @config.timeout,
2243
+ options.apply_defaults timeout: @config.rpcs.set_min_cpu_platform.timeout,
2104
2244
  metadata: call_metadata
2105
2245
 
2106
- uri, body, query_string_params = transcode_set_min_cpu_platform request
2107
- response = @client_stub.make_post_request(
2108
- uri: uri,
2109
- body: body,
2110
- params: query_string_params,
2111
- options: options
2112
- )
2113
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2114
-
2115
- yield result, response if block_given?
2116
- result
2246
+ options.apply_defaults timeout: @config.timeout,
2247
+ metadata: @config.metadata
2248
+
2249
+ @instances_stub.set_min_cpu_platform request, options do |result, response|
2250
+ result = ::Gapic::Rest::BaseOperation.new result
2251
+ yield result, response if block_given?
2252
+ return result
2253
+ end
2117
2254
  rescue ::Faraday::Error => e
2118
2255
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2119
2256
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2144,20 +2281,16 @@ module Google
2144
2281
  # @param project [::String]
2145
2282
  # Project ID for this request.
2146
2283
  # @param request_id [::String]
2147
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2148
- #
2149
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2150
- #
2151
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2284
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2152
2285
  # @param scheduling_resource [::Google::Cloud::Compute::V1::Scheduling, ::Hash]
2153
2286
  # The body resource for this request
2154
2287
  # @param zone [::String]
2155
2288
  # The name of the zone for this request.
2156
- # @yield [result, env] Access the result along with the Faraday environment object
2157
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2289
+ # @yield [result, response] Access the result along with the Faraday response object
2290
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2158
2291
  # @yieldparam response [::Faraday::Response]
2159
2292
  #
2160
- # @return [::Google::Cloud::Compute::V1::Operation]
2293
+ # @return [::Gapic::Rest::BaseOperation]
2161
2294
  #
2162
2295
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2163
2296
  def set_scheduling request, options = nil
@@ -2169,7 +2302,7 @@ module Google
2169
2302
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2170
2303
 
2171
2304
  # Customize the options with defaults
2172
- call_metadata = {}
2305
+ call_metadata = @config.rpcs.set_scheduling.metadata.to_h
2173
2306
 
2174
2307
  # Set x-goog-api-client header
2175
2308
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2177,20 +2310,17 @@ module Google
2177
2310
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2178
2311
  transports_version_send: [:rest]
2179
2312
 
2180
- options.apply_defaults timeout: @config.timeout,
2313
+ options.apply_defaults timeout: @config.rpcs.set_scheduling.timeout,
2181
2314
  metadata: call_metadata
2182
2315
 
2183
- uri, body, query_string_params = transcode_set_scheduling request
2184
- response = @client_stub.make_post_request(
2185
- uri: uri,
2186
- body: body,
2187
- params: query_string_params,
2188
- options: options
2189
- )
2190
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2191
-
2192
- yield result, response if block_given?
2193
- result
2316
+ options.apply_defaults timeout: @config.timeout,
2317
+ metadata: @config.metadata
2318
+
2319
+ @instances_stub.set_scheduling request, options do |result, response|
2320
+ result = ::Gapic::Rest::BaseOperation.new result
2321
+ yield result, response if block_given?
2322
+ return result
2323
+ end
2194
2324
  rescue ::Faraday::Error => e
2195
2325
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2196
2326
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2223,18 +2353,14 @@ module Google
2223
2353
  # @param project [::String]
2224
2354
  # Project ID for this request.
2225
2355
  # @param request_id [::String]
2226
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2227
- #
2228
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2229
- #
2230
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2356
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2231
2357
  # @param zone [::String]
2232
2358
  # The name of the zone for this request.
2233
- # @yield [result, env] Access the result along with the Faraday environment object
2234
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2359
+ # @yield [result, response] Access the result along with the Faraday response object
2360
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2235
2361
  # @yieldparam response [::Faraday::Response]
2236
2362
  #
2237
- # @return [::Google::Cloud::Compute::V1::Operation]
2363
+ # @return [::Gapic::Rest::BaseOperation]
2238
2364
  #
2239
2365
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2240
2366
  def set_service_account request, options = nil
@@ -2246,7 +2372,7 @@ module Google
2246
2372
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2247
2373
 
2248
2374
  # Customize the options with defaults
2249
- call_metadata = {}
2375
+ call_metadata = @config.rpcs.set_service_account.metadata.to_h
2250
2376
 
2251
2377
  # Set x-goog-api-client header
2252
2378
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2254,20 +2380,17 @@ module Google
2254
2380
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2255
2381
  transports_version_send: [:rest]
2256
2382
 
2257
- options.apply_defaults timeout: @config.timeout,
2383
+ options.apply_defaults timeout: @config.rpcs.set_service_account.timeout,
2258
2384
  metadata: call_metadata
2259
2385
 
2260
- uri, body, query_string_params = transcode_set_service_account request
2261
- response = @client_stub.make_post_request(
2262
- uri: uri,
2263
- body: body,
2264
- params: query_string_params,
2265
- options: options
2266
- )
2267
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2268
-
2269
- yield result, response if block_given?
2270
- result
2386
+ options.apply_defaults timeout: @config.timeout,
2387
+ metadata: @config.metadata
2388
+
2389
+ @instances_stub.set_service_account request, options do |result, response|
2390
+ result = ::Gapic::Rest::BaseOperation.new result
2391
+ yield result, response if block_given?
2392
+ return result
2393
+ end
2271
2394
  rescue ::Faraday::Error => e
2272
2395
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2273
2396
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2298,20 +2421,16 @@ module Google
2298
2421
  # @param project [::String]
2299
2422
  # Project ID for this request.
2300
2423
  # @param request_id [::String]
2301
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2302
- #
2303
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2304
- #
2305
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2424
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2306
2425
  # @param shielded_instance_integrity_policy_resource [::Google::Cloud::Compute::V1::ShieldedInstanceIntegrityPolicy, ::Hash]
2307
2426
  # The body resource for this request
2308
2427
  # @param zone [::String]
2309
2428
  # The name of the zone for this request.
2310
- # @yield [result, env] Access the result along with the Faraday environment object
2311
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2429
+ # @yield [result, response] Access the result along with the Faraday response object
2430
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2312
2431
  # @yieldparam response [::Faraday::Response]
2313
2432
  #
2314
- # @return [::Google::Cloud::Compute::V1::Operation]
2433
+ # @return [::Gapic::Rest::BaseOperation]
2315
2434
  #
2316
2435
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2317
2436
  def set_shielded_instance_integrity_policy request, options = nil
@@ -2323,7 +2442,7 @@ module Google
2323
2442
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2324
2443
 
2325
2444
  # Customize the options with defaults
2326
- call_metadata = {}
2445
+ call_metadata = @config.rpcs.set_shielded_instance_integrity_policy.metadata.to_h
2327
2446
 
2328
2447
  # Set x-goog-api-client header
2329
2448
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2331,20 +2450,17 @@ module Google
2331
2450
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2332
2451
  transports_version_send: [:rest]
2333
2452
 
2334
- options.apply_defaults timeout: @config.timeout,
2453
+ options.apply_defaults timeout: @config.rpcs.set_shielded_instance_integrity_policy.timeout,
2335
2454
  metadata: call_metadata
2336
2455
 
2337
- uri, body, query_string_params = transcode_set_shielded_instance_integrity_policy request
2338
- response = @client_stub.make_patch_request(
2339
- uri: uri,
2340
- body: body,
2341
- params: query_string_params,
2342
- options: options
2343
- )
2344
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2345
-
2346
- yield result, response if block_given?
2347
- result
2456
+ options.apply_defaults timeout: @config.timeout,
2457
+ metadata: @config.metadata
2458
+
2459
+ @instances_stub.set_shielded_instance_integrity_policy request, options do |result, response|
2460
+ result = ::Gapic::Rest::BaseOperation.new result
2461
+ yield result, response if block_given?
2462
+ return result
2463
+ end
2348
2464
  rescue ::Faraday::Error => e
2349
2465
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2350
2466
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2375,20 +2491,16 @@ module Google
2375
2491
  # @param project [::String]
2376
2492
  # Project ID for this request.
2377
2493
  # @param request_id [::String]
2378
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2379
- #
2380
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2381
- #
2382
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2494
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2383
2495
  # @param tags_resource [::Google::Cloud::Compute::V1::Tags, ::Hash]
2384
2496
  # The body resource for this request
2385
2497
  # @param zone [::String]
2386
2498
  # The name of the zone for this request.
2387
- # @yield [result, env] Access the result along with the Faraday environment object
2388
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2499
+ # @yield [result, response] Access the result along with the Faraday response object
2500
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2389
2501
  # @yieldparam response [::Faraday::Response]
2390
2502
  #
2391
- # @return [::Google::Cloud::Compute::V1::Operation]
2503
+ # @return [::Gapic::Rest::BaseOperation]
2392
2504
  #
2393
2505
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2394
2506
  def set_tags request, options = nil
@@ -2400,7 +2512,7 @@ module Google
2400
2512
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2401
2513
 
2402
2514
  # Customize the options with defaults
2403
- call_metadata = {}
2515
+ call_metadata = @config.rpcs.set_tags.metadata.to_h
2404
2516
 
2405
2517
  # Set x-goog-api-client header
2406
2518
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2408,20 +2520,17 @@ module Google
2408
2520
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2409
2521
  transports_version_send: [:rest]
2410
2522
 
2411
- options.apply_defaults timeout: @config.timeout,
2523
+ options.apply_defaults timeout: @config.rpcs.set_tags.timeout,
2412
2524
  metadata: call_metadata
2413
2525
 
2414
- uri, body, query_string_params = transcode_set_tags request
2415
- response = @client_stub.make_post_request(
2416
- uri: uri,
2417
- body: body,
2418
- params: query_string_params,
2419
- options: options
2420
- )
2421
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2422
-
2423
- yield result, response if block_given?
2424
- result
2526
+ options.apply_defaults timeout: @config.timeout,
2527
+ metadata: @config.metadata
2528
+
2529
+ @instances_stub.set_tags request, options do |result, response|
2530
+ result = ::Gapic::Rest::BaseOperation.new result
2531
+ yield result, response if block_given?
2532
+ return result
2533
+ end
2425
2534
  rescue ::Faraday::Error => e
2426
2535
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2427
2536
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2453,11 +2562,11 @@ module Google
2453
2562
  # Project ID for this request.
2454
2563
  # @param zone [::String]
2455
2564
  # The name of the zone for this request.
2456
- # @yield [result, env] Access the result along with the Faraday environment object
2457
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2565
+ # @yield [result, response] Access the result along with the Faraday response object
2566
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2458
2567
  # @yieldparam response [::Faraday::Response]
2459
2568
  #
2460
- # @return [::Google::Cloud::Compute::V1::Operation]
2569
+ # @return [::Gapic::Rest::BaseOperation]
2461
2570
  #
2462
2571
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2463
2572
  def simulate_maintenance_event request, options = nil
@@ -2469,7 +2578,7 @@ module Google
2469
2578
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2470
2579
 
2471
2580
  # Customize the options with defaults
2472
- call_metadata = {}
2581
+ call_metadata = @config.rpcs.simulate_maintenance_event.metadata.to_h
2473
2582
 
2474
2583
  # Set x-goog-api-client header
2475
2584
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2477,18 +2586,17 @@ module Google
2477
2586
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2478
2587
  transports_version_send: [:rest]
2479
2588
 
2480
- options.apply_defaults timeout: @config.timeout,
2589
+ options.apply_defaults timeout: @config.rpcs.simulate_maintenance_event.timeout,
2481
2590
  metadata: call_metadata
2482
2591
 
2483
- uri, _body, _query_string_params = transcode_simulate_maintenance_event request
2484
- response = @client_stub.make_post_request(
2485
- uri: uri,
2486
- options: options
2487
- )
2488
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2592
+ options.apply_defaults timeout: @config.timeout,
2593
+ metadata: @config.metadata
2489
2594
 
2490
- yield result, response if block_given?
2491
- result
2595
+ @instances_stub.simulate_maintenance_event request, options do |result, response|
2596
+ result = ::Gapic::Rest::BaseOperation.new result
2597
+ yield result, response if block_given?
2598
+ return result
2599
+ end
2492
2600
  rescue ::Faraday::Error => e
2493
2601
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2494
2602
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2519,18 +2627,14 @@ module Google
2519
2627
  # @param project [::String]
2520
2628
  # Project ID for this request.
2521
2629
  # @param request_id [::String]
2522
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2523
- #
2524
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2525
- #
2526
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2630
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2527
2631
  # @param zone [::String]
2528
2632
  # The name of the zone for this request.
2529
- # @yield [result, env] Access the result along with the Faraday environment object
2530
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2633
+ # @yield [result, response] Access the result along with the Faraday response object
2634
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2531
2635
  # @yieldparam response [::Faraday::Response]
2532
2636
  #
2533
- # @return [::Google::Cloud::Compute::V1::Operation]
2637
+ # @return [::Gapic::Rest::BaseOperation]
2534
2638
  #
2535
2639
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2536
2640
  def start request, options = nil
@@ -2542,7 +2646,7 @@ module Google
2542
2646
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2543
2647
 
2544
2648
  # Customize the options with defaults
2545
- call_metadata = {}
2649
+ call_metadata = @config.rpcs.start.metadata.to_h
2546
2650
 
2547
2651
  # Set x-goog-api-client header
2548
2652
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2550,19 +2654,17 @@ module Google
2550
2654
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2551
2655
  transports_version_send: [:rest]
2552
2656
 
2553
- options.apply_defaults timeout: @config.timeout,
2657
+ options.apply_defaults timeout: @config.rpcs.start.timeout,
2554
2658
  metadata: call_metadata
2555
2659
 
2556
- uri, _body, query_string_params = transcode_start request
2557
- response = @client_stub.make_post_request(
2558
- uri: uri,
2559
- params: query_string_params,
2560
- options: options
2561
- )
2562
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2660
+ options.apply_defaults timeout: @config.timeout,
2661
+ metadata: @config.metadata
2563
2662
 
2564
- yield result, response if block_given?
2565
- result
2663
+ @instances_stub.start request, options do |result, response|
2664
+ result = ::Gapic::Rest::BaseOperation.new result
2665
+ yield result, response if block_given?
2666
+ return result
2667
+ end
2566
2668
  rescue ::Faraday::Error => e
2567
2669
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2568
2670
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2595,18 +2697,14 @@ module Google
2595
2697
  # @param project [::String]
2596
2698
  # Project ID for this request.
2597
2699
  # @param request_id [::String]
2598
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2599
- #
2600
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2601
- #
2602
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2700
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2603
2701
  # @param zone [::String]
2604
2702
  # The name of the zone for this request.
2605
- # @yield [result, env] Access the result along with the Faraday environment object
2606
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2703
+ # @yield [result, response] Access the result along with the Faraday response object
2704
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2607
2705
  # @yieldparam response [::Faraday::Response]
2608
2706
  #
2609
- # @return [::Google::Cloud::Compute::V1::Operation]
2707
+ # @return [::Gapic::Rest::BaseOperation]
2610
2708
  #
2611
2709
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2612
2710
  def start_with_encryption_key request, options = nil
@@ -2618,7 +2716,7 @@ module Google
2618
2716
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2619
2717
 
2620
2718
  # Customize the options with defaults
2621
- call_metadata = {}
2719
+ call_metadata = @config.rpcs.start_with_encryption_key.metadata.to_h
2622
2720
 
2623
2721
  # Set x-goog-api-client header
2624
2722
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2626,20 +2724,17 @@ module Google
2626
2724
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2627
2725
  transports_version_send: [:rest]
2628
2726
 
2629
- options.apply_defaults timeout: @config.timeout,
2727
+ options.apply_defaults timeout: @config.rpcs.start_with_encryption_key.timeout,
2630
2728
  metadata: call_metadata
2631
2729
 
2632
- uri, body, query_string_params = transcode_start_with_encryption_key request
2633
- response = @client_stub.make_post_request(
2634
- uri: uri,
2635
- body: body,
2636
- params: query_string_params,
2637
- options: options
2638
- )
2639
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2640
-
2641
- yield result, response if block_given?
2642
- result
2730
+ options.apply_defaults timeout: @config.timeout,
2731
+ metadata: @config.metadata
2732
+
2733
+ @instances_stub.start_with_encryption_key request, options do |result, response|
2734
+ result = ::Gapic::Rest::BaseOperation.new result
2735
+ yield result, response if block_given?
2736
+ return result
2737
+ end
2643
2738
  rescue ::Faraday::Error => e
2644
2739
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2645
2740
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2670,18 +2765,14 @@ module Google
2670
2765
  # @param project [::String]
2671
2766
  # Project ID for this request.
2672
2767
  # @param request_id [::String]
2673
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2674
- #
2675
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2676
- #
2677
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2768
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2678
2769
  # @param zone [::String]
2679
2770
  # The name of the zone for this request.
2680
- # @yield [result, env] Access the result along with the Faraday environment object
2681
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2771
+ # @yield [result, response] Access the result along with the Faraday response object
2772
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2682
2773
  # @yieldparam response [::Faraday::Response]
2683
2774
  #
2684
- # @return [::Google::Cloud::Compute::V1::Operation]
2775
+ # @return [::Gapic::Rest::BaseOperation]
2685
2776
  #
2686
2777
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2687
2778
  def stop request, options = nil
@@ -2693,7 +2784,7 @@ module Google
2693
2784
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2694
2785
 
2695
2786
  # Customize the options with defaults
2696
- call_metadata = {}
2787
+ call_metadata = @config.rpcs.stop.metadata.to_h
2697
2788
 
2698
2789
  # Set x-goog-api-client header
2699
2790
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2701,19 +2792,17 @@ module Google
2701
2792
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2702
2793
  transports_version_send: [:rest]
2703
2794
 
2704
- options.apply_defaults timeout: @config.timeout,
2795
+ options.apply_defaults timeout: @config.rpcs.stop.timeout,
2705
2796
  metadata: call_metadata
2706
2797
 
2707
- uri, _body, query_string_params = transcode_stop request
2708
- response = @client_stub.make_post_request(
2709
- uri: uri,
2710
- params: query_string_params,
2711
- options: options
2712
- )
2713
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2798
+ options.apply_defaults timeout: @config.timeout,
2799
+ metadata: @config.metadata
2714
2800
 
2715
- yield result, response if block_given?
2716
- result
2801
+ @instances_stub.stop request, options do |result, response|
2802
+ result = ::Gapic::Rest::BaseOperation.new result
2803
+ yield result, response if block_given?
2804
+ return result
2805
+ end
2717
2806
  rescue ::Faraday::Error => e
2718
2807
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2719
2808
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2747,7 +2836,7 @@ module Google
2747
2836
  # The body resource for this request
2748
2837
  # @param zone [::String]
2749
2838
  # The name of the zone for this request.
2750
- # @yield [result, env] Access the result along with the Faraday environment object
2839
+ # @yield [result, response] Access the result along with the Faraday response object
2751
2840
  # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
2752
2841
  # @yieldparam response [::Faraday::Response]
2753
2842
  #
@@ -2763,7 +2852,7 @@ module Google
2763
2852
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2764
2853
 
2765
2854
  # Customize the options with defaults
2766
- call_metadata = {}
2855
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
2767
2856
 
2768
2857
  # Set x-goog-api-client header
2769
2858
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2771,26 +2860,23 @@ module Google
2771
2860
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2772
2861
  transports_version_send: [:rest]
2773
2862
 
2774
- options.apply_defaults timeout: @config.timeout,
2863
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
2775
2864
  metadata: call_metadata
2776
2865
 
2777
- uri, body, _query_string_params = transcode_test_iam_permissions request
2778
- response = @client_stub.make_post_request(
2779
- uri: uri,
2780
- body: body,
2781
- options: options
2782
- )
2783
- result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
2866
+ options.apply_defaults timeout: @config.timeout,
2867
+ metadata: @config.metadata
2784
2868
 
2785
- yield result, response if block_given?
2786
- result
2869
+ @instances_stub.test_iam_permissions request, options do |result, response|
2870
+ yield result, response if block_given?
2871
+ return result
2872
+ end
2787
2873
  rescue ::Faraday::Error => e
2788
2874
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2789
2875
  raise ::Google::Cloud::Error.from_error(gapic_error)
2790
2876
  end
2791
2877
 
2792
2878
  ##
2793
- # Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
2879
+ # Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
2794
2880
  #
2795
2881
  # @overload update(request, options = nil)
2796
2882
  # Pass arguments to `update` via a request object, either of type
@@ -2820,18 +2906,14 @@ module Google
2820
2906
  # @param project [::String]
2821
2907
  # Project ID for this request.
2822
2908
  # @param request_id [::String]
2823
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2824
- #
2825
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2826
- #
2827
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2909
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2828
2910
  # @param zone [::String]
2829
2911
  # The name of the zone for this request.
2830
- # @yield [result, env] Access the result along with the Faraday environment object
2831
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2912
+ # @yield [result, response] Access the result along with the Faraday response object
2913
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2832
2914
  # @yieldparam response [::Faraday::Response]
2833
2915
  #
2834
- # @return [::Google::Cloud::Compute::V1::Operation]
2916
+ # @return [::Gapic::Rest::BaseOperation]
2835
2917
  #
2836
2918
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2837
2919
  def update request, options = nil
@@ -2843,7 +2925,7 @@ module Google
2843
2925
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2844
2926
 
2845
2927
  # Customize the options with defaults
2846
- call_metadata = {}
2928
+ call_metadata = @config.rpcs.update.metadata.to_h
2847
2929
 
2848
2930
  # Set x-goog-api-client header
2849
2931
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2851,20 +2933,17 @@ module Google
2851
2933
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2852
2934
  transports_version_send: [:rest]
2853
2935
 
2854
- options.apply_defaults timeout: @config.timeout,
2936
+ options.apply_defaults timeout: @config.rpcs.update.timeout,
2855
2937
  metadata: call_metadata
2856
2938
 
2857
- uri, body, query_string_params = transcode_update request
2858
- response = @client_stub.make_put_request(
2859
- uri: uri,
2860
- body: body,
2861
- params: query_string_params,
2862
- options: options
2863
- )
2864
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2865
-
2866
- yield result, response if block_given?
2867
- result
2939
+ options.apply_defaults timeout: @config.timeout,
2940
+ metadata: @config.metadata
2941
+
2942
+ @instances_stub.update request, options do |result, response|
2943
+ result = ::Gapic::Rest::BaseOperation.new result
2944
+ yield result, response if block_given?
2945
+ return result
2946
+ end
2868
2947
  rescue ::Faraday::Error => e
2869
2948
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2870
2949
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2899,18 +2978,14 @@ module Google
2899
2978
  # @param project [::String]
2900
2979
  # Project ID for this request.
2901
2980
  # @param request_id [::String]
2902
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2903
- #
2904
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2905
- #
2906
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2981
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2907
2982
  # @param zone [::String]
2908
2983
  # The name of the zone for this request.
2909
- # @yield [result, env] Access the result along with the Faraday environment object
2910
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2984
+ # @yield [result, response] Access the result along with the Faraday response object
2985
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2911
2986
  # @yieldparam response [::Faraday::Response]
2912
2987
  #
2913
- # @return [::Google::Cloud::Compute::V1::Operation]
2988
+ # @return [::Gapic::Rest::BaseOperation]
2914
2989
  #
2915
2990
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2916
2991
  def update_access_config request, options = nil
@@ -2922,7 +2997,7 @@ module Google
2922
2997
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2923
2998
 
2924
2999
  # Customize the options with defaults
2925
- call_metadata = {}
3000
+ call_metadata = @config.rpcs.update_access_config.metadata.to_h
2926
3001
 
2927
3002
  # Set x-goog-api-client header
2928
3003
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2930,20 +3005,17 @@ module Google
2930
3005
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2931
3006
  transports_version_send: [:rest]
2932
3007
 
2933
- options.apply_defaults timeout: @config.timeout,
3008
+ options.apply_defaults timeout: @config.rpcs.update_access_config.timeout,
2934
3009
  metadata: call_metadata
2935
3010
 
2936
- uri, body, query_string_params = transcode_update_access_config request
2937
- response = @client_stub.make_post_request(
2938
- uri: uri,
2939
- body: body,
2940
- params: query_string_params,
2941
- options: options
2942
- )
2943
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2944
-
2945
- yield result, response if block_given?
2946
- result
3011
+ options.apply_defaults timeout: @config.timeout,
3012
+ metadata: @config.metadata
3013
+
3014
+ @instances_stub.update_access_config request, options do |result, response|
3015
+ result = ::Gapic::Rest::BaseOperation.new result
3016
+ yield result, response if block_given?
3017
+ return result
3018
+ end
2947
3019
  rescue ::Faraday::Error => e
2948
3020
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2949
3021
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2976,18 +3048,14 @@ module Google
2976
3048
  # @param project [::String]
2977
3049
  # Project ID for this request.
2978
3050
  # @param request_id [::String]
2979
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2980
- #
2981
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2982
- #
2983
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3051
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
2984
3052
  # @param zone [::String]
2985
3053
  # The name of the zone for this request.
2986
- # @yield [result, env] Access the result along with the Faraday environment object
2987
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
3054
+ # @yield [result, response] Access the result along with the Faraday response object
3055
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2988
3056
  # @yieldparam response [::Faraday::Response]
2989
3057
  #
2990
- # @return [::Google::Cloud::Compute::V1::Operation]
3058
+ # @return [::Gapic::Rest::BaseOperation]
2991
3059
  #
2992
3060
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2993
3061
  def update_display_device request, options = nil
@@ -2999,7 +3067,7 @@ module Google
2999
3067
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3000
3068
 
3001
3069
  # Customize the options with defaults
3002
- call_metadata = {}
3070
+ call_metadata = @config.rpcs.update_display_device.metadata.to_h
3003
3071
 
3004
3072
  # Set x-goog-api-client header
3005
3073
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3007,27 +3075,24 @@ module Google
3007
3075
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3008
3076
  transports_version_send: [:rest]
3009
3077
 
3010
- options.apply_defaults timeout: @config.timeout,
3078
+ options.apply_defaults timeout: @config.rpcs.update_display_device.timeout,
3011
3079
  metadata: call_metadata
3012
3080
 
3013
- uri, body, query_string_params = transcode_update_display_device request
3014
- response = @client_stub.make_patch_request(
3015
- uri: uri,
3016
- body: body,
3017
- params: query_string_params,
3018
- options: options
3019
- )
3020
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
3021
-
3022
- yield result, response if block_given?
3023
- result
3081
+ options.apply_defaults timeout: @config.timeout,
3082
+ metadata: @config.metadata
3083
+
3084
+ @instances_stub.update_display_device request, options do |result, response|
3085
+ result = ::Gapic::Rest::BaseOperation.new result
3086
+ yield result, response if block_given?
3087
+ return result
3088
+ end
3024
3089
  rescue ::Faraday::Error => e
3025
3090
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
3026
3091
  raise ::Google::Cloud::Error.from_error(gapic_error)
3027
3092
  end
3028
3093
 
3029
3094
  ##
3030
- # Updates an instance's network interface. This method follows PATCH semantics.
3095
+ # Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
3031
3096
  #
3032
3097
  # @overload update_network_interface(request, options = nil)
3033
3098
  # Pass arguments to `update_network_interface` via a request object, either of type
@@ -3055,18 +3120,14 @@ module Google
3055
3120
  # @param project [::String]
3056
3121
  # Project ID for this request.
3057
3122
  # @param request_id [::String]
3058
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3059
- #
3060
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3061
- #
3062
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3123
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
3063
3124
  # @param zone [::String]
3064
3125
  # The name of the zone for this request.
3065
- # @yield [result, env] Access the result along with the Faraday environment object
3066
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
3126
+ # @yield [result, response] Access the result along with the Faraday response object
3127
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
3067
3128
  # @yieldparam response [::Faraday::Response]
3068
3129
  #
3069
- # @return [::Google::Cloud::Compute::V1::Operation]
3130
+ # @return [::Gapic::Rest::BaseOperation]
3070
3131
  #
3071
3132
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3072
3133
  def update_network_interface request, options = nil
@@ -3078,7 +3139,7 @@ module Google
3078
3139
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3079
3140
 
3080
3141
  # Customize the options with defaults
3081
- call_metadata = {}
3142
+ call_metadata = @config.rpcs.update_network_interface.metadata.to_h
3082
3143
 
3083
3144
  # Set x-goog-api-client header
3084
3145
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3086,20 +3147,17 @@ module Google
3086
3147
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3087
3148
  transports_version_send: [:rest]
3088
3149
 
3089
- options.apply_defaults timeout: @config.timeout,
3150
+ options.apply_defaults timeout: @config.rpcs.update_network_interface.timeout,
3090
3151
  metadata: call_metadata
3091
3152
 
3092
- uri, body, query_string_params = transcode_update_network_interface request
3093
- response = @client_stub.make_patch_request(
3094
- uri: uri,
3095
- body: body,
3096
- params: query_string_params,
3097
- options: options
3098
- )
3099
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
3100
-
3101
- yield result, response if block_given?
3102
- result
3153
+ options.apply_defaults timeout: @config.timeout,
3154
+ metadata: @config.metadata
3155
+
3156
+ @instances_stub.update_network_interface request, options do |result, response|
3157
+ result = ::Gapic::Rest::BaseOperation.new result
3158
+ yield result, response if block_given?
3159
+ return result
3160
+ end
3103
3161
  rescue ::Faraday::Error => e
3104
3162
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
3105
3163
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -3130,20 +3188,16 @@ module Google
3130
3188
  # @param project [::String]
3131
3189
  # Project ID for this request.
3132
3190
  # @param request_id [::String]
3133
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
3134
- #
3135
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
3136
- #
3137
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3191
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
3138
3192
  # @param shielded_instance_config_resource [::Google::Cloud::Compute::V1::ShieldedInstanceConfig, ::Hash]
3139
3193
  # The body resource for this request
3140
3194
  # @param zone [::String]
3141
3195
  # The name of the zone for this request.
3142
- # @yield [result, env] Access the result along with the Faraday environment object
3143
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
3196
+ # @yield [result, response] Access the result along with the Faraday response object
3197
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
3144
3198
  # @yieldparam response [::Faraday::Response]
3145
3199
  #
3146
- # @return [::Google::Cloud::Compute::V1::Operation]
3200
+ # @return [::Gapic::Rest::BaseOperation]
3147
3201
  #
3148
3202
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3149
3203
  def update_shielded_instance_config request, options = nil
@@ -3155,7 +3209,7 @@ module Google
3155
3209
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3156
3210
 
3157
3211
  # Customize the options with defaults
3158
- call_metadata = {}
3212
+ call_metadata = @config.rpcs.update_shielded_instance_config.metadata.to_h
3159
3213
 
3160
3214
  # Set x-goog-api-client header
3161
3215
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3163,20 +3217,17 @@ module Google
3163
3217
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3164
3218
  transports_version_send: [:rest]
3165
3219
 
3166
- options.apply_defaults timeout: @config.timeout,
3220
+ options.apply_defaults timeout: @config.rpcs.update_shielded_instance_config.timeout,
3167
3221
  metadata: call_metadata
3168
3222
 
3169
- uri, body, query_string_params = transcode_update_shielded_instance_config request
3170
- response = @client_stub.make_patch_request(
3171
- uri: uri,
3172
- body: body,
3173
- params: query_string_params,
3174
- options: options
3175
- )
3176
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
3177
-
3178
- yield result, response if block_given?
3179
- result
3223
+ options.apply_defaults timeout: @config.timeout,
3224
+ metadata: @config.metadata
3225
+
3226
+ @instances_stub.update_shielded_instance_config request, options do |result, response|
3227
+ result = ::Gapic::Rest::BaseOperation.new result
3228
+ yield result, response if block_given?
3229
+ return result
3230
+ end
3180
3231
  rescue ::Faraday::Error => e
3181
3232
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
3182
3233
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -3231,6 +3282,9 @@ module Google
3231
3282
  # @!attribute [rw] timeout
3232
3283
  # The call timeout in seconds.
3233
3284
  # @return [::Numeric]
3285
+ # @!attribute [rw] metadata
3286
+ # Additional REST headers to be sent with the call.
3287
+ # @return [::Hash{::Symbol=>::String}]
3234
3288
  #
3235
3289
  class Configuration
3236
3290
  extend ::Gapic::Config
@@ -3244,6 +3298,7 @@ module Google
3244
3298
  config_attr :lib_name, nil, ::String, nil
3245
3299
  config_attr :lib_version, nil, ::String, nil
3246
3300
  config_attr :timeout, nil, ::Numeric, nil
3301
+ config_attr :metadata, nil, ::Hash, nil
3247
3302
 
3248
3303
  # @private
3249
3304
  def initialize parent_config = nil
@@ -3251,6 +3306,340 @@ module Google
3251
3306
 
3252
3307
  yield self if block_given?
3253
3308
  end
3309
+
3310
+ ##
3311
+ # Configurations for individual RPCs
3312
+ # @return [Rpcs]
3313
+ #
3314
+ def rpcs
3315
+ @rpcs ||= begin
3316
+ parent_rpcs = nil
3317
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3318
+ Rpcs.new parent_rpcs
3319
+ end
3320
+ end
3321
+
3322
+ ##
3323
+ # Configuration RPC class for the Instances API.
3324
+ #
3325
+ # Includes fields providing the configuration for each RPC in this service.
3326
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3327
+ # the following configuration fields:
3328
+ #
3329
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3330
+ #
3331
+ # there is one other field (`retry_policy`) that can be set
3332
+ # but is currently not supported for REST Gapic libraries.
3333
+ #
3334
+ class Rpcs
3335
+ ##
3336
+ # RPC-specific configuration for `add_access_config`
3337
+ # @return [::Gapic::Config::Method]
3338
+ #
3339
+ attr_reader :add_access_config
3340
+ ##
3341
+ # RPC-specific configuration for `add_resource_policies`
3342
+ # @return [::Gapic::Config::Method]
3343
+ #
3344
+ attr_reader :add_resource_policies
3345
+ ##
3346
+ # RPC-specific configuration for `aggregated_list`
3347
+ # @return [::Gapic::Config::Method]
3348
+ #
3349
+ attr_reader :aggregated_list
3350
+ ##
3351
+ # RPC-specific configuration for `attach_disk`
3352
+ # @return [::Gapic::Config::Method]
3353
+ #
3354
+ attr_reader :attach_disk
3355
+ ##
3356
+ # RPC-specific configuration for `bulk_insert`
3357
+ # @return [::Gapic::Config::Method]
3358
+ #
3359
+ attr_reader :bulk_insert
3360
+ ##
3361
+ # RPC-specific configuration for `delete`
3362
+ # @return [::Gapic::Config::Method]
3363
+ #
3364
+ attr_reader :delete
3365
+ ##
3366
+ # RPC-specific configuration for `delete_access_config`
3367
+ # @return [::Gapic::Config::Method]
3368
+ #
3369
+ attr_reader :delete_access_config
3370
+ ##
3371
+ # RPC-specific configuration for `detach_disk`
3372
+ # @return [::Gapic::Config::Method]
3373
+ #
3374
+ attr_reader :detach_disk
3375
+ ##
3376
+ # RPC-specific configuration for `get`
3377
+ # @return [::Gapic::Config::Method]
3378
+ #
3379
+ attr_reader :get
3380
+ ##
3381
+ # RPC-specific configuration for `get_effective_firewalls`
3382
+ # @return [::Gapic::Config::Method]
3383
+ #
3384
+ attr_reader :get_effective_firewalls
3385
+ ##
3386
+ # RPC-specific configuration for `get_guest_attributes`
3387
+ # @return [::Gapic::Config::Method]
3388
+ #
3389
+ attr_reader :get_guest_attributes
3390
+ ##
3391
+ # RPC-specific configuration for `get_iam_policy`
3392
+ # @return [::Gapic::Config::Method]
3393
+ #
3394
+ attr_reader :get_iam_policy
3395
+ ##
3396
+ # RPC-specific configuration for `get_screenshot`
3397
+ # @return [::Gapic::Config::Method]
3398
+ #
3399
+ attr_reader :get_screenshot
3400
+ ##
3401
+ # RPC-specific configuration for `get_serial_port_output`
3402
+ # @return [::Gapic::Config::Method]
3403
+ #
3404
+ attr_reader :get_serial_port_output
3405
+ ##
3406
+ # RPC-specific configuration for `get_shielded_instance_identity`
3407
+ # @return [::Gapic::Config::Method]
3408
+ #
3409
+ attr_reader :get_shielded_instance_identity
3410
+ ##
3411
+ # RPC-specific configuration for `insert`
3412
+ # @return [::Gapic::Config::Method]
3413
+ #
3414
+ attr_reader :insert
3415
+ ##
3416
+ # RPC-specific configuration for `list`
3417
+ # @return [::Gapic::Config::Method]
3418
+ #
3419
+ attr_reader :list
3420
+ ##
3421
+ # RPC-specific configuration for `list_referrers`
3422
+ # @return [::Gapic::Config::Method]
3423
+ #
3424
+ attr_reader :list_referrers
3425
+ ##
3426
+ # RPC-specific configuration for `remove_resource_policies`
3427
+ # @return [::Gapic::Config::Method]
3428
+ #
3429
+ attr_reader :remove_resource_policies
3430
+ ##
3431
+ # RPC-specific configuration for `reset`
3432
+ # @return [::Gapic::Config::Method]
3433
+ #
3434
+ attr_reader :reset
3435
+ ##
3436
+ # RPC-specific configuration for `send_diagnostic_interrupt`
3437
+ # @return [::Gapic::Config::Method]
3438
+ #
3439
+ attr_reader :send_diagnostic_interrupt
3440
+ ##
3441
+ # RPC-specific configuration for `set_deletion_protection`
3442
+ # @return [::Gapic::Config::Method]
3443
+ #
3444
+ attr_reader :set_deletion_protection
3445
+ ##
3446
+ # RPC-specific configuration for `set_disk_auto_delete`
3447
+ # @return [::Gapic::Config::Method]
3448
+ #
3449
+ attr_reader :set_disk_auto_delete
3450
+ ##
3451
+ # RPC-specific configuration for `set_iam_policy`
3452
+ # @return [::Gapic::Config::Method]
3453
+ #
3454
+ attr_reader :set_iam_policy
3455
+ ##
3456
+ # RPC-specific configuration for `set_labels`
3457
+ # @return [::Gapic::Config::Method]
3458
+ #
3459
+ attr_reader :set_labels
3460
+ ##
3461
+ # RPC-specific configuration for `set_machine_resources`
3462
+ # @return [::Gapic::Config::Method]
3463
+ #
3464
+ attr_reader :set_machine_resources
3465
+ ##
3466
+ # RPC-specific configuration for `set_machine_type`
3467
+ # @return [::Gapic::Config::Method]
3468
+ #
3469
+ attr_reader :set_machine_type
3470
+ ##
3471
+ # RPC-specific configuration for `set_metadata`
3472
+ # @return [::Gapic::Config::Method]
3473
+ #
3474
+ attr_reader :set_metadata
3475
+ ##
3476
+ # RPC-specific configuration for `set_min_cpu_platform`
3477
+ # @return [::Gapic::Config::Method]
3478
+ #
3479
+ attr_reader :set_min_cpu_platform
3480
+ ##
3481
+ # RPC-specific configuration for `set_scheduling`
3482
+ # @return [::Gapic::Config::Method]
3483
+ #
3484
+ attr_reader :set_scheduling
3485
+ ##
3486
+ # RPC-specific configuration for `set_service_account`
3487
+ # @return [::Gapic::Config::Method]
3488
+ #
3489
+ attr_reader :set_service_account
3490
+ ##
3491
+ # RPC-specific configuration for `set_shielded_instance_integrity_policy`
3492
+ # @return [::Gapic::Config::Method]
3493
+ #
3494
+ attr_reader :set_shielded_instance_integrity_policy
3495
+ ##
3496
+ # RPC-specific configuration for `set_tags`
3497
+ # @return [::Gapic::Config::Method]
3498
+ #
3499
+ attr_reader :set_tags
3500
+ ##
3501
+ # RPC-specific configuration for `simulate_maintenance_event`
3502
+ # @return [::Gapic::Config::Method]
3503
+ #
3504
+ attr_reader :simulate_maintenance_event
3505
+ ##
3506
+ # RPC-specific configuration for `start`
3507
+ # @return [::Gapic::Config::Method]
3508
+ #
3509
+ attr_reader :start
3510
+ ##
3511
+ # RPC-specific configuration for `start_with_encryption_key`
3512
+ # @return [::Gapic::Config::Method]
3513
+ #
3514
+ attr_reader :start_with_encryption_key
3515
+ ##
3516
+ # RPC-specific configuration for `stop`
3517
+ # @return [::Gapic::Config::Method]
3518
+ #
3519
+ attr_reader :stop
3520
+ ##
3521
+ # RPC-specific configuration for `test_iam_permissions`
3522
+ # @return [::Gapic::Config::Method]
3523
+ #
3524
+ attr_reader :test_iam_permissions
3525
+ ##
3526
+ # RPC-specific configuration for `update`
3527
+ # @return [::Gapic::Config::Method]
3528
+ #
3529
+ attr_reader :update
3530
+ ##
3531
+ # RPC-specific configuration for `update_access_config`
3532
+ # @return [::Gapic::Config::Method]
3533
+ #
3534
+ attr_reader :update_access_config
3535
+ ##
3536
+ # RPC-specific configuration for `update_display_device`
3537
+ # @return [::Gapic::Config::Method]
3538
+ #
3539
+ attr_reader :update_display_device
3540
+ ##
3541
+ # RPC-specific configuration for `update_network_interface`
3542
+ # @return [::Gapic::Config::Method]
3543
+ #
3544
+ attr_reader :update_network_interface
3545
+ ##
3546
+ # RPC-specific configuration for `update_shielded_instance_config`
3547
+ # @return [::Gapic::Config::Method]
3548
+ #
3549
+ attr_reader :update_shielded_instance_config
3550
+
3551
+ # @private
3552
+ def initialize parent_rpcs = nil
3553
+ add_access_config_config = parent_rpcs.add_access_config if parent_rpcs.respond_to? :add_access_config
3554
+ @add_access_config = ::Gapic::Config::Method.new add_access_config_config
3555
+ add_resource_policies_config = parent_rpcs.add_resource_policies if parent_rpcs.respond_to? :add_resource_policies
3556
+ @add_resource_policies = ::Gapic::Config::Method.new add_resource_policies_config
3557
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
3558
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
3559
+ attach_disk_config = parent_rpcs.attach_disk if parent_rpcs.respond_to? :attach_disk
3560
+ @attach_disk = ::Gapic::Config::Method.new attach_disk_config
3561
+ bulk_insert_config = parent_rpcs.bulk_insert if parent_rpcs.respond_to? :bulk_insert
3562
+ @bulk_insert = ::Gapic::Config::Method.new bulk_insert_config
3563
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
3564
+ @delete = ::Gapic::Config::Method.new delete_config
3565
+ delete_access_config_config = parent_rpcs.delete_access_config if parent_rpcs.respond_to? :delete_access_config
3566
+ @delete_access_config = ::Gapic::Config::Method.new delete_access_config_config
3567
+ detach_disk_config = parent_rpcs.detach_disk if parent_rpcs.respond_to? :detach_disk
3568
+ @detach_disk = ::Gapic::Config::Method.new detach_disk_config
3569
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
3570
+ @get = ::Gapic::Config::Method.new get_config
3571
+ get_effective_firewalls_config = parent_rpcs.get_effective_firewalls if parent_rpcs.respond_to? :get_effective_firewalls
3572
+ @get_effective_firewalls = ::Gapic::Config::Method.new get_effective_firewalls_config
3573
+ get_guest_attributes_config = parent_rpcs.get_guest_attributes if parent_rpcs.respond_to? :get_guest_attributes
3574
+ @get_guest_attributes = ::Gapic::Config::Method.new get_guest_attributes_config
3575
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
3576
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
3577
+ get_screenshot_config = parent_rpcs.get_screenshot if parent_rpcs.respond_to? :get_screenshot
3578
+ @get_screenshot = ::Gapic::Config::Method.new get_screenshot_config
3579
+ get_serial_port_output_config = parent_rpcs.get_serial_port_output if parent_rpcs.respond_to? :get_serial_port_output
3580
+ @get_serial_port_output = ::Gapic::Config::Method.new get_serial_port_output_config
3581
+ get_shielded_instance_identity_config = parent_rpcs.get_shielded_instance_identity if parent_rpcs.respond_to? :get_shielded_instance_identity
3582
+ @get_shielded_instance_identity = ::Gapic::Config::Method.new get_shielded_instance_identity_config
3583
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
3584
+ @insert = ::Gapic::Config::Method.new insert_config
3585
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
3586
+ @list = ::Gapic::Config::Method.new list_config
3587
+ list_referrers_config = parent_rpcs.list_referrers if parent_rpcs.respond_to? :list_referrers
3588
+ @list_referrers = ::Gapic::Config::Method.new list_referrers_config
3589
+ remove_resource_policies_config = parent_rpcs.remove_resource_policies if parent_rpcs.respond_to? :remove_resource_policies
3590
+ @remove_resource_policies = ::Gapic::Config::Method.new remove_resource_policies_config
3591
+ reset_config = parent_rpcs.reset if parent_rpcs.respond_to? :reset
3592
+ @reset = ::Gapic::Config::Method.new reset_config
3593
+ send_diagnostic_interrupt_config = parent_rpcs.send_diagnostic_interrupt if parent_rpcs.respond_to? :send_diagnostic_interrupt
3594
+ @send_diagnostic_interrupt = ::Gapic::Config::Method.new send_diagnostic_interrupt_config
3595
+ set_deletion_protection_config = parent_rpcs.set_deletion_protection if parent_rpcs.respond_to? :set_deletion_protection
3596
+ @set_deletion_protection = ::Gapic::Config::Method.new set_deletion_protection_config
3597
+ set_disk_auto_delete_config = parent_rpcs.set_disk_auto_delete if parent_rpcs.respond_to? :set_disk_auto_delete
3598
+ @set_disk_auto_delete = ::Gapic::Config::Method.new set_disk_auto_delete_config
3599
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
3600
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
3601
+ set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
3602
+ @set_labels = ::Gapic::Config::Method.new set_labels_config
3603
+ set_machine_resources_config = parent_rpcs.set_machine_resources if parent_rpcs.respond_to? :set_machine_resources
3604
+ @set_machine_resources = ::Gapic::Config::Method.new set_machine_resources_config
3605
+ set_machine_type_config = parent_rpcs.set_machine_type if parent_rpcs.respond_to? :set_machine_type
3606
+ @set_machine_type = ::Gapic::Config::Method.new set_machine_type_config
3607
+ set_metadata_config = parent_rpcs.set_metadata if parent_rpcs.respond_to? :set_metadata
3608
+ @set_metadata = ::Gapic::Config::Method.new set_metadata_config
3609
+ set_min_cpu_platform_config = parent_rpcs.set_min_cpu_platform if parent_rpcs.respond_to? :set_min_cpu_platform
3610
+ @set_min_cpu_platform = ::Gapic::Config::Method.new set_min_cpu_platform_config
3611
+ set_scheduling_config = parent_rpcs.set_scheduling if parent_rpcs.respond_to? :set_scheduling
3612
+ @set_scheduling = ::Gapic::Config::Method.new set_scheduling_config
3613
+ set_service_account_config = parent_rpcs.set_service_account if parent_rpcs.respond_to? :set_service_account
3614
+ @set_service_account = ::Gapic::Config::Method.new set_service_account_config
3615
+ set_shielded_instance_integrity_policy_config = parent_rpcs.set_shielded_instance_integrity_policy if parent_rpcs.respond_to? :set_shielded_instance_integrity_policy
3616
+ @set_shielded_instance_integrity_policy = ::Gapic::Config::Method.new set_shielded_instance_integrity_policy_config
3617
+ set_tags_config = parent_rpcs.set_tags if parent_rpcs.respond_to? :set_tags
3618
+ @set_tags = ::Gapic::Config::Method.new set_tags_config
3619
+ simulate_maintenance_event_config = parent_rpcs.simulate_maintenance_event if parent_rpcs.respond_to? :simulate_maintenance_event
3620
+ @simulate_maintenance_event = ::Gapic::Config::Method.new simulate_maintenance_event_config
3621
+ start_config = parent_rpcs.start if parent_rpcs.respond_to? :start
3622
+ @start = ::Gapic::Config::Method.new start_config
3623
+ start_with_encryption_key_config = parent_rpcs.start_with_encryption_key if parent_rpcs.respond_to? :start_with_encryption_key
3624
+ @start_with_encryption_key = ::Gapic::Config::Method.new start_with_encryption_key_config
3625
+ stop_config = parent_rpcs.stop if parent_rpcs.respond_to? :stop
3626
+ @stop = ::Gapic::Config::Method.new stop_config
3627
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
3628
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
3629
+ update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
3630
+ @update = ::Gapic::Config::Method.new update_config
3631
+ update_access_config_config = parent_rpcs.update_access_config if parent_rpcs.respond_to? :update_access_config
3632
+ @update_access_config = ::Gapic::Config::Method.new update_access_config_config
3633
+ update_display_device_config = parent_rpcs.update_display_device if parent_rpcs.respond_to? :update_display_device
3634
+ @update_display_device = ::Gapic::Config::Method.new update_display_device_config
3635
+ update_network_interface_config = parent_rpcs.update_network_interface if parent_rpcs.respond_to? :update_network_interface
3636
+ @update_network_interface = ::Gapic::Config::Method.new update_network_interface_config
3637
+ update_shielded_instance_config_config = parent_rpcs.update_shielded_instance_config if parent_rpcs.respond_to? :update_shielded_instance_config
3638
+ @update_shielded_instance_config = ::Gapic::Config::Method.new update_shielded_instance_config_config
3639
+
3640
+ yield self if block_given?
3641
+ end
3642
+ end
3254
3643
  end
3255
3644
  end
3256
3645
  end