google-cloud-compute-v1 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (257) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +19 -37
  4. data/README.md +4 -30
  5. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +127 -90
  6. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +188 -0
  7. data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +0 -2
  8. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +172 -130
  9. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +279 -0
  10. data/lib/google/cloud/compute/v1/addresses/rest.rb +0 -2
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +218 -172
  12. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +373 -0
  13. data/lib/google/cloud/compute/v1/autoscalers/rest.rb +0 -2
  14. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +236 -185
  15. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +413 -0
  16. data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +0 -2
  17. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +308 -253
  18. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +553 -0
  19. data/lib/google/cloud/compute/v1/backend_services/rest.rb +0 -2
  20. data/lib/google/cloud/compute/v1/compute_pb.rb +8507 -7466
  21. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +127 -90
  22. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +188 -0
  23. data/lib/google/cloud/compute/v1/disk_types/rest.rb +0 -2
  24. data/lib/google/cloud/compute/v1/disks/rest/client.rb +345 -272
  25. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +644 -0
  26. data/lib/google/cloud/compute/v1/disks/rest.rb +0 -2
  27. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +184 -129
  28. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +317 -0
  29. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +0 -2
  30. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +476 -343
  31. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +869 -0
  32. data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +0 -2
  33. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +191 -145
  34. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +321 -0
  35. data/lib/google/cloud/compute/v1/firewalls/rest.rb +0 -2
  36. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +296 -171
  37. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +417 -0
  38. data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +0 -2
  39. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +145 -103
  40. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +229 -0
  41. data/lib/google/cloud/compute/v1/global_addresses/rest.rb +0 -2
  42. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +265 -144
  43. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +365 -0
  44. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +0 -2
  45. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +215 -172
  46. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +370 -0
  47. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +0 -2
  48. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +165 -118
  49. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +274 -0
  50. data/lib/google/cloud/compute/v1/global_operations/rest.rb +0 -2
  51. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +118 -76
  52. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +186 -0
  53. data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +0 -2
  54. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +175 -124
  55. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +275 -0
  56. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +0 -2
  57. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +218 -172
  58. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +371 -0
  59. data/lib/google/cloud/compute/v1/health_checks/rest.rb +0 -2
  60. data/lib/google/cloud/compute/v1/image_family_views/credentials.rb +53 -0
  61. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +318 -0
  62. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +89 -0
  63. data/lib/google/cloud/compute/v1/image_family_views/rest.rb +33 -0
  64. data/lib/google/cloud/compute/v1/image_family_views.rb +44 -0
  65. data/lib/google/cloud/compute/v1/images/rest/client.rb +291 -209
  66. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +542 -0
  67. data/lib/google/cloud/compute/v1/images/rest.rb +0 -2
  68. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +526 -477
  69. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +974 -0
  70. data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +0 -2
  71. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +271 -233
  72. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +467 -0
  73. data/lib/google/cloud/compute/v1/instance_groups/rest.rb +0 -2
  74. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +202 -139
  75. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +362 -0
  76. data/lib/google/cloud/compute/v1/instance_templates/rest.rb +0 -2
  77. data/lib/google/cloud/compute/v1/instances/rest/client.rb +1186 -797
  78. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +2018 -0
  79. data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
  80. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +195 -151
  81. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +326 -0
  82. data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +0 -2
  83. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +100 -63
  84. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +138 -0
  85. data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +0 -2
  86. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +189 -135
  87. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +318 -0
  88. data/lib/google/cloud/compute/v1/interconnects/rest.rb +0 -2
  89. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +93 -50
  90. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +133 -0
  91. data/lib/google/cloud/compute/v1/license_codes/rest.rb +0 -2
  92. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +209 -146
  93. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +362 -0
  94. data/lib/google/cloud/compute/v1/licenses/rest.rb +0 -2
  95. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +127 -90
  96. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +188 -0
  97. data/lib/google/cloud/compute/v1/machine_types/rest.rb +0 -2
  98. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +261 -213
  99. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +465 -0
  100. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +0 -2
  101. data/lib/google/cloud/compute/v1/networks/rest/client.rb +363 -234
  102. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +553 -0
  103. data/lib/google/cloud/compute/v1/networks/rest.rb +0 -2
  104. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +345 -277
  105. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +646 -0
  106. data/lib/google/cloud/compute/v1/node_groups/rest.rb +0 -2
  107. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +229 -166
  108. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +412 -0
  109. data/lib/google/cloud/compute/v1/node_templates/rest.rb +0 -2
  110. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +127 -90
  111. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +188 -0
  112. data/lib/google/cloud/compute/v1/node_types/rest.rb +0 -2
  113. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +213 -163
  114. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +369 -0
  115. data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +0 -2
  116. data/lib/google/cloud/compute/v1/projects/rest/client.rb +351 -288
  117. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +643 -0
  118. data/lib/google/cloud/compute/v1/projects/rest.rb +0 -2
  119. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +175 -124
  120. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +275 -0
  121. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +0 -2
  122. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +203 -151
  123. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +325 -0
  124. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +0 -2
  125. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +191 -145
  126. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +323 -0
  127. data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +0 -2
  128. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +212 -160
  129. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +365 -0
  130. data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +0 -2
  131. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +151 -112
  132. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +234 -0
  133. data/lib/google/cloud/compute/v1/region_commitments/rest.rb +0 -2
  134. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +100 -63
  135. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +138 -0
  136. data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +0 -2
  137. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +318 -245
  138. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +593 -0
  139. data/lib/google/cloud/compute/v1/region_disks/rest.rb +0 -2
  140. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +168 -124
  141. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +275 -0
  142. data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +0 -2
  143. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +191 -145
  144. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +321 -0
  145. data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +0 -2
  146. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +498 -445
  147. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +924 -0
  148. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +0 -2
  149. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +148 -113
  150. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +234 -0
  151. data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +0 -2
  152. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +76 -45
  153. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +92 -0
  154. data/lib/google/cloud/compute/v1/region_instances/rest.rb +0 -2
  155. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +145 -103
  156. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +229 -0
  157. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +0 -2
  158. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +145 -103
  159. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +229 -0
  160. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +0 -2
  161. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +137 -90
  162. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +224 -0
  163. data/lib/google/cloud/compute/v1/region_operations/rest.rb +0 -2
  164. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +145 -103
  165. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +229 -0
  166. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +0 -2
  167. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +168 -124
  168. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +275 -0
  169. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +0 -2
  170. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +191 -145
  171. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +321 -0
  172. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +0 -2
  173. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +205 -137
  174. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +365 -0
  175. data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +0 -2
  176. data/lib/google/cloud/compute/v1/regions/rest/client.rb +100 -63
  177. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +138 -0
  178. data/lib/google/cloud/compute/v1/regions/rest.rb +0 -2
  179. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +252 -187
  180. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +458 -0
  181. data/lib/google/cloud/compute/v1/reservations/rest.rb +0 -2
  182. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +229 -166
  183. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +412 -0
  184. data/lib/google/cloud/compute/v1/resource_policies/rest.rb +0 -2
  185. data/lib/google/cloud/compute/v1/routers/rest/client.rb +284 -222
  186. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +507 -0
  187. data/lib/google/cloud/compute/v1/routers/rest.rb +0 -2
  188. data/lib/google/cloud/compute/v1/routes/rest/client.rb +145 -103
  189. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +229 -0
  190. data/lib/google/cloud/compute/v1/routes/rest.rb +0 -2
  191. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +277 -205
  192. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +504 -0
  193. data/lib/google/cloud/compute/v1/security_policies/rest.rb +0 -2
  194. data/lib/google/cloud/compute/v1/service_attachments/credentials.rb +52 -0
  195. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +954 -0
  196. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +458 -0
  197. data/lib/google/cloud/compute/v1/service_attachments/rest.rb +33 -0
  198. data/lib/google/cloud/compute/v1/service_attachments.rb +44 -0
  199. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +201 -135
  200. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +360 -0
  201. data/lib/google/cloud/compute/v1/snapshots/rest.rb +0 -2
  202. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +172 -130
  203. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +279 -0
  204. data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +0 -2
  205. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +192 -149
  206. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +324 -0
  207. data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +0 -2
  208. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +325 -256
  209. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +600 -0
  210. data/lib/google/cloud/compute/v1/subnetworks/rest.rb +0 -2
  211. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +168 -124
  212. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +275 -0
  213. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +0 -2
  214. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +219 -173
  215. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +371 -0
  216. data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +0 -2
  217. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +340 -213
  218. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +509 -0
  219. data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +0 -2
  220. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +172 -130
  221. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +279 -0
  222. data/lib/google/cloud/compute/v1/target_instances/rest.rb +0 -2
  223. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +305 -247
  224. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +554 -0
  225. data/lib/google/cloud/compute/v1/target_pools/rest.rb +0 -2
  226. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +237 -187
  227. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +413 -0
  228. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +0 -2
  229. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +191 -145
  230. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +321 -0
  231. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +0 -2
  232. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +172 -130
  233. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +279 -0
  234. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +0 -2
  235. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +260 -208
  236. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +461 -0
  237. data/lib/google/cloud/compute/v1/url_maps/rest.rb +0 -2
  238. data/lib/google/cloud/compute/v1/version.rb +1 -1
  239. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +234 -174
  240. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +412 -0
  241. data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +0 -2
  242. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +172 -130
  243. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +279 -0
  244. data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +0 -2
  245. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +137 -90
  246. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +224 -0
  247. data/lib/google/cloud/compute/v1/zone_operations/rest.rb +0 -2
  248. data/lib/google/cloud/compute/v1/zones/rest/client.rb +100 -63
  249. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +138 -0
  250. data/lib/google/cloud/compute/v1/zones/rest.rb +0 -2
  251. data/lib/google/cloud/compute/v1.rb +7 -0
  252. data/proto_docs/README.md +1 -1
  253. data/proto_docs/google/api/field_behavior.rb +6 -0
  254. data/proto_docs/google/api/resource.rb +10 -71
  255. data/proto_docs/google/cloud/compute/v1/compute.rb +18964 -19481
  256. data/proto_docs/google/cloud/extended_operations.rb +51 -0
  257. metadata +110 -9
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/target_pools/rest/service_stub"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -31,8 +32,6 @@ module Google
31
32
  # The TargetPools API.
32
33
  #
33
34
  class Client
34
- include GrpcTranscoding
35
-
36
35
  # @private
37
36
  attr_reader :target_pools_stub
38
37
 
@@ -42,13 +41,12 @@ module Google
42
41
  # See {::Google::Cloud::Compute::V1::TargetPools::Rest::Client::Configuration}
43
42
  # for a description of the configuration fields.
44
43
  #
45
- # ## Example
46
- #
47
- # To modify the configuration for all TargetPools clients:
44
+ # @example
48
45
  #
49
- # ::Google::Cloud::Compute::V1::TargetPools::Rest::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
46
+ # # Modify the configuration for all TargetPools clients
47
+ # ::Google::Cloud::Compute::V1::TargetPools::Rest::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
52
50
  #
53
51
  # @yield [config] Configure the Client client.
54
52
  # @yieldparam config [Client::Configuration]
@@ -66,6 +64,37 @@ module Google
66
64
  end
67
65
  default_config = Client::Configuration.new parent_config
68
66
 
67
+ default_config.rpcs.add_health_check.timeout = 600.0
68
+
69
+ default_config.rpcs.add_instance.timeout = 600.0
70
+
71
+ default_config.rpcs.aggregated_list.timeout = 600.0
72
+ default_config.rpcs.aggregated_list.retry_policy = {
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
74
+ }
75
+
76
+ default_config.rpcs.delete.timeout = 600.0
77
+
78
+ default_config.rpcs.get.timeout = 600.0
79
+ default_config.rpcs.get.retry_policy = {
80
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
+ }
82
+
83
+ default_config.rpcs.get_health.timeout = 600.0
84
+
85
+ default_config.rpcs.insert.timeout = 600.0
86
+
87
+ default_config.rpcs.list.timeout = 600.0
88
+ default_config.rpcs.list.retry_policy = {
89
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
90
+ }
91
+
92
+ default_config.rpcs.remove_health_check.timeout = 600.0
93
+
94
+ default_config.rpcs.remove_instance.timeout = 600.0
95
+
96
+ default_config.rpcs.set_backup.timeout = 600.0
97
+
69
98
  default_config
70
99
  end
71
100
  yield @configure if block_given?
@@ -95,28 +124,20 @@ module Google
95
124
  ##
96
125
  # Create a new TargetPools REST client object.
97
126
  #
98
- # ## Examples
99
- #
100
- # To create a new TargetPools REST client with the default
101
- # configuration:
127
+ # @example
102
128
  #
103
- # client = ::Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
129
+ # # Create a client using the default configuration
130
+ # client = ::Google::Cloud::Compute::V1::TargetPools::Rest::Client.new
104
131
  #
105
- # To create a new TargetPools REST client with a custom
106
- # configuration:
107
- #
108
- # client = ::Google::Cloud::Compute::V1::TargetPools::Rest::Client.new do |config|
109
- # config.timeout = 10.0
110
- # end
132
+ # # Create a client using a custom configuration
133
+ # client = ::Google::Cloud::Compute::V1::TargetPools::Rest::Client.new do |config|
134
+ # config.timeout = 10.0
135
+ # end
111
136
  #
112
137
  # @yield [config] Configure the TargetPools client.
113
138
  # @yieldparam config [Client::Configuration]
114
139
  #
115
140
  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
141
  # Create the configuration object
121
142
  @config = Configuration.new Client.configure
122
143
 
@@ -126,11 +147,11 @@ module Google
126
147
  # Create credentials
127
148
  credentials = @config.credentials
128
149
  credentials ||= Credentials.default scope: @config.scope
129
- if credentials.is_a?(String) || credentials.is_a?(Hash)
150
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
130
151
  credentials = Credentials.new credentials, scope: @config.scope
131
152
  end
132
153
 
133
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: @config.endpoint, credentials: credentials
154
+ @target_pools_stub = ::Google::Cloud::Compute::V1::TargetPools::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
134
155
  end
135
156
 
136
157
  # Service calls
@@ -160,20 +181,16 @@ module Google
160
181
  # @param region [::String]
161
182
  # Name of the region scoping this request.
162
183
  # @param request_id [::String]
163
- # 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.
164
- #
165
- # 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.
166
- #
167
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
184
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
168
185
  # @param target_pool [::String]
169
186
  # Name of the target pool to add a health check to.
170
187
  # @param target_pools_add_health_check_request_resource [::Google::Cloud::Compute::V1::TargetPoolsAddHealthCheckRequest, ::Hash]
171
188
  # The body resource for this request
172
- # @yield [result, env] Access the result along with the Faraday environment object
173
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
189
+ # @yield [result, response] Access the result along with the Faraday response object
190
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
174
191
  # @yieldparam response [::Faraday::Response]
175
192
  #
176
- # @return [::Google::Cloud::Compute::V1::Operation]
193
+ # @return [::Gapic::Rest::BaseOperation]
177
194
  #
178
195
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
179
196
  def add_health_check request, options = nil
@@ -185,7 +202,7 @@ module Google
185
202
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
186
203
 
187
204
  # Customize the options with defaults
188
- call_metadata = {}
205
+ call_metadata = @config.rpcs.add_health_check.metadata.to_h
189
206
 
190
207
  # Set x-goog-api-client header
191
208
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -193,20 +210,17 @@ module Google
193
210
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
194
211
  transports_version_send: [:rest]
195
212
 
196
- options.apply_defaults timeout: @config.timeout,
213
+ options.apply_defaults timeout: @config.rpcs.add_health_check.timeout,
197
214
  metadata: call_metadata
198
215
 
199
- uri, body, query_string_params = transcode_add_health_check request
200
- response = @client_stub.make_post_request(
201
- uri: uri,
202
- body: body,
203
- params: query_string_params,
204
- options: options
205
- )
206
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
207
-
208
- yield result, response if block_given?
209
- result
216
+ options.apply_defaults timeout: @config.timeout,
217
+ metadata: @config.metadata
218
+
219
+ @target_pools_stub.add_health_check request, options do |result, response|
220
+ result = ::Gapic::Rest::BaseOperation.new result
221
+ yield result, response if block_given?
222
+ return result
223
+ end
210
224
  rescue ::Faraday::Error => e
211
225
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
212
226
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -237,20 +251,16 @@ module Google
237
251
  # @param region [::String]
238
252
  # Name of the region scoping this request.
239
253
  # @param request_id [::String]
240
- # 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.
241
- #
242
- # 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.
243
- #
244
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
254
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
245
255
  # @param target_pool [::String]
246
256
  # Name of the TargetPool resource to add instances to.
247
257
  # @param target_pools_add_instance_request_resource [::Google::Cloud::Compute::V1::TargetPoolsAddInstanceRequest, ::Hash]
248
258
  # The body resource for this request
249
- # @yield [result, env] Access the result along with the Faraday environment object
250
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
259
+ # @yield [result, response] Access the result along with the Faraday response object
260
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
251
261
  # @yieldparam response [::Faraday::Response]
252
262
  #
253
- # @return [::Google::Cloud::Compute::V1::Operation]
263
+ # @return [::Gapic::Rest::BaseOperation]
254
264
  #
255
265
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
256
266
  def add_instance request, options = nil
@@ -262,7 +272,7 @@ module Google
262
272
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
273
 
264
274
  # Customize the options with defaults
265
- call_metadata = {}
275
+ call_metadata = @config.rpcs.add_instance.metadata.to_h
266
276
 
267
277
  # Set x-goog-api-client header
268
278
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -270,20 +280,17 @@ module Google
270
280
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
271
281
  transports_version_send: [:rest]
272
282
 
273
- options.apply_defaults timeout: @config.timeout,
283
+ options.apply_defaults timeout: @config.rpcs.add_instance.timeout,
274
284
  metadata: call_metadata
275
285
 
276
- uri, body, query_string_params = transcode_add_instance request
277
- response = @client_stub.make_post_request(
278
- uri: uri,
279
- body: body,
280
- params: query_string_params,
281
- options: options
282
- )
283
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
284
-
285
- yield result, response if block_given?
286
- result
286
+ options.apply_defaults timeout: @config.timeout,
287
+ metadata: @config.metadata
288
+
289
+ @target_pools_stub.add_instance request, options do |result, response|
290
+ result = ::Gapic::Rest::BaseOperation.new result
291
+ yield result, response if block_given?
292
+ return result
293
+ end
287
294
  rescue ::Faraday::Error => e
288
295
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
289
296
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -310,34 +317,24 @@ module Google
310
317
  # the default parameter values, pass an empty Hash as a request object (see above).
311
318
  #
312
319
  # @param filter [::String]
313
- # 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 `<`.
314
- #
315
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
316
- #
317
- # 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.
318
- #
319
- # 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) ```
320
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
320
321
  # @param include_all_scopes [::Boolean]
321
322
  # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
322
323
  # @param max_results [::Integer]
323
324
  # 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`)
324
325
  # @param order_by [::String]
325
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
326
- #
327
- # 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.
328
- #
329
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
326
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
330
327
  # @param page_token [::String]
331
328
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
332
329
  # @param project [::String]
333
330
  # Project ID for this request.
334
331
  # @param return_partial_success [::Boolean]
335
- # 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.
336
- # @yield [result, env] Access the result along with the Faraday environment object
337
- # @yieldparam result [::Google::Cloud::Compute::V1::TargetPoolAggregatedList]
332
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
333
+ # @yield [result, response] Access the result along with the Faraday response object
334
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetPoolsScopedList>]
338
335
  # @yieldparam response [::Faraday::Response]
339
336
  #
340
- # @return [::Google::Cloud::Compute::V1::TargetPoolAggregatedList]
337
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::TargetPoolsScopedList>]
341
338
  #
342
339
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
343
340
  def aggregated_list request, options = nil
@@ -349,7 +346,7 @@ module Google
349
346
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
350
347
 
351
348
  # Customize the options with defaults
352
- call_metadata = {}
349
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
353
350
 
354
351
  # Set x-goog-api-client header
355
352
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -357,19 +354,17 @@ module Google
357
354
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
358
355
  transports_version_send: [:rest]
359
356
 
360
- options.apply_defaults timeout: @config.timeout,
357
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
361
358
  metadata: call_metadata
362
359
 
363
- uri, _body, query_string_params = transcode_aggregated_list request
364
- response = @client_stub.make_get_request(
365
- uri: uri,
366
- params: query_string_params,
367
- options: options
368
- )
369
- result = ::Google::Cloud::Compute::V1::TargetPoolAggregatedList.decode_json response.body, ignore_unknown_fields: true
360
+ options.apply_defaults timeout: @config.timeout,
361
+ metadata: @config.metadata
370
362
 
371
- yield result, response if block_given?
372
- result
363
+ @target_pools_stub.aggregated_list request, options do |result, response|
364
+ result = ::Gapic::Rest::PagedEnumerable.new @target_pools_stub, :aggregated_list, "items", request, result, options
365
+ yield result, response if block_given?
366
+ return result
367
+ end
373
368
  rescue ::Faraday::Error => e
374
369
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
375
370
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -400,18 +395,14 @@ module Google
400
395
  # @param region [::String]
401
396
  # Name of the region scoping this request.
402
397
  # @param request_id [::String]
403
- # 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.
404
- #
405
- # 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.
406
- #
407
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
398
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
408
399
  # @param target_pool [::String]
409
400
  # Name of the TargetPool resource to delete.
410
- # @yield [result, env] Access the result along with the Faraday environment object
411
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
401
+ # @yield [result, response] Access the result along with the Faraday response object
402
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
412
403
  # @yieldparam response [::Faraday::Response]
413
404
  #
414
- # @return [::Google::Cloud::Compute::V1::Operation]
405
+ # @return [::Gapic::Rest::BaseOperation]
415
406
  #
416
407
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
417
408
  def delete request, options = nil
@@ -423,7 +414,7 @@ module Google
423
414
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
424
415
 
425
416
  # Customize the options with defaults
426
- call_metadata = {}
417
+ call_metadata = @config.rpcs.delete.metadata.to_h
427
418
 
428
419
  # Set x-goog-api-client header
429
420
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -431,19 +422,17 @@ module Google
431
422
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
432
423
  transports_version_send: [:rest]
433
424
 
434
- options.apply_defaults timeout: @config.timeout,
425
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
435
426
  metadata: call_metadata
436
427
 
437
- uri, _body, query_string_params = transcode_delete request
438
- response = @client_stub.make_delete_request(
439
- uri: uri,
440
- params: query_string_params,
441
- options: options
442
- )
443
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
428
+ options.apply_defaults timeout: @config.timeout,
429
+ metadata: @config.metadata
444
430
 
445
- yield result, response if block_given?
446
- result
431
+ @target_pools_stub.delete request, options do |result, response|
432
+ result = ::Gapic::Rest::BaseOperation.new result
433
+ yield result, response if block_given?
434
+ return result
435
+ end
447
436
  rescue ::Faraday::Error => e
448
437
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
449
438
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -475,7 +464,7 @@ module Google
475
464
  # Name of the region scoping this request.
476
465
  # @param target_pool [::String]
477
466
  # Name of the TargetPool resource to return.
478
- # @yield [result, env] Access the result along with the Faraday environment object
467
+ # @yield [result, response] Access the result along with the Faraday response object
479
468
  # @yieldparam result [::Google::Cloud::Compute::V1::TargetPool]
480
469
  # @yieldparam response [::Faraday::Response]
481
470
  #
@@ -491,7 +480,7 @@ module Google
491
480
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
492
481
 
493
482
  # Customize the options with defaults
494
- call_metadata = {}
483
+ call_metadata = @config.rpcs.get.metadata.to_h
495
484
 
496
485
  # Set x-goog-api-client header
497
486
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -499,18 +488,16 @@ module Google
499
488
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
500
489
  transports_version_send: [:rest]
501
490
 
502
- options.apply_defaults timeout: @config.timeout,
491
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
503
492
  metadata: call_metadata
504
493
 
505
- uri, _body, _query_string_params = transcode_get request
506
- response = @client_stub.make_get_request(
507
- uri: uri,
508
- options: options
509
- )
510
- result = ::Google::Cloud::Compute::V1::TargetPool.decode_json response.body, ignore_unknown_fields: true
494
+ options.apply_defaults timeout: @config.timeout,
495
+ metadata: @config.metadata
511
496
 
512
- yield result, response if block_given?
513
- result
497
+ @target_pools_stub.get request, options do |result, response|
498
+ yield result, response if block_given?
499
+ return result
500
+ end
514
501
  rescue ::Faraday::Error => e
515
502
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
516
503
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -544,7 +531,7 @@ module Google
544
531
  # Name of the region scoping this request.
545
532
  # @param target_pool [::String]
546
533
  # Name of the TargetPool resource to which the queried instance belongs.
547
- # @yield [result, env] Access the result along with the Faraday environment object
534
+ # @yield [result, response] Access the result along with the Faraday response object
548
535
  # @yieldparam result [::Google::Cloud::Compute::V1::TargetPoolInstanceHealth]
549
536
  # @yieldparam response [::Faraday::Response]
550
537
  #
@@ -560,7 +547,7 @@ module Google
560
547
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
561
548
 
562
549
  # Customize the options with defaults
563
- call_metadata = {}
550
+ call_metadata = @config.rpcs.get_health.metadata.to_h
564
551
 
565
552
  # Set x-goog-api-client header
566
553
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -568,19 +555,16 @@ module Google
568
555
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
569
556
  transports_version_send: [:rest]
570
557
 
571
- options.apply_defaults timeout: @config.timeout,
558
+ options.apply_defaults timeout: @config.rpcs.get_health.timeout,
572
559
  metadata: call_metadata
573
560
 
574
- uri, body, _query_string_params = transcode_get_health request
575
- response = @client_stub.make_post_request(
576
- uri: uri,
577
- body: body,
578
- options: options
579
- )
580
- result = ::Google::Cloud::Compute::V1::TargetPoolInstanceHealth.decode_json response.body, ignore_unknown_fields: true
561
+ options.apply_defaults timeout: @config.timeout,
562
+ metadata: @config.metadata
581
563
 
582
- yield result, response if block_given?
583
- result
564
+ @target_pools_stub.get_health request, options do |result, response|
565
+ yield result, response if block_given?
566
+ return result
567
+ end
584
568
  rescue ::Faraday::Error => e
585
569
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
586
570
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -611,18 +595,14 @@ module Google
611
595
  # @param region [::String]
612
596
  # Name of the region scoping this request.
613
597
  # @param request_id [::String]
614
- # 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.
615
- #
616
- # 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.
617
- #
618
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
598
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
619
599
  # @param target_pool_resource [::Google::Cloud::Compute::V1::TargetPool, ::Hash]
620
600
  # The body resource for this request
621
- # @yield [result, env] Access the result along with the Faraday environment object
622
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
601
+ # @yield [result, response] Access the result along with the Faraday response object
602
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
623
603
  # @yieldparam response [::Faraday::Response]
624
604
  #
625
- # @return [::Google::Cloud::Compute::V1::Operation]
605
+ # @return [::Gapic::Rest::BaseOperation]
626
606
  #
627
607
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
628
608
  def insert request, options = nil
@@ -634,7 +614,7 @@ module Google
634
614
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
635
615
 
636
616
  # Customize the options with defaults
637
- call_metadata = {}
617
+ call_metadata = @config.rpcs.insert.metadata.to_h
638
618
 
639
619
  # Set x-goog-api-client header
640
620
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -642,20 +622,17 @@ module Google
642
622
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
643
623
  transports_version_send: [:rest]
644
624
 
645
- options.apply_defaults timeout: @config.timeout,
625
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
646
626
  metadata: call_metadata
647
627
 
648
- uri, body, query_string_params = transcode_insert request
649
- response = @client_stub.make_post_request(
650
- uri: uri,
651
- body: body,
652
- params: query_string_params,
653
- options: options
654
- )
655
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
656
-
657
- yield result, response if block_given?
658
- result
628
+ options.apply_defaults timeout: @config.timeout,
629
+ metadata: @config.metadata
630
+
631
+ @target_pools_stub.insert request, options do |result, response|
632
+ result = ::Gapic::Rest::BaseOperation.new result
633
+ yield result, response if block_given?
634
+ return result
635
+ end
659
636
  rescue ::Faraday::Error => e
660
637
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
661
638
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -682,21 +659,11 @@ module Google
682
659
  # the default parameter values, pass an empty Hash as a request object (see above).
683
660
  #
684
661
  # @param filter [::String]
685
- # 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 `<`.
686
- #
687
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
688
- #
689
- # 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.
690
- #
691
- # 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) ```
662
+ # A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `>`, or `<`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
692
663
  # @param max_results [::Integer]
693
664
  # 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`)
694
665
  # @param order_by [::String]
695
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
696
- #
697
- # 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.
698
- #
699
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
666
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
700
667
  # @param page_token [::String]
701
668
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
702
669
  # @param project [::String]
@@ -704,12 +671,12 @@ module Google
704
671
  # @param region [::String]
705
672
  # Name of the region scoping this request.
706
673
  # @param return_partial_success [::Boolean]
707
- # 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.
708
- # @yield [result, env] Access the result along with the Faraday environment object
709
- # @yieldparam result [::Google::Cloud::Compute::V1::TargetPoolList]
674
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
675
+ # @yield [result, response] Access the result along with the Faraday response object
676
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::TargetPool>]
710
677
  # @yieldparam response [::Faraday::Response]
711
678
  #
712
- # @return [::Google::Cloud::Compute::V1::TargetPoolList]
679
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::TargetPool>]
713
680
  #
714
681
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
715
682
  def list request, options = nil
@@ -721,7 +688,7 @@ module Google
721
688
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
722
689
 
723
690
  # Customize the options with defaults
724
- call_metadata = {}
691
+ call_metadata = @config.rpcs.list.metadata.to_h
725
692
 
726
693
  # Set x-goog-api-client header
727
694
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -729,19 +696,17 @@ module Google
729
696
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
730
697
  transports_version_send: [:rest]
731
698
 
732
- options.apply_defaults timeout: @config.timeout,
699
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
733
700
  metadata: call_metadata
734
701
 
735
- uri, _body, query_string_params = transcode_list request
736
- response = @client_stub.make_get_request(
737
- uri: uri,
738
- params: query_string_params,
739
- options: options
740
- )
741
- result = ::Google::Cloud::Compute::V1::TargetPoolList.decode_json response.body, ignore_unknown_fields: true
702
+ options.apply_defaults timeout: @config.timeout,
703
+ metadata: @config.metadata
742
704
 
743
- yield result, response if block_given?
744
- result
705
+ @target_pools_stub.list request, options do |result, response|
706
+ result = ::Gapic::Rest::PagedEnumerable.new @target_pools_stub, :list, "items", request, result, options
707
+ yield result, response if block_given?
708
+ return result
709
+ end
745
710
  rescue ::Faraday::Error => e
746
711
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
747
712
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -772,20 +737,16 @@ module Google
772
737
  # @param region [::String]
773
738
  # Name of the region for this request.
774
739
  # @param request_id [::String]
775
- # 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.
776
- #
777
- # 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.
778
- #
779
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
740
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
780
741
  # @param target_pool [::String]
781
742
  # Name of the target pool to remove health checks from.
782
743
  # @param target_pools_remove_health_check_request_resource [::Google::Cloud::Compute::V1::TargetPoolsRemoveHealthCheckRequest, ::Hash]
783
744
  # The body resource for this request
784
- # @yield [result, env] Access the result along with the Faraday environment object
785
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
745
+ # @yield [result, response] Access the result along with the Faraday response object
746
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
786
747
  # @yieldparam response [::Faraday::Response]
787
748
  #
788
- # @return [::Google::Cloud::Compute::V1::Operation]
749
+ # @return [::Gapic::Rest::BaseOperation]
789
750
  #
790
751
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
791
752
  def remove_health_check request, options = nil
@@ -797,7 +758,7 @@ module Google
797
758
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
798
759
 
799
760
  # Customize the options with defaults
800
- call_metadata = {}
761
+ call_metadata = @config.rpcs.remove_health_check.metadata.to_h
801
762
 
802
763
  # Set x-goog-api-client header
803
764
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -805,20 +766,17 @@ module Google
805
766
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
806
767
  transports_version_send: [:rest]
807
768
 
808
- options.apply_defaults timeout: @config.timeout,
769
+ options.apply_defaults timeout: @config.rpcs.remove_health_check.timeout,
809
770
  metadata: call_metadata
810
771
 
811
- uri, body, query_string_params = transcode_remove_health_check request
812
- response = @client_stub.make_post_request(
813
- uri: uri,
814
- body: body,
815
- params: query_string_params,
816
- options: options
817
- )
818
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
819
-
820
- yield result, response if block_given?
821
- result
772
+ options.apply_defaults timeout: @config.timeout,
773
+ metadata: @config.metadata
774
+
775
+ @target_pools_stub.remove_health_check request, options do |result, response|
776
+ result = ::Gapic::Rest::BaseOperation.new result
777
+ yield result, response if block_given?
778
+ return result
779
+ end
822
780
  rescue ::Faraday::Error => e
823
781
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
824
782
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -849,20 +807,16 @@ module Google
849
807
  # @param region [::String]
850
808
  # Name of the region scoping this request.
851
809
  # @param request_id [::String]
852
- # 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.
853
- #
854
- # 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.
855
- #
856
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
810
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
857
811
  # @param target_pool [::String]
858
812
  # Name of the TargetPool resource to remove instances from.
859
813
  # @param target_pools_remove_instance_request_resource [::Google::Cloud::Compute::V1::TargetPoolsRemoveInstanceRequest, ::Hash]
860
814
  # The body resource for this request
861
- # @yield [result, env] Access the result along with the Faraday environment object
862
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
815
+ # @yield [result, response] Access the result along with the Faraday response object
816
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
863
817
  # @yieldparam response [::Faraday::Response]
864
818
  #
865
- # @return [::Google::Cloud::Compute::V1::Operation]
819
+ # @return [::Gapic::Rest::BaseOperation]
866
820
  #
867
821
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
868
822
  def remove_instance request, options = nil
@@ -874,7 +828,7 @@ module Google
874
828
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
875
829
 
876
830
  # Customize the options with defaults
877
- call_metadata = {}
831
+ call_metadata = @config.rpcs.remove_instance.metadata.to_h
878
832
 
879
833
  # Set x-goog-api-client header
880
834
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -882,20 +836,17 @@ module Google
882
836
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
883
837
  transports_version_send: [:rest]
884
838
 
885
- options.apply_defaults timeout: @config.timeout,
839
+ options.apply_defaults timeout: @config.rpcs.remove_instance.timeout,
886
840
  metadata: call_metadata
887
841
 
888
- uri, body, query_string_params = transcode_remove_instance request
889
- response = @client_stub.make_post_request(
890
- uri: uri,
891
- body: body,
892
- params: query_string_params,
893
- options: options
894
- )
895
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
896
-
897
- yield result, response if block_given?
898
- result
842
+ options.apply_defaults timeout: @config.timeout,
843
+ metadata: @config.metadata
844
+
845
+ @target_pools_stub.remove_instance request, options do |result, response|
846
+ result = ::Gapic::Rest::BaseOperation.new result
847
+ yield result, response if block_given?
848
+ return result
849
+ end
899
850
  rescue ::Faraday::Error => e
900
851
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
901
852
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -928,20 +879,16 @@ module Google
928
879
  # @param region [::String]
929
880
  # Name of the region scoping this request.
930
881
  # @param request_id [::String]
931
- # 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.
932
- #
933
- # 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.
934
- #
935
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
882
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
936
883
  # @param target_pool [::String]
937
884
  # Name of the TargetPool resource to set a backup pool for.
938
885
  # @param target_reference_resource [::Google::Cloud::Compute::V1::TargetReference, ::Hash]
939
886
  # The body resource for this request
940
- # @yield [result, env] Access the result along with the Faraday environment object
941
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
887
+ # @yield [result, response] Access the result along with the Faraday response object
888
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
942
889
  # @yieldparam response [::Faraday::Response]
943
890
  #
944
- # @return [::Google::Cloud::Compute::V1::Operation]
891
+ # @return [::Gapic::Rest::BaseOperation]
945
892
  #
946
893
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
947
894
  def set_backup request, options = nil
@@ -953,7 +900,7 @@ module Google
953
900
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
954
901
 
955
902
  # Customize the options with defaults
956
- call_metadata = {}
903
+ call_metadata = @config.rpcs.set_backup.metadata.to_h
957
904
 
958
905
  # Set x-goog-api-client header
959
906
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -961,20 +908,17 @@ module Google
961
908
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
962
909
  transports_version_send: [:rest]
963
910
 
964
- options.apply_defaults timeout: @config.timeout,
911
+ options.apply_defaults timeout: @config.rpcs.set_backup.timeout,
965
912
  metadata: call_metadata
966
913
 
967
- uri, body, query_string_params = transcode_set_backup request
968
- response = @client_stub.make_post_request(
969
- uri: uri,
970
- body: body,
971
- params: query_string_params,
972
- options: options
973
- )
974
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
975
-
976
- yield result, response if block_given?
977
- result
914
+ options.apply_defaults timeout: @config.timeout,
915
+ metadata: @config.metadata
916
+
917
+ @target_pools_stub.set_backup request, options do |result, response|
918
+ result = ::Gapic::Rest::BaseOperation.new result
919
+ yield result, response if block_given?
920
+ return result
921
+ end
978
922
  rescue ::Faraday::Error => e
979
923
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
980
924
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1029,6 +973,9 @@ module Google
1029
973
  # @!attribute [rw] timeout
1030
974
  # The call timeout in seconds.
1031
975
  # @return [::Numeric]
976
+ # @!attribute [rw] metadata
977
+ # Additional REST headers to be sent with the call.
978
+ # @return [::Hash{::Symbol=>::String}]
1032
979
  #
1033
980
  class Configuration
1034
981
  extend ::Gapic::Config
@@ -1042,6 +989,7 @@ module Google
1042
989
  config_attr :lib_name, nil, ::String, nil
1043
990
  config_attr :lib_version, nil, ::String, nil
1044
991
  config_attr :timeout, nil, ::Numeric, nil
992
+ config_attr :metadata, nil, ::Hash, nil
1045
993
 
1046
994
  # @private
1047
995
  def initialize parent_config = nil
@@ -1049,6 +997,116 @@ module Google
1049
997
 
1050
998
  yield self if block_given?
1051
999
  end
1000
+
1001
+ ##
1002
+ # Configurations for individual RPCs
1003
+ # @return [Rpcs]
1004
+ #
1005
+ def rpcs
1006
+ @rpcs ||= begin
1007
+ parent_rpcs = nil
1008
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1009
+ Rpcs.new parent_rpcs
1010
+ end
1011
+ end
1012
+
1013
+ ##
1014
+ # Configuration RPC class for the TargetPools API.
1015
+ #
1016
+ # Includes fields providing the configuration for each RPC in this service.
1017
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1018
+ # the following configuration fields:
1019
+ #
1020
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1021
+ #
1022
+ # there is one other field (`retry_policy`) that can be set
1023
+ # but is currently not supported for REST Gapic libraries.
1024
+ #
1025
+ class Rpcs
1026
+ ##
1027
+ # RPC-specific configuration for `add_health_check`
1028
+ # @return [::Gapic::Config::Method]
1029
+ #
1030
+ attr_reader :add_health_check
1031
+ ##
1032
+ # RPC-specific configuration for `add_instance`
1033
+ # @return [::Gapic::Config::Method]
1034
+ #
1035
+ attr_reader :add_instance
1036
+ ##
1037
+ # RPC-specific configuration for `aggregated_list`
1038
+ # @return [::Gapic::Config::Method]
1039
+ #
1040
+ attr_reader :aggregated_list
1041
+ ##
1042
+ # RPC-specific configuration for `delete`
1043
+ # @return [::Gapic::Config::Method]
1044
+ #
1045
+ attr_reader :delete
1046
+ ##
1047
+ # RPC-specific configuration for `get`
1048
+ # @return [::Gapic::Config::Method]
1049
+ #
1050
+ attr_reader :get
1051
+ ##
1052
+ # RPC-specific configuration for `get_health`
1053
+ # @return [::Gapic::Config::Method]
1054
+ #
1055
+ attr_reader :get_health
1056
+ ##
1057
+ # RPC-specific configuration for `insert`
1058
+ # @return [::Gapic::Config::Method]
1059
+ #
1060
+ attr_reader :insert
1061
+ ##
1062
+ # RPC-specific configuration for `list`
1063
+ # @return [::Gapic::Config::Method]
1064
+ #
1065
+ attr_reader :list
1066
+ ##
1067
+ # RPC-specific configuration for `remove_health_check`
1068
+ # @return [::Gapic::Config::Method]
1069
+ #
1070
+ attr_reader :remove_health_check
1071
+ ##
1072
+ # RPC-specific configuration for `remove_instance`
1073
+ # @return [::Gapic::Config::Method]
1074
+ #
1075
+ attr_reader :remove_instance
1076
+ ##
1077
+ # RPC-specific configuration for `set_backup`
1078
+ # @return [::Gapic::Config::Method]
1079
+ #
1080
+ attr_reader :set_backup
1081
+
1082
+ # @private
1083
+ def initialize parent_rpcs = nil
1084
+ add_health_check_config = parent_rpcs.add_health_check if parent_rpcs.respond_to? :add_health_check
1085
+ @add_health_check = ::Gapic::Config::Method.new add_health_check_config
1086
+ add_instance_config = parent_rpcs.add_instance if parent_rpcs.respond_to? :add_instance
1087
+ @add_instance = ::Gapic::Config::Method.new add_instance_config
1088
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
1089
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
1090
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
1091
+ @delete = ::Gapic::Config::Method.new delete_config
1092
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
1093
+ @get = ::Gapic::Config::Method.new get_config
1094
+ get_health_config = parent_rpcs.get_health if parent_rpcs.respond_to? :get_health
1095
+ @get_health = ::Gapic::Config::Method.new get_health_config
1096
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
1097
+ @insert = ::Gapic::Config::Method.new insert_config
1098
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
1099
+ @list = ::Gapic::Config::Method.new list_config
1100
+ remove_health_check_config = parent_rpcs.remove_health_check if parent_rpcs.respond_to? :remove_health_check
1101
+ @remove_health_check = ::Gapic::Config::Method.new remove_health_check_config
1102
+ remove_instance_config = parent_rpcs.remove_instance if parent_rpcs.respond_to? :remove_instance
1103
+ @remove_instance = ::Gapic::Config::Method.new remove_instance_config
1104
+ set_backup_config = parent_rpcs.set_backup if parent_rpcs.respond_to? :set_backup
1105
+ @set_backup = ::Gapic::Config::Method.new set_backup_config
1106
+
1107
+ yield self if block_given?
1108
+ end
1109
+ end
1052
1110
  end
1053
1111
  end
1054
1112
  end