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/instance_groups/rest/service_stub"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -31,8 +32,6 @@ module Google
31
32
  # The InstanceGroups API.
32
33
  #
33
34
  class Client
34
- include GrpcTranscoding
35
-
36
35
  # @private
37
36
  attr_reader :instance_groups_stub
38
37
 
@@ -42,13 +41,12 @@ module Google
42
41
  # See {::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client::Configuration}
43
42
  # for a description of the configuration fields.
44
43
  #
45
- # ## Example
46
- #
47
- # To modify the configuration for all InstanceGroups clients:
44
+ # @example
48
45
  #
49
- # ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
46
+ # # Modify the configuration for all InstanceGroups clients
47
+ # ::Google::Cloud::Compute::V1::InstanceGroups::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,33 @@ module Google
66
64
  end
67
65
  default_config = Client::Configuration.new parent_config
68
66
 
67
+ default_config.rpcs.add_instances.timeout = 600.0
68
+
69
+ default_config.rpcs.aggregated_list.timeout = 600.0
70
+ default_config.rpcs.aggregated_list.retry_policy = {
71
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
72
+ }
73
+
74
+ default_config.rpcs.delete.timeout = 600.0
75
+
76
+ default_config.rpcs.get.timeout = 600.0
77
+ default_config.rpcs.get.retry_policy = {
78
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
79
+ }
80
+
81
+ default_config.rpcs.insert.timeout = 600.0
82
+
83
+ default_config.rpcs.list.timeout = 600.0
84
+ default_config.rpcs.list.retry_policy = {
85
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
86
+ }
87
+
88
+ default_config.rpcs.list_instances.timeout = 600.0
89
+
90
+ default_config.rpcs.remove_instances.timeout = 600.0
91
+
92
+ default_config.rpcs.set_named_ports.timeout = 600.0
93
+
69
94
  default_config
70
95
  end
71
96
  yield @configure if block_given?
@@ -95,28 +120,20 @@ module Google
95
120
  ##
96
121
  # Create a new InstanceGroups REST client object.
97
122
  #
98
- # ## Examples
99
- #
100
- # To create a new InstanceGroups REST client with the default
101
- # configuration:
123
+ # @example
102
124
  #
103
- # client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new
125
+ # # Create a client using the default configuration
126
+ # client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new
104
127
  #
105
- # To create a new InstanceGroups REST client with a custom
106
- # configuration:
107
- #
108
- # client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new do |config|
109
- # config.timeout = 10.0
110
- # end
128
+ # # Create a client using a custom configuration
129
+ # client = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::Client.new do |config|
130
+ # config.timeout = 10.0
131
+ # end
111
132
  #
112
133
  # @yield [config] Configure the InstanceGroups client.
113
134
  # @yieldparam config [Client::Configuration]
114
135
  #
115
136
  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
137
  # Create the configuration object
121
138
  @config = Configuration.new Client.configure
122
139
 
@@ -126,17 +143,17 @@ module Google
126
143
  # Create credentials
127
144
  credentials = @config.credentials
128
145
  credentials ||= Credentials.default scope: @config.scope
129
- if credentials.is_a?(String) || credentials.is_a?(Hash)
146
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
130
147
  credentials = Credentials.new credentials, scope: @config.scope
131
148
  end
132
149
 
133
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: @config.endpoint, credentials: credentials
150
+ @instance_groups_stub = ::Google::Cloud::Compute::V1::InstanceGroups::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
134
151
  end
135
152
 
136
153
  # Service calls
137
154
 
138
155
  ##
139
- # Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
156
+ # Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.
140
157
  #
141
158
  # @overload add_instances(request, options = nil)
142
159
  # Pass arguments to `add_instances` via a request object, either of type
@@ -162,18 +179,14 @@ module Google
162
179
  # @param project [::String]
163
180
  # Project ID for this request.
164
181
  # @param request_id [::String]
165
- # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
166
- #
167
- # For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
168
- #
169
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
182
+ # 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).
170
183
  # @param zone [::String]
171
184
  # The name of the zone where the instance group is located.
172
- # @yield [result, env] Access the result along with the Faraday environment object
173
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
185
+ # @yield [result, response] Access the result along with the Faraday response object
186
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
174
187
  # @yieldparam response [::Faraday::Response]
175
188
  #
176
- # @return [::Google::Cloud::Compute::V1::Operation]
189
+ # @return [::Gapic::Rest::BaseOperation]
177
190
  #
178
191
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
179
192
  def add_instances request, options = nil
@@ -185,7 +198,7 @@ module Google
185
198
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
186
199
 
187
200
  # Customize the options with defaults
188
- call_metadata = {}
201
+ call_metadata = @config.rpcs.add_instances.metadata.to_h
189
202
 
190
203
  # Set x-goog-api-client header
191
204
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -193,20 +206,17 @@ module Google
193
206
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
194
207
  transports_version_send: [:rest]
195
208
 
196
- options.apply_defaults timeout: @config.timeout,
209
+ options.apply_defaults timeout: @config.rpcs.add_instances.timeout,
197
210
  metadata: call_metadata
198
211
 
199
- uri, body, query_string_params = transcode_add_instances 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
212
+ options.apply_defaults timeout: @config.timeout,
213
+ metadata: @config.metadata
214
+
215
+ @instance_groups_stub.add_instances request, options do |result, response|
216
+ result = ::Gapic::Rest::BaseOperation.new result
217
+ yield result, response if block_given?
218
+ return result
219
+ end
210
220
  rescue ::Faraday::Error => e
211
221
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
212
222
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -233,34 +243,24 @@ module Google
233
243
  # the default parameter values, pass an empty Hash as a request object (see above).
234
244
  #
235
245
  # @param filter [::String]
236
- # 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 `<`.
237
- #
238
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
239
- #
240
- # 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.
241
- #
242
- # 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) ```
246
+ # 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) ```
243
247
  # @param include_all_scopes [::Boolean]
244
248
  # 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.
245
249
  # @param max_results [::Integer]
246
250
  # 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`)
247
251
  # @param order_by [::String]
248
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
249
- #
250
- # 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.
251
- #
252
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
252
+ # 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.
253
253
  # @param page_token [::String]
254
254
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
255
255
  # @param project [::String]
256
256
  # Project ID for this request.
257
257
  # @param return_partial_success [::Boolean]
258
- # 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.
259
- # @yield [result, env] Access the result along with the Faraday environment object
260
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupAggregatedList]
258
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
259
+ # @yield [result, response] Access the result along with the Faraday response object
260
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstanceGroupsScopedList>]
261
261
  # @yieldparam response [::Faraday::Response]
262
262
  #
263
- # @return [::Google::Cloud::Compute::V1::InstanceGroupAggregatedList]
263
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstanceGroupsScopedList>]
264
264
  #
265
265
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
266
266
  def aggregated_list request, options = nil
@@ -272,7 +272,7 @@ module Google
272
272
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
273
273
 
274
274
  # Customize the options with defaults
275
- call_metadata = {}
275
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
276
276
 
277
277
  # Set x-goog-api-client header
278
278
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -280,26 +280,24 @@ module Google
280
280
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
281
281
  transports_version_send: [:rest]
282
282
 
283
- options.apply_defaults timeout: @config.timeout,
283
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
284
284
  metadata: call_metadata
285
285
 
286
- uri, _body, query_string_params = transcode_aggregated_list request
287
- response = @client_stub.make_get_request(
288
- uri: uri,
289
- params: query_string_params,
290
- options: options
291
- )
292
- result = ::Google::Cloud::Compute::V1::InstanceGroupAggregatedList.decode_json response.body, ignore_unknown_fields: true
286
+ options.apply_defaults timeout: @config.timeout,
287
+ metadata: @config.metadata
293
288
 
294
- yield result, response if block_given?
295
- result
289
+ @instance_groups_stub.aggregated_list request, options do |result, response|
290
+ result = ::Gapic::Rest::PagedEnumerable.new @instance_groups_stub, :aggregated_list, "items", request, result, options
291
+ yield result, response if block_given?
292
+ return result
293
+ end
296
294
  rescue ::Faraday::Error => e
297
295
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
298
296
  raise ::Google::Cloud::Error.from_error(gapic_error)
299
297
  end
300
298
 
301
299
  ##
302
- # Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
300
+ # Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.
303
301
  #
304
302
  # @overload delete(request, options = nil)
305
303
  # Pass arguments to `delete` via a request object, either of type
@@ -323,18 +321,14 @@ module Google
323
321
  # @param project [::String]
324
322
  # Project ID for this request.
325
323
  # @param request_id [::String]
326
- # 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.
327
- #
328
- # 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.
329
- #
330
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
324
+ # 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).
331
325
  # @param zone [::String]
332
326
  # The name of the zone where the instance group is located.
333
- # @yield [result, env] Access the result along with the Faraday environment object
334
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
327
+ # @yield [result, response] Access the result along with the Faraday response object
328
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
335
329
  # @yieldparam response [::Faraday::Response]
336
330
  #
337
- # @return [::Google::Cloud::Compute::V1::Operation]
331
+ # @return [::Gapic::Rest::BaseOperation]
338
332
  #
339
333
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
340
334
  def delete request, options = nil
@@ -346,7 +340,7 @@ module Google
346
340
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
347
341
 
348
342
  # Customize the options with defaults
349
- call_metadata = {}
343
+ call_metadata = @config.rpcs.delete.metadata.to_h
350
344
 
351
345
  # Set x-goog-api-client header
352
346
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -354,28 +348,24 @@ module Google
354
348
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
355
349
  transports_version_send: [:rest]
356
350
 
357
- options.apply_defaults timeout: @config.timeout,
351
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
358
352
  metadata: call_metadata
359
353
 
360
- uri, _body, query_string_params = transcode_delete request
361
- response = @client_stub.make_delete_request(
362
- uri: uri,
363
- params: query_string_params,
364
- options: options
365
- )
366
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
354
+ options.apply_defaults timeout: @config.timeout,
355
+ metadata: @config.metadata
367
356
 
368
- yield result, response if block_given?
369
- result
357
+ @instance_groups_stub.delete request, options do |result, response|
358
+ result = ::Gapic::Rest::BaseOperation.new result
359
+ yield result, response if block_given?
360
+ return result
361
+ end
370
362
  rescue ::Faraday::Error => e
371
363
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
372
364
  raise ::Google::Cloud::Error.from_error(gapic_error)
373
365
  end
374
366
 
375
367
  ##
376
- # Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request.
377
- #
378
- # For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
368
+ # Returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
379
369
  #
380
370
  # @overload get(request, options = nil)
381
371
  # Pass arguments to `get` via a request object, either of type
@@ -400,7 +390,7 @@ module Google
400
390
  # Project ID for this request.
401
391
  # @param zone [::String]
402
392
  # The name of the zone where the instance group is located.
403
- # @yield [result, env] Access the result along with the Faraday environment object
393
+ # @yield [result, response] Access the result along with the Faraday response object
404
394
  # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroup]
405
395
  # @yieldparam response [::Faraday::Response]
406
396
  #
@@ -416,7 +406,7 @@ module Google
416
406
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
417
407
 
418
408
  # Customize the options with defaults
419
- call_metadata = {}
409
+ call_metadata = @config.rpcs.get.metadata.to_h
420
410
 
421
411
  # Set x-goog-api-client header
422
412
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -424,18 +414,16 @@ module Google
424
414
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
425
415
  transports_version_send: [:rest]
426
416
 
427
- options.apply_defaults timeout: @config.timeout,
417
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
428
418
  metadata: call_metadata
429
419
 
430
- uri, _body, _query_string_params = transcode_get request
431
- response = @client_stub.make_get_request(
432
- uri: uri,
433
- options: options
434
- )
435
- result = ::Google::Cloud::Compute::V1::InstanceGroup.decode_json response.body, ignore_unknown_fields: true
420
+ options.apply_defaults timeout: @config.timeout,
421
+ metadata: @config.metadata
436
422
 
437
- yield result, response if block_given?
438
- result
423
+ @instance_groups_stub.get request, options do |result, response|
424
+ yield result, response if block_given?
425
+ return result
426
+ end
439
427
  rescue ::Faraday::Error => e
440
428
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
441
429
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -466,18 +454,14 @@ module Google
466
454
  # @param project [::String]
467
455
  # Project ID for this request.
468
456
  # @param request_id [::String]
469
- # 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.
470
- #
471
- # 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.
472
- #
473
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
457
+ # 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).
474
458
  # @param zone [::String]
475
459
  # The name of the zone where you want to create the instance group.
476
- # @yield [result, env] Access the result along with the Faraday environment object
477
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
460
+ # @yield [result, response] Access the result along with the Faraday response object
461
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
478
462
  # @yieldparam response [::Faraday::Response]
479
463
  #
480
- # @return [::Google::Cloud::Compute::V1::Operation]
464
+ # @return [::Gapic::Rest::BaseOperation]
481
465
  #
482
466
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
483
467
  def insert request, options = nil
@@ -489,7 +473,7 @@ module Google
489
473
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
490
474
 
491
475
  # Customize the options with defaults
492
- call_metadata = {}
476
+ call_metadata = @config.rpcs.insert.metadata.to_h
493
477
 
494
478
  # Set x-goog-api-client header
495
479
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -497,29 +481,24 @@ module Google
497
481
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
498
482
  transports_version_send: [:rest]
499
483
 
500
- options.apply_defaults timeout: @config.timeout,
484
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
501
485
  metadata: call_metadata
502
486
 
503
- uri, body, query_string_params = transcode_insert request
504
- response = @client_stub.make_post_request(
505
- uri: uri,
506
- body: body,
507
- params: query_string_params,
508
- options: options
509
- )
510
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
511
-
512
- yield result, response if block_given?
513
- result
487
+ options.apply_defaults timeout: @config.timeout,
488
+ metadata: @config.metadata
489
+
490
+ @instance_groups_stub.insert request, options do |result, response|
491
+ result = ::Gapic::Rest::BaseOperation.new result
492
+ yield result, response if block_given?
493
+ return result
494
+ end
514
495
  rescue ::Faraday::Error => e
515
496
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
516
497
  raise ::Google::Cloud::Error.from_error(gapic_error)
517
498
  end
518
499
 
519
500
  ##
520
- # Retrieves the list of zonal instance group resources contained within the specified zone.
521
- #
522
- # For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
501
+ # Retrieves the list of zonal instance group resources contained within the specified zone. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.
523
502
  #
524
503
  # @overload list(request, options = nil)
525
504
  # Pass arguments to `list` via a request object, either of type
@@ -539,34 +518,24 @@ module Google
539
518
  # the default parameter values, pass an empty Hash as a request object (see above).
540
519
  #
541
520
  # @param filter [::String]
542
- # 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 `<`.
543
- #
544
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
545
- #
546
- # 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.
547
- #
548
- # 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) ```
521
+ # 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) ```
549
522
  # @param max_results [::Integer]
550
523
  # 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`)
551
524
  # @param order_by [::String]
552
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
553
- #
554
- # 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.
555
- #
556
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
525
+ # 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.
557
526
  # @param page_token [::String]
558
527
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
559
528
  # @param project [::String]
560
529
  # Project ID for this request.
561
530
  # @param return_partial_success [::Boolean]
562
- # 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.
531
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
563
532
  # @param zone [::String]
564
533
  # The name of the zone where the instance group is located.
565
- # @yield [result, env] Access the result along with the Faraday environment object
566
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupList]
534
+ # @yield [result, response] Access the result along with the Faraday response object
535
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroup>]
567
536
  # @yieldparam response [::Faraday::Response]
568
537
  #
569
- # @return [::Google::Cloud::Compute::V1::InstanceGroupList]
538
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroup>]
570
539
  #
571
540
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
572
541
  def list request, options = nil
@@ -578,7 +547,7 @@ module Google
578
547
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
579
548
 
580
549
  # Customize the options with defaults
581
- call_metadata = {}
550
+ call_metadata = @config.rpcs.list.metadata.to_h
582
551
 
583
552
  # Set x-goog-api-client header
584
553
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -586,19 +555,17 @@ module Google
586
555
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
587
556
  transports_version_send: [:rest]
588
557
 
589
- options.apply_defaults timeout: @config.timeout,
558
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
590
559
  metadata: call_metadata
591
560
 
592
- uri, _body, query_string_params = transcode_list request
593
- response = @client_stub.make_get_request(
594
- uri: uri,
595
- params: query_string_params,
596
- options: options
597
- )
598
- result = ::Google::Cloud::Compute::V1::InstanceGroupList.decode_json response.body, ignore_unknown_fields: true
561
+ options.apply_defaults timeout: @config.timeout,
562
+ metadata: @config.metadata
599
563
 
600
- yield result, response if block_given?
601
- result
564
+ @instance_groups_stub.list request, options do |result, response|
565
+ result = ::Gapic::Rest::PagedEnumerable.new @instance_groups_stub, :list, "items", request, result, options
566
+ yield result, response if block_given?
567
+ return result
568
+ end
602
569
  rescue ::Faraday::Error => e
603
570
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
604
571
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -625,13 +592,7 @@ module Google
625
592
  # the default parameter values, pass an empty Hash as a request object (see above).
626
593
  #
627
594
  # @param filter [::String]
628
- # 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 `<`.
629
- #
630
- # For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
631
- #
632
- # 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.
633
- #
634
- # 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) ```
595
+ # 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) ```
635
596
  # @param instance_group [::String]
636
597
  # The name of the instance group from which you want to generate a list of included instances.
637
598
  # @param instance_groups_list_instances_request_resource [::Google::Cloud::Compute::V1::InstanceGroupsListInstancesRequest, ::Hash]
@@ -639,24 +600,20 @@ module Google
639
600
  # @param max_results [::Integer]
640
601
  # 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`)
641
602
  # @param order_by [::String]
642
- # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
643
- #
644
- # 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.
645
- #
646
- # Currently, only sorting by `name` or `creationTimestamp desc` is supported.
603
+ # 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.
647
604
  # @param page_token [::String]
648
605
  # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
649
606
  # @param project [::String]
650
607
  # Project ID for this request.
651
608
  # @param return_partial_success [::Boolean]
652
- # 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.
609
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
653
610
  # @param zone [::String]
654
611
  # The name of the zone where the instance group is located.
655
- # @yield [result, env] Access the result along with the Faraday environment object
656
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupsListInstances]
612
+ # @yield [result, response] Access the result along with the Faraday response object
613
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceWithNamedPorts>]
657
614
  # @yieldparam response [::Faraday::Response]
658
615
  #
659
- # @return [::Google::Cloud::Compute::V1::InstanceGroupsListInstances]
616
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceWithNamedPorts>]
660
617
  #
661
618
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
662
619
  def list_instances request, options = nil
@@ -668,7 +625,7 @@ module Google
668
625
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
669
626
 
670
627
  # Customize the options with defaults
671
- call_metadata = {}
628
+ call_metadata = @config.rpcs.list_instances.metadata.to_h
672
629
 
673
630
  # Set x-goog-api-client header
674
631
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -676,29 +633,24 @@ module Google
676
633
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
677
634
  transports_version_send: [:rest]
678
635
 
679
- options.apply_defaults timeout: @config.timeout,
636
+ options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
680
637
  metadata: call_metadata
681
638
 
682
- uri, body, query_string_params = transcode_list_instances request
683
- response = @client_stub.make_post_request(
684
- uri: uri,
685
- body: body,
686
- params: query_string_params,
687
- options: options
688
- )
689
- result = ::Google::Cloud::Compute::V1::InstanceGroupsListInstances.decode_json response.body, ignore_unknown_fields: true
690
-
691
- yield result, response if block_given?
692
- result
639
+ options.apply_defaults timeout: @config.timeout,
640
+ metadata: @config.metadata
641
+
642
+ @instance_groups_stub.list_instances request, options do |result, response|
643
+ result = ::Gapic::Rest::PagedEnumerable.new @instance_groups_stub, :list_instances, "items", request, result, options
644
+ yield result, response if block_given?
645
+ return result
646
+ end
693
647
  rescue ::Faraday::Error => e
694
648
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
695
649
  raise ::Google::Cloud::Error.from_error(gapic_error)
696
650
  end
697
651
 
698
652
  ##
699
- # Removes one or more instances from the specified instance group, but does not delete those instances.
700
- #
701
- # If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
653
+ # Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.
702
654
  #
703
655
  # @overload remove_instances(request, options = nil)
704
656
  # Pass arguments to `remove_instances` via a request object, either of type
@@ -724,18 +676,14 @@ module Google
724
676
  # @param project [::String]
725
677
  # Project ID for this request.
726
678
  # @param request_id [::String]
727
- # 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.
728
- #
729
- # 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.
730
- #
731
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
679
+ # 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).
732
680
  # @param zone [::String]
733
681
  # The name of the zone where the instance group is located.
734
- # @yield [result, env] Access the result along with the Faraday environment object
735
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
682
+ # @yield [result, response] Access the result along with the Faraday response object
683
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
736
684
  # @yieldparam response [::Faraday::Response]
737
685
  #
738
- # @return [::Google::Cloud::Compute::V1::Operation]
686
+ # @return [::Gapic::Rest::BaseOperation]
739
687
  #
740
688
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
741
689
  def remove_instances request, options = nil
@@ -747,7 +695,7 @@ module Google
747
695
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
748
696
 
749
697
  # Customize the options with defaults
750
- call_metadata = {}
698
+ call_metadata = @config.rpcs.remove_instances.metadata.to_h
751
699
 
752
700
  # Set x-goog-api-client header
753
701
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -755,20 +703,17 @@ module Google
755
703
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
756
704
  transports_version_send: [:rest]
757
705
 
758
- options.apply_defaults timeout: @config.timeout,
706
+ options.apply_defaults timeout: @config.rpcs.remove_instances.timeout,
759
707
  metadata: call_metadata
760
708
 
761
- uri, body, query_string_params = transcode_remove_instances request
762
- response = @client_stub.make_post_request(
763
- uri: uri,
764
- body: body,
765
- params: query_string_params,
766
- options: options
767
- )
768
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
769
-
770
- yield result, response if block_given?
771
- result
709
+ options.apply_defaults timeout: @config.timeout,
710
+ metadata: @config.metadata
711
+
712
+ @instance_groups_stub.remove_instances request, options do |result, response|
713
+ result = ::Gapic::Rest::BaseOperation.new result
714
+ yield result, response if block_given?
715
+ return result
716
+ end
772
717
  rescue ::Faraday::Error => e
773
718
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
774
719
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -801,18 +746,14 @@ module Google
801
746
  # @param project [::String]
802
747
  # Project ID for this request.
803
748
  # @param request_id [::String]
804
- # 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.
805
- #
806
- # 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.
807
- #
808
- # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
749
+ # 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).
809
750
  # @param zone [::String]
810
751
  # The name of the zone where the instance group is located.
811
- # @yield [result, env] Access the result along with the Faraday environment object
812
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
752
+ # @yield [result, response] Access the result along with the Faraday response object
753
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
813
754
  # @yieldparam response [::Faraday::Response]
814
755
  #
815
- # @return [::Google::Cloud::Compute::V1::Operation]
756
+ # @return [::Gapic::Rest::BaseOperation]
816
757
  #
817
758
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
818
759
  def set_named_ports request, options = nil
@@ -824,7 +765,7 @@ module Google
824
765
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
825
766
 
826
767
  # Customize the options with defaults
827
- call_metadata = {}
768
+ call_metadata = @config.rpcs.set_named_ports.metadata.to_h
828
769
 
829
770
  # Set x-goog-api-client header
830
771
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -832,20 +773,17 @@ module Google
832
773
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
833
774
  transports_version_send: [:rest]
834
775
 
835
- options.apply_defaults timeout: @config.timeout,
776
+ options.apply_defaults timeout: @config.rpcs.set_named_ports.timeout,
836
777
  metadata: call_metadata
837
778
 
838
- uri, body, query_string_params = transcode_set_named_ports request
839
- response = @client_stub.make_post_request(
840
- uri: uri,
841
- body: body,
842
- params: query_string_params,
843
- options: options
844
- )
845
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
846
-
847
- yield result, response if block_given?
848
- result
779
+ options.apply_defaults timeout: @config.timeout,
780
+ metadata: @config.metadata
781
+
782
+ @instance_groups_stub.set_named_ports request, options do |result, response|
783
+ result = ::Gapic::Rest::BaseOperation.new result
784
+ yield result, response if block_given?
785
+ return result
786
+ end
849
787
  rescue ::Faraday::Error => e
850
788
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
851
789
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -900,6 +838,9 @@ module Google
900
838
  # @!attribute [rw] timeout
901
839
  # The call timeout in seconds.
902
840
  # @return [::Numeric]
841
+ # @!attribute [rw] metadata
842
+ # Additional REST headers to be sent with the call.
843
+ # @return [::Hash{::Symbol=>::String}]
903
844
  #
904
845
  class Configuration
905
846
  extend ::Gapic::Config
@@ -913,6 +854,7 @@ module Google
913
854
  config_attr :lib_name, nil, ::String, nil
914
855
  config_attr :lib_version, nil, ::String, nil
915
856
  config_attr :timeout, nil, ::Numeric, nil
857
+ config_attr :metadata, nil, ::Hash, nil
916
858
 
917
859
  # @private
918
860
  def initialize parent_config = nil
@@ -920,6 +862,102 @@ module Google
920
862
 
921
863
  yield self if block_given?
922
864
  end
865
+
866
+ ##
867
+ # Configurations for individual RPCs
868
+ # @return [Rpcs]
869
+ #
870
+ def rpcs
871
+ @rpcs ||= begin
872
+ parent_rpcs = nil
873
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
874
+ Rpcs.new parent_rpcs
875
+ end
876
+ end
877
+
878
+ ##
879
+ # Configuration RPC class for the InstanceGroups API.
880
+ #
881
+ # Includes fields providing the configuration for each RPC in this service.
882
+ # Each configuration object is of type `Gapic::Config::Method` and includes
883
+ # the following configuration fields:
884
+ #
885
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
886
+ #
887
+ # there is one other field (`retry_policy`) that can be set
888
+ # but is currently not supported for REST Gapic libraries.
889
+ #
890
+ class Rpcs
891
+ ##
892
+ # RPC-specific configuration for `add_instances`
893
+ # @return [::Gapic::Config::Method]
894
+ #
895
+ attr_reader :add_instances
896
+ ##
897
+ # RPC-specific configuration for `aggregated_list`
898
+ # @return [::Gapic::Config::Method]
899
+ #
900
+ attr_reader :aggregated_list
901
+ ##
902
+ # RPC-specific configuration for `delete`
903
+ # @return [::Gapic::Config::Method]
904
+ #
905
+ attr_reader :delete
906
+ ##
907
+ # RPC-specific configuration for `get`
908
+ # @return [::Gapic::Config::Method]
909
+ #
910
+ attr_reader :get
911
+ ##
912
+ # RPC-specific configuration for `insert`
913
+ # @return [::Gapic::Config::Method]
914
+ #
915
+ attr_reader :insert
916
+ ##
917
+ # RPC-specific configuration for `list`
918
+ # @return [::Gapic::Config::Method]
919
+ #
920
+ attr_reader :list
921
+ ##
922
+ # RPC-specific configuration for `list_instances`
923
+ # @return [::Gapic::Config::Method]
924
+ #
925
+ attr_reader :list_instances
926
+ ##
927
+ # RPC-specific configuration for `remove_instances`
928
+ # @return [::Gapic::Config::Method]
929
+ #
930
+ attr_reader :remove_instances
931
+ ##
932
+ # RPC-specific configuration for `set_named_ports`
933
+ # @return [::Gapic::Config::Method]
934
+ #
935
+ attr_reader :set_named_ports
936
+
937
+ # @private
938
+ def initialize parent_rpcs = nil
939
+ add_instances_config = parent_rpcs.add_instances if parent_rpcs.respond_to? :add_instances
940
+ @add_instances = ::Gapic::Config::Method.new add_instances_config
941
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
942
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
943
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
944
+ @delete = ::Gapic::Config::Method.new delete_config
945
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
946
+ @get = ::Gapic::Config::Method.new get_config
947
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
948
+ @insert = ::Gapic::Config::Method.new insert_config
949
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
950
+ @list = ::Gapic::Config::Method.new list_config
951
+ list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
952
+ @list_instances = ::Gapic::Config::Method.new list_instances_config
953
+ remove_instances_config = parent_rpcs.remove_instances if parent_rpcs.respond_to? :remove_instances
954
+ @remove_instances = ::Gapic::Config::Method.new remove_instances_config
955
+ set_named_ports_config = parent_rpcs.set_named_ports if parent_rpcs.respond_to? :set_named_ports
956
+ @set_named_ports = ::Gapic::Config::Method.new set_named_ports_config
957
+
958
+ yield self if block_given?
959
+ end
960
+ end
923
961
  end
924
962
  end
925
963
  end