google-cloud-compute-v1 3.12.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +5 -17
  3. data/lib/google/cloud/compute/v1/accelerator_types/rest.rb +2 -0
  4. data/lib/google/cloud/compute/v1/accelerator_types.rb +2 -0
  5. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +5 -17
  6. data/lib/google/cloud/compute/v1/addresses/rest.rb +2 -0
  7. data/lib/google/cloud/compute/v1/addresses.rb +2 -0
  8. data/lib/google/cloud/compute/v1/advice/rest/client.rb +3 -1
  9. data/lib/google/cloud/compute/v1/advice/rest.rb +2 -0
  10. data/lib/google/cloud/compute/v1/advice.rb +2 -0
  11. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +5 -17
  12. data/lib/google/cloud/compute/v1/autoscalers/rest.rb +2 -0
  13. data/lib/google/cloud/compute/v1/autoscalers.rb +2 -0
  14. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +6 -25
  15. data/lib/google/cloud/compute/v1/backend_buckets/rest.rb +2 -0
  16. data/lib/google/cloud/compute/v1/backend_buckets.rb +2 -0
  17. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +6 -25
  18. data/lib/google/cloud/compute/v1/backend_services/rest.rb +2 -0
  19. data/lib/google/cloud/compute/v1/backend_services.rb +2 -0
  20. data/lib/google/cloud/compute/v1/compute_pb.rb +19 -1
  21. data/lib/google/cloud/compute/v1/cross_site_networks/rest/client.rb +4 -9
  22. data/lib/google/cloud/compute/v1/cross_site_networks/rest.rb +2 -0
  23. data/lib/google/cloud/compute/v1/cross_site_networks.rb +2 -0
  24. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +5 -17
  25. data/lib/google/cloud/compute/v1/disk_types/rest.rb +2 -0
  26. data/lib/google/cloud/compute/v1/disk_types.rb +2 -0
  27. data/lib/google/cloud/compute/v1/disks/rest/client.rb +5 -17
  28. data/lib/google/cloud/compute/v1/disks/rest.rb +2 -0
  29. data/lib/google/cloud/compute/v1/disks.rb +2 -0
  30. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +4 -9
  31. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest.rb +2 -0
  32. data/lib/google/cloud/compute/v1/external_vpn_gateways.rb +2 -0
  33. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +4 -9
  34. data/lib/google/cloud/compute/v1/firewall_policies/rest.rb +2 -0
  35. data/lib/google/cloud/compute/v1/firewall_policies.rb +2 -0
  36. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +4 -9
  37. data/lib/google/cloud/compute/v1/firewalls/rest.rb +2 -0
  38. data/lib/google/cloud/compute/v1/firewalls.rb +2 -0
  39. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +5 -17
  40. data/lib/google/cloud/compute/v1/forwarding_rules/rest.rb +2 -0
  41. data/lib/google/cloud/compute/v1/forwarding_rules.rb +2 -0
  42. data/lib/google/cloud/compute/v1/future_reservations/rest/client.rb +5 -17
  43. data/lib/google/cloud/compute/v1/future_reservations/rest.rb +2 -0
  44. data/lib/google/cloud/compute/v1/future_reservations.rb +2 -0
  45. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +4 -9
  46. data/lib/google/cloud/compute/v1/global_addresses/rest.rb +2 -0
  47. data/lib/google/cloud/compute/v1/global_addresses.rb +2 -0
  48. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +4 -9
  49. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest.rb +2 -0
  50. data/lib/google/cloud/compute/v1/global_forwarding_rules.rb +2 -0
  51. data/lib/google/cloud/compute/v1/global_frontend_settings_service/credentials.rb +52 -0
  52. data/lib/google/cloud/compute/v1/global_frontend_settings_service/rest/client.rb +524 -0
  53. data/lib/google/cloud/compute/v1/global_frontend_settings_service/rest/service_stub.rb +204 -0
  54. data/lib/google/cloud/compute/v1/global_frontend_settings_service/rest.rb +53 -0
  55. data/lib/google/cloud/compute/v1/global_frontend_settings_service.rb +49 -0
  56. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +5 -17
  57. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest.rb +2 -0
  58. data/lib/google/cloud/compute/v1/global_network_endpoint_groups.rb +2 -0
  59. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +5 -17
  60. data/lib/google/cloud/compute/v1/global_operations/rest.rb +2 -0
  61. data/lib/google/cloud/compute/v1/global_operations.rb +2 -0
  62. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +4 -9
  63. data/lib/google/cloud/compute/v1/global_organization_operations/rest.rb +2 -0
  64. data/lib/google/cloud/compute/v1/global_organization_operations.rb +2 -0
  65. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +4 -9
  66. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest.rb +2 -0
  67. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes.rb +2 -0
  68. data/lib/google/cloud/compute/v1/global_vm_extension_policies/rest/client.rb +5 -17
  69. data/lib/google/cloud/compute/v1/global_vm_extension_policies/rest.rb +2 -0
  70. data/lib/google/cloud/compute/v1/global_vm_extension_policies.rb +2 -0
  71. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +5 -17
  72. data/lib/google/cloud/compute/v1/health_checks/rest.rb +2 -0
  73. data/lib/google/cloud/compute/v1/health_checks.rb +2 -0
  74. data/lib/google/cloud/compute/v1/hosts/rest/client.rb +4 -9
  75. data/lib/google/cloud/compute/v1/hosts/rest.rb +2 -0
  76. data/lib/google/cloud/compute/v1/hosts.rb +2 -0
  77. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +3 -1
  78. data/lib/google/cloud/compute/v1/image_family_views/rest.rb +2 -0
  79. data/lib/google/cloud/compute/v1/image_family_views.rb +2 -0
  80. data/lib/google/cloud/compute/v1/image_views/credentials.rb +53 -0
  81. data/lib/google/cloud/compute/v1/image_views/rest/client.rb +612 -0
  82. data/lib/google/cloud/compute/v1/image_views/rest/service_stub.rb +206 -0
  83. data/lib/google/cloud/compute/v1/image_views/rest.rb +53 -0
  84. data/lib/google/cloud/compute/v1/image_views.rb +49 -0
  85. data/lib/google/cloud/compute/v1/images/rest/client.rb +4 -9
  86. data/lib/google/cloud/compute/v1/images/rest.rb +2 -0
  87. data/lib/google/cloud/compute/v1/images.rb +2 -0
  88. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +4 -9
  89. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest.rb +2 -0
  90. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests.rb +2 -0
  91. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +8 -41
  92. data/lib/google/cloud/compute/v1/instance_group_managers/rest.rb +2 -0
  93. data/lib/google/cloud/compute/v1/instance_group_managers.rb +2 -0
  94. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +6 -25
  95. data/lib/google/cloud/compute/v1/instance_groups/rest.rb +2 -0
  96. data/lib/google/cloud/compute/v1/instance_groups.rb +2 -0
  97. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +3 -1
  98. data/lib/google/cloud/compute/v1/instance_settings_service/rest.rb +2 -0
  99. data/lib/google/cloud/compute/v1/instance_settings_service.rb +2 -0
  100. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +5 -17
  101. data/lib/google/cloud/compute/v1/instance_templates/rest.rb +2 -0
  102. data/lib/google/cloud/compute/v1/instance_templates.rb +2 -0
  103. data/lib/google/cloud/compute/v1/instances/rest/client.rb +6 -25
  104. data/lib/google/cloud/compute/v1/instances/rest.rb +2 -0
  105. data/lib/google/cloud/compute/v1/instances.rb +2 -0
  106. data/lib/google/cloud/compute/v1/instant_snapshot_groups/rest/client.rb +4 -9
  107. data/lib/google/cloud/compute/v1/instant_snapshot_groups/rest.rb +2 -0
  108. data/lib/google/cloud/compute/v1/instant_snapshot_groups.rb +2 -0
  109. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +5 -17
  110. data/lib/google/cloud/compute/v1/instant_snapshots/rest.rb +2 -0
  111. data/lib/google/cloud/compute/v1/instant_snapshots.rb +2 -0
  112. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +4 -9
  113. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest.rb +2 -0
  114. data/lib/google/cloud/compute/v1/interconnect_attachment_groups.rb +2 -0
  115. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +5 -17
  116. data/lib/google/cloud/compute/v1/interconnect_attachments/rest.rb +2 -0
  117. data/lib/google/cloud/compute/v1/interconnect_attachments.rb +2 -0
  118. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +4 -9
  119. data/lib/google/cloud/compute/v1/interconnect_groups/rest.rb +2 -0
  120. data/lib/google/cloud/compute/v1/interconnect_groups.rb +2 -0
  121. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +4 -9
  122. data/lib/google/cloud/compute/v1/interconnect_locations/rest.rb +2 -0
  123. data/lib/google/cloud/compute/v1/interconnect_locations.rb +2 -0
  124. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +4 -9
  125. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest.rb +2 -0
  126. data/lib/google/cloud/compute/v1/interconnect_remote_locations.rb +2 -0
  127. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +118 -9
  128. data/lib/google/cloud/compute/v1/interconnects/rest/service_stub.rb +63 -0
  129. data/lib/google/cloud/compute/v1/interconnects/rest.rb +2 -0
  130. data/lib/google/cloud/compute/v1/interconnects.rb +2 -0
  131. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +3 -1
  132. data/lib/google/cloud/compute/v1/license_codes/rest.rb +2 -0
  133. data/lib/google/cloud/compute/v1/license_codes.rb +2 -0
  134. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +4 -9
  135. data/lib/google/cloud/compute/v1/licenses/rest.rb +2 -0
  136. data/lib/google/cloud/compute/v1/licenses.rb +2 -0
  137. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +4 -9
  138. data/lib/google/cloud/compute/v1/machine_images/rest.rb +2 -0
  139. data/lib/google/cloud/compute/v1/machine_images.rb +2 -0
  140. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +5 -17
  141. data/lib/google/cloud/compute/v1/machine_types/rest.rb +2 -0
  142. data/lib/google/cloud/compute/v1/machine_types.rb +2 -0
  143. data/lib/google/cloud/compute/v1/managed_rulesets/credentials.rb +53 -0
  144. data/lib/google/cloud/compute/v1/managed_rulesets/rest/client.rb +606 -0
  145. data/lib/google/cloud/compute/v1/managed_rulesets/rest/service_stub.rb +204 -0
  146. data/lib/google/cloud/compute/v1/managed_rulesets/rest.rb +53 -0
  147. data/lib/google/cloud/compute/v1/managed_rulesets.rb +49 -0
  148. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +5 -17
  149. data/lib/google/cloud/compute/v1/network_attachments/rest.rb +2 -0
  150. data/lib/google/cloud/compute/v1/network_attachments.rb +2 -0
  151. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +4 -9
  152. data/lib/google/cloud/compute/v1/network_edge_security_services/rest.rb +2 -0
  153. data/lib/google/cloud/compute/v1/network_edge_security_services.rb +2 -0
  154. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +6 -25
  155. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest.rb +2 -0
  156. data/lib/google/cloud/compute/v1/network_endpoint_groups.rb +2 -0
  157. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +5 -17
  158. data/lib/google/cloud/compute/v1/network_firewall_policies/rest.rb +2 -0
  159. data/lib/google/cloud/compute/v1/network_firewall_policies.rb +2 -0
  160. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +4 -9
  161. data/lib/google/cloud/compute/v1/network_profiles/rest.rb +2 -0
  162. data/lib/google/cloud/compute/v1/network_profiles.rb +2 -0
  163. data/lib/google/cloud/compute/v1/networks/rest/client.rb +5 -17
  164. data/lib/google/cloud/compute/v1/networks/rest.rb +2 -0
  165. data/lib/google/cloud/compute/v1/networks.rb +2 -0
  166. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +6 -25
  167. data/lib/google/cloud/compute/v1/node_groups/rest.rb +2 -0
  168. data/lib/google/cloud/compute/v1/node_groups.rb +2 -0
  169. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +5 -17
  170. data/lib/google/cloud/compute/v1/node_templates/rest.rb +2 -0
  171. data/lib/google/cloud/compute/v1/node_templates.rb +2 -0
  172. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +5 -17
  173. data/lib/google/cloud/compute/v1/node_types/rest.rb +2 -0
  174. data/lib/google/cloud/compute/v1/node_types.rb +2 -0
  175. data/lib/google/cloud/compute/v1/organization_security_policies/rest/client.rb +5 -17
  176. data/lib/google/cloud/compute/v1/organization_security_policies/rest.rb +2 -0
  177. data/lib/google/cloud/compute/v1/organization_security_policies.rb +2 -0
  178. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +5 -17
  179. data/lib/google/cloud/compute/v1/packet_mirrorings/rest.rb +2 -0
  180. data/lib/google/cloud/compute/v1/packet_mirrorings.rb +2 -0
  181. data/lib/google/cloud/compute/v1/preview_features/rest/client.rb +4 -9
  182. data/lib/google/cloud/compute/v1/preview_features/rest.rb +2 -0
  183. data/lib/google/cloud/compute/v1/preview_features.rb +2 -0
  184. data/lib/google/cloud/compute/v1/project_views/rest/client.rb +3 -1
  185. data/lib/google/cloud/compute/v1/project_views/rest.rb +2 -0
  186. data/lib/google/cloud/compute/v1/project_views.rb +2 -0
  187. data/lib/google/cloud/compute/v1/projects/rest/client.rb +5 -17
  188. data/lib/google/cloud/compute/v1/projects/rest.rb +2 -0
  189. data/lib/google/cloud/compute/v1/projects.rb +2 -0
  190. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +4 -9
  191. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest.rb +2 -0
  192. data/lib/google/cloud/compute/v1/public_advertised_prefixes.rb +2 -0
  193. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +5 -17
  194. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest.rb +2 -0
  195. data/lib/google/cloud/compute/v1/public_delegated_prefixes.rb +2 -0
  196. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +4 -9
  197. data/lib/google/cloud/compute/v1/region_autoscalers/rest.rb +2 -0
  198. data/lib/google/cloud/compute/v1/region_autoscalers.rb +2 -0
  199. data/lib/google/cloud/compute/v1/region_backend_buckets/rest/client.rb +5 -17
  200. data/lib/google/cloud/compute/v1/region_backend_buckets/rest.rb +2 -0
  201. data/lib/google/cloud/compute/v1/region_backend_buckets.rb +2 -0
  202. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +5 -17
  203. data/lib/google/cloud/compute/v1/region_backend_services/rest.rb +2 -0
  204. data/lib/google/cloud/compute/v1/region_backend_services.rb +2 -0
  205. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +5 -17
  206. data/lib/google/cloud/compute/v1/region_commitments/rest.rb +2 -0
  207. data/lib/google/cloud/compute/v1/region_commitments.rb +2 -0
  208. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/client.rb +5 -17
  209. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest.rb +2 -0
  210. data/lib/google/cloud/compute/v1/region_composite_health_checks.rb +2 -0
  211. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +4 -9
  212. data/lib/google/cloud/compute/v1/region_disk_types/rest.rb +2 -0
  213. data/lib/google/cloud/compute/v1/region_disk_types.rb +2 -0
  214. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +4 -9
  215. data/lib/google/cloud/compute/v1/region_disks/rest.rb +2 -0
  216. data/lib/google/cloud/compute/v1/region_disks.rb +2 -0
  217. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/client.rb +5 -17
  218. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest.rb +2 -0
  219. data/lib/google/cloud/compute/v1/region_health_aggregation_policies.rb +2 -0
  220. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +5 -17
  221. data/lib/google/cloud/compute/v1/region_health_check_services/rest.rb +2 -0
  222. data/lib/google/cloud/compute/v1/region_health_check_services.rb +2 -0
  223. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +4 -9
  224. data/lib/google/cloud/compute/v1/region_health_checks/rest.rb +2 -0
  225. data/lib/google/cloud/compute/v1/region_health_checks.rb +2 -0
  226. data/lib/google/cloud/compute/v1/region_health_sources/rest/client.rb +5 -17
  227. data/lib/google/cloud/compute/v1/region_health_sources/rest.rb +2 -0
  228. data/lib/google/cloud/compute/v1/region_health_sources.rb +2 -0
  229. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/rest/client.rb +4 -9
  230. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/rest.rb +2 -0
  231. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests.rb +2 -0
  232. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +7 -33
  233. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest.rb +2 -0
  234. data/lib/google/cloud/compute/v1/region_instance_group_managers.rb +2 -0
  235. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +5 -17
  236. data/lib/google/cloud/compute/v1/region_instance_groups/rest.rb +2 -0
  237. data/lib/google/cloud/compute/v1/region_instance_groups.rb +2 -0
  238. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +4 -9
  239. data/lib/google/cloud/compute/v1/region_instance_templates/rest.rb +2 -0
  240. data/lib/google/cloud/compute/v1/region_instance_templates.rb +2 -0
  241. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +3 -1
  242. data/lib/google/cloud/compute/v1/region_instances/rest.rb +2 -0
  243. data/lib/google/cloud/compute/v1/region_instances.rb +2 -0
  244. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/rest/client.rb +4 -9
  245. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/rest.rb +2 -0
  246. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups.rb +2 -0
  247. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +4 -9
  248. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest.rb +2 -0
  249. data/lib/google/cloud/compute/v1/region_instant_snapshots.rb +2 -0
  250. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +5 -17
  251. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest.rb +2 -0
  252. data/lib/google/cloud/compute/v1/region_network_endpoint_groups.rb +2 -0
  253. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +126 -10
  254. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/service_stub.rb +64 -0
  255. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest.rb +2 -0
  256. data/lib/google/cloud/compute/v1/region_network_firewall_policies.rb +2 -0
  257. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +5 -17
  258. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest.rb +2 -0
  259. data/lib/google/cloud/compute/v1/region_notification_endpoints.rb +2 -0
  260. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +4 -9
  261. data/lib/google/cloud/compute/v1/region_operations/rest.rb +2 -0
  262. data/lib/google/cloud/compute/v1/region_operations.rb +2 -0
  263. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +4 -9
  264. data/lib/google/cloud/compute/v1/region_security_policies/rest.rb +2 -0
  265. data/lib/google/cloud/compute/v1/region_security_policies.rb +2 -0
  266. data/lib/google/cloud/compute/v1/region_snapshot_settings/rest/client.rb +3 -1
  267. data/lib/google/cloud/compute/v1/region_snapshot_settings/rest.rb +2 -0
  268. data/lib/google/cloud/compute/v1/region_snapshot_settings.rb +2 -0
  269. data/lib/google/cloud/compute/v1/region_snapshots/rest/client.rb +4 -9
  270. data/lib/google/cloud/compute/v1/region_snapshots/rest.rb +2 -0
  271. data/lib/google/cloud/compute/v1/region_snapshots.rb +2 -0
  272. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +4 -9
  273. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest.rb +2 -0
  274. data/lib/google/cloud/compute/v1/region_ssl_certificates.rb +2 -0
  275. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +5 -17
  276. data/lib/google/cloud/compute/v1/region_ssl_policies/rest.rb +2 -0
  277. data/lib/google/cloud/compute/v1/region_ssl_policies.rb +2 -0
  278. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +4 -9
  279. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest.rb +2 -0
  280. data/lib/google/cloud/compute/v1/region_target_http_proxies.rb +2 -0
  281. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +4 -9
  282. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest.rb +2 -0
  283. data/lib/google/cloud/compute/v1/region_target_https_proxies.rb +2 -0
  284. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +4 -9
  285. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest.rb +2 -0
  286. data/lib/google/cloud/compute/v1/region_target_tcp_proxies.rb +2 -0
  287. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +4 -9
  288. data/lib/google/cloud/compute/v1/region_url_maps/rest.rb +2 -0
  289. data/lib/google/cloud/compute/v1/region_url_maps.rb +2 -0
  290. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +4 -9
  291. data/lib/google/cloud/compute/v1/region_zones/rest.rb +2 -0
  292. data/lib/google/cloud/compute/v1/region_zones.rb +2 -0
  293. data/lib/google/cloud/compute/v1/regions/rest/client.rb +4 -9
  294. data/lib/google/cloud/compute/v1/regions/rest.rb +2 -0
  295. data/lib/google/cloud/compute/v1/regions.rb +2 -0
  296. data/lib/google/cloud/compute/v1/reliability_risks/rest/client.rb +4 -9
  297. data/lib/google/cloud/compute/v1/reliability_risks/rest.rb +2 -0
  298. data/lib/google/cloud/compute/v1/reliability_risks.rb +2 -0
  299. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +4 -9
  300. data/lib/google/cloud/compute/v1/reservation_blocks/rest.rb +2 -0
  301. data/lib/google/cloud/compute/v1/reservation_blocks.rb +2 -0
  302. data/lib/google/cloud/compute/v1/reservation_slots/rest/client.rb +4 -9
  303. data/lib/google/cloud/compute/v1/reservation_slots/rest.rb +2 -0
  304. data/lib/google/cloud/compute/v1/reservation_slots.rb +2 -0
  305. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +4 -9
  306. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest.rb +2 -0
  307. data/lib/google/cloud/compute/v1/reservation_sub_blocks.rb +2 -0
  308. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +5 -17
  309. data/lib/google/cloud/compute/v1/reservations/rest.rb +2 -0
  310. data/lib/google/cloud/compute/v1/reservations.rb +2 -0
  311. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +5 -17
  312. data/lib/google/cloud/compute/v1/resource_policies/rest.rb +2 -0
  313. data/lib/google/cloud/compute/v1/resource_policies.rb +2 -0
  314. data/lib/google/cloud/compute/v1/rest.rb +3 -0
  315. data/lib/google/cloud/compute/v1/rollout_plans/rest/client.rb +4 -9
  316. data/lib/google/cloud/compute/v1/rollout_plans/rest.rb +2 -0
  317. data/lib/google/cloud/compute/v1/rollout_plans.rb +2 -0
  318. data/lib/google/cloud/compute/v1/rollouts/rest/client.rb +4 -9
  319. data/lib/google/cloud/compute/v1/rollouts/rest.rb +2 -0
  320. data/lib/google/cloud/compute/v1/rollouts.rb +2 -0
  321. data/lib/google/cloud/compute/v1/routers/rest/client.rb +9 -49
  322. data/lib/google/cloud/compute/v1/routers/rest.rb +2 -0
  323. data/lib/google/cloud/compute/v1/routers.rb +2 -0
  324. data/lib/google/cloud/compute/v1/routes/rest/client.rb +4 -9
  325. data/lib/google/cloud/compute/v1/routes/rest.rb +2 -0
  326. data/lib/google/cloud/compute/v1/routes.rb +2 -0
  327. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +6 -25
  328. data/lib/google/cloud/compute/v1/security_policies/rest.rb +2 -0
  329. data/lib/google/cloud/compute/v1/security_policies.rb +2 -0
  330. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +5 -17
  331. data/lib/google/cloud/compute/v1/service_attachments/rest.rb +2 -0
  332. data/lib/google/cloud/compute/v1/service_attachments.rb +2 -0
  333. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +3 -1
  334. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest.rb +2 -0
  335. data/lib/google/cloud/compute/v1/snapshot_settings_service.rb +2 -0
  336. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +4 -9
  337. data/lib/google/cloud/compute/v1/snapshots/rest.rb +2 -0
  338. data/lib/google/cloud/compute/v1/snapshots.rb +2 -0
  339. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +5 -17
  340. data/lib/google/cloud/compute/v1/ssl_certificates/rest.rb +2 -0
  341. data/lib/google/cloud/compute/v1/ssl_certificates.rb +2 -0
  342. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +6 -25
  343. data/lib/google/cloud/compute/v1/ssl_policies/rest.rb +2 -0
  344. data/lib/google/cloud/compute/v1/ssl_policies.rb +2 -0
  345. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +5 -17
  346. data/lib/google/cloud/compute/v1/storage_pool_types/rest.rb +2 -0
  347. data/lib/google/cloud/compute/v1/storage_pool_types.rb +2 -0
  348. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +6 -25
  349. data/lib/google/cloud/compute/v1/storage_pools/rest.rb +2 -0
  350. data/lib/google/cloud/compute/v1/storage_pools.rb +2 -0
  351. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +6 -25
  352. data/lib/google/cloud/compute/v1/subnetworks/rest.rb +2 -0
  353. data/lib/google/cloud/compute/v1/subnetworks.rb +2 -0
  354. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +4 -9
  355. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest.rb +2 -0
  356. data/lib/google/cloud/compute/v1/target_grpc_proxies.rb +2 -0
  357. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +5 -17
  358. data/lib/google/cloud/compute/v1/target_http_proxies/rest.rb +2 -0
  359. data/lib/google/cloud/compute/v1/target_http_proxies.rb +2 -0
  360. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +5 -17
  361. data/lib/google/cloud/compute/v1/target_https_proxies/rest.rb +2 -0
  362. data/lib/google/cloud/compute/v1/target_https_proxies.rb +2 -0
  363. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +5 -17
  364. data/lib/google/cloud/compute/v1/target_instances/rest.rb +2 -0
  365. data/lib/google/cloud/compute/v1/target_instances.rb +2 -0
  366. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +5 -17
  367. data/lib/google/cloud/compute/v1/target_pools/rest.rb +2 -0
  368. data/lib/google/cloud/compute/v1/target_pools.rb +2 -0
  369. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +4 -9
  370. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest.rb +2 -0
  371. data/lib/google/cloud/compute/v1/target_ssl_proxies.rb +2 -0
  372. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +5 -17
  373. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest.rb +2 -0
  374. data/lib/google/cloud/compute/v1/target_tcp_proxies.rb +2 -0
  375. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +5 -17
  376. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest.rb +2 -0
  377. data/lib/google/cloud/compute/v1/target_vpn_gateways.rb +2 -0
  378. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +5 -17
  379. data/lib/google/cloud/compute/v1/url_maps/rest.rb +2 -0
  380. data/lib/google/cloud/compute/v1/url_maps.rb +2 -0
  381. data/lib/google/cloud/compute/v1/version.rb +1 -1
  382. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +5 -17
  383. data/lib/google/cloud/compute/v1/vpn_gateways/rest.rb +2 -0
  384. data/lib/google/cloud/compute/v1/vpn_gateways.rb +2 -0
  385. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +5 -17
  386. data/lib/google/cloud/compute/v1/vpn_tunnels/rest.rb +2 -0
  387. data/lib/google/cloud/compute/v1/vpn_tunnels.rb +2 -0
  388. data/lib/google/cloud/compute/v1/wire_groups/rest/client.rb +4 -9
  389. data/lib/google/cloud/compute/v1/wire_groups/rest.rb +2 -0
  390. data/lib/google/cloud/compute/v1/wire_groups.rb +2 -0
  391. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +4 -9
  392. data/lib/google/cloud/compute/v1/zone_operations/rest.rb +2 -0
  393. data/lib/google/cloud/compute/v1/zone_operations.rb +2 -0
  394. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest/client.rb +4 -9
  395. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest.rb +2 -0
  396. data/lib/google/cloud/compute/v1/zone_vm_extension_policies.rb +2 -0
  397. data/lib/google/cloud/compute/v1/zones/rest/client.rb +4 -9
  398. data/lib/google/cloud/compute/v1/zones/rest.rb +2 -0
  399. data/lib/google/cloud/compute/v1/zones.rb +2 -0
  400. data/lib/google/cloud/compute/v1.rb +3 -0
  401. data/proto_docs/google/cloud/compute/v1/compute.rb +566 -1614
  402. metadata +16 -1
@@ -0,0 +1,606 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 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/managed_rulesets/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module Compute
26
+ module V1
27
+ module ManagedRulesets
28
+ module Rest
29
+ ##
30
+ # REST client for the ManagedRulesets service.
31
+ #
32
+ # The ManagedRulesets API.
33
+ #
34
+ # This client uses ManagedRulesets version 2026-09-01.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = "2026-09-01"
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
42
+
43
+ # @private
44
+ attr_reader :managed_rulesets_stub
45
+
46
+ ##
47
+ # Configure the ManagedRulesets Client class.
48
+ #
49
+ # See {::Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all ManagedRulesets clients
55
+ # ::Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "Compute", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
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.list.timeout = 600.0
81
+ default_config.rpcs.list.retry_policy = {
82
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
83
+ }
84
+
85
+ default_config
86
+ end
87
+ yield @configure if block_given?
88
+ @configure
89
+ end
90
+
91
+ ##
92
+ # Configure the ManagedRulesets Client instance.
93
+ #
94
+ # The configuration is set to the derived mode, meaning that values can be changed,
95
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
96
+ # should be made on {Client.configure}.
97
+ #
98
+ # See {::Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client::Configuration}
99
+ # for a description of the configuration fields.
100
+ #
101
+ # @yield [config] Configure the Client client.
102
+ # @yieldparam config [Client::Configuration]
103
+ #
104
+ # @return [Client::Configuration]
105
+ #
106
+ def configure
107
+ yield @config if block_given?
108
+ @config
109
+ end
110
+
111
+ ##
112
+ # The effective universe domain
113
+ #
114
+ # @return [String]
115
+ #
116
+ def universe_domain
117
+ @managed_rulesets_stub.universe_domain
118
+ end
119
+
120
+ ##
121
+ # Create a new ManagedRulesets REST client object.
122
+ #
123
+ # @example
124
+ #
125
+ # # Create a client using the default configuration
126
+ # client = ::Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client.new
127
+ #
128
+ # # Create a client using a custom configuration
129
+ # client = ::Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client.new do |config|
130
+ # config.timeout = 10.0
131
+ # end
132
+ #
133
+ # @yield [config] Configure the ManagedRulesets client.
134
+ # @yieldparam config [Client::Configuration]
135
+ #
136
+ def initialize
137
+ # Create the configuration object
138
+ @config = Configuration.new Client.configure
139
+
140
+ # Yield the configuration if needed
141
+ yield @config if block_given?
142
+
143
+ # Create credentials
144
+ credentials = @config.credentials
145
+ # Use self-signed JWT if the endpoint is unchanged from default,
146
+ # but only if the default endpoint does not have a region prefix.
147
+ enable_self_signed_jwt = @config.endpoint.nil? ||
148
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
149
+ !@config.endpoint.split(".").first.include?("-"))
150
+ credentials ||= Credentials.default scope: @config.scope,
151
+ enable_self_signed_jwt: enable_self_signed_jwt
152
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
153
+ credentials = Credentials.new credentials, scope: @config.scope
154
+ end
155
+
156
+ @quota_project_id = @config.quota_project
157
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
158
+
159
+ @managed_rulesets_stub = ::Google::Cloud::Compute::V1::ManagedRulesets::Rest::ServiceStub.new(
160
+ endpoint: @config.endpoint,
161
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
+ universe_domain: @config.universe_domain,
163
+ credentials: credentials,
164
+ logger: @config.logger
165
+ )
166
+
167
+ @managed_rulesets_stub.logger(stub: true)&.info do |entry|
168
+ entry.set_system_name
169
+ entry.set_service
170
+ entry.message = "Created client for #{entry.service}"
171
+ entry.set_credentials_fields credentials
172
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
173
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
174
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
175
+ end
176
+ end
177
+
178
+ ##
179
+ # The logger used for request/response debug logging.
180
+ #
181
+ # @return [Logger]
182
+ #
183
+ def logger
184
+ @managed_rulesets_stub.logger
185
+ end
186
+
187
+ # Service calls
188
+
189
+ ##
190
+ # Gets the details for the specified managed ruleset name.
191
+ #
192
+ # @overload get(request, options = nil)
193
+ # Pass arguments to `get` via a request object, either of type
194
+ # {::Google::Cloud::Compute::V1::GetManagedRulesetRequest} or an equivalent Hash.
195
+ #
196
+ # @param request [::Google::Cloud::Compute::V1::GetManagedRulesetRequest, ::Hash]
197
+ # A request object representing the call parameters. Required. To specify no
198
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
199
+ # @param options [::Gapic::CallOptions, ::Hash]
200
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
201
+ #
202
+ # @overload get(managed_ruleset: nil, project: nil)
203
+ # Pass arguments to `get` via keyword arguments. Note that at
204
+ # least one keyword argument is required. To specify no parameters, or to keep all
205
+ # the default parameter values, pass an empty Hash as a request object (see above).
206
+ #
207
+ # @param managed_ruleset [::String]
208
+ # Name of the managed ruleset to return.
209
+ # @param project [::String]
210
+ # Project ID for this request.
211
+ # @yield [result, operation] Access the result along with the TransportOperation object
212
+ # @yieldparam result [::Google::Cloud::Compute::V1::ManagedRuleset]
213
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
214
+ #
215
+ # @return [::Google::Cloud::Compute::V1::ManagedRuleset]
216
+ #
217
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
218
+ #
219
+ # @example Basic example
220
+ # require "google/cloud/compute/v1"
221
+ #
222
+ # # Create a client object. The client can be reused for multiple calls.
223
+ # client = Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client.new
224
+ #
225
+ # # Create a request. To set request fields, pass in keyword arguments.
226
+ # request = Google::Cloud::Compute::V1::GetManagedRulesetRequest.new
227
+ #
228
+ # # Call the get method.
229
+ # result = client.get request
230
+ #
231
+ # # The returned object is of type Google::Cloud::Compute::V1::ManagedRuleset.
232
+ # p result
233
+ #
234
+ def get request, options = nil
235
+ raise ::ArgumentError, "request must be provided" if request.nil?
236
+
237
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetManagedRulesetRequest
238
+
239
+ # Converts hash and nil to an options object
240
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
241
+
242
+ # Customize the options with defaults
243
+ call_metadata = @config.rpcs.get.metadata.to_h
244
+
245
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
246
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
247
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
248
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
249
+ transports_version_send: [:rest]
250
+
251
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
252
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
253
+
254
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
255
+ metadata: call_metadata,
256
+ retry_policy: @config.rpcs.get.retry_policy
257
+
258
+ options.apply_defaults timeout: @config.timeout,
259
+ metadata: @config.metadata,
260
+ retry_policy: @config.retry_policy
261
+
262
+ @managed_rulesets_stub.get request, options do |result, operation|
263
+ yield result, operation if block_given?
264
+ end
265
+ rescue ::Gapic::Rest::Error => e
266
+ raise ::Google::Cloud::Error.from_error(e)
267
+ end
268
+
269
+ ##
270
+ # Retrieves the list of all the managed rulesets available.
271
+ #
272
+ # @overload list(request, options = nil)
273
+ # Pass arguments to `list` via a request object, either of type
274
+ # {::Google::Cloud::Compute::V1::ListManagedRulesetsRequest} or an equivalent Hash.
275
+ #
276
+ # @param request [::Google::Cloud::Compute::V1::ListManagedRulesetsRequest, ::Hash]
277
+ # A request object representing the call parameters. Required. To specify no
278
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
279
+ # @param options [::Gapic::CallOptions, ::Hash]
280
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
281
+ #
282
+ # @overload list(filter: nil, max_results: nil, order_by: nil, page_token: nil, project: nil)
283
+ # Pass arguments to `list` via keyword arguments. Note that at
284
+ # least one keyword argument is required. To specify no parameters, or to keep all
285
+ # the default parameter values, pass an empty Hash as a request object (see above).
286
+ #
287
+ # @param filter [::String]
288
+ # A filter expression that filters resources listed in the response. Most
289
+ # Compute resources support two types of filter expressions:
290
+ # expressions that support regular expressions and expressions that follow
291
+ # API improvement proposal AIP-160.
292
+ # These two types of filter expressions cannot be mixed in one request.
293
+ #
294
+ # If you want to use AIP-160, your expression must specify the field name, an
295
+ # operator, and the value that you want to use for filtering. The value
296
+ # must be a string, a number, or a boolean. The operator
297
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
298
+ #
299
+ # For example, if you are filtering Compute Engine instances, you can
300
+ # exclude instances named `example-instance` by specifying
301
+ # `name != example-instance`.
302
+ #
303
+ # The `:*` comparison can be used to test whether a key has been defined.
304
+ # For example, to find all objects with `owner` label use:
305
+ # ```
306
+ # labels.owner:*
307
+ # ```
308
+ #
309
+ # You can also filter nested fields. For example, you could specify
310
+ # `scheduling.automaticRestart = false` to include instances only
311
+ # if they are not scheduled for automatic restarts. You can use filtering
312
+ # on nested fields to filter based onresource labels.
313
+ #
314
+ # To filter on multiple expressions, provide each separate expression within
315
+ # parentheses. For example:
316
+ # ```
317
+ # (scheduling.automaticRestart = true)
318
+ # (cpuPlatform = "Intel Skylake")
319
+ # ```
320
+ # By default, each expression is an `AND` expression. However, you
321
+ # can include `AND` and `OR` expressions explicitly.
322
+ # For example:
323
+ # ```
324
+ # (cpuPlatform = "Intel Skylake") OR
325
+ # (cpuPlatform = "Intel Broadwell") AND
326
+ # (scheduling.automaticRestart = true)
327
+ # ```
328
+ #
329
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
330
+ # (not equal) operator against a single un-parenthesized expression with or
331
+ # without quotes or against multiple parenthesized expressions. Examples:
332
+ #
333
+ # `fieldname eq unquoted literal`
334
+ # `fieldname eq 'single quoted literal'`
335
+ # `fieldname eq "double quoted literal"`
336
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
337
+ #
338
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
339
+ # The literal value must match the entire field.
340
+ #
341
+ # For example, to filter for instances that do not end with name "instance",
342
+ # you would use `name ne .*instance`.
343
+ #
344
+ # You cannot combine constraints on multiple fields using regular
345
+ # expressions.
346
+ # @param max_results [::Integer]
347
+ # The maximum number of results per page that should be returned.
348
+ # If the number of available results is larger than `maxResults`,
349
+ # Compute Engine returns a `nextPageToken` that can be used to get
350
+ # the next page of results in subsequent list requests. Acceptable values are
351
+ # `0` to `500`, inclusive. (Default: `500`)
352
+ # @param order_by [::String]
353
+ # Sorts list results by a certain order. By default, results
354
+ # are returned in alphanumerical order based on the resource name.
355
+ #
356
+ # You can also sort results in descending order based on the creation
357
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
358
+ # results based on the `creationTimestamp` field in
359
+ # reverse chronological order (newest result first). Use this to sort
360
+ # resources like operations so that the newest operation is returned first.
361
+ #
362
+ # Currently, only sorting by `name` or
363
+ # `creationTimestamp desc` is supported.
364
+ # @param page_token [::String]
365
+ # Specifies a page token to use. Set `pageToken` to the
366
+ # `nextPageToken` returned by a previous list request to get
367
+ # the next page of results.
368
+ # @param project [::String]
369
+ # Project ID for this request.
370
+ # @yield [result, operation] Access the result along with the TransportOperation object
371
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedRuleset>]
372
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
373
+ #
374
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::ManagedRuleset>]
375
+ #
376
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
377
+ #
378
+ # @example Basic example
379
+ # require "google/cloud/compute/v1"
380
+ #
381
+ # # Create a client object. The client can be reused for multiple calls.
382
+ # client = Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client.new
383
+ #
384
+ # # Create a request. To set request fields, pass in keyword arguments.
385
+ # request = Google::Cloud::Compute::V1::ListManagedRulesetsRequest.new
386
+ #
387
+ # # Call the list method.
388
+ # result = client.list request
389
+ #
390
+ # # The returned object is of type Google::Cloud::Compute::V1::ManagedRulesetList.
391
+ # p result
392
+ #
393
+ def list request, options = nil
394
+ raise ::ArgumentError, "request must be provided" if request.nil?
395
+
396
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListManagedRulesetsRequest
397
+
398
+ # Converts hash and nil to an options object
399
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
400
+
401
+ # Customize the options with defaults
402
+ call_metadata = @config.rpcs.list.metadata.to_h
403
+
404
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
405
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
406
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
407
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
408
+ transports_version_send: [:rest]
409
+
410
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
411
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
412
+
413
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
414
+ metadata: call_metadata,
415
+ retry_policy: @config.rpcs.list.retry_policy
416
+
417
+ options.apply_defaults timeout: @config.timeout,
418
+ metadata: @config.metadata,
419
+ retry_policy: @config.retry_policy
420
+
421
+ @managed_rulesets_stub.list request, options do |result, operation|
422
+ result = ::Gapic::Rest::PagedEnumerable.new @managed_rulesets_stub, :list, "items", request, result, options
423
+ yield result, operation if block_given?
424
+ throw :response, result
425
+ end
426
+ rescue ::Gapic::Rest::Error => e
427
+ raise ::Google::Cloud::Error.from_error(e)
428
+ end
429
+
430
+ ##
431
+ # Configuration class for the ManagedRulesets REST API.
432
+ #
433
+ # This class represents the configuration for ManagedRulesets REST,
434
+ # providing control over timeouts, retry behavior, logging, transport
435
+ # parameters, and other low-level controls. Certain parameters can also be
436
+ # applied individually to specific RPCs. See
437
+ # {::Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client::Configuration::Rpcs}
438
+ # for a list of RPCs that can be configured independently.
439
+ #
440
+ # Configuration can be applied globally to all clients, or to a single client
441
+ # on construction.
442
+ #
443
+ # @example
444
+ #
445
+ # # Modify the global config, setting the timeout for
446
+ # # get to 20 seconds,
447
+ # # and all remaining timeouts to 10 seconds.
448
+ # ::Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client.configure do |config|
449
+ # config.timeout = 10.0
450
+ # config.rpcs.get.timeout = 20.0
451
+ # end
452
+ #
453
+ # # Apply the above configuration only to a new client.
454
+ # client = ::Google::Cloud::Compute::V1::ManagedRulesets::Rest::Client.new do |config|
455
+ # config.timeout = 10.0
456
+ # config.rpcs.get.timeout = 20.0
457
+ # end
458
+ #
459
+ # @!attribute [rw] endpoint
460
+ # A custom service endpoint, as a hostname or hostname:port. The default is
461
+ # nil, indicating to use the default endpoint in the current universe domain.
462
+ # @return [::String,nil]
463
+ # @!attribute [rw] credentials
464
+ # Credentials to send with calls. You may provide any of the following types:
465
+ # * (`String`) The path to a service account key file in JSON format
466
+ # * (`Hash`) A service account key as a Hash
467
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
468
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
469
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
470
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
471
+ # * (`nil`) indicating no credentials
472
+ #
473
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
474
+ # external source for authentication to Google Cloud, you must validate it before
475
+ # providing it to a Google API client library. Providing an unvalidated credential
476
+ # configuration to Google APIs can compromise the security of your systems and data.
477
+ # For more information, refer to [Validate credential configurations from external
478
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
479
+ # @return [::Object]
480
+ # @!attribute [rw] scope
481
+ # The OAuth scopes
482
+ # @return [::Array<::String>]
483
+ # @!attribute [rw] lib_name
484
+ # The library name as recorded in instrumentation and logging
485
+ # @return [::String]
486
+ # @!attribute [rw] lib_version
487
+ # The library version as recorded in instrumentation and logging
488
+ # @return [::String]
489
+ # @!attribute [rw] timeout
490
+ # The call timeout in seconds.
491
+ # @return [::Numeric]
492
+ # @!attribute [rw] metadata
493
+ # Additional headers to be sent with the call.
494
+ # @return [::Hash{::Symbol=>::String}]
495
+ # @!attribute [rw] retry_policy
496
+ # The retry policy. The value is a hash with the following keys:
497
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
498
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
499
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
500
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
501
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
502
+ # trigger a retry.
503
+ # @return [::Hash]
504
+ # @!attribute [rw] quota_project
505
+ # A separate project against which to charge quota.
506
+ # @return [::String]
507
+ # @!attribute [rw] universe_domain
508
+ # The universe domain within which to make requests. This determines the
509
+ # default endpoint URL. The default value of nil uses the environment
510
+ # universe (usually the default "googleapis.com" universe).
511
+ # @return [::String,nil]
512
+ # @!attribute [rw] logger
513
+ # A custom logger to use for request/response debug logging, or the value
514
+ # `:default` (the default) to construct a default logger, or `nil` to
515
+ # explicitly disable logging.
516
+ # @return [::Logger,:default,nil]
517
+ #
518
+ class Configuration
519
+ extend ::Gapic::Config
520
+
521
+ # @private
522
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
523
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
524
+
525
+ config_attr :endpoint, nil, ::String, nil
526
+ config_attr :credentials, nil do |value|
527
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
528
+ allowed.any? { |klass| klass === value }
529
+ end
530
+ config_attr :scope, nil, ::String, ::Array, nil
531
+ config_attr :lib_name, nil, ::String, nil
532
+ config_attr :lib_version, nil, ::String, nil
533
+ config_attr :timeout, nil, ::Numeric, nil
534
+ config_attr :metadata, nil, ::Hash, nil
535
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
536
+ config_attr :quota_project, nil, ::String, nil
537
+ config_attr :universe_domain, nil, ::String, nil
538
+ config_attr :logger, :default, ::Logger, nil, :default
539
+
540
+ # @private
541
+ def initialize parent_config = nil
542
+ @parent_config = parent_config unless parent_config.nil?
543
+
544
+ yield self if block_given?
545
+ end
546
+
547
+ ##
548
+ # Configurations for individual RPCs
549
+ # @return [Rpcs]
550
+ #
551
+ def rpcs
552
+ @rpcs ||= begin
553
+ parent_rpcs = nil
554
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
555
+ Rpcs.new parent_rpcs
556
+ end
557
+ end
558
+
559
+ ##
560
+ # Configuration RPC class for the ManagedRulesets API.
561
+ #
562
+ # Includes fields providing the configuration for each RPC in this service.
563
+ # Each configuration object is of type `Gapic::Config::Method` and includes
564
+ # the following configuration fields:
565
+ #
566
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
567
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
568
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
569
+ # include the following keys:
570
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
571
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
572
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
573
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
574
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
575
+ # trigger a retry.
576
+ #
577
+ class Rpcs
578
+ ##
579
+ # RPC-specific configuration for `get`
580
+ # @return [::Gapic::Config::Method]
581
+ #
582
+ attr_reader :get
583
+ ##
584
+ # RPC-specific configuration for `list`
585
+ # @return [::Gapic::Config::Method]
586
+ #
587
+ attr_reader :list
588
+
589
+ # @private
590
+ def initialize parent_rpcs = nil
591
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
592
+ @get = ::Gapic::Config::Method.new get_config
593
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
594
+ @list = ::Gapic::Config::Method.new list_config
595
+
596
+ yield self if block_given?
597
+ end
598
+ end
599
+ end
600
+ end
601
+ end
602
+ end
603
+ end
604
+ end
605
+ end
606
+ end