google-cloud-compute-v1 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (244) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/AUTHENTICATION.md +12 -12
  4. data/README.md +4 -30
  5. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +123 -66
  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 +166 -96
  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 +210 -128
  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 +228 -143
  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 +294 -187
  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 +816 -135
  21. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +123 -66
  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 +334 -213
  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 +180 -107
  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 +463 -280
  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 +185 -113
  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 +292 -127
  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 +141 -81
  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 +259 -112
  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 +207 -128
  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 +159 -88
  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 +116 -64
  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 +170 -97
  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 +210 -128
  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/images/rest/client.rb +284 -174
  61. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +542 -0
  62. data/lib/google/cloud/compute/v1/images/rest.rb +0 -2
  63. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +497 -328
  64. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +974 -0
  65. data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +0 -2
  66. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +255 -161
  67. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +467 -0
  68. data/lib/google/cloud/compute/v1/instance_groups/rest.rb +0 -2
  69. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +198 -117
  70. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +362 -0
  71. data/lib/google/cloud/compute/v1/instance_templates/rest.rb +0 -2
  72. data/lib/google/cloud/compute/v1/instances/rest/client.rb +1079 -609
  73. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1975 -0
  74. data/lib/google/cloud/compute/v1/instances/rest.rb +0 -2
  75. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +188 -112
  76. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +326 -0
  77. data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +0 -2
  78. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +98 -51
  79. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +138 -0
  80. data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +0 -2
  81. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +184 -108
  82. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +318 -0
  83. data/lib/google/cloud/compute/v1/interconnects/rest.rb +0 -2
  84. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +91 -48
  85. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +133 -0
  86. data/lib/google/cloud/compute/v1/license_codes/rest.rb +0 -2
  87. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +198 -117
  88. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +362 -0
  89. data/lib/google/cloud/compute/v1/licenses/rest.rb +0 -2
  90. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +123 -66
  91. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +188 -0
  92. data/lib/google/cloud/compute/v1/machine_types/rest.rb +0 -2
  93. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +251 -157
  94. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +465 -0
  95. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +0 -2
  96. data/lib/google/cloud/compute/v1/networks/rest/client.rb +349 -173
  97. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +553 -0
  98. data/lib/google/cloud/compute/v1/networks/rest.rb +0 -2
  99. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +333 -211
  100. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +646 -0
  101. data/lib/google/cloud/compute/v1/node_groups/rest.rb +0 -2
  102. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +223 -132
  103. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +412 -0
  104. data/lib/google/cloud/compute/v1/node_templates/rest.rb +0 -2
  105. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +123 -66
  106. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +188 -0
  107. data/lib/google/cloud/compute/v1/node_types/rest.rb +0 -2
  108. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +206 -124
  109. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +369 -0
  110. data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +0 -2
  111. data/lib/google/cloud/compute/v1/projects/rest/client.rb +338 -219
  112. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +643 -0
  113. data/lib/google/cloud/compute/v1/projects/rest.rb +0 -2
  114. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +170 -97
  115. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +275 -0
  116. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +0 -2
  117. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +196 -112
  118. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +325 -0
  119. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +0 -2
  120. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +185 -113
  121. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +323 -0
  122. data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +0 -2
  123. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +203 -125
  124. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +365 -0
  125. data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +0 -2
  126. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +145 -82
  127. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +234 -0
  128. data/lib/google/cloud/compute/v1/region_commitments/rest.rb +0 -2
  129. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +98 -51
  130. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +138 -0
  131. data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +0 -2
  132. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +309 -198
  133. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +593 -0
  134. data/lib/google/cloud/compute/v1/region_disks/rest.rb +0 -2
  135. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +163 -97
  136. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +275 -0
  137. data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +0 -2
  138. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +185 -113
  139. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +321 -0
  140. data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +0 -2
  141. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +472 -313
  142. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +924 -0
  143. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +0 -2
  144. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +143 -84
  145. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +234 -0
  146. data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +0 -2
  147. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +75 -40
  148. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +92 -0
  149. data/lib/google/cloud/compute/v1/region_instances/rest.rb +0 -2
  150. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +141 -81
  151. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +229 -0
  152. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +0 -2
  153. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +141 -81
  154. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +229 -0
  155. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +0 -2
  156. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +134 -73
  157. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +224 -0
  158. data/lib/google/cloud/compute/v1/region_operations/rest.rb +0 -2
  159. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +141 -81
  160. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +229 -0
  161. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +0 -2
  162. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +163 -97
  163. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +275 -0
  164. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +0 -2
  165. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +185 -113
  166. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +321 -0
  167. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +0 -2
  168. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +203 -125
  169. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +365 -0
  170. data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +0 -2
  171. data/lib/google/cloud/compute/v1/regions/rest/client.rb +98 -51
  172. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +138 -0
  173. data/lib/google/cloud/compute/v1/regions/rest.rb +0 -2
  174. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +245 -148
  175. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +458 -0
  176. data/lib/google/cloud/compute/v1/reservations/rest.rb +0 -2
  177. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +223 -132
  178. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +412 -0
  179. data/lib/google/cloud/compute/v1/resource_policies/rest.rb +0 -2
  180. data/lib/google/cloud/compute/v1/routers/rest/client.rb +274 -166
  181. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +507 -0
  182. data/lib/google/cloud/compute/v1/routers/rest.rb +0 -2
  183. data/lib/google/cloud/compute/v1/routes/rest/client.rb +141 -81
  184. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +229 -0
  185. data/lib/google/cloud/compute/v1/routes/rest.rb +0 -2
  186. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +270 -166
  187. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +504 -0
  188. data/lib/google/cloud/compute/v1/security_policies/rest.rb +0 -2
  189. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +197 -115
  190. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +360 -0
  191. data/lib/google/cloud/compute/v1/snapshots/rest.rb +0 -2
  192. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +166 -96
  193. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +279 -0
  194. data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +0 -2
  195. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +185 -110
  196. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +324 -0
  197. data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +0 -2
  198. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +314 -195
  199. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +600 -0
  200. data/lib/google/cloud/compute/v1/subnetworks/rest.rb +0 -2
  201. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +163 -97
  202. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +275 -0
  203. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +0 -2
  204. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +210 -128
  205. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +371 -0
  206. data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +0 -2
  207. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +334 -159
  208. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +509 -0
  209. data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +0 -2
  210. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +166 -96
  211. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +279 -0
  212. data/lib/google/cloud/compute/v1/target_instances/rest.rb +0 -2
  213. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +294 -188
  214. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +554 -0
  215. data/lib/google/cloud/compute/v1/target_pools/rest.rb +0 -2
  216. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +229 -145
  217. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +413 -0
  218. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +0 -2
  219. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +185 -113
  220. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +321 -0
  221. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +0 -2
  222. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +166 -96
  223. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +279 -0
  224. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +0 -2
  225. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +250 -156
  226. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +461 -0
  227. data/lib/google/cloud/compute/v1/url_maps/rest.rb +0 -2
  228. data/lib/google/cloud/compute/v1/version.rb +1 -1
  229. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +227 -135
  230. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +412 -0
  231. data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +0 -2
  232. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +166 -96
  233. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +279 -0
  234. data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +0 -2
  235. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +134 -73
  236. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +224 -0
  237. data/lib/google/cloud/compute/v1/zone_operations/rest.rb +0 -2
  238. data/lib/google/cloud/compute/v1/zones/rest/client.rb +98 -51
  239. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +138 -0
  240. data/lib/google/cloud/compute/v1/zones/rest.rb +0 -2
  241. data/lib/google/cloud/compute/v1.rb +5 -0
  242. data/proto_docs/README.md +1 -1
  243. data/proto_docs/google/cloud/compute/v1/compute.rb +2526 -640
  244. metadata +84 -8
@@ -0,0 +1,924 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2021 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/compute/v1/compute_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module RegionInstanceGroupManagers
26
+ module Rest
27
+ ##
28
+ # REST service stub for the RegionInstanceGroupManagers service.
29
+ # service stub contains baseline method implementations
30
+ # including transcoding, making the REST call and deserialing the response
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials
39
+ end
40
+
41
+ ##
42
+ # Baseline implementation for the abandon_instances REST call
43
+ #
44
+ # @param request_pb [::Google::Cloud::Compute::V1::AbandonInstancesRegionInstanceGroupManagerRequest]
45
+ # A request object representing the call parameters. Required.
46
+ # @param options [::Gapic::CallOptions]
47
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
48
+ #
49
+ # @yield [result, response] Access the result along with the Faraday response object
50
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
51
+ # @yieldparam response [::Faraday::Response]
52
+ #
53
+ # @return [::Google::Cloud::Compute::V1::Operation]
54
+ # A result object deserialized from the server's reply
55
+ def abandon_instances request_pb, options = nil
56
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
57
+
58
+ uri, body, query_string_params = transcode_abandon_instances_request request_pb
59
+ response = @client_stub.make_post_request(
60
+ uri: uri,
61
+ body: body,
62
+ params: query_string_params,
63
+ options: options
64
+ )
65
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
66
+
67
+ yield result, response if block_given?
68
+ result
69
+ end
70
+
71
+ ##
72
+ # GRPC transcoding helper method for the abandon_instances REST call
73
+ #
74
+ # @param request_pb [::Google::Cloud::Compute::V1::AbandonInstancesRegionInstanceGroupManagerRequest]
75
+ # A request object representing the call parameters. Required.
76
+ # @return [Array(String, [String, nil], Hash{String => String})]
77
+ # Uri, Body, Query string parameters
78
+ def transcode_abandon_instances_request request_pb
79
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/abandonInstances"
80
+ body = request_pb.region_instance_group_managers_abandon_instances_request_resource.to_json
81
+ query_string_params = {}
82
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
83
+
84
+ [uri, body, query_string_params]
85
+ end
86
+
87
+ ##
88
+ # Baseline implementation for the apply_updates_to_instances REST call
89
+ #
90
+ # @param request_pb [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest]
91
+ # A request object representing the call parameters. Required.
92
+ # @param options [::Gapic::CallOptions]
93
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
94
+ #
95
+ # @yield [result, response] Access the result along with the Faraday response object
96
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
97
+ # @yieldparam response [::Faraday::Response]
98
+ #
99
+ # @return [::Google::Cloud::Compute::V1::Operation]
100
+ # A result object deserialized from the server's reply
101
+ def apply_updates_to_instances request_pb, options = nil
102
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
103
+
104
+ uri, body, _query_string_params = transcode_apply_updates_to_instances_request request_pb
105
+ response = @client_stub.make_post_request(
106
+ uri: uri,
107
+ body: body,
108
+ options: options
109
+ )
110
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
111
+
112
+ yield result, response if block_given?
113
+ result
114
+ end
115
+
116
+ ##
117
+ # GRPC transcoding helper method for the apply_updates_to_instances REST call
118
+ #
119
+ # @param request_pb [::Google::Cloud::Compute::V1::ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @return [Array(String, [String, nil], Hash{String => String})]
122
+ # Uri, Body, Query string parameters
123
+ def transcode_apply_updates_to_instances_request request_pb
124
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/applyUpdatesToInstances"
125
+ body = request_pb.region_instance_group_managers_apply_updates_request_resource.to_json
126
+ query_string_params = {}
127
+
128
+ [uri, body, query_string_params]
129
+ end
130
+
131
+ ##
132
+ # Baseline implementation for the create_instances REST call
133
+ #
134
+ # @param request_pb [::Google::Cloud::Compute::V1::CreateInstancesRegionInstanceGroupManagerRequest]
135
+ # A request object representing the call parameters. Required.
136
+ # @param options [::Gapic::CallOptions]
137
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
138
+ #
139
+ # @yield [result, response] Access the result along with the Faraday response object
140
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
141
+ # @yieldparam response [::Faraday::Response]
142
+ #
143
+ # @return [::Google::Cloud::Compute::V1::Operation]
144
+ # A result object deserialized from the server's reply
145
+ def create_instances request_pb, options = nil
146
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
147
+
148
+ uri, body, query_string_params = transcode_create_instances_request request_pb
149
+ response = @client_stub.make_post_request(
150
+ uri: uri,
151
+ body: body,
152
+ params: query_string_params,
153
+ options: options
154
+ )
155
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
156
+
157
+ yield result, response if block_given?
158
+ result
159
+ end
160
+
161
+ ##
162
+ # GRPC transcoding helper method for the create_instances REST call
163
+ #
164
+ # @param request_pb [::Google::Cloud::Compute::V1::CreateInstancesRegionInstanceGroupManagerRequest]
165
+ # A request object representing the call parameters. Required.
166
+ # @return [Array(String, [String, nil], Hash{String => String})]
167
+ # Uri, Body, Query string parameters
168
+ def transcode_create_instances_request request_pb
169
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/createInstances"
170
+ body = request_pb.region_instance_group_managers_create_instances_request_resource.to_json
171
+ query_string_params = {}
172
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
173
+
174
+ [uri, body, query_string_params]
175
+ end
176
+
177
+ ##
178
+ # Baseline implementation for the delete REST call
179
+ #
180
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerRequest]
181
+ # A request object representing the call parameters. Required.
182
+ # @param options [::Gapic::CallOptions]
183
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
184
+ #
185
+ # @yield [result, response] Access the result along with the Faraday response object
186
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
187
+ # @yieldparam response [::Faraday::Response]
188
+ #
189
+ # @return [::Google::Cloud::Compute::V1::Operation]
190
+ # A result object deserialized from the server's reply
191
+ def delete request_pb, options = nil
192
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
193
+
194
+ uri, _body, query_string_params = transcode_delete_request request_pb
195
+ response = @client_stub.make_delete_request(
196
+ uri: uri,
197
+ params: query_string_params,
198
+ options: options
199
+ )
200
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
201
+
202
+ yield result, response if block_given?
203
+ result
204
+ end
205
+
206
+ ##
207
+ # GRPC transcoding helper method for the delete REST call
208
+ #
209
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerRequest]
210
+ # A request object representing the call parameters. Required.
211
+ # @return [Array(String, [String, nil], Hash{String => String})]
212
+ # Uri, Body, Query string parameters
213
+ def transcode_delete_request request_pb
214
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}"
215
+ body = nil
216
+ query_string_params = {}
217
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
218
+
219
+ [uri, body, query_string_params]
220
+ end
221
+
222
+ ##
223
+ # Baseline implementation for the delete_instances REST call
224
+ #
225
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstancesRegionInstanceGroupManagerRequest]
226
+ # A request object representing the call parameters. Required.
227
+ # @param options [::Gapic::CallOptions]
228
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
229
+ #
230
+ # @yield [result, response] Access the result along with the Faraday response object
231
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
232
+ # @yieldparam response [::Faraday::Response]
233
+ #
234
+ # @return [::Google::Cloud::Compute::V1::Operation]
235
+ # A result object deserialized from the server's reply
236
+ def delete_instances request_pb, options = nil
237
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
238
+
239
+ uri, body, query_string_params = transcode_delete_instances_request request_pb
240
+ response = @client_stub.make_post_request(
241
+ uri: uri,
242
+ body: body,
243
+ params: query_string_params,
244
+ options: options
245
+ )
246
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
247
+
248
+ yield result, response if block_given?
249
+ result
250
+ end
251
+
252
+ ##
253
+ # GRPC transcoding helper method for the delete_instances REST call
254
+ #
255
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstancesRegionInstanceGroupManagerRequest]
256
+ # A request object representing the call parameters. Required.
257
+ # @return [Array(String, [String, nil], Hash{String => String})]
258
+ # Uri, Body, Query string parameters
259
+ def transcode_delete_instances_request request_pb
260
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/deleteInstances"
261
+ body = request_pb.region_instance_group_managers_delete_instances_request_resource.to_json
262
+ query_string_params = {}
263
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
264
+
265
+ [uri, body, query_string_params]
266
+ end
267
+
268
+ ##
269
+ # Baseline implementation for the delete_per_instance_configs REST call
270
+ #
271
+ # @param request_pb [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsRegionInstanceGroupManagerRequest]
272
+ # A request object representing the call parameters. Required.
273
+ # @param options [::Gapic::CallOptions]
274
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
275
+ #
276
+ # @yield [result, response] Access the result along with the Faraday response object
277
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
278
+ # @yieldparam response [::Faraday::Response]
279
+ #
280
+ # @return [::Google::Cloud::Compute::V1::Operation]
281
+ # A result object deserialized from the server's reply
282
+ def delete_per_instance_configs request_pb, options = nil
283
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
284
+
285
+ uri, body, _query_string_params = transcode_delete_per_instance_configs_request request_pb
286
+ response = @client_stub.make_post_request(
287
+ uri: uri,
288
+ body: body,
289
+ options: options
290
+ )
291
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
292
+
293
+ yield result, response if block_given?
294
+ result
295
+ end
296
+
297
+ ##
298
+ # GRPC transcoding helper method for the delete_per_instance_configs REST call
299
+ #
300
+ # @param request_pb [::Google::Cloud::Compute::V1::DeletePerInstanceConfigsRegionInstanceGroupManagerRequest]
301
+ # A request object representing the call parameters. Required.
302
+ # @return [Array(String, [String, nil], Hash{String => String})]
303
+ # Uri, Body, Query string parameters
304
+ def transcode_delete_per_instance_configs_request request_pb
305
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/deletePerInstanceConfigs"
306
+ body = request_pb.region_instance_group_manager_delete_instance_config_req_resource.to_json
307
+ query_string_params = {}
308
+
309
+ [uri, body, query_string_params]
310
+ end
311
+
312
+ ##
313
+ # Baseline implementation for the get REST call
314
+ #
315
+ # @param request_pb [::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerRequest]
316
+ # A request object representing the call parameters. Required.
317
+ # @param options [::Gapic::CallOptions]
318
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
319
+ #
320
+ # @yield [result, response] Access the result along with the Faraday response object
321
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManager]
322
+ # @yieldparam response [::Faraday::Response]
323
+ #
324
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManager]
325
+ # A result object deserialized from the server's reply
326
+ def get request_pb, options = nil
327
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
328
+
329
+ uri, _body, _query_string_params = transcode_get_request request_pb
330
+ response = @client_stub.make_get_request(
331
+ uri: uri,
332
+ options: options
333
+ )
334
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManager.decode_json response.body, ignore_unknown_fields: true
335
+
336
+ yield result, response if block_given?
337
+ result
338
+ end
339
+
340
+ ##
341
+ # GRPC transcoding helper method for the get REST call
342
+ #
343
+ # @param request_pb [::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerRequest]
344
+ # A request object representing the call parameters. Required.
345
+ # @return [Array(String, [String, nil], Hash{String => String})]
346
+ # Uri, Body, Query string parameters
347
+ def transcode_get_request request_pb
348
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}"
349
+ body = nil
350
+ query_string_params = {}
351
+
352
+ [uri, body, query_string_params]
353
+ end
354
+
355
+ ##
356
+ # Baseline implementation for the insert REST call
357
+ #
358
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerRequest]
359
+ # A request object representing the call parameters. Required.
360
+ # @param options [::Gapic::CallOptions]
361
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
362
+ #
363
+ # @yield [result, response] Access the result along with the Faraday response object
364
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
365
+ # @yieldparam response [::Faraday::Response]
366
+ #
367
+ # @return [::Google::Cloud::Compute::V1::Operation]
368
+ # A result object deserialized from the server's reply
369
+ def insert request_pb, options = nil
370
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
371
+
372
+ uri, body, query_string_params = transcode_insert_request request_pb
373
+ response = @client_stub.make_post_request(
374
+ uri: uri,
375
+ body: body,
376
+ params: query_string_params,
377
+ options: options
378
+ )
379
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
380
+
381
+ yield result, response if block_given?
382
+ result
383
+ end
384
+
385
+ ##
386
+ # GRPC transcoding helper method for the insert REST call
387
+ #
388
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerRequest]
389
+ # A request object representing the call parameters. Required.
390
+ # @return [Array(String, [String, nil], Hash{String => String})]
391
+ # Uri, Body, Query string parameters
392
+ def transcode_insert_request request_pb
393
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers"
394
+ body = request_pb.instance_group_manager_resource.to_json
395
+ query_string_params = {}
396
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
397
+
398
+ [uri, body, query_string_params]
399
+ end
400
+
401
+ ##
402
+ # Baseline implementation for the list REST call
403
+ #
404
+ # @param request_pb [::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagersRequest]
405
+ # A request object representing the call parameters. Required.
406
+ # @param options [::Gapic::CallOptions]
407
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
408
+ #
409
+ # @yield [result, response] Access the result along with the Faraday response object
410
+ # @yieldparam result [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerList]
411
+ # @yieldparam response [::Faraday::Response]
412
+ #
413
+ # @return [::Google::Cloud::Compute::V1::RegionInstanceGroupManagerList]
414
+ # A result object deserialized from the server's reply
415
+ def list request_pb, options = nil
416
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
417
+
418
+ uri, _body, query_string_params = transcode_list_request request_pb
419
+ response = @client_stub.make_get_request(
420
+ uri: uri,
421
+ params: query_string_params,
422
+ options: options
423
+ )
424
+ result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerList.decode_json response.body, ignore_unknown_fields: true
425
+
426
+ yield result, response if block_given?
427
+ result
428
+ end
429
+
430
+ ##
431
+ # GRPC transcoding helper method for the list REST call
432
+ #
433
+ # @param request_pb [::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagersRequest]
434
+ # A request object representing the call parameters. Required.
435
+ # @return [Array(String, [String, nil], Hash{String => String})]
436
+ # Uri, Body, Query string parameters
437
+ def transcode_list_request request_pb
438
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers"
439
+ body = nil
440
+ query_string_params = {}
441
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
442
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
443
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
444
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
445
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
446
+
447
+ [uri, body, query_string_params]
448
+ end
449
+
450
+ ##
451
+ # Baseline implementation for the list_errors REST call
452
+ #
453
+ # @param request_pb [::Google::Cloud::Compute::V1::ListErrorsRegionInstanceGroupManagersRequest]
454
+ # A request object representing the call parameters. Required.
455
+ # @param options [::Gapic::CallOptions]
456
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
457
+ #
458
+ # @yield [result, response] Access the result along with the Faraday response object
459
+ # @yieldparam result [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListErrorsResponse]
460
+ # @yieldparam response [::Faraday::Response]
461
+ #
462
+ # @return [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListErrorsResponse]
463
+ # A result object deserialized from the server's reply
464
+ def list_errors request_pb, options = nil
465
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
466
+
467
+ uri, _body, query_string_params = transcode_list_errors_request request_pb
468
+ response = @client_stub.make_get_request(
469
+ uri: uri,
470
+ params: query_string_params,
471
+ options: options
472
+ )
473
+ result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListErrorsResponse.decode_json response.body, ignore_unknown_fields: true
474
+
475
+ yield result, response if block_given?
476
+ result
477
+ end
478
+
479
+ ##
480
+ # GRPC transcoding helper method for the list_errors REST call
481
+ #
482
+ # @param request_pb [::Google::Cloud::Compute::V1::ListErrorsRegionInstanceGroupManagersRequest]
483
+ # A request object representing the call parameters. Required.
484
+ # @return [Array(String, [String, nil], Hash{String => String})]
485
+ # Uri, Body, Query string parameters
486
+ def transcode_list_errors_request request_pb
487
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/listErrors"
488
+ body = nil
489
+ query_string_params = {}
490
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
491
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
492
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
493
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
494
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
495
+
496
+ [uri, body, query_string_params]
497
+ end
498
+
499
+ ##
500
+ # Baseline implementation for the list_managed_instances REST call
501
+ #
502
+ # @param request_pb [::Google::Cloud::Compute::V1::ListManagedInstancesRegionInstanceGroupManagersRequest]
503
+ # A request object representing the call parameters. Required.
504
+ # @param options [::Gapic::CallOptions]
505
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
506
+ #
507
+ # @yield [result, response] Access the result along with the Faraday response object
508
+ # @yieldparam result [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstancesResponse]
509
+ # @yieldparam response [::Faraday::Response]
510
+ #
511
+ # @return [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstancesResponse]
512
+ # A result object deserialized from the server's reply
513
+ def list_managed_instances request_pb, options = nil
514
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
515
+
516
+ uri, _body, query_string_params = transcode_list_managed_instances_request request_pb
517
+ response = @client_stub.make_post_request(
518
+ uri: uri,
519
+ params: query_string_params,
520
+ options: options
521
+ )
522
+ result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstancesResponse.decode_json response.body, ignore_unknown_fields: true
523
+
524
+ yield result, response if block_given?
525
+ result
526
+ end
527
+
528
+ ##
529
+ # GRPC transcoding helper method for the list_managed_instances REST call
530
+ #
531
+ # @param request_pb [::Google::Cloud::Compute::V1::ListManagedInstancesRegionInstanceGroupManagersRequest]
532
+ # A request object representing the call parameters. Required.
533
+ # @return [Array(String, [String, nil], Hash{String => String})]
534
+ # Uri, Body, Query string parameters
535
+ def transcode_list_managed_instances_request request_pb
536
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/listManagedInstances"
537
+ body = nil
538
+ query_string_params = {}
539
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
540
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
541
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
542
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
543
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
544
+
545
+ [uri, body, query_string_params]
546
+ end
547
+
548
+ ##
549
+ # Baseline implementation for the list_per_instance_configs REST call
550
+ #
551
+ # @param request_pb [::Google::Cloud::Compute::V1::ListPerInstanceConfigsRegionInstanceGroupManagersRequest]
552
+ # A request object representing the call parameters. Required.
553
+ # @param options [::Gapic::CallOptions]
554
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
555
+ #
556
+ # @yield [result, response] Access the result along with the Faraday response object
557
+ # @yieldparam result [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstanceConfigsResp]
558
+ # @yieldparam response [::Faraday::Response]
559
+ #
560
+ # @return [::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstanceConfigsResp]
561
+ # A result object deserialized from the server's reply
562
+ def list_per_instance_configs request_pb, options = nil
563
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
564
+
565
+ uri, _body, query_string_params = transcode_list_per_instance_configs_request request_pb
566
+ response = @client_stub.make_post_request(
567
+ uri: uri,
568
+ params: query_string_params,
569
+ options: options
570
+ )
571
+ result = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagersListInstanceConfigsResp.decode_json response.body, ignore_unknown_fields: true
572
+
573
+ yield result, response if block_given?
574
+ result
575
+ end
576
+
577
+ ##
578
+ # GRPC transcoding helper method for the list_per_instance_configs REST call
579
+ #
580
+ # @param request_pb [::Google::Cloud::Compute::V1::ListPerInstanceConfigsRegionInstanceGroupManagersRequest]
581
+ # A request object representing the call parameters. Required.
582
+ # @return [Array(String, [String, nil], Hash{String => String})]
583
+ # Uri, Body, Query string parameters
584
+ def transcode_list_per_instance_configs_request request_pb
585
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/listPerInstanceConfigs"
586
+ body = nil
587
+ query_string_params = {}
588
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
589
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
590
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
591
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
592
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
593
+
594
+ [uri, body, query_string_params]
595
+ end
596
+
597
+ ##
598
+ # Baseline implementation for the patch REST call
599
+ #
600
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchRegionInstanceGroupManagerRequest]
601
+ # A request object representing the call parameters. Required.
602
+ # @param options [::Gapic::CallOptions]
603
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
604
+ #
605
+ # @yield [result, response] Access the result along with the Faraday response object
606
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
607
+ # @yieldparam response [::Faraday::Response]
608
+ #
609
+ # @return [::Google::Cloud::Compute::V1::Operation]
610
+ # A result object deserialized from the server's reply
611
+ def patch request_pb, options = nil
612
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
613
+
614
+ uri, body, query_string_params = transcode_patch_request request_pb
615
+ response = @client_stub.make_patch_request(
616
+ uri: uri,
617
+ body: body,
618
+ params: query_string_params,
619
+ options: options
620
+ )
621
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
622
+
623
+ yield result, response if block_given?
624
+ result
625
+ end
626
+
627
+ ##
628
+ # GRPC transcoding helper method for the patch REST call
629
+ #
630
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchRegionInstanceGroupManagerRequest]
631
+ # A request object representing the call parameters. Required.
632
+ # @return [Array(String, [String, nil], Hash{String => String})]
633
+ # Uri, Body, Query string parameters
634
+ def transcode_patch_request request_pb
635
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}"
636
+ body = request_pb.instance_group_manager_resource.to_json
637
+ query_string_params = {}
638
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
639
+
640
+ [uri, body, query_string_params]
641
+ end
642
+
643
+ ##
644
+ # Baseline implementation for the patch_per_instance_configs REST call
645
+ #
646
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsRegionInstanceGroupManagerRequest]
647
+ # A request object representing the call parameters. Required.
648
+ # @param options [::Gapic::CallOptions]
649
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
650
+ #
651
+ # @yield [result, response] Access the result along with the Faraday response object
652
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
653
+ # @yieldparam response [::Faraday::Response]
654
+ #
655
+ # @return [::Google::Cloud::Compute::V1::Operation]
656
+ # A result object deserialized from the server's reply
657
+ def patch_per_instance_configs request_pb, options = nil
658
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
659
+
660
+ uri, body, query_string_params = transcode_patch_per_instance_configs_request request_pb
661
+ response = @client_stub.make_post_request(
662
+ uri: uri,
663
+ body: body,
664
+ params: query_string_params,
665
+ options: options
666
+ )
667
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
668
+
669
+ yield result, response if block_given?
670
+ result
671
+ end
672
+
673
+ ##
674
+ # GRPC transcoding helper method for the patch_per_instance_configs REST call
675
+ #
676
+ # @param request_pb [::Google::Cloud::Compute::V1::PatchPerInstanceConfigsRegionInstanceGroupManagerRequest]
677
+ # A request object representing the call parameters. Required.
678
+ # @return [Array(String, [String, nil], Hash{String => String})]
679
+ # Uri, Body, Query string parameters
680
+ def transcode_patch_per_instance_configs_request request_pb
681
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/patchPerInstanceConfigs"
682
+ body = request_pb.region_instance_group_manager_patch_instance_config_req_resource.to_json
683
+ query_string_params = {}
684
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
685
+
686
+ [uri, body, query_string_params]
687
+ end
688
+
689
+ ##
690
+ # Baseline implementation for the recreate_instances REST call
691
+ #
692
+ # @param request_pb [::Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest]
693
+ # A request object representing the call parameters. Required.
694
+ # @param options [::Gapic::CallOptions]
695
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
696
+ #
697
+ # @yield [result, response] Access the result along with the Faraday response object
698
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
699
+ # @yieldparam response [::Faraday::Response]
700
+ #
701
+ # @return [::Google::Cloud::Compute::V1::Operation]
702
+ # A result object deserialized from the server's reply
703
+ def recreate_instances request_pb, options = nil
704
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
705
+
706
+ uri, body, query_string_params = transcode_recreate_instances_request request_pb
707
+ response = @client_stub.make_post_request(
708
+ uri: uri,
709
+ body: body,
710
+ params: query_string_params,
711
+ options: options
712
+ )
713
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
714
+
715
+ yield result, response if block_given?
716
+ result
717
+ end
718
+
719
+ ##
720
+ # GRPC transcoding helper method for the recreate_instances REST call
721
+ #
722
+ # @param request_pb [::Google::Cloud::Compute::V1::RecreateInstancesRegionInstanceGroupManagerRequest]
723
+ # A request object representing the call parameters. Required.
724
+ # @return [Array(String, [String, nil], Hash{String => String})]
725
+ # Uri, Body, Query string parameters
726
+ def transcode_recreate_instances_request request_pb
727
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/recreateInstances"
728
+ body = request_pb.region_instance_group_managers_recreate_request_resource.to_json
729
+ query_string_params = {}
730
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
731
+
732
+ [uri, body, query_string_params]
733
+ end
734
+
735
+ ##
736
+ # Baseline implementation for the resize REST call
737
+ #
738
+ # @param request_pb [::Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest]
739
+ # A request object representing the call parameters. Required.
740
+ # @param options [::Gapic::CallOptions]
741
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
742
+ #
743
+ # @yield [result, response] Access the result along with the Faraday response object
744
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
745
+ # @yieldparam response [::Faraday::Response]
746
+ #
747
+ # @return [::Google::Cloud::Compute::V1::Operation]
748
+ # A result object deserialized from the server's reply
749
+ def resize request_pb, options = nil
750
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
751
+
752
+ uri, _body, query_string_params = transcode_resize_request request_pb
753
+ response = @client_stub.make_post_request(
754
+ uri: uri,
755
+ params: query_string_params,
756
+ options: options
757
+ )
758
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
759
+
760
+ yield result, response if block_given?
761
+ result
762
+ end
763
+
764
+ ##
765
+ # GRPC transcoding helper method for the resize REST call
766
+ #
767
+ # @param request_pb [::Google::Cloud::Compute::V1::ResizeRegionInstanceGroupManagerRequest]
768
+ # A request object representing the call parameters. Required.
769
+ # @return [Array(String, [String, nil], Hash{String => String})]
770
+ # Uri, Body, Query string parameters
771
+ def transcode_resize_request request_pb
772
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/resize"
773
+ body = nil
774
+ query_string_params = {}
775
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
776
+ query_string_params["size"] = request_pb.size.to_s
777
+
778
+ [uri, body, query_string_params]
779
+ end
780
+
781
+ ##
782
+ # Baseline implementation for the set_instance_template REST call
783
+ #
784
+ # @param request_pb [::Google::Cloud::Compute::V1::SetInstanceTemplateRegionInstanceGroupManagerRequest]
785
+ # A request object representing the call parameters. Required.
786
+ # @param options [::Gapic::CallOptions]
787
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
788
+ #
789
+ # @yield [result, response] Access the result along with the Faraday response object
790
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
791
+ # @yieldparam response [::Faraday::Response]
792
+ #
793
+ # @return [::Google::Cloud::Compute::V1::Operation]
794
+ # A result object deserialized from the server's reply
795
+ def set_instance_template request_pb, options = nil
796
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
797
+
798
+ uri, body, query_string_params = transcode_set_instance_template_request request_pb
799
+ response = @client_stub.make_post_request(
800
+ uri: uri,
801
+ body: body,
802
+ params: query_string_params,
803
+ options: options
804
+ )
805
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
806
+
807
+ yield result, response if block_given?
808
+ result
809
+ end
810
+
811
+ ##
812
+ # GRPC transcoding helper method for the set_instance_template REST call
813
+ #
814
+ # @param request_pb [::Google::Cloud::Compute::V1::SetInstanceTemplateRegionInstanceGroupManagerRequest]
815
+ # A request object representing the call parameters. Required.
816
+ # @return [Array(String, [String, nil], Hash{String => String})]
817
+ # Uri, Body, Query string parameters
818
+ def transcode_set_instance_template_request request_pb
819
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/setInstanceTemplate"
820
+ body = request_pb.region_instance_group_managers_set_template_request_resource.to_json
821
+ query_string_params = {}
822
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
823
+
824
+ [uri, body, query_string_params]
825
+ end
826
+
827
+ ##
828
+ # Baseline implementation for the set_target_pools REST call
829
+ #
830
+ # @param request_pb [::Google::Cloud::Compute::V1::SetTargetPoolsRegionInstanceGroupManagerRequest]
831
+ # A request object representing the call parameters. Required.
832
+ # @param options [::Gapic::CallOptions]
833
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
834
+ #
835
+ # @yield [result, response] Access the result along with the Faraday response object
836
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
837
+ # @yieldparam response [::Faraday::Response]
838
+ #
839
+ # @return [::Google::Cloud::Compute::V1::Operation]
840
+ # A result object deserialized from the server's reply
841
+ def set_target_pools request_pb, options = nil
842
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
843
+
844
+ uri, body, query_string_params = transcode_set_target_pools_request request_pb
845
+ response = @client_stub.make_post_request(
846
+ uri: uri,
847
+ body: body,
848
+ params: query_string_params,
849
+ options: options
850
+ )
851
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
852
+
853
+ yield result, response if block_given?
854
+ result
855
+ end
856
+
857
+ ##
858
+ # GRPC transcoding helper method for the set_target_pools REST call
859
+ #
860
+ # @param request_pb [::Google::Cloud::Compute::V1::SetTargetPoolsRegionInstanceGroupManagerRequest]
861
+ # A request object representing the call parameters. Required.
862
+ # @return [Array(String, [String, nil], Hash{String => String})]
863
+ # Uri, Body, Query string parameters
864
+ def transcode_set_target_pools_request request_pb
865
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/setTargetPools"
866
+ body = request_pb.region_instance_group_managers_set_target_pools_request_resource.to_json
867
+ query_string_params = {}
868
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
869
+
870
+ [uri, body, query_string_params]
871
+ end
872
+
873
+ ##
874
+ # Baseline implementation for the update_per_instance_configs REST call
875
+ #
876
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest]
877
+ # A request object representing the call parameters. Required.
878
+ # @param options [::Gapic::CallOptions]
879
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
880
+ #
881
+ # @yield [result, response] Access the result along with the Faraday response object
882
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
883
+ # @yieldparam response [::Faraday::Response]
884
+ #
885
+ # @return [::Google::Cloud::Compute::V1::Operation]
886
+ # A result object deserialized from the server's reply
887
+ def update_per_instance_configs request_pb, options = nil
888
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
889
+
890
+ uri, body, query_string_params = transcode_update_per_instance_configs_request request_pb
891
+ response = @client_stub.make_post_request(
892
+ uri: uri,
893
+ body: body,
894
+ params: query_string_params,
895
+ options: options
896
+ )
897
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
898
+
899
+ yield result, response if block_given?
900
+ result
901
+ end
902
+
903
+ ##
904
+ # GRPC transcoding helper method for the update_per_instance_configs REST call
905
+ #
906
+ # @param request_pb [::Google::Cloud::Compute::V1::UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest]
907
+ # A request object representing the call parameters. Required.
908
+ # @return [Array(String, [String, nil], Hash{String => String})]
909
+ # Uri, Body, Query string parameters
910
+ def transcode_update_per_instance_configs_request request_pb
911
+ uri = "/compute/v1/projects/#{request_pb.project}/regions/#{request_pb.region}/instanceGroupManagers/#{request_pb.instance_group_manager}/updatePerInstanceConfigs"
912
+ body = request_pb.region_instance_group_manager_update_instance_config_req_resource.to_json
913
+ query_string_params = {}
914
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
915
+
916
+ [uri, body, query_string_params]
917
+ end
918
+ end
919
+ end
920
+ end
921
+ end
922
+ end
923
+ end
924
+ end