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,676 @@
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/region_security_policies/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 RegionSecurityPolicies
29
+ module Rest
30
+ ##
31
+ # REST client for the RegionSecurityPolicies service.
32
+ #
33
+ # The RegionSecurityPolicies API.
34
+ #
35
+ class Client
36
+ # @private
37
+ attr_reader :region_security_policies_stub
38
+
39
+ ##
40
+ # Configure the RegionSecurityPolicies Client class.
41
+ #
42
+ # See {::Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client::Configuration}
43
+ # for a description of the configuration fields.
44
+ #
45
+ # @example
46
+ #
47
+ # # Modify the configuration for all RegionSecurityPolicies clients
48
+ # ::Google::Cloud::Compute::V1::RegionSecurityPolicies::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.delete.timeout = 600.0
69
+
70
+ default_config.rpcs.get.timeout = 600.0
71
+ default_config.rpcs.get.retry_policy = {
72
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
73
+ }
74
+
75
+ default_config.rpcs.insert.timeout = 600.0
76
+
77
+ default_config.rpcs.list.timeout = 600.0
78
+ default_config.rpcs.list.retry_policy = {
79
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
80
+ }
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 RegionSecurityPolicies 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::RegionSecurityPolicies::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 RegionSecurityPolicies REST client object.
112
+ #
113
+ # @example
114
+ #
115
+ # # Create a client using the default configuration
116
+ # client = ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.new
117
+ #
118
+ # # Create a client using a custom configuration
119
+ # client = ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Rest::Client.new do |config|
120
+ # config.timeout = 10.0
121
+ # end
122
+ #
123
+ # @yield [config] Configure the RegionSecurityPolicies 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
+ @region_security_policies_stub = ::Google::Cloud::Compute::V1::RegionSecurityPolicies::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
+ # Deletes the specified policy.
159
+ #
160
+ # @overload delete(request, options = nil)
161
+ # Pass arguments to `delete` via a request object, either of type
162
+ # {::Google::Cloud::Compute::V1::DeleteRegionSecurityPolicyRequest} or an equivalent Hash.
163
+ #
164
+ # @param request [::Google::Cloud::Compute::V1::DeleteRegionSecurityPolicyRequest, ::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 delete(project: nil, region: nil, request_id: nil, security_policy: nil)
173
+ # Pass arguments to `delete` 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 project [::String]
178
+ # Project ID for this request.
179
+ # @param region [::String]
180
+ # Name of the region scoping this request.
181
+ # @param request_id [::String]
182
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
183
+ # @param security_policy [::String]
184
+ # Name of the security policy to delete.
185
+ # @yield [result, response] Access the result along with the Faraday response object
186
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
187
+ # @yieldparam response [::Faraday::Response]
188
+ #
189
+ # @return [::Gapic::GenericLRO::Operation]
190
+ #
191
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
192
+ def delete request, options = nil
193
+ raise ::ArgumentError, "request must be provided" if request.nil?
194
+
195
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteRegionSecurityPolicyRequest
196
+
197
+ # Converts hash and nil to an options object
198
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
199
+
200
+ # Customize the options with defaults
201
+ call_metadata = @config.rpcs.delete.metadata.to_h
202
+
203
+ # Set x-goog-api-client header
204
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
205
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
206
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
207
+ transports_version_send: [:rest]
208
+
209
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
210
+ metadata: call_metadata
211
+
212
+ options.apply_defaults timeout: @config.timeout,
213
+ metadata: @config.metadata
214
+
215
+ @region_security_policies_stub.delete request, options do |result, response|
216
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
217
+ operation: result,
218
+ client: region_operations,
219
+ request_values: {
220
+ "project" => request.project,
221
+ "region" => request.region
222
+ },
223
+ options: options
224
+ )
225
+ yield result, response if block_given?
226
+ return result
227
+ end
228
+ rescue ::Faraday::Error => e
229
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
230
+ raise ::Google::Cloud::Error.from_error(gapic_error)
231
+ end
232
+
233
+ ##
234
+ # List all of the ordered rules present in a single specified policy.
235
+ #
236
+ # @overload get(request, options = nil)
237
+ # Pass arguments to `get` via a request object, either of type
238
+ # {::Google::Cloud::Compute::V1::GetRegionSecurityPolicyRequest} or an equivalent Hash.
239
+ #
240
+ # @param request [::Google::Cloud::Compute::V1::GetRegionSecurityPolicyRequest, ::Hash]
241
+ # A request object representing the call parameters. Required. To specify no
242
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
243
+ # @param options [::Gapic::CallOptions, ::Hash]
244
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
245
+ # Note: currently retry functionality is not implemented. While it is possible
246
+ # to set it using ::Gapic::CallOptions, it will not be applied
247
+ #
248
+ # @overload get(project: nil, region: nil, security_policy: nil)
249
+ # Pass arguments to `get` via keyword arguments. Note that at
250
+ # least one keyword argument is required. To specify no parameters, or to keep all
251
+ # the default parameter values, pass an empty Hash as a request object (see above).
252
+ #
253
+ # @param project [::String]
254
+ # Project ID for this request.
255
+ # @param region [::String]
256
+ # Name of the region scoping this request.
257
+ # @param security_policy [::String]
258
+ # Name of the security policy to get.
259
+ # @yield [result, response] Access the result along with the Faraday response object
260
+ # @yieldparam result [::Google::Cloud::Compute::V1::SecurityPolicy]
261
+ # @yieldparam response [::Faraday::Response]
262
+ #
263
+ # @return [::Google::Cloud::Compute::V1::SecurityPolicy]
264
+ #
265
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
266
+ def get 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::GetRegionSecurityPolicyRequest
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.get.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.get.timeout,
284
+ metadata: call_metadata
285
+
286
+ options.apply_defaults timeout: @config.timeout,
287
+ metadata: @config.metadata
288
+
289
+ @region_security_policies_stub.get request, options do |result, response|
290
+ yield result, response if block_given?
291
+ return result
292
+ end
293
+ rescue ::Faraday::Error => e
294
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
295
+ raise ::Google::Cloud::Error.from_error(gapic_error)
296
+ end
297
+
298
+ ##
299
+ # Creates a new policy in the specified project using the data included in the request.
300
+ #
301
+ # @overload insert(request, options = nil)
302
+ # Pass arguments to `insert` via a request object, either of type
303
+ # {::Google::Cloud::Compute::V1::InsertRegionSecurityPolicyRequest} or an equivalent Hash.
304
+ #
305
+ # @param request [::Google::Cloud::Compute::V1::InsertRegionSecurityPolicyRequest, ::Hash]
306
+ # A request object representing the call parameters. Required. To specify no
307
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
308
+ # @param options [::Gapic::CallOptions, ::Hash]
309
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
310
+ # Note: currently retry functionality is not implemented. While it is possible
311
+ # to set it using ::Gapic::CallOptions, it will not be applied
312
+ #
313
+ # @overload insert(project: nil, region: nil, request_id: nil, security_policy_resource: nil, validate_only: nil)
314
+ # Pass arguments to `insert` via keyword arguments. Note that at
315
+ # least one keyword argument is required. To specify no parameters, or to keep all
316
+ # the default parameter values, pass an empty Hash as a request object (see above).
317
+ #
318
+ # @param project [::String]
319
+ # Project ID for this request.
320
+ # @param region [::String]
321
+ # Name of the region scoping this request.
322
+ # @param request_id [::String]
323
+ # 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).
324
+ # @param security_policy_resource [::Google::Cloud::Compute::V1::SecurityPolicy, ::Hash]
325
+ # The body resource for this request
326
+ # @param validate_only [::Boolean]
327
+ # If true, the request will not be committed.
328
+ # @yield [result, response] Access the result along with the Faraday response object
329
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
330
+ # @yieldparam response [::Faraday::Response]
331
+ #
332
+ # @return [::Gapic::GenericLRO::Operation]
333
+ #
334
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
335
+ def insert request, options = nil
336
+ raise ::ArgumentError, "request must be provided" if request.nil?
337
+
338
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertRegionSecurityPolicyRequest
339
+
340
+ # Converts hash and nil to an options object
341
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
342
+
343
+ # Customize the options with defaults
344
+ call_metadata = @config.rpcs.insert.metadata.to_h
345
+
346
+ # Set x-goog-api-client header
347
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
348
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
349
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
350
+ transports_version_send: [:rest]
351
+
352
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
353
+ metadata: call_metadata
354
+
355
+ options.apply_defaults timeout: @config.timeout,
356
+ metadata: @config.metadata
357
+
358
+ @region_security_policies_stub.insert request, options do |result, response|
359
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
360
+ operation: result,
361
+ client: region_operations,
362
+ request_values: {
363
+ "project" => request.project,
364
+ "region" => request.region
365
+ },
366
+ options: options
367
+ )
368
+ yield result, response if block_given?
369
+ return result
370
+ end
371
+ rescue ::Faraday::Error => e
372
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
373
+ raise ::Google::Cloud::Error.from_error(gapic_error)
374
+ end
375
+
376
+ ##
377
+ # List all the policies that have been configured for the specified project and region.
378
+ #
379
+ # @overload list(request, options = nil)
380
+ # Pass arguments to `list` via a request object, either of type
381
+ # {::Google::Cloud::Compute::V1::ListRegionSecurityPoliciesRequest} or an equivalent Hash.
382
+ #
383
+ # @param request [::Google::Cloud::Compute::V1::ListRegionSecurityPoliciesRequest, ::Hash]
384
+ # A request object representing the call parameters. Required. To specify no
385
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
386
+ # @param options [::Gapic::CallOptions, ::Hash]
387
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
388
+ # Note: currently retry functionality is not implemented. While it is possible
389
+ # to set it using ::Gapic::CallOptions, it will not be applied
390
+ #
391
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
392
+ # Pass arguments to `list` via keyword arguments. Note that at
393
+ # least one keyword argument is required. To specify no parameters, or to keep all
394
+ # the default parameter values, pass an empty Hash as a request object (see above).
395
+ #
396
+ # @param filter [::String]
397
+ # 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`.
398
+ # @param max_results [::Integer]
399
+ # 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`)
400
+ # @param order_by [::String]
401
+ # 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.
402
+ # @param page_token [::String]
403
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
404
+ # @param project [::String]
405
+ # Project ID for this request.
406
+ # @param region [::String]
407
+ # Name of the region scoping this request.
408
+ # @param return_partial_success [::Boolean]
409
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
410
+ # @yield [result, response] Access the result along with the Faraday response object
411
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::SecurityPolicy>]
412
+ # @yieldparam response [::Faraday::Response]
413
+ #
414
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::SecurityPolicy>]
415
+ #
416
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
417
+ def list request, options = nil
418
+ raise ::ArgumentError, "request must be provided" if request.nil?
419
+
420
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListRegionSecurityPoliciesRequest
421
+
422
+ # Converts hash and nil to an options object
423
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
424
+
425
+ # Customize the options with defaults
426
+ call_metadata = @config.rpcs.list.metadata.to_h
427
+
428
+ # Set x-goog-api-client header
429
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
430
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
431
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
432
+ transports_version_send: [:rest]
433
+
434
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
435
+ metadata: call_metadata
436
+
437
+ options.apply_defaults timeout: @config.timeout,
438
+ metadata: @config.metadata
439
+
440
+ @region_security_policies_stub.list request, options do |result, response|
441
+ result = ::Gapic::Rest::PagedEnumerable.new @region_security_policies_stub, :list, "items", request, result, options
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::PatchRegionSecurityPolicyRequest} or an equivalent Hash.
456
+ #
457
+ # @param request [::Google::Cloud::Compute::V1::PatchRegionSecurityPolicyRequest, ::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(project: nil, region: nil, request_id: nil, security_policy: nil, security_policy_resource: 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 project [::String]
471
+ # Project ID for this request.
472
+ # @param region [::String]
473
+ # Name of the region scoping this request.
474
+ # @param request_id [::String]
475
+ # 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).
476
+ # @param security_policy [::String]
477
+ # Name of the security policy to update.
478
+ # @param security_policy_resource [::Google::Cloud::Compute::V1::SecurityPolicy, ::Hash]
479
+ # The body resource for this request
480
+ # @yield [result, response] Access the result along with the Faraday response object
481
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
482
+ # @yieldparam response [::Faraday::Response]
483
+ #
484
+ # @return [::Gapic::GenericLRO::Operation]
485
+ #
486
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
487
+ def patch request, options = nil
488
+ raise ::ArgumentError, "request must be provided" if request.nil?
489
+
490
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::PatchRegionSecurityPolicyRequest
491
+
492
+ # Converts hash and nil to an options object
493
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
494
+
495
+ # Customize the options with defaults
496
+ call_metadata = @config.rpcs.patch.metadata.to_h
497
+
498
+ # Set x-goog-api-client header
499
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
500
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
501
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
502
+ transports_version_send: [:rest]
503
+
504
+ options.apply_defaults timeout: @config.rpcs.patch.timeout,
505
+ metadata: call_metadata
506
+
507
+ options.apply_defaults timeout: @config.timeout,
508
+ metadata: @config.metadata
509
+
510
+ @region_security_policies_stub.patch request, options do |result, response|
511
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
512
+ operation: result,
513
+ client: region_operations,
514
+ request_values: {
515
+ "project" => request.project,
516
+ "region" => request.region
517
+ },
518
+ options: options
519
+ )
520
+ yield result, response if block_given?
521
+ return result
522
+ end
523
+ rescue ::Faraday::Error => e
524
+ gapic_error = ::Gapic::Rest::Error.wrap_faraday_error e
525
+ raise ::Google::Cloud::Error.from_error(gapic_error)
526
+ end
527
+
528
+ ##
529
+ # Configuration class for the RegionSecurityPolicies REST API.
530
+ #
531
+ # This class represents the configuration for RegionSecurityPolicies REST,
532
+ # providing control over credentials, timeouts, retry behavior, logging.
533
+ #
534
+ # Configuration can be applied globally to all clients, or to a single client
535
+ # on construction.
536
+ #
537
+ # # Examples
538
+ #
539
+ # To modify the global config, setting the timeout for all calls to 10 seconds:
540
+ #
541
+ # ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Client.configure do |config|
542
+ # config.timeout = 10.0
543
+ # end
544
+ #
545
+ # To apply the above configuration only to a new client:
546
+ #
547
+ # client = ::Google::Cloud::Compute::V1::RegionSecurityPolicies::Client.new do |config|
548
+ # config.timeout = 10.0
549
+ # end
550
+ #
551
+ # @!attribute [rw] endpoint
552
+ # The hostname or hostname:port of the service endpoint.
553
+ # Defaults to `"compute.googleapis.com"`.
554
+ # @return [::String]
555
+ # @!attribute [rw] credentials
556
+ # Credentials to send with calls. You may provide any of the following types:
557
+ # * (`String`) The path to a service account key file in JSON format
558
+ # * (`Hash`) A service account key as a Hash
559
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
560
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
561
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
562
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
563
+ # * (`nil`) indicating no credentials
564
+ # @return [::Object]
565
+ # @!attribute [rw] scope
566
+ # The OAuth scopes
567
+ # @return [::Array<::String>]
568
+ # @!attribute [rw] lib_name
569
+ # The library name as recorded in instrumentation and logging
570
+ # @return [::String]
571
+ # @!attribute [rw] lib_version
572
+ # The library version as recorded in instrumentation and logging
573
+ # @return [::String]
574
+ # @!attribute [rw] timeout
575
+ # The call timeout in seconds.
576
+ # @return [::Numeric]
577
+ # @!attribute [rw] metadata
578
+ # Additional REST headers to be sent with the call.
579
+ # @return [::Hash{::Symbol=>::String}]
580
+ #
581
+ class Configuration
582
+ extend ::Gapic::Config
583
+
584
+ config_attr :endpoint, "compute.googleapis.com", ::String
585
+ config_attr :credentials, nil do |value|
586
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
587
+ allowed.any? { |klass| klass === value }
588
+ end
589
+ config_attr :scope, nil, ::String, ::Array, nil
590
+ config_attr :lib_name, nil, ::String, nil
591
+ config_attr :lib_version, nil, ::String, nil
592
+ config_attr :timeout, nil, ::Numeric, nil
593
+ config_attr :metadata, nil, ::Hash, nil
594
+
595
+ # @private
596
+ def initialize parent_config = nil
597
+ @parent_config = parent_config unless parent_config.nil?
598
+
599
+ yield self if block_given?
600
+ end
601
+
602
+ ##
603
+ # Configurations for individual RPCs
604
+ # @return [Rpcs]
605
+ #
606
+ def rpcs
607
+ @rpcs ||= begin
608
+ parent_rpcs = nil
609
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
610
+ Rpcs.new parent_rpcs
611
+ end
612
+ end
613
+
614
+ ##
615
+ # Configuration RPC class for the RegionSecurityPolicies API.
616
+ #
617
+ # Includes fields providing the configuration for each RPC in this service.
618
+ # Each configuration object is of type `Gapic::Config::Method` and includes
619
+ # the following configuration fields:
620
+ #
621
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
622
+ #
623
+ # there is one other field (`retry_policy`) that can be set
624
+ # but is currently not supported for REST Gapic libraries.
625
+ #
626
+ class Rpcs
627
+ ##
628
+ # RPC-specific configuration for `delete`
629
+ # @return [::Gapic::Config::Method]
630
+ #
631
+ attr_reader :delete
632
+ ##
633
+ # RPC-specific configuration for `get`
634
+ # @return [::Gapic::Config::Method]
635
+ #
636
+ attr_reader :get
637
+ ##
638
+ # RPC-specific configuration for `insert`
639
+ # @return [::Gapic::Config::Method]
640
+ #
641
+ attr_reader :insert
642
+ ##
643
+ # RPC-specific configuration for `list`
644
+ # @return [::Gapic::Config::Method]
645
+ #
646
+ attr_reader :list
647
+ ##
648
+ # RPC-specific configuration for `patch`
649
+ # @return [::Gapic::Config::Method]
650
+ #
651
+ attr_reader :patch
652
+
653
+ # @private
654
+ def initialize parent_rpcs = nil
655
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
656
+ @delete = ::Gapic::Config::Method.new delete_config
657
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
658
+ @get = ::Gapic::Config::Method.new get_config
659
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
660
+ @insert = ::Gapic::Config::Method.new insert_config
661
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
662
+ @list = ::Gapic::Config::Method.new list_config
663
+ patch_config = parent_rpcs.patch if parent_rpcs.respond_to? :patch
664
+ @patch = ::Gapic::Config::Method.new patch_config
665
+
666
+ yield self if block_given?
667
+ end
668
+ end
669
+ end
670
+ end
671
+ end
672
+ end
673
+ end
674
+ end
675
+ end
676
+ end