google-cloud-compute-v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (379) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +169 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +73 -0
  6. data/lib/google-cloud-compute-v1.rb +21 -0
  7. data/lib/google/cloud/compute/v1.rb +110 -0
  8. data/lib/google/cloud/compute/v1/accelerator_types.rb +44 -0
  9. data/lib/google/cloud/compute/v1/accelerator_types/credentials.rb +53 -0
  10. data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +35 -0
  11. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +452 -0
  12. data/lib/google/cloud/compute/v1/accelerator_types/rest/grpc_transcoding.rb +81 -0
  13. data/lib/google/cloud/compute/v1/addresses.rb +44 -0
  14. data/lib/google/cloud/compute/v1/addresses/credentials.rb +52 -0
  15. data/lib/google/cloud/compute/v1/addresses/rest.rb +35 -0
  16. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +596 -0
  17. data/lib/google/cloud/compute/v1/addresses/rest/grpc_transcoding.rb +106 -0
  18. data/lib/google/cloud/compute/v1/autoscalers.rb +44 -0
  19. data/lib/google/cloud/compute/v1/autoscalers/credentials.rb +52 -0
  20. data/lib/google/cloud/compute/v1/autoscalers/rest.rb +35 -0
  21. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +746 -0
  22. data/lib/google/cloud/compute/v1/autoscalers/rest/grpc_transcoding.rb +130 -0
  23. data/lib/google/cloud/compute/v1/backend_buckets.rb +44 -0
  24. data/lib/google/cloud/compute/v1/backend_buckets/credentials.rb +52 -0
  25. data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +35 -0
  26. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +795 -0
  27. data/lib/google/cloud/compute/v1/backend_buckets/rest/grpc_transcoding.rb +138 -0
  28. data/lib/google/cloud/compute/v1/backend_services.rb +44 -0
  29. data/lib/google/cloud/compute/v1/backend_services/credentials.rb +52 -0
  30. data/lib/google/cloud/compute/v1/backend_services/rest.rb +35 -0
  31. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +1023 -0
  32. data/lib/google/cloud/compute/v1/backend_services/rest/grpc_transcoding.rb +180 -0
  33. data/lib/google/cloud/compute/v1/compute_pb.rb +9482 -0
  34. data/lib/google/cloud/compute/v1/disk_types.rb +44 -0
  35. data/lib/google/cloud/compute/v1/disk_types/credentials.rb +53 -0
  36. data/lib/google/cloud/compute/v1/disk_types/rest.rb +35 -0
  37. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +450 -0
  38. data/lib/google/cloud/compute/v1/disk_types/rest/grpc_transcoding.rb +81 -0
  39. data/lib/google/cloud/compute/v1/disks.rb +44 -0
  40. data/lib/google/cloud/compute/v1/disks/credentials.rb +52 -0
  41. data/lib/google/cloud/compute/v1/disks/rest.rb +35 -0
  42. data/lib/google/cloud/compute/v1/disks/rest/client.rb +1182 -0
  43. data/lib/google/cloud/compute/v1/disks/rest/grpc_transcoding.rb +203 -0
  44. data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +44 -0
  45. data/lib/google/cloud/compute/v1/external_vpn_gateways/credentials.rb +52 -0
  46. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +35 -0
  47. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +637 -0
  48. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/grpc_transcoding.rb +112 -0
  49. data/lib/google/cloud/compute/v1/firewalls.rb +44 -0
  50. data/lib/google/cloud/compute/v1/firewalls/credentials.rb +52 -0
  51. data/lib/google/cloud/compute/v1/firewalls/rest.rb +35 -0
  52. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +649 -0
  53. data/lib/google/cloud/compute/v1/firewalls/rest/grpc_transcoding.rb +112 -0
  54. data/lib/google/cloud/compute/v1/forwarding_rules.rb +44 -0
  55. data/lib/google/cloud/compute/v1/forwarding_rules/credentials.rb +52 -0
  56. data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +35 -0
  57. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +746 -0
  58. data/lib/google/cloud/compute/v1/forwarding_rules/rest/grpc_transcoding.rb +130 -0
  59. data/lib/google/cloud/compute/v1/global_addresses.rb +44 -0
  60. data/lib/google/cloud/compute/v1/global_addresses/credentials.rb +52 -0
  61. data/lib/google/cloud/compute/v1/global_addresses/rest.rb +35 -0
  62. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +503 -0
  63. data/lib/google/cloud/compute/v1/global_addresses/rest/grpc_transcoding.rb +88 -0
  64. data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +44 -0
  65. data/lib/google/cloud/compute/v1/global_forwarding_rules/credentials.rb +52 -0
  66. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +35 -0
  67. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +649 -0
  68. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/grpc_transcoding.rb +112 -0
  69. data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +44 -0
  70. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/credentials.rb +52 -0
  71. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +35 -0
  72. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +734 -0
  73. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/grpc_transcoding.rb +129 -0
  74. data/lib/google/cloud/compute/v1/global_operations.rb +44 -0
  75. data/lib/google/cloud/compute/v1/global_operations/credentials.rb +52 -0
  76. data/lib/google/cloud/compute/v1/global_operations/rest.rb +35 -0
  77. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +578 -0
  78. data/lib/google/cloud/compute/v1/global_operations/rest/grpc_transcoding.rb +105 -0
  79. data/lib/google/cloud/compute/v1/global_organization_operations.rb +44 -0
  80. data/lib/google/cloud/compute/v1/global_organization_operations/credentials.rb +52 -0
  81. data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +35 -0
  82. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +427 -0
  83. data/lib/google/cloud/compute/v1/global_organization_operations/rest/grpc_transcoding.rb +78 -0
  84. data/lib/google/cloud/compute/v1/health_checks.rb +44 -0
  85. data/lib/google/cloud/compute/v1/health_checks/credentials.rb +52 -0
  86. data/lib/google/cloud/compute/v1/health_checks/rest.rb +35 -0
  87. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +734 -0
  88. data/lib/google/cloud/compute/v1/health_checks/rest/grpc_transcoding.rb +130 -0
  89. data/lib/google/cloud/compute/v1/images.rb +44 -0
  90. data/lib/google/cloud/compute/v1/images/credentials.rb +52 -0
  91. data/lib/google/cloud/compute/v1/images/rest.rb +35 -0
  92. data/lib/google/cloud/compute/v1/images/rest/client.rb +985 -0
  93. data/lib/google/cloud/compute/v1/images/rest/grpc_transcoding.rb +173 -0
  94. data/lib/google/cloud/compute/v1/instance_group_managers.rb +44 -0
  95. data/lib/google/cloud/compute/v1/instance_group_managers/credentials.rb +52 -0
  96. data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +35 -0
  97. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +1767 -0
  98. data/lib/google/cloud/compute/v1/instance_group_managers/rest/grpc_transcoding.rb +303 -0
  99. data/lib/google/cloud/compute/v1/instance_groups.rb +44 -0
  100. data/lib/google/cloud/compute/v1/instance_groups/credentials.rb +52 -0
  101. data/lib/google/cloud/compute/v1/instance_groups/rest.rb +35 -0
  102. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +916 -0
  103. data/lib/google/cloud/compute/v1/instance_groups/rest/grpc_transcoding.rb +154 -0
  104. data/lib/google/cloud/compute/v1/instance_templates.rb +44 -0
  105. data/lib/google/cloud/compute/v1/instance_templates/credentials.rb +52 -0
  106. data/lib/google/cloud/compute/v1/instance_templates/rest.rb +35 -0
  107. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +704 -0
  108. data/lib/google/cloud/compute/v1/instance_templates/rest/grpc_transcoding.rb +125 -0
  109. data/lib/google/cloud/compute/v1/instances.rb +44 -0
  110. data/lib/google/cloud/compute/v1/instances/credentials.rb +52 -0
  111. data/lib/google/cloud/compute/v1/instances/rest.rb +35 -0
  112. data/lib/google/cloud/compute/v1/instances/rest/client.rb +3201 -0
  113. data/lib/google/cloud/compute/v1/instances/rest/grpc_transcoding.rb +549 -0
  114. data/lib/google/cloud/compute/v1/interconnect_attachments.rb +44 -0
  115. data/lib/google/cloud/compute/v1/interconnect_attachments/credentials.rb +52 -0
  116. data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +35 -0
  117. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +673 -0
  118. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/grpc_transcoding.rb +118 -0
  119. data/lib/google/cloud/compute/v1/interconnect_locations.rb +44 -0
  120. data/lib/google/cloud/compute/v1/interconnect_locations/credentials.rb +53 -0
  121. data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +35 -0
  122. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +361 -0
  123. data/lib/google/cloud/compute/v1/interconnect_locations/rest/grpc_transcoding.rb +63 -0
  124. data/lib/google/cloud/compute/v1/interconnects.rb +44 -0
  125. data/lib/google/cloud/compute/v1/interconnects/credentials.rb +52 -0
  126. data/lib/google/cloud/compute/v1/interconnects/rest.rb +35 -0
  127. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +640 -0
  128. data/lib/google/cloud/compute/v1/interconnects/rest/grpc_transcoding.rb +112 -0
  129. data/lib/google/cloud/compute/v1/license_codes.rb +44 -0
  130. data/lib/google/cloud/compute/v1/license_codes/credentials.rb +53 -0
  131. data/lib/google/cloud/compute/v1/license_codes/rest.rb +35 -0
  132. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +345 -0
  133. data/lib/google/cloud/compute/v1/license_codes/rest/grpc_transcoding.rb +58 -0
  134. data/lib/google/cloud/compute/v1/licenses.rb +44 -0
  135. data/lib/google/cloud/compute/v1/licenses/credentials.rb +52 -0
  136. data/lib/google/cloud/compute/v1/licenses/rest.rb +35 -0
  137. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +704 -0
  138. data/lib/google/cloud/compute/v1/licenses/rest/grpc_transcoding.rb +125 -0
  139. data/lib/google/cloud/compute/v1/machine_types.rb +44 -0
  140. data/lib/google/cloud/compute/v1/machine_types/credentials.rb +53 -0
  141. data/lib/google/cloud/compute/v1/machine_types/rest.rb +35 -0
  142. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +450 -0
  143. data/lib/google/cloud/compute/v1/machine_types/rest/grpc_transcoding.rb +81 -0
  144. data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +44 -0
  145. data/lib/google/cloud/compute/v1/network_endpoint_groups/credentials.rb +52 -0
  146. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +35 -0
  147. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +904 -0
  148. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/grpc_transcoding.rb +154 -0
  149. data/lib/google/cloud/compute/v1/networks.rb +44 -0
  150. data/lib/google/cloud/compute/v1/networks/credentials.rb +52 -0
  151. data/lib/google/cloud/compute/v1/networks/rest.rb +35 -0
  152. data/lib/google/cloud/compute/v1/networks/rest/client.rb +957 -0
  153. data/lib/google/cloud/compute/v1/networks/rest/grpc_transcoding.rb +169 -0
  154. data/lib/google/cloud/compute/v1/node_groups.rb +44 -0
  155. data/lib/google/cloud/compute/v1/node_groups/credentials.rb +52 -0
  156. data/lib/google/cloud/compute/v1/node_groups/rest.rb +35 -0
  157. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +1192 -0
  158. data/lib/google/cloud/compute/v1/node_groups/rest/grpc_transcoding.rb +208 -0
  159. data/lib/google/cloud/compute/v1/node_templates.rb +44 -0
  160. data/lib/google/cloud/compute/v1/node_templates/credentials.rb +52 -0
  161. data/lib/google/cloud/compute/v1/node_templates/rest.rb +35 -0
  162. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +803 -0
  163. data/lib/google/cloud/compute/v1/node_templates/rest/grpc_transcoding.rb +143 -0
  164. data/lib/google/cloud/compute/v1/node_types.rb +44 -0
  165. data/lib/google/cloud/compute/v1/node_types/credentials.rb +53 -0
  166. data/lib/google/cloud/compute/v1/node_types/rest.rb +35 -0
  167. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +450 -0
  168. data/lib/google/cloud/compute/v1/node_types/rest/grpc_transcoding.rb +81 -0
  169. data/lib/google/cloud/compute/v1/packet_mirrorings.rb +44 -0
  170. data/lib/google/cloud/compute/v1/packet_mirrorings/credentials.rb +52 -0
  171. data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +35 -0
  172. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +740 -0
  173. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/grpc_transcoding.rb +130 -0
  174. data/lib/google/cloud/compute/v1/projects.rb +44 -0
  175. data/lib/google/cloud/compute/v1/projects/credentials.rb +52 -0
  176. data/lib/google/cloud/compute/v1/projects/rest.rb +35 -0
  177. data/lib/google/cloud/compute/v1/projects/rest/client.rb +1141 -0
  178. data/lib/google/cloud/compute/v1/projects/rest/grpc_transcoding.rb +197 -0
  179. data/lib/google/cloud/compute/v1/region_autoscalers.rb +44 -0
  180. data/lib/google/cloud/compute/v1/region_autoscalers/credentials.rb +52 -0
  181. data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +35 -0
  182. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +661 -0
  183. data/lib/google/cloud/compute/v1/region_autoscalers/rest/grpc_transcoding.rb +112 -0
  184. data/lib/google/cloud/compute/v1/region_backend_services.rb +44 -0
  185. data/lib/google/cloud/compute/v1/region_backend_services/credentials.rb +52 -0
  186. data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +35 -0
  187. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +729 -0
  188. data/lib/google/cloud/compute/v1/region_backend_services/rest/grpc_transcoding.rb +124 -0
  189. data/lib/google/cloud/compute/v1/region_commitments.rb +44 -0
  190. data/lib/google/cloud/compute/v1/region_commitments/credentials.rb +52 -0
  191. data/lib/google/cloud/compute/v1/region_commitments/rest.rb +35 -0
  192. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +523 -0
  193. data/lib/google/cloud/compute/v1/region_commitments/rest/grpc_transcoding.rb +93 -0
  194. data/lib/google/cloud/compute/v1/region_disk_types.rb +44 -0
  195. data/lib/google/cloud/compute/v1/region_disk_types/credentials.rb +53 -0
  196. data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +35 -0
  197. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +365 -0
  198. data/lib/google/cloud/compute/v1/region_disk_types/rest/grpc_transcoding.rb +63 -0
  199. data/lib/google/cloud/compute/v1/region_disks.rb +44 -0
  200. data/lib/google/cloud/compute/v1/region_disks/credentials.rb +52 -0
  201. data/lib/google/cloud/compute/v1/region_disks/rest.rb +35 -0
  202. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1095 -0
  203. data/lib/google/cloud/compute/v1/region_disks/rest/grpc_transcoding.rb +185 -0
  204. data/lib/google/cloud/compute/v1/region_health_check_services.rb +44 -0
  205. data/lib/google/cloud/compute/v1/region_health_check_services/credentials.rb +52 -0
  206. data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +35 -0
  207. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +586 -0
  208. data/lib/google/cloud/compute/v1/region_health_check_services/rest/grpc_transcoding.rb +100 -0
  209. data/lib/google/cloud/compute/v1/region_health_checks.rb +44 -0
  210. data/lib/google/cloud/compute/v1/region_health_checks/credentials.rb +52 -0
  211. data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +35 -0
  212. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +661 -0
  213. data/lib/google/cloud/compute/v1/region_health_checks/rest/grpc_transcoding.rb +112 -0
  214. data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +44 -0
  215. data/lib/google/cloud/compute/v1/region_instance_group_managers/credentials.rb +52 -0
  216. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +35 -0
  217. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +1678 -0
  218. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/grpc_transcoding.rb +285 -0
  219. data/lib/google/cloud/compute/v1/region_instance_groups.rb +44 -0
  220. data/lib/google/cloud/compute/v1/region_instance_groups/credentials.rb +52 -0
  221. data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +35 -0
  222. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +529 -0
  223. data/lib/google/cloud/compute/v1/region_instance_groups/rest/grpc_transcoding.rb +87 -0
  224. data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +44 -0
  225. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/credentials.rb +52 -0
  226. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +35 -0
  227. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +511 -0
  228. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/grpc_transcoding.rb +88 -0
  229. data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +44 -0
  230. data/lib/google/cloud/compute/v1/region_notification_endpoints/credentials.rb +52 -0
  231. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +35 -0
  232. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +511 -0
  233. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/grpc_transcoding.rb +88 -0
  234. data/lib/google/cloud/compute/v1/region_operations.rb +44 -0
  235. data/lib/google/cloud/compute/v1/region_operations/credentials.rb +52 -0
  236. data/lib/google/cloud/compute/v1/region_operations/rest.rb +35 -0
  237. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +501 -0
  238. data/lib/google/cloud/compute/v1/region_operations/rest/grpc_transcoding.rb +87 -0
  239. data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +44 -0
  240. data/lib/google/cloud/compute/v1/region_ssl_certificates/credentials.rb +52 -0
  241. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +35 -0
  242. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +511 -0
  243. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/grpc_transcoding.rb +88 -0
  244. data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +44 -0
  245. data/lib/google/cloud/compute/v1/region_target_http_proxies/credentials.rb +52 -0
  246. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +35 -0
  247. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +586 -0
  248. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/grpc_transcoding.rb +100 -0
  249. data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +44 -0
  250. data/lib/google/cloud/compute/v1/region_target_https_proxies/credentials.rb +52 -0
  251. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +35 -0
  252. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +661 -0
  253. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/grpc_transcoding.rb +112 -0
  254. data/lib/google/cloud/compute/v1/region_url_maps.rb +44 -0
  255. data/lib/google/cloud/compute/v1/region_url_maps/credentials.rb +52 -0
  256. data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +35 -0
  257. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +714 -0
  258. data/lib/google/cloud/compute/v1/region_url_maps/rest/grpc_transcoding.rb +124 -0
  259. data/lib/google/cloud/compute/v1/regions.rb +44 -0
  260. data/lib/google/cloud/compute/v1/regions/credentials.rb +53 -0
  261. data/lib/google/cloud/compute/v1/regions/rest.rb +35 -0
  262. data/lib/google/cloud/compute/v1/regions/rest/client.rb +361 -0
  263. data/lib/google/cloud/compute/v1/regions/rest/grpc_transcoding.rb +63 -0
  264. data/lib/google/cloud/compute/v1/reservations.rb +44 -0
  265. data/lib/google/cloud/compute/v1/reservations/credentials.rb +52 -0
  266. data/lib/google/cloud/compute/v1/reservations/rest.rb +35 -0
  267. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +878 -0
  268. data/lib/google/cloud/compute/v1/reservations/rest/grpc_transcoding.rb +155 -0
  269. data/lib/google/cloud/compute/v1/resource_policies.rb +44 -0
  270. data/lib/google/cloud/compute/v1/resource_policies/credentials.rb +52 -0
  271. data/lib/google/cloud/compute/v1/resource_policies/rest.rb +35 -0
  272. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +803 -0
  273. data/lib/google/cloud/compute/v1/resource_policies/rest/grpc_transcoding.rb +143 -0
  274. data/lib/google/cloud/compute/v1/routers.rb +44 -0
  275. data/lib/google/cloud/compute/v1/routers/credentials.rb +52 -0
  276. data/lib/google/cloud/compute/v1/routers/rest.rb +35 -0
  277. data/lib/google/cloud/compute/v1/routers/rest/client.rb +968 -0
  278. data/lib/google/cloud/compute/v1/routers/rest/grpc_transcoding.rb +171 -0
  279. data/lib/google/cloud/compute/v1/routes.rb +44 -0
  280. data/lib/google/cloud/compute/v1/routes/credentials.rb +52 -0
  281. data/lib/google/cloud/compute/v1/routes/rest.rb +35 -0
  282. data/lib/google/cloud/compute/v1/routes/rest/client.rb +503 -0
  283. data/lib/google/cloud/compute/v1/routes/rest/grpc_transcoding.rb +88 -0
  284. data/lib/google/cloud/compute/v1/security_policies.rb +44 -0
  285. data/lib/google/cloud/compute/v1/security_policies/credentials.rb +52 -0
  286. data/lib/google/cloud/compute/v1/security_policies/rest.rb +35 -0
  287. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +929 -0
  288. data/lib/google/cloud/compute/v1/security_policies/rest/grpc_transcoding.rb +167 -0
  289. data/lib/google/cloud/compute/v1/snapshots.rb +44 -0
  290. data/lib/google/cloud/compute/v1/snapshots/credentials.rb +52 -0
  291. data/lib/google/cloud/compute/v1/snapshots/rest.rb +35 -0
  292. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +702 -0
  293. data/lib/google/cloud/compute/v1/snapshots/rest/grpc_transcoding.rb +125 -0
  294. data/lib/google/cloud/compute/v1/ssl_certificates.rb +44 -0
  295. data/lib/google/cloud/compute/v1/ssl_certificates/credentials.rb +52 -0
  296. data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +35 -0
  297. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +588 -0
  298. data/lib/google/cloud/compute/v1/ssl_certificates/rest/grpc_transcoding.rb +106 -0
  299. data/lib/google/cloud/compute/v1/ssl_policies.rb +44 -0
  300. data/lib/google/cloud/compute/v1/ssl_policies/credentials.rb +52 -0
  301. data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +35 -0
  302. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +659 -0
  303. data/lib/google/cloud/compute/v1/ssl_policies/rest/grpc_transcoding.rb +117 -0
  304. data/lib/google/cloud/compute/v1/subnetworks.rb +44 -0
  305. data/lib/google/cloud/compute/v1/subnetworks/credentials.rb +52 -0
  306. data/lib/google/cloud/compute/v1/subnetworks/rest.rb +35 -0
  307. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +1113 -0
  308. data/lib/google/cloud/compute/v1/subnetworks/rest/grpc_transcoding.rb +196 -0
  309. data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +44 -0
  310. data/lib/google/cloud/compute/v1/target_grpc_proxies/credentials.rb +52 -0
  311. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +35 -0
  312. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +576 -0
  313. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/grpc_transcoding.rb +100 -0
  314. data/lib/google/cloud/compute/v1/target_http_proxies.rb +44 -0
  315. data/lib/google/cloud/compute/v1/target_http_proxies/credentials.rb +52 -0
  316. data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +35 -0
  317. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +734 -0
  318. data/lib/google/cloud/compute/v1/target_http_proxies/rest/grpc_transcoding.rb +130 -0
  319. data/lib/google/cloud/compute/v1/target_https_proxies.rb +44 -0
  320. data/lib/google/cloud/compute/v1/target_https_proxies/credentials.rb +52 -0
  321. data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +35 -0
  322. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +880 -0
  323. data/lib/google/cloud/compute/v1/target_https_proxies/rest/grpc_transcoding.rb +154 -0
  324. data/lib/google/cloud/compute/v1/target_instances.rb +44 -0
  325. data/lib/google/cloud/compute/v1/target_instances/credentials.rb +52 -0
  326. data/lib/google/cloud/compute/v1/target_instances/rest.rb +35 -0
  327. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +596 -0
  328. data/lib/google/cloud/compute/v1/target_instances/rest/grpc_transcoding.rb +106 -0
  329. data/lib/google/cloud/compute/v1/target_pools.rb +44 -0
  330. data/lib/google/cloud/compute/v1/target_pools/credentials.rb +52 -0
  331. data/lib/google/cloud/compute/v1/target_pools/rest.rb +35 -0
  332. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +1042 -0
  333. data/lib/google/cloud/compute/v1/target_pools/rest/grpc_transcoding.rb +178 -0
  334. data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +44 -0
  335. data/lib/google/cloud/compute/v1/target_ssl_proxies/credentials.rb +52 -0
  336. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +35 -0
  337. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +795 -0
  338. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/grpc_transcoding.rb +136 -0
  339. data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +44 -0
  340. data/lib/google/cloud/compute/v1/target_tcp_proxies/credentials.rb +52 -0
  341. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +35 -0
  342. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +649 -0
  343. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/grpc_transcoding.rb +112 -0
  344. data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +44 -0
  345. data/lib/google/cloud/compute/v1/target_vpn_gateways/credentials.rb +52 -0
  346. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +35 -0
  347. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +596 -0
  348. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/grpc_transcoding.rb +106 -0
  349. data/lib/google/cloud/compute/v1/url_maps.rb +44 -0
  350. data/lib/google/cloud/compute/v1/url_maps/credentials.rb +52 -0
  351. data/lib/google/cloud/compute/v1/url_maps/rest.rb +35 -0
  352. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +876 -0
  353. data/lib/google/cloud/compute/v1/url_maps/rest/grpc_transcoding.rb +154 -0
  354. data/lib/google/cloud/compute/v1/version.rb +28 -0
  355. data/lib/google/cloud/compute/v1/vpn_gateways.rb +44 -0
  356. data/lib/google/cloud/compute/v1/vpn_gateways/credentials.rb +52 -0
  357. data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +35 -0
  358. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +806 -0
  359. data/lib/google/cloud/compute/v1/vpn_gateways/rest/grpc_transcoding.rb +142 -0
  360. data/lib/google/cloud/compute/v1/vpn_tunnels.rb +44 -0
  361. data/lib/google/cloud/compute/v1/vpn_tunnels/credentials.rb +52 -0
  362. data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +35 -0
  363. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +596 -0
  364. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/grpc_transcoding.rb +106 -0
  365. data/lib/google/cloud/compute/v1/zone_operations.rb +44 -0
  366. data/lib/google/cloud/compute/v1/zone_operations/credentials.rb +52 -0
  367. data/lib/google/cloud/compute/v1/zone_operations/rest.rb +35 -0
  368. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +501 -0
  369. data/lib/google/cloud/compute/v1/zone_operations/rest/grpc_transcoding.rb +87 -0
  370. data/lib/google/cloud/compute/v1/zones.rb +44 -0
  371. data/lib/google/cloud/compute/v1/zones/credentials.rb +53 -0
  372. data/lib/google/cloud/compute/v1/zones/rest.rb +35 -0
  373. data/lib/google/cloud/compute/v1/zones/rest/client.rb +361 -0
  374. data/lib/google/cloud/compute/v1/zones/rest/grpc_transcoding.rb +63 -0
  375. data/proto_docs/README.md +4 -0
  376. data/proto_docs/google/api/field_behavior.rb +65 -0
  377. data/proto_docs/google/api/resource.rb +283 -0
  378. data/proto_docs/google/cloud/compute/v1/compute.rb +27425 -0
  379. metadata +568 -0
@@ -0,0 +1,303 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Compute
23
+ module V1
24
+ module InstanceGroupManagers
25
+ module Rest
26
+ # GRPC transcoding helper methods for the InstanceGroupManagers REST API.
27
+ module GrpcTranscoding
28
+ # @param request_pb [::Google::Cloud::Compute::V1::AbandonInstancesInstanceGroupManagerRequest]
29
+ # A request object representing the call parameters. Required.
30
+ # @return [Array(String, [String, nil], Hash{String => String})]
31
+ # Uri, Body, Query string parameters
32
+ def transcode_abandon_instances request_pb
33
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/abandonInstances"
34
+ body = request_pb.instance_group_managers_abandon_instances_request_resource.to_json
35
+ query_string_params = {}
36
+
37
+ [uri, body, query_string_params]
38
+ end
39
+
40
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListInstanceGroupManagersRequest]
41
+ # A request object representing the call parameters. Required.
42
+ # @return [Array(String, [String, nil], Hash{String => String})]
43
+ # Uri, Body, Query string parameters
44
+ def transcode_aggregated_list request_pb
45
+ uri = "/compute/v1/projects/#{request_pb.project}/aggregated/instanceGroupManagers"
46
+ body = nil
47
+ query_string_params = {}
48
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
49
+ query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
50
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
51
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
52
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
53
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
54
+
55
+ [uri, body, query_string_params]
56
+ end
57
+
58
+ # @param request_pb [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesInstanceGroupManagerRequest]
59
+ # A request object representing the call parameters. Required.
60
+ # @return [Array(String, [String, nil], Hash{String => String})]
61
+ # Uri, Body, Query string parameters
62
+ def transcode_apply_updates_to_instances request_pb
63
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/applyUpdatesToInstances"
64
+ body = request_pb.instance_group_managers_apply_updates_request_resource.to_json
65
+ query_string_params = {}
66
+
67
+ [uri, body, query_string_params]
68
+ end
69
+
70
+ # @param request_pb [::Google::Cloud::Compute::V1::CreateInstancesInstanceGroupManagerRequest]
71
+ # A request object representing the call parameters. Required.
72
+ # @return [Array(String, [String, nil], Hash{String => String})]
73
+ # Uri, Body, Query string parameters
74
+ def transcode_create_instances request_pb
75
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/createInstances"
76
+ body = request_pb.instance_group_managers_create_instances_request_resource.to_json
77
+ query_string_params = {}
78
+
79
+ [uri, body, query_string_params]
80
+ end
81
+
82
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerRequest]
83
+ # A request object representing the call parameters. Required.
84
+ # @return [Array(String, [String, nil], Hash{String => String})]
85
+ # Uri, Body, Query string parameters
86
+ def transcode_delete request_pb
87
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}"
88
+ body = nil
89
+ query_string_params = {}
90
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
91
+
92
+ [uri, body, query_string_params]
93
+ end
94
+
95
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstancesInstanceGroupManagerRequest]
96
+ # A request object representing the call parameters. Required.
97
+ # @return [Array(String, [String, nil], Hash{String => String})]
98
+ # Uri, Body, Query string parameters
99
+ def transcode_delete_instances request_pb
100
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/deleteInstances"
101
+ body = request_pb.instance_group_managers_delete_instances_request_resource.to_json
102
+ query_string_params = {}
103
+
104
+ [uri, body, query_string_params]
105
+ end
106
+
107
+ # @param request_pb [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsInstanceGroupManagerRequest]
108
+ # A request object representing the call parameters. Required.
109
+ # @return [Array(String, [String, nil], Hash{String => String})]
110
+ # Uri, Body, Query string parameters
111
+ def transcode_delete_per_instance_configs request_pb
112
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/deletePerInstanceConfigs"
113
+ body = request_pb.instance_group_managers_delete_per_instance_configs_req_resource.to_json
114
+ query_string_params = {}
115
+
116
+ [uri, body, query_string_params]
117
+ end
118
+
119
+ # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceGroupManagerRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @return [Array(String, [String, nil], Hash{String => String})]
122
+ # Uri, Body, Query string parameters
123
+ def transcode_get request_pb
124
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}"
125
+ body = nil
126
+ query_string_params = {}
127
+
128
+ [uri, body, query_string_params]
129
+ end
130
+
131
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceGroupManagerRequest]
132
+ # A request object representing the call parameters. Required.
133
+ # @return [Array(String, [String, nil], Hash{String => String})]
134
+ # Uri, Body, Query string parameters
135
+ def transcode_insert request_pb
136
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers"
137
+ body = request_pb.instance_group_manager_resource.to_json
138
+ query_string_params = {}
139
+
140
+ [uri, body, query_string_params]
141
+ end
142
+
143
+ # @param request_pb [::Google::Cloud::Compute::V1::ListInstanceGroupManagersRequest]
144
+ # A request object representing the call parameters. Required.
145
+ # @return [Array(String, [String, nil], Hash{String => String})]
146
+ # Uri, Body, Query string parameters
147
+ def transcode_list request_pb
148
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers"
149
+ body = nil
150
+ query_string_params = {}
151
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
152
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
153
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
154
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
155
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
156
+
157
+ [uri, body, query_string_params]
158
+ end
159
+
160
+ # @param request_pb [::Google::Cloud::Compute::V1::ListErrorsInstanceGroupManagersRequest]
161
+ # A request object representing the call parameters. Required.
162
+ # @return [Array(String, [String, nil], Hash{String => String})]
163
+ # Uri, Body, Query string parameters
164
+ def transcode_list_errors request_pb
165
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/listErrors"
166
+ body = nil
167
+ query_string_params = {}
168
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
169
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
170
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
171
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
172
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
173
+
174
+ [uri, body, query_string_params]
175
+ end
176
+
177
+ # @param request_pb [::Google::Cloud::Compute::V1::ListManagedInstancesInstanceGroupManagersRequest]
178
+ # A request object representing the call parameters. Required.
179
+ # @return [Array(String, [String, nil], Hash{String => String})]
180
+ # Uri, Body, Query string parameters
181
+ def transcode_list_managed_instances request_pb
182
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/listManagedInstances"
183
+ body = nil
184
+ query_string_params = {}
185
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
186
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
187
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
188
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
189
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
190
+
191
+ [uri, body, query_string_params]
192
+ end
193
+
194
+ # @param request_pb [::Google::Cloud::Compute::V1::ListPerInstanceConfigsInstanceGroupManagersRequest]
195
+ # A request object representing the call parameters. Required.
196
+ # @return [Array(String, [String, nil], Hash{String => String})]
197
+ # Uri, Body, Query string parameters
198
+ def transcode_list_per_instance_configs request_pb
199
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/listPerInstanceConfigs"
200
+ body = nil
201
+ query_string_params = {}
202
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
203
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
204
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
205
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
206
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
207
+
208
+ [uri, body, query_string_params]
209
+ end
210
+
211
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchInstanceGroupManagerRequest]
212
+ # A request object representing the call parameters. Required.
213
+ # @return [Array(String, [String, nil], Hash{String => String})]
214
+ # Uri, Body, Query string parameters
215
+ def transcode_patch request_pb
216
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}"
217
+ body = request_pb.instance_group_manager_resource.to_json
218
+ query_string_params = {}
219
+
220
+ [uri, body, query_string_params]
221
+ end
222
+
223
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsInstanceGroupManagerRequest]
224
+ # A request object representing the call parameters. Required.
225
+ # @return [Array(String, [String, nil], Hash{String => String})]
226
+ # Uri, Body, Query string parameters
227
+ def transcode_patch_per_instance_configs request_pb
228
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/patchPerInstanceConfigs"
229
+ body = request_pb.instance_group_managers_patch_per_instance_configs_req_resource.to_json
230
+ query_string_params = {}
231
+
232
+ [uri, body, query_string_params]
233
+ end
234
+
235
+ # @param request_pb [::Google::Cloud::Compute::V1::RecreateInstancesInstanceGroupManagerRequest]
236
+ # A request object representing the call parameters. Required.
237
+ # @return [Array(String, [String, nil], Hash{String => String})]
238
+ # Uri, Body, Query string parameters
239
+ def transcode_recreate_instances request_pb
240
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/recreateInstances"
241
+ body = request_pb.instance_group_managers_recreate_instances_request_resource.to_json
242
+ query_string_params = {}
243
+
244
+ [uri, body, query_string_params]
245
+ end
246
+
247
+ # @param request_pb [::Google::Cloud::Compute::V1::ResizeInstanceGroupManagerRequest]
248
+ # A request object representing the call parameters. Required.
249
+ # @return [Array(String, [String, nil], Hash{String => String})]
250
+ # Uri, Body, Query string parameters
251
+ def transcode_resize request_pb
252
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/resize"
253
+ body = nil
254
+ query_string_params = {}
255
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
256
+ query_string_params["size"] = request_pb.size.to_s
257
+
258
+ [uri, body, query_string_params]
259
+ end
260
+
261
+ # @param request_pb [::Google::Cloud::Compute::V1::SetInstanceTemplateInstanceGroupManagerRequest]
262
+ # A request object representing the call parameters. Required.
263
+ # @return [Array(String, [String, nil], Hash{String => String})]
264
+ # Uri, Body, Query string parameters
265
+ def transcode_set_instance_template request_pb
266
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/setInstanceTemplate"
267
+ body = request_pb.instance_group_managers_set_instance_template_request_resource.to_json
268
+ query_string_params = {}
269
+
270
+ [uri, body, query_string_params]
271
+ end
272
+
273
+ # @param request_pb [::Google::Cloud::Compute::V1::SetTargetPoolsInstanceGroupManagerRequest]
274
+ # A request object representing the call parameters. Required.
275
+ # @return [Array(String, [String, nil], Hash{String => String})]
276
+ # Uri, Body, Query string parameters
277
+ def transcode_set_target_pools request_pb
278
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/setTargetPools"
279
+ body = request_pb.instance_group_managers_set_target_pools_request_resource.to_json
280
+ query_string_params = {}
281
+
282
+ [uri, body, query_string_params]
283
+ end
284
+
285
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsInstanceGroupManagerRequest]
286
+ # A request object representing the call parameters. Required.
287
+ # @return [Array(String, [String, nil], Hash{String => String})]
288
+ # Uri, Body, Query string parameters
289
+ def transcode_update_per_instance_configs request_pb
290
+ uri = "/compute/v1/projects/#{request_pb.project}/zones/#{request_pb.zone}/instanceGroupManagers/#{request_pb.instance_group_manager}/updatePerInstanceConfigs"
291
+ body = request_pb.instance_group_managers_update_per_instance_configs_req_resource.to_json
292
+ query_string_params = {}
293
+
294
+ [uri, body, query_string_params]
295
+ end
296
+ extend self
297
+ end
298
+ end
299
+ end
300
+ end
301
+ end
302
+ end
303
+ end
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/config"
20
+ require "gapic/config/method"
21
+
22
+ require "google/cloud/compute/v1/version"
23
+
24
+ require "google/cloud/compute/v1/instance_groups/credentials"
25
+ require "google/cloud/compute/v1/instance_groups/rest"
26
+
27
+ module Google
28
+ module Cloud
29
+ module Compute
30
+ module V1
31
+ # To load this service and instantiate a REST client:
32
+ #
33
+ # require "google/cloud/compute/v1/instance_groups"
34
+ # client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new
35
+ #
36
+ module InstanceGroups
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ helper_path = ::File.join __dir__, "instance_groups", "helpers.rb"
44
+ require "google/cloud/compute/v1/instance_groups/helpers" if ::File.file? helper_path
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module InstanceGroups
26
+ # Credentials for the InstanceGroups API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/compute",
30
+ "https://www.googleapis.com/auth/cloud-platform"
31
+ ]
32
+ self.env_vars = [
33
+ "COMPUTE_CREDENTIALS",
34
+ "COMPUTE_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS",
36
+ "GOOGLE_CLOUD_KEYFILE",
37
+ "GCLOUD_KEYFILE",
38
+ "COMPUTE_CREDENTIALS_JSON",
39
+ "COMPUTE_KEYFILE_JSON",
40
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
41
+ "GOOGLE_CLOUD_KEYFILE_JSON",
42
+ "GCLOUD_KEYFILE_JSON"
43
+ ]
44
+ self.paths = [
45
+ "~/.config/google_cloud/application_default_credentials.json"
46
+ ]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "gapic/rest"
20
+ require "google/cloud/compute/v1/instance_groups/rest/grpc_transcoding"
21
+ require "google/cloud/compute/v1/instance_groups/rest/client"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Compute
26
+ module V1
27
+ module InstanceGroups
28
+ # Client for the REST transport
29
+ module Rest
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,916 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/compute/v1/compute_pb"
21
+
22
+ module Google
23
+ module Cloud
24
+ module Compute
25
+ module V1
26
+ module InstanceGroups
27
+ module Rest
28
+ ##
29
+ # REST client for the InstanceGroups service.
30
+ #
31
+ # The InstanceGroups API.
32
+ #
33
+ class Client
34
+ include GrpcTranscoding
35
+
36
+ # @private
37
+ attr_reader :instance_groups_stub
38
+
39
+ ##
40
+ # Configure the InstanceGroups Client class.
41
+ #
42
+ # See {::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # ## Example
46
+ #
47
+ # To modify the configuration for all InstanceGroups clients:
48
+ #
49
+ # ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
52
+ #
53
+ # @yield [config] Configure the Client client.
54
+ # @yieldparam config [Client::Configuration]
55
+ #
56
+ # @return [Client::Configuration]
57
+ #
58
+ def self.configure
59
+ @configure ||= begin
60
+ namespace = ["Google", "Cloud", "Compute", "V1"]
61
+ parent_config = while namespace.any?
62
+ parent_name = namespace.join "::"
63
+ parent_const = const_get parent_name
64
+ break parent_const.configure if parent_const.respond_to? :configure
65
+ namespace.pop
66
+ end
67
+ default_config = Client::Configuration.new parent_config
68
+
69
+ default_config
70
+ end
71
+ yield @configure if block_given?
72
+ @configure
73
+ end
74
+
75
+ ##
76
+ # Configure the InstanceGroups Client instance.
77
+ #
78
+ # The configuration is set to the derived mode, meaning that values can be changed,
79
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
80
+ # should be made on {Client.configure}.
81
+ #
82
+ # See {::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client::Configuration}
83
+ # for a description of the configuration fields.
84
+ #
85
+ # @yield [config] Configure the Client client.
86
+ # @yieldparam config [Client::Configuration]
87
+ #
88
+ # @return [Client::Configuration]
89
+ #
90
+ def configure
91
+ yield @config if block_given?
92
+ @config
93
+ end
94
+
95
+ ##
96
+ # Create a new InstanceGroups REST client object.
97
+ #
98
+ # ## Examples
99
+ #
100
+ # To create a new InstanceGroups REST client with the default
101
+ # configuration:
102
+ #
103
+ # client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new
104
+ #
105
+ # To create a new InstanceGroups REST client with a custom
106
+ # configuration:
107
+ #
108
+ # client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the InstanceGroups client.
113
+ # @yieldparam config [Client::Configuration]
114
+ #
115
+ 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
+ # Create the configuration object
121
+ @config = Configuration.new Client.configure
122
+
123
+ # Yield the configuration if needed
124
+ yield @config if block_given?
125
+
126
+ # Create credentials
127
+ credentials = @config.credentials
128
+ credentials ||= Credentials.default scope: @config.scope
129
+ if credentials.is_a?(String) || credentials.is_a?(Hash)
130
+ credentials = Credentials.new credentials, scope: @config.scope
131
+ end
132
+
133
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: @config.endpoint, credentials: credentials
134
+ end
135
+
136
+ # Service calls
137
+
138
+ ##
139
+ # Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
140
+ #
141
+ # @overload add_instances(request, options = nil)
142
+ # Pass arguments to `add_instances` via a request object, either of type
143
+ # {::Google::Cloud::Compute::V1::AddInstancesInstanceGroupRequest} or an equivalent Hash.
144
+ #
145
+ # @param request [::Google::Cloud::Compute::V1::AddInstancesInstanceGroupRequest, ::Hash]
146
+ # A request object representing the call parameters. Required. To specify no
147
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
148
+ # @param options [::Gapic::CallOptions, ::Hash]
149
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
150
+ # Note: currently retry functionality is not implemented. While it is possible
151
+ # to set it using ::Gapic::CallOptions, it will not be applied
152
+ #
153
+ # @overload add_instances(instance_group: nil, instance_groups_add_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
154
+ # Pass arguments to `add_instances` via keyword arguments. Note that at
155
+ # least one keyword argument is required. To specify no parameters, or to keep all
156
+ # the default parameter values, pass an empty Hash as a request object (see above).
157
+ #
158
+ # @param instance_group [::String]
159
+ # The name of the instance group where you are adding instances.
160
+ # @param instance_groups_add_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupsAddInstancesRequest, ::Hash]
161
+ # The body resource for this request
162
+ # @param project [::String]
163
+ # Project ID for this request.
164
+ # @param request_id [::String]
165
+ # 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.
166
+ #
167
+ # 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.
168
+ #
169
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
170
+ # @param zone [::String]
171
+ # The name of the zone where the instance group is located.
172
+ # @yield [result, env] Access the result along with the Faraday environment object
173
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
174
+ # @yieldparam response [::Faraday::Response]
175
+ #
176
+ # @return [::Google::Cloud::Compute::V1::Operation]
177
+ #
178
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
179
+ def add_instances request, options = nil
180
+ raise ::ArgumentError, "request must be provided" if request.nil?
181
+
182
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AddInstancesInstanceGroupRequest
183
+
184
+ # Converts hash and nil to an options object
185
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
186
+
187
+ # Customize the options with defaults
188
+ call_metadata = {}
189
+
190
+ # Set x-goog-api-client header
191
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
192
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
193
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
194
+
195
+ options.apply_defaults timeout: @config.timeout,
196
+ metadata: call_metadata
197
+
198
+ uri, body, _query_string_params = transcode_add_instances request
199
+ response = @client_stub.make_post_request(
200
+ uri: uri,
201
+ body: body,
202
+ options: options
203
+ )
204
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
205
+
206
+ yield result, response if block_given?
207
+ result
208
+ rescue ::Faraday::Error => e
209
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
210
+ raise ::Google::Cloud::Error.from_error(gapic_error)
211
+ end
212
+
213
+ ##
214
+ # Retrieves the list of instance groups and sorts them by zone.
215
+ #
216
+ # @overload aggregated_list(request, options = nil)
217
+ # Pass arguments to `aggregated_list` via a request object, either of type
218
+ # {::Google::Cloud::Compute::V1::AggregatedListInstanceGroupsRequest} or an equivalent Hash.
219
+ #
220
+ # @param request [::Google::Cloud::Compute::V1::AggregatedListInstanceGroupsRequest, ::Hash]
221
+ # A request object representing the call parameters. Required. To specify no
222
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
223
+ # @param options [::Gapic::CallOptions, ::Hash]
224
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
225
+ # Note: currently retry functionality is not implemented. While it is possible
226
+ # to set it using ::Gapic::CallOptions, it will not be applied
227
+ #
228
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
229
+ # Pass arguments to `aggregated_list` via keyword arguments. Note that at
230
+ # least one keyword argument is required. To specify no parameters, or to keep all
231
+ # the default parameter values, pass an empty Hash as a request object (see above).
232
+ #
233
+ # @param filter [::String]
234
+ # 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 `<`.
235
+ #
236
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
237
+ #
238
+ # 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.
239
+ #
240
+ # 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) ```
241
+ # @param include_all_scopes [::Boolean]
242
+ # 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.
243
+ # @param max_results [::Integer]
244
+ # 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`)
245
+ # @param order_by [::String]
246
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
247
+ #
248
+ # 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.
249
+ #
250
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
251
+ # @param page_token [::String]
252
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
253
+ # @param project [::String]
254
+ # Project ID for this request.
255
+ # @param return_partial_success [::Boolean]
256
+ # 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.
257
+ # @yield [result, env] Access the result along with the Faraday environment object
258
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupAggregatedList]
259
+ # @yieldparam response [::Faraday::Response]
260
+ #
261
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupAggregatedList]
262
+ #
263
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
264
+ def aggregated_list request, options = nil
265
+ raise ::ArgumentError, "request must be provided" if request.nil?
266
+
267
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListInstanceGroupsRequest
268
+
269
+ # Converts hash and nil to an options object
270
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
271
+
272
+ # Customize the options with defaults
273
+ call_metadata = {}
274
+
275
+ # Set x-goog-api-client header
276
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
277
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
278
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
279
+
280
+ options.apply_defaults timeout: @config.timeout,
281
+ metadata: call_metadata
282
+
283
+ uri, _body, query_string_params = transcode_aggregated_list request
284
+ response = @client_stub.make_get_request(
285
+ uri: uri,
286
+ params: query_string_params,
287
+ options: options
288
+ )
289
+ result = ::Google::Cloud::Compute::V1::InstanceGroupAggregatedList.decode_json response.body, ignore_unknown_fields: true
290
+
291
+ yield result, response if block_given?
292
+ result
293
+ rescue ::Faraday::Error => e
294
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
295
+ raise ::Google::Cloud::Error.from_error(gapic_error)
296
+ end
297
+
298
+ ##
299
+ # Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
300
+ #
301
+ # @overload delete(request, options = nil)
302
+ # Pass arguments to `delete` via a request object, either of type
303
+ # {::Google::Cloud::Compute::V1::DeleteInstanceGroupRequest} or an equivalent Hash.
304
+ #
305
+ # @param request [::Google::Cloud::Compute::V1::DeleteInstanceGroupRequest, ::Hash]
306
+ # A request object representing the call parameters. Required. To specify no
307
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
308
+ # @param options [::Gapic::CallOptions, ::Hash]
309
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
310
+ # Note: currently retry functionality is not implemented. While it is possible
311
+ # to set it using ::Gapic::CallOptions, it will not be applied
312
+ #
313
+ # @overload delete(instance_group: nil, project: nil, request_id: nil, zone: nil)
314
+ # Pass arguments to `delete` via keyword arguments. Note that at
315
+ # least one keyword argument is required. To specify no parameters, or to keep all
316
+ # the default parameter values, pass an empty Hash as a request object (see above).
317
+ #
318
+ # @param instance_group [::String]
319
+ # The name of the instance group to delete.
320
+ # @param project [::String]
321
+ # Project ID for this request.
322
+ # @param request_id [::String]
323
+ # 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.
324
+ #
325
+ # 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.
326
+ #
327
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
328
+ # @param zone [::String]
329
+ # The name of the zone where the instance group is located.
330
+ # @yield [result, env] Access the result along with the Faraday environment object
331
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
332
+ # @yieldparam response [::Faraday::Response]
333
+ #
334
+ # @return [::Google::Cloud::Compute::V1::Operation]
335
+ #
336
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
337
+ def delete request, options = nil
338
+ raise ::ArgumentError, "request must be provided" if request.nil?
339
+
340
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInstanceGroupRequest
341
+
342
+ # Converts hash and nil to an options object
343
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
344
+
345
+ # Customize the options with defaults
346
+ call_metadata = {}
347
+
348
+ # Set x-goog-api-client header
349
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
350
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
351
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
352
+
353
+ options.apply_defaults timeout: @config.timeout,
354
+ metadata: call_metadata
355
+
356
+ uri, _body, query_string_params = transcode_delete request
357
+ response = @client_stub.make_delete_request(
358
+ uri: uri,
359
+ params: query_string_params,
360
+ options: options
361
+ )
362
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
363
+
364
+ yield result, response if block_given?
365
+ result
366
+ rescue ::Faraday::Error => e
367
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
368
+ raise ::Google::Cloud::Error.from_error(gapic_error)
369
+ end
370
+
371
+ ##
372
+ # Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request.
373
+ #
374
+ # For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
375
+ #
376
+ # @overload get(request, options = nil)
377
+ # Pass arguments to `get` via a request object, either of type
378
+ # {::Google::Cloud::Compute::V1::GetInstanceGroupRequest} or an equivalent Hash.
379
+ #
380
+ # @param request [::Google::Cloud::Compute::V1::GetInstanceGroupRequest, ::Hash]
381
+ # A request object representing the call parameters. Required. To specify no
382
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
383
+ # @param options [::Gapic::CallOptions, ::Hash]
384
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
385
+ # Note: currently retry functionality is not implemented. While it is possible
386
+ # to set it using ::Gapic::CallOptions, it will not be applied
387
+ #
388
+ # @overload get(instance_group: nil, project: nil, zone: nil)
389
+ # Pass arguments to `get` via keyword arguments. Note that at
390
+ # least one keyword argument is required. To specify no parameters, or to keep all
391
+ # the default parameter values, pass an empty Hash as a request object (see above).
392
+ #
393
+ # @param instance_group [::String]
394
+ # The name of the instance group.
395
+ # @param project [::String]
396
+ # Project ID for this request.
397
+ # @param zone [::String]
398
+ # The name of the zone where the instance group is located.
399
+ # @yield [result, env] Access the result along with the Faraday environment object
400
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroup]
401
+ # @yieldparam response [::Faraday::Response]
402
+ #
403
+ # @return [::Google::Cloud::Compute::V1::InstanceGroup]
404
+ #
405
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
406
+ def get request, options = nil
407
+ raise ::ArgumentError, "request must be provided" if request.nil?
408
+
409
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetInstanceGroupRequest
410
+
411
+ # Converts hash and nil to an options object
412
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
413
+
414
+ # Customize the options with defaults
415
+ call_metadata = {}
416
+
417
+ # Set x-goog-api-client header
418
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
419
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
420
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
421
+
422
+ options.apply_defaults timeout: @config.timeout,
423
+ metadata: call_metadata
424
+
425
+ uri, _body, _query_string_params = transcode_get request
426
+ response = @client_stub.make_get_request(
427
+ uri: uri,
428
+ options: options
429
+ )
430
+ result = ::Google::Cloud::Compute::V1::InstanceGroup.decode_json response.body, ignore_unknown_fields: true
431
+
432
+ yield result, response if block_given?
433
+ result
434
+ rescue ::Faraday::Error => e
435
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
436
+ raise ::Google::Cloud::Error.from_error(gapic_error)
437
+ end
438
+
439
+ ##
440
+ # Creates an instance group in the specified project using the parameters that are included in the request.
441
+ #
442
+ # @overload insert(request, options = nil)
443
+ # Pass arguments to `insert` via a request object, either of type
444
+ # {::Google::Cloud::Compute::V1::InsertInstanceGroupRequest} or an equivalent Hash.
445
+ #
446
+ # @param request [::Google::Cloud::Compute::V1::InsertInstanceGroupRequest, ::Hash]
447
+ # A request object representing the call parameters. Required. To specify no
448
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
449
+ # @param options [::Gapic::CallOptions, ::Hash]
450
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
451
+ # Note: currently retry functionality is not implemented. While it is possible
452
+ # to set it using ::Gapic::CallOptions, it will not be applied
453
+ #
454
+ # @overload insert(instance_group_resource: nil, project: nil, request_id: nil, zone: nil)
455
+ # Pass arguments to `insert` via keyword arguments. Note that at
456
+ # least one keyword argument is required. To specify no parameters, or to keep all
457
+ # the default parameter values, pass an empty Hash as a request object (see above).
458
+ #
459
+ # @param instance_group_resource [::Google::Cloud::Compute::V1::InstanceGroup, ::Hash]
460
+ # The body resource for this request
461
+ # @param project [::String]
462
+ # Project ID for this request.
463
+ # @param request_id [::String]
464
+ # 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.
465
+ #
466
+ # 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.
467
+ #
468
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
469
+ # @param zone [::String]
470
+ # The name of the zone where you want to create the instance group.
471
+ # @yield [result, env] Access the result along with the Faraday environment object
472
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
473
+ # @yieldparam response [::Faraday::Response]
474
+ #
475
+ # @return [::Google::Cloud::Compute::V1::Operation]
476
+ #
477
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
478
+ def insert request, options = nil
479
+ raise ::ArgumentError, "request must be provided" if request.nil?
480
+
481
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertInstanceGroupRequest
482
+
483
+ # Converts hash and nil to an options object
484
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
485
+
486
+ # Customize the options with defaults
487
+ call_metadata = {}
488
+
489
+ # Set x-goog-api-client header
490
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
491
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
492
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
493
+
494
+ options.apply_defaults timeout: @config.timeout,
495
+ metadata: call_metadata
496
+
497
+ uri, body, _query_string_params = transcode_insert request
498
+ response = @client_stub.make_post_request(
499
+ uri: uri,
500
+ body: body,
501
+ options: options
502
+ )
503
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
504
+
505
+ yield result, response if block_given?
506
+ result
507
+ rescue ::Faraday::Error => e
508
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
509
+ raise ::Google::Cloud::Error.from_error(gapic_error)
510
+ end
511
+
512
+ ##
513
+ # Retrieves the list of zonal instance group resources contained within the specified zone.
514
+ #
515
+ # For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
516
+ #
517
+ # @overload list(request, options = nil)
518
+ # Pass arguments to `list` via a request object, either of type
519
+ # {::Google::Cloud::Compute::V1::ListInstanceGroupsRequest} or an equivalent Hash.
520
+ #
521
+ # @param request [::Google::Cloud::Compute::V1::ListInstanceGroupsRequest, ::Hash]
522
+ # A request object representing the call parameters. Required. To specify no
523
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
524
+ # @param options [::Gapic::CallOptions, ::Hash]
525
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
526
+ # Note: currently retry functionality is not implemented. While it is possible
527
+ # to set it using ::Gapic::CallOptions, it will not be applied
528
+ #
529
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
530
+ # Pass arguments to `list` via keyword arguments. Note that at
531
+ # least one keyword argument is required. To specify no parameters, or to keep all
532
+ # the default parameter values, pass an empty Hash as a request object (see above).
533
+ #
534
+ # @param filter [::String]
535
+ # 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 `<`.
536
+ #
537
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
538
+ #
539
+ # 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.
540
+ #
541
+ # 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) ```
542
+ # @param max_results [::Integer]
543
+ # 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`)
544
+ # @param order_by [::String]
545
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
546
+ #
547
+ # 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.
548
+ #
549
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
550
+ # @param page_token [::String]
551
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
552
+ # @param project [::String]
553
+ # Project ID for this request.
554
+ # @param return_partial_success [::Boolean]
555
+ # 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.
556
+ # @param zone [::String]
557
+ # The name of the zone where the instance group is located.
558
+ # @yield [result, env] Access the result along with the Faraday environment object
559
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupList]
560
+ # @yieldparam response [::Faraday::Response]
561
+ #
562
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupList]
563
+ #
564
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
565
+ def list request, options = nil
566
+ raise ::ArgumentError, "request must be provided" if request.nil?
567
+
568
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListInstanceGroupsRequest
569
+
570
+ # Converts hash and nil to an options object
571
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
572
+
573
+ # Customize the options with defaults
574
+ call_metadata = {}
575
+
576
+ # Set x-goog-api-client header
577
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
578
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
579
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
580
+
581
+ options.apply_defaults timeout: @config.timeout,
582
+ metadata: call_metadata
583
+
584
+ uri, _body, query_string_params = transcode_list request
585
+ response = @client_stub.make_get_request(
586
+ uri: uri,
587
+ params: query_string_params,
588
+ options: options
589
+ )
590
+ result = ::Google::Cloud::Compute::V1::InstanceGroupList.decode_json response.body, ignore_unknown_fields: true
591
+
592
+ yield result, response if block_given?
593
+ result
594
+ rescue ::Faraday::Error => e
595
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
596
+ raise ::Google::Cloud::Error.from_error(gapic_error)
597
+ end
598
+
599
+ ##
600
+ # Lists the instances in the specified instance group. The orderBy query parameter is not supported.
601
+ #
602
+ # @overload list_instances(request, options = nil)
603
+ # Pass arguments to `list_instances` via a request object, either of type
604
+ # {::Google::Cloud::Compute::V1::ListInstancesInstanceGroupsRequest} or an equivalent Hash.
605
+ #
606
+ # @param request [::Google::Cloud::Compute::V1::ListInstancesInstanceGroupsRequest, ::Hash]
607
+ # A request object representing the call parameters. Required. To specify no
608
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
609
+ # @param options [::Gapic::CallOptions, ::Hash]
610
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
611
+ # Note: currently retry functionality is not implemented. While it is possible
612
+ # to set it using ::Gapic::CallOptions, it will not be applied
613
+ #
614
+ # @overload list_instances(filter: nil, instance_group: nil, instance_groups_list_instances_request_resource: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
615
+ # Pass arguments to `list_instances` via keyword arguments. Note that at
616
+ # least one keyword argument is required. To specify no parameters, or to keep all
617
+ # the default parameter values, pass an empty Hash as a request object (see above).
618
+ #
619
+ # @param filter [::String]
620
+ # 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 `<`.
621
+ #
622
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
623
+ #
624
+ # 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.
625
+ #
626
+ # 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) ```
627
+ # @param instance_group [::String]
628
+ # The name of the instance group from which you want to generate a list of included instances.
629
+ # @param instance_groups_list_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupsListInstancesRequest, ::Hash]
630
+ # The body resource for this request
631
+ # @param max_results [::Integer]
632
+ # 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`)
633
+ # @param order_by [::String]
634
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
635
+ #
636
+ # 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.
637
+ #
638
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
639
+ # @param page_token [::String]
640
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
641
+ # @param project [::String]
642
+ # Project ID for this request.
643
+ # @param return_partial_success [::Boolean]
644
+ # 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.
645
+ # @param zone [::String]
646
+ # The name of the zone where the instance group is located.
647
+ # @yield [result, env] Access the result along with the Faraday environment object
648
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupsListInstances]
649
+ # @yieldparam response [::Faraday::Response]
650
+ #
651
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupsListInstances]
652
+ #
653
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
654
+ def list_instances request, options = nil
655
+ raise ::ArgumentError, "request must be provided" if request.nil?
656
+
657
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListInstancesInstanceGroupsRequest
658
+
659
+ # Converts hash and nil to an options object
660
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
661
+
662
+ # Customize the options with defaults
663
+ call_metadata = {}
664
+
665
+ # Set x-goog-api-client header
666
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
667
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
668
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
669
+
670
+ options.apply_defaults timeout: @config.timeout,
671
+ metadata: call_metadata
672
+
673
+ uri, body, _query_string_params = transcode_list_instances request
674
+ response = @client_stub.make_post_request(
675
+ uri: uri,
676
+ body: body,
677
+ options: options
678
+ )
679
+ result = ::Google::Cloud::Compute::V1::InstanceGroupsListInstances.decode_json response.body, ignore_unknown_fields: true
680
+
681
+ yield result, response if block_given?
682
+ result
683
+ rescue ::Faraday::Error => e
684
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
685
+ raise ::Google::Cloud::Error.from_error(gapic_error)
686
+ end
687
+
688
+ ##
689
+ # Removes one or more instances from the specified instance group, but does not delete those instances.
690
+ #
691
+ # If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
692
+ #
693
+ # @overload remove_instances(request, options = nil)
694
+ # Pass arguments to `remove_instances` via a request object, either of type
695
+ # {::Google::Cloud::Compute::V1::RemoveInstancesInstanceGroupRequest} or an equivalent Hash.
696
+ #
697
+ # @param request [::Google::Cloud::Compute::V1::RemoveInstancesInstanceGroupRequest, ::Hash]
698
+ # A request object representing the call parameters. Required. To specify no
699
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
700
+ # @param options [::Gapic::CallOptions, ::Hash]
701
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
702
+ # Note: currently retry functionality is not implemented. While it is possible
703
+ # to set it using ::Gapic::CallOptions, it will not be applied
704
+ #
705
+ # @overload remove_instances(instance_group: nil, instance_groups_remove_instances_request_resource: nil, project: nil, request_id: nil, zone: nil)
706
+ # Pass arguments to `remove_instances` via keyword arguments. Note that at
707
+ # least one keyword argument is required. To specify no parameters, or to keep all
708
+ # the default parameter values, pass an empty Hash as a request object (see above).
709
+ #
710
+ # @param instance_group [::String]
711
+ # The name of the instance group where the specified instances will be removed.
712
+ # @param instance_groups_remove_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupsRemoveInstancesRequest, ::Hash]
713
+ # The body resource for this request
714
+ # @param project [::String]
715
+ # Project ID for this request.
716
+ # @param request_id [::String]
717
+ # 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.
718
+ #
719
+ # 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.
720
+ #
721
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
722
+ # @param zone [::String]
723
+ # The name of the zone where the instance group is located.
724
+ # @yield [result, env] Access the result along with the Faraday environment object
725
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
726
+ # @yieldparam response [::Faraday::Response]
727
+ #
728
+ # @return [::Google::Cloud::Compute::V1::Operation]
729
+ #
730
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
731
+ def remove_instances request, options = nil
732
+ raise ::ArgumentError, "request must be provided" if request.nil?
733
+
734
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::RemoveInstancesInstanceGroupRequest
735
+
736
+ # Converts hash and nil to an options object
737
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
738
+
739
+ # Customize the options with defaults
740
+ call_metadata = {}
741
+
742
+ # Set x-goog-api-client header
743
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
744
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
745
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
746
+
747
+ options.apply_defaults timeout: @config.timeout,
748
+ metadata: call_metadata
749
+
750
+ uri, body, _query_string_params = transcode_remove_instances request
751
+ response = @client_stub.make_post_request(
752
+ uri: uri,
753
+ body: body,
754
+ options: options
755
+ )
756
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
757
+
758
+ yield result, response if block_given?
759
+ result
760
+ rescue ::Faraday::Error => e
761
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
762
+ raise ::Google::Cloud::Error.from_error(gapic_error)
763
+ end
764
+
765
+ ##
766
+ # Sets the named ports for the specified instance group.
767
+ #
768
+ # @overload set_named_ports(request, options = nil)
769
+ # Pass arguments to `set_named_ports` via a request object, either of type
770
+ # {::Google::Cloud::Compute::V1::SetNamedPortsInstanceGroupRequest} or an equivalent Hash.
771
+ #
772
+ # @param request [::Google::Cloud::Compute::V1::SetNamedPortsInstanceGroupRequest, ::Hash]
773
+ # A request object representing the call parameters. Required. To specify no
774
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
775
+ # @param options [::Gapic::CallOptions, ::Hash]
776
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
777
+ # Note: currently retry functionality is not implemented. While it is possible
778
+ # to set it using ::Gapic::CallOptions, it will not be applied
779
+ #
780
+ # @overload set_named_ports(instance_group: nil, instance_groups_set_named_ports_request_resource: nil, project: nil, request_id: nil, zone: nil)
781
+ # Pass arguments to `set_named_ports` via keyword arguments. Note that at
782
+ # least one keyword argument is required. To specify no parameters, or to keep all
783
+ # the default parameter values, pass an empty Hash as a request object (see above).
784
+ #
785
+ # @param instance_group [::String]
786
+ # The name of the instance group where the named ports are updated.
787
+ # @param instance_groups_set_named_ports_request_resource [::Google::Cloud::Compute::V1::InstanceGroupsSetNamedPortsRequest, ::Hash]
788
+ # The body resource for this request
789
+ # @param project [::String]
790
+ # Project ID for this request.
791
+ # @param request_id [::String]
792
+ # 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.
793
+ #
794
+ # 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.
795
+ #
796
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
797
+ # @param zone [::String]
798
+ # The name of the zone where the instance group is located.
799
+ # @yield [result, env] Access the result along with the Faraday environment object
800
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
801
+ # @yieldparam response [::Faraday::Response]
802
+ #
803
+ # @return [::Google::Cloud::Compute::V1::Operation]
804
+ #
805
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
806
+ def set_named_ports request, options = nil
807
+ raise ::ArgumentError, "request must be provided" if request.nil?
808
+
809
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetNamedPortsInstanceGroupRequest
810
+
811
+ # Converts hash and nil to an options object
812
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
813
+
814
+ # Customize the options with defaults
815
+ call_metadata = {}
816
+
817
+ # Set x-goog-api-client header
818
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
819
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
820
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
821
+
822
+ options.apply_defaults timeout: @config.timeout,
823
+ metadata: call_metadata
824
+
825
+ uri, body, _query_string_params = transcode_set_named_ports request
826
+ response = @client_stub.make_post_request(
827
+ uri: uri,
828
+ body: body,
829
+ options: options
830
+ )
831
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
832
+
833
+ yield result, response if block_given?
834
+ result
835
+ rescue ::Faraday::Error => e
836
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
837
+ raise ::Google::Cloud::Error.from_error(gapic_error)
838
+ end
839
+
840
+ ##
841
+ # Configuration class for the InstanceGroups REST API.
842
+ #
843
+ # This class represents the configuration for InstanceGroups REST,
844
+ # providing control over credentials, timeouts, retry behavior, logging.
845
+ #
846
+ # Configuration can be applied globally to all clients, or to a single client
847
+ # on construction.
848
+ #
849
+ # # Examples
850
+ #
851
+ # To modify the global config, setting the timeout for all calls to 10 seconds:
852
+ #
853
+ # ::Google::Cloud::Compute::V1::InstanceGroups::Client.configure do |config|
854
+ # config.timeout = 10.0
855
+ # end
856
+ #
857
+ # To apply the above configuration only to a new client:
858
+ #
859
+ # client = ::Google::Cloud::Compute::V1::InstanceGroups::Client.new do |config|
860
+ # config.timeout = 10.0
861
+ # end
862
+ #
863
+ # @!attribute [rw] endpoint
864
+ # The hostname or hostname:port of the service endpoint.
865
+ # Defaults to `"compute.googleapis.com"`.
866
+ # @return [::String]
867
+ # @!attribute [rw] credentials
868
+ # Credentials to send with calls. You may provide any of the following types:
869
+ # * (`String`) The path to a service account key file in JSON format
870
+ # * (`Hash`) A service account key as a Hash
871
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
872
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
873
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
874
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
875
+ # * (`nil`) indicating no credentials
876
+ # @return [::Object]
877
+ # @!attribute [rw] scope
878
+ # The OAuth scopes
879
+ # @return [::Array<::String>]
880
+ # @!attribute [rw] lib_name
881
+ # The library name as recorded in instrumentation and logging
882
+ # @return [::String]
883
+ # @!attribute [rw] lib_version
884
+ # The library version as recorded in instrumentation and logging
885
+ # @return [::String]
886
+ # @!attribute [rw] timeout
887
+ # The call timeout in seconds.
888
+ # @return [::Numeric]
889
+ #
890
+ class Configuration
891
+ extend ::Gapic::Config
892
+
893
+ config_attr :endpoint, "compute.googleapis.com", ::String
894
+ config_attr :credentials, nil do |value|
895
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
896
+ allowed.any? { |klass| klass === value }
897
+ end
898
+ config_attr :scope, nil, ::String, ::Array, nil
899
+ config_attr :lib_name, nil, ::String, nil
900
+ config_attr :lib_version, nil, ::String, nil
901
+ config_attr :timeout, nil, ::Numeric, nil
902
+
903
+ # @private
904
+ def initialize parent_config = nil
905
+ @parent_config = parent_config unless parent_config.nil?
906
+
907
+ yield self if block_given?
908
+ end
909
+ end
910
+ end
911
+ end
912
+ end
913
+ end
914
+ end
915
+ end
916
+ end