google-cloud-compute-v1 2.10.0 → 2.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/accelerator_types/rest/client.rb +9 -3
  3. data/lib/google/cloud/compute/v1/addresses/rest/client.rb +17 -7
  4. data/lib/google/cloud/compute/v1/autoscalers/rest/client.rb +17 -7
  5. data/lib/google/cloud/compute/v1/backend_buckets/rest/client.rb +27 -12
  6. data/lib/google/cloud/compute/v1/backend_services/rest/client.rb +35 -16
  7. data/lib/google/cloud/compute/v1/compute_pb.rb +51 -1
  8. data/lib/google/cloud/compute/v1/disk_types/rest/client.rb +9 -3
  9. data/lib/google/cloud/compute/v1/disks/rest/client.rb +39 -18
  10. data/lib/google/cloud/compute/v1/external_vpn_gateways/rest/client.rb +15 -6
  11. data/lib/google/cloud/compute/v1/firewall_policies/rest/client.rb +39 -18
  12. data/lib/google/cloud/compute/v1/firewalls/rest/client.rb +15 -6
  13. data/lib/google/cloud/compute/v1/forwarding_rules/rest/client.rb +19 -8
  14. data/lib/google/cloud/compute/v1/global_addresses/rest/client.rb +15 -6
  15. data/lib/google/cloud/compute/v1/global_forwarding_rules/rest/client.rb +17 -7
  16. data/lib/google/cloud/compute/v1/global_network_endpoint_groups/rest/client.rb +17 -7
  17. data/lib/google/cloud/compute/v1/global_operations/rest/client.rb +13 -5
  18. data/lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb +9 -3
  19. data/lib/google/cloud/compute/v1/global_public_delegated_prefixes/rest/client.rb +13 -5
  20. data/lib/google/cloud/compute/v1/health_checks/rest/client.rb +17 -7
  21. data/lib/google/cloud/compute/v1/image_family_views/rest/client.rb +5 -1
  22. data/lib/google/cloud/compute/v1/images/rest/client.rb +25 -11
  23. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/credentials.rb +52 -0
  24. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/client.rb +837 -0
  25. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest/service_stub.rb +378 -0
  26. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests/rest.rb +51 -0
  27. data/lib/google/cloud/compute/v1/instance_group_manager_resize_requests.rb +47 -0
  28. data/lib/google/cloud/compute/v1/instance_group_managers/rest/client.rb +43 -20
  29. data/lib/google/cloud/compute/v1/instance_groups/rest/client.rb +21 -9
  30. data/lib/google/cloud/compute/v1/instance_settings_service/credentials.rb +52 -0
  31. data/lib/google/cloud/compute/v1/instance_settings_service/rest/client.rb +517 -0
  32. data/lib/google/cloud/compute/v1/instance_settings_service/rest/service_stub.rb +190 -0
  33. data/lib/google/cloud/compute/v1/instance_settings_service/rest.rb +51 -0
  34. data/lib/google/cloud/compute/v1/instance_settings_service.rb +47 -0
  35. data/lib/google/cloud/compute/v1/instance_templates/rest/client.rb +19 -8
  36. data/lib/google/cloud/compute/v1/instances/rest/client.rb +99 -48
  37. data/lib/google/cloud/compute/v1/instant_snapshots/rest/client.rb +21 -9
  38. data/lib/google/cloud/compute/v1/interconnect_attachments/rest/client.rb +17 -7
  39. data/lib/google/cloud/compute/v1/interconnect_locations/rest/client.rb +7 -2
  40. data/lib/google/cloud/compute/v1/interconnect_remote_locations/rest/client.rb +7 -2
  41. data/lib/google/cloud/compute/v1/interconnects/rest/client.rb +19 -8
  42. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +7 -2
  43. data/lib/google/cloud/compute/v1/licenses/rest/client.rb +17 -7
  44. data/lib/google/cloud/compute/v1/machine_images/rest/client.rb +17 -7
  45. data/lib/google/cloud/compute/v1/machine_types/rest/client.rb +9 -3
  46. data/lib/google/cloud/compute/v1/network_attachments/rest/client.rb +21 -9
  47. data/lib/google/cloud/compute/v1/network_edge_security_services/rest/client.rb +13 -5
  48. data/lib/google/cloud/compute/v1/network_endpoint_groups/rest/client.rb +21 -9
  49. data/lib/google/cloud/compute/v1/network_firewall_policies/rest/client.rb +35 -16
  50. data/lib/google/cloud/compute/v1/networks/rest/client.rb +25 -11
  51. data/lib/google/cloud/compute/v1/node_groups/rest/client.rb +136 -14
  52. data/lib/google/cloud/compute/v1/node_groups/rest/service_stub.rb +62 -0
  53. data/lib/google/cloud/compute/v1/node_templates/rest/client.rb +19 -8
  54. data/lib/google/cloud/compute/v1/node_types/rest/client.rb +9 -3
  55. data/lib/google/cloud/compute/v1/packet_mirrorings/rest/client.rb +17 -7
  56. data/lib/google/cloud/compute/v1/projects/rest/client.rb +31 -14
  57. data/lib/google/cloud/compute/v1/public_advertised_prefixes/rest/client.rb +17 -7
  58. data/lib/google/cloud/compute/v1/public_delegated_prefixes/rest/client.rb +19 -8
  59. data/lib/google/cloud/compute/v1/region_autoscalers/rest/client.rb +15 -6
  60. data/lib/google/cloud/compute/v1/region_backend_services/rest/client.rb +27 -12
  61. data/lib/google/cloud/compute/v1/region_commitments/rest/client.rb +13 -5
  62. data/lib/google/cloud/compute/v1/region_disk_types/rest/client.rb +7 -2
  63. data/lib/google/cloud/compute/v1/region_disks/rest/client.rb +37 -17
  64. data/lib/google/cloud/compute/v1/region_health_check_services/rest/client.rb +13 -5
  65. data/lib/google/cloud/compute/v1/region_health_checks/rest/client.rb +15 -6
  66. data/lib/google/cloud/compute/v1/region_instance_group_managers/rest/client.rb +41 -19
  67. data/lib/google/cloud/compute/v1/region_instance_groups/rest/client.rb +11 -4
  68. data/lib/google/cloud/compute/v1/region_instance_templates/rest/client.rb +11 -4
  69. data/lib/google/cloud/compute/v1/region_instances/rest/client.rb +5 -1
  70. data/lib/google/cloud/compute/v1/region_instant_snapshots/rest/client.rb +19 -8
  71. data/lib/google/cloud/compute/v1/region_network_endpoint_groups/rest/client.rb +17 -7
  72. data/lib/google/cloud/compute/v1/region_network_firewall_policies/rest/client.rb +37 -17
  73. data/lib/google/cloud/compute/v1/region_notification_endpoints/rest/client.rb +11 -4
  74. data/lib/google/cloud/compute/v1/region_operations/rest/client.rb +11 -4
  75. data/lib/google/cloud/compute/v1/region_security_policies/rest/client.rb +21 -9
  76. data/lib/google/cloud/compute/v1/region_ssl_certificates/rest/client.rb +11 -4
  77. data/lib/google/cloud/compute/v1/region_ssl_policies/rest/client.rb +15 -6
  78. data/lib/google/cloud/compute/v1/region_target_http_proxies/rest/client.rb +13 -5
  79. data/lib/google/cloud/compute/v1/region_target_https_proxies/rest/client.rb +17 -7
  80. data/lib/google/cloud/compute/v1/region_target_tcp_proxies/rest/client.rb +11 -4
  81. data/lib/google/cloud/compute/v1/region_url_maps/rest/client.rb +17 -7
  82. data/lib/google/cloud/compute/v1/region_zones/rest/client.rb +5 -1
  83. data/lib/google/cloud/compute/v1/regions/rest/client.rb +7 -2
  84. data/lib/google/cloud/compute/v1/reservations/rest/client.rb +23 -10
  85. data/lib/google/cloud/compute/v1/resource_policies/rest/client.rb +21 -9
  86. data/lib/google/cloud/compute/v1/rest.rb +4 -0
  87. data/lib/google/cloud/compute/v1/routers/rest/client.rb +25 -11
  88. data/lib/google/cloud/compute/v1/routes/rest/client.rb +11 -4
  89. data/lib/google/cloud/compute/v1/security_policies/rest/client.rb +27 -12
  90. data/lib/google/cloud/compute/v1/service_attachments/rest/client.rb +21 -9
  91. data/lib/google/cloud/compute/v1/snapshot_settings_service/rest/client.rb +7 -2
  92. data/lib/google/cloud/compute/v1/snapshots/rest/client.rb +19 -8
  93. data/lib/google/cloud/compute/v1/ssl_certificates/rest/client.rb +13 -5
  94. data/lib/google/cloud/compute/v1/ssl_policies/rest/client.rb +17 -7
  95. data/lib/google/cloud/compute/v1/storage_pool_types/credentials.rb +53 -0
  96. data/lib/google/cloud/compute/v1/storage_pool_types/rest/client.rb +609 -0
  97. data/lib/google/cloud/compute/v1/storage_pool_types/rest/service_stub.rb +249 -0
  98. data/lib/google/cloud/compute/v1/storage_pool_types/rest.rb +51 -0
  99. data/lib/google/cloud/compute/v1/storage_pool_types.rb +47 -0
  100. data/lib/google/cloud/compute/v1/storage_pools/credentials.rb +52 -0
  101. data/lib/google/cloud/compute/v1/storage_pools/rest/client.rb +1326 -0
  102. data/lib/google/cloud/compute/v1/storage_pools/rest/service_stub.rb +679 -0
  103. data/lib/google/cloud/compute/v1/storage_pools/rest.rb +51 -0
  104. data/lib/google/cloud/compute/v1/storage_pools.rb +47 -0
  105. data/lib/google/cloud/compute/v1/subnetworks/rest/client.rb +27 -12
  106. data/lib/google/cloud/compute/v1/target_grpc_proxies/rest/client.rb +13 -5
  107. data/lib/google/cloud/compute/v1/target_http_proxies/rest/client.rb +17 -7
  108. data/lib/google/cloud/compute/v1/target_https_proxies/rest/client.rb +25 -11
  109. data/lib/google/cloud/compute/v1/target_instances/rest/client.rb +15 -6
  110. data/lib/google/cloud/compute/v1/target_pools/rest/client.rb +27 -12
  111. data/lib/google/cloud/compute/v1/target_ssl_proxies/rest/client.rb +21 -9
  112. data/lib/google/cloud/compute/v1/target_tcp_proxies/rest/client.rb +17 -7
  113. data/lib/google/cloud/compute/v1/target_vpn_gateways/rest/client.rb +15 -6
  114. data/lib/google/cloud/compute/v1/url_maps/rest/client.rb +21 -9
  115. data/lib/google/cloud/compute/v1/version.rb +1 -1
  116. data/lib/google/cloud/compute/v1/vpn_gateways/rest/client.rb +19 -8
  117. data/lib/google/cloud/compute/v1/vpn_tunnels/rest/client.rb +15 -6
  118. data/lib/google/cloud/compute/v1/zone_operations/rest/client.rb +11 -4
  119. data/lib/google/cloud/compute/v1/zones/rest/client.rb +7 -2
  120. data/lib/google/cloud/compute/v1.rb +4 -0
  121. data/proto_docs/google/api/client.rb +4 -0
  122. data/proto_docs/google/cloud/compute/v1/compute.rb +1333 -37
  123. metadata +22 -2
@@ -0,0 +1,837 @@
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/errors"
20
+ require "google/cloud/compute/v1/compute_pb"
21
+ require "google/cloud/compute/v1/instance_group_manager_resize_requests/rest/service_stub"
22
+ require "google/cloud/compute/v1/zone_operations/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module Compute
27
+ module V1
28
+ module InstanceGroupManagerResizeRequests
29
+ module Rest
30
+ ##
31
+ # REST client for the InstanceGroupManagerResizeRequests service.
32
+ #
33
+ # The InstanceGroupManagerResizeRequests 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 :instance_group_manager_resize_requests_stub
44
+
45
+ ##
46
+ # Configure the InstanceGroupManagerResizeRequests Client class.
47
+ #
48
+ # See {::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client::Configuration}
49
+ # for a description of the configuration fields.
50
+ #
51
+ # @example
52
+ #
53
+ # # Modify the configuration for all InstanceGroupManagerResizeRequests clients
54
+ # ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::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 InstanceGroupManagerResizeRequests 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::InstanceGroupManagerResizeRequests::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
+ @instance_group_manager_resize_requests_stub.universe_domain
123
+ end
124
+
125
+ ##
126
+ # Create a new InstanceGroupManagerResizeRequests REST client object.
127
+ #
128
+ # @example
129
+ #
130
+ # # Create a client using the default configuration
131
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new
132
+ #
133
+ # # Create a client using a custom configuration
134
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new do |config|
135
+ # config.timeout = 10.0
136
+ # end
137
+ #
138
+ # @yield [config] Configure the InstanceGroupManagerResizeRequests 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
+ @zone_operations = ::Google::Cloud::Compute::V1::ZoneOperations::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
+ @instance_group_manager_resize_requests_stub = ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::ServiceStub.new(
172
+ endpoint: @config.endpoint,
173
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
174
+ universe_domain: @config.universe_domain,
175
+ credentials: credentials
176
+ )
177
+ end
178
+
179
+ ##
180
+ # Get the associated client for long-running operations via ZoneOperations.
181
+ #
182
+ # @return [::Google::Cloud::Compute::V1::ZoneOperations::Rest::Client]
183
+ #
184
+ attr_reader :zone_operations
185
+
186
+ # Service calls
187
+
188
+ ##
189
+ # Cancels the specified resize request and removes it from the queue. Cancelled resize request does no longer wait for the resources to be provisioned. Cancel is only possible for requests that are accepted in the queue.
190
+ #
191
+ # @overload cancel(request, options = nil)
192
+ # Pass arguments to `cancel` via a request object, either of type
193
+ # {::Google::Cloud::Compute::V1::CancelInstanceGroupManagerResizeRequestRequest} or an equivalent Hash.
194
+ #
195
+ # @param request [::Google::Cloud::Compute::V1::CancelInstanceGroupManagerResizeRequestRequest, ::Hash]
196
+ # A request object representing the call parameters. Required. To specify no
197
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
198
+ # @param options [::Gapic::CallOptions, ::Hash]
199
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
200
+ #
201
+ # @overload cancel(instance_group_manager: nil, project: nil, request_id: nil, resize_request: nil, zone: nil)
202
+ # Pass arguments to `cancel` via keyword arguments. Note that at
203
+ # least one keyword argument is required. To specify no parameters, or to keep all
204
+ # the default parameter values, pass an empty Hash as a request object (see above).
205
+ #
206
+ # @param instance_group_manager [::String]
207
+ # The name of the managed instance group. The name should conform to RFC1035 or be a resource ID.
208
+ # @param project [::String]
209
+ # Project ID for this request.
210
+ # @param request_id [::String]
211
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
212
+ # @param resize_request [::String]
213
+ # The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID.
214
+ # @param zone [::String]
215
+ # The name of the zone where the managed instance group is located. The name should conform to RFC1035.
216
+ # @yield [result, operation] Access the result along with the TransportOperation object
217
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
218
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
219
+ #
220
+ # @return [::Gapic::GenericLRO::Operation]
221
+ #
222
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/cloud/compute/v1"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Cloud::Compute::V1::CancelInstanceGroupManagerResizeRequestRequest.new
232
+ #
233
+ # # Call the cancel method.
234
+ # result = client.cancel request
235
+ #
236
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
237
+ # p result
238
+ #
239
+ def cancel request, options = nil
240
+ raise ::ArgumentError, "request must be provided" if request.nil?
241
+
242
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CancelInstanceGroupManagerResizeRequestRequest
243
+
244
+ # Converts hash and nil to an options object
245
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
246
+
247
+ # Customize the options with defaults
248
+ call_metadata = @config.rpcs.cancel.metadata.to_h
249
+
250
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
251
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
252
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
253
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
254
+ transports_version_send: [:rest]
255
+
256
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
257
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
258
+
259
+ options.apply_defaults timeout: @config.rpcs.cancel.timeout,
260
+ metadata: call_metadata,
261
+ retry_policy: @config.rpcs.cancel.retry_policy
262
+
263
+ options.apply_defaults timeout: @config.timeout,
264
+ metadata: @config.metadata,
265
+ retry_policy: @config.retry_policy
266
+
267
+ @instance_group_manager_resize_requests_stub.cancel request, options do |result, response|
268
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
269
+ operation: result,
270
+ client: zone_operations,
271
+ request_values: {
272
+ "project" => request.project,
273
+ "zone" => request.zone
274
+ },
275
+ options: options
276
+ )
277
+ yield result, response if block_given?
278
+ return result
279
+ end
280
+ rescue ::Gapic::Rest::Error => e
281
+ raise ::Google::Cloud::Error.from_error(e)
282
+ end
283
+
284
+ ##
285
+ # Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously.
286
+ #
287
+ # @overload delete(request, options = nil)
288
+ # Pass arguments to `delete` via a request object, either of type
289
+ # {::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerResizeRequestRequest} or an equivalent Hash.
290
+ #
291
+ # @param request [::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerResizeRequestRequest, ::Hash]
292
+ # A request object representing the call parameters. Required. To specify no
293
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
294
+ # @param options [::Gapic::CallOptions, ::Hash]
295
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
296
+ #
297
+ # @overload delete(instance_group_manager: nil, project: nil, request_id: nil, resize_request: nil, zone: nil)
298
+ # Pass arguments to `delete` via keyword arguments. Note that at
299
+ # least one keyword argument is required. To specify no parameters, or to keep all
300
+ # the default parameter values, pass an empty Hash as a request object (see above).
301
+ #
302
+ # @param instance_group_manager [::String]
303
+ # The name of the managed instance group. The name should conform to RFC1035 or be a resource ID.
304
+ # @param project [::String]
305
+ # Project ID for this request.
306
+ # @param request_id [::String]
307
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
308
+ # @param resize_request [::String]
309
+ # The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID.
310
+ # @param zone [::String]
311
+ # The name of the zone where the managed instance group is located. The name should conform to RFC1035.
312
+ # @yield [result, operation] Access the result along with the TransportOperation object
313
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
314
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
315
+ #
316
+ # @return [::Gapic::GenericLRO::Operation]
317
+ #
318
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
319
+ #
320
+ # @example Basic example
321
+ # require "google/cloud/compute/v1"
322
+ #
323
+ # # Create a client object. The client can be reused for multiple calls.
324
+ # client = Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new
325
+ #
326
+ # # Create a request. To set request fields, pass in keyword arguments.
327
+ # request = Google::Cloud::Compute::V1::DeleteInstanceGroupManagerResizeRequestRequest.new
328
+ #
329
+ # # Call the delete method.
330
+ # result = client.delete request
331
+ #
332
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
333
+ # p result
334
+ #
335
+ def delete request, options = nil
336
+ raise ::ArgumentError, "request must be provided" if request.nil?
337
+
338
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::DeleteInstanceGroupManagerResizeRequestRequest
339
+
340
+ # Converts hash and nil to an options object
341
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
342
+
343
+ # Customize the options with defaults
344
+ call_metadata = @config.rpcs.delete.metadata.to_h
345
+
346
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
347
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
348
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
349
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
350
+ transports_version_send: [:rest]
351
+
352
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
353
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
354
+
355
+ options.apply_defaults timeout: @config.rpcs.delete.timeout,
356
+ metadata: call_metadata,
357
+ retry_policy: @config.rpcs.delete.retry_policy
358
+
359
+ options.apply_defaults timeout: @config.timeout,
360
+ metadata: @config.metadata,
361
+ retry_policy: @config.retry_policy
362
+
363
+ @instance_group_manager_resize_requests_stub.delete request, options do |result, response|
364
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
365
+ operation: result,
366
+ client: zone_operations,
367
+ request_values: {
368
+ "project" => request.project,
369
+ "zone" => request.zone
370
+ },
371
+ options: options
372
+ )
373
+ yield result, response if block_given?
374
+ return result
375
+ end
376
+ rescue ::Gapic::Rest::Error => e
377
+ raise ::Google::Cloud::Error.from_error(e)
378
+ end
379
+
380
+ ##
381
+ # Returns all of the details about the specified resize request.
382
+ #
383
+ # @overload get(request, options = nil)
384
+ # Pass arguments to `get` via a request object, either of type
385
+ # {::Google::Cloud::Compute::V1::GetInstanceGroupManagerResizeRequestRequest} or an equivalent Hash.
386
+ #
387
+ # @param request [::Google::Cloud::Compute::V1::GetInstanceGroupManagerResizeRequestRequest, ::Hash]
388
+ # A request object representing the call parameters. Required. To specify no
389
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
390
+ # @param options [::Gapic::CallOptions, ::Hash]
391
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
392
+ #
393
+ # @overload get(instance_group_manager: nil, project: nil, resize_request: nil, zone: nil)
394
+ # Pass arguments to `get` via keyword arguments. Note that at
395
+ # least one keyword argument is required. To specify no parameters, or to keep all
396
+ # the default parameter values, pass an empty Hash as a request object (see above).
397
+ #
398
+ # @param instance_group_manager [::String]
399
+ # The name of the managed instance group. Name should conform to RFC1035 or be a resource ID.
400
+ # @param project [::String]
401
+ # Project ID for this request.
402
+ # @param resize_request [::String]
403
+ # The name of the resize request. Name should conform to RFC1035 or be a resource ID.
404
+ # @param zone [::String]
405
+ # Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035.
406
+ # @yield [result, operation] Access the result along with the TransportOperation object
407
+ # @yieldparam result [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest]
408
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
409
+ #
410
+ # @return [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest]
411
+ #
412
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
413
+ #
414
+ # @example Basic example
415
+ # require "google/cloud/compute/v1"
416
+ #
417
+ # # Create a client object. The client can be reused for multiple calls.
418
+ # client = Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new
419
+ #
420
+ # # Create a request. To set request fields, pass in keyword arguments.
421
+ # request = Google::Cloud::Compute::V1::GetInstanceGroupManagerResizeRequestRequest.new
422
+ #
423
+ # # Call the get method.
424
+ # result = client.get request
425
+ #
426
+ # # The returned object is of type Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest.
427
+ # p result
428
+ #
429
+ def get request, options = nil
430
+ raise ::ArgumentError, "request must be provided" if request.nil?
431
+
432
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetInstanceGroupManagerResizeRequestRequest
433
+
434
+ # Converts hash and nil to an options object
435
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
436
+
437
+ # Customize the options with defaults
438
+ call_metadata = @config.rpcs.get.metadata.to_h
439
+
440
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
441
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
442
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
443
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
444
+ transports_version_send: [:rest]
445
+
446
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
+
449
+ options.apply_defaults timeout: @config.rpcs.get.timeout,
450
+ metadata: call_metadata,
451
+ retry_policy: @config.rpcs.get.retry_policy
452
+
453
+ options.apply_defaults timeout: @config.timeout,
454
+ metadata: @config.metadata,
455
+ retry_policy: @config.retry_policy
456
+
457
+ @instance_group_manager_resize_requests_stub.get request, options do |result, operation|
458
+ yield result, operation if block_given?
459
+ return result
460
+ end
461
+ rescue ::Gapic::Rest::Error => e
462
+ raise ::Google::Cloud::Error.from_error(e)
463
+ end
464
+
465
+ ##
466
+ # Creates a new resize request that starts provisioning VMs immediately or queues VM creation.
467
+ #
468
+ # @overload insert(request, options = nil)
469
+ # Pass arguments to `insert` via a request object, either of type
470
+ # {::Google::Cloud::Compute::V1::InsertInstanceGroupManagerResizeRequestRequest} or an equivalent Hash.
471
+ #
472
+ # @param request [::Google::Cloud::Compute::V1::InsertInstanceGroupManagerResizeRequestRequest, ::Hash]
473
+ # A request object representing the call parameters. Required. To specify no
474
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
475
+ # @param options [::Gapic::CallOptions, ::Hash]
476
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
477
+ #
478
+ # @overload insert(instance_group_manager: nil, instance_group_manager_resize_request_resource: nil, project: nil, request_id: nil, zone: nil)
479
+ # Pass arguments to `insert` via keyword arguments. Note that at
480
+ # least one keyword argument is required. To specify no parameters, or to keep all
481
+ # the default parameter values, pass an empty Hash as a request object (see above).
482
+ #
483
+ # @param instance_group_manager [::String]
484
+ # The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID.
485
+ # @param instance_group_manager_resize_request_resource [::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest, ::Hash]
486
+ # The body resource for this request
487
+ # @param project [::String]
488
+ # Project ID for this request.
489
+ # @param request_id [::String]
490
+ # An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
491
+ # @param zone [::String]
492
+ # The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035.
493
+ # @yield [result, operation] Access the result along with the TransportOperation object
494
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
495
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
496
+ #
497
+ # @return [::Gapic::GenericLRO::Operation]
498
+ #
499
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
500
+ #
501
+ # @example Basic example
502
+ # require "google/cloud/compute/v1"
503
+ #
504
+ # # Create a client object. The client can be reused for multiple calls.
505
+ # client = Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new
506
+ #
507
+ # # Create a request. To set request fields, pass in keyword arguments.
508
+ # request = Google::Cloud::Compute::V1::InsertInstanceGroupManagerResizeRequestRequest.new
509
+ #
510
+ # # Call the insert method.
511
+ # result = client.insert request
512
+ #
513
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
514
+ # p result
515
+ #
516
+ def insert request, options = nil
517
+ raise ::ArgumentError, "request must be provided" if request.nil?
518
+
519
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::InsertInstanceGroupManagerResizeRequestRequest
520
+
521
+ # Converts hash and nil to an options object
522
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
523
+
524
+ # Customize the options with defaults
525
+ call_metadata = @config.rpcs.insert.metadata.to_h
526
+
527
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
528
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
529
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
530
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
531
+ transports_version_send: [:rest]
532
+
533
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
534
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
535
+
536
+ options.apply_defaults timeout: @config.rpcs.insert.timeout,
537
+ metadata: call_metadata,
538
+ retry_policy: @config.rpcs.insert.retry_policy
539
+
540
+ options.apply_defaults timeout: @config.timeout,
541
+ metadata: @config.metadata,
542
+ retry_policy: @config.retry_policy
543
+
544
+ @instance_group_manager_resize_requests_stub.insert request, options do |result, response|
545
+ result = ::Google::Cloud::Compute::V1::ZoneOperations::Rest::NonstandardLro.create_operation(
546
+ operation: result,
547
+ client: zone_operations,
548
+ request_values: {
549
+ "project" => request.project,
550
+ "zone" => request.zone
551
+ },
552
+ options: options
553
+ )
554
+ yield result, response if block_given?
555
+ return result
556
+ end
557
+ rescue ::Gapic::Rest::Error => e
558
+ raise ::Google::Cloud::Error.from_error(e)
559
+ end
560
+
561
+ ##
562
+ # Retrieves a list of resize requests that are contained in the managed instance group.
563
+ #
564
+ # @overload list(request, options = nil)
565
+ # Pass arguments to `list` via a request object, either of type
566
+ # {::Google::Cloud::Compute::V1::ListInstanceGroupManagerResizeRequestsRequest} or an equivalent Hash.
567
+ #
568
+ # @param request [::Google::Cloud::Compute::V1::ListInstanceGroupManagerResizeRequestsRequest, ::Hash]
569
+ # A request object representing the call parameters. Required. To specify no
570
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
571
+ # @param options [::Gapic::CallOptions, ::Hash]
572
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
573
+ #
574
+ # @overload list(filter: nil, instance_group_manager: nil, max_results: nil, order_by: nil, page_token: nil, project: nil, return_partial_success: nil, zone: nil)
575
+ # Pass arguments to `list` via keyword arguments. Note that at
576
+ # least one keyword argument is required. To specify no parameters, or to keep all
577
+ # the default parameter values, pass an empty Hash as a request object (see above).
578
+ #
579
+ # @param filter [::String]
580
+ # A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.
581
+ # @param instance_group_manager [::String]
582
+ # The name of the managed instance group. The name should conform to RFC1035.
583
+ # @param max_results [::Integer]
584
+ # The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
585
+ # @param order_by [::String]
586
+ # Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.
587
+ # @param page_token [::String]
588
+ # Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
589
+ # @param project [::String]
590
+ # Project ID for this request.
591
+ # @param return_partial_success [::Boolean]
592
+ # 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.
593
+ # @param zone [::String]
594
+ # The name of the zone where the managed instance group is located. The name should conform to RFC1035.
595
+ # @yield [result, operation] Access the result along with the TransportOperation object
596
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest>]
597
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
598
+ #
599
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequest>]
600
+ #
601
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
602
+ #
603
+ # @example Basic example
604
+ # require "google/cloud/compute/v1"
605
+ #
606
+ # # Create a client object. The client can be reused for multiple calls.
607
+ # client = Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new
608
+ #
609
+ # # Create a request. To set request fields, pass in keyword arguments.
610
+ # request = Google::Cloud::Compute::V1::ListInstanceGroupManagerResizeRequestsRequest.new
611
+ #
612
+ # # Call the list method.
613
+ # result = client.list request
614
+ #
615
+ # # The returned object is of type Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequestsListResponse.
616
+ # p result
617
+ #
618
+ def list request, options = nil
619
+ raise ::ArgumentError, "request must be provided" if request.nil?
620
+
621
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::ListInstanceGroupManagerResizeRequestsRequest
622
+
623
+ # Converts hash and nil to an options object
624
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
625
+
626
+ # Customize the options with defaults
627
+ call_metadata = @config.rpcs.list.metadata.to_h
628
+
629
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
630
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
631
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
632
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
633
+ transports_version_send: [:rest]
634
+
635
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
636
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
637
+
638
+ options.apply_defaults timeout: @config.rpcs.list.timeout,
639
+ metadata: call_metadata,
640
+ retry_policy: @config.rpcs.list.retry_policy
641
+
642
+ options.apply_defaults timeout: @config.timeout,
643
+ metadata: @config.metadata,
644
+ retry_policy: @config.retry_policy
645
+
646
+ @instance_group_manager_resize_requests_stub.list request, options do |result, operation|
647
+ result = ::Gapic::Rest::PagedEnumerable.new @instance_group_manager_resize_requests_stub, :list, "items", request, result, options
648
+ yield result, operation if block_given?
649
+ return result
650
+ end
651
+ rescue ::Gapic::Rest::Error => e
652
+ raise ::Google::Cloud::Error.from_error(e)
653
+ end
654
+
655
+ ##
656
+ # Configuration class for the InstanceGroupManagerResizeRequests REST API.
657
+ #
658
+ # This class represents the configuration for InstanceGroupManagerResizeRequests REST,
659
+ # providing control over timeouts, retry behavior, logging, transport
660
+ # parameters, and other low-level controls. Certain parameters can also be
661
+ # applied individually to specific RPCs. See
662
+ # {::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client::Configuration::Rpcs}
663
+ # for a list of RPCs that can be configured independently.
664
+ #
665
+ # Configuration can be applied globally to all clients, or to a single client
666
+ # on construction.
667
+ #
668
+ # @example
669
+ #
670
+ # # Modify the global config, setting the timeout for
671
+ # # cancel to 20 seconds,
672
+ # # and all remaining timeouts to 10 seconds.
673
+ # ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.configure do |config|
674
+ # config.timeout = 10.0
675
+ # config.rpcs.cancel.timeout = 20.0
676
+ # end
677
+ #
678
+ # # Apply the above configuration only to a new client.
679
+ # client = ::Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client.new do |config|
680
+ # config.timeout = 10.0
681
+ # config.rpcs.cancel.timeout = 20.0
682
+ # end
683
+ #
684
+ # @!attribute [rw] endpoint
685
+ # A custom service endpoint, as a hostname or hostname:port. The default is
686
+ # nil, indicating to use the default endpoint in the current universe domain.
687
+ # @return [::String,nil]
688
+ # @!attribute [rw] credentials
689
+ # Credentials to send with calls. You may provide any of the following types:
690
+ # * (`String`) The path to a service account key file in JSON format
691
+ # * (`Hash`) A service account key as a Hash
692
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
693
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
694
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
695
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
696
+ # * (`nil`) indicating no credentials
697
+ # @return [::Object]
698
+ # @!attribute [rw] scope
699
+ # The OAuth scopes
700
+ # @return [::Array<::String>]
701
+ # @!attribute [rw] lib_name
702
+ # The library name as recorded in instrumentation and logging
703
+ # @return [::String]
704
+ # @!attribute [rw] lib_version
705
+ # The library version as recorded in instrumentation and logging
706
+ # @return [::String]
707
+ # @!attribute [rw] timeout
708
+ # The call timeout in seconds.
709
+ # @return [::Numeric]
710
+ # @!attribute [rw] metadata
711
+ # Additional headers to be sent with the call.
712
+ # @return [::Hash{::Symbol=>::String}]
713
+ # @!attribute [rw] retry_policy
714
+ # The retry policy. The value is a hash with the following keys:
715
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
716
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
717
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
718
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
719
+ # trigger a retry.
720
+ # @return [::Hash]
721
+ # @!attribute [rw] quota_project
722
+ # A separate project against which to charge quota.
723
+ # @return [::String]
724
+ # @!attribute [rw] universe_domain
725
+ # The universe domain within which to make requests. This determines the
726
+ # default endpoint URL. The default value of nil uses the environment
727
+ # universe (usually the default "googleapis.com" universe).
728
+ # @return [::String,nil]
729
+ #
730
+ class Configuration
731
+ extend ::Gapic::Config
732
+
733
+ # @private
734
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
735
+ DEFAULT_ENDPOINT = "compute.googleapis.com"
736
+
737
+ config_attr :endpoint, nil, ::String, nil
738
+ config_attr :credentials, nil do |value|
739
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
740
+ allowed.any? { |klass| klass === value }
741
+ end
742
+ config_attr :scope, nil, ::String, ::Array, nil
743
+ config_attr :lib_name, nil, ::String, nil
744
+ config_attr :lib_version, nil, ::String, nil
745
+ config_attr :timeout, nil, ::Numeric, nil
746
+ config_attr :metadata, nil, ::Hash, nil
747
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
748
+ config_attr :quota_project, nil, ::String, nil
749
+ config_attr :universe_domain, nil, ::String, nil
750
+
751
+ # @private
752
+ def initialize parent_config = nil
753
+ @parent_config = parent_config unless parent_config.nil?
754
+
755
+ yield self if block_given?
756
+ end
757
+
758
+ ##
759
+ # Configurations for individual RPCs
760
+ # @return [Rpcs]
761
+ #
762
+ def rpcs
763
+ @rpcs ||= begin
764
+ parent_rpcs = nil
765
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
766
+ Rpcs.new parent_rpcs
767
+ end
768
+ end
769
+
770
+ ##
771
+ # Configuration RPC class for the InstanceGroupManagerResizeRequests API.
772
+ #
773
+ # Includes fields providing the configuration for each RPC in this service.
774
+ # Each configuration object is of type `Gapic::Config::Method` and includes
775
+ # the following configuration fields:
776
+ #
777
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
778
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
779
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
780
+ # include the following keys:
781
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
782
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
783
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
784
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
785
+ # trigger a retry.
786
+ #
787
+ class Rpcs
788
+ ##
789
+ # RPC-specific configuration for `cancel`
790
+ # @return [::Gapic::Config::Method]
791
+ #
792
+ attr_reader :cancel
793
+ ##
794
+ # RPC-specific configuration for `delete`
795
+ # @return [::Gapic::Config::Method]
796
+ #
797
+ attr_reader :delete
798
+ ##
799
+ # RPC-specific configuration for `get`
800
+ # @return [::Gapic::Config::Method]
801
+ #
802
+ attr_reader :get
803
+ ##
804
+ # RPC-specific configuration for `insert`
805
+ # @return [::Gapic::Config::Method]
806
+ #
807
+ attr_reader :insert
808
+ ##
809
+ # RPC-specific configuration for `list`
810
+ # @return [::Gapic::Config::Method]
811
+ #
812
+ attr_reader :list
813
+
814
+ # @private
815
+ def initialize parent_rpcs = nil
816
+ cancel_config = parent_rpcs.cancel if parent_rpcs.respond_to? :cancel
817
+ @cancel = ::Gapic::Config::Method.new cancel_config
818
+ delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
819
+ @delete = ::Gapic::Config::Method.new delete_config
820
+ get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
821
+ @get = ::Gapic::Config::Method.new get_config
822
+ insert_config = parent_rpcs.insert if parent_rpcs.respond_to? :insert
823
+ @insert = ::Gapic::Config::Method.new insert_config
824
+ list_config = parent_rpcs.list if parent_rpcs.respond_to? :list
825
+ @list = ::Gapic::Config::Method.new list_config
826
+
827
+ yield self if block_given?
828
+ end
829
+ end
830
+ end
831
+ end
832
+ end
833
+ end
834
+ end
835
+ end
836
+ end
837
+ end