google-cloud-compute-v1 3.6.0 → 3.7.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 (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/compute/v1/compute_pb.rb +58 -1
  3. data/lib/google/cloud/compute/v1/global_vm_extension_policies/credentials.rb +52 -0
  4. data/lib/google/cloud/compute/v1/global_vm_extension_policies/rest/client.rb +1164 -0
  5. data/lib/google/cloud/compute/v1/global_vm_extension_policies/rest/service_stub.rb +453 -0
  6. data/lib/google/cloud/compute/v1/global_vm_extension_policies/rest.rb +51 -0
  7. data/lib/google/cloud/compute/v1/global_vm_extension_policies.rb +47 -0
  8. data/lib/google/cloud/compute/v1/license_codes/credentials.rb +0 -1
  9. data/lib/google/cloud/compute/v1/license_codes/rest/client.rb +193 -0
  10. data/lib/google/cloud/compute/v1/license_codes/rest/service_stub.rb +125 -0
  11. data/lib/google/cloud/compute/v1/networks/rest/client.rb +116 -0
  12. data/lib/google/cloud/compute/v1/networks/rest/service_stub.rb +63 -0
  13. data/lib/google/cloud/compute/v1/rest.rb +3 -0
  14. data/lib/google/cloud/compute/v1/rollout_plans/credentials.rb +52 -0
  15. data/lib/google/cloud/compute/v1/rollout_plans/rest/client.rb +848 -0
  16. data/lib/google/cloud/compute/v1/rollout_plans/rest/service_stub.rb +328 -0
  17. data/lib/google/cloud/compute/v1/rollout_plans/rest.rb +51 -0
  18. data/lib/google/cloud/compute/v1/rollout_plans.rb +47 -0
  19. data/lib/google/cloud/compute/v1/rollouts/credentials.rb +52 -0
  20. data/lib/google/cloud/compute/v1/rollouts/rest/client.rb +853 -0
  21. data/lib/google/cloud/compute/v1/rollouts/rest/service_stub.rb +328 -0
  22. data/lib/google/cloud/compute/v1/rollouts/rest.rb +51 -0
  23. data/lib/google/cloud/compute/v1/rollouts.rb +47 -0
  24. data/lib/google/cloud/compute/v1/version.rb +1 -1
  25. data/lib/google/cloud/compute/v1/zone_vm_extension_policies/rest/client.rb +3 -3
  26. data/lib/google/cloud/compute/v1.rb +3 -0
  27. data/proto_docs/google/cloud/compute/v1/compute.rb +2698 -914
  28. metadata +16 -1
@@ -75,6 +75,13 @@ module Google
75
75
  initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
76
76
  }
77
77
 
78
+ default_config.rpcs.get_iam_policy.timeout = 600.0
79
+ default_config.rpcs.get_iam_policy.retry_policy = {
80
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
81
+ }
82
+
83
+ default_config.rpcs.set_iam_policy.timeout = 600.0
84
+
78
85
  default_config.rpcs.test_iam_permissions.timeout = 600.0
79
86
 
80
87
  default_config
@@ -265,6 +272,178 @@ module Google
265
272
  raise ::Google::Cloud::Error.from_error(e)
266
273
  end
267
274
 
275
+ ##
276
+ # Gets the access control policy for a resource. May be empty if no such
277
+ # policy or resource exists.
278
+ # *Caution* This resource is intended
279
+ # for use only by third-party partners who are creatingCloud Marketplace
280
+ # images.
281
+ #
282
+ # @overload get_iam_policy(request, options = nil)
283
+ # Pass arguments to `get_iam_policy` via a request object, either of type
284
+ # {::Google::Cloud::Compute::V1::GetIamPolicyLicenseCodeRequest} or an equivalent Hash.
285
+ #
286
+ # @param request [::Google::Cloud::Compute::V1::GetIamPolicyLicenseCodeRequest, ::Hash]
287
+ # A request object representing the call parameters. Required. To specify no
288
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
289
+ # @param options [::Gapic::CallOptions, ::Hash]
290
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
291
+ #
292
+ # @overload get_iam_policy(options_requested_policy_version: nil, project: nil, resource: nil)
293
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
294
+ # least one keyword argument is required. To specify no parameters, or to keep all
295
+ # the default parameter values, pass an empty Hash as a request object (see above).
296
+ #
297
+ # @param options_requested_policy_version [::Integer]
298
+ # Requested IAM Policy version.
299
+ # @param project [::String]
300
+ # Project ID for this request.
301
+ # @param resource [::String]
302
+ # Name or id of the resource for this request.
303
+ # @yield [result, operation] Access the result along with the TransportOperation object
304
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
305
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
306
+ #
307
+ # @return [::Google::Cloud::Compute::V1::Policy]
308
+ #
309
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
310
+ #
311
+ # @example Basic example
312
+ # require "google/cloud/compute/v1"
313
+ #
314
+ # # Create a client object. The client can be reused for multiple calls.
315
+ # client = Google::Cloud::Compute::V1::LicenseCodes::Rest::Client.new
316
+ #
317
+ # # Create a request. To set request fields, pass in keyword arguments.
318
+ # request = Google::Cloud::Compute::V1::GetIamPolicyLicenseCodeRequest.new
319
+ #
320
+ # # Call the get_iam_policy method.
321
+ # result = client.get_iam_policy request
322
+ #
323
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
324
+ # p result
325
+ #
326
+ def get_iam_policy request, options = nil
327
+ raise ::ArgumentError, "request must be provided" if request.nil?
328
+
329
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::GetIamPolicyLicenseCodeRequest
330
+
331
+ # Converts hash and nil to an options object
332
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
333
+
334
+ # Customize the options with defaults
335
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
336
+
337
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
338
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
339
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
340
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
341
+ transports_version_send: [:rest]
342
+
343
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
344
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
345
+
346
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
347
+ metadata: call_metadata,
348
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
349
+
350
+ options.apply_defaults timeout: @config.timeout,
351
+ metadata: @config.metadata,
352
+ retry_policy: @config.retry_policy
353
+
354
+ @license_codes_stub.get_iam_policy request, options do |result, operation|
355
+ yield result, operation if block_given?
356
+ end
357
+ rescue ::Gapic::Rest::Error => e
358
+ raise ::Google::Cloud::Error.from_error(e)
359
+ end
360
+
361
+ ##
362
+ # Sets the access control policy on the specified resource.
363
+ # Replaces any existing policy.
364
+ # *Caution* This resource is intended
365
+ # for use only by third-party partners who are creatingCloud Marketplace
366
+ # images.
367
+ #
368
+ # @overload set_iam_policy(request, options = nil)
369
+ # Pass arguments to `set_iam_policy` via a request object, either of type
370
+ # {::Google::Cloud::Compute::V1::SetIamPolicyLicenseCodeRequest} or an equivalent Hash.
371
+ #
372
+ # @param request [::Google::Cloud::Compute::V1::SetIamPolicyLicenseCodeRequest, ::Hash]
373
+ # A request object representing the call parameters. Required. To specify no
374
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
375
+ # @param options [::Gapic::CallOptions, ::Hash]
376
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
377
+ #
378
+ # @overload set_iam_policy(global_set_policy_request_resource: nil, project: nil, resource: nil)
379
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
380
+ # least one keyword argument is required. To specify no parameters, or to keep all
381
+ # the default parameter values, pass an empty Hash as a request object (see above).
382
+ #
383
+ # @param global_set_policy_request_resource [::Google::Cloud::Compute::V1::GlobalSetPolicyRequest, ::Hash]
384
+ # The body resource for this request
385
+ # @param project [::String]
386
+ # Project ID for this request.
387
+ # @param resource [::String]
388
+ # Name or id of the resource for this request.
389
+ # @yield [result, operation] Access the result along with the TransportOperation object
390
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
391
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
392
+ #
393
+ # @return [::Google::Cloud::Compute::V1::Policy]
394
+ #
395
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
396
+ #
397
+ # @example Basic example
398
+ # require "google/cloud/compute/v1"
399
+ #
400
+ # # Create a client object. The client can be reused for multiple calls.
401
+ # client = Google::Cloud::Compute::V1::LicenseCodes::Rest::Client.new
402
+ #
403
+ # # Create a request. To set request fields, pass in keyword arguments.
404
+ # request = Google::Cloud::Compute::V1::SetIamPolicyLicenseCodeRequest.new
405
+ #
406
+ # # Call the set_iam_policy method.
407
+ # result = client.set_iam_policy request
408
+ #
409
+ # # The returned object is of type Google::Cloud::Compute::V1::Policy.
410
+ # p result
411
+ #
412
+ def set_iam_policy request, options = nil
413
+ raise ::ArgumentError, "request must be provided" if request.nil?
414
+
415
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::SetIamPolicyLicenseCodeRequest
416
+
417
+ # Converts hash and nil to an options object
418
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
419
+
420
+ # Customize the options with defaults
421
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
422
+
423
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
424
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
425
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
426
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
427
+ transports_version_send: [:rest]
428
+
429
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
430
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
431
+
432
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
433
+ metadata: call_metadata,
434
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
435
+
436
+ options.apply_defaults timeout: @config.timeout,
437
+ metadata: @config.metadata,
438
+ retry_policy: @config.retry_policy
439
+
440
+ @license_codes_stub.set_iam_policy request, options do |result, operation|
441
+ yield result, operation if block_given?
442
+ end
443
+ rescue ::Gapic::Rest::Error => e
444
+ raise ::Google::Cloud::Error.from_error(e)
445
+ end
446
+
268
447
  ##
269
448
  # Returns permissions that a caller has on the specified resource.
270
449
  # *Caution* This resource is intended
@@ -502,6 +681,16 @@ module Google
502
681
  #
503
682
  attr_reader :get
504
683
  ##
684
+ # RPC-specific configuration for `get_iam_policy`
685
+ # @return [::Gapic::Config::Method]
686
+ #
687
+ attr_reader :get_iam_policy
688
+ ##
689
+ # RPC-specific configuration for `set_iam_policy`
690
+ # @return [::Gapic::Config::Method]
691
+ #
692
+ attr_reader :set_iam_policy
693
+ ##
505
694
  # RPC-specific configuration for `test_iam_permissions`
506
695
  # @return [::Gapic::Config::Method]
507
696
  #
@@ -511,6 +700,10 @@ module Google
511
700
  def initialize parent_rpcs = nil
512
701
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
513
702
  @get = ::Gapic::Config::Method.new get_config
703
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
704
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
705
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
706
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
514
707
  test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
515
708
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
516
709
 
@@ -113,6 +113,86 @@ module Google
113
113
  end
114
114
  end
115
115
 
116
+ ##
117
+ # Baseline implementation for the get_iam_policy REST call
118
+ #
119
+ # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyLicenseCodeRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @param options [::Gapic::CallOptions]
122
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
123
+ #
124
+ # @yield [result, operation] Access the result along with the TransportOperation object
125
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
126
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
127
+ #
128
+ # @return [::Google::Cloud::Compute::V1::Policy]
129
+ # A result object deserialized from the server's reply
130
+ def get_iam_policy request_pb, options = nil
131
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
132
+
133
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
134
+ query_string_params = if query_string_params.any?
135
+ query_string_params.to_h { |p| p.split "=", 2 }
136
+ else
137
+ {}
138
+ end
139
+
140
+ response = @client_stub.make_http_request(
141
+ verb,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "get_iam_policy",
146
+ options: options
147
+ )
148
+ operation = ::Gapic::Rest::TransportOperation.new response
149
+ result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
154
+ end
155
+
156
+ ##
157
+ # Baseline implementation for the set_iam_policy REST call
158
+ #
159
+ # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyLicenseCodeRequest]
160
+ # A request object representing the call parameters. Required.
161
+ # @param options [::Gapic::CallOptions]
162
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
163
+ #
164
+ # @yield [result, operation] Access the result along with the TransportOperation object
165
+ # @yieldparam result [::Google::Cloud::Compute::V1::Policy]
166
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
167
+ #
168
+ # @return [::Google::Cloud::Compute::V1::Policy]
169
+ # A result object deserialized from the server's reply
170
+ def set_iam_policy request_pb, options = nil
171
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
172
+
173
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
174
+ query_string_params = if query_string_params.any?
175
+ query_string_params.to_h { |p| p.split "=", 2 }
176
+ else
177
+ {}
178
+ end
179
+
180
+ response = @client_stub.make_http_request(
181
+ verb,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "set_iam_policy",
186
+ options: options
187
+ )
188
+ operation = ::Gapic::Rest::TransportOperation.new response
189
+ result = ::Google::Cloud::Compute::V1::Policy.decode_json response.body, ignore_unknown_fields: true
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
194
+ end
195
+
116
196
  ##
117
197
  # Baseline implementation for the test_iam_permissions REST call
118
198
  #
@@ -175,6 +255,51 @@ module Google
175
255
  transcoder.transcode request_pb
176
256
  end
177
257
 
258
+ ##
259
+ # @private
260
+ #
261
+ # GRPC transcoding helper method for the get_iam_policy REST call
262
+ #
263
+ # @param request_pb [::Google::Cloud::Compute::V1::GetIamPolicyLicenseCodeRequest]
264
+ # A request object representing the call parameters. Required.
265
+ # @return [Array(String, [String, nil], Hash{String => String})]
266
+ # Uri, Body, Query string parameters
267
+ def self.transcode_get_iam_policy_request request_pb
268
+ transcoder = Gapic::Rest::GrpcTranscoder.new
269
+ .with_bindings(
270
+ uri_method: :get,
271
+ uri_template: "/compute/v1/projects/{project}/global/licenseCodes/{resource}/getIamPolicy",
272
+ matches: [
273
+ ["project", %r{^[^/]+/?$}, false],
274
+ ["resource", %r{^[^/]+/?$}, false]
275
+ ]
276
+ )
277
+ transcoder.transcode request_pb
278
+ end
279
+
280
+ ##
281
+ # @private
282
+ #
283
+ # GRPC transcoding helper method for the set_iam_policy REST call
284
+ #
285
+ # @param request_pb [::Google::Cloud::Compute::V1::SetIamPolicyLicenseCodeRequest]
286
+ # A request object representing the call parameters. Required.
287
+ # @return [Array(String, [String, nil], Hash{String => String})]
288
+ # Uri, Body, Query string parameters
289
+ def self.transcode_set_iam_policy_request request_pb
290
+ transcoder = Gapic::Rest::GrpcTranscoder.new
291
+ .with_bindings(
292
+ uri_method: :post,
293
+ uri_template: "/compute/v1/projects/{project}/global/licenseCodes/{resource}/setIamPolicy",
294
+ body: "global_set_policy_request_resource",
295
+ matches: [
296
+ ["project", %r{^[^/]+/?$}, false],
297
+ ["resource", %r{^[^/]+/?$}, false]
298
+ ]
299
+ )
300
+ transcoder.transcode request_pb
301
+ end
302
+
178
303
  ##
179
304
  # @private
180
305
  #
@@ -73,6 +73,8 @@ module Google
73
73
 
74
74
  default_config.rpcs.add_peering.timeout = 600.0
75
75
 
76
+ default_config.rpcs.cancel_request_remove_peering.timeout = 600.0
77
+
76
78
  default_config.rpcs.delete.timeout = 600.0
77
79
 
78
80
  default_config.rpcs.get.timeout = 600.0
@@ -330,6 +332,113 @@ module Google
330
332
  raise ::Google::Cloud::Error.from_error(e)
331
333
  end
332
334
 
335
+ ##
336
+ # Cancel requests to remove a peering from the specified network. Applicable
337
+ # only for PeeringConnection with update_strategy=CONSENSUS. Cancels a
338
+ # request to remove a peering from the specified network.
339
+ #
340
+ # @overload cancel_request_remove_peering(request, options = nil)
341
+ # Pass arguments to `cancel_request_remove_peering` via a request object, either of type
342
+ # {::Google::Cloud::Compute::V1::CancelRequestRemovePeeringNetworkRequest} or an equivalent Hash.
343
+ #
344
+ # @param request [::Google::Cloud::Compute::V1::CancelRequestRemovePeeringNetworkRequest, ::Hash]
345
+ # A request object representing the call parameters. Required. To specify no
346
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
347
+ # @param options [::Gapic::CallOptions, ::Hash]
348
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
349
+ #
350
+ # @overload cancel_request_remove_peering(network: nil, networks_cancel_request_remove_peering_request_resource: nil, project: nil, request_id: nil)
351
+ # Pass arguments to `cancel_request_remove_peering` via keyword arguments. Note that at
352
+ # least one keyword argument is required. To specify no parameters, or to keep all
353
+ # the default parameter values, pass an empty Hash as a request object (see above).
354
+ #
355
+ # @param network [::String]
356
+ # Name of the network resource to remove peering from.
357
+ # @param networks_cancel_request_remove_peering_request_resource [::Google::Cloud::Compute::V1::NetworksCancelRequestRemovePeeringRequest, ::Hash]
358
+ # The body resource for this request
359
+ # @param project [::String]
360
+ # Project ID for this request.
361
+ # @param request_id [::String]
362
+ # An optional request ID to identify requests. Specify a unique request ID so
363
+ # that if you must retry your request, the server will know to ignore the
364
+ # request if it has already been completed.
365
+ #
366
+ # For example, consider a situation where you make an initial request and
367
+ # the request times out. If you make the request again with the same
368
+ # request ID, the server can check if original operation with the same
369
+ # request ID was received, and if so, will ignore the second request. This
370
+ # prevents clients from accidentally creating duplicate commitments.
371
+ #
372
+ # The request ID must be
373
+ # a valid UUID with the exception that zero UUID is not supported
374
+ # (00000000-0000-0000-0000-000000000000).
375
+ # @yield [result, operation] Access the result along with the TransportOperation object
376
+ # @yieldparam result [::Gapic::GenericLRO::Operation]
377
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
378
+ #
379
+ # @return [::Gapic::GenericLRO::Operation]
380
+ #
381
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
382
+ #
383
+ # @example Basic example
384
+ # require "google/cloud/compute/v1"
385
+ #
386
+ # # Create a client object. The client can be reused for multiple calls.
387
+ # client = Google::Cloud::Compute::V1::Networks::Rest::Client.new
388
+ #
389
+ # # Create a request. To set request fields, pass in keyword arguments.
390
+ # request = Google::Cloud::Compute::V1::CancelRequestRemovePeeringNetworkRequest.new
391
+ #
392
+ # # Call the cancel_request_remove_peering method.
393
+ # result = client.cancel_request_remove_peering request
394
+ #
395
+ # # The returned object is of type Google::Cloud::Compute::V1::Operation.
396
+ # p result
397
+ #
398
+ def cancel_request_remove_peering request, options = nil
399
+ raise ::ArgumentError, "request must be provided" if request.nil?
400
+
401
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Compute::V1::CancelRequestRemovePeeringNetworkRequest
402
+
403
+ # Converts hash and nil to an options object
404
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
405
+
406
+ # Customize the options with defaults
407
+ call_metadata = @config.rpcs.cancel_request_remove_peering.metadata.to_h
408
+
409
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
410
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
411
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
412
+ gapic_version: ::Google::Cloud::Compute::V1::VERSION,
413
+ transports_version_send: [:rest]
414
+
415
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
416
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
417
+
418
+ options.apply_defaults timeout: @config.rpcs.cancel_request_remove_peering.timeout,
419
+ metadata: call_metadata,
420
+ retry_policy: @config.rpcs.cancel_request_remove_peering.retry_policy
421
+
422
+ options.apply_defaults timeout: @config.timeout,
423
+ metadata: @config.metadata,
424
+ retry_policy: @config.retry_policy
425
+
426
+ @networks_stub.cancel_request_remove_peering request, options do |result, response|
427
+ result = ::Google::Cloud::Compute::V1::GlobalOperations::Rest::NonstandardLro.create_operation(
428
+ operation: result,
429
+ client: global_operations,
430
+ request_values: {
431
+ "project" => request.project
432
+ },
433
+ options: options
434
+ )
435
+ yield result, response if block_given?
436
+ throw :response, result
437
+ end
438
+ rescue ::Gapic::Rest::Error => e
439
+ raise ::Google::Cloud::Error.from_error(e)
440
+ end
441
+
333
442
  ##
334
443
  # Deletes the specified network.
335
444
  #
@@ -1722,6 +1831,11 @@ module Google
1722
1831
  #
1723
1832
  attr_reader :add_peering
1724
1833
  ##
1834
+ # RPC-specific configuration for `cancel_request_remove_peering`
1835
+ # @return [::Gapic::Config::Method]
1836
+ #
1837
+ attr_reader :cancel_request_remove_peering
1838
+ ##
1725
1839
  # RPC-specific configuration for `delete`
1726
1840
  # @return [::Gapic::Config::Method]
1727
1841
  #
@@ -1781,6 +1895,8 @@ module Google
1781
1895
  def initialize parent_rpcs = nil
1782
1896
  add_peering_config = parent_rpcs.add_peering if parent_rpcs.respond_to? :add_peering
1783
1897
  @add_peering = ::Gapic::Config::Method.new add_peering_config
1898
+ cancel_request_remove_peering_config = parent_rpcs.cancel_request_remove_peering if parent_rpcs.respond_to? :cancel_request_remove_peering
1899
+ @cancel_request_remove_peering = ::Gapic::Config::Method.new cancel_request_remove_peering_config
1784
1900
  delete_config = parent_rpcs.delete if parent_rpcs.respond_to? :delete
1785
1901
  @delete = ::Gapic::Config::Method.new delete_config
1786
1902
  get_config = parent_rpcs.get if parent_rpcs.respond_to? :get
@@ -113,6 +113,46 @@ module Google
113
113
  end
114
114
  end
115
115
 
116
+ ##
117
+ # Baseline implementation for the cancel_request_remove_peering REST call
118
+ #
119
+ # @param request_pb [::Google::Cloud::Compute::V1::CancelRequestRemovePeeringNetworkRequest]
120
+ # A request object representing the call parameters. Required.
121
+ # @param options [::Gapic::CallOptions]
122
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
123
+ #
124
+ # @yield [result, operation] Access the result along with the TransportOperation object
125
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
126
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
127
+ #
128
+ # @return [::Google::Cloud::Compute::V1::Operation]
129
+ # A result object deserialized from the server's reply
130
+ def cancel_request_remove_peering request_pb, options = nil
131
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
132
+
133
+ verb, uri, query_string_params, body = ServiceStub.transcode_cancel_request_remove_peering_request request_pb
134
+ query_string_params = if query_string_params.any?
135
+ query_string_params.to_h { |p| p.split "=", 2 }
136
+ else
137
+ {}
138
+ end
139
+
140
+ response = @client_stub.make_http_request(
141
+ verb,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "cancel_request_remove_peering",
146
+ options: options
147
+ )
148
+ operation = ::Gapic::Rest::TransportOperation.new response
149
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
154
+ end
155
+
116
156
  ##
117
157
  # Baseline implementation for the delete REST call
118
158
  #
@@ -576,6 +616,29 @@ module Google
576
616
  transcoder.transcode request_pb
577
617
  end
578
618
 
619
+ ##
620
+ # @private
621
+ #
622
+ # GRPC transcoding helper method for the cancel_request_remove_peering REST call
623
+ #
624
+ # @param request_pb [::Google::Cloud::Compute::V1::CancelRequestRemovePeeringNetworkRequest]
625
+ # A request object representing the call parameters. Required.
626
+ # @return [Array(String, [String, nil], Hash{String => String})]
627
+ # Uri, Body, Query string parameters
628
+ def self.transcode_cancel_request_remove_peering_request request_pb
629
+ transcoder = Gapic::Rest::GrpcTranscoder.new
630
+ .with_bindings(
631
+ uri_method: :post,
632
+ uri_template: "/compute/v1/projects/{project}/global/networks/{network}/cancelRequestRemovePeering",
633
+ body: "networks_cancel_request_remove_peering_request_resource",
634
+ matches: [
635
+ ["project", %r{^[^/]+/?$}, false],
636
+ ["network", %r{^[^/]+/?$}, false]
637
+ ]
638
+ )
639
+ transcoder.transcode request_pb
640
+ end
641
+
579
642
  ##
580
643
  # @private
581
644
  #
@@ -36,6 +36,7 @@ require "google/cloud/compute/v1/global_network_endpoint_groups/rest"
36
36
  require "google/cloud/compute/v1/global_operations/rest"
37
37
  require "google/cloud/compute/v1/global_organization_operations/rest"
38
38
  require "google/cloud/compute/v1/global_public_delegated_prefixes/rest"
39
+ require "google/cloud/compute/v1/global_vm_extension_policies/rest"
39
40
  require "google/cloud/compute/v1/health_checks/rest"
40
41
  require "google/cloud/compute/v1/image_family_views/rest"
41
42
  require "google/cloud/compute/v1/images/rest"
@@ -110,6 +111,8 @@ require "google/cloud/compute/v1/reservation_slots/rest"
110
111
  require "google/cloud/compute/v1/reservation_sub_blocks/rest"
111
112
  require "google/cloud/compute/v1/reservations/rest"
112
113
  require "google/cloud/compute/v1/resource_policies/rest"
114
+ require "google/cloud/compute/v1/rollout_plans/rest"
115
+ require "google/cloud/compute/v1/rollouts/rest"
113
116
  require "google/cloud/compute/v1/routers/rest"
114
117
  require "google/cloud/compute/v1/routes/rest"
115
118
  require "google/cloud/compute/v1/security_policies/rest"
@@ -0,0 +1,52 @@
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 "googleauth"
20
+
21
+ module Google
22
+ module Cloud
23
+ module Compute
24
+ module V1
25
+ module RolloutPlans
26
+ # Credentials for the RolloutPlans 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