google-cloud-compute-v1 2.9.0 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +3 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +3 -3
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +3 -3
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +1 -1
  6. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +4 -4
  7. data/lib/google/cloud/compute/v1/compute_pb.rb +82 -1
  8. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +3 -3
  9. data/lib/google/cloud/compute/v1/disks/rest/client.rb +3 -3
  10. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +1 -1
  11. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +1 -1
  12. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +1 -1
  13. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +3 -3
  14. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +1 -1
  15. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +1 -1
  16. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +2 -2
  17. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +3 -3
  18. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +1 -1
  19. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +1 -1
  20. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +3 -3
  21. data/lib/google/cloud/compute/v1/images/rest/client.rb +1 -1
  22. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/credentials.rb +52 -0
  23. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +829 -0
  24. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/service_stub.rb +378 -0
  25. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest.rb +51 -0
  26. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests.rb +47 -0
  27. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +6 -6
  28. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +4 -4
  29. data/lib/google/cloud/compute/v1/instance_settings_service/credentials.rb +52 -0
  30. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +512 -0
  31. data/lib/google/cloud/compute/v1/instance_settings_service/rest/service_stub.rb +190 -0
  32. data/lib/google/cloud/compute/v1/instance_settings_service/rest.rb +51 -0
  33. data/lib/google/cloud/compute/v1/instance_settings_service.rb +47 -0
  34. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +3 -3
  35. data/lib/google/cloud/compute/v1/instances/rest/client.rb +4 -4
  36. data/lib/google/cloud/compute/v1/instant_snapshots/credentials.rb +52 -0
  37. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +1208 -0
  38. data/lib/google/cloud/compute/v1/instant_snapshots/rest/service_stub.rb +618 -0
  39. data/lib/google/cloud/compute/v1/instant_snapshots/rest.rb +51 -0
  40. data/lib/google/cloud/compute/v1/instant_snapshots.rb +47 -0
  41. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +3 -3
  42. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +1 -1
  43. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +1 -1
  44. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +1 -1
  45. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +1 -1
  46. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +1 -1
  47. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +3 -3
  48. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +3 -3
  49. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +2 -2
  50. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +4 -4
  51. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +1 -1
  52. data/lib/google/cloud/compute/v1/networks/rest/client.rb +2 -2
  53. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +108 -4
  54. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +62 -0
  55. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +3 -3
  56. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +3 -3
  57. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +3 -3
  58. data/lib/google/cloud/compute/v1/projects/rest/client.rb +101 -2
  59. data/lib/google/cloud/compute/v1/projects/rest/service_stub.rb +60 -0
  60. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +1 -1
  61. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +3 -3
  62. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +1 -1
  63. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +2 -2
  64. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +3 -3
  65. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +1 -1
  66. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +1 -1
  67. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +1 -1
  68. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +1 -1
  69. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +4 -4
  70. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +2 -2
  71. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +1 -1
  72. data/lib/google/cloud/compute/v1/region_instant_snapshots/credentials.rb +52 -0
  73. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +1103 -0
  74. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/service_stub.rb +559 -0
  75. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest.rb +51 -0
  76. data/lib/google/cloud/compute/v1/region_instant_snapshots.rb +47 -0
  77. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +2 -2
  78. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +1 -1
  79. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +1 -1
  80. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +1 -1
  81. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +1 -1
  82. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +1 -1
  83. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +2 -2
  84. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +1 -1
  85. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +1 -1
  86. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +1 -1
  87. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +1 -1
  88. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +1 -1
  89. data/lib/google/cloud/compute/v1/regions/rest/client.rb +1 -1
  90. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +3 -3
  91. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +3 -3
  92. data/lib/google/cloud/compute/v1/rest.rb +6 -0
  93. data/lib/google/cloud/compute/v1/routers/rest/client.rb +4 -4
  94. data/lib/google/cloud/compute/v1/routes/rest/client.rb +1 -1
  95. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +4 -4
  96. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +3 -3
  97. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +1 -1
  98. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +3 -3
  99. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +4 -4
  100. data/lib/google/cloud/compute/v1/storage_pool_types/credentials.rb +53 -0
  101. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +603 -0
  102. data/lib/google/cloud/compute/v1/storage_pool_types/rest/service_stub.rb +249 -0
  103. data/lib/google/cloud/compute/v1/storage_pool_types/rest.rb +51 -0
  104. data/lib/google/cloud/compute/v1/storage_pool_types.rb +47 -0
  105. data/lib/google/cloud/compute/v1/storage_pools/credentials.rb +52 -0
  106. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +1313 -0
  107. data/lib/google/cloud/compute/v1/storage_pools/rest/service_stub.rb +679 -0
  108. data/lib/google/cloud/compute/v1/storage_pools/rest.rb +51 -0
  109. data/lib/google/cloud/compute/v1/storage_pools.rb +47 -0
  110. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +4 -4
  111. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +1 -1
  112. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +3 -3
  113. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +3 -3
  114. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +3 -3
  115. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +3 -3
  116. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +1 -1
  117. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +3 -3
  118. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +3 -3
  119. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +3 -3
  120. data/lib/google/cloud/compute/v1/version.rb +1 -1
  121. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +3 -3
  122. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +3 -3
  123. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +1 -1
  124. data/lib/google/cloud/compute/v1/zones/rest/client.rb +1 -1
  125. data/lib/google/cloud/compute/v1.rb +6 -0
  126. data/proto_docs/google/api/client.rb +4 -0
  127. data/proto_docs/google/cloud/compute/v1/compute.rb +2128 -182
  128. metadata +32 -2
@@ -0,0 +1,378 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/compute/v1/compute_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module InstanceGroupManagerResizeRequests
26
+ module Rest
27
+ ##
28
+ # REST service stub for the InstanceGroupManagerResizeRequests service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint,
39
+ endpoint_template: endpoint_template,
40
+ universe_domain: universe_domain,
41
+ credentials: credentials,
42
+ numeric_enums: false,
43
+ raise_faraday_errors: false
44
+ end
45
+
46
+ ##
47
+ # The effective universe domain
48
+ #
49
+ # @return [String]
50
+ #
51
+ def universe_domain
52
+ @client_stub.universe_domain
53
+ end
54
+
55
+ ##
56
+ # The effective endpoint
57
+ #
58
+ # @return [String]
59
+ #
60
+ def endpoint
61
+ @client_stub.endpoint
62
+ end
63
+
64
+ ##
65
+ # Baseline implementation for the cancel REST call
66
+ #
67
+ # @param request_pb [::Google::Cloud::Compute::V1::CancelInstanceGroupManagerResizeRequestRequest]
68
+ # A request object representing the call parameters. Required.
69
+ # @param options [::Gapic::CallOptions]
70
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
71
+ #
72
+ # @yield [result, operation] Access the result along with the TransportOperation object
73
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
74
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
75
+ #
76
+ # @return [::Google::Cloud::Compute::V1::Operation]
77
+ # A result object deserialized from the server's reply
78
+ def cancel request_pb, options = nil
79
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
80
+
81
+ verb, uri, query_string_params, body = ServiceStub.transcode_cancel_request request_pb
82
+ query_string_params = if query_string_params.any?
83
+ query_string_params.to_h { |p| p.split "=", 2 }
84
+ else
85
+ {}
86
+ end
87
+
88
+ response = @client_stub.make_http_request(
89
+ verb,
90
+ uri: uri,
91
+ body: body || "",
92
+ params: query_string_params,
93
+ options: options
94
+ )
95
+ operation = ::Gapic::Rest::TransportOperation.new response
96
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
97
+
98
+ yield result, operation if block_given?
99
+ result
100
+ end
101
+
102
+ ##
103
+ # Baseline implementation for the delete REST call
104
+ #
105
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerResizeRequestRequest]
106
+ # A request object representing the call parameters. Required.
107
+ # @param options [::Gapic::CallOptions]
108
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
109
+ #
110
+ # @yield [result, operation] Access the result along with the TransportOperation object
111
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
112
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
113
+ #
114
+ # @return [::Google::Cloud::Compute::V1::Operation]
115
+ # A result object deserialized from the server's reply
116
+ def delete request_pb, options = nil
117
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
118
+
119
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_request request_pb
120
+ query_string_params = if query_string_params.any?
121
+ query_string_params.to_h { |p| p.split "=", 2 }
122
+ else
123
+ {}
124
+ end
125
+
126
+ response = @client_stub.make_http_request(
127
+ verb,
128
+ uri: uri,
129
+ body: body || "",
130
+ params: query_string_params,
131
+ options: options
132
+ )
133
+ operation = ::Gapic::Rest::TransportOperation.new response
134
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
135
+
136
+ yield result, operation if block_given?
137
+ result
138
+ end
139
+
140
+ ##
141
+ # Baseline implementation for the get REST call
142
+ #
143
+ # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceGroupManagerResizeRequestRequest]
144
+ # A request object representing the call parameters. Required.
145
+ # @param options [::Gapic::CallOptions]
146
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
147
+ #
148
+ # @yield [result, operation] Access the result along with the TransportOperation object
149
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest]
150
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
151
+ #
152
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest]
153
+ # A result object deserialized from the server's reply
154
+ def get request_pb, options = nil
155
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
156
+
157
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_request request_pb
158
+ query_string_params = if query_string_params.any?
159
+ query_string_params.to_h { |p| p.split "=", 2 }
160
+ else
161
+ {}
162
+ end
163
+
164
+ response = @client_stub.make_http_request(
165
+ verb,
166
+ uri: uri,
167
+ body: body || "",
168
+ params: query_string_params,
169
+ options: options
170
+ )
171
+ operation = ::Gapic::Rest::TransportOperation.new response
172
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest.decode_json response.body, ignore_unknown_fields: true
173
+
174
+ yield result, operation if block_given?
175
+ result
176
+ end
177
+
178
+ ##
179
+ # Baseline implementation for the insert REST call
180
+ #
181
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceGroupManagerResizeRequestRequest]
182
+ # A request object representing the call parameters. Required.
183
+ # @param options [::Gapic::CallOptions]
184
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
185
+ #
186
+ # @yield [result, operation] Access the result along with the TransportOperation object
187
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
188
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
189
+ #
190
+ # @return [::Google::Cloud::Compute::V1::Operation]
191
+ # A result object deserialized from the server's reply
192
+ def insert request_pb, options = nil
193
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
194
+
195
+ verb, uri, query_string_params, body = ServiceStub.transcode_insert_request request_pb
196
+ query_string_params = if query_string_params.any?
197
+ query_string_params.to_h { |p| p.split "=", 2 }
198
+ else
199
+ {}
200
+ end
201
+
202
+ response = @client_stub.make_http_request(
203
+ verb,
204
+ uri: uri,
205
+ body: body || "",
206
+ params: query_string_params,
207
+ options: options
208
+ )
209
+ operation = ::Gapic::Rest::TransportOperation.new response
210
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
211
+
212
+ yield result, operation if block_given?
213
+ result
214
+ end
215
+
216
+ ##
217
+ # Baseline implementation for the list REST call
218
+ #
219
+ # @param request_pb [::Google::Cloud::Compute::V1::ListInstanceGroupManagerResizeRequestsRequest]
220
+ # A request object representing the call parameters. Required.
221
+ # @param options [::Gapic::CallOptions]
222
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
223
+ #
224
+ # @yield [result, operation] Access the result along with the TransportOperation object
225
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequestsListResponse]
226
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
227
+ #
228
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequestsListResponse]
229
+ # A result object deserialized from the server's reply
230
+ def list request_pb, options = nil
231
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
232
+
233
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_request request_pb
234
+ query_string_params = if query_string_params.any?
235
+ query_string_params.to_h { |p| p.split "=", 2 }
236
+ else
237
+ {}
238
+ end
239
+
240
+ response = @client_stub.make_http_request(
241
+ verb,
242
+ uri: uri,
243
+ body: body || "",
244
+ params: query_string_params,
245
+ options: options
246
+ )
247
+ operation = ::Gapic::Rest::TransportOperation.new response
248
+ result = ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequestsListResponse.decode_json response.body, ignore_unknown_fields: true
249
+
250
+ yield result, operation if block_given?
251
+ result
252
+ end
253
+
254
+ ##
255
+ # @private
256
+ #
257
+ # GRPC transcoding helper method for the cancel REST call
258
+ #
259
+ # @param request_pb [::Google::Cloud::Compute::V1::CancelInstanceGroupManagerResizeRequestRequest]
260
+ # A request object representing the call parameters. Required.
261
+ # @return [Array(String, [String, nil], Hash{String => String})]
262
+ # Uri, Body, Query string parameters
263
+ def self.transcode_cancel_request request_pb
264
+ transcoder = Gapic::Rest::GrpcTranscoder.new
265
+ .with_bindings(
266
+ uri_method: :post,
267
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}/cancel",
268
+ matches: [
269
+ ["project", %r{^[^/]+/?$}, false],
270
+ ["zone", %r{^[^/]+/?$}, false],
271
+ ["instance_group_manager", %r{^[^/]+/?$}, false],
272
+ ["resize_request", %r{^[^/]+/?$}, false]
273
+ ]
274
+ )
275
+ transcoder.transcode request_pb
276
+ end
277
+
278
+ ##
279
+ # @private
280
+ #
281
+ # GRPC transcoding helper method for the delete REST call
282
+ #
283
+ # @param request_pb [::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerResizeRequestRequest]
284
+ # A request object representing the call parameters. Required.
285
+ # @return [Array(String, [String, nil], Hash{String => String})]
286
+ # Uri, Body, Query string parameters
287
+ def self.transcode_delete_request request_pb
288
+ transcoder = Gapic::Rest::GrpcTranscoder.new
289
+ .with_bindings(
290
+ uri_method: :delete,
291
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}",
292
+ matches: [
293
+ ["project", %r{^[^/]+/?$}, false],
294
+ ["zone", %r{^[^/]+/?$}, false],
295
+ ["instance_group_manager", %r{^[^/]+/?$}, false],
296
+ ["resize_request", %r{^[^/]+/?$}, false]
297
+ ]
298
+ )
299
+ transcoder.transcode request_pb
300
+ end
301
+
302
+ ##
303
+ # @private
304
+ #
305
+ # GRPC transcoding helper method for the get REST call
306
+ #
307
+ # @param request_pb [::Google::Cloud::Compute::V1::GetInstanceGroupManagerResizeRequestRequest]
308
+ # A request object representing the call parameters. Required.
309
+ # @return [Array(String, [String, nil], Hash{String => String})]
310
+ # Uri, Body, Query string parameters
311
+ def self.transcode_get_request request_pb
312
+ transcoder = Gapic::Rest::GrpcTranscoder.new
313
+ .with_bindings(
314
+ uri_method: :get,
315
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}",
316
+ matches: [
317
+ ["project", %r{^[^/]+/?$}, false],
318
+ ["zone", %r{^[^/]+/?$}, false],
319
+ ["instance_group_manager", %r{^[^/]+/?$}, false],
320
+ ["resize_request", %r{^[^/]+/?$}, false]
321
+ ]
322
+ )
323
+ transcoder.transcode request_pb
324
+ end
325
+
326
+ ##
327
+ # @private
328
+ #
329
+ # GRPC transcoding helper method for the insert REST call
330
+ #
331
+ # @param request_pb [::Google::Cloud::Compute::V1::InsertInstanceGroupManagerResizeRequestRequest]
332
+ # A request object representing the call parameters. Required.
333
+ # @return [Array(String, [String, nil], Hash{String => String})]
334
+ # Uri, Body, Query string parameters
335
+ def self.transcode_insert_request request_pb
336
+ transcoder = Gapic::Rest::GrpcTranscoder.new
337
+ .with_bindings(
338
+ uri_method: :post,
339
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests",
340
+ body: "instance_group_manager_resize_request_resource",
341
+ matches: [
342
+ ["project", %r{^[^/]+/?$}, false],
343
+ ["zone", %r{^[^/]+/?$}, false],
344
+ ["instance_group_manager", %r{^[^/]+/?$}, false]
345
+ ]
346
+ )
347
+ transcoder.transcode request_pb
348
+ end
349
+
350
+ ##
351
+ # @private
352
+ #
353
+ # GRPC transcoding helper method for the list REST call
354
+ #
355
+ # @param request_pb [::Google::Cloud::Compute::V1::ListInstanceGroupManagerResizeRequestsRequest]
356
+ # A request object representing the call parameters. Required.
357
+ # @return [Array(String, [String, nil], Hash{String => String})]
358
+ # Uri, Body, Query string parameters
359
+ def self.transcode_list_request request_pb
360
+ transcoder = Gapic::Rest::GrpcTranscoder.new
361
+ .with_bindings(
362
+ uri_method: :get,
363
+ uri_template: "/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests",
364
+ matches: [
365
+ ["project", %r{^[^/]+/?$}, false],
366
+ ["zone", %r{^[^/]+/?$}, false],
367
+ ["instance_group_manager", %r{^[^/]+/?$}, false]
368
+ ]
369
+ )
370
+ transcoder.transcode request_pb
371
+ end
372
+ end
373
+ end
374
+ end
375
+ end
376
+ end
377
+ end
378
+ end
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 "gapic/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/compute/v1/version"
24
+
25
+ require "google/cloud/compute/v1/instance_group_manager_resize_requests/credentials"
26
+ require "google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client"
27
+
28
+ module Google
29
+ module Cloud
30
+ module Compute
31
+ module V1
32
+ ##
33
+ # The InstanceGroupManagerResizeRequests API.
34
+ #
35
+ # To load this service and instantiate a REST client:
36
+ #
37
+ # require "google/cloud/compute/v1/instance_group_manager_resize_requests/rest"
38
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new
39
+ #
40
+ module InstanceGroupManagerResizeRequests
41
+ # Client for the REST transport
42
+ module Rest
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+
50
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
51
+ require "google/cloud/compute/v1/instance_group_manager_resize_requests/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 "gapic/config"
20
+ require "gapic/config/method"
21
+
22
+ require "google/cloud/compute/v1/version"
23
+
24
+ require "google/cloud/compute/v1/instance_group_manager_resize_requests/credentials"
25
+ require "google/cloud/compute/v1/instance_group_manager_resize_requests/rest"
26
+
27
+ module Google
28
+ module Cloud
29
+ module Compute
30
+ module V1
31
+ ##
32
+ # The InstanceGroupManagerResizeRequests API.
33
+ #
34
+ # @example Load this service and instantiate a REST client
35
+ #
36
+ # require "google/cloud/compute/v1/instance_group_manager_resize_requests/rest"
37
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new
38
+ #
39
+ module InstanceGroupManagerResizeRequests
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+
46
+ helper_path = ::File.join __dir__, "instance_group_manager_resize_requests", "helpers.rb"
47
+ require "google/cloud/compute/v1/instance_group_manager_resize_requests/helpers" if ::File.file? helper_path
@@ -314,7 +314,7 @@ module Google
314
314
  end
315
315
 
316
316
  ##
317
- # Retrieves the list of managed instance groups and groups them by zone.
317
+ # Retrieves the list of managed instance groups and groups them by zone. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
318
318
  #
319
319
  # @overload aggregated_list(request, options = nil)
320
320
  # Pass arguments to `aggregated_list` via a request object, either of type
@@ -344,7 +344,7 @@ module Google
344
344
  # @param project [::String]
345
345
  # Project ID for this request.
346
346
  # @param return_partial_success [::Boolean]
347
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
347
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
348
348
  # @param service_project_number [::Integer]
349
349
  # The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api.
350
350
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1079,7 +1079,7 @@ module Google
1079
1079
  # @param project [::String]
1080
1080
  # Project ID for this request.
1081
1081
  # @param return_partial_success [::Boolean]
1082
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1082
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
1083
1083
  # @param zone [::String]
1084
1084
  # The name of the zone where the managed instance group is located.
1085
1085
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1172,7 +1172,7 @@ module Google
1172
1172
  # @param project [::String]
1173
1173
  # Project ID for this request.
1174
1174
  # @param return_partial_success [::Boolean]
1175
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1175
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
1176
1176
  # @param zone [::String]
1177
1177
  # The name of the zone where the managed instance group is located. It should conform to RFC1035.
1178
1178
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1265,7 +1265,7 @@ module Google
1265
1265
  # @param project [::String]
1266
1266
  # Project ID for this request.
1267
1267
  # @param return_partial_success [::Boolean]
1268
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1268
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
1269
1269
  # @param zone [::String]
1270
1270
  # The name of the zone where the managed instance group is located.
1271
1271
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -1358,7 +1358,7 @@ module Google
1358
1358
  # @param project [::String]
1359
1359
  # Project ID for this request.
1360
1360
  # @param return_partial_success [::Boolean]
1361
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
1361
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
1362
1362
  # @param zone [::String]
1363
1363
  # The name of the zone where the managed instance group is located. It should conform to RFC1035.
1364
1364
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -289,7 +289,7 @@ module Google
289
289
  end
290
290
 
291
291
  ##
292
- # Retrieves the list of instance groups and sorts them by zone.
292
+ # Retrieves the list of instance groups and sorts them by zone. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`.
293
293
  #
294
294
  # @overload aggregated_list(request, options = nil)
295
295
  # Pass arguments to `aggregated_list` via a request object, either of type
@@ -319,7 +319,7 @@ module Google
319
319
  # @param project [::String]
320
320
  # Project ID for this request.
321
321
  # @param return_partial_success [::Boolean]
322
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
322
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
323
323
  # @param service_project_number [::Integer]
324
324
  # The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api.
325
325
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -678,7 +678,7 @@ module Google
678
678
  # @param project [::String]
679
679
  # Project ID for this request.
680
680
  # @param return_partial_success [::Boolean]
681
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
681
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
682
682
  # @param zone [::String]
683
683
  # The name of the zone where the instance group is located.
684
684
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -773,7 +773,7 @@ module Google
773
773
  # @param project [::String]
774
774
  # Project ID for this request.
775
775
  # @param return_partial_success [::Boolean]
776
- # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false.
776
+ # Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.
777
777
  # @param zone [::String]
778
778
  # The name of the zone where the instance group is located.
779
779
  # @yield [result, operation] Access the result along with the TransportOperation object
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module InstanceSettingsService
26
+ # Credentials for the InstanceSettingsService API.
27
+ class Credentials < ::Google::Auth::Credentials
28
+ self.scope = [
29
+ "https://www.googleapis.com/auth/compute",
30
+ "https://www.googleapis.com/auth/cloud-platform"
31
+ ]
32
+ self.env_vars = [
33
+ "COMPUTE_CREDENTIALS",
34
+ "COMPUTE_KEYFILE",
35
+ "GOOGLE_CLOUD_CREDENTIALS",
36
+ "GOOGLE_CLOUD_KEYFILE",
37
+ "GCLOUD_KEYFILE",
38
+ "COMPUTE_CREDENTIALS_JSON",
39
+ "COMPUTE_KEYFILE_JSON",
40
+ "GOOGLE_CLOUD_CREDENTIALS_JSON",
41
+ "GOOGLE_CLOUD_KEYFILE_JSON",
42
+ "GCLOUD_KEYFILE_JSON"
43
+ ]
44
+ self.paths = [
45
+ "~/.config/google_cloud/application_default_credentials.json"
46
+ ]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end