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,362 @@
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 InstanceTemplates
26
+ module Rest
27
+ ##
28
+ # REST service stub for the InstanceTemplates 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 delete REST call
43
+ #
44
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceTemplateRequest]
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 delete request_pb, options = nil
56
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
57
+
58
+ uri, _body, query_string_params = transcode_delete_request request_pb
59
+ response = @client_stub.make_delete_request(
60
+ uri: uri,
61
+ params: query_string_params,
62
+ options: options
63
+ )
64
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
65
+
66
+ yield result, response if block_given?
67
+ result
68
+ end
69
+
70
+ ##
71
+ # GRPC transcoding helper method for the delete REST call
72
+ #
73
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceTemplateRequest]
74
+ # A request object representing the call parameters. Required.
75
+ # @return [Array(String, [String, nil], Hash{String => String})]
76
+ # Uri, Body, Query string parameters
77
+ def transcode_delete_request request_pb
78
+ uri = "/compute/v1/projects/#{request_pb.project}/global/instanceTemplates/#{request_pb.instance_template}"
79
+ body = nil
80
+ query_string_params = {}
81
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
82
+
83
+ [uri, body, query_string_params]
84
+ end
85
+
86
+ ##
87
+ # Baseline implementation for the get REST call
88
+ #
89
+ # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceTemplateRequest]
90
+ # A request object representing the call parameters. Required.
91
+ # @param options [::Gapic::CallOptions]
92
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
93
+ #
94
+ # @yield [result, response] Access the result along with the Faraday response object
95
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceTemplate]
96
+ # @yieldparam response [::Faraday::Response]
97
+ #
98
+ # @return [::Google::Cloud::Compute::V1::InstanceTemplate]
99
+ # A result object deserialized from the server's reply
100
+ def get request_pb, options = nil
101
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
102
+
103
+ uri, _body, _query_string_params = transcode_get_request request_pb
104
+ response = @client_stub.make_get_request(
105
+ uri: uri,
106
+ options: options
107
+ )
108
+ result = ::Google::Cloud::Compute::V1::InstanceTemplate.decode_json response.body, ignore_unknown_fields: true
109
+
110
+ yield result, response if block_given?
111
+ result
112
+ end
113
+
114
+ ##
115
+ # GRPC transcoding helper method for the get REST call
116
+ #
117
+ # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceTemplateRequest]
118
+ # A request object representing the call parameters. Required.
119
+ # @return [Array(String, [String, nil], Hash{String => String})]
120
+ # Uri, Body, Query string parameters
121
+ def transcode_get_request request_pb
122
+ uri = "/compute/v1/projects/#{request_pb.project}/global/instanceTemplates/#{request_pb.instance_template}"
123
+ body = nil
124
+ query_string_params = {}
125
+
126
+ [uri, body, query_string_params]
127
+ end
128
+
129
+ ##
130
+ # Baseline implementation for the get_iam_policy REST call
131
+ #
132
+ # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInstanceTemplateRequest]
133
+ # A request object representing the call parameters. Required.
134
+ # @param options [::Gapic::CallOptions]
135
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
136
+ #
137
+ # @yield [result, response] Access the result along with the Faraday response object
138
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
139
+ # @yieldparam response [::Faraday::Response]
140
+ #
141
+ # @return [::Google::Cloud::Compute::V1::Policy]
142
+ # A result object deserialized from the server's reply
143
+ def get_iam_policy request_pb, options = nil
144
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
145
+
146
+ uri, _body, query_string_params = transcode_get_iam_policy_request request_pb
147
+ response = @client_stub.make_get_request(
148
+ uri: uri,
149
+ params: query_string_params,
150
+ options: options
151
+ )
152
+ result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
153
+
154
+ yield result, response if block_given?
155
+ result
156
+ end
157
+
158
+ ##
159
+ # GRPC transcoding helper method for the get_iam_policy REST call
160
+ #
161
+ # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyInstanceTemplateRequest]
162
+ # A request object representing the call parameters. Required.
163
+ # @return [Array(String, [String, nil], Hash{String => String})]
164
+ # Uri, Body, Query string parameters
165
+ def transcode_get_iam_policy_request request_pb
166
+ uri = "/compute/v1/projects/#{request_pb.project}/global/instanceTemplates/#{request_pb.resource}/getIamPolicy"
167
+ body = nil
168
+ query_string_params = {}
169
+ query_string_params["optionsRequestedPolicyVersion"] = request_pb.options_requested_policy_version.to_s if request_pb.has_options_requested_policy_version?
170
+
171
+ [uri, body, query_string_params]
172
+ end
173
+
174
+ ##
175
+ # Baseline implementation for the insert REST call
176
+ #
177
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceTemplateRequest]
178
+ # A request object representing the call parameters. Required.
179
+ # @param options [::Gapic::CallOptions]
180
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
181
+ #
182
+ # @yield [result, response] Access the result along with the Faraday response object
183
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
184
+ # @yieldparam response [::Faraday::Response]
185
+ #
186
+ # @return [::Google::Cloud::Compute::V1::Operation]
187
+ # A result object deserialized from the server's reply
188
+ def insert request_pb, options = nil
189
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
190
+
191
+ uri, body, query_string_params = transcode_insert_request request_pb
192
+ response = @client_stub.make_post_request(
193
+ uri: uri,
194
+ body: body,
195
+ params: query_string_params,
196
+ options: options
197
+ )
198
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
199
+
200
+ yield result, response if block_given?
201
+ result
202
+ end
203
+
204
+ ##
205
+ # GRPC transcoding helper method for the insert REST call
206
+ #
207
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceTemplateRequest]
208
+ # A request object representing the call parameters. Required.
209
+ # @return [Array(String, [String, nil], Hash{String => String})]
210
+ # Uri, Body, Query string parameters
211
+ def transcode_insert_request request_pb
212
+ uri = "/compute/v1/projects/#{request_pb.project}/global/instanceTemplates"
213
+ body = request_pb.instance_template_resource.to_json
214
+ query_string_params = {}
215
+ query_string_params["requestId"] = request_pb.request_id.to_s if request_pb.has_request_id?
216
+
217
+ [uri, body, query_string_params]
218
+ end
219
+
220
+ ##
221
+ # Baseline implementation for the list REST call
222
+ #
223
+ # @param request_pb [::Google::Cloud::Compute::V1::ListInstanceTemplatesRequest]
224
+ # A request object representing the call parameters. Required.
225
+ # @param options [::Gapic::CallOptions]
226
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
227
+ #
228
+ # @yield [result, response] Access the result along with the Faraday response object
229
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceTemplateList]
230
+ # @yieldparam response [::Faraday::Response]
231
+ #
232
+ # @return [::Google::Cloud::Compute::V1::InstanceTemplateList]
233
+ # A result object deserialized from the server's reply
234
+ def list request_pb, options = nil
235
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
236
+
237
+ uri, _body, query_string_params = transcode_list_request request_pb
238
+ response = @client_stub.make_get_request(
239
+ uri: uri,
240
+ params: query_string_params,
241
+ options: options
242
+ )
243
+ result = ::Google::Cloud::Compute::V1::InstanceTemplateList.decode_json response.body, ignore_unknown_fields: true
244
+
245
+ yield result, response if block_given?
246
+ result
247
+ end
248
+
249
+ ##
250
+ # GRPC transcoding helper method for the list REST call
251
+ #
252
+ # @param request_pb [::Google::Cloud::Compute::V1::ListInstanceTemplatesRequest]
253
+ # A request object representing the call parameters. Required.
254
+ # @return [Array(String, [String, nil], Hash{String => String})]
255
+ # Uri, Body, Query string parameters
256
+ def transcode_list_request request_pb
257
+ uri = "/compute/v1/projects/#{request_pb.project}/global/instanceTemplates"
258
+ body = nil
259
+ query_string_params = {}
260
+ query_string_params["filter"] = request_pb.filter.to_s if request_pb.has_filter?
261
+ query_string_params["maxResults"] = request_pb.max_results.to_s if request_pb.has_max_results?
262
+ query_string_params["orderBy"] = request_pb.order_by.to_s if request_pb.has_order_by?
263
+ query_string_params["pageToken"] = request_pb.page_token.to_s if request_pb.has_page_token?
264
+ query_string_params["returnPartialSuccess"] = request_pb.return_partial_success.to_s if request_pb.has_return_partial_success?
265
+
266
+ [uri, body, query_string_params]
267
+ end
268
+
269
+ ##
270
+ # Baseline implementation for the set_iam_policy REST call
271
+ #
272
+ # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInstanceTemplateRequest]
273
+ # A request object representing the call parameters. Required.
274
+ # @param options [::Gapic::CallOptions]
275
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
276
+ #
277
+ # @yield [result, response] Access the result along with the Faraday response object
278
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
279
+ # @yieldparam response [::Faraday::Response]
280
+ #
281
+ # @return [::Google::Cloud::Compute::V1::Policy]
282
+ # A result object deserialized from the server's reply
283
+ def set_iam_policy request_pb, options = nil
284
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
285
+
286
+ uri, body, _query_string_params = transcode_set_iam_policy_request request_pb
287
+ response = @client_stub.make_post_request(
288
+ uri: uri,
289
+ body: body,
290
+ options: options
291
+ )
292
+ result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
293
+
294
+ yield result, response if block_given?
295
+ result
296
+ end
297
+
298
+ ##
299
+ # GRPC transcoding helper method for the set_iam_policy REST call
300
+ #
301
+ # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyInstanceTemplateRequest]
302
+ # A request object representing the call parameters. Required.
303
+ # @return [Array(String, [String, nil], Hash{String => String})]
304
+ # Uri, Body, Query string parameters
305
+ def transcode_set_iam_policy_request request_pb
306
+ uri = "/compute/v1/projects/#{request_pb.project}/global/instanceTemplates/#{request_pb.resource}/setIamPolicy"
307
+ body = request_pb.global_set_policy_request_resource.to_json
308
+ query_string_params = {}
309
+
310
+ [uri, body, query_string_params]
311
+ end
312
+
313
+ ##
314
+ # Baseline implementation for the test_iam_permissions REST call
315
+ #
316
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInstanceTemplateRequest]
317
+ # A request object representing the call parameters. Required.
318
+ # @param options [::Gapic::CallOptions]
319
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
320
+ #
321
+ # @yield [result, response] Access the result along with the Faraday response object
322
+ # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
323
+ # @yieldparam response [::Faraday::Response]
324
+ #
325
+ # @return [::Google::Cloud::Compute::V1::TestPermissionsResponse]
326
+ # A result object deserialized from the server's reply
327
+ def test_iam_permissions request_pb, options = nil
328
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
329
+
330
+ uri, body, _query_string_params = transcode_test_iam_permissions_request request_pb
331
+ response = @client_stub.make_post_request(
332
+ uri: uri,
333
+ body: body,
334
+ options: options
335
+ )
336
+ result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
337
+
338
+ yield result, response if block_given?
339
+ result
340
+ end
341
+
342
+ ##
343
+ # GRPC transcoding helper method for the test_iam_permissions REST call
344
+ #
345
+ # @param request_pb [::Google::Cloud::Compute::V1::TestIamPermissionsInstanceTemplateRequest]
346
+ # A request object representing the call parameters. Required.
347
+ # @return [Array(String, [String, nil], Hash{String => String})]
348
+ # Uri, Body, Query string parameters
349
+ def transcode_test_iam_permissions_request request_pb
350
+ uri = "/compute/v1/projects/#{request_pb.project}/global/instanceTemplates/#{request_pb.resource}/testIamPermissions"
351
+ body = request_pb.test_permissions_request_resource.to_json
352
+ query_string_params = {}
353
+
354
+ [uri, body, query_string_params]
355
+ end
356
+ end
357
+ end
358
+ end
359
+ end
360
+ end
361
+ end
362
+ end
@@ -16,8 +16,6 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "gapic/rest"
20
- require "google/cloud/compute/v1/instance_templates/rest/grpc_transcoding"
21
19
  require "google/cloud/compute/v1/instance_templates/rest/client"
22
20
 
23
21
  module Google
@@ -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/instances/rest/service_stub"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -31,8 +32,6 @@ module Google
31
32
  # The Instances API.
32
33
  #
33
34
  class Client
34
- include GrpcTranscoding
35
-
36
35
  # @private
37
36
  attr_reader :instances_stub
38
37
 
@@ -42,13 +41,12 @@ module Google
42
41
  # See {::Google::Cloud::Compute::V1::Instances::Rest::Client::Configuration}
43
42
  # for a description of the configuration fields.
44
43
  #
45
- # ## Example
44
+ # @example
46
45
  #
47
- # To modify the configuration for all Instances clients:
48
- #
49
- # ::Google::Cloud::Compute::V1::Instances::Rest::Client.configure do |config|
50
- # config.timeout = 10.0
51
- # end
46
+ # # Modify the configuration for all Instances clients
47
+ # ::Google::Cloud::Compute::V1::Instances::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,120 @@ module Google
66
64
  end
67
65
  default_config = Client::Configuration.new parent_config
68
66
 
67
+ default_config.rpcs.add_access_config.timeout = 600.0
68
+
69
+ default_config.rpcs.add_resource_policies.timeout = 600.0
70
+
71
+ default_config.rpcs.aggregated_list.timeout = 600.0
72
+ default_config.rpcs.aggregated_list.retry_policy = {
73
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
74
+ }
75
+
76
+ default_config.rpcs.attach_disk.timeout = 600.0
77
+
78
+ default_config.rpcs.bulk_insert.timeout = 600.0
79
+
80
+ default_config.rpcs.delete.timeout = 600.0
81
+
82
+ default_config.rpcs.delete_access_config.timeout = 600.0
83
+
84
+ default_config.rpcs.detach_disk.timeout = 600.0
85
+
86
+ default_config.rpcs.get.timeout = 600.0
87
+ default_config.rpcs.get.retry_policy = {
88
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
89
+ }
90
+
91
+ default_config.rpcs.get_effective_firewalls.timeout = 600.0
92
+ default_config.rpcs.get_effective_firewalls.retry_policy = {
93
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
94
+ }
95
+
96
+ default_config.rpcs.get_guest_attributes.timeout = 600.0
97
+ default_config.rpcs.get_guest_attributes.retry_policy = {
98
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
99
+ }
100
+
101
+ default_config.rpcs.get_iam_policy.timeout = 600.0
102
+ default_config.rpcs.get_iam_policy.retry_policy = {
103
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
104
+ }
105
+
106
+ default_config.rpcs.get_screenshot.timeout = 600.0
107
+ default_config.rpcs.get_screenshot.retry_policy = {
108
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
109
+ }
110
+
111
+ default_config.rpcs.get_serial_port_output.timeout = 600.0
112
+ default_config.rpcs.get_serial_port_output.retry_policy = {
113
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
114
+ }
115
+
116
+ default_config.rpcs.get_shielded_instance_identity.timeout = 600.0
117
+ default_config.rpcs.get_shielded_instance_identity.retry_policy = {
118
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
119
+ }
120
+
121
+ default_config.rpcs.insert.timeout = 600.0
122
+
123
+ default_config.rpcs.list.timeout = 600.0
124
+ default_config.rpcs.list.retry_policy = {
125
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
126
+ }
127
+
128
+ default_config.rpcs.list_referrers.timeout = 600.0
129
+ default_config.rpcs.list_referrers.retry_policy = {
130
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
131
+ }
132
+
133
+ default_config.rpcs.remove_resource_policies.timeout = 600.0
134
+
135
+ default_config.rpcs.reset.timeout = 600.0
136
+
137
+ default_config.rpcs.set_deletion_protection.timeout = 600.0
138
+
139
+ default_config.rpcs.set_disk_auto_delete.timeout = 600.0
140
+
141
+ default_config.rpcs.set_iam_policy.timeout = 600.0
142
+
143
+ default_config.rpcs.set_labels.timeout = 600.0
144
+
145
+ default_config.rpcs.set_machine_resources.timeout = 600.0
146
+
147
+ default_config.rpcs.set_machine_type.timeout = 600.0
148
+
149
+ default_config.rpcs.set_metadata.timeout = 600.0
150
+
151
+ default_config.rpcs.set_min_cpu_platform.timeout = 600.0
152
+
153
+ default_config.rpcs.set_scheduling.timeout = 600.0
154
+
155
+ default_config.rpcs.set_service_account.timeout = 600.0
156
+
157
+ default_config.rpcs.set_shielded_instance_integrity_policy.timeout = 600.0
158
+
159
+ default_config.rpcs.set_tags.timeout = 600.0
160
+
161
+ default_config.rpcs.simulate_maintenance_event.timeout = 600.0
162
+
163
+ default_config.rpcs.start.timeout = 600.0
164
+
165
+ default_config.rpcs.start_with_encryption_key.timeout = 600.0
166
+
167
+ default_config.rpcs.stop.timeout = 600.0
168
+
169
+ default_config.rpcs.test_iam_permissions.timeout = 600.0
170
+
171
+ default_config.rpcs.update.timeout = 600.0
172
+
173
+ default_config.rpcs.update_access_config.timeout = 600.0
174
+
175
+ default_config.rpcs.update_display_device.timeout = 600.0
176
+
177
+ default_config.rpcs.update_network_interface.timeout = 600.0
178
+
179
+ default_config.rpcs.update_shielded_instance_config.timeout = 600.0
180
+
69
181
  default_config
70
182
  end
71
183
  yield @configure if block_given?
@@ -95,28 +207,20 @@ module Google
95
207
  ##
96
208
  # Create a new Instances REST client object.
97
209
  #
98
- # ## Examples
210
+ # @example
99
211
  #
100
- # To create a new Instances REST client with the default
101
- # configuration:
212
+ # # Create a client using the default configuration
213
+ # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new
102
214
  #
103
- # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new
104
- #
105
- # To create a new Instances REST client with a custom
106
- # configuration:
107
- #
108
- # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new do |config|
109
- # config.timeout = 10.0
110
- # end
215
+ # # Create a client using a custom configuration
216
+ # client = ::Google::Cloud::Compute::V1::Instances::Rest::Client.new do |config|
217
+ # config.timeout = 10.0
218
+ # end
111
219
  #
112
220
  # @yield [config] Configure the Instances client.
113
221
  # @yieldparam config [Client::Configuration]
114
222
  #
115
223
  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
224
  # Create the configuration object
121
225
  @config = Configuration.new Client.configure
122
226
 
@@ -126,11 +230,11 @@ module Google
126
230
  # Create credentials
127
231
  credentials = @config.credentials
128
232
  credentials ||= Credentials.default scope: @config.scope
129
- if credentials.is_a?(String) || credentials.is_a?(Hash)
233
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
130
234
  credentials = Credentials.new credentials, scope: @config.scope
131
235
  end
132
236
 
133
- @client_stub = ::Gapic::Rest::ClientStub.new endpoint: @config.endpoint, credentials: credentials
237
+ @instances_stub = ::Google::Cloud::Compute::V1::Instances::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
134
238
  end
135
239
 
136
240
  # Service calls
@@ -171,11 +275,11 @@ module Google
171
275
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
172
276
  # @param zone [::String]
173
277
  # The name of the zone for this request.
174
- # @yield [result, env] Access the result along with the Faraday environment object
175
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
278
+ # @yield [result, response] Access the result along with the Faraday response object
279
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
176
280
  # @yieldparam response [::Faraday::Response]
177
281
  #
178
- # @return [::Google::Cloud::Compute::V1::Operation]
282
+ # @return [::Gapic::Rest::BaseOperation]
179
283
  #
180
284
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
181
285
  def add_access_config request, options = nil
@@ -187,7 +291,7 @@ module Google
187
291
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
188
292
 
189
293
  # Customize the options with defaults
190
- call_metadata = {}
294
+ call_metadata = @config.rpcs.add_access_config.metadata.to_h
191
295
 
192
296
  # Set x-goog-api-client header
193
297
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -195,20 +299,17 @@ module Google
195
299
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
196
300
  transports_version_send: [:rest]
197
301
 
198
- options.apply_defaults timeout: @config.timeout,
302
+ options.apply_defaults timeout: @config.rpcs.add_access_config.timeout,
199
303
  metadata: call_metadata
200
304
 
201
- uri, body, query_string_params = transcode_add_access_config request
202
- response = @client_stub.make_post_request(
203
- uri: uri,
204
- body: body,
205
- params: query_string_params,
206
- options: options
207
- )
208
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
209
-
210
- yield result, response if block_given?
211
- result
305
+ options.apply_defaults timeout: @config.timeout,
306
+ metadata: @config.metadata
307
+
308
+ @instances_stub.add_access_config request, options do |result, response|
309
+ result = ::Gapic::Rest::BaseOperation.new result
310
+ yield result, response if block_given?
311
+ return result
312
+ end
212
313
  rescue ::Faraday::Error => e
213
314
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
214
315
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -248,11 +349,11 @@ module Google
248
349
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
249
350
  # @param zone [::String]
250
351
  # The name of the zone for this request.
251
- # @yield [result, env] Access the result along with the Faraday environment object
252
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
352
+ # @yield [result, response] Access the result along with the Faraday response object
353
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
253
354
  # @yieldparam response [::Faraday::Response]
254
355
  #
255
- # @return [::Google::Cloud::Compute::V1::Operation]
356
+ # @return [::Gapic::Rest::BaseOperation]
256
357
  #
257
358
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
258
359
  def add_resource_policies request, options = nil
@@ -264,7 +365,7 @@ module Google
264
365
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
265
366
 
266
367
  # Customize the options with defaults
267
- call_metadata = {}
368
+ call_metadata = @config.rpcs.add_resource_policies.metadata.to_h
268
369
 
269
370
  # Set x-goog-api-client header
270
371
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -272,20 +373,17 @@ module Google
272
373
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
273
374
  transports_version_send: [:rest]
274
375
 
275
- options.apply_defaults timeout: @config.timeout,
376
+ options.apply_defaults timeout: @config.rpcs.add_resource_policies.timeout,
276
377
  metadata: call_metadata
277
378
 
278
- uri, body, query_string_params = transcode_add_resource_policies request
279
- response = @client_stub.make_post_request(
280
- uri: uri,
281
- body: body,
282
- params: query_string_params,
283
- options: options
284
- )
285
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
286
-
287
- yield result, response if block_given?
288
- result
379
+ options.apply_defaults timeout: @config.timeout,
380
+ metadata: @config.metadata
381
+
382
+ @instances_stub.add_resource_policies request, options do |result, response|
383
+ result = ::Gapic::Rest::BaseOperation.new result
384
+ yield result, response if block_given?
385
+ return result
386
+ end
289
387
  rescue ::Faraday::Error => e
290
388
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
291
389
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -334,12 +432,12 @@ module Google
334
432
  # @param project [::String]
335
433
  # Project ID for this request.
336
434
  # @param return_partial_success [::Boolean]
337
- # 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.
338
- # @yield [result, env] Access the result along with the Faraday environment object
339
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceAggregatedList]
435
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
436
+ # @yield [result, response] Access the result along with the Faraday response object
437
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstancesScopedList>]
340
438
  # @yieldparam response [::Faraday::Response]
341
439
  #
342
- # @return [::Google::Cloud::Compute::V1::InstanceAggregatedList]
440
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::InstancesScopedList>]
343
441
  #
344
442
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
345
443
  def aggregated_list request, options = nil
@@ -351,7 +449,7 @@ module Google
351
449
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
352
450
 
353
451
  # Customize the options with defaults
354
- call_metadata = {}
452
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
355
453
 
356
454
  # Set x-goog-api-client header
357
455
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -359,19 +457,17 @@ module Google
359
457
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
360
458
  transports_version_send: [:rest]
361
459
 
362
- options.apply_defaults timeout: @config.timeout,
460
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
363
461
  metadata: call_metadata
364
462
 
365
- uri, _body, query_string_params = transcode_aggregated_list request
366
- response = @client_stub.make_get_request(
367
- uri: uri,
368
- params: query_string_params,
369
- options: options
370
- )
371
- result = ::Google::Cloud::Compute::V1::InstanceAggregatedList.decode_json response.body, ignore_unknown_fields: true
463
+ options.apply_defaults timeout: @config.timeout,
464
+ metadata: @config.metadata
372
465
 
373
- yield result, response if block_given?
374
- result
466
+ @instances_stub.aggregated_list request, options do |result, response|
467
+ result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :aggregated_list, "items", request, result, options
468
+ yield result, response if block_given?
469
+ return result
470
+ end
375
471
  rescue ::Faraday::Error => e
376
472
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
377
473
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -413,11 +509,11 @@ module Google
413
509
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
414
510
  # @param zone [::String]
415
511
  # The name of the zone for this request.
416
- # @yield [result, env] Access the result along with the Faraday environment object
417
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
512
+ # @yield [result, response] Access the result along with the Faraday response object
513
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
418
514
  # @yieldparam response [::Faraday::Response]
419
515
  #
420
- # @return [::Google::Cloud::Compute::V1::Operation]
516
+ # @return [::Gapic::Rest::BaseOperation]
421
517
  #
422
518
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
423
519
  def attach_disk request, options = nil
@@ -429,7 +525,7 @@ module Google
429
525
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
430
526
 
431
527
  # Customize the options with defaults
432
- call_metadata = {}
528
+ call_metadata = @config.rpcs.attach_disk.metadata.to_h
433
529
 
434
530
  # Set x-goog-api-client header
435
531
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -437,27 +533,96 @@ module Google
437
533
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
438
534
  transports_version_send: [:rest]
439
535
 
536
+ options.apply_defaults timeout: @config.rpcs.attach_disk.timeout,
537
+ metadata: call_metadata
538
+
440
539
  options.apply_defaults timeout: @config.timeout,
540
+ metadata: @config.metadata
541
+
542
+ @instances_stub.attach_disk request, options do |result, response|
543
+ result = ::Gapic::Rest::BaseOperation.new result
544
+ yield result, response if block_given?
545
+ return result
546
+ end
547
+ rescue ::Faraday::Error => e
548
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
549
+ raise ::Google::Cloud::Error.from_error(gapic_error)
550
+ end
551
+
552
+ ##
553
+ # Creates multiple instances. Count specifies the number of instances to create.
554
+ #
555
+ # @overload bulk_insert(request, options = nil)
556
+ # Pass arguments to `bulk_insert` via a request object, either of type
557
+ # {::Google::Cloud::Compute::V1::BulkInsertInstanceRequest} or an equivalent Hash.
558
+ #
559
+ # @param request [::Google::Cloud::Compute::V1::BulkInsertInstanceRequest, ::Hash]
560
+ # A request object representing the call parameters. Required. To specify no
561
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
562
+ # @param options [::Gapic::CallOptions, ::Hash]
563
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
564
+ # Note: currently retry functionality is not implemented. While it is possible
565
+ # to set it using ::Gapic::CallOptions, it will not be applied
566
+ #
567
+ # @overload bulk_insert(bulk_insert_instance_resource_resource: nil, project: nil, request_id: nil, zone: nil)
568
+ # Pass arguments to `bulk_insert` via keyword arguments. Note that at
569
+ # least one keyword argument is required. To specify no parameters, or to keep all
570
+ # the default parameter values, pass an empty Hash as a request object (see above).
571
+ #
572
+ # @param bulk_insert_instance_resource_resource [::Google::Cloud::Compute::V1::BulkInsertInstanceResource, ::Hash]
573
+ # The body resource for this request
574
+ # @param project [::String]
575
+ # Project ID for this request.
576
+ # @param request_id [::String]
577
+ # 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.
578
+ #
579
+ # 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.
580
+ #
581
+ # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
582
+ # @param zone [::String]
583
+ # The name of the zone for this request.
584
+ # @yield [result, response] Access the result along with the Faraday response object
585
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
586
+ # @yieldparam response [::Faraday::Response]
587
+ #
588
+ # @return [::Gapic::Rest::BaseOperation]
589
+ #
590
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
591
+ def bulk_insert request, options = nil
592
+ raise ::ArgumentError, "request must be provided" if request.nil?
593
+
594
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::BulkInsertInstanceRequest
595
+
596
+ # Converts hash and nil to an options object
597
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
598
+
599
+ # Customize the options with defaults
600
+ call_metadata = @config.rpcs.bulk_insert.metadata.to_h
601
+
602
+ # Set x-goog-api-client header
603
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
604
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
605
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
606
+ transports_version_send: [:rest]
607
+
608
+ options.apply_defaults timeout: @config.rpcs.bulk_insert.timeout,
441
609
  metadata: call_metadata
442
610
 
443
- uri, body, query_string_params = transcode_attach_disk request
444
- response = @client_stub.make_post_request(
445
- uri: uri,
446
- body: body,
447
- params: query_string_params,
448
- options: options
449
- )
450
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
451
-
452
- yield result, response if block_given?
453
- result
611
+ options.apply_defaults timeout: @config.timeout,
612
+ metadata: @config.metadata
613
+
614
+ @instances_stub.bulk_insert request, options do |result, response|
615
+ result = ::Gapic::Rest::BaseOperation.new result
616
+ yield result, response if block_given?
617
+ return result
618
+ end
454
619
  rescue ::Faraday::Error => e
455
620
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
456
621
  raise ::Google::Cloud::Error.from_error(gapic_error)
457
622
  end
458
623
 
459
624
  ##
460
- # Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
625
+ # Deletes the specified Instance resource. For more information, see Deleting an instance.
461
626
  #
462
627
  # @overload delete(request, options = nil)
463
628
  # Pass arguments to `delete` via a request object, either of type
@@ -488,11 +653,11 @@ module Google
488
653
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
489
654
  # @param zone [::String]
490
655
  # The name of the zone for this request.
491
- # @yield [result, env] Access the result along with the Faraday environment object
492
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
656
+ # @yield [result, response] Access the result along with the Faraday response object
657
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
493
658
  # @yieldparam response [::Faraday::Response]
494
659
  #
495
- # @return [::Google::Cloud::Compute::V1::Operation]
660
+ # @return [::Gapic::Rest::BaseOperation]
496
661
  #
497
662
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
498
663
  def delete request, options = nil
@@ -504,7 +669,7 @@ module Google
504
669
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
505
670
 
506
671
  # Customize the options with defaults
507
- call_metadata = {}
672
+ call_metadata = @config.rpcs.delete.metadata.to_h
508
673
 
509
674
  # Set x-goog-api-client header
510
675
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -512,19 +677,17 @@ module Google
512
677
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
513
678
  transports_version_send: [:rest]
514
679
 
515
- options.apply_defaults timeout: @config.timeout,
680
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
516
681
  metadata: call_metadata
517
682
 
518
- uri, _body, query_string_params = transcode_delete request
519
- response = @client_stub.make_delete_request(
520
- uri: uri,
521
- params: query_string_params,
522
- options: options
523
- )
524
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
683
+ options.apply_defaults timeout: @config.timeout,
684
+ metadata: @config.metadata
525
685
 
526
- yield result, response if block_given?
527
- result
686
+ @instances_stub.delete request, options do |result, response|
687
+ result = ::Gapic::Rest::BaseOperation.new result
688
+ yield result, response if block_given?
689
+ return result
690
+ end
528
691
  rescue ::Faraday::Error => e
529
692
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
530
693
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -566,11 +729,11 @@ module Google
566
729
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
567
730
  # @param zone [::String]
568
731
  # The name of the zone for this request.
569
- # @yield [result, env] Access the result along with the Faraday environment object
570
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
732
+ # @yield [result, response] Access the result along with the Faraday response object
733
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
571
734
  # @yieldparam response [::Faraday::Response]
572
735
  #
573
- # @return [::Google::Cloud::Compute::V1::Operation]
736
+ # @return [::Gapic::Rest::BaseOperation]
574
737
  #
575
738
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
576
739
  def delete_access_config request, options = nil
@@ -582,7 +745,7 @@ module Google
582
745
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
583
746
 
584
747
  # Customize the options with defaults
585
- call_metadata = {}
748
+ call_metadata = @config.rpcs.delete_access_config.metadata.to_h
586
749
 
587
750
  # Set x-goog-api-client header
588
751
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -590,19 +753,17 @@ module Google
590
753
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
591
754
  transports_version_send: [:rest]
592
755
 
593
- options.apply_defaults timeout: @config.timeout,
756
+ options.apply_defaults timeout: @config.rpcs.delete_access_config.timeout,
594
757
  metadata: call_metadata
595
758
 
596
- uri, _body, query_string_params = transcode_delete_access_config request
597
- response = @client_stub.make_post_request(
598
- uri: uri,
599
- params: query_string_params,
600
- options: options
601
- )
602
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
759
+ options.apply_defaults timeout: @config.timeout,
760
+ metadata: @config.metadata
603
761
 
604
- yield result, response if block_given?
605
- result
762
+ @instances_stub.delete_access_config request, options do |result, response|
763
+ result = ::Gapic::Rest::BaseOperation.new result
764
+ yield result, response if block_given?
765
+ return result
766
+ end
606
767
  rescue ::Faraday::Error => e
607
768
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
608
769
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -642,11 +803,11 @@ module Google
642
803
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
643
804
  # @param zone [::String]
644
805
  # The name of the zone for this request.
645
- # @yield [result, env] Access the result along with the Faraday environment object
646
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
806
+ # @yield [result, response] Access the result along with the Faraday response object
807
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
647
808
  # @yieldparam response [::Faraday::Response]
648
809
  #
649
- # @return [::Google::Cloud::Compute::V1::Operation]
810
+ # @return [::Gapic::Rest::BaseOperation]
650
811
  #
651
812
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
652
813
  def detach_disk request, options = nil
@@ -658,7 +819,7 @@ module Google
658
819
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
659
820
 
660
821
  # Customize the options with defaults
661
- call_metadata = {}
822
+ call_metadata = @config.rpcs.detach_disk.metadata.to_h
662
823
 
663
824
  # Set x-goog-api-client header
664
825
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -666,19 +827,17 @@ module Google
666
827
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
667
828
  transports_version_send: [:rest]
668
829
 
669
- options.apply_defaults timeout: @config.timeout,
830
+ options.apply_defaults timeout: @config.rpcs.detach_disk.timeout,
670
831
  metadata: call_metadata
671
832
 
672
- uri, _body, query_string_params = transcode_detach_disk request
673
- response = @client_stub.make_post_request(
674
- uri: uri,
675
- params: query_string_params,
676
- options: options
677
- )
678
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
833
+ options.apply_defaults timeout: @config.timeout,
834
+ metadata: @config.metadata
679
835
 
680
- yield result, response if block_given?
681
- result
836
+ @instances_stub.detach_disk request, options do |result, response|
837
+ result = ::Gapic::Rest::BaseOperation.new result
838
+ yield result, response if block_given?
839
+ return result
840
+ end
682
841
  rescue ::Faraday::Error => e
683
842
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
684
843
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -710,7 +869,7 @@ module Google
710
869
  # Project ID for this request.
711
870
  # @param zone [::String]
712
871
  # The name of the zone for this request.
713
- # @yield [result, env] Access the result along with the Faraday environment object
872
+ # @yield [result, response] Access the result along with the Faraday response object
714
873
  # @yieldparam result [::Google::Cloud::Compute::V1::Instance]
715
874
  # @yieldparam response [::Faraday::Response]
716
875
  #
@@ -726,7 +885,7 @@ module Google
726
885
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
727
886
 
728
887
  # Customize the options with defaults
729
- call_metadata = {}
888
+ call_metadata = @config.rpcs.get.metadata.to_h
730
889
 
731
890
  # Set x-goog-api-client header
732
891
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -734,18 +893,83 @@ module Google
734
893
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
735
894
  transports_version_send: [:rest]
736
895
 
896
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
897
+ metadata: call_metadata
898
+
737
899
  options.apply_defaults timeout: @config.timeout,
900
+ metadata: @config.metadata
901
+
902
+ @instances_stub.get request, options do |result, response|
903
+ yield result, response if block_given?
904
+ return result
905
+ end
906
+ rescue ::Faraday::Error => e
907
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
908
+ raise ::Google::Cloud::Error.from_error(gapic_error)
909
+ end
910
+
911
+ ##
912
+ # Returns effective firewalls applied to an interface of the instance.
913
+ #
914
+ # @overload get_effective_firewalls(request, options = nil)
915
+ # Pass arguments to `get_effective_firewalls` via a request object, either of type
916
+ # {::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest} or an equivalent Hash.
917
+ #
918
+ # @param request [::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest, ::Hash]
919
+ # A request object representing the call parameters. Required. To specify no
920
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
921
+ # @param options [::Gapic::CallOptions, ::Hash]
922
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
923
+ # Note: currently retry functionality is not implemented. While it is possible
924
+ # to set it using ::Gapic::CallOptions, it will not be applied
925
+ #
926
+ # @overload get_effective_firewalls(instance: nil, network_interface: nil, project: nil, zone: nil)
927
+ # Pass arguments to `get_effective_firewalls` via keyword arguments. Note that at
928
+ # least one keyword argument is required. To specify no parameters, or to keep all
929
+ # the default parameter values, pass an empty Hash as a request object (see above).
930
+ #
931
+ # @param instance [::String]
932
+ # Name of the instance scoping this request.
933
+ # @param network_interface [::String]
934
+ # The name of the network interface to get the effective firewalls.
935
+ # @param project [::String]
936
+ # Project ID for this request.
937
+ # @param zone [::String]
938
+ # The name of the zone for this request.
939
+ # @yield [result, response] Access the result along with the Faraday response object
940
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse]
941
+ # @yieldparam response [::Faraday::Response]
942
+ #
943
+ # @return [::Google::Cloud::Compute::V1::InstancesGetEffectiveFirewallsResponse]
944
+ #
945
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
946
+ def get_effective_firewalls request, options = nil
947
+ raise ::ArgumentError, "request must be provided" if request.nil?
948
+
949
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetEffectiveFirewallsInstanceRequest
950
+
951
+ # Converts hash and nil to an options object
952
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
953
+
954
+ # Customize the options with defaults
955
+ call_metadata = @config.rpcs.get_effective_firewalls.metadata.to_h
956
+
957
+ # Set x-goog-api-client header
958
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
959
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
960
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
961
+ transports_version_send: [:rest]
962
+
963
+ options.apply_defaults timeout: @config.rpcs.get_effective_firewalls.timeout,
738
964
  metadata: call_metadata
739
965
 
740
- uri, _body, _query_string_params = transcode_get request
741
- response = @client_stub.make_get_request(
742
- uri: uri,
743
- options: options
744
- )
745
- result = ::Google::Cloud::Compute::V1::Instance.decode_json response.body, ignore_unknown_fields: true
966
+ options.apply_defaults timeout: @config.timeout,
967
+ metadata: @config.metadata
746
968
 
747
- yield result, response if block_given?
748
- result
969
+ @instances_stub.get_effective_firewalls request, options do |result, response|
970
+ yield result, response if block_given?
971
+ return result
972
+ end
749
973
  rescue ::Faraday::Error => e
750
974
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
751
975
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -781,7 +1005,7 @@ module Google
781
1005
  # Specifies the key for the guest attributes entry.
782
1006
  # @param zone [::String]
783
1007
  # The name of the zone for this request.
784
- # @yield [result, env] Access the result along with the Faraday environment object
1008
+ # @yield [result, response] Access the result along with the Faraday response object
785
1009
  # @yieldparam result [::Google::Cloud::Compute::V1::GuestAttributes]
786
1010
  # @yieldparam response [::Faraday::Response]
787
1011
  #
@@ -797,7 +1021,7 @@ module Google
797
1021
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
798
1022
 
799
1023
  # Customize the options with defaults
800
- call_metadata = {}
1024
+ call_metadata = @config.rpcs.get_guest_attributes.metadata.to_h
801
1025
 
802
1026
  # Set x-goog-api-client header
803
1027
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -805,19 +1029,16 @@ module Google
805
1029
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
806
1030
  transports_version_send: [:rest]
807
1031
 
808
- options.apply_defaults timeout: @config.timeout,
1032
+ options.apply_defaults timeout: @config.rpcs.get_guest_attributes.timeout,
809
1033
  metadata: call_metadata
810
1034
 
811
- uri, _body, query_string_params = transcode_get_guest_attributes request
812
- response = @client_stub.make_get_request(
813
- uri: uri,
814
- params: query_string_params,
815
- options: options
816
- )
817
- result = ::Google::Cloud::Compute::V1::GuestAttributes.decode_json response.body, ignore_unknown_fields: true
1035
+ options.apply_defaults timeout: @config.timeout,
1036
+ metadata: @config.metadata
818
1037
 
819
- yield result, response if block_given?
820
- result
1038
+ @instances_stub.get_guest_attributes request, options do |result, response|
1039
+ yield result, response if block_given?
1040
+ return result
1041
+ end
821
1042
  rescue ::Faraday::Error => e
822
1043
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
823
1044
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -851,7 +1072,7 @@ module Google
851
1072
  # Name or id of the resource for this request.
852
1073
  # @param zone [::String]
853
1074
  # The name of the zone for this request.
854
- # @yield [result, env] Access the result along with the Faraday environment object
1075
+ # @yield [result, response] Access the result along with the Faraday response object
855
1076
  # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
856
1077
  # @yieldparam response [::Faraday::Response]
857
1078
  #
@@ -867,7 +1088,7 @@ module Google
867
1088
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
868
1089
 
869
1090
  # Customize the options with defaults
870
- call_metadata = {}
1091
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
871
1092
 
872
1093
  # Set x-goog-api-client header
873
1094
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -875,19 +1096,16 @@ module Google
875
1096
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
876
1097
  transports_version_send: [:rest]
877
1098
 
878
- options.apply_defaults timeout: @config.timeout,
1099
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
879
1100
  metadata: call_metadata
880
1101
 
881
- uri, _body, query_string_params = transcode_get_iam_policy request
882
- response = @client_stub.make_get_request(
883
- uri: uri,
884
- params: query_string_params,
885
- options: options
886
- )
887
- result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
1102
+ options.apply_defaults timeout: @config.timeout,
1103
+ metadata: @config.metadata
888
1104
 
889
- yield result, response if block_given?
890
- result
1105
+ @instances_stub.get_iam_policy request, options do |result, response|
1106
+ yield result, response if block_given?
1107
+ return result
1108
+ end
891
1109
  rescue ::Faraday::Error => e
892
1110
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
893
1111
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -919,7 +1137,7 @@ module Google
919
1137
  # Project ID for this request.
920
1138
  # @param zone [::String]
921
1139
  # The name of the zone for this request.
922
- # @yield [result, env] Access the result along with the Faraday environment object
1140
+ # @yield [result, response] Access the result along with the Faraday response object
923
1141
  # @yieldparam result [::Google::Cloud::Compute::V1::Screenshot]
924
1142
  # @yieldparam response [::Faraday::Response]
925
1143
  #
@@ -935,7 +1153,7 @@ module Google
935
1153
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
936
1154
 
937
1155
  # Customize the options with defaults
938
- call_metadata = {}
1156
+ call_metadata = @config.rpcs.get_screenshot.metadata.to_h
939
1157
 
940
1158
  # Set x-goog-api-client header
941
1159
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -943,18 +1161,16 @@ module Google
943
1161
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
944
1162
  transports_version_send: [:rest]
945
1163
 
946
- options.apply_defaults timeout: @config.timeout,
1164
+ options.apply_defaults timeout: @config.rpcs.get_screenshot.timeout,
947
1165
  metadata: call_metadata
948
1166
 
949
- uri, _body, _query_string_params = transcode_get_screenshot request
950
- response = @client_stub.make_get_request(
951
- uri: uri,
952
- options: options
953
- )
954
- result = ::Google::Cloud::Compute::V1::Screenshot.decode_json response.body, ignore_unknown_fields: true
1167
+ options.apply_defaults timeout: @config.timeout,
1168
+ metadata: @config.metadata
955
1169
 
956
- yield result, response if block_given?
957
- result
1170
+ @instances_stub.get_screenshot request, options do |result, response|
1171
+ yield result, response if block_given?
1172
+ return result
1173
+ end
958
1174
  rescue ::Faraday::Error => e
959
1175
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
960
1176
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -986,7 +1202,7 @@ module Google
986
1202
  # Specifies which COM or serial port to retrieve data from.
987
1203
  # @param project [::String]
988
1204
  # Project ID for this request.
989
- # @param start [::String]
1205
+ # @param start [::Integer]
990
1206
  # Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`.
991
1207
  #
992
1208
  # If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value.
@@ -994,7 +1210,7 @@ module Google
994
1210
  # You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.
995
1211
  # @param zone [::String]
996
1212
  # The name of the zone for this request.
997
- # @yield [result, env] Access the result along with the Faraday environment object
1213
+ # @yield [result, response] Access the result along with the Faraday response object
998
1214
  # @yieldparam result [::Google::Cloud::Compute::V1::SerialPortOutput]
999
1215
  # @yieldparam response [::Faraday::Response]
1000
1216
  #
@@ -1010,7 +1226,7 @@ module Google
1010
1226
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1011
1227
 
1012
1228
  # Customize the options with defaults
1013
- call_metadata = {}
1229
+ call_metadata = @config.rpcs.get_serial_port_output.metadata.to_h
1014
1230
 
1015
1231
  # Set x-goog-api-client header
1016
1232
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1018,19 +1234,16 @@ module Google
1018
1234
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1019
1235
  transports_version_send: [:rest]
1020
1236
 
1021
- options.apply_defaults timeout: @config.timeout,
1237
+ options.apply_defaults timeout: @config.rpcs.get_serial_port_output.timeout,
1022
1238
  metadata: call_metadata
1023
1239
 
1024
- uri, _body, query_string_params = transcode_get_serial_port_output request
1025
- response = @client_stub.make_get_request(
1026
- uri: uri,
1027
- params: query_string_params,
1028
- options: options
1029
- )
1030
- result = ::Google::Cloud::Compute::V1::SerialPortOutput.decode_json response.body, ignore_unknown_fields: true
1240
+ options.apply_defaults timeout: @config.timeout,
1241
+ metadata: @config.metadata
1031
1242
 
1032
- yield result, response if block_given?
1033
- result
1243
+ @instances_stub.get_serial_port_output request, options do |result, response|
1244
+ yield result, response if block_given?
1245
+ return result
1246
+ end
1034
1247
  rescue ::Faraday::Error => e
1035
1248
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1036
1249
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1062,7 +1275,7 @@ module Google
1062
1275
  # Project ID for this request.
1063
1276
  # @param zone [::String]
1064
1277
  # The name of the zone for this request.
1065
- # @yield [result, env] Access the result along with the Faraday environment object
1278
+ # @yield [result, response] Access the result along with the Faraday response object
1066
1279
  # @yieldparam result [::Google::Cloud::Compute::V1::ShieldedInstanceIdentity]
1067
1280
  # @yieldparam response [::Faraday::Response]
1068
1281
  #
@@ -1078,7 +1291,7 @@ module Google
1078
1291
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1079
1292
 
1080
1293
  # Customize the options with defaults
1081
- call_metadata = {}
1294
+ call_metadata = @config.rpcs.get_shielded_instance_identity.metadata.to_h
1082
1295
 
1083
1296
  # Set x-goog-api-client header
1084
1297
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1086,18 +1299,16 @@ module Google
1086
1299
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1087
1300
  transports_version_send: [:rest]
1088
1301
 
1089
- options.apply_defaults timeout: @config.timeout,
1302
+ options.apply_defaults timeout: @config.rpcs.get_shielded_instance_identity.timeout,
1090
1303
  metadata: call_metadata
1091
1304
 
1092
- uri, _body, _query_string_params = transcode_get_shielded_instance_identity request
1093
- response = @client_stub.make_get_request(
1094
- uri: uri,
1095
- options: options
1096
- )
1097
- result = ::Google::Cloud::Compute::V1::ShieldedInstanceIdentity.decode_json response.body, ignore_unknown_fields: true
1305
+ options.apply_defaults timeout: @config.timeout,
1306
+ metadata: @config.metadata
1098
1307
 
1099
- yield result, response if block_given?
1100
- result
1308
+ @instances_stub.get_shielded_instance_identity request, options do |result, response|
1309
+ yield result, response if block_given?
1310
+ return result
1311
+ end
1101
1312
  rescue ::Faraday::Error => e
1102
1313
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1103
1314
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1142,11 +1353,11 @@ module Google
1142
1353
  # - global/instanceTemplates/instanceTemplate
1143
1354
  # @param zone [::String]
1144
1355
  # The name of the zone for this request.
1145
- # @yield [result, env] Access the result along with the Faraday environment object
1146
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1356
+ # @yield [result, response] Access the result along with the Faraday response object
1357
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1147
1358
  # @yieldparam response [::Faraday::Response]
1148
1359
  #
1149
- # @return [::Google::Cloud::Compute::V1::Operation]
1360
+ # @return [::Gapic::Rest::BaseOperation]
1150
1361
  #
1151
1362
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1152
1363
  def insert request, options = nil
@@ -1158,7 +1369,7 @@ module Google
1158
1369
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1159
1370
 
1160
1371
  # Customize the options with defaults
1161
- call_metadata = {}
1372
+ call_metadata = @config.rpcs.insert.metadata.to_h
1162
1373
 
1163
1374
  # Set x-goog-api-client header
1164
1375
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1166,20 +1377,17 @@ module Google
1166
1377
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1167
1378
  transports_version_send: [:rest]
1168
1379
 
1169
- options.apply_defaults timeout: @config.timeout,
1380
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
1170
1381
  metadata: call_metadata
1171
1382
 
1172
- uri, body, query_string_params = transcode_insert request
1173
- response = @client_stub.make_post_request(
1174
- uri: uri,
1175
- body: body,
1176
- params: query_string_params,
1177
- options: options
1178
- )
1179
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1180
-
1181
- yield result, response if block_given?
1182
- result
1383
+ options.apply_defaults timeout: @config.timeout,
1384
+ metadata: @config.metadata
1385
+
1386
+ @instances_stub.insert request, options do |result, response|
1387
+ result = ::Gapic::Rest::BaseOperation.new result
1388
+ yield result, response if block_given?
1389
+ return result
1390
+ end
1183
1391
  rescue ::Faraday::Error => e
1184
1392
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1185
1393
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1226,14 +1434,14 @@ module Google
1226
1434
  # @param project [::String]
1227
1435
  # Project ID for this request.
1228
1436
  # @param return_partial_success [::Boolean]
1229
- # 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.
1437
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1230
1438
  # @param zone [::String]
1231
1439
  # The name of the zone for this request.
1232
- # @yield [result, env] Access the result along with the Faraday environment object
1233
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceList]
1440
+ # @yield [result, response] Access the result along with the Faraday response object
1441
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Instance>]
1234
1442
  # @yieldparam response [::Faraday::Response]
1235
1443
  #
1236
- # @return [::Google::Cloud::Compute::V1::InstanceList]
1444
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Instance>]
1237
1445
  #
1238
1446
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1239
1447
  def list request, options = nil
@@ -1245,7 +1453,7 @@ module Google
1245
1453
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1246
1454
 
1247
1455
  # Customize the options with defaults
1248
- call_metadata = {}
1456
+ call_metadata = @config.rpcs.list.metadata.to_h
1249
1457
 
1250
1458
  # Set x-goog-api-client header
1251
1459
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1253,19 +1461,17 @@ module Google
1253
1461
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1254
1462
  transports_version_send: [:rest]
1255
1463
 
1256
- options.apply_defaults timeout: @config.timeout,
1464
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
1257
1465
  metadata: call_metadata
1258
1466
 
1259
- uri, _body, query_string_params = transcode_list request
1260
- response = @client_stub.make_get_request(
1261
- uri: uri,
1262
- params: query_string_params,
1263
- options: options
1264
- )
1265
- result = ::Google::Cloud::Compute::V1::InstanceList.decode_json response.body, ignore_unknown_fields: true
1467
+ options.apply_defaults timeout: @config.timeout,
1468
+ metadata: @config.metadata
1266
1469
 
1267
- yield result, response if block_given?
1268
- result
1470
+ @instances_stub.list request, options do |result, response|
1471
+ result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list, "items", request, result, options
1472
+ yield result, response if block_given?
1473
+ return result
1474
+ end
1269
1475
  rescue ::Faraday::Error => e
1270
1476
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1271
1477
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1314,14 +1520,14 @@ module Google
1314
1520
  # @param project [::String]
1315
1521
  # Project ID for this request.
1316
1522
  # @param return_partial_success [::Boolean]
1317
- # 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.
1523
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1318
1524
  # @param zone [::String]
1319
1525
  # The name of the zone for this request.
1320
- # @yield [result, env] Access the result along with the Faraday environment object
1321
- # @yieldparam result [::Google::Cloud::Compute::V1::InstanceListReferrers]
1526
+ # @yield [result, response] Access the result along with the Faraday response object
1527
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Reference>]
1322
1528
  # @yieldparam response [::Faraday::Response]
1323
1529
  #
1324
- # @return [::Google::Cloud::Compute::V1::InstanceListReferrers]
1530
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::Reference>]
1325
1531
  #
1326
1532
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1327
1533
  def list_referrers request, options = nil
@@ -1333,7 +1539,7 @@ module Google
1333
1539
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1334
1540
 
1335
1541
  # Customize the options with defaults
1336
- call_metadata = {}
1542
+ call_metadata = @config.rpcs.list_referrers.metadata.to_h
1337
1543
 
1338
1544
  # Set x-goog-api-client header
1339
1545
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1341,19 +1547,17 @@ module Google
1341
1547
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1342
1548
  transports_version_send: [:rest]
1343
1549
 
1344
- options.apply_defaults timeout: @config.timeout,
1550
+ options.apply_defaults timeout: @config.rpcs.list_referrers.timeout,
1345
1551
  metadata: call_metadata
1346
1552
 
1347
- uri, _body, query_string_params = transcode_list_referrers request
1348
- response = @client_stub.make_get_request(
1349
- uri: uri,
1350
- params: query_string_params,
1351
- options: options
1352
- )
1353
- result = ::Google::Cloud::Compute::V1::InstanceListReferrers.decode_json response.body, ignore_unknown_fields: true
1553
+ options.apply_defaults timeout: @config.timeout,
1554
+ metadata: @config.metadata
1354
1555
 
1355
- yield result, response if block_given?
1356
- result
1556
+ @instances_stub.list_referrers request, options do |result, response|
1557
+ result = ::Gapic::Rest::PagedEnumerable.new @instances_stub, :list_referrers, "items", request, result, options
1558
+ yield result, response if block_given?
1559
+ return result
1560
+ end
1357
1561
  rescue ::Faraday::Error => e
1358
1562
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1359
1563
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1393,11 +1597,11 @@ module Google
1393
1597
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1394
1598
  # @param zone [::String]
1395
1599
  # The name of the zone for this request.
1396
- # @yield [result, env] Access the result along with the Faraday environment object
1397
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1600
+ # @yield [result, response] Access the result along with the Faraday response object
1601
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1398
1602
  # @yieldparam response [::Faraday::Response]
1399
1603
  #
1400
- # @return [::Google::Cloud::Compute::V1::Operation]
1604
+ # @return [::Gapic::Rest::BaseOperation]
1401
1605
  #
1402
1606
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1403
1607
  def remove_resource_policies request, options = nil
@@ -1409,7 +1613,7 @@ module Google
1409
1613
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1410
1614
 
1411
1615
  # Customize the options with defaults
1412
- call_metadata = {}
1616
+ call_metadata = @config.rpcs.remove_resource_policies.metadata.to_h
1413
1617
 
1414
1618
  # Set x-goog-api-client header
1415
1619
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1417,20 +1621,17 @@ module Google
1417
1621
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1418
1622
  transports_version_send: [:rest]
1419
1623
 
1420
- options.apply_defaults timeout: @config.timeout,
1624
+ options.apply_defaults timeout: @config.rpcs.remove_resource_policies.timeout,
1421
1625
  metadata: call_metadata
1422
1626
 
1423
- uri, body, query_string_params = transcode_remove_resource_policies request
1424
- response = @client_stub.make_post_request(
1425
- uri: uri,
1426
- body: body,
1427
- params: query_string_params,
1428
- options: options
1429
- )
1430
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1431
-
1432
- yield result, response if block_given?
1433
- result
1627
+ options.apply_defaults timeout: @config.timeout,
1628
+ metadata: @config.metadata
1629
+
1630
+ @instances_stub.remove_resource_policies request, options do |result, response|
1631
+ result = ::Gapic::Rest::BaseOperation.new result
1632
+ yield result, response if block_given?
1633
+ return result
1634
+ end
1434
1635
  rescue ::Faraday::Error => e
1435
1636
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1436
1637
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1468,11 +1669,11 @@ module Google
1468
1669
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1469
1670
  # @param zone [::String]
1470
1671
  # The name of the zone for this request.
1471
- # @yield [result, env] Access the result along with the Faraday environment object
1472
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1672
+ # @yield [result, response] Access the result along with the Faraday response object
1673
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1473
1674
  # @yieldparam response [::Faraday::Response]
1474
1675
  #
1475
- # @return [::Google::Cloud::Compute::V1::Operation]
1676
+ # @return [::Gapic::Rest::BaseOperation]
1476
1677
  #
1477
1678
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1478
1679
  def reset request, options = nil
@@ -1484,7 +1685,7 @@ module Google
1484
1685
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1485
1686
 
1486
1687
  # Customize the options with defaults
1487
- call_metadata = {}
1688
+ call_metadata = @config.rpcs.reset.metadata.to_h
1488
1689
 
1489
1690
  # Set x-goog-api-client header
1490
1691
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1492,19 +1693,17 @@ module Google
1492
1693
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1493
1694
  transports_version_send: [:rest]
1494
1695
 
1495
- options.apply_defaults timeout: @config.timeout,
1696
+ options.apply_defaults timeout: @config.rpcs.reset.timeout,
1496
1697
  metadata: call_metadata
1497
1698
 
1498
- uri, _body, query_string_params = transcode_reset request
1499
- response = @client_stub.make_post_request(
1500
- uri: uri,
1501
- params: query_string_params,
1502
- options: options
1503
- )
1504
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1699
+ options.apply_defaults timeout: @config.timeout,
1700
+ metadata: @config.metadata
1505
1701
 
1506
- yield result, response if block_given?
1507
- result
1702
+ @instances_stub.reset request, options do |result, response|
1703
+ result = ::Gapic::Rest::BaseOperation.new result
1704
+ yield result, response if block_given?
1705
+ return result
1706
+ end
1508
1707
  rescue ::Faraday::Error => e
1509
1708
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1510
1709
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1544,11 +1743,11 @@ module Google
1544
1743
  # Name or id of the resource for this request.
1545
1744
  # @param zone [::String]
1546
1745
  # The name of the zone for this request.
1547
- # @yield [result, env] Access the result along with the Faraday environment object
1548
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1746
+ # @yield [result, response] Access the result along with the Faraday response object
1747
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1549
1748
  # @yieldparam response [::Faraday::Response]
1550
1749
  #
1551
- # @return [::Google::Cloud::Compute::V1::Operation]
1750
+ # @return [::Gapic::Rest::BaseOperation]
1552
1751
  #
1553
1752
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1554
1753
  def set_deletion_protection request, options = nil
@@ -1560,7 +1759,7 @@ module Google
1560
1759
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1561
1760
 
1562
1761
  # Customize the options with defaults
1563
- call_metadata = {}
1762
+ call_metadata = @config.rpcs.set_deletion_protection.metadata.to_h
1564
1763
 
1565
1764
  # Set x-goog-api-client header
1566
1765
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1568,19 +1767,17 @@ module Google
1568
1767
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1569
1768
  transports_version_send: [:rest]
1570
1769
 
1571
- options.apply_defaults timeout: @config.timeout,
1770
+ options.apply_defaults timeout: @config.rpcs.set_deletion_protection.timeout,
1572
1771
  metadata: call_metadata
1573
1772
 
1574
- uri, _body, query_string_params = transcode_set_deletion_protection request
1575
- response = @client_stub.make_post_request(
1576
- uri: uri,
1577
- params: query_string_params,
1578
- options: options
1579
- )
1580
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1773
+ options.apply_defaults timeout: @config.timeout,
1774
+ metadata: @config.metadata
1581
1775
 
1582
- yield result, response if block_given?
1583
- result
1776
+ @instances_stub.set_deletion_protection request, options do |result, response|
1777
+ result = ::Gapic::Rest::BaseOperation.new result
1778
+ yield result, response if block_given?
1779
+ return result
1780
+ end
1584
1781
  rescue ::Faraday::Error => e
1585
1782
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1586
1783
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1622,11 +1819,11 @@ module Google
1622
1819
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1623
1820
  # @param zone [::String]
1624
1821
  # The name of the zone for this request.
1625
- # @yield [result, env] Access the result along with the Faraday environment object
1626
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1822
+ # @yield [result, response] Access the result along with the Faraday response object
1823
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1627
1824
  # @yieldparam response [::Faraday::Response]
1628
1825
  #
1629
- # @return [::Google::Cloud::Compute::V1::Operation]
1826
+ # @return [::Gapic::Rest::BaseOperation]
1630
1827
  #
1631
1828
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1632
1829
  def set_disk_auto_delete request, options = nil
@@ -1638,7 +1835,7 @@ module Google
1638
1835
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1639
1836
 
1640
1837
  # Customize the options with defaults
1641
- call_metadata = {}
1838
+ call_metadata = @config.rpcs.set_disk_auto_delete.metadata.to_h
1642
1839
 
1643
1840
  # Set x-goog-api-client header
1644
1841
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1646,19 +1843,17 @@ module Google
1646
1843
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1647
1844
  transports_version_send: [:rest]
1648
1845
 
1649
- options.apply_defaults timeout: @config.timeout,
1846
+ options.apply_defaults timeout: @config.rpcs.set_disk_auto_delete.timeout,
1650
1847
  metadata: call_metadata
1651
1848
 
1652
- uri, _body, query_string_params = transcode_set_disk_auto_delete request
1653
- response = @client_stub.make_post_request(
1654
- uri: uri,
1655
- params: query_string_params,
1656
- options: options
1657
- )
1658
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1849
+ options.apply_defaults timeout: @config.timeout,
1850
+ metadata: @config.metadata
1659
1851
 
1660
- yield result, response if block_given?
1661
- result
1852
+ @instances_stub.set_disk_auto_delete request, options do |result, response|
1853
+ result = ::Gapic::Rest::BaseOperation.new result
1854
+ yield result, response if block_given?
1855
+ return result
1856
+ end
1662
1857
  rescue ::Faraday::Error => e
1663
1858
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1664
1859
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1692,7 +1887,7 @@ module Google
1692
1887
  # The name of the zone for this request.
1693
1888
  # @param zone_set_policy_request_resource [::Google::Cloud::Compute::V1::ZoneSetPolicyRequest, ::Hash]
1694
1889
  # The body resource for this request
1695
- # @yield [result, env] Access the result along with the Faraday environment object
1890
+ # @yield [result, response] Access the result along with the Faraday response object
1696
1891
  # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
1697
1892
  # @yieldparam response [::Faraday::Response]
1698
1893
  #
@@ -1708,7 +1903,7 @@ module Google
1708
1903
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1709
1904
 
1710
1905
  # Customize the options with defaults
1711
- call_metadata = {}
1906
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
1712
1907
 
1713
1908
  # Set x-goog-api-client header
1714
1909
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1716,19 +1911,16 @@ module Google
1716
1911
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1717
1912
  transports_version_send: [:rest]
1718
1913
 
1719
- options.apply_defaults timeout: @config.timeout,
1914
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
1720
1915
  metadata: call_metadata
1721
1916
 
1722
- uri, body, _query_string_params = transcode_set_iam_policy request
1723
- response = @client_stub.make_post_request(
1724
- uri: uri,
1725
- body: body,
1726
- options: options
1727
- )
1728
- result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
1917
+ options.apply_defaults timeout: @config.timeout,
1918
+ metadata: @config.metadata
1729
1919
 
1730
- yield result, response if block_given?
1731
- result
1920
+ @instances_stub.set_iam_policy request, options do |result, response|
1921
+ yield result, response if block_given?
1922
+ return result
1923
+ end
1732
1924
  rescue ::Faraday::Error => e
1733
1925
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1734
1926
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1768,11 +1960,11 @@ module Google
1768
1960
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1769
1961
  # @param zone [::String]
1770
1962
  # The name of the zone for this request.
1771
- # @yield [result, env] Access the result along with the Faraday environment object
1772
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
1963
+ # @yield [result, response] Access the result along with the Faraday response object
1964
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1773
1965
  # @yieldparam response [::Faraday::Response]
1774
1966
  #
1775
- # @return [::Google::Cloud::Compute::V1::Operation]
1967
+ # @return [::Gapic::Rest::BaseOperation]
1776
1968
  #
1777
1969
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1778
1970
  def set_labels request, options = nil
@@ -1784,7 +1976,7 @@ module Google
1784
1976
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1785
1977
 
1786
1978
  # Customize the options with defaults
1787
- call_metadata = {}
1979
+ call_metadata = @config.rpcs.set_labels.metadata.to_h
1788
1980
 
1789
1981
  # Set x-goog-api-client header
1790
1982
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1792,20 +1984,17 @@ module Google
1792
1984
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1793
1985
  transports_version_send: [:rest]
1794
1986
 
1795
- options.apply_defaults timeout: @config.timeout,
1987
+ options.apply_defaults timeout: @config.rpcs.set_labels.timeout,
1796
1988
  metadata: call_metadata
1797
1989
 
1798
- uri, body, query_string_params = transcode_set_labels request
1799
- response = @client_stub.make_post_request(
1800
- uri: uri,
1801
- body: body,
1802
- params: query_string_params,
1803
- options: options
1804
- )
1805
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1806
-
1807
- yield result, response if block_given?
1808
- result
1990
+ options.apply_defaults timeout: @config.timeout,
1991
+ metadata: @config.metadata
1992
+
1993
+ @instances_stub.set_labels request, options do |result, response|
1994
+ result = ::Gapic::Rest::BaseOperation.new result
1995
+ yield result, response if block_given?
1996
+ return result
1997
+ end
1809
1998
  rescue ::Faraday::Error => e
1810
1999
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1811
2000
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1845,11 +2034,11 @@ module Google
1845
2034
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1846
2035
  # @param zone [::String]
1847
2036
  # The name of the zone for this request.
1848
- # @yield [result, env] Access the result along with the Faraday environment object
1849
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2037
+ # @yield [result, response] Access the result along with the Faraday response object
2038
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1850
2039
  # @yieldparam response [::Faraday::Response]
1851
2040
  #
1852
- # @return [::Google::Cloud::Compute::V1::Operation]
2041
+ # @return [::Gapic::Rest::BaseOperation]
1853
2042
  #
1854
2043
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1855
2044
  def set_machine_resources request, options = nil
@@ -1861,7 +2050,7 @@ module Google
1861
2050
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1862
2051
 
1863
2052
  # Customize the options with defaults
1864
- call_metadata = {}
2053
+ call_metadata = @config.rpcs.set_machine_resources.metadata.to_h
1865
2054
 
1866
2055
  # Set x-goog-api-client header
1867
2056
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1869,20 +2058,17 @@ module Google
1869
2058
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1870
2059
  transports_version_send: [:rest]
1871
2060
 
1872
- options.apply_defaults timeout: @config.timeout,
2061
+ options.apply_defaults timeout: @config.rpcs.set_machine_resources.timeout,
1873
2062
  metadata: call_metadata
1874
2063
 
1875
- uri, body, query_string_params = transcode_set_machine_resources request
1876
- response = @client_stub.make_post_request(
1877
- uri: uri,
1878
- body: body,
1879
- params: query_string_params,
1880
- options: options
1881
- )
1882
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1883
-
1884
- yield result, response if block_given?
1885
- result
2064
+ options.apply_defaults timeout: @config.timeout,
2065
+ metadata: @config.metadata
2066
+
2067
+ @instances_stub.set_machine_resources request, options do |result, response|
2068
+ result = ::Gapic::Rest::BaseOperation.new result
2069
+ yield result, response if block_given?
2070
+ return result
2071
+ end
1886
2072
  rescue ::Faraday::Error => e
1887
2073
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1888
2074
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1922,11 +2108,11 @@ module Google
1922
2108
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1923
2109
  # @param zone [::String]
1924
2110
  # The name of the zone for this request.
1925
- # @yield [result, env] Access the result along with the Faraday environment object
1926
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2111
+ # @yield [result, response] Access the result along with the Faraday response object
2112
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
1927
2113
  # @yieldparam response [::Faraday::Response]
1928
2114
  #
1929
- # @return [::Google::Cloud::Compute::V1::Operation]
2115
+ # @return [::Gapic::Rest::BaseOperation]
1930
2116
  #
1931
2117
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1932
2118
  def set_machine_type request, options = nil
@@ -1938,7 +2124,7 @@ module Google
1938
2124
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1939
2125
 
1940
2126
  # Customize the options with defaults
1941
- call_metadata = {}
2127
+ call_metadata = @config.rpcs.set_machine_type.metadata.to_h
1942
2128
 
1943
2129
  # Set x-goog-api-client header
1944
2130
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -1946,20 +2132,17 @@ module Google
1946
2132
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
1947
2133
  transports_version_send: [:rest]
1948
2134
 
1949
- options.apply_defaults timeout: @config.timeout,
2135
+ options.apply_defaults timeout: @config.rpcs.set_machine_type.timeout,
1950
2136
  metadata: call_metadata
1951
2137
 
1952
- uri, body, query_string_params = transcode_set_machine_type request
1953
- response = @client_stub.make_post_request(
1954
- uri: uri,
1955
- body: body,
1956
- params: query_string_params,
1957
- options: options
1958
- )
1959
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
1960
-
1961
- yield result, response if block_given?
1962
- result
2138
+ options.apply_defaults timeout: @config.timeout,
2139
+ metadata: @config.metadata
2140
+
2141
+ @instances_stub.set_machine_type request, options do |result, response|
2142
+ result = ::Gapic::Rest::BaseOperation.new result
2143
+ yield result, response if block_given?
2144
+ return result
2145
+ end
1963
2146
  rescue ::Faraday::Error => e
1964
2147
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
1965
2148
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -1999,11 +2182,11 @@ module Google
1999
2182
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2000
2183
  # @param zone [::String]
2001
2184
  # The name of the zone for this request.
2002
- # @yield [result, env] Access the result along with the Faraday environment object
2003
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2185
+ # @yield [result, response] Access the result along with the Faraday response object
2186
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2004
2187
  # @yieldparam response [::Faraday::Response]
2005
2188
  #
2006
- # @return [::Google::Cloud::Compute::V1::Operation]
2189
+ # @return [::Gapic::Rest::BaseOperation]
2007
2190
  #
2008
2191
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2009
2192
  def set_metadata request, options = nil
@@ -2015,7 +2198,7 @@ module Google
2015
2198
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2016
2199
 
2017
2200
  # Customize the options with defaults
2018
- call_metadata = {}
2201
+ call_metadata = @config.rpcs.set_metadata.metadata.to_h
2019
2202
 
2020
2203
  # Set x-goog-api-client header
2021
2204
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2023,20 +2206,17 @@ module Google
2023
2206
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2024
2207
  transports_version_send: [:rest]
2025
2208
 
2026
- options.apply_defaults timeout: @config.timeout,
2209
+ options.apply_defaults timeout: @config.rpcs.set_metadata.timeout,
2027
2210
  metadata: call_metadata
2028
2211
 
2029
- uri, body, query_string_params = transcode_set_metadata request
2030
- response = @client_stub.make_post_request(
2031
- uri: uri,
2032
- body: body,
2033
- params: query_string_params,
2034
- options: options
2035
- )
2036
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2037
-
2038
- yield result, response if block_given?
2039
- result
2212
+ options.apply_defaults timeout: @config.timeout,
2213
+ metadata: @config.metadata
2214
+
2215
+ @instances_stub.set_metadata request, options do |result, response|
2216
+ result = ::Gapic::Rest::BaseOperation.new result
2217
+ yield result, response if block_given?
2218
+ return result
2219
+ end
2040
2220
  rescue ::Faraday::Error => e
2041
2221
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2042
2222
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2076,11 +2256,11 @@ module Google
2076
2256
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2077
2257
  # @param zone [::String]
2078
2258
  # The name of the zone for this request.
2079
- # @yield [result, env] Access the result along with the Faraday environment object
2080
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2259
+ # @yield [result, response] Access the result along with the Faraday response object
2260
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2081
2261
  # @yieldparam response [::Faraday::Response]
2082
2262
  #
2083
- # @return [::Google::Cloud::Compute::V1::Operation]
2263
+ # @return [::Gapic::Rest::BaseOperation]
2084
2264
  #
2085
2265
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2086
2266
  def set_min_cpu_platform request, options = nil
@@ -2092,7 +2272,7 @@ module Google
2092
2272
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2093
2273
 
2094
2274
  # Customize the options with defaults
2095
- call_metadata = {}
2275
+ call_metadata = @config.rpcs.set_min_cpu_platform.metadata.to_h
2096
2276
 
2097
2277
  # Set x-goog-api-client header
2098
2278
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2100,20 +2280,17 @@ module Google
2100
2280
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2101
2281
  transports_version_send: [:rest]
2102
2282
 
2103
- options.apply_defaults timeout: @config.timeout,
2283
+ options.apply_defaults timeout: @config.rpcs.set_min_cpu_platform.timeout,
2104
2284
  metadata: call_metadata
2105
2285
 
2106
- uri, body, query_string_params = transcode_set_min_cpu_platform request
2107
- response = @client_stub.make_post_request(
2108
- uri: uri,
2109
- body: body,
2110
- params: query_string_params,
2111
- options: options
2112
- )
2113
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2114
-
2115
- yield result, response if block_given?
2116
- result
2286
+ options.apply_defaults timeout: @config.timeout,
2287
+ metadata: @config.metadata
2288
+
2289
+ @instances_stub.set_min_cpu_platform request, options do |result, response|
2290
+ result = ::Gapic::Rest::BaseOperation.new result
2291
+ yield result, response if block_given?
2292
+ return result
2293
+ end
2117
2294
  rescue ::Faraday::Error => e
2118
2295
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2119
2296
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2153,11 +2330,11 @@ module Google
2153
2330
  # The body resource for this request
2154
2331
  # @param zone [::String]
2155
2332
  # The name of the zone for this request.
2156
- # @yield [result, env] Access the result along with the Faraday environment object
2157
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2333
+ # @yield [result, response] Access the result along with the Faraday response object
2334
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2158
2335
  # @yieldparam response [::Faraday::Response]
2159
2336
  #
2160
- # @return [::Google::Cloud::Compute::V1::Operation]
2337
+ # @return [::Gapic::Rest::BaseOperation]
2161
2338
  #
2162
2339
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2163
2340
  def set_scheduling request, options = nil
@@ -2169,7 +2346,7 @@ module Google
2169
2346
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2170
2347
 
2171
2348
  # Customize the options with defaults
2172
- call_metadata = {}
2349
+ call_metadata = @config.rpcs.set_scheduling.metadata.to_h
2173
2350
 
2174
2351
  # Set x-goog-api-client header
2175
2352
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2177,20 +2354,17 @@ module Google
2177
2354
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2178
2355
  transports_version_send: [:rest]
2179
2356
 
2180
- options.apply_defaults timeout: @config.timeout,
2357
+ options.apply_defaults timeout: @config.rpcs.set_scheduling.timeout,
2181
2358
  metadata: call_metadata
2182
2359
 
2183
- uri, body, query_string_params = transcode_set_scheduling request
2184
- response = @client_stub.make_post_request(
2185
- uri: uri,
2186
- body: body,
2187
- params: query_string_params,
2188
- options: options
2189
- )
2190
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2191
-
2192
- yield result, response if block_given?
2193
- result
2360
+ options.apply_defaults timeout: @config.timeout,
2361
+ metadata: @config.metadata
2362
+
2363
+ @instances_stub.set_scheduling request, options do |result, response|
2364
+ result = ::Gapic::Rest::BaseOperation.new result
2365
+ yield result, response if block_given?
2366
+ return result
2367
+ end
2194
2368
  rescue ::Faraday::Error => e
2195
2369
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2196
2370
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2230,11 +2404,11 @@ module Google
2230
2404
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2231
2405
  # @param zone [::String]
2232
2406
  # The name of the zone for this request.
2233
- # @yield [result, env] Access the result along with the Faraday environment object
2234
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2407
+ # @yield [result, response] Access the result along with the Faraday response object
2408
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2235
2409
  # @yieldparam response [::Faraday::Response]
2236
2410
  #
2237
- # @return [::Google::Cloud::Compute::V1::Operation]
2411
+ # @return [::Gapic::Rest::BaseOperation]
2238
2412
  #
2239
2413
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2240
2414
  def set_service_account request, options = nil
@@ -2246,7 +2420,7 @@ module Google
2246
2420
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2247
2421
 
2248
2422
  # Customize the options with defaults
2249
- call_metadata = {}
2423
+ call_metadata = @config.rpcs.set_service_account.metadata.to_h
2250
2424
 
2251
2425
  # Set x-goog-api-client header
2252
2426
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2254,20 +2428,17 @@ module Google
2254
2428
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2255
2429
  transports_version_send: [:rest]
2256
2430
 
2257
- options.apply_defaults timeout: @config.timeout,
2431
+ options.apply_defaults timeout: @config.rpcs.set_service_account.timeout,
2258
2432
  metadata: call_metadata
2259
2433
 
2260
- uri, body, query_string_params = transcode_set_service_account request
2261
- response = @client_stub.make_post_request(
2262
- uri: uri,
2263
- body: body,
2264
- params: query_string_params,
2265
- options: options
2266
- )
2267
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2268
-
2269
- yield result, response if block_given?
2270
- result
2434
+ options.apply_defaults timeout: @config.timeout,
2435
+ metadata: @config.metadata
2436
+
2437
+ @instances_stub.set_service_account request, options do |result, response|
2438
+ result = ::Gapic::Rest::BaseOperation.new result
2439
+ yield result, response if block_given?
2440
+ return result
2441
+ end
2271
2442
  rescue ::Faraday::Error => e
2272
2443
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2273
2444
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2307,11 +2478,11 @@ module Google
2307
2478
  # The body resource for this request
2308
2479
  # @param zone [::String]
2309
2480
  # The name of the zone for this request.
2310
- # @yield [result, env] Access the result along with the Faraday environment object
2311
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2481
+ # @yield [result, response] Access the result along with the Faraday response object
2482
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2312
2483
  # @yieldparam response [::Faraday::Response]
2313
2484
  #
2314
- # @return [::Google::Cloud::Compute::V1::Operation]
2485
+ # @return [::Gapic::Rest::BaseOperation]
2315
2486
  #
2316
2487
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2317
2488
  def set_shielded_instance_integrity_policy request, options = nil
@@ -2323,7 +2494,7 @@ module Google
2323
2494
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2324
2495
 
2325
2496
  # Customize the options with defaults
2326
- call_metadata = {}
2497
+ call_metadata = @config.rpcs.set_shielded_instance_integrity_policy.metadata.to_h
2327
2498
 
2328
2499
  # Set x-goog-api-client header
2329
2500
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2331,20 +2502,17 @@ module Google
2331
2502
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2332
2503
  transports_version_send: [:rest]
2333
2504
 
2334
- options.apply_defaults timeout: @config.timeout,
2505
+ options.apply_defaults timeout: @config.rpcs.set_shielded_instance_integrity_policy.timeout,
2335
2506
  metadata: call_metadata
2336
2507
 
2337
- uri, body, query_string_params = transcode_set_shielded_instance_integrity_policy request
2338
- response = @client_stub.make_patch_request(
2339
- uri: uri,
2340
- body: body,
2341
- params: query_string_params,
2342
- options: options
2343
- )
2344
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2345
-
2346
- yield result, response if block_given?
2347
- result
2508
+ options.apply_defaults timeout: @config.timeout,
2509
+ metadata: @config.metadata
2510
+
2511
+ @instances_stub.set_shielded_instance_integrity_policy request, options do |result, response|
2512
+ result = ::Gapic::Rest::BaseOperation.new result
2513
+ yield result, response if block_given?
2514
+ return result
2515
+ end
2348
2516
  rescue ::Faraday::Error => e
2349
2517
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2350
2518
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2384,11 +2552,11 @@ module Google
2384
2552
  # The body resource for this request
2385
2553
  # @param zone [::String]
2386
2554
  # The name of the zone for this request.
2387
- # @yield [result, env] Access the result along with the Faraday environment object
2388
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2555
+ # @yield [result, response] Access the result along with the Faraday response object
2556
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2389
2557
  # @yieldparam response [::Faraday::Response]
2390
2558
  #
2391
- # @return [::Google::Cloud::Compute::V1::Operation]
2559
+ # @return [::Gapic::Rest::BaseOperation]
2392
2560
  #
2393
2561
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2394
2562
  def set_tags request, options = nil
@@ -2400,7 +2568,7 @@ module Google
2400
2568
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2401
2569
 
2402
2570
  # Customize the options with defaults
2403
- call_metadata = {}
2571
+ call_metadata = @config.rpcs.set_tags.metadata.to_h
2404
2572
 
2405
2573
  # Set x-goog-api-client header
2406
2574
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2408,20 +2576,17 @@ module Google
2408
2576
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2409
2577
  transports_version_send: [:rest]
2410
2578
 
2411
- options.apply_defaults timeout: @config.timeout,
2579
+ options.apply_defaults timeout: @config.rpcs.set_tags.timeout,
2412
2580
  metadata: call_metadata
2413
2581
 
2414
- uri, body, query_string_params = transcode_set_tags request
2415
- response = @client_stub.make_post_request(
2416
- uri: uri,
2417
- body: body,
2418
- params: query_string_params,
2419
- options: options
2420
- )
2421
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2422
-
2423
- yield result, response if block_given?
2424
- result
2582
+ options.apply_defaults timeout: @config.timeout,
2583
+ metadata: @config.metadata
2584
+
2585
+ @instances_stub.set_tags request, options do |result, response|
2586
+ result = ::Gapic::Rest::BaseOperation.new result
2587
+ yield result, response if block_given?
2588
+ return result
2589
+ end
2425
2590
  rescue ::Faraday::Error => e
2426
2591
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2427
2592
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2453,11 +2618,11 @@ module Google
2453
2618
  # Project ID for this request.
2454
2619
  # @param zone [::String]
2455
2620
  # The name of the zone for this request.
2456
- # @yield [result, env] Access the result along with the Faraday environment object
2457
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2621
+ # @yield [result, response] Access the result along with the Faraday response object
2622
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2458
2623
  # @yieldparam response [::Faraday::Response]
2459
2624
  #
2460
- # @return [::Google::Cloud::Compute::V1::Operation]
2625
+ # @return [::Gapic::Rest::BaseOperation]
2461
2626
  #
2462
2627
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2463
2628
  def simulate_maintenance_event request, options = nil
@@ -2469,7 +2634,7 @@ module Google
2469
2634
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2470
2635
 
2471
2636
  # Customize the options with defaults
2472
- call_metadata = {}
2637
+ call_metadata = @config.rpcs.simulate_maintenance_event.metadata.to_h
2473
2638
 
2474
2639
  # Set x-goog-api-client header
2475
2640
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2477,18 +2642,17 @@ module Google
2477
2642
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2478
2643
  transports_version_send: [:rest]
2479
2644
 
2480
- options.apply_defaults timeout: @config.timeout,
2645
+ options.apply_defaults timeout: @config.rpcs.simulate_maintenance_event.timeout,
2481
2646
  metadata: call_metadata
2482
2647
 
2483
- uri, _body, _query_string_params = transcode_simulate_maintenance_event request
2484
- response = @client_stub.make_post_request(
2485
- uri: uri,
2486
- options: options
2487
- )
2488
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2648
+ options.apply_defaults timeout: @config.timeout,
2649
+ metadata: @config.metadata
2489
2650
 
2490
- yield result, response if block_given?
2491
- result
2651
+ @instances_stub.simulate_maintenance_event request, options do |result, response|
2652
+ result = ::Gapic::Rest::BaseOperation.new result
2653
+ yield result, response if block_given?
2654
+ return result
2655
+ end
2492
2656
  rescue ::Faraday::Error => e
2493
2657
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2494
2658
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2526,11 +2690,11 @@ module Google
2526
2690
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2527
2691
  # @param zone [::String]
2528
2692
  # The name of the zone for this request.
2529
- # @yield [result, env] Access the result along with the Faraday environment object
2530
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2693
+ # @yield [result, response] Access the result along with the Faraday response object
2694
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2531
2695
  # @yieldparam response [::Faraday::Response]
2532
2696
  #
2533
- # @return [::Google::Cloud::Compute::V1::Operation]
2697
+ # @return [::Gapic::Rest::BaseOperation]
2534
2698
  #
2535
2699
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2536
2700
  def start request, options = nil
@@ -2542,7 +2706,7 @@ module Google
2542
2706
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2543
2707
 
2544
2708
  # Customize the options with defaults
2545
- call_metadata = {}
2709
+ call_metadata = @config.rpcs.start.metadata.to_h
2546
2710
 
2547
2711
  # Set x-goog-api-client header
2548
2712
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2550,19 +2714,17 @@ module Google
2550
2714
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2551
2715
  transports_version_send: [:rest]
2552
2716
 
2553
- options.apply_defaults timeout: @config.timeout,
2717
+ options.apply_defaults timeout: @config.rpcs.start.timeout,
2554
2718
  metadata: call_metadata
2555
2719
 
2556
- uri, _body, query_string_params = transcode_start request
2557
- response = @client_stub.make_post_request(
2558
- uri: uri,
2559
- params: query_string_params,
2560
- options: options
2561
- )
2562
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2720
+ options.apply_defaults timeout: @config.timeout,
2721
+ metadata: @config.metadata
2563
2722
 
2564
- yield result, response if block_given?
2565
- result
2723
+ @instances_stub.start request, options do |result, response|
2724
+ result = ::Gapic::Rest::BaseOperation.new result
2725
+ yield result, response if block_given?
2726
+ return result
2727
+ end
2566
2728
  rescue ::Faraday::Error => e
2567
2729
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2568
2730
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2602,11 +2764,11 @@ module Google
2602
2764
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2603
2765
  # @param zone [::String]
2604
2766
  # The name of the zone for this request.
2605
- # @yield [result, env] Access the result along with the Faraday environment object
2606
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2767
+ # @yield [result, response] Access the result along with the Faraday response object
2768
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2607
2769
  # @yieldparam response [::Faraday::Response]
2608
2770
  #
2609
- # @return [::Google::Cloud::Compute::V1::Operation]
2771
+ # @return [::Gapic::Rest::BaseOperation]
2610
2772
  #
2611
2773
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2612
2774
  def start_with_encryption_key request, options = nil
@@ -2618,7 +2780,7 @@ module Google
2618
2780
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2619
2781
 
2620
2782
  # Customize the options with defaults
2621
- call_metadata = {}
2783
+ call_metadata = @config.rpcs.start_with_encryption_key.metadata.to_h
2622
2784
 
2623
2785
  # Set x-goog-api-client header
2624
2786
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2626,20 +2788,17 @@ module Google
2626
2788
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2627
2789
  transports_version_send: [:rest]
2628
2790
 
2629
- options.apply_defaults timeout: @config.timeout,
2791
+ options.apply_defaults timeout: @config.rpcs.start_with_encryption_key.timeout,
2630
2792
  metadata: call_metadata
2631
2793
 
2632
- uri, body, query_string_params = transcode_start_with_encryption_key request
2633
- response = @client_stub.make_post_request(
2634
- uri: uri,
2635
- body: body,
2636
- params: query_string_params,
2637
- options: options
2638
- )
2639
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2640
-
2641
- yield result, response if block_given?
2642
- result
2794
+ options.apply_defaults timeout: @config.timeout,
2795
+ metadata: @config.metadata
2796
+
2797
+ @instances_stub.start_with_encryption_key request, options do |result, response|
2798
+ result = ::Gapic::Rest::BaseOperation.new result
2799
+ yield result, response if block_given?
2800
+ return result
2801
+ end
2643
2802
  rescue ::Faraday::Error => e
2644
2803
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2645
2804
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2677,11 +2836,11 @@ module Google
2677
2836
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2678
2837
  # @param zone [::String]
2679
2838
  # The name of the zone for this request.
2680
- # @yield [result, env] Access the result along with the Faraday environment object
2681
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2839
+ # @yield [result, response] Access the result along with the Faraday response object
2840
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2682
2841
  # @yieldparam response [::Faraday::Response]
2683
2842
  #
2684
- # @return [::Google::Cloud::Compute::V1::Operation]
2843
+ # @return [::Gapic::Rest::BaseOperation]
2685
2844
  #
2686
2845
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2687
2846
  def stop request, options = nil
@@ -2693,7 +2852,7 @@ module Google
2693
2852
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2694
2853
 
2695
2854
  # Customize the options with defaults
2696
- call_metadata = {}
2855
+ call_metadata = @config.rpcs.stop.metadata.to_h
2697
2856
 
2698
2857
  # Set x-goog-api-client header
2699
2858
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2701,19 +2860,17 @@ module Google
2701
2860
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2702
2861
  transports_version_send: [:rest]
2703
2862
 
2704
- options.apply_defaults timeout: @config.timeout,
2863
+ options.apply_defaults timeout: @config.rpcs.stop.timeout,
2705
2864
  metadata: call_metadata
2706
2865
 
2707
- uri, _body, query_string_params = transcode_stop request
2708
- response = @client_stub.make_post_request(
2709
- uri: uri,
2710
- params: query_string_params,
2711
- options: options
2712
- )
2713
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2866
+ options.apply_defaults timeout: @config.timeout,
2867
+ metadata: @config.metadata
2714
2868
 
2715
- yield result, response if block_given?
2716
- result
2869
+ @instances_stub.stop request, options do |result, response|
2870
+ result = ::Gapic::Rest::BaseOperation.new result
2871
+ yield result, response if block_given?
2872
+ return result
2873
+ end
2717
2874
  rescue ::Faraday::Error => e
2718
2875
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2719
2876
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2747,7 +2904,7 @@ module Google
2747
2904
  # The body resource for this request
2748
2905
  # @param zone [::String]
2749
2906
  # The name of the zone for this request.
2750
- # @yield [result, env] Access the result along with the Faraday environment object
2907
+ # @yield [result, response] Access the result along with the Faraday response object
2751
2908
  # @yieldparam result [::Google::Cloud::Compute::V1::TestPermissionsResponse]
2752
2909
  # @yieldparam response [::Faraday::Response]
2753
2910
  #
@@ -2763,7 +2920,7 @@ module Google
2763
2920
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2764
2921
 
2765
2922
  # Customize the options with defaults
2766
- call_metadata = {}
2923
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
2767
2924
 
2768
2925
  # Set x-goog-api-client header
2769
2926
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2771,19 +2928,16 @@ module Google
2771
2928
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2772
2929
  transports_version_send: [:rest]
2773
2930
 
2774
- options.apply_defaults timeout: @config.timeout,
2931
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
2775
2932
  metadata: call_metadata
2776
2933
 
2777
- uri, body, _query_string_params = transcode_test_iam_permissions request
2778
- response = @client_stub.make_post_request(
2779
- uri: uri,
2780
- body: body,
2781
- options: options
2782
- )
2783
- result = ::Google::Cloud::Compute::V1::TestPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
2934
+ options.apply_defaults timeout: @config.timeout,
2935
+ metadata: @config.metadata
2784
2936
 
2785
- yield result, response if block_given?
2786
- result
2937
+ @instances_stub.test_iam_permissions request, options do |result, response|
2938
+ yield result, response if block_given?
2939
+ return result
2940
+ end
2787
2941
  rescue ::Faraday::Error => e
2788
2942
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2789
2943
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2827,11 +2981,11 @@ module Google
2827
2981
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2828
2982
  # @param zone [::String]
2829
2983
  # The name of the zone for this request.
2830
- # @yield [result, env] Access the result along with the Faraday environment object
2831
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
2984
+ # @yield [result, response] Access the result along with the Faraday response object
2985
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2832
2986
  # @yieldparam response [::Faraday::Response]
2833
2987
  #
2834
- # @return [::Google::Cloud::Compute::V1::Operation]
2988
+ # @return [::Gapic::Rest::BaseOperation]
2835
2989
  #
2836
2990
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2837
2991
  def update request, options = nil
@@ -2843,7 +2997,7 @@ module Google
2843
2997
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2844
2998
 
2845
2999
  # Customize the options with defaults
2846
- call_metadata = {}
3000
+ call_metadata = @config.rpcs.update.metadata.to_h
2847
3001
 
2848
3002
  # Set x-goog-api-client header
2849
3003
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2851,20 +3005,17 @@ module Google
2851
3005
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2852
3006
  transports_version_send: [:rest]
2853
3007
 
2854
- options.apply_defaults timeout: @config.timeout,
3008
+ options.apply_defaults timeout: @config.rpcs.update.timeout,
2855
3009
  metadata: call_metadata
2856
3010
 
2857
- uri, body, query_string_params = transcode_update request
2858
- response = @client_stub.make_put_request(
2859
- uri: uri,
2860
- body: body,
2861
- params: query_string_params,
2862
- options: options
2863
- )
2864
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2865
-
2866
- yield result, response if block_given?
2867
- result
3011
+ options.apply_defaults timeout: @config.timeout,
3012
+ metadata: @config.metadata
3013
+
3014
+ @instances_stub.update request, options do |result, response|
3015
+ result = ::Gapic::Rest::BaseOperation.new result
3016
+ yield result, response if block_given?
3017
+ return result
3018
+ end
2868
3019
  rescue ::Faraday::Error => e
2869
3020
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2870
3021
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2906,11 +3057,11 @@ module Google
2906
3057
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2907
3058
  # @param zone [::String]
2908
3059
  # The name of the zone for this request.
2909
- # @yield [result, env] Access the result along with the Faraday environment object
2910
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
3060
+ # @yield [result, response] Access the result along with the Faraday response object
3061
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2911
3062
  # @yieldparam response [::Faraday::Response]
2912
3063
  #
2913
- # @return [::Google::Cloud::Compute::V1::Operation]
3064
+ # @return [::Gapic::Rest::BaseOperation]
2914
3065
  #
2915
3066
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2916
3067
  def update_access_config request, options = nil
@@ -2922,7 +3073,7 @@ module Google
2922
3073
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2923
3074
 
2924
3075
  # Customize the options with defaults
2925
- call_metadata = {}
3076
+ call_metadata = @config.rpcs.update_access_config.metadata.to_h
2926
3077
 
2927
3078
  # Set x-goog-api-client header
2928
3079
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -2930,20 +3081,17 @@ module Google
2930
3081
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
2931
3082
  transports_version_send: [:rest]
2932
3083
 
2933
- options.apply_defaults timeout: @config.timeout,
3084
+ options.apply_defaults timeout: @config.rpcs.update_access_config.timeout,
2934
3085
  metadata: call_metadata
2935
3086
 
2936
- uri, body, query_string_params = transcode_update_access_config request
2937
- response = @client_stub.make_post_request(
2938
- uri: uri,
2939
- body: body,
2940
- params: query_string_params,
2941
- options: options
2942
- )
2943
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
2944
-
2945
- yield result, response if block_given?
2946
- result
3087
+ options.apply_defaults timeout: @config.timeout,
3088
+ metadata: @config.metadata
3089
+
3090
+ @instances_stub.update_access_config request, options do |result, response|
3091
+ result = ::Gapic::Rest::BaseOperation.new result
3092
+ yield result, response if block_given?
3093
+ return result
3094
+ end
2947
3095
  rescue ::Faraday::Error => e
2948
3096
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
2949
3097
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -2983,11 +3131,11 @@ module Google
2983
3131
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2984
3132
  # @param zone [::String]
2985
3133
  # The name of the zone for this request.
2986
- # @yield [result, env] Access the result along with the Faraday environment object
2987
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
3134
+ # @yield [result, response] Access the result along with the Faraday response object
3135
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
2988
3136
  # @yieldparam response [::Faraday::Response]
2989
3137
  #
2990
- # @return [::Google::Cloud::Compute::V1::Operation]
3138
+ # @return [::Gapic::Rest::BaseOperation]
2991
3139
  #
2992
3140
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
2993
3141
  def update_display_device request, options = nil
@@ -2999,7 +3147,7 @@ module Google
2999
3147
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3000
3148
 
3001
3149
  # Customize the options with defaults
3002
- call_metadata = {}
3150
+ call_metadata = @config.rpcs.update_display_device.metadata.to_h
3003
3151
 
3004
3152
  # Set x-goog-api-client header
3005
3153
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3007,27 +3155,24 @@ module Google
3007
3155
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3008
3156
  transports_version_send: [:rest]
3009
3157
 
3010
- options.apply_defaults timeout: @config.timeout,
3158
+ options.apply_defaults timeout: @config.rpcs.update_display_device.timeout,
3011
3159
  metadata: call_metadata
3012
3160
 
3013
- uri, body, query_string_params = transcode_update_display_device request
3014
- response = @client_stub.make_patch_request(
3015
- uri: uri,
3016
- body: body,
3017
- params: query_string_params,
3018
- options: options
3019
- )
3020
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
3021
-
3022
- yield result, response if block_given?
3023
- result
3161
+ options.apply_defaults timeout: @config.timeout,
3162
+ metadata: @config.metadata
3163
+
3164
+ @instances_stub.update_display_device request, options do |result, response|
3165
+ result = ::Gapic::Rest::BaseOperation.new result
3166
+ yield result, response if block_given?
3167
+ return result
3168
+ end
3024
3169
  rescue ::Faraday::Error => e
3025
3170
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
3026
3171
  raise ::Google::Cloud::Error.from_error(gapic_error)
3027
3172
  end
3028
3173
 
3029
3174
  ##
3030
- # Updates an instance's network interface. This method follows PATCH semantics.
3175
+ # Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
3031
3176
  #
3032
3177
  # @overload update_network_interface(request, options = nil)
3033
3178
  # Pass arguments to `update_network_interface` via a request object, either of type
@@ -3062,11 +3207,11 @@ module Google
3062
3207
  # The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
3063
3208
  # @param zone [::String]
3064
3209
  # The name of the zone for this request.
3065
- # @yield [result, env] Access the result along with the Faraday environment object
3066
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
3210
+ # @yield [result, response] Access the result along with the Faraday response object
3211
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
3067
3212
  # @yieldparam response [::Faraday::Response]
3068
3213
  #
3069
- # @return [::Google::Cloud::Compute::V1::Operation]
3214
+ # @return [::Gapic::Rest::BaseOperation]
3070
3215
  #
3071
3216
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3072
3217
  def update_network_interface request, options = nil
@@ -3078,7 +3223,7 @@ module Google
3078
3223
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3079
3224
 
3080
3225
  # Customize the options with defaults
3081
- call_metadata = {}
3226
+ call_metadata = @config.rpcs.update_network_interface.metadata.to_h
3082
3227
 
3083
3228
  # Set x-goog-api-client header
3084
3229
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3086,20 +3231,17 @@ module Google
3086
3231
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3087
3232
  transports_version_send: [:rest]
3088
3233
 
3089
- options.apply_defaults timeout: @config.timeout,
3234
+ options.apply_defaults timeout: @config.rpcs.update_network_interface.timeout,
3090
3235
  metadata: call_metadata
3091
3236
 
3092
- uri, body, query_string_params = transcode_update_network_interface request
3093
- response = @client_stub.make_patch_request(
3094
- uri: uri,
3095
- body: body,
3096
- params: query_string_params,
3097
- options: options
3098
- )
3099
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
3100
-
3101
- yield result, response if block_given?
3102
- result
3237
+ options.apply_defaults timeout: @config.timeout,
3238
+ metadata: @config.metadata
3239
+
3240
+ @instances_stub.update_network_interface request, options do |result, response|
3241
+ result = ::Gapic::Rest::BaseOperation.new result
3242
+ yield result, response if block_given?
3243
+ return result
3244
+ end
3103
3245
  rescue ::Faraday::Error => e
3104
3246
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
3105
3247
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -3139,11 +3281,11 @@ module Google
3139
3281
  # The body resource for this request
3140
3282
  # @param zone [::String]
3141
3283
  # The name of the zone for this request.
3142
- # @yield [result, env] Access the result along with the Faraday environment object
3143
- # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
3284
+ # @yield [result, response] Access the result along with the Faraday response object
3285
+ # @yieldparam result [::Gapic::Rest::BaseOperation]
3144
3286
  # @yieldparam response [::Faraday::Response]
3145
3287
  #
3146
- # @return [::Google::Cloud::Compute::V1::Operation]
3288
+ # @return [::Gapic::Rest::BaseOperation]
3147
3289
  #
3148
3290
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
3149
3291
  def update_shielded_instance_config request, options = nil
@@ -3155,7 +3297,7 @@ module Google
3155
3297
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3156
3298
 
3157
3299
  # Customize the options with defaults
3158
- call_metadata = {}
3300
+ call_metadata = @config.rpcs.update_shielded_instance_config.metadata.to_h
3159
3301
 
3160
3302
  # Set x-goog-api-client header
3161
3303
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
@@ -3163,20 +3305,17 @@ module Google
3163
3305
  gapic_version: ::Google::Cloud::Compute::V1::VERSION,
3164
3306
  transports_version_send: [:rest]
3165
3307
 
3166
- options.apply_defaults timeout: @config.timeout,
3308
+ options.apply_defaults timeout: @config.rpcs.update_shielded_instance_config.timeout,
3167
3309
  metadata: call_metadata
3168
3310
 
3169
- uri, body, query_string_params = transcode_update_shielded_instance_config request
3170
- response = @client_stub.make_patch_request(
3171
- uri: uri,
3172
- body: body,
3173
- params: query_string_params,
3174
- options: options
3175
- )
3176
- result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
3177
-
3178
- yield result, response if block_given?
3179
- result
3311
+ options.apply_defaults timeout: @config.timeout,
3312
+ metadata: @config.metadata
3313
+
3314
+ @instances_stub.update_shielded_instance_config request, options do |result, response|
3315
+ result = ::Gapic::Rest::BaseOperation.new result
3316
+ yield result, response if block_given?
3317
+ return result
3318
+ end
3180
3319
  rescue ::Faraday::Error => e
3181
3320
  gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
3182
3321
  raise ::Google::Cloud::Error.from_error(gapic_error)
@@ -3231,6 +3370,9 @@ module Google
3231
3370
  # @!attribute [rw] timeout
3232
3371
  # The call timeout in seconds.
3233
3372
  # @return [::Numeric]
3373
+ # @!attribute [rw] metadata
3374
+ # Additional REST headers to be sent with the call.
3375
+ # @return [::Hash{::Symbol=>::String}]
3234
3376
  #
3235
3377
  class Configuration
3236
3378
  extend ::Gapic::Config
@@ -3244,6 +3386,7 @@ module Google
3244
3386
  config_attr :lib_name, nil, ::String, nil
3245
3387
  config_attr :lib_version, nil, ::String, nil
3246
3388
  config_attr :timeout, nil, ::Numeric, nil
3389
+ config_attr :metadata, nil, ::Hash, nil
3247
3390
 
3248
3391
  # @private
3249
3392
  def initialize parent_config = nil
@@ -3251,6 +3394,333 @@ module Google
3251
3394
 
3252
3395
  yield self if block_given?
3253
3396
  end
3397
+
3398
+ ##
3399
+ # Configurations for individual RPCs
3400
+ # @return [Rpcs]
3401
+ #
3402
+ def rpcs
3403
+ @rpcs ||= begin
3404
+ parent_rpcs = nil
3405
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
3406
+ Rpcs.new parent_rpcs
3407
+ end
3408
+ end
3409
+
3410
+ ##
3411
+ # Configuration RPC class for the Instances API.
3412
+ #
3413
+ # Includes fields providing the configuration for each RPC in this service.
3414
+ # Each configuration object is of type `Gapic::Config::Method` and includes
3415
+ # the following configuration fields:
3416
+ #
3417
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
3418
+ #
3419
+ # there is one other field (`retry_policy`) that can be set
3420
+ # but is currently not supported for REST Gapic libraries.
3421
+ #
3422
+ class Rpcs
3423
+ ##
3424
+ # RPC-specific configuration for `add_access_config`
3425
+ # @return [::Gapic::Config::Method]
3426
+ #
3427
+ attr_reader :add_access_config
3428
+ ##
3429
+ # RPC-specific configuration for `add_resource_policies`
3430
+ # @return [::Gapic::Config::Method]
3431
+ #
3432
+ attr_reader :add_resource_policies
3433
+ ##
3434
+ # RPC-specific configuration for `aggregated_list`
3435
+ # @return [::Gapic::Config::Method]
3436
+ #
3437
+ attr_reader :aggregated_list
3438
+ ##
3439
+ # RPC-specific configuration for `attach_disk`
3440
+ # @return [::Gapic::Config::Method]
3441
+ #
3442
+ attr_reader :attach_disk
3443
+ ##
3444
+ # RPC-specific configuration for `bulk_insert`
3445
+ # @return [::Gapic::Config::Method]
3446
+ #
3447
+ attr_reader :bulk_insert
3448
+ ##
3449
+ # RPC-specific configuration for `delete`
3450
+ # @return [::Gapic::Config::Method]
3451
+ #
3452
+ attr_reader :delete
3453
+ ##
3454
+ # RPC-specific configuration for `delete_access_config`
3455
+ # @return [::Gapic::Config::Method]
3456
+ #
3457
+ attr_reader :delete_access_config
3458
+ ##
3459
+ # RPC-specific configuration for `detach_disk`
3460
+ # @return [::Gapic::Config::Method]
3461
+ #
3462
+ attr_reader :detach_disk
3463
+ ##
3464
+ # RPC-specific configuration for `get`
3465
+ # @return [::Gapic::Config::Method]
3466
+ #
3467
+ attr_reader :get
3468
+ ##
3469
+ # RPC-specific configuration for `get_effective_firewalls`
3470
+ # @return [::Gapic::Config::Method]
3471
+ #
3472
+ attr_reader :get_effective_firewalls
3473
+ ##
3474
+ # RPC-specific configuration for `get_guest_attributes`
3475
+ # @return [::Gapic::Config::Method]
3476
+ #
3477
+ attr_reader :get_guest_attributes
3478
+ ##
3479
+ # RPC-specific configuration for `get_iam_policy`
3480
+ # @return [::Gapic::Config::Method]
3481
+ #
3482
+ attr_reader :get_iam_policy
3483
+ ##
3484
+ # RPC-specific configuration for `get_screenshot`
3485
+ # @return [::Gapic::Config::Method]
3486
+ #
3487
+ attr_reader :get_screenshot
3488
+ ##
3489
+ # RPC-specific configuration for `get_serial_port_output`
3490
+ # @return [::Gapic::Config::Method]
3491
+ #
3492
+ attr_reader :get_serial_port_output
3493
+ ##
3494
+ # RPC-specific configuration for `get_shielded_instance_identity`
3495
+ # @return [::Gapic::Config::Method]
3496
+ #
3497
+ attr_reader :get_shielded_instance_identity
3498
+ ##
3499
+ # RPC-specific configuration for `insert`
3500
+ # @return [::Gapic::Config::Method]
3501
+ #
3502
+ attr_reader :insert
3503
+ ##
3504
+ # RPC-specific configuration for `list`
3505
+ # @return [::Gapic::Config::Method]
3506
+ #
3507
+ attr_reader :list
3508
+ ##
3509
+ # RPC-specific configuration for `list_referrers`
3510
+ # @return [::Gapic::Config::Method]
3511
+ #
3512
+ attr_reader :list_referrers
3513
+ ##
3514
+ # RPC-specific configuration for `remove_resource_policies`
3515
+ # @return [::Gapic::Config::Method]
3516
+ #
3517
+ attr_reader :remove_resource_policies
3518
+ ##
3519
+ # RPC-specific configuration for `reset`
3520
+ # @return [::Gapic::Config::Method]
3521
+ #
3522
+ attr_reader :reset
3523
+ ##
3524
+ # RPC-specific configuration for `set_deletion_protection`
3525
+ # @return [::Gapic::Config::Method]
3526
+ #
3527
+ attr_reader :set_deletion_protection
3528
+ ##
3529
+ # RPC-specific configuration for `set_disk_auto_delete`
3530
+ # @return [::Gapic::Config::Method]
3531
+ #
3532
+ attr_reader :set_disk_auto_delete
3533
+ ##
3534
+ # RPC-specific configuration for `set_iam_policy`
3535
+ # @return [::Gapic::Config::Method]
3536
+ #
3537
+ attr_reader :set_iam_policy
3538
+ ##
3539
+ # RPC-specific configuration for `set_labels`
3540
+ # @return [::Gapic::Config::Method]
3541
+ #
3542
+ attr_reader :set_labels
3543
+ ##
3544
+ # RPC-specific configuration for `set_machine_resources`
3545
+ # @return [::Gapic::Config::Method]
3546
+ #
3547
+ attr_reader :set_machine_resources
3548
+ ##
3549
+ # RPC-specific configuration for `set_machine_type`
3550
+ # @return [::Gapic::Config::Method]
3551
+ #
3552
+ attr_reader :set_machine_type
3553
+ ##
3554
+ # RPC-specific configuration for `set_metadata`
3555
+ # @return [::Gapic::Config::Method]
3556
+ #
3557
+ attr_reader :set_metadata
3558
+ ##
3559
+ # RPC-specific configuration for `set_min_cpu_platform`
3560
+ # @return [::Gapic::Config::Method]
3561
+ #
3562
+ attr_reader :set_min_cpu_platform
3563
+ ##
3564
+ # RPC-specific configuration for `set_scheduling`
3565
+ # @return [::Gapic::Config::Method]
3566
+ #
3567
+ attr_reader :set_scheduling
3568
+ ##
3569
+ # RPC-specific configuration for `set_service_account`
3570
+ # @return [::Gapic::Config::Method]
3571
+ #
3572
+ attr_reader :set_service_account
3573
+ ##
3574
+ # RPC-specific configuration for `set_shielded_instance_integrity_policy`
3575
+ # @return [::Gapic::Config::Method]
3576
+ #
3577
+ attr_reader :set_shielded_instance_integrity_policy
3578
+ ##
3579
+ # RPC-specific configuration for `set_tags`
3580
+ # @return [::Gapic::Config::Method]
3581
+ #
3582
+ attr_reader :set_tags
3583
+ ##
3584
+ # RPC-specific configuration for `simulate_maintenance_event`
3585
+ # @return [::Gapic::Config::Method]
3586
+ #
3587
+ attr_reader :simulate_maintenance_event
3588
+ ##
3589
+ # RPC-specific configuration for `start`
3590
+ # @return [::Gapic::Config::Method]
3591
+ #
3592
+ attr_reader :start
3593
+ ##
3594
+ # RPC-specific configuration for `start_with_encryption_key`
3595
+ # @return [::Gapic::Config::Method]
3596
+ #
3597
+ attr_reader :start_with_encryption_key
3598
+ ##
3599
+ # RPC-specific configuration for `stop`
3600
+ # @return [::Gapic::Config::Method]
3601
+ #
3602
+ attr_reader :stop
3603
+ ##
3604
+ # RPC-specific configuration for `test_iam_permissions`
3605
+ # @return [::Gapic::Config::Method]
3606
+ #
3607
+ attr_reader :test_iam_permissions
3608
+ ##
3609
+ # RPC-specific configuration for `update`
3610
+ # @return [::Gapic::Config::Method]
3611
+ #
3612
+ attr_reader :update
3613
+ ##
3614
+ # RPC-specific configuration for `update_access_config`
3615
+ # @return [::Gapic::Config::Method]
3616
+ #
3617
+ attr_reader :update_access_config
3618
+ ##
3619
+ # RPC-specific configuration for `update_display_device`
3620
+ # @return [::Gapic::Config::Method]
3621
+ #
3622
+ attr_reader :update_display_device
3623
+ ##
3624
+ # RPC-specific configuration for `update_network_interface`
3625
+ # @return [::Gapic::Config::Method]
3626
+ #
3627
+ attr_reader :update_network_interface
3628
+ ##
3629
+ # RPC-specific configuration for `update_shielded_instance_config`
3630
+ # @return [::Gapic::Config::Method]
3631
+ #
3632
+ attr_reader :update_shielded_instance_config
3633
+
3634
+ # @private
3635
+ def initialize parent_rpcs = nil
3636
+ add_access_config_config = parent_rpcs.add_access_config if parent_rpcs.respond_to? :add_access_config
3637
+ @add_access_config = ::Gapic::Config::Method.new add_access_config_config
3638
+ add_resource_policies_config = parent_rpcs.add_resource_policies if parent_rpcs.respond_to? :add_resource_policies
3639
+ @add_resource_policies = ::Gapic::Config::Method.new add_resource_policies_config
3640
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
3641
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
3642
+ attach_disk_config = parent_rpcs.attach_disk if parent_rpcs.respond_to? :attach_disk
3643
+ @attach_disk = ::Gapic::Config::Method.new attach_disk_config
3644
+ bulk_insert_config = parent_rpcs.bulk_insert if parent_rpcs.respond_to? :bulk_insert
3645
+ @bulk_insert = ::Gapic::Config::Method.new bulk_insert_config
3646
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
3647
+ @delete = ::Gapic::Config::Method.new delete_config
3648
+ delete_access_config_config = parent_rpcs.delete_access_config if parent_rpcs.respond_to? :delete_access_config
3649
+ @delete_access_config = ::Gapic::Config::Method.new delete_access_config_config
3650
+ detach_disk_config = parent_rpcs.detach_disk if parent_rpcs.respond_to? :detach_disk
3651
+ @detach_disk = ::Gapic::Config::Method.new detach_disk_config
3652
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
3653
+ @get = ::Gapic::Config::Method.new get_config
3654
+ get_effective_firewalls_config = parent_rpcs.get_effective_firewalls if parent_rpcs.respond_to? :get_effective_firewalls
3655
+ @get_effective_firewalls = ::Gapic::Config::Method.new get_effective_firewalls_config
3656
+ get_guest_attributes_config = parent_rpcs.get_guest_attributes if parent_rpcs.respond_to? :get_guest_attributes
3657
+ @get_guest_attributes = ::Gapic::Config::Method.new get_guest_attributes_config
3658
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
3659
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
3660
+ get_screenshot_config = parent_rpcs.get_screenshot if parent_rpcs.respond_to? :get_screenshot
3661
+ @get_screenshot = ::Gapic::Config::Method.new get_screenshot_config
3662
+ get_serial_port_output_config = parent_rpcs.get_serial_port_output if parent_rpcs.respond_to? :get_serial_port_output
3663
+ @get_serial_port_output = ::Gapic::Config::Method.new get_serial_port_output_config
3664
+ get_shielded_instance_identity_config = parent_rpcs.get_shielded_instance_identity if parent_rpcs.respond_to? :get_shielded_instance_identity
3665
+ @get_shielded_instance_identity = ::Gapic::Config::Method.new get_shielded_instance_identity_config
3666
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
3667
+ @insert = ::Gapic::Config::Method.new insert_config
3668
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
3669
+ @list = ::Gapic::Config::Method.new list_config
3670
+ list_referrers_config = parent_rpcs.list_referrers if parent_rpcs.respond_to? :list_referrers
3671
+ @list_referrers = ::Gapic::Config::Method.new list_referrers_config
3672
+ remove_resource_policies_config = parent_rpcs.remove_resource_policies if parent_rpcs.respond_to? :remove_resource_policies
3673
+ @remove_resource_policies = ::Gapic::Config::Method.new remove_resource_policies_config
3674
+ reset_config = parent_rpcs.reset if parent_rpcs.respond_to? :reset
3675
+ @reset = ::Gapic::Config::Method.new reset_config
3676
+ set_deletion_protection_config = parent_rpcs.set_deletion_protection if parent_rpcs.respond_to? :set_deletion_protection
3677
+ @set_deletion_protection = ::Gapic::Config::Method.new set_deletion_protection_config
3678
+ set_disk_auto_delete_config = parent_rpcs.set_disk_auto_delete if parent_rpcs.respond_to? :set_disk_auto_delete
3679
+ @set_disk_auto_delete = ::Gapic::Config::Method.new set_disk_auto_delete_config
3680
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
3681
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
3682
+ set_labels_config = parent_rpcs.set_labels if parent_rpcs.respond_to? :set_labels
3683
+ @set_labels = ::Gapic::Config::Method.new set_labels_config
3684
+ set_machine_resources_config = parent_rpcs.set_machine_resources if parent_rpcs.respond_to? :set_machine_resources
3685
+ @set_machine_resources = ::Gapic::Config::Method.new set_machine_resources_config
3686
+ set_machine_type_config = parent_rpcs.set_machine_type if parent_rpcs.respond_to? :set_machine_type
3687
+ @set_machine_type = ::Gapic::Config::Method.new set_machine_type_config
3688
+ set_metadata_config = parent_rpcs.set_metadata if parent_rpcs.respond_to? :set_metadata
3689
+ @set_metadata = ::Gapic::Config::Method.new set_metadata_config
3690
+ set_min_cpu_platform_config = parent_rpcs.set_min_cpu_platform if parent_rpcs.respond_to? :set_min_cpu_platform
3691
+ @set_min_cpu_platform = ::Gapic::Config::Method.new set_min_cpu_platform_config
3692
+ set_scheduling_config = parent_rpcs.set_scheduling if parent_rpcs.respond_to? :set_scheduling
3693
+ @set_scheduling = ::Gapic::Config::Method.new set_scheduling_config
3694
+ set_service_account_config = parent_rpcs.set_service_account if parent_rpcs.respond_to? :set_service_account
3695
+ @set_service_account = ::Gapic::Config::Method.new set_service_account_config
3696
+ set_shielded_instance_integrity_policy_config = parent_rpcs.set_shielded_instance_integrity_policy if parent_rpcs.respond_to? :set_shielded_instance_integrity_policy
3697
+ @set_shielded_instance_integrity_policy = ::Gapic::Config::Method.new set_shielded_instance_integrity_policy_config
3698
+ set_tags_config = parent_rpcs.set_tags if parent_rpcs.respond_to? :set_tags
3699
+ @set_tags = ::Gapic::Config::Method.new set_tags_config
3700
+ simulate_maintenance_event_config = parent_rpcs.simulate_maintenance_event if parent_rpcs.respond_to? :simulate_maintenance_event
3701
+ @simulate_maintenance_event = ::Gapic::Config::Method.new simulate_maintenance_event_config
3702
+ start_config = parent_rpcs.start if parent_rpcs.respond_to? :start
3703
+ @start = ::Gapic::Config::Method.new start_config
3704
+ start_with_encryption_key_config = parent_rpcs.start_with_encryption_key if parent_rpcs.respond_to? :start_with_encryption_key
3705
+ @start_with_encryption_key = ::Gapic::Config::Method.new start_with_encryption_key_config
3706
+ stop_config = parent_rpcs.stop if parent_rpcs.respond_to? :stop
3707
+ @stop = ::Gapic::Config::Method.new stop_config
3708
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
3709
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
3710
+ update_config = parent_rpcs.update if parent_rpcs.respond_to? :update
3711
+ @update = ::Gapic::Config::Method.new update_config
3712
+ update_access_config_config = parent_rpcs.update_access_config if parent_rpcs.respond_to? :update_access_config
3713
+ @update_access_config = ::Gapic::Config::Method.new update_access_config_config
3714
+ update_display_device_config = parent_rpcs.update_display_device if parent_rpcs.respond_to? :update_display_device
3715
+ @update_display_device = ::Gapic::Config::Method.new update_display_device_config
3716
+ update_network_interface_config = parent_rpcs.update_network_interface if parent_rpcs.respond_to? :update_network_interface
3717
+ @update_network_interface = ::Gapic::Config::Method.new update_network_interface_config
3718
+ update_shielded_instance_config_config = parent_rpcs.update_shielded_instance_config if parent_rpcs.respond_to? :update_shielded_instance_config
3719
+ @update_shielded_instance_config = ::Gapic::Config::Method.new update_shielded_instance_config_config
3720
+
3721
+ yield self if block_given?
3722
+ end
3723
+ end
3254
3724
  end
3255
3725
  end
3256
3726
  end