google-cloud-compute-v1 3.4.0 → 3.6.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 (214) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +181 -14
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +237 -20
  4. data/lib/google/cloud/compute/v1/advice/credentials.rb +52 -0
  5. data/lib/google/cloud/compute/v1/advice/rest/client.rb +431 -0
  6. data/lib/google/cloud/compute/v1/advice/rest/service_stub.rb +144 -0
  7. data/lib/google/cloud/compute/v1/advice/rest.rb +51 -0
  8. data/lib/google/cloud/compute/v1/advice.rb +47 -0
  9. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +334 -21
  10. data/lib/google/cloud/compute/v1/autoscalers/rest/service_stub.rb +64 -0
  11. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +573 -23
  12. data/lib/google/cloud/compute/v1/backend_buckets/rest/service_stub.rb +122 -0
  13. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +499 -40
  14. data/lib/google/cloud/compute/v1/backend_services/rest/service_stub.rb +62 -0
  15. data/lib/google/cloud/compute/v1/compute_pb.rb +357 -25
  16. data/lib/google/cloud/compute/v1/cross_site_networks/credentials.rb +52 -0
  17. data/lib/google/cloud/compute/v1/cross_site_networks/rest/client.rb +975 -0
  18. data/lib/google/cloud/compute/v1/cross_site_networks/rest/service_stub.rb +391 -0
  19. data/lib/google/cloud/compute/v1/cross_site_networks/rest.rb +51 -0
  20. data/lib/google/cloud/compute/v1/cross_site_networks.rb +47 -0
  21. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +181 -14
  22. data/lib/google/cloud/compute/v1/disks/rest/client.rb +508 -42
  23. data/lib/google/cloud/compute/v1/disks/rest/service_stub.rb +64 -0
  24. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +118 -11
  25. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +240 -25
  26. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +238 -13
  27. data/lib/google/cloud/compute/v1/firewalls/rest/service_stub.rb +63 -0
  28. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +258 -23
  29. data/lib/google/cloud/compute/v1/future_reservations/credentials.rb +52 -0
  30. data/lib/google/cloud/compute/v1/future_reservations/rest/client.rb +1287 -0
  31. data/lib/google/cloud/compute/v1/future_reservations/rest/service_stub.rb +520 -0
  32. data/lib/google/cloud/compute/v1/future_reservations/rest.rb +51 -0
  33. data/lib/google/cloud/compute/v1/future_reservations.rb +47 -0
  34. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +126 -10
  35. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +151 -15
  36. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +246 -21
  37. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +203 -18
  38. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +91 -9
  39. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +128 -10
  40. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +333 -21
  41. data/lib/google/cloud/compute/v1/health_checks/rest/service_stub.rb +63 -0
  42. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +2 -1
  43. data/lib/google/cloud/compute/v1/images/rest/client.rb +161 -18
  44. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +159 -24
  45. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +920 -95
  46. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +380 -40
  47. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +13 -1
  48. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +220 -20
  49. data/lib/google/cloud/compute/v1/instances/rest/client.rb +939 -104
  50. data/lib/google/cloud/compute/v1/instant_snapshot_groups/credentials.rb +52 -0
  51. data/lib/google/cloud/compute/v1/instant_snapshot_groups/rest/client.rb +1145 -0
  52. data/lib/google/cloud/compute/v1/instant_snapshot_groups/rest/service_stub.rb +523 -0
  53. data/lib/google/cloud/compute/v1/instant_snapshot_groups/rest.rb +51 -0
  54. data/lib/google/cloud/compute/v1/instant_snapshot_groups.rb +47 -0
  55. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +235 -21
  56. data/lib/google/cloud/compute/v1/interconnect_attachment_groups/rest/client.rb +139 -14
  57. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +242 -21
  58. data/lib/google/cloud/compute/v1/interconnect_groups/rest/client.rb +139 -14
  59. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +87 -7
  60. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +87 -7
  61. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +145 -14
  62. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +9 -2
  63. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +161 -16
  64. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +124 -13
  65. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +181 -14
  66. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +232 -20
  67. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +138 -12
  68. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +361 -37
  69. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +354 -33
  70. data/lib/google/cloud/compute/v1/network_profiles/rest/client.rb +85 -6
  71. data/lib/google/cloud/compute/v1/networks/rest/client.rb +281 -23
  72. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +381 -32
  73. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +213 -19
  74. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +181 -14
  75. data/lib/google/cloud/compute/v1/organization_security_policies/credentials.rb +52 -0
  76. data/lib/google/cloud/compute/v1/organization_security_policies/rest/client.rb +2259 -0
  77. data/lib/google/cloud/compute/v1/organization_security_policies/rest/service_stub.rb +1054 -0
  78. data/lib/google/cloud/compute/v1/organization_security_policies/rest.rb +51 -0
  79. data/lib/google/cloud/compute/v1/organization_security_policies.rb +47 -0
  80. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +226 -19
  81. data/lib/google/cloud/compute/v1/preview_features/credentials.rb +52 -0
  82. data/lib/google/cloud/compute/v1/preview_features/rest/client.rb +739 -0
  83. data/lib/google/cloud/compute/v1/preview_features/rest/service_stub.rb +267 -0
  84. data/lib/google/cloud/compute/v1/preview_features/rest.rb +51 -0
  85. data/lib/google/cloud/compute/v1/preview_features.rb +47 -0
  86. data/lib/google/cloud/compute/v1/projects/rest/client.rb +346 -30
  87. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +154 -12
  88. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +255 -22
  89. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +238 -13
  90. data/lib/google/cloud/compute/v1/region_autoscalers/rest/service_stub.rb +64 -0
  91. data/lib/google/cloud/compute/v1/region_backend_buckets/credentials.rb +52 -0
  92. data/lib/google/cloud/compute/v1/region_backend_buckets/rest/client.rb +1450 -0
  93. data/lib/google/cloud/compute/v1/region_backend_buckets/rest/service_stub.rb +649 -0
  94. data/lib/google/cloud/compute/v1/region_backend_buckets/rest.rb +51 -0
  95. data/lib/google/cloud/compute/v1/region_backend_buckets.rb +47 -0
  96. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +260 -26
  97. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +212 -18
  98. data/lib/google/cloud/compute/v1/region_composite_health_checks/credentials.rb +52 -0
  99. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/client.rb +1363 -0
  100. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest/service_stub.rb +584 -0
  101. data/lib/google/cloud/compute/v1/region_composite_health_checks/rest.rb +51 -0
  102. data/lib/google/cloud/compute/v1/region_composite_health_checks.rb +47 -0
  103. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +83 -5
  104. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +387 -29
  105. data/lib/google/cloud/compute/v1/region_disks/rest/service_stub.rb +64 -0
  106. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/credentials.rb +52 -0
  107. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/client.rb +1268 -0
  108. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest/service_stub.rb +521 -0
  109. data/lib/google/cloud/compute/v1/region_health_aggregation_policies/rest.rb +51 -0
  110. data/lib/google/cloud/compute/v1/region_health_aggregation_policies.rb +47 -0
  111. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +427 -17
  112. data/lib/google/cloud/compute/v1/region_health_check_services/rest/service_stub.rb +125 -0
  113. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +238 -13
  114. data/lib/google/cloud/compute/v1/region_health_checks/rest/service_stub.rb +64 -0
  115. data/lib/google/cloud/compute/v1/region_health_sources/credentials.rb +52 -0
  116. data/lib/google/cloud/compute/v1/region_health_sources/rest/client.rb +1363 -0
  117. data/lib/google/cloud/compute/v1/region_health_sources/rest/service_stub.rb +584 -0
  118. data/lib/google/cloud/compute/v1/region_health_sources/rest.rb +51 -0
  119. data/lib/google/cloud/compute/v1/region_health_sources.rb +47 -0
  120. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/credentials.rb +52 -0
  121. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/rest/client.rb +1002 -0
  122. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/rest/service_stub.rb +400 -0
  123. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests/rest.rb +51 -0
  124. data/lib/google/cloud/compute/v1/region_instance_group_manager_resize_requests.rb +47 -0
  125. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +750 -64
  126. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +187 -14
  127. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +115 -10
  128. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +15 -2
  129. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/credentials.rb +52 -0
  130. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/rest/client.rb +1146 -0
  131. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/rest/service_stub.rb +523 -0
  132. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups/rest.rb +51 -0
  133. data/lib/google/cloud/compute/v1/region_instant_snapshot_groups.rb +47 -0
  134. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +139 -13
  135. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +264 -28
  136. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +213 -20
  137. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +399 -11
  138. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/service_stub.rb +125 -0
  139. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +107 -10
  140. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +149 -14
  141. data/lib/google/cloud/compute/v1/region_snapshot_settings/credentials.rb +52 -0
  142. data/lib/google/cloud/compute/v1/region_snapshot_settings/rest/client.rb +561 -0
  143. data/lib/google/cloud/compute/v1/region_snapshot_settings/rest/service_stub.rb +206 -0
  144. data/lib/google/cloud/compute/v1/region_snapshot_settings/rest.rb +51 -0
  145. data/lib/google/cloud/compute/v1/region_snapshot_settings.rb +47 -0
  146. data/lib/google/cloud/compute/v1/region_snapshots/credentials.rb +52 -0
  147. data/lib/google/cloud/compute/v1/region_snapshots/rest/client.rb +1388 -0
  148. data/lib/google/cloud/compute/v1/region_snapshots/rest/service_stub.rb +651 -0
  149. data/lib/google/cloud/compute/v1/region_snapshots/rest.rb +51 -0
  150. data/lib/google/cloud/compute/v1/region_snapshots.rb +47 -0
  151. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +116 -10
  152. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +220 -20
  153. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +126 -10
  154. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +158 -14
  155. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +113 -9
  156. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +104 -14
  157. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +85 -6
  158. data/lib/google/cloud/compute/v1/regions/rest/client.rb +120 -7
  159. data/lib/google/cloud/compute/v1/reservation_blocks/rest/client.rb +396 -11
  160. data/lib/google/cloud/compute/v1/reservation_blocks/rest/service_stub.rb +194 -0
  161. data/lib/google/cloud/compute/v1/reservation_slots/credentials.rb +52 -0
  162. data/lib/google/cloud/compute/v1/reservation_slots/rest/client.rb +863 -0
  163. data/lib/google/cloud/compute/v1/reservation_slots/rest/service_stub.rb +338 -0
  164. data/lib/google/cloud/compute/v1/reservation_slots/rest.rb +51 -0
  165. data/lib/google/cloud/compute/v1/reservation_slots.rb +47 -0
  166. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/client.rb +642 -12
  167. data/lib/google/cloud/compute/v1/reservation_sub_blocks/rest/service_stub.rb +327 -3
  168. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +257 -24
  169. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +224 -19
  170. data/lib/google/cloud/compute/v1/rest.rb +17 -0
  171. data/lib/google/cloud/compute/v1/routers/rest/client.rb +555 -50
  172. data/lib/google/cloud/compute/v1/routes/rest/client.rb +202 -8
  173. data/lib/google/cloud/compute/v1/routes/rest/service_stub.rb +63 -0
  174. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +316 -26
  175. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +231 -21
  176. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +13 -1
  177. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +245 -13
  178. data/lib/google/cloud/compute/v1/snapshots/rest/service_stub.rb +63 -0
  179. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +210 -17
  180. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +315 -27
  181. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +181 -14
  182. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +321 -28
  183. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +378 -34
  184. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +128 -10
  185. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +240 -20
  186. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +306 -30
  187. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +227 -20
  188. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +294 -26
  189. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +281 -19
  190. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/service_stub.rb +63 -0
  191. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +329 -20
  192. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/service_stub.rb +63 -0
  193. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +224 -19
  194. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +354 -24
  195. data/lib/google/cloud/compute/v1/url_maps/rest/service_stub.rb +63 -0
  196. data/lib/google/cloud/compute/v1/version.rb +1 -1
  197. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +224 -19
  198. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +224 -19
  199. data/lib/google/cloud/compute/v1/wire_groups/credentials.rb +52 -0
  200. data/lib/google/cloud/compute/v1/wire_groups/rest/client.rb +980 -0
  201. data/lib/google/cloud/compute/v1/wire_groups/rest/service_stub.rb +396 -0
  202. data/lib/google/cloud/compute/v1/wire_groups/rest.rb +51 -0
  203. data/lib/google/cloud/compute/v1/wire_groups.rb +47 -0
  204. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +106 -10
  205. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/credentials.rb +52 -0
  206. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest/client.rb +975 -0
  207. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest/service_stub.rb +396 -0
  208. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest.rb +51 -0
  209. data/lib/google/cloud/compute/v1/zone_vm_extension_policies.rb +47 -0
  210. data/lib/google/cloud/compute/v1/zones/rest/client.rb +83 -5
  211. data/lib/google/cloud/compute/v1.rb +17 -0
  212. data/proto_docs/google/api/client.rb +149 -29
  213. data/proto_docs/google/cloud/compute/v1/compute.rb +47064 -5503
  214. metadata +87 -2
@@ -0,0 +1,1002 @@
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/region_instance_group_manager_resize_requests/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 RegionInstanceGroupManagerResizeRequests
29
+ module Rest
30
+ ##
31
+ # REST client for the RegionInstanceGroupManagerResizeRequests service.
32
+ #
33
+ # The RegionInstanceGroupManagerResizeRequests API.
34
+ #
35
+ class Client
36
+ # @private
37
+ API_VERSION = ""
38
+
39
+ # @private
40
+ DEFAULT_ENDPOINT_TEMPLATE = "compute.$UNIVERSE_DOMAIN$"
41
+
42
+ # @private
43
+ attr_reader :region_instance_group_manager_resize_requests_stub
44
+
45
+ ##
46
+ # Configure the RegionInstanceGroupManagerResizeRequests Client class.
47
+ #
48
+ # See {::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all RegionInstanceGroupManagerResizeRequests clients
54
+ # ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
57
+ #
58
+ # @yield [config] Configure the Client client.
59
+ # @yieldparam config [Client::Configuration]
60
+ #
61
+ # @return [Client::Configuration]
62
+ #
63
+ def self.configure
64
+ @configure ||= begin
65
+ namespace = ["Google", "Cloud", "Compute", "V1"]
66
+ parent_config = while namespace.any?
67
+ parent_name = namespace.join "::"
68
+ parent_const = const_get parent_name
69
+ break parent_const.configure if parent_const.respond_to? :configure
70
+ namespace.pop
71
+ end
72
+ default_config = Client::Configuration.new parent_config
73
+
74
+ default_config.rpcs.cancel.timeout = 600.0
75
+
76
+ default_config.rpcs.delete.timeout = 600.0
77
+
78
+ default_config.rpcs.get.timeout = 600.0
79
+ default_config.rpcs.get.retry_policy = {
80
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
+ }
82
+
83
+ default_config.rpcs.insert.timeout = 600.0
84
+
85
+ default_config.rpcs.list.timeout = 600.0
86
+ default_config.rpcs.list.retry_policy = {
87
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
88
+ }
89
+
90
+ default_config
91
+ end
92
+ yield @configure if block_given?
93
+ @configure
94
+ end
95
+
96
+ ##
97
+ # Configure the RegionInstanceGroupManagerResizeRequests Client instance.
98
+ #
99
+ # The configuration is set to the derived mode, meaning that values can be changed,
100
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
101
+ # should be made on {Client.configure}.
102
+ #
103
+ # See {::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client::Configuration}
104
+ # for a description of the configuration fields.
105
+ #
106
+ # @yield [config] Configure the Client client.
107
+ # @yieldparam config [Client::Configuration]
108
+ #
109
+ # @return [Client::Configuration]
110
+ #
111
+ def configure
112
+ yield @config if block_given?
113
+ @config
114
+ end
115
+
116
+ ##
117
+ # The effective universe domain
118
+ #
119
+ # @return [String]
120
+ #
121
+ def universe_domain
122
+ @region_instance_group_manager_resize_requests_stub.universe_domain
123
+ end
124
+
125
+ ##
126
+ # Create a new RegionInstanceGroupManagerResizeRequests REST client object.
127
+ #
128
+ # @example
129
+ #
130
+ # # Create a client using the default configuration
131
+ # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.new
132
+ #
133
+ # # Create a client using a custom configuration
134
+ # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.new do |config|
135
+ # config.timeout = 10.0
136
+ # end
137
+ #
138
+ # @yield [config] Configure the RegionInstanceGroupManagerResizeRequests client.
139
+ # @yieldparam config [Client::Configuration]
140
+ #
141
+ def initialize
142
+ # Create the configuration object
143
+ @config = Configuration.new Client.configure
144
+
145
+ # Yield the configuration if needed
146
+ yield @config if block_given?
147
+
148
+ # Create credentials
149
+ credentials = @config.credentials
150
+ # Use self-signed JWT if the endpoint is unchanged from default,
151
+ # but only if the default endpoint does not have a region prefix.
152
+ enable_self_signed_jwt = @config.endpoint.nil? ||
153
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
+ !@config.endpoint.split(".").first.include?("-"))
155
+ credentials ||= Credentials.default scope: @config.scope,
156
+ enable_self_signed_jwt: enable_self_signed_jwt
157
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
158
+ credentials = Credentials.new credentials, scope: @config.scope
159
+ end
160
+
161
+ @quota_project_id = @config.quota_project
162
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
163
+
164
+ @region_operations = ::Google::Cloud::Compute::V1::RegionOperations::Rest::Client.new do |config|
165
+ config.credentials = credentials
166
+ config.quota_project = @quota_project_id
167
+ config.endpoint = @config.endpoint
168
+ config.universe_domain = @config.universe_domain
169
+ end
170
+
171
+ @region_instance_group_manager_resize_requests_stub = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::ServiceStub.new(
172
+ endpoint: @config.endpoint,
173
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
174
+ universe_domain: @config.universe_domain,
175
+ credentials: credentials,
176
+ logger: @config.logger
177
+ )
178
+
179
+ @region_instance_group_manager_resize_requests_stub.logger(stub: true)&.info do |entry|
180
+ entry.set_system_name
181
+ entry.set_service
182
+ entry.message = "Created client for #{entry.service}"
183
+ entry.set_credentials_fields credentials
184
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
185
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
186
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
187
+ end
188
+ end
189
+
190
+ ##
191
+ # Get the associated client for long-running operations via RegionOperations.
192
+ #
193
+ # @return [::Google::Cloud::Compute::V1::RegionOperations::Rest::Client]
194
+ #
195
+ attr_reader :region_operations
196
+
197
+ ##
198
+ # The logger used for request/response debug logging.
199
+ #
200
+ # @return [Logger]
201
+ #
202
+ def logger
203
+ @region_instance_group_manager_resize_requests_stub.logger
204
+ end
205
+
206
+ # Service calls
207
+
208
+ ##
209
+ # Cancels the specified resize request.
210
+ # Cancelled resize request no longer waits for the resources to be
211
+ # provisioned. Cancel is only possible for requests that are in accepted
212
+ # state.
213
+ #
214
+ # @overload cancel(request, options = nil)
215
+ # Pass arguments to `cancel` via a request object, either of type
216
+ # {::Google::Cloud::Compute::V1::CancelRegionInstanceGroupManagerResizeRequestRequest} or an equivalent Hash.
217
+ #
218
+ # @param request [::Google::Cloud::Compute::V1::CancelRegionInstanceGroupManagerResizeRequestRequest, ::Hash]
219
+ # A request object representing the call parameters. Required. To specify no
220
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
221
+ # @param options [::Gapic::CallOptions, ::Hash]
222
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
223
+ #
224
+ # @overload cancel(instance_group_manager: nil, project: nil, region: nil, request_id: nil, resize_request: nil)
225
+ # Pass arguments to `cancel` via keyword arguments. Note that at
226
+ # least one keyword argument is required. To specify no parameters, or to keep all
227
+ # the default parameter values, pass an empty Hash as a request object (see above).
228
+ #
229
+ # @param instance_group_manager [::String]
230
+ # The name of the managed instance group.
231
+ # Name should conform to RFC1035 or be a resource ID.
232
+ # @param project [::String]
233
+ # Project ID for this request.
234
+ # @param region [::String]
235
+ # The name of the region
236
+ # scoping this request. Name should conform to RFC1035.
237
+ # @param request_id [::String]
238
+ # An optional request ID to identify requests. Specify a unique request ID so
239
+ # that if you must retry your request, the server will know to ignore the
240
+ # request if it has already been completed.
241
+ #
242
+ # For example, consider a situation where you make an initial request and
243
+ # the request times out. If you make the request again with the same
244
+ # request ID, the server can check if original operation with the same
245
+ # request ID was received, and if so, will ignore the second request. This
246
+ # prevents clients from accidentally creating duplicate commitments.
247
+ #
248
+ # The request ID must be
249
+ # a valid UUID with the exception that zero UUID is not supported
250
+ # (00000000-0000-0000-0000-000000000000).
251
+ # @param resize_request [::String]
252
+ # The name of the resize request to cancel.
253
+ # Name should conform to RFC1035 or be a resource ID.
254
+ # @yield [result, operation] Access the result along with the TransportOperation object
255
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
256
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
257
+ #
258
+ # @return [::Gapic::GenericLRO::Operation]
259
+ #
260
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
261
+ #
262
+ # @example Basic example
263
+ # require "google/cloud/compute/v1"
264
+ #
265
+ # # Create a client object. The client can be reused for multiple calls.
266
+ # client = Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.new
267
+ #
268
+ # # Create a request. To set request fields, pass in keyword arguments.
269
+ # request = Google::Cloud::Compute::V1::CancelRegionInstanceGroupManagerResizeRequestRequest.new
270
+ #
271
+ # # Call the cancel method.
272
+ # result = client.cancel request
273
+ #
274
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
275
+ # p result
276
+ #
277
+ def cancel request, options = nil
278
+ raise ::ArgumentError, "request must be provided" if request.nil?
279
+
280
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CancelRegionInstanceGroupManagerResizeRequestRequest
281
+
282
+ # Converts hash and nil to an options object
283
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
284
+
285
+ # Customize the options with defaults
286
+ call_metadata = @config.rpcs.cancel.metadata.to_h
287
+
288
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
289
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
290
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
291
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
292
+ transports_version_send: [:rest]
293
+
294
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
295
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
296
+
297
+ options.apply_defaults timeout: @config.rpcs.cancel.timeout,
298
+ metadata: call_metadata,
299
+ retry_policy: @config.rpcs.cancel.retry_policy
300
+
301
+ options.apply_defaults timeout: @config.timeout,
302
+ metadata: @config.metadata,
303
+ retry_policy: @config.retry_policy
304
+
305
+ @region_instance_group_manager_resize_requests_stub.cancel request, options do |result, response|
306
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
307
+ operation: result,
308
+ client: region_operations,
309
+ request_values: {
310
+ "project" => request.project,
311
+ "region" => request.region
312
+ },
313
+ options: options
314
+ )
315
+ yield result, response if block_given?
316
+ throw :response, result
317
+ end
318
+ rescue ::Gapic::Rest::Error => e
319
+ raise ::Google::Cloud::Error.from_error(e)
320
+ end
321
+
322
+ ##
323
+ # Deletes the specified, inactive resize request. Requests that are still
324
+ # active cannot be deleted. Deleting request does not delete instances that
325
+ # were provisioned previously.
326
+ #
327
+ # @overload delete(request, options = nil)
328
+ # Pass arguments to `delete` via a request object, either of type
329
+ # {::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerResizeRequestRequest} or an equivalent Hash.
330
+ #
331
+ # @param request [::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerResizeRequestRequest, ::Hash]
332
+ # A request object representing the call parameters. Required. To specify no
333
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
334
+ # @param options [::Gapic::CallOptions, ::Hash]
335
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
336
+ #
337
+ # @overload delete(instance_group_manager: nil, project: nil, region: nil, request_id: nil, resize_request: nil)
338
+ # Pass arguments to `delete` via keyword arguments. Note that at
339
+ # least one keyword argument is required. To specify no parameters, or to keep all
340
+ # the default parameter values, pass an empty Hash as a request object (see above).
341
+ #
342
+ # @param instance_group_manager [::String]
343
+ # The name of the managed instance group.
344
+ # Name should conform to RFC1035 or be a resource ID.
345
+ # @param project [::String]
346
+ # Project ID for this request.
347
+ # @param region [::String]
348
+ # The name of the region
349
+ # scoping this request. Name should conform to RFC1035.
350
+ # @param request_id [::String]
351
+ # An optional request ID to identify requests. Specify a unique request ID so
352
+ # that if you must retry your request, the server will know to ignore the
353
+ # request if it has already been completed.
354
+ #
355
+ # For example, consider a situation where you make an initial request and
356
+ # the request times out. If you make the request again with the same
357
+ # request ID, the server can check if original operation with the same
358
+ # request ID was received, and if so, will ignore the second request. This
359
+ # prevents clients from accidentally creating duplicate commitments.
360
+ #
361
+ # The request ID must be
362
+ # a valid UUID with the exception that zero UUID is not supported
363
+ # (00000000-0000-0000-0000-000000000000).
364
+ # @param resize_request [::String]
365
+ # The name of the resize request to delete.
366
+ # Name should conform to RFC1035 or be a resource ID.
367
+ # @yield [result, operation] Access the result along with the TransportOperation object
368
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
369
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
370
+ #
371
+ # @return [::Gapic::GenericLRO::Operation]
372
+ #
373
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
374
+ #
375
+ # @example Basic example
376
+ # require "google/cloud/compute/v1"
377
+ #
378
+ # # Create a client object. The client can be reused for multiple calls.
379
+ # client = Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.new
380
+ #
381
+ # # Create a request. To set request fields, pass in keyword arguments.
382
+ # request = Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerResizeRequestRequest.new
383
+ #
384
+ # # Call the delete method.
385
+ # result = client.delete request
386
+ #
387
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
388
+ # p result
389
+ #
390
+ def delete request, options = nil
391
+ raise ::ArgumentError, "request must be provided" if request.nil?
392
+
393
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteRegionInstanceGroupManagerResizeRequestRequest
394
+
395
+ # Converts hash and nil to an options object
396
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
397
+
398
+ # Customize the options with defaults
399
+ call_metadata = @config.rpcs.delete.metadata.to_h
400
+
401
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
402
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
403
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
404
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
405
+ transports_version_send: [:rest]
406
+
407
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
408
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
409
+
410
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
411
+ metadata: call_metadata,
412
+ retry_policy: @config.rpcs.delete.retry_policy
413
+
414
+ options.apply_defaults timeout: @config.timeout,
415
+ metadata: @config.metadata,
416
+ retry_policy: @config.retry_policy
417
+
418
+ @region_instance_group_manager_resize_requests_stub.delete request, options do |result, response|
419
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
420
+ operation: result,
421
+ client: region_operations,
422
+ request_values: {
423
+ "project" => request.project,
424
+ "region" => request.region
425
+ },
426
+ options: options
427
+ )
428
+ yield result, response if block_given?
429
+ throw :response, result
430
+ end
431
+ rescue ::Gapic::Rest::Error => e
432
+ raise ::Google::Cloud::Error.from_error(e)
433
+ end
434
+
435
+ ##
436
+ # Returns all of the details about the specified resize request.
437
+ #
438
+ # @overload get(request, options = nil)
439
+ # Pass arguments to `get` via a request object, either of type
440
+ # {::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerResizeRequestRequest} or an equivalent Hash.
441
+ #
442
+ # @param request [::Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerResizeRequestRequest, ::Hash]
443
+ # A request object representing the call parameters. Required. To specify no
444
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
445
+ # @param options [::Gapic::CallOptions, ::Hash]
446
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
447
+ #
448
+ # @overload get(instance_group_manager: nil, project: nil, region: nil, resize_request: nil)
449
+ # Pass arguments to `get` via keyword arguments. Note that at
450
+ # least one keyword argument is required. To specify no parameters, or to keep all
451
+ # the default parameter values, pass an empty Hash as a request object (see above).
452
+ #
453
+ # @param instance_group_manager [::String]
454
+ # The name of the managed instance group.
455
+ # Name should conform to RFC1035 or be a resource ID.
456
+ # @param project [::String]
457
+ # Project ID for this request.
458
+ # @param region [::String]
459
+ # The name of the region
460
+ # scoping this request. Name should conform to RFC1035.
461
+ # @param resize_request [::String]
462
+ # The name of the resize request.
463
+ # Name should conform to RFC1035 or be a resource ID.
464
+ # @yield [result, operation] Access the result along with the TransportOperation object
465
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest]
466
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
467
+ #
468
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest]
469
+ #
470
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
471
+ #
472
+ # @example Basic example
473
+ # require "google/cloud/compute/v1"
474
+ #
475
+ # # Create a client object. The client can be reused for multiple calls.
476
+ # client = Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.new
477
+ #
478
+ # # Create a request. To set request fields, pass in keyword arguments.
479
+ # request = Google::Cloud::Compute::V1::GetRegionInstanceGroupManagerResizeRequestRequest.new
480
+ #
481
+ # # Call the get method.
482
+ # result = client.get request
483
+ #
484
+ # # The returned object is of type Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest.
485
+ # p result
486
+ #
487
+ def get 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::GetRegionInstanceGroupManagerResizeRequestRequest
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.get.metadata.to_h
497
+
498
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
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
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
505
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
+
507
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
508
+ metadata: call_metadata,
509
+ retry_policy: @config.rpcs.get.retry_policy
510
+
511
+ options.apply_defaults timeout: @config.timeout,
512
+ metadata: @config.metadata,
513
+ retry_policy: @config.retry_policy
514
+
515
+ @region_instance_group_manager_resize_requests_stub.get request, options do |result, operation|
516
+ yield result, operation if block_given?
517
+ end
518
+ rescue ::Gapic::Rest::Error => e
519
+ raise ::Google::Cloud::Error.from_error(e)
520
+ end
521
+
522
+ ##
523
+ # Creates a new Resize Request that starts provisioning VMs immediately
524
+ # or queues VM creation.
525
+ #
526
+ # @overload insert(request, options = nil)
527
+ # Pass arguments to `insert` via a request object, either of type
528
+ # {::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerResizeRequestRequest} or an equivalent Hash.
529
+ #
530
+ # @param request [::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerResizeRequestRequest, ::Hash]
531
+ # A request object representing the call parameters. Required. To specify no
532
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
533
+ # @param options [::Gapic::CallOptions, ::Hash]
534
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
535
+ #
536
+ # @overload insert(instance_group_manager: nil, instance_group_manager_resize_request_resource: nil, project: nil, region: nil, request_id: nil)
537
+ # Pass arguments to `insert` via keyword arguments. Note that at
538
+ # least one keyword argument is required. To specify no parameters, or to keep all
539
+ # the default parameter values, pass an empty Hash as a request object (see above).
540
+ #
541
+ # @param instance_group_manager [::String]
542
+ # Name of the managed instance group to which the resize request is scoped.
543
+ # Name should conform to RFC1035 or be a resource ID.
544
+ # @param instance_group_manager_resize_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest, ::Hash]
545
+ # The body resource for this request
546
+ # @param project [::String]
547
+ # Project ID for this request.
548
+ # @param region [::String]
549
+ # Name of the region
550
+ # scoping this request. Name should conform to RFC1035.
551
+ # @param request_id [::String]
552
+ # An optional request ID to identify requests. Specify a unique request ID so
553
+ # that if you must retry your request, the server will know to ignore the
554
+ # request if it has already been completed.
555
+ #
556
+ # For example, consider a situation where you make an initial request and
557
+ # the request times out. If you make the request again with the same
558
+ # request ID, the server can check if original operation with the same
559
+ # request ID was received, and if so, will ignore the second request. This
560
+ # prevents clients from accidentally creating duplicate commitments.
561
+ #
562
+ # The request ID must be
563
+ # a valid UUID with the exception that zero UUID is not supported
564
+ # (00000000-0000-0000-0000-000000000000).
565
+ # @yield [result, operation] Access the result along with the TransportOperation object
566
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
567
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
568
+ #
569
+ # @return [::Gapic::GenericLRO::Operation]
570
+ #
571
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
572
+ #
573
+ # @example Basic example
574
+ # require "google/cloud/compute/v1"
575
+ #
576
+ # # Create a client object. The client can be reused for multiple calls.
577
+ # client = Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.new
578
+ #
579
+ # # Create a request. To set request fields, pass in keyword arguments.
580
+ # request = Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerResizeRequestRequest.new
581
+ #
582
+ # # Call the insert method.
583
+ # result = client.insert request
584
+ #
585
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
586
+ # p result
587
+ #
588
+ def insert request, options = nil
589
+ raise ::ArgumentError, "request must be provided" if request.nil?
590
+
591
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertRegionInstanceGroupManagerResizeRequestRequest
592
+
593
+ # Converts hash and nil to an options object
594
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
595
+
596
+ # Customize the options with defaults
597
+ call_metadata = @config.rpcs.insert.metadata.to_h
598
+
599
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
600
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
601
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
602
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
603
+ transports_version_send: [:rest]
604
+
605
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
606
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
607
+
608
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
609
+ metadata: call_metadata,
610
+ retry_policy: @config.rpcs.insert.retry_policy
611
+
612
+ options.apply_defaults timeout: @config.timeout,
613
+ metadata: @config.metadata,
614
+ retry_policy: @config.retry_policy
615
+
616
+ @region_instance_group_manager_resize_requests_stub.insert request, options do |result, response|
617
+ result = ::Google::Cloud::Compute::V1::RegionOperations::Rest::NonstandardLro.create_operation(
618
+ operation: result,
619
+ client: region_operations,
620
+ request_values: {
621
+ "project" => request.project,
622
+ "region" => request.region
623
+ },
624
+ options: options
625
+ )
626
+ yield result, response if block_given?
627
+ throw :response, result
628
+ end
629
+ rescue ::Gapic::Rest::Error => e
630
+ raise ::Google::Cloud::Error.from_error(e)
631
+ end
632
+
633
+ ##
634
+ # Retrieves a list of Resize Requests that are contained in the
635
+ # managed instance group.
636
+ #
637
+ # @overload list(request, options = nil)
638
+ # Pass arguments to `list` via a request object, either of type
639
+ # {::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagerResizeRequestsRequest} or an equivalent Hash.
640
+ #
641
+ # @param request [::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagerResizeRequestsRequest, ::Hash]
642
+ # A request object representing the call parameters. Required. To specify no
643
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
644
+ # @param options [::Gapic::CallOptions, ::Hash]
645
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
646
+ #
647
+ # @overload list(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, region: nil, return_partial_success: nil)
648
+ # Pass arguments to `list` via keyword arguments. Note that at
649
+ # least one keyword argument is required. To specify no parameters, or to keep all
650
+ # the default parameter values, pass an empty Hash as a request object (see above).
651
+ #
652
+ # @param filter [::String]
653
+ # A filter expression that filters resources listed in the response. Most
654
+ # Compute resources support two types of filter expressions:
655
+ # expressions that support regular expressions and expressions that follow
656
+ # API improvement proposal AIP-160.
657
+ # These two types of filter expressions cannot be mixed in one request.
658
+ #
659
+ # If you want to use AIP-160, your expression must specify the field name, an
660
+ # operator, and the value that you want to use for filtering. The value
661
+ # must be a string, a number, or a boolean. The operator
662
+ # must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`.
663
+ #
664
+ # For example, if you are filtering Compute Engine instances, you can
665
+ # exclude instances named `example-instance` by specifying
666
+ # `name != example-instance`.
667
+ #
668
+ # The `:*` comparison can be used to test whether a key has been defined.
669
+ # For example, to find all objects with `owner` label use:
670
+ # ```
671
+ # labels.owner:*
672
+ # ```
673
+ #
674
+ # You can also filter nested fields. For example, you could specify
675
+ # `scheduling.automaticRestart = false` to include instances only
676
+ # if they are not scheduled for automatic restarts. You can use filtering
677
+ # on nested fields to filter based onresource labels.
678
+ #
679
+ # To filter on multiple expressions, provide each separate expression within
680
+ # parentheses. For example:
681
+ # ```
682
+ # (scheduling.automaticRestart = true)
683
+ # (cpuPlatform = "Intel Skylake")
684
+ # ```
685
+ # By default, each expression is an `AND` expression. However, you
686
+ # can include `AND` and `OR` expressions explicitly.
687
+ # For example:
688
+ # ```
689
+ # (cpuPlatform = "Intel Skylake") OR
690
+ # (cpuPlatform = "Intel Broadwell") AND
691
+ # (scheduling.automaticRestart = true)
692
+ # ```
693
+ #
694
+ # If you want to use a regular expression, use the `eq` (equal) or `ne`
695
+ # (not equal) operator against a single un-parenthesized expression with or
696
+ # without quotes or against multiple parenthesized expressions. Examples:
697
+ #
698
+ # `fieldname eq unquoted literal`
699
+ # `fieldname eq 'single quoted literal'`
700
+ # `fieldname eq "double quoted literal"`
701
+ # `(fieldname1 eq literal) (fieldname2 ne "literal")`
702
+ #
703
+ # The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
704
+ # The literal value must match the entire field.
705
+ #
706
+ # For example, to filter for instances that do not end with name "instance",
707
+ # you would use `name ne .*instance`.
708
+ #
709
+ # You cannot combine constraints on multiple fields using regular
710
+ # expressions.
711
+ # @param instance_group_manager [::String]
712
+ # The name of the managed instance group. The name should conform to RFC1035.
713
+ # @param max_results [::Integer]
714
+ # The maximum number of results per page that should be returned.
715
+ # If the number of available results is larger than `maxResults`,
716
+ # Compute Engine returns a `nextPageToken` that can be used to get
717
+ # the next page of results in subsequent list requests. Acceptable values are
718
+ # `0` to `500`, inclusive. (Default: `500`)
719
+ # @param order_by [::String]
720
+ # Sorts list results by a certain order. By default, results
721
+ # are returned in alphanumerical order based on the resource name.
722
+ #
723
+ # You can also sort results in descending order based on the creation
724
+ # timestamp using `orderBy="creationTimestamp desc"`. This sorts
725
+ # results based on the `creationTimestamp` field in
726
+ # reverse chronological order (newest result first). Use this to sort
727
+ # resources like operations so that the newest operation is returned first.
728
+ #
729
+ # Currently, only sorting by `name` or
730
+ # `creationTimestamp desc` is supported.
731
+ # @param page_token [::String]
732
+ # Specifies a page token to use. Set `pageToken` to the
733
+ # `nextPageToken` returned by a previous list request to get
734
+ # the next page of results.
735
+ # @param project [::String]
736
+ # Project ID for this request.
737
+ # @param region [::String]
738
+ # Name of the region
739
+ # scoping this request. Name should conform to RFC1035.
740
+ # @param return_partial_success [::Boolean]
741
+ # Opt-in for partial success behavior which provides partial results in case
742
+ # of failure. The default value is false.
743
+ #
744
+ # For example, when partial success behavior is enabled, aggregatedList for a
745
+ # single zone scope either returns all resources in the zone or no resources,
746
+ # with an error code.
747
+ # @yield [result, operation] Access the result along with the TransportOperation object
748
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest>]
749
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
750
+ #
751
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest>]
752
+ #
753
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
754
+ #
755
+ # @example Basic example
756
+ # require "google/cloud/compute/v1"
757
+ #
758
+ # # Create a client object. The client can be reused for multiple calls.
759
+ # client = Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.new
760
+ #
761
+ # # Create a request. To set request fields, pass in keyword arguments.
762
+ # request = Google::Cloud::Compute::V1::ListRegionInstanceGroupManagerResizeRequestsRequest.new
763
+ #
764
+ # # Call the list method.
765
+ # result = client.list request
766
+ #
767
+ # # The returned object is of type Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequestsListResponse.
768
+ # p result
769
+ #
770
+ def list request, options = nil
771
+ raise ::ArgumentError, "request must be provided" if request.nil?
772
+
773
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListRegionInstanceGroupManagerResizeRequestsRequest
774
+
775
+ # Converts hash and nil to an options object
776
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
777
+
778
+ # Customize the options with defaults
779
+ call_metadata = @config.rpcs.list.metadata.to_h
780
+
781
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
782
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
783
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
784
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
785
+ transports_version_send: [:rest]
786
+
787
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
788
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
789
+
790
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
791
+ metadata: call_metadata,
792
+ retry_policy: @config.rpcs.list.retry_policy
793
+
794
+ options.apply_defaults timeout: @config.timeout,
795
+ metadata: @config.metadata,
796
+ retry_policy: @config.retry_policy
797
+
798
+ @region_instance_group_manager_resize_requests_stub.list request, options do |result, operation|
799
+ result = ::Gapic::Rest::PagedEnumerable.new @region_instance_group_manager_resize_requests_stub, :list, "items", request, result, options
800
+ yield result, operation if block_given?
801
+ throw :response, result
802
+ end
803
+ rescue ::Gapic::Rest::Error => e
804
+ raise ::Google::Cloud::Error.from_error(e)
805
+ end
806
+
807
+ ##
808
+ # Configuration class for the RegionInstanceGroupManagerResizeRequests REST API.
809
+ #
810
+ # This class represents the configuration for RegionInstanceGroupManagerResizeRequests REST,
811
+ # providing control over timeouts, retry behavior, logging, transport
812
+ # parameters, and other low-level controls. Certain parameters can also be
813
+ # applied individually to specific RPCs. See
814
+ # {::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client::Configuration::Rpcs}
815
+ # for a list of RPCs that can be configured independently.
816
+ #
817
+ # Configuration can be applied globally to all clients, or to a single client
818
+ # on construction.
819
+ #
820
+ # @example
821
+ #
822
+ # # Modify the global config, setting the timeout for
823
+ # # cancel to 20 seconds,
824
+ # # and all remaining timeouts to 10 seconds.
825
+ # ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.configure do |config|
826
+ # config.timeout = 10.0
827
+ # config.rpcs.cancel.timeout = 20.0
828
+ # end
829
+ #
830
+ # # Apply the above configuration only to a new client.
831
+ # client = ::Google::Cloud::Compute::V1::RegionInstanceGroupManagerResizeRequests::Rest::Client.new do |config|
832
+ # config.timeout = 10.0
833
+ # config.rpcs.cancel.timeout = 20.0
834
+ # end
835
+ #
836
+ # @!attribute [rw] endpoint
837
+ # A custom service endpoint, as a hostname or hostname:port. The default is
838
+ # nil, indicating to use the default endpoint in the current universe domain.
839
+ # @return [::String,nil]
840
+ # @!attribute [rw] credentials
841
+ # Credentials to send with calls. You may provide any of the following types:
842
+ # * (`String`) The path to a service account key file in JSON format
843
+ # * (`Hash`) A service account key as a Hash
844
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
845
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
846
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
847
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
848
+ # * (`nil`) indicating no credentials
849
+ #
850
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
851
+ # external source for authentication to Google Cloud, you must validate it before
852
+ # providing it to a Google API client library. Providing an unvalidated credential
853
+ # configuration to Google APIs can compromise the security of your systems and data.
854
+ # For more information, refer to [Validate credential configurations from external
855
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
856
+ # @return [::Object]
857
+ # @!attribute [rw] scope
858
+ # The OAuth scopes
859
+ # @return [::Array<::String>]
860
+ # @!attribute [rw] lib_name
861
+ # The library name as recorded in instrumentation and logging
862
+ # @return [::String]
863
+ # @!attribute [rw] lib_version
864
+ # The library version as recorded in instrumentation and logging
865
+ # @return [::String]
866
+ # @!attribute [rw] timeout
867
+ # The call timeout in seconds.
868
+ # @return [::Numeric]
869
+ # @!attribute [rw] metadata
870
+ # Additional headers to be sent with the call.
871
+ # @return [::Hash{::Symbol=>::String}]
872
+ # @!attribute [rw] retry_policy
873
+ # The retry policy. The value is a hash with the following keys:
874
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
875
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
876
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
877
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
878
+ # trigger a retry.
879
+ # @return [::Hash]
880
+ # @!attribute [rw] quota_project
881
+ # A separate project against which to charge quota.
882
+ # @return [::String]
883
+ # @!attribute [rw] universe_domain
884
+ # The universe domain within which to make requests. This determines the
885
+ # default endpoint URL. The default value of nil uses the environment
886
+ # universe (usually the default "googleapis.com" universe).
887
+ # @return [::String,nil]
888
+ # @!attribute [rw] logger
889
+ # A custom logger to use for request/response debug logging, or the value
890
+ # `:default` (the default) to construct a default logger, or `nil` to
891
+ # explicitly disable logging.
892
+ # @return [::Logger,:default,nil]
893
+ #
894
+ class Configuration
895
+ extend ::Gapic::Config
896
+
897
+ # @private
898
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
899
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
900
+
901
+ config_attr :endpoint, nil, ::String, nil
902
+ config_attr :credentials, nil do |value|
903
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
904
+ allowed.any? { |klass| klass === value }
905
+ end
906
+ config_attr :scope, nil, ::String, ::Array, nil
907
+ config_attr :lib_name, nil, ::String, nil
908
+ config_attr :lib_version, nil, ::String, nil
909
+ config_attr :timeout, nil, ::Numeric, nil
910
+ config_attr :metadata, nil, ::Hash, nil
911
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
912
+ config_attr :quota_project, nil, ::String, nil
913
+ config_attr :universe_domain, nil, ::String, nil
914
+ config_attr :logger, :default, ::Logger, nil, :default
915
+
916
+ # @private
917
+ def initialize parent_config = nil
918
+ @parent_config = parent_config unless parent_config.nil?
919
+
920
+ yield self if block_given?
921
+ end
922
+
923
+ ##
924
+ # Configurations for individual RPCs
925
+ # @return [Rpcs]
926
+ #
927
+ def rpcs
928
+ @rpcs ||= begin
929
+ parent_rpcs = nil
930
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
931
+ Rpcs.new parent_rpcs
932
+ end
933
+ end
934
+
935
+ ##
936
+ # Configuration RPC class for the RegionInstanceGroupManagerResizeRequests API.
937
+ #
938
+ # Includes fields providing the configuration for each RPC in this service.
939
+ # Each configuration object is of type `Gapic::Config::Method` and includes
940
+ # the following configuration fields:
941
+ #
942
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
943
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
944
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
945
+ # include the following keys:
946
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
947
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
948
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
949
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
950
+ # trigger a retry.
951
+ #
952
+ class Rpcs
953
+ ##
954
+ # RPC-specific configuration for `cancel`
955
+ # @return [::Gapic::Config::Method]
956
+ #
957
+ attr_reader :cancel
958
+ ##
959
+ # RPC-specific configuration for `delete`
960
+ # @return [::Gapic::Config::Method]
961
+ #
962
+ attr_reader :delete
963
+ ##
964
+ # RPC-specific configuration for `get`
965
+ # @return [::Gapic::Config::Method]
966
+ #
967
+ attr_reader :get
968
+ ##
969
+ # RPC-specific configuration for `insert`
970
+ # @return [::Gapic::Config::Method]
971
+ #
972
+ attr_reader :insert
973
+ ##
974
+ # RPC-specific configuration for `list`
975
+ # @return [::Gapic::Config::Method]
976
+ #
977
+ attr_reader :list
978
+
979
+ # @private
980
+ def initialize parent_rpcs = nil
981
+ cancel_config = parent_rpcs.cancel if parent_rpcs.respond_to? :cancel
982
+ @cancel = ::Gapic::Config::Method.new cancel_config
983
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
984
+ @delete = ::Gapic::Config::Method.new delete_config
985
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
986
+ @get = ::Gapic::Config::Method.new get_config
987
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
988
+ @insert = ::Gapic::Config::Method.new insert_config
989
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
990
+ @list = ::Gapic::Config::Method.new list_config
991
+
992
+ yield self if block_given?
993
+ end
994
+ end
995
+ end
996
+ end
997
+ end
998
+ end
999
+ end
1000
+ end
1001
+ end
1002
+ end