google-cloud-compute-v1 3.8.0 → 3.9.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.
@@ -73,6 +73,46 @@ module Google
73
73
  stub ? @client_stub.stub_logger : @client_stub.logger
74
74
  end
75
75
 
76
+ ##
77
+ # Baseline implementation for the advance REST call
78
+ #
79
+ # @param request_pb [::Google::Cloud::Compute::V1::AdvanceRolloutRequest]
80
+ # A request object representing the call parameters. Required.
81
+ # @param options [::Gapic::CallOptions]
82
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
83
+ #
84
+ # @yield [result, operation] Access the result along with the TransportOperation object
85
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
86
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
87
+ #
88
+ # @return [::Google::Cloud::Compute::V1::Operation]
89
+ # A result object deserialized from the server's reply
90
+ def advance request_pb, options = nil
91
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
92
+
93
+ verb, uri, query_string_params, body = ServiceStub.transcode_advance_request request_pb
94
+ query_string_params = if query_string_params.any?
95
+ query_string_params.to_h { |p| p.split "=", 2 }
96
+ else
97
+ {}
98
+ end
99
+
100
+ response = @client_stub.make_http_request(
101
+ verb,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "advance",
106
+ options: options
107
+ )
108
+ operation = ::Gapic::Rest::TransportOperation.new response
109
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
114
+ end
115
+
76
116
  ##
77
117
  # Baseline implementation for the cancel REST call
78
118
  #
@@ -233,6 +273,108 @@ module Google
233
273
  end
234
274
  end
235
275
 
276
+ ##
277
+ # Baseline implementation for the pause REST call
278
+ #
279
+ # @param request_pb [::Google::Cloud::Compute::V1::PauseRolloutRequest]
280
+ # A request object representing the call parameters. Required.
281
+ # @param options [::Gapic::CallOptions]
282
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
283
+ #
284
+ # @yield [result, operation] Access the result along with the TransportOperation object
285
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
286
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
287
+ #
288
+ # @return [::Google::Cloud::Compute::V1::Operation]
289
+ # A result object deserialized from the server's reply
290
+ def pause request_pb, options = nil
291
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
292
+
293
+ verb, uri, query_string_params, body = ServiceStub.transcode_pause_request request_pb
294
+ query_string_params = if query_string_params.any?
295
+ query_string_params.to_h { |p| p.split "=", 2 }
296
+ else
297
+ {}
298
+ end
299
+
300
+ response = @client_stub.make_http_request(
301
+ verb,
302
+ uri: uri,
303
+ body: body || "",
304
+ params: query_string_params,
305
+ method_name: "pause",
306
+ options: options
307
+ )
308
+ operation = ::Gapic::Rest::TransportOperation.new response
309
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
310
+ catch :response do
311
+ yield result, operation if block_given?
312
+ result
313
+ end
314
+ end
315
+
316
+ ##
317
+ # Baseline implementation for the resume REST call
318
+ #
319
+ # @param request_pb [::Google::Cloud::Compute::V1::ResumeRolloutRequest]
320
+ # A request object representing the call parameters. Required.
321
+ # @param options [::Gapic::CallOptions]
322
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
323
+ #
324
+ # @yield [result, operation] Access the result along with the TransportOperation object
325
+ # @yieldparam result [::Google::Cloud::Compute::V1::Operation]
326
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
327
+ #
328
+ # @return [::Google::Cloud::Compute::V1::Operation]
329
+ # A result object deserialized from the server's reply
330
+ def resume request_pb, options = nil
331
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
332
+
333
+ verb, uri, query_string_params, body = ServiceStub.transcode_resume_request request_pb
334
+ query_string_params = if query_string_params.any?
335
+ query_string_params.to_h { |p| p.split "=", 2 }
336
+ else
337
+ {}
338
+ end
339
+
340
+ response = @client_stub.make_http_request(
341
+ verb,
342
+ uri: uri,
343
+ body: body || "",
344
+ params: query_string_params,
345
+ method_name: "resume",
346
+ options: options
347
+ )
348
+ operation = ::Gapic::Rest::TransportOperation.new response
349
+ result = ::Google::Cloud::Compute::V1::Operation.decode_json response.body, ignore_unknown_fields: true
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
354
+ end
355
+
356
+ ##
357
+ # @private
358
+ #
359
+ # GRPC transcoding helper method for the advance REST call
360
+ #
361
+ # @param request_pb [::Google::Cloud::Compute::V1::AdvanceRolloutRequest]
362
+ # A request object representing the call parameters. Required.
363
+ # @return [Array(String, [String, nil], Hash{String => String})]
364
+ # Uri, Body, Query string parameters
365
+ def self.transcode_advance_request request_pb
366
+ transcoder = Gapic::Rest::GrpcTranscoder.new
367
+ .with_bindings(
368
+ uri_method: :post,
369
+ uri_template: "/compute/v1/projects/{project}/global/rollouts/{rollout}/advance",
370
+ matches: [
371
+ ["project", %r{^[^/]+/?$}, false],
372
+ ["rollout", %r{^[^/]+/?$}, false]
373
+ ]
374
+ )
375
+ transcoder.transcode request_pb
376
+ end
377
+
236
378
  ##
237
379
  # @private
238
380
  #
@@ -319,6 +461,50 @@ module Google
319
461
  )
320
462
  transcoder.transcode request_pb
321
463
  end
464
+
465
+ ##
466
+ # @private
467
+ #
468
+ # GRPC transcoding helper method for the pause REST call
469
+ #
470
+ # @param request_pb [::Google::Cloud::Compute::V1::PauseRolloutRequest]
471
+ # A request object representing the call parameters. Required.
472
+ # @return [Array(String, [String, nil], Hash{String => String})]
473
+ # Uri, Body, Query string parameters
474
+ def self.transcode_pause_request request_pb
475
+ transcoder = Gapic::Rest::GrpcTranscoder.new
476
+ .with_bindings(
477
+ uri_method: :post,
478
+ uri_template: "/compute/v1/projects/{project}/global/rollouts/{rollout}/pause",
479
+ matches: [
480
+ ["project", %r{^[^/]+/?$}, false],
481
+ ["rollout", %r{^[^/]+/?$}, false]
482
+ ]
483
+ )
484
+ transcoder.transcode request_pb
485
+ end
486
+
487
+ ##
488
+ # @private
489
+ #
490
+ # GRPC transcoding helper method for the resume REST call
491
+ #
492
+ # @param request_pb [::Google::Cloud::Compute::V1::ResumeRolloutRequest]
493
+ # A request object representing the call parameters. Required.
494
+ # @return [Array(String, [String, nil], Hash{String => String})]
495
+ # Uri, Body, Query string parameters
496
+ def self.transcode_resume_request request_pb
497
+ transcoder = Gapic::Rest::GrpcTranscoder.new
498
+ .with_bindings(
499
+ uri_method: :post,
500
+ uri_template: "/compute/v1/projects/{project}/global/rollouts/{rollout}/resume",
501
+ matches: [
502
+ ["project", %r{^[^/]+/?$}, false],
503
+ ["rollout", %r{^[^/]+/?$}, false]
504
+ ]
505
+ )
506
+ transcoder.transcode request_pb
507
+ end
322
508
  end
323
509
  end
324
510
  end