google-cloud-compute-v1 1.2.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +2 -2
  4. data/lib/google/cloud/compute/v1/accelerator_types/rest/service_stub.rb +90 -52
  5. data/lib/google/cloud/compute/v1/accelerator_types.rb +5 -0
  6. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +2 -2
  7. data/lib/google/cloud/compute/v1/addresses/rest/service_stub.rb +156 -89
  8. data/lib/google/cloud/compute/v1/addresses.rb +3 -0
  9. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +2 -2
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +222 -129
  11. data/lib/google/cloud/compute/v1/autoscalers.rb +3 -0
  12. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +1 -1
  13. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +285 -161
  14. data/lib/google/cloud/compute/v1/backend_buckets.rb +3 -0
  15. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +2 -2
  16. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +383 -221
  17. data/lib/google/cloud/compute/v1/backend_services.rb +3 -0
  18. data/lib/google/cloud/compute/v1/compute_pb.rb +671 -3
  19. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +2 -2
  20. data/lib/google/cloud/compute/v1/disk_types/rest/service_stub.rb +90 -52
  21. data/lib/google/cloud/compute/v1/disk_types.rb +3 -0
  22. data/lib/google/cloud/compute/v1/disks/rest/client.rb +3 -3
  23. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +429 -240
  24. data/lib/google/cloud/compute/v1/disks.rb +3 -0
  25. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
  26. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/service_stub.rb +189 -102
  27. data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +3 -0
  28. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
  29. data/lib/google/cloud/compute/v1/firewall_policies/rest/service_stub.rb +555 -330
  30. data/lib/google/cloud/compute/v1/firewall_policies.rb +3 -0
  31. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
  32. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +187 -104
  33. data/lib/google/cloud/compute/v1/firewalls.rb +3 -0
  34. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +2 -2
  35. data/lib/google/cloud/compute/v1/forwarding_rules/rest/service_stub.rb +258 -146
  36. data/lib/google/cloud/compute/v1/forwarding_rules.rb +3 -0
  37. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
  38. data/lib/google/cloud/compute/v1/global_addresses/rest/service_stub.rb +121 -66
  39. data/lib/google/cloud/compute/v1/global_addresses.rb +3 -0
  40. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
  41. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/service_stub.rb +221 -122
  42. data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +3 -0
  43. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
  44. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/service_stub.rb +219 -126
  45. data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +3 -0
  46. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +2 -2
  47. data/lib/google/cloud/compute/v1/global_operations/rest/service_stub.rb +154 -86
  48. data/lib/google/cloud/compute/v1/global_operations.rb +3 -0
  49. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  50. data/lib/google/cloud/compute/v1/global_organization_operations/rest/service_stub.rb +84 -49
  51. data/lib/google/cloud/compute/v1/global_organization_operations.rb +3 -0
  52. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +1 -1
  53. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/service_stub.rb +154 -85
  54. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +3 -0
  55. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +2 -2
  56. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +218 -127
  57. data/lib/google/cloud/compute/v1/health_checks.rb +3 -0
  58. data/lib/google/cloud/compute/v1/image_family_views/rest/service_stub.rb +27 -7
  59. data/lib/google/cloud/compute/v1/image_family_views.rb +3 -0
  60. data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
  61. data/lib/google/cloud/compute/v1/images/rest/service_stub.rb +354 -194
  62. data/lib/google/cloud/compute/v1/images.rb +3 -0
  63. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +10 -10
  64. data/lib/google/cloud/compute/v1/instance_group_managers/rest/service_stub.rb +664 -381
  65. data/lib/google/cloud/compute/v1/instance_group_managers.rb +3 -0
  66. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +4 -4
  67. data/lib/google/cloud/compute/v1/instance_groups/rest/service_stub.rb +292 -169
  68. data/lib/google/cloud/compute/v1/instance_groups.rb +3 -0
  69. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +1 -1
  70. data/lib/google/cloud/compute/v1/instance_templates/rest/service_stub.rb +221 -120
  71. data/lib/google/cloud/compute/v1/instance_templates.rb +3 -0
  72. data/lib/google/cloud/compute/v1/instances/rest/client.rb +7 -5
  73. data/lib/google/cloud/compute/v1/instances/rest/service_stub.rb +1503 -845
  74. data/lib/google/cloud/compute/v1/instances.rb +3 -0
  75. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +2 -2
  76. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/service_stub.rb +190 -109
  77. data/lib/google/cloud/compute/v1/interconnect_attachments.rb +3 -0
  78. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  79. data/lib/google/cloud/compute/v1/interconnect_locations/rest/service_stub.rb +57 -29
  80. data/lib/google/cloud/compute/v1/interconnect_locations.rb +3 -0
  81. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +1 -1
  82. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +187 -102
  83. data/lib/google/cloud/compute/v1/interconnects.rb +3 -0
  84. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +60 -25
  85. data/lib/google/cloud/compute/v1/license_codes.rb +3 -0
  86. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
  87. data/lib/google/cloud/compute/v1/licenses/rest/service_stub.rb +221 -120
  88. data/lib/google/cloud/compute/v1/licenses.rb +3 -0
  89. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +1 -1
  90. data/lib/google/cloud/compute/v1/machine_images/rest/service_stub.rb +221 -121
  91. data/lib/google/cloud/compute/v1/machine_images.rb +3 -0
  92. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +2 -2
  93. data/lib/google/cloud/compute/v1/machine_types/rest/service_stub.rb +90 -52
  94. data/lib/google/cloud/compute/v1/machine_types.rb +3 -0
  95. data/lib/google/cloud/compute/v1/network_edge_security_services/credentials.rb +52 -0
  96. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +679 -0
  97. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/service_stub.rb +348 -0
  98. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +33 -0
  99. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +47 -0
  100. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +3 -3
  101. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/service_stub.rb +293 -168
  102. data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +3 -0
  103. data/lib/google/cloud/compute/v1/network_firewall_policies/credentials.rb +52 -0
  104. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1552 -0
  105. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/service_stub.rb +998 -0
  106. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +33 -0
  107. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +47 -0
  108. data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
  109. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +350 -202
  110. data/lib/google/cloud/compute/v1/networks.rb +3 -0
  111. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +3 -3
  112. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +428 -242
  113. data/lib/google/cloud/compute/v1/node_groups.rb +3 -0
  114. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +2 -2
  115. data/lib/google/cloud/compute/v1/node_templates/rest/service_stub.rb +259 -143
  116. data/lib/google/cloud/compute/v1/node_templates.rb +3 -0
  117. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +2 -2
  118. data/lib/google/cloud/compute/v1/node_types/rest/service_stub.rb +90 -52
  119. data/lib/google/cloud/compute/v1/node_types.rb +3 -0
  120. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +2 -2
  121. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/service_stub.rb +225 -126
  122. data/lib/google/cloud/compute/v1/packet_mirrorings.rb +3 -0
  123. data/lib/google/cloud/compute/v1/projects/rest/client.rb +2 -2
  124. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +406 -238
  125. data/lib/google/cloud/compute/v1/projects.rb +3 -0
  126. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +1 -1
  127. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/service_stub.rb +154 -85
  128. data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +3 -0
  129. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +2 -2
  130. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/service_stub.rb +190 -108
  131. data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +3 -0
  132. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
  133. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +191 -106
  134. data/lib/google/cloud/compute/v1/region_autoscalers.rb +3 -0
  135. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +1 -1
  136. data/lib/google/cloud/compute/v1/region_backend_services/rest/service_stub.rb +228 -122
  137. data/lib/google/cloud/compute/v1/region_backend_services.rb +3 -0
  138. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +2 -2
  139. data/lib/google/cloud/compute/v1/region_commitments/rest/service_stub.rb +157 -92
  140. data/lib/google/cloud/compute/v1/region_commitments.rb +3 -0
  141. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  142. data/lib/google/cloud/compute/v1/region_disk_types/rest/service_stub.rb +59 -29
  143. data/lib/google/cloud/compute/v1/region_disk_types.rb +3 -0
  144. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1 -1
  145. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +398 -216
  146. data/lib/google/cloud/compute/v1/region_disks.rb +3 -0
  147. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
  148. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +159 -85
  149. data/lib/google/cloud/compute/v1/region_health_check_services.rb +3 -0
  150. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
  151. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +193 -104
  152. data/lib/google/cloud/compute/v1/region_health_checks.rb +3 -0
  153. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +9 -9
  154. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/service_stub.rb +633 -358
  155. data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +3 -0
  156. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  157. data/lib/google/cloud/compute/v1/region_instance_groups/rest/service_stub.rb +127 -71
  158. data/lib/google/cloud/compute/v1/region_instance_groups.rb +3 -0
  159. data/lib/google/cloud/compute/v1/region_instances/rest/service_stub.rb +26 -9
  160. data/lib/google/cloud/compute/v1/region_instances.rb +3 -0
  161. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +1 -1
  162. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/service_stub.rb +125 -66
  163. data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +3 -0
  164. data/lib/google/cloud/compute/v1/region_network_firewall_policies/credentials.rb +52 -0
  165. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1670 -0
  166. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +1073 -0
  167. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +33 -0
  168. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +47 -0
  169. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
  170. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -66
  171. data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +3 -0
  172. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  173. data/lib/google/cloud/compute/v1/region_operations/rest/service_stub.rb +127 -63
  174. data/lib/google/cloud/compute/v1/region_operations.rb +3 -0
  175. data/lib/google/cloud/compute/v1/region_security_policies/credentials.rb +52 -0
  176. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +676 -0
  177. data/lib/google/cloud/compute/v1/region_security_policies/rest/service_stub.rb +349 -0
  178. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +33 -0
  179. data/lib/google/cloud/compute/v1/region_security_policies.rb +47 -0
  180. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
  181. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/service_stub.rb +125 -66
  182. data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +3 -0
  183. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
  184. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/service_stub.rb +159 -85
  185. data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +3 -0
  186. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +88 -1
  187. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/service_stub.rb +249 -99
  188. data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +3 -0
  189. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
  190. data/lib/google/cloud/compute/v1/region_url_maps/rest/service_stub.rb +228 -122
  191. data/lib/google/cloud/compute/v1/region_url_maps.rb +3 -0
  192. data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
  193. data/lib/google/cloud/compute/v1/regions/rest/service_stub.rb +57 -29
  194. data/lib/google/cloud/compute/v1/regions.rb +3 -0
  195. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +2 -2
  196. data/lib/google/cloud/compute/v1/reservations/rest/service_stub.rb +327 -183
  197. data/lib/google/cloud/compute/v1/reservations.rb +3 -0
  198. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +2 -2
  199. data/lib/google/cloud/compute/v1/resource_policies/rest/service_stub.rb +259 -143
  200. data/lib/google/cloud/compute/v1/resource_policies.rb +3 -0
  201. data/lib/google/cloud/compute/v1/routers/rest/client.rb +3 -3
  202. data/lib/google/cloud/compute/v1/routers/rest/service_stub.rb +326 -184
  203. data/lib/google/cloud/compute/v1/routers.rb +3 -0
  204. data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
  205. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +121 -66
  206. data/lib/google/cloud/compute/v1/routes.rb +3 -0
  207. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +97 -5
  208. data/lib/google/cloud/compute/v1/security_policies/rest/service_stub.rb +368 -174
  209. data/lib/google/cloud/compute/v1/security_policies.rb +3 -0
  210. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +2 -2
  211. data/lib/google/cloud/compute/v1/service_attachments/rest/service_stub.rb +293 -162
  212. data/lib/google/cloud/compute/v1/service_attachments.rb +3 -0
  213. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +1 -1
  214. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +255 -138
  215. data/lib/google/cloud/compute/v1/snapshots.rb +3 -0
  216. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +2 -2
  217. data/lib/google/cloud/compute/v1/ssl_certificates/rest/service_stub.rb +152 -89
  218. data/lib/google/cloud/compute/v1/ssl_certificates.rb +3 -0
  219. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +2 -2
  220. data/lib/google/cloud/compute/v1/ssl_policies/rest/service_stub.rb +185 -107
  221. data/lib/google/cloud/compute/v1/ssl_policies.rb +3 -0
  222. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +3 -3
  223. data/lib/google/cloud/compute/v1/subnetworks/rest/service_stub.rb +392 -223
  224. data/lib/google/cloud/compute/v1/subnetworks.rb +3 -0
  225. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +1 -1
  226. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/service_stub.rb +154 -85
  227. data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +3 -0
  228. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +2 -2
  229. data/lib/google/cloud/compute/v1/target_http_proxies/rest/service_stub.rb +218 -127
  230. data/lib/google/cloud/compute/v1/target_http_proxies.rb +3 -0
  231. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +86 -2
  232. data/lib/google/cloud/compute/v1/target_https_proxies/rest/service_stub.rb +371 -178
  233. data/lib/google/cloud/compute/v1/target_https_proxies.rb +3 -0
  234. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +2 -2
  235. data/lib/google/cloud/compute/v1/target_instances/rest/service_stub.rb +156 -89
  236. data/lib/google/cloud/compute/v1/target_instances.rb +3 -0
  237. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +2 -2
  238. data/lib/google/cloud/compute/v1/target_pools/rest/service_stub.rb +361 -203
  239. data/lib/google/cloud/compute/v1/target_pools.rb +3 -0
  240. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +85 -1
  241. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +307 -136
  242. data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +3 -0
  243. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +1 -1
  244. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +187 -104
  245. data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +3 -0
  246. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +2 -2
  247. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/service_stub.rb +156 -89
  248. data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +3 -0
  249. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +2 -2
  250. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +285 -164
  251. data/lib/google/cloud/compute/v1/url_maps.rb +3 -0
  252. data/lib/google/cloud/compute/v1/version.rb +1 -1
  253. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +2 -2
  254. data/lib/google/cloud/compute/v1/vpn_gateways/rest/service_stub.rb +259 -143
  255. data/lib/google/cloud/compute/v1/vpn_gateways.rb +3 -0
  256. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +2 -2
  257. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/service_stub.rb +156 -89
  258. data/lib/google/cloud/compute/v1/vpn_tunnels.rb +3 -0
  259. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  260. data/lib/google/cloud/compute/v1/zone_operations/rest/service_stub.rb +127 -63
  261. data/lib/google/cloud/compute/v1/zone_operations.rb +3 -0
  262. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  263. data/lib/google/cloud/compute/v1/zones/rest/service_stub.rb +57 -29
  264. data/lib/google/cloud/compute/v1/zones.rb +3 -0
  265. data/lib/google/cloud/compute/v1.rb +4 -0
  266. data/proto_docs/google/cloud/compute/v1/compute.rb +1946 -229
  267. metadata +32 -12
@@ -0,0 +1,679 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/network_edge_security_services/rest/service_stub"
22
+ require "google/cloud/compute/v1/region_operations/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Compute
27
+ module V1
28
+ module NetworkEdgeSecurityServices
29
+ module Rest
30
+ ##
31
+ # REST client for the NetworkEdgeSecurityServices service.
32
+ #
33
+ # The NetworkEdgeSecurityServices API.
34
+ #
35
+ class Client
36
+ # @private
37
+ attr_reader :network_edge_security_services_stub
38
+
39
+ ##
40
+ # Configure the NetworkEdgeSecurityServices Client class.
41
+ #
42
+ # See {::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all NetworkEdgeSecurityServices clients
48
+ # ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Rest::Client.configure do |config|
49
+ # config.timeout = 10.0
50
+ # end
51
+ #
52
+ # @yield [config] Configure the Client client.
53
+ # @yieldparam config [Client::Configuration]
54
+ #
55
+ # @return [Client::Configuration]
56
+ #
57
+ def self.configure
58
+ @configure ||= begin
59
+ namespace = ["Google", "Cloud", "Compute", "V1"]
60
+ parent_config = while namespace.any?
61
+ parent_name = namespace.join "::"
62
+ parent_const = const_get parent_name
63
+ break parent_const.configure if parent_const.respond_to? :configure
64
+ namespace.pop
65
+ end
66
+ default_config = Client::Configuration.new parent_config
67
+
68
+ default_config.rpcs.aggregated_list.timeout = 600.0
69
+ default_config.rpcs.aggregated_list.retry_policy = {
70
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
71
+ }
72
+
73
+ default_config.rpcs.delete.timeout = 600.0
74
+
75
+ default_config.rpcs.get.timeout = 600.0
76
+ default_config.rpcs.get.retry_policy = {
77
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
78
+ }
79
+
80
+ default_config.rpcs.insert.timeout = 600.0
81
+
82
+ default_config.rpcs.patch.timeout = 600.0
83
+
84
+ default_config
85
+ end
86
+ yield @configure if block_given?
87
+ @configure
88
+ end
89
+
90
+ ##
91
+ # Configure the NetworkEdgeSecurityServices Client instance.
92
+ #
93
+ # The configuration is set to the derived mode, meaning that values can be changed,
94
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
95
+ # should be made on {Client.configure}.
96
+ #
97
+ # See {::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Rest::Client::Configuration}
98
+ # for a description of the configuration fields.
99
+ #
100
+ # @yield [config] Configure the Client client.
101
+ # @yieldparam config [Client::Configuration]
102
+ #
103
+ # @return [Client::Configuration]
104
+ #
105
+ def configure
106
+ yield @config if block_given?
107
+ @config
108
+ end
109
+
110
+ ##
111
+ # Create a new NetworkEdgeSecurityServices REST client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Rest::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Rest::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the NetworkEdgeSecurityServices client.
124
+ # @yieldparam config [Client::Configuration]
125
+ #
126
+ def initialize
127
+ # Create the configuration object
128
+ @config = Configuration.new Client.configure
129
+
130
+ # Yield the configuration if needed
131
+ yield @config if block_given?
132
+
133
+ # Create credentials
134
+ credentials = @config.credentials
135
+ credentials ||= Credentials.default scope: @config.scope
136
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
137
+ credentials = Credentials.new credentials, scope: @config.scope
138
+ end
139
+
140
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
141
+ config.credentials = credentials
142
+ config.endpoint = @config.endpoint
143
+ end
144
+
145
+ @network_edge_security_services_stub = ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
146
+ end
147
+
148
+ ##
149
+ # Get the associated client for long-running operations via RegionOperations.
150
+ #
151
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
152
+ #
153
+ attr_reader :region_operations
154
+
155
+ # Service calls
156
+
157
+ ##
158
+ # Retrieves the list of all NetworkEdgeSecurityService resources available to the specified project.
159
+ #
160
+ # @overload aggregated_list(request, options = nil)
161
+ # Pass arguments to `aggregated_list` via a request object, either of type
162
+ # {::Google::Cloud::Compute::V1::AggregatedListNetworkEdgeSecurityServicesRequest} or an equivalent Hash.
163
+ #
164
+ # @param request [::Google::Cloud::Compute::V1::AggregatedListNetworkEdgeSecurityServicesRequest, ::Hash]
165
+ # A request object representing the call parameters. Required. To specify no
166
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
167
+ # @param options [::Gapic::CallOptions, ::Hash]
168
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
169
+ # Note: currently retry functionality is not implemented. While it is possible
170
+ # to set it using ::Gapic::CallOptions, it will not be applied
171
+ #
172
+ # @overload aggregated_list(filter: nil, include_all_scopes: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil)
173
+ # Pass arguments to `aggregated_list` via keyword arguments. Note that at
174
+ # least one keyword argument is required. To specify no parameters, or to keep all
175
+ # the default parameter values, pass an empty Hash as a request object (see above).
176
+ #
177
+ # @param filter [::String]
178
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`.
179
+ # @param include_all_scopes [::Boolean]
180
+ # Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
181
+ # @param max_results [::Integer]
182
+ # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
183
+ # @param order_by [::String]
184
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
185
+ # @param page_token [::String]
186
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
187
+ # @param project [::String]
188
+ # Name of the project scoping this request.
189
+ # @param return_partial_success [::Boolean]
190
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
191
+ # @yield [result, response] Access the result along with the Faraday response object
192
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServicesScopedList>]
193
+ # @yieldparam response [::Faraday::Response]
194
+ #
195
+ # @return [::Gapic::Rest::PagedEnumerable<::String, ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServicesScopedList>]
196
+ #
197
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
198
+ def aggregated_list request, options = nil
199
+ raise ::ArgumentError, "request must be provided" if request.nil?
200
+
201
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::AggregatedListNetworkEdgeSecurityServicesRequest
202
+
203
+ # Converts hash and nil to an options object
204
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
205
+
206
+ # Customize the options with defaults
207
+ call_metadata = @config.rpcs.aggregated_list.metadata.to_h
208
+
209
+ # Set x-goog-api-client header
210
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
211
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
212
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
213
+ transports_version_send: [:rest]
214
+
215
+ options.apply_defaults timeout: @config.rpcs.aggregated_list.timeout,
216
+ metadata: call_metadata
217
+
218
+ options.apply_defaults timeout: @config.timeout,
219
+ metadata: @config.metadata
220
+
221
+ @network_edge_security_services_stub.aggregated_list request, options do |result, response|
222
+ result = ::Gapic::Rest::PagedEnumerable.new @network_edge_security_services_stub, :aggregated_list, "items", request, result, options
223
+ yield result, response if block_given?
224
+ return result
225
+ end
226
+ rescue ::Faraday::Error => e
227
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
228
+ raise ::Google::Cloud::Error.from_error(gapic_error)
229
+ end
230
+
231
+ ##
232
+ # Deletes the specified service.
233
+ #
234
+ # @overload delete(request, options = nil)
235
+ # Pass arguments to `delete` via a request object, either of type
236
+ # {::Google::Cloud::Compute::V1::DeleteNetworkEdgeSecurityServiceRequest} or an equivalent Hash.
237
+ #
238
+ # @param request [::Google::Cloud::Compute::V1::DeleteNetworkEdgeSecurityServiceRequest, ::Hash]
239
+ # A request object representing the call parameters. Required. To specify no
240
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
241
+ # @param options [::Gapic::CallOptions, ::Hash]
242
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
243
+ # Note: currently retry functionality is not implemented. While it is possible
244
+ # to set it using ::Gapic::CallOptions, it will not be applied
245
+ #
246
+ # @overload delete(network_edge_security_service: nil, project: nil, region: nil, request_id: nil)
247
+ # Pass arguments to `delete` via keyword arguments. Note that at
248
+ # least one keyword argument is required. To specify no parameters, or to keep all
249
+ # the default parameter values, pass an empty Hash as a request object (see above).
250
+ #
251
+ # @param network_edge_security_service [::String]
252
+ # Name of the network edge security service to delete.
253
+ # @param project [::String]
254
+ # Project ID for this request.
255
+ # @param region [::String]
256
+ # Name of the region scoping this request.
257
+ # @param request_id [::String]
258
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
259
+ # @yield [result, response] Access the result along with the Faraday response object
260
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
261
+ # @yieldparam response [::Faraday::Response]
262
+ #
263
+ # @return [::Gapic::GenericLRO::Operation]
264
+ #
265
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
266
+ def delete request, options = nil
267
+ raise ::ArgumentError, "request must be provided" if request.nil?
268
+
269
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteNetworkEdgeSecurityServiceRequest
270
+
271
+ # Converts hash and nil to an options object
272
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
273
+
274
+ # Customize the options with defaults
275
+ call_metadata = @config.rpcs.delete.metadata.to_h
276
+
277
+ # Set x-goog-api-client header
278
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
279
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
280
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
281
+ transports_version_send: [:rest]
282
+
283
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
284
+ metadata: call_metadata
285
+
286
+ options.apply_defaults timeout: @config.timeout,
287
+ metadata: @config.metadata
288
+
289
+ @network_edge_security_services_stub.delete request, options do |result, response|
290
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
291
+ operation: result,
292
+ client: region_operations,
293
+ request_values: {
294
+ "project" => request.project,
295
+ "region" => request.region
296
+ },
297
+ options: options
298
+ )
299
+ yield result, response if block_given?
300
+ return result
301
+ end
302
+ rescue ::Faraday::Error => e
303
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
304
+ raise ::Google::Cloud::Error.from_error(gapic_error)
305
+ end
306
+
307
+ ##
308
+ # Gets a specified NetworkEdgeSecurityService.
309
+ #
310
+ # @overload get(request, options = nil)
311
+ # Pass arguments to `get` via a request object, either of type
312
+ # {::Google::Cloud::Compute::V1::GetNetworkEdgeSecurityServiceRequest} or an equivalent Hash.
313
+ #
314
+ # @param request [::Google::Cloud::Compute::V1::GetNetworkEdgeSecurityServiceRequest, ::Hash]
315
+ # A request object representing the call parameters. Required. To specify no
316
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
317
+ # @param options [::Gapic::CallOptions, ::Hash]
318
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
319
+ # Note: currently retry functionality is not implemented. While it is possible
320
+ # to set it using ::Gapic::CallOptions, it will not be applied
321
+ #
322
+ # @overload get(network_edge_security_service: nil, project: nil, region: nil)
323
+ # Pass arguments to `get` via keyword arguments. Note that at
324
+ # least one keyword argument is required. To specify no parameters, or to keep all
325
+ # the default parameter values, pass an empty Hash as a request object (see above).
326
+ #
327
+ # @param network_edge_security_service [::String]
328
+ # Name of the network edge security service to get.
329
+ # @param project [::String]
330
+ # Project ID for this request.
331
+ # @param region [::String]
332
+ # Name of the region scoping this request.
333
+ # @yield [result, response] Access the result along with the Faraday response object
334
+ # @yieldparam result [::Google::Cloud::Compute::V1::NetworkEdgeSecurityService]
335
+ # @yieldparam response [::Faraday::Response]
336
+ #
337
+ # @return [::Google::Cloud::Compute::V1::NetworkEdgeSecurityService]
338
+ #
339
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
340
+ def get request, options = nil
341
+ raise ::ArgumentError, "request must be provided" if request.nil?
342
+
343
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetNetworkEdgeSecurityServiceRequest
344
+
345
+ # Converts hash and nil to an options object
346
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
347
+
348
+ # Customize the options with defaults
349
+ call_metadata = @config.rpcs.get.metadata.to_h
350
+
351
+ # Set x-goog-api-client header
352
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
353
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
354
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
355
+ transports_version_send: [:rest]
356
+
357
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
358
+ metadata: call_metadata
359
+
360
+ options.apply_defaults timeout: @config.timeout,
361
+ metadata: @config.metadata
362
+
363
+ @network_edge_security_services_stub.get request, options do |result, response|
364
+ yield result, response if block_given?
365
+ return result
366
+ end
367
+ rescue ::Faraday::Error => e
368
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
369
+ raise ::Google::Cloud::Error.from_error(gapic_error)
370
+ end
371
+
372
+ ##
373
+ # Creates a new service in the specified project using the data included in the request.
374
+ #
375
+ # @overload insert(request, options = nil)
376
+ # Pass arguments to `insert` via a request object, either of type
377
+ # {::Google::Cloud::Compute::V1::InsertNetworkEdgeSecurityServiceRequest} or an equivalent Hash.
378
+ #
379
+ # @param request [::Google::Cloud::Compute::V1::InsertNetworkEdgeSecurityServiceRequest, ::Hash]
380
+ # A request object representing the call parameters. Required. To specify no
381
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
382
+ # @param options [::Gapic::CallOptions, ::Hash]
383
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
384
+ # Note: currently retry functionality is not implemented. While it is possible
385
+ # to set it using ::Gapic::CallOptions, it will not be applied
386
+ #
387
+ # @overload insert(network_edge_security_service_resource: nil, project: nil, region: nil, request_id: nil, validate_only: nil)
388
+ # Pass arguments to `insert` via keyword arguments. Note that at
389
+ # least one keyword argument is required. To specify no parameters, or to keep all
390
+ # the default parameter values, pass an empty Hash as a request object (see above).
391
+ #
392
+ # @param network_edge_security_service_resource [::Google::Cloud::Compute::V1::NetworkEdgeSecurityService, ::Hash]
393
+ # The body resource for this request
394
+ # @param project [::String]
395
+ # Project ID for this request.
396
+ # @param region [::String]
397
+ # Name of the region scoping this request.
398
+ # @param request_id [::String]
399
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
400
+ # @param validate_only [::Boolean]
401
+ # If true, the request will not be committed.
402
+ # @yield [result, response] Access the result along with the Faraday response object
403
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
404
+ # @yieldparam response [::Faraday::Response]
405
+ #
406
+ # @return [::Gapic::GenericLRO::Operation]
407
+ #
408
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
409
+ def insert request, options = nil
410
+ raise ::ArgumentError, "request must be provided" if request.nil?
411
+
412
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertNetworkEdgeSecurityServiceRequest
413
+
414
+ # Converts hash and nil to an options object
415
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
416
+
417
+ # Customize the options with defaults
418
+ call_metadata = @config.rpcs.insert.metadata.to_h
419
+
420
+ # Set x-goog-api-client header
421
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
422
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
423
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
424
+ transports_version_send: [:rest]
425
+
426
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
427
+ metadata: call_metadata
428
+
429
+ options.apply_defaults timeout: @config.timeout,
430
+ metadata: @config.metadata
431
+
432
+ @network_edge_security_services_stub.insert request, options do |result, response|
433
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
434
+ operation: result,
435
+ client: region_operations,
436
+ request_values: {
437
+ "project" => request.project,
438
+ "region" => request.region
439
+ },
440
+ options: options
441
+ )
442
+ yield result, response if block_given?
443
+ return result
444
+ end
445
+ rescue ::Faraday::Error => e
446
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
447
+ raise ::Google::Cloud::Error.from_error(gapic_error)
448
+ end
449
+
450
+ ##
451
+ # Patches the specified policy with the data included in the request.
452
+ #
453
+ # @overload patch(request, options = nil)
454
+ # Pass arguments to `patch` via a request object, either of type
455
+ # {::Google::Cloud::Compute::V1::PatchNetworkEdgeSecurityServiceRequest} or an equivalent Hash.
456
+ #
457
+ # @param request [::Google::Cloud::Compute::V1::PatchNetworkEdgeSecurityServiceRequest, ::Hash]
458
+ # A request object representing the call parameters. Required. To specify no
459
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
460
+ # @param options [::Gapic::CallOptions, ::Hash]
461
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
462
+ # Note: currently retry functionality is not implemented. While it is possible
463
+ # to set it using ::Gapic::CallOptions, it will not be applied
464
+ #
465
+ # @overload patch(network_edge_security_service: nil, network_edge_security_service_resource: nil, paths: nil, project: nil, region: nil, request_id: nil, update_mask: nil)
466
+ # Pass arguments to `patch` via keyword arguments. Note that at
467
+ # least one keyword argument is required. To specify no parameters, or to keep all
468
+ # the default parameter values, pass an empty Hash as a request object (see above).
469
+ #
470
+ # @param network_edge_security_service [::String]
471
+ # Name of the network edge security service to update.
472
+ # @param network_edge_security_service_resource [::Google::Cloud::Compute::V1::NetworkEdgeSecurityService, ::Hash]
473
+ # The body resource for this request
474
+ # @param paths [::String]
475
+ # @param project [::String]
476
+ # Project ID for this request.
477
+ # @param region [::String]
478
+ # Name of the region scoping this request.
479
+ # @param request_id [::String]
480
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
481
+ # @param update_mask [::String]
482
+ # Indicates fields to be updated as part of this request.
483
+ # @yield [result, response] Access the result along with the Faraday response object
484
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
485
+ # @yieldparam response [::Faraday::Response]
486
+ #
487
+ # @return [::Gapic::GenericLRO::Operation]
488
+ #
489
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
490
+ def patch request, options = nil
491
+ raise ::ArgumentError, "request must be provided" if request.nil?
492
+
493
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchNetworkEdgeSecurityServiceRequest
494
+
495
+ # Converts hash and nil to an options object
496
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
497
+
498
+ # Customize the options with defaults
499
+ call_metadata = @config.rpcs.patch.metadata.to_h
500
+
501
+ # Set x-goog-api-client header
502
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
503
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
504
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
505
+ transports_version_send: [:rest]
506
+
507
+ options.apply_defaults timeout: @config.rpcs.patch.timeout,
508
+ metadata: call_metadata
509
+
510
+ options.apply_defaults timeout: @config.timeout,
511
+ metadata: @config.metadata
512
+
513
+ @network_edge_security_services_stub.patch request, options do |result, response|
514
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
515
+ operation: result,
516
+ client: region_operations,
517
+ request_values: {
518
+ "project" => request.project,
519
+ "region" => request.region
520
+ },
521
+ options: options
522
+ )
523
+ yield result, response if block_given?
524
+ return result
525
+ end
526
+ rescue ::Faraday::Error => e
527
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
528
+ raise ::Google::Cloud::Error.from_error(gapic_error)
529
+ end
530
+
531
+ ##
532
+ # Configuration class for the NetworkEdgeSecurityServices REST API.
533
+ #
534
+ # This class represents the configuration for NetworkEdgeSecurityServices REST,
535
+ # providing control over credentials, timeouts, retry behavior, logging.
536
+ #
537
+ # Configuration can be applied globally to all clients, or to a single client
538
+ # on construction.
539
+ #
540
+ # # Examples
541
+ #
542
+ # To modify the global config, setting the timeout for all calls to 10 seconds:
543
+ #
544
+ # ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Client.configure do |config|
545
+ # config.timeout = 10.0
546
+ # end
547
+ #
548
+ # To apply the above configuration only to a new client:
549
+ #
550
+ # client = ::Google::Cloud::Compute::V1::NetworkEdgeSecurityServices::Client.new do |config|
551
+ # config.timeout = 10.0
552
+ # end
553
+ #
554
+ # @!attribute [rw] endpoint
555
+ # The hostname or hostname:port of the service endpoint.
556
+ # Defaults to `"compute.googleapis.com"`.
557
+ # @return [::String]
558
+ # @!attribute [rw] credentials
559
+ # Credentials to send with calls. You may provide any of the following types:
560
+ # * (`String`) The path to a service account key file in JSON format
561
+ # * (`Hash`) A service account key as a Hash
562
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
563
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
564
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
565
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
566
+ # * (`nil`) indicating no credentials
567
+ # @return [::Object]
568
+ # @!attribute [rw] scope
569
+ # The OAuth scopes
570
+ # @return [::Array<::String>]
571
+ # @!attribute [rw] lib_name
572
+ # The library name as recorded in instrumentation and logging
573
+ # @return [::String]
574
+ # @!attribute [rw] lib_version
575
+ # The library version as recorded in instrumentation and logging
576
+ # @return [::String]
577
+ # @!attribute [rw] timeout
578
+ # The call timeout in seconds.
579
+ # @return [::Numeric]
580
+ # @!attribute [rw] metadata
581
+ # Additional REST headers to be sent with the call.
582
+ # @return [::Hash{::Symbol=>::String}]
583
+ #
584
+ class Configuration
585
+ extend ::Gapic::Config
586
+
587
+ config_attr :endpoint, "compute.googleapis.com", ::String
588
+ config_attr :credentials, nil do |value|
589
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
590
+ allowed.any? { |klass| klass === value }
591
+ end
592
+ config_attr :scope, nil, ::String, ::Array, nil
593
+ config_attr :lib_name, nil, ::String, nil
594
+ config_attr :lib_version, nil, ::String, nil
595
+ config_attr :timeout, nil, ::Numeric, nil
596
+ config_attr :metadata, nil, ::Hash, nil
597
+
598
+ # @private
599
+ def initialize parent_config = nil
600
+ @parent_config = parent_config unless parent_config.nil?
601
+
602
+ yield self if block_given?
603
+ end
604
+
605
+ ##
606
+ # Configurations for individual RPCs
607
+ # @return [Rpcs]
608
+ #
609
+ def rpcs
610
+ @rpcs ||= begin
611
+ parent_rpcs = nil
612
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
613
+ Rpcs.new parent_rpcs
614
+ end
615
+ end
616
+
617
+ ##
618
+ # Configuration RPC class for the NetworkEdgeSecurityServices API.
619
+ #
620
+ # Includes fields providing the configuration for each RPC in this service.
621
+ # Each configuration object is of type `Gapic::Config::Method` and includes
622
+ # the following configuration fields:
623
+ #
624
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
625
+ #
626
+ # there is one other field (`retry_policy`) that can be set
627
+ # but is currently not supported for REST Gapic libraries.
628
+ #
629
+ class Rpcs
630
+ ##
631
+ # RPC-specific configuration for `aggregated_list`
632
+ # @return [::Gapic::Config::Method]
633
+ #
634
+ attr_reader :aggregated_list
635
+ ##
636
+ # RPC-specific configuration for `delete`
637
+ # @return [::Gapic::Config::Method]
638
+ #
639
+ attr_reader :delete
640
+ ##
641
+ # RPC-specific configuration for `get`
642
+ # @return [::Gapic::Config::Method]
643
+ #
644
+ attr_reader :get
645
+ ##
646
+ # RPC-specific configuration for `insert`
647
+ # @return [::Gapic::Config::Method]
648
+ #
649
+ attr_reader :insert
650
+ ##
651
+ # RPC-specific configuration for `patch`
652
+ # @return [::Gapic::Config::Method]
653
+ #
654
+ attr_reader :patch
655
+
656
+ # @private
657
+ def initialize parent_rpcs = nil
658
+ aggregated_list_config = parent_rpcs.aggregated_list if parent_rpcs.respond_to? :aggregated_list
659
+ @aggregated_list = ::Gapic::Config::Method.new aggregated_list_config
660
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
661
+ @delete = ::Gapic::Config::Method.new delete_config
662
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
663
+ @get = ::Gapic::Config::Method.new get_config
664
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
665
+ @insert = ::Gapic::Config::Method.new insert_config
666
+ patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
667
+ @patch = ::Gapic::Config::Method.new patch_config
668
+
669
+ yield self if block_given?
670
+ end
671
+ end
672
+ end
673
+ end
674
+ end
675
+ end
676
+ end
677
+ end
678
+ end
679
+ end