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,130 @@
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 PacketMirrorings
25
+ module Rest
26
+ # GRPC transcoding helper methods for the PacketMirrorings REST API.
27
+ module GrpcTranscoding
28
+ # @param request_pb [::Google::Cloud::Compute::V1::AggregatedListPacketMirroringsRequest]
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_aggregated_list request_pb
33
+ uri = "/compute/v1/projects/#{request_pb.project}/aggregated/packetMirrorings"
34
+ body = nil
35
+ query_string_params = {}
36
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
37
+ query_string_params["includeAllScopes"] = request_pb.include_all_scopes.to_s if request_pb.has_include_all_scopes?
38
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
39
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
40
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
41
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
42
+
43
+ [uri, body, query_string_params]
44
+ end
45
+
46
+ # @param request_pb [::Google::Cloud::Compute::V1::DeletePacketMirroringRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @return [Array(String, [String, nil], Hash{String => String})]
49
+ # Uri, Body, Query string parameters
50
+ def transcode_delete request_pb
51
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/packetMirrorings/#{request_pb.packet_mirroring}"
52
+ body = nil
53
+ query_string_params = {}
54
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
55
+
56
+ [uri, body, query_string_params]
57
+ end
58
+
59
+ # @param request_pb [::Google::Cloud::Compute::V1::GetPacketMirroringRequest]
60
+ # A request object representing the call parameters. Required.
61
+ # @return [Array(String, [String, nil], Hash{String => String})]
62
+ # Uri, Body, Query string parameters
63
+ def transcode_get request_pb
64
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/packetMirrorings/#{request_pb.packet_mirroring}"
65
+ body = nil
66
+ query_string_params = {}
67
+
68
+ [uri, body, query_string_params]
69
+ end
70
+
71
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertPacketMirroringRequest]
72
+ # A request object representing the call parameters. Required.
73
+ # @return [Array(String, [String, nil], Hash{String => String})]
74
+ # Uri, Body, Query string parameters
75
+ def transcode_insert request_pb
76
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/packetMirrorings"
77
+ body = request_pb.packet_mirroring_resource.to_json
78
+ query_string_params = {}
79
+
80
+ [uri, body, query_string_params]
81
+ end
82
+
83
+ # @param request_pb [::Google::Cloud::Compute::V1::ListPacketMirroringsRequest]
84
+ # A request object representing the call parameters. Required.
85
+ # @return [Array(String, [String, nil], Hash{String => String})]
86
+ # Uri, Body, Query string parameters
87
+ def transcode_list request_pb
88
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/packetMirrorings"
89
+ body = nil
90
+ query_string_params = {}
91
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
92
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
93
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
94
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
95
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
96
+
97
+ [uri, body, query_string_params]
98
+ end
99
+
100
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchPacketMirroringRequest]
101
+ # A request object representing the call parameters. Required.
102
+ # @return [Array(String, [String, nil], Hash{String => String})]
103
+ # Uri, Body, Query string parameters
104
+ def transcode_patch request_pb
105
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/packetMirrorings/#{request_pb.packet_mirroring}"
106
+ body = request_pb.packet_mirroring_resource.to_json
107
+ query_string_params = {}
108
+
109
+ [uri, body, query_string_params]
110
+ end
111
+
112
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsPacketMirroringRequest]
113
+ # A request object representing the call parameters. Required.
114
+ # @return [Array(String, [String, nil], Hash{String => String})]
115
+ # Uri, Body, Query string parameters
116
+ def transcode_test_iam_permissions request_pb
117
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/packetMirrorings/#{request_pb.resource}/testIamPermissions"
118
+ body = request_pb.test_permissions_request_resource.to_json
119
+ query_string_params = {}
120
+
121
+ [uri, body, query_string_params]
122
+ end
123
+ extend self
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
129
+ end
130
+ 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/projects/credentials"
25
+ require "google/cloud/compute/v1/projects/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/projects"
34
+ # client = ::Google::Cloud::Compute::V1::Projects::Rest::Client.new
35
+ #
36
+ module Projects
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ helper_path = ::File.join __dir__, "projects", "helpers.rb"
44
+ require "google/cloud/compute/v1/projects/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 Projects
26
+ # Credentials for the Projects 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/projects/rest/grpc_transcoding"
21
+ require "google/cloud/compute/v1/projects/rest/client"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Compute
26
+ module V1
27
+ module Projects
28
+ # Client for the REST transport
29
+ module Rest
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,1141 @@
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 Projects
27
+ module Rest
28
+ ##
29
+ # REST client for the Projects service.
30
+ #
31
+ # The Projects API.
32
+ #
33
+ class Client
34
+ include GrpcTranscoding
35
+
36
+ # @private
37
+ attr_reader :projects_stub
38
+
39
+ ##
40
+ # Configure the Projects Client class.
41
+ #
42
+ # See {::Google::Cloud::Compute::V1::Projects::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # ## Example
46
+ #
47
+ # To modify the configuration for all Projects clients:
48
+ #
49
+ # ::Google::Cloud::Compute::V1::Projects::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 Projects 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::Projects::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 Projects REST client object.
97
+ #
98
+ # ## Examples
99
+ #
100
+ # To create a new Projects REST client with the default
101
+ # configuration:
102
+ #
103
+ # client = ::Google::Cloud::Compute::V1::Projects::Rest::Client.new
104
+ #
105
+ # To create a new Projects REST client with a custom
106
+ # configuration:
107
+ #
108
+ # client = ::Google::Cloud::Compute::V1::Projects::Rest::Client.new do |config|
109
+ # config.timeout = 10.0
110
+ # end
111
+ #
112
+ # @yield [config] Configure the Projects 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
+ # Disable this project as a shared VPC host project.
140
+ #
141
+ # @overload disable_xpn_host(request, options = nil)
142
+ # Pass arguments to `disable_xpn_host` via a request object, either of type
143
+ # {::Google::Cloud::Compute::V1::DisableXpnHostProjectRequest} or an equivalent Hash.
144
+ #
145
+ # @param request [::Google::Cloud::Compute::V1::DisableXpnHostProjectRequest, ::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 disable_xpn_host(project: nil, request_id: nil)
154
+ # Pass arguments to `disable_xpn_host` 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 project [::String]
159
+ # Project ID for this request.
160
+ # @param request_id [::String]
161
+ # 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.
162
+ #
163
+ # 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.
164
+ #
165
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
166
+ # @yield [result, env] Access the result along with the Faraday environment object
167
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
168
+ # @yieldparam response [::Faraday::Response]
169
+ #
170
+ # @return [::Google::Cloud::Compute::V1::Operation]
171
+ #
172
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
173
+ def disable_xpn_host request, options = nil
174
+ raise ::ArgumentError, "request must be provided" if request.nil?
175
+
176
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DisableXpnHostProjectRequest
177
+
178
+ # Converts hash and nil to an options object
179
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
180
+
181
+ # Customize the options with defaults
182
+ call_metadata = {}
183
+
184
+ # Set x-goog-api-client header
185
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
186
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
187
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
188
+
189
+ options.apply_defaults timeout: @config.timeout,
190
+ metadata: call_metadata
191
+
192
+ uri, _body, query_string_params = transcode_disable_xpn_host request
193
+ response = @client_stub.make_post_request(
194
+ uri: uri,
195
+ params: query_string_params,
196
+ options: options
197
+ )
198
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
199
+
200
+ yield result, response if block_given?
201
+ result
202
+ rescue ::Faraday::Error => e
203
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
204
+ raise ::Google::Cloud::Error.from_error(gapic_error)
205
+ end
206
+
207
+ ##
208
+ # Disable a service resource (also known as service project) associated with this host project.
209
+ #
210
+ # @overload disable_xpn_resource(request, options = nil)
211
+ # Pass arguments to `disable_xpn_resource` via a request object, either of type
212
+ # {::Google::Cloud::Compute::V1::DisableXpnResourceProjectRequest} or an equivalent Hash.
213
+ #
214
+ # @param request [::Google::Cloud::Compute::V1::DisableXpnResourceProjectRequest, ::Hash]
215
+ # A request object representing the call parameters. Required. To specify no
216
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
217
+ # @param options [::Gapic::CallOptions, ::Hash]
218
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
219
+ # Note: currently retry functionality is not implemented. While it is possible
220
+ # to set it using ::Gapic::CallOptions, it will not be applied
221
+ #
222
+ # @overload disable_xpn_resource(project: nil, projects_disable_xpn_resource_request_resource: nil, request_id: nil)
223
+ # Pass arguments to `disable_xpn_resource` via keyword arguments. Note that at
224
+ # least one keyword argument is required. To specify no parameters, or to keep all
225
+ # the default parameter values, pass an empty Hash as a request object (see above).
226
+ #
227
+ # @param project [::String]
228
+ # Project ID for this request.
229
+ # @param projects_disable_xpn_resource_request_resource [::Google::Cloud::Compute::V1::ProjectsDisableXpnResourceRequest, ::Hash]
230
+ # The body resource for this request
231
+ # @param request_id [::String]
232
+ # 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.
233
+ #
234
+ # 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.
235
+ #
236
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
237
+ # @yield [result, env] Access the result along with the Faraday environment object
238
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
239
+ # @yieldparam response [::Faraday::Response]
240
+ #
241
+ # @return [::Google::Cloud::Compute::V1::Operation]
242
+ #
243
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
244
+ def disable_xpn_resource request, options = nil
245
+ raise ::ArgumentError, "request must be provided" if request.nil?
246
+
247
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DisableXpnResourceProjectRequest
248
+
249
+ # Converts hash and nil to an options object
250
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
251
+
252
+ # Customize the options with defaults
253
+ call_metadata = {}
254
+
255
+ # Set x-goog-api-client header
256
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
257
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
258
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
259
+
260
+ options.apply_defaults timeout: @config.timeout,
261
+ metadata: call_metadata
262
+
263
+ uri, body, _query_string_params = transcode_disable_xpn_resource request
264
+ response = @client_stub.make_post_request(
265
+ uri: uri,
266
+ body: body,
267
+ options: options
268
+ )
269
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
270
+
271
+ yield result, response if block_given?
272
+ result
273
+ rescue ::Faraday::Error => e
274
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
275
+ raise ::Google::Cloud::Error.from_error(gapic_error)
276
+ end
277
+
278
+ ##
279
+ # Enable this project as a shared VPC host project.
280
+ #
281
+ # @overload enable_xpn_host(request, options = nil)
282
+ # Pass arguments to `enable_xpn_host` via a request object, either of type
283
+ # {::Google::Cloud::Compute::V1::EnableXpnHostProjectRequest} or an equivalent Hash.
284
+ #
285
+ # @param request [::Google::Cloud::Compute::V1::EnableXpnHostProjectRequest, ::Hash]
286
+ # A request object representing the call parameters. Required. To specify no
287
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
288
+ # @param options [::Gapic::CallOptions, ::Hash]
289
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
290
+ # Note: currently retry functionality is not implemented. While it is possible
291
+ # to set it using ::Gapic::CallOptions, it will not be applied
292
+ #
293
+ # @overload enable_xpn_host(project: nil, request_id: nil)
294
+ # Pass arguments to `enable_xpn_host` via keyword arguments. Note that at
295
+ # least one keyword argument is required. To specify no parameters, or to keep all
296
+ # the default parameter values, pass an empty Hash as a request object (see above).
297
+ #
298
+ # @param project [::String]
299
+ # Project ID for this request.
300
+ # @param request_id [::String]
301
+ # 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.
302
+ #
303
+ # 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.
304
+ #
305
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
306
+ # @yield [result, env] Access the result along with the Faraday environment object
307
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
308
+ # @yieldparam response [::Faraday::Response]
309
+ #
310
+ # @return [::Google::Cloud::Compute::V1::Operation]
311
+ #
312
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ def enable_xpn_host request, options = nil
314
+ raise ::ArgumentError, "request must be provided" if request.nil?
315
+
316
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::EnableXpnHostProjectRequest
317
+
318
+ # Converts hash and nil to an options object
319
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
320
+
321
+ # Customize the options with defaults
322
+ call_metadata = {}
323
+
324
+ # Set x-goog-api-client header
325
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
326
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
327
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
328
+
329
+ options.apply_defaults timeout: @config.timeout,
330
+ metadata: call_metadata
331
+
332
+ uri, _body, query_string_params = transcode_enable_xpn_host request
333
+ response = @client_stub.make_post_request(
334
+ uri: uri,
335
+ params: query_string_params,
336
+ options: options
337
+ )
338
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
339
+
340
+ yield result, response if block_given?
341
+ result
342
+ rescue ::Faraday::Error => e
343
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
344
+ raise ::Google::Cloud::Error.from_error(gapic_error)
345
+ end
346
+
347
+ ##
348
+ # Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.
349
+ #
350
+ # @overload enable_xpn_resource(request, options = nil)
351
+ # Pass arguments to `enable_xpn_resource` via a request object, either of type
352
+ # {::Google::Cloud::Compute::V1::EnableXpnResourceProjectRequest} or an equivalent Hash.
353
+ #
354
+ # @param request [::Google::Cloud::Compute::V1::EnableXpnResourceProjectRequest, ::Hash]
355
+ # A request object representing the call parameters. Required. To specify no
356
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
357
+ # @param options [::Gapic::CallOptions, ::Hash]
358
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
359
+ # Note: currently retry functionality is not implemented. While it is possible
360
+ # to set it using ::Gapic::CallOptions, it will not be applied
361
+ #
362
+ # @overload enable_xpn_resource(project: nil, projects_enable_xpn_resource_request_resource: nil, request_id: nil)
363
+ # Pass arguments to `enable_xpn_resource` via keyword arguments. Note that at
364
+ # least one keyword argument is required. To specify no parameters, or to keep all
365
+ # the default parameter values, pass an empty Hash as a request object (see above).
366
+ #
367
+ # @param project [::String]
368
+ # Project ID for this request.
369
+ # @param projects_enable_xpn_resource_request_resource [::Google::Cloud::Compute::V1::ProjectsEnableXpnResourceRequest, ::Hash]
370
+ # The body resource for this request
371
+ # @param request_id [::String]
372
+ # 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.
373
+ #
374
+ # 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.
375
+ #
376
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
377
+ # @yield [result, env] Access the result along with the Faraday environment object
378
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
379
+ # @yieldparam response [::Faraday::Response]
380
+ #
381
+ # @return [::Google::Cloud::Compute::V1::Operation]
382
+ #
383
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
384
+ def enable_xpn_resource request, options = nil
385
+ raise ::ArgumentError, "request must be provided" if request.nil?
386
+
387
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::EnableXpnResourceProjectRequest
388
+
389
+ # Converts hash and nil to an options object
390
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
391
+
392
+ # Customize the options with defaults
393
+ call_metadata = {}
394
+
395
+ # Set x-goog-api-client header
396
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
397
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
398
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
399
+
400
+ options.apply_defaults timeout: @config.timeout,
401
+ metadata: call_metadata
402
+
403
+ uri, body, _query_string_params = transcode_enable_xpn_resource request
404
+ response = @client_stub.make_post_request(
405
+ uri: uri,
406
+ body: body,
407
+ options: options
408
+ )
409
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
410
+
411
+ yield result, response if block_given?
412
+ result
413
+ rescue ::Faraday::Error => e
414
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
415
+ raise ::Google::Cloud::Error.from_error(gapic_error)
416
+ end
417
+
418
+ ##
419
+ # Returns the specified Project resource.
420
+ #
421
+ # @overload get(request, options = nil)
422
+ # Pass arguments to `get` via a request object, either of type
423
+ # {::Google::Cloud::Compute::V1::GetProjectRequest} or an equivalent Hash.
424
+ #
425
+ # @param request [::Google::Cloud::Compute::V1::GetProjectRequest, ::Hash]
426
+ # A request object representing the call parameters. Required. To specify no
427
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
428
+ # @param options [::Gapic::CallOptions, ::Hash]
429
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
430
+ # Note: currently retry functionality is not implemented. While it is possible
431
+ # to set it using ::Gapic::CallOptions, it will not be applied
432
+ #
433
+ # @overload get(project: nil)
434
+ # Pass arguments to `get` via keyword arguments. Note that at
435
+ # least one keyword argument is required. To specify no parameters, or to keep all
436
+ # the default parameter values, pass an empty Hash as a request object (see above).
437
+ #
438
+ # @param project [::String]
439
+ # Project ID for this request.
440
+ # @yield [result, env] Access the result along with the Faraday environment object
441
+ # @yieldparam result [::Google::Cloud::Compute::V1::Project]
442
+ # @yieldparam response [::Faraday::Response]
443
+ #
444
+ # @return [::Google::Cloud::Compute::V1::Project]
445
+ #
446
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
447
+ def get request, options = nil
448
+ raise ::ArgumentError, "request must be provided" if request.nil?
449
+
450
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetProjectRequest
451
+
452
+ # Converts hash and nil to an options object
453
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
454
+
455
+ # Customize the options with defaults
456
+ call_metadata = {}
457
+
458
+ # Set x-goog-api-client header
459
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
460
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
461
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
462
+
463
+ options.apply_defaults timeout: @config.timeout,
464
+ metadata: call_metadata
465
+
466
+ uri, _body, _query_string_params = transcode_get request
467
+ response = @client_stub.make_get_request(
468
+ uri: uri,
469
+ options: options
470
+ )
471
+ result = ::Google::Cloud::Compute::V1::Project.decode_json response.body, ignore_unknown_fields: true
472
+
473
+ yield result, response if block_given?
474
+ result
475
+ rescue ::Faraday::Error => e
476
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
477
+ raise ::Google::Cloud::Error.from_error(gapic_error)
478
+ end
479
+
480
+ ##
481
+ # Gets the shared VPC host project that this project links to. May be empty if no link exists.
482
+ #
483
+ # @overload get_xpn_host(request, options = nil)
484
+ # Pass arguments to `get_xpn_host` via a request object, either of type
485
+ # {::Google::Cloud::Compute::V1::GetXpnHostProjectRequest} or an equivalent Hash.
486
+ #
487
+ # @param request [::Google::Cloud::Compute::V1::GetXpnHostProjectRequest, ::Hash]
488
+ # A request object representing the call parameters. Required. To specify no
489
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
490
+ # @param options [::Gapic::CallOptions, ::Hash]
491
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
492
+ # Note: currently retry functionality is not implemented. While it is possible
493
+ # to set it using ::Gapic::CallOptions, it will not be applied
494
+ #
495
+ # @overload get_xpn_host(project: nil)
496
+ # Pass arguments to `get_xpn_host` via keyword arguments. Note that at
497
+ # least one keyword argument is required. To specify no parameters, or to keep all
498
+ # the default parameter values, pass an empty Hash as a request object (see above).
499
+ #
500
+ # @param project [::String]
501
+ # Project ID for this request.
502
+ # @yield [result, env] Access the result along with the Faraday environment object
503
+ # @yieldparam result [::Google::Cloud::Compute::V1::Project]
504
+ # @yieldparam response [::Faraday::Response]
505
+ #
506
+ # @return [::Google::Cloud::Compute::V1::Project]
507
+ #
508
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
509
+ def get_xpn_host request, options = nil
510
+ raise ::ArgumentError, "request must be provided" if request.nil?
511
+
512
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetXpnHostProjectRequest
513
+
514
+ # Converts hash and nil to an options object
515
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
516
+
517
+ # Customize the options with defaults
518
+ call_metadata = {}
519
+
520
+ # Set x-goog-api-client header
521
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
522
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
523
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
524
+
525
+ options.apply_defaults timeout: @config.timeout,
526
+ metadata: call_metadata
527
+
528
+ uri, _body, _query_string_params = transcode_get_xpn_host request
529
+ response = @client_stub.make_get_request(
530
+ uri: uri,
531
+ options: options
532
+ )
533
+ result = ::Google::Cloud::Compute::V1::Project.decode_json response.body, ignore_unknown_fields: true
534
+
535
+ yield result, response if block_given?
536
+ result
537
+ rescue ::Faraday::Error => e
538
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
539
+ raise ::Google::Cloud::Error.from_error(gapic_error)
540
+ end
541
+
542
+ ##
543
+ # Gets service resources (a.k.a service project) associated with this host project.
544
+ #
545
+ # @overload get_xpn_resources(request, options = nil)
546
+ # Pass arguments to `get_xpn_resources` via a request object, either of type
547
+ # {::Google::Cloud::Compute::V1::GetXpnResourcesProjectsRequest} or an equivalent Hash.
548
+ #
549
+ # @param request [::Google::Cloud::Compute::V1::GetXpnResourcesProjectsRequest, ::Hash]
550
+ # A request object representing the call parameters. Required. To specify no
551
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
552
+ # @param options [::Gapic::CallOptions, ::Hash]
553
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
554
+ # Note: currently retry functionality is not implemented. While it is possible
555
+ # to set it using ::Gapic::CallOptions, it will not be applied
556
+ #
557
+ # @overload get_xpn_resources(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
558
+ # Pass arguments to `get_xpn_resources` via keyword arguments. Note that at
559
+ # least one keyword argument is required. To specify no parameters, or to keep all
560
+ # the default parameter values, pass an empty Hash as a request object (see above).
561
+ #
562
+ # @param filter [::String]
563
+ # 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 `<`.
564
+ #
565
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
566
+ #
567
+ # 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.
568
+ #
569
+ # 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) ```
570
+ # @param max_results [::Integer]
571
+ # 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`)
572
+ # @param order_by [::String]
573
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
574
+ #
575
+ # 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.
576
+ #
577
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
578
+ # @param page_token [::String]
579
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
580
+ # @param project [::String]
581
+ # Project ID for this request.
582
+ # @param return_partial_success [::Boolean]
583
+ # 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.
584
+ # @yield [result, env] Access the result along with the Faraday environment object
585
+ # @yieldparam result [::Google::Cloud::Compute::V1::ProjectsGetXpnResources]
586
+ # @yieldparam response [::Faraday::Response]
587
+ #
588
+ # @return [::Google::Cloud::Compute::V1::ProjectsGetXpnResources]
589
+ #
590
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
591
+ def get_xpn_resources request, options = nil
592
+ raise ::ArgumentError, "request must be provided" if request.nil?
593
+
594
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetXpnResourcesProjectsRequest
595
+
596
+ # Converts hash and nil to an options object
597
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
598
+
599
+ # Customize the options with defaults
600
+ call_metadata = {}
601
+
602
+ # Set x-goog-api-client header
603
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
604
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
605
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
606
+
607
+ options.apply_defaults timeout: @config.timeout,
608
+ metadata: call_metadata
609
+
610
+ uri, _body, query_string_params = transcode_get_xpn_resources request
611
+ response = @client_stub.make_get_request(
612
+ uri: uri,
613
+ params: query_string_params,
614
+ options: options
615
+ )
616
+ result = ::Google::Cloud::Compute::V1::ProjectsGetXpnResources.decode_json response.body, ignore_unknown_fields: true
617
+
618
+ yield result, response if block_given?
619
+ result
620
+ rescue ::Faraday::Error => e
621
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
622
+ raise ::Google::Cloud::Error.from_error(gapic_error)
623
+ end
624
+
625
+ ##
626
+ # Lists all shared VPC host projects visible to the user in an organization.
627
+ #
628
+ # @overload list_xpn_hosts(request, options = nil)
629
+ # Pass arguments to `list_xpn_hosts` via a request object, either of type
630
+ # {::Google::Cloud::Compute::V1::ListXpnHostsProjectsRequest} or an equivalent Hash.
631
+ #
632
+ # @param request [::Google::Cloud::Compute::V1::ListXpnHostsProjectsRequest, ::Hash]
633
+ # A request object representing the call parameters. Required. To specify no
634
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
635
+ # @param options [::Gapic::CallOptions, ::Hash]
636
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
637
+ # Note: currently retry functionality is not implemented. While it is possible
638
+ # to set it using ::Gapic::CallOptions, it will not be applied
639
+ #
640
+ # @overload list_xpn_hosts(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, projects_list_xpn_hosts_request_resource: nil, return_partial_success: nil)
641
+ # Pass arguments to `list_xpn_hosts` via keyword arguments. Note that at
642
+ # least one keyword argument is required. To specify no parameters, or to keep all
643
+ # the default parameter values, pass an empty Hash as a request object (see above).
644
+ #
645
+ # @param filter [::String]
646
+ # 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 `<`.
647
+ #
648
+ # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
649
+ #
650
+ # 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.
651
+ #
652
+ # 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) ```
653
+ # @param max_results [::Integer]
654
+ # 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`)
655
+ # @param order_by [::String]
656
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
657
+ #
658
+ # 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.
659
+ #
660
+ # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
661
+ # @param page_token [::String]
662
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
663
+ # @param project [::String]
664
+ # Project ID for this request.
665
+ # @param projects_list_xpn_hosts_request_resource [::Google::Cloud::Compute::V1::ProjectsListXpnHostsRequest, ::Hash]
666
+ # The body resource for this request
667
+ # @param return_partial_success [::Boolean]
668
+ # 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.
669
+ # @yield [result, env] Access the result along with the Faraday environment object
670
+ # @yieldparam result [::Google::Cloud::Compute::V1::XpnHostList]
671
+ # @yieldparam response [::Faraday::Response]
672
+ #
673
+ # @return [::Google::Cloud::Compute::V1::XpnHostList]
674
+ #
675
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
676
+ def list_xpn_hosts request, options = nil
677
+ raise ::ArgumentError, "request must be provided" if request.nil?
678
+
679
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListXpnHostsProjectsRequest
680
+
681
+ # Converts hash and nil to an options object
682
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
683
+
684
+ # Customize the options with defaults
685
+ call_metadata = {}
686
+
687
+ # Set x-goog-api-client header
688
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
689
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
690
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
691
+
692
+ options.apply_defaults timeout: @config.timeout,
693
+ metadata: call_metadata
694
+
695
+ uri, body, _query_string_params = transcode_list_xpn_hosts request
696
+ response = @client_stub.make_post_request(
697
+ uri: uri,
698
+ body: body,
699
+ options: options
700
+ )
701
+ result = ::Google::Cloud::Compute::V1::XpnHostList.decode_json response.body, ignore_unknown_fields: true
702
+
703
+ yield result, response if block_given?
704
+ result
705
+ rescue ::Faraday::Error => e
706
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
707
+ raise ::Google::Cloud::Error.from_error(gapic_error)
708
+ end
709
+
710
+ ##
711
+ # Moves a persistent disk from one zone to another.
712
+ #
713
+ # @overload move_disk(request, options = nil)
714
+ # Pass arguments to `move_disk` via a request object, either of type
715
+ # {::Google::Cloud::Compute::V1::MoveDiskProjectRequest} or an equivalent Hash.
716
+ #
717
+ # @param request [::Google::Cloud::Compute::V1::MoveDiskProjectRequest, ::Hash]
718
+ # A request object representing the call parameters. Required. To specify no
719
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
720
+ # @param options [::Gapic::CallOptions, ::Hash]
721
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
722
+ # Note: currently retry functionality is not implemented. While it is possible
723
+ # to set it using ::Gapic::CallOptions, it will not be applied
724
+ #
725
+ # @overload move_disk(disk_move_request_resource: nil, project: nil, request_id: nil)
726
+ # Pass arguments to `move_disk` via keyword arguments. Note that at
727
+ # least one keyword argument is required. To specify no parameters, or to keep all
728
+ # the default parameter values, pass an empty Hash as a request object (see above).
729
+ #
730
+ # @param disk_move_request_resource [::Google::Cloud::Compute::V1::DiskMoveRequest, ::Hash]
731
+ # The body resource for this request
732
+ # @param project [::String]
733
+ # Project ID for this request.
734
+ # @param request_id [::String]
735
+ # 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.
736
+ #
737
+ # 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.
738
+ #
739
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
740
+ # @yield [result, env] Access the result along with the Faraday environment object
741
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
742
+ # @yieldparam response [::Faraday::Response]
743
+ #
744
+ # @return [::Google::Cloud::Compute::V1::Operation]
745
+ #
746
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
747
+ def move_disk request, options = nil
748
+ raise ::ArgumentError, "request must be provided" if request.nil?
749
+
750
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::MoveDiskProjectRequest
751
+
752
+ # Converts hash and nil to an options object
753
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
754
+
755
+ # Customize the options with defaults
756
+ call_metadata = {}
757
+
758
+ # Set x-goog-api-client header
759
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
760
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
761
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
762
+
763
+ options.apply_defaults timeout: @config.timeout,
764
+ metadata: call_metadata
765
+
766
+ uri, body, _query_string_params = transcode_move_disk request
767
+ response = @client_stub.make_post_request(
768
+ uri: uri,
769
+ body: body,
770
+ options: options
771
+ )
772
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
773
+
774
+ yield result, response if block_given?
775
+ result
776
+ rescue ::Faraday::Error => e
777
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
778
+ raise ::Google::Cloud::Error.from_error(gapic_error)
779
+ end
780
+
781
+ ##
782
+ # Moves an instance and its attached persistent disks from one zone to another.
783
+ #
784
+ # @overload move_instance(request, options = nil)
785
+ # Pass arguments to `move_instance` via a request object, either of type
786
+ # {::Google::Cloud::Compute::V1::MoveInstanceProjectRequest} or an equivalent Hash.
787
+ #
788
+ # @param request [::Google::Cloud::Compute::V1::MoveInstanceProjectRequest, ::Hash]
789
+ # A request object representing the call parameters. Required. To specify no
790
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
791
+ # @param options [::Gapic::CallOptions, ::Hash]
792
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
793
+ # Note: currently retry functionality is not implemented. While it is possible
794
+ # to set it using ::Gapic::CallOptions, it will not be applied
795
+ #
796
+ # @overload move_instance(instance_move_request_resource: nil, project: nil, request_id: nil)
797
+ # Pass arguments to `move_instance` via keyword arguments. Note that at
798
+ # least one keyword argument is required. To specify no parameters, or to keep all
799
+ # the default parameter values, pass an empty Hash as a request object (see above).
800
+ #
801
+ # @param instance_move_request_resource [::Google::Cloud::Compute::V1::InstanceMoveRequest, ::Hash]
802
+ # The body resource for this request
803
+ # @param project [::String]
804
+ # Project ID for this request.
805
+ # @param request_id [::String]
806
+ # 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.
807
+ #
808
+ # 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.
809
+ #
810
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
811
+ # @yield [result, env] Access the result along with the Faraday environment object
812
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
813
+ # @yieldparam response [::Faraday::Response]
814
+ #
815
+ # @return [::Google::Cloud::Compute::V1::Operation]
816
+ #
817
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
818
+ def move_instance request, options = nil
819
+ raise ::ArgumentError, "request must be provided" if request.nil?
820
+
821
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::MoveInstanceProjectRequest
822
+
823
+ # Converts hash and nil to an options object
824
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
825
+
826
+ # Customize the options with defaults
827
+ call_metadata = {}
828
+
829
+ # Set x-goog-api-client header
830
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
831
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
832
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
833
+
834
+ options.apply_defaults timeout: @config.timeout,
835
+ metadata: call_metadata
836
+
837
+ uri, body, _query_string_params = transcode_move_instance request
838
+ response = @client_stub.make_post_request(
839
+ uri: uri,
840
+ body: body,
841
+ options: options
842
+ )
843
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
844
+
845
+ yield result, response if block_given?
846
+ result
847
+ rescue ::Faraday::Error => e
848
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
849
+ raise ::Google::Cloud::Error.from_error(gapic_error)
850
+ end
851
+
852
+ ##
853
+ # Sets metadata common to all instances within the specified project using the data included in the request.
854
+ #
855
+ # @overload set_common_instance_metadata(request, options = nil)
856
+ # Pass arguments to `set_common_instance_metadata` via a request object, either of type
857
+ # {::Google::Cloud::Compute::V1::SetCommonInstanceMetadataProjectRequest} or an equivalent Hash.
858
+ #
859
+ # @param request [::Google::Cloud::Compute::V1::SetCommonInstanceMetadataProjectRequest, ::Hash]
860
+ # A request object representing the call parameters. Required. To specify no
861
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
862
+ # @param options [::Gapic::CallOptions, ::Hash]
863
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
864
+ # Note: currently retry functionality is not implemented. While it is possible
865
+ # to set it using ::Gapic::CallOptions, it will not be applied
866
+ #
867
+ # @overload set_common_instance_metadata(metadata_resource: nil, project: nil, request_id: nil)
868
+ # Pass arguments to `set_common_instance_metadata` via keyword arguments. Note that at
869
+ # least one keyword argument is required. To specify no parameters, or to keep all
870
+ # the default parameter values, pass an empty Hash as a request object (see above).
871
+ #
872
+ # @param metadata_resource [::Google::Cloud::Compute::V1::Metadata, ::Hash]
873
+ # The body resource for this request
874
+ # @param project [::String]
875
+ # Project ID for this request.
876
+ # @param request_id [::String]
877
+ # 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.
878
+ #
879
+ # 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.
880
+ #
881
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
882
+ # @yield [result, env] Access the result along with the Faraday environment object
883
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
884
+ # @yieldparam response [::Faraday::Response]
885
+ #
886
+ # @return [::Google::Cloud::Compute::V1::Operation]
887
+ #
888
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
889
+ def set_common_instance_metadata request, options = nil
890
+ raise ::ArgumentError, "request must be provided" if request.nil?
891
+
892
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetCommonInstanceMetadataProjectRequest
893
+
894
+ # Converts hash and nil to an options object
895
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
896
+
897
+ # Customize the options with defaults
898
+ call_metadata = {}
899
+
900
+ # Set x-goog-api-client header
901
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
902
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
903
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
904
+
905
+ options.apply_defaults timeout: @config.timeout,
906
+ metadata: call_metadata
907
+
908
+ uri, body, _query_string_params = transcode_set_common_instance_metadata request
909
+ response = @client_stub.make_post_request(
910
+ uri: uri,
911
+ body: body,
912
+ options: options
913
+ )
914
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
915
+
916
+ yield result, response if block_given?
917
+ result
918
+ rescue ::Faraday::Error => e
919
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
920
+ raise ::Google::Cloud::Error.from_error(gapic_error)
921
+ end
922
+
923
+ ##
924
+ # Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.
925
+ #
926
+ # @overload set_default_network_tier(request, options = nil)
927
+ # Pass arguments to `set_default_network_tier` via a request object, either of type
928
+ # {::Google::Cloud::Compute::V1::SetDefaultNetworkTierProjectRequest} or an equivalent Hash.
929
+ #
930
+ # @param request [::Google::Cloud::Compute::V1::SetDefaultNetworkTierProjectRequest, ::Hash]
931
+ # A request object representing the call parameters. Required. To specify no
932
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
933
+ # @param options [::Gapic::CallOptions, ::Hash]
934
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
935
+ # Note: currently retry functionality is not implemented. While it is possible
936
+ # to set it using ::Gapic::CallOptions, it will not be applied
937
+ #
938
+ # @overload set_default_network_tier(project: nil, projects_set_default_network_tier_request_resource: nil, request_id: nil)
939
+ # Pass arguments to `set_default_network_tier` via keyword arguments. Note that at
940
+ # least one keyword argument is required. To specify no parameters, or to keep all
941
+ # the default parameter values, pass an empty Hash as a request object (see above).
942
+ #
943
+ # @param project [::String]
944
+ # Project ID for this request.
945
+ # @param projects_set_default_network_tier_request_resource [::Google::Cloud::Compute::V1::ProjectsSetDefaultNetworkTierRequest, ::Hash]
946
+ # The body resource for this request
947
+ # @param request_id [::String]
948
+ # 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.
949
+ #
950
+ # 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.
951
+ #
952
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
953
+ # @yield [result, env] Access the result along with the Faraday environment object
954
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
955
+ # @yieldparam response [::Faraday::Response]
956
+ #
957
+ # @return [::Google::Cloud::Compute::V1::Operation]
958
+ #
959
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
960
+ def set_default_network_tier request, options = nil
961
+ raise ::ArgumentError, "request must be provided" if request.nil?
962
+
963
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetDefaultNetworkTierProjectRequest
964
+
965
+ # Converts hash and nil to an options object
966
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
967
+
968
+ # Customize the options with defaults
969
+ call_metadata = {}
970
+
971
+ # Set x-goog-api-client header
972
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
973
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
974
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
975
+
976
+ options.apply_defaults timeout: @config.timeout,
977
+ metadata: call_metadata
978
+
979
+ uri, body, _query_string_params = transcode_set_default_network_tier request
980
+ response = @client_stub.make_post_request(
981
+ uri: uri,
982
+ body: body,
983
+ options: options
984
+ )
985
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
986
+
987
+ yield result, response if block_given?
988
+ result
989
+ rescue ::Faraday::Error => e
990
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
991
+ raise ::Google::Cloud::Error.from_error(gapic_error)
992
+ end
993
+
994
+ ##
995
+ # Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.
996
+ #
997
+ # @overload set_usage_export_bucket(request, options = nil)
998
+ # Pass arguments to `set_usage_export_bucket` via a request object, either of type
999
+ # {::Google::Cloud::Compute::V1::SetUsageExportBucketProjectRequest} or an equivalent Hash.
1000
+ #
1001
+ # @param request [::Google::Cloud::Compute::V1::SetUsageExportBucketProjectRequest, ::Hash]
1002
+ # A request object representing the call parameters. Required. To specify no
1003
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1004
+ # @param options [::Gapic::CallOptions, ::Hash]
1005
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1006
+ # Note: currently retry functionality is not implemented. While it is possible
1007
+ # to set it using ::Gapic::CallOptions, it will not be applied
1008
+ #
1009
+ # @overload set_usage_export_bucket(project: nil, request_id: nil, usage_export_location_resource: nil)
1010
+ # Pass arguments to `set_usage_export_bucket` via keyword arguments. Note that at
1011
+ # least one keyword argument is required. To specify no parameters, or to keep all
1012
+ # the default parameter values, pass an empty Hash as a request object (see above).
1013
+ #
1014
+ # @param project [::String]
1015
+ # Project ID for this request.
1016
+ # @param request_id [::String]
1017
+ # 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.
1018
+ #
1019
+ # 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.
1020
+ #
1021
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1022
+ # @param usage_export_location_resource [::Google::Cloud::Compute::V1::UsageExportLocation, ::Hash]
1023
+ # The body resource for this request
1024
+ # @yield [result, env] Access the result along with the Faraday environment object
1025
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1026
+ # @yieldparam response [::Faraday::Response]
1027
+ #
1028
+ # @return [::Google::Cloud::Compute::V1::Operation]
1029
+ #
1030
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1031
+ def set_usage_export_bucket request, options = nil
1032
+ raise ::ArgumentError, "request must be provided" if request.nil?
1033
+
1034
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetUsageExportBucketProjectRequest
1035
+
1036
+ # Converts hash and nil to an options object
1037
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1038
+
1039
+ # Customize the options with defaults
1040
+ call_metadata = {}
1041
+
1042
+ # Set x-goog-api-client header
1043
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1044
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1045
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION
1046
+
1047
+ options.apply_defaults timeout: @config.timeout,
1048
+ metadata: call_metadata
1049
+
1050
+ uri, body, _query_string_params = transcode_set_usage_export_bucket request
1051
+ response = @client_stub.make_post_request(
1052
+ uri: uri,
1053
+ body: body,
1054
+ options: options
1055
+ )
1056
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1057
+
1058
+ yield result, response if block_given?
1059
+ result
1060
+ rescue ::Faraday::Error => e
1061
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1062
+ raise ::Google::Cloud::Error.from_error(gapic_error)
1063
+ end
1064
+
1065
+ ##
1066
+ # Configuration class for the Projects REST API.
1067
+ #
1068
+ # This class represents the configuration for Projects REST,
1069
+ # providing control over credentials, timeouts, retry behavior, logging.
1070
+ #
1071
+ # Configuration can be applied globally to all clients, or to a single client
1072
+ # on construction.
1073
+ #
1074
+ # # Examples
1075
+ #
1076
+ # To modify the global config, setting the timeout for all calls to 10 seconds:
1077
+ #
1078
+ # ::Google::Cloud::Compute::V1::Projects::Client.configure do |config|
1079
+ # config.timeout = 10.0
1080
+ # end
1081
+ #
1082
+ # To apply the above configuration only to a new client:
1083
+ #
1084
+ # client = ::Google::Cloud::Compute::V1::Projects::Client.new do |config|
1085
+ # config.timeout = 10.0
1086
+ # end
1087
+ #
1088
+ # @!attribute [rw] endpoint
1089
+ # The hostname or hostname:port of the service endpoint.
1090
+ # Defaults to `"compute.googleapis.com"`.
1091
+ # @return [::String]
1092
+ # @!attribute [rw] credentials
1093
+ # Credentials to send with calls. You may provide any of the following types:
1094
+ # * (`String`) The path to a service account key file in JSON format
1095
+ # * (`Hash`) A service account key as a Hash
1096
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1097
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1098
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1099
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1100
+ # * (`nil`) indicating no credentials
1101
+ # @return [::Object]
1102
+ # @!attribute [rw] scope
1103
+ # The OAuth scopes
1104
+ # @return [::Array<::String>]
1105
+ # @!attribute [rw] lib_name
1106
+ # The library name as recorded in instrumentation and logging
1107
+ # @return [::String]
1108
+ # @!attribute [rw] lib_version
1109
+ # The library version as recorded in instrumentation and logging
1110
+ # @return [::String]
1111
+ # @!attribute [rw] timeout
1112
+ # The call timeout in seconds.
1113
+ # @return [::Numeric]
1114
+ #
1115
+ class Configuration
1116
+ extend ::Gapic::Config
1117
+
1118
+ config_attr :endpoint, "compute.googleapis.com", ::String
1119
+ config_attr :credentials, nil do |value|
1120
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1121
+ allowed.any? { |klass| klass === value }
1122
+ end
1123
+ config_attr :scope, nil, ::String, ::Array, nil
1124
+ config_attr :lib_name, nil, ::String, nil
1125
+ config_attr :lib_version, nil, ::String, nil
1126
+ config_attr :timeout, nil, ::Numeric, nil
1127
+
1128
+ # @private
1129
+ def initialize parent_config = nil
1130
+ @parent_config = parent_config unless parent_config.nil?
1131
+
1132
+ yield self if block_given?
1133
+ end
1134
+ end
1135
+ end
1136
+ end
1137
+ end
1138
+ end
1139
+ end
1140
+ end
1141
+ end