google-cloud-scheduler-v1 0.4.0 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/scheduler/v1/cloud_scheduler/client.rb +223 -81
- data/lib/google/cloud/scheduler/v1/cloudscheduler_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1/cloudscheduler_services_pb.rb +1 -1
- data/lib/google/cloud/scheduler/v1/job_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1/target_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bd50fe7985db3c6c742d19817cdb5e1e668dc839014f18379f69ad5d507dbd9
|
4
|
+
data.tar.gz: '0097db72ff8c9d8930587258123eb605a165a51e504e790cbfbfabe716ffa4aa'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc1b02e7059d9b1716a3a851e38ae2421f8cbe7aca5f80ae0f9d815365d272324f12ef42202e60ef1ff4ae894bd376da3c4a0e87ab7c5687d71af69bae8bd4d1
|
7
|
+
data.tar.gz: 57ca482ec293791e47581edf3c4da3563211051a8b6604df32f743ec9e8a52cf4da0e365f26ff01bdce278d70deb049c3da5c33897281917348cad16bf6f2f02
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-scheduler-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Scheduler::V1::CloudScheduler::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `SCHEDULER_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `SCHEDULER_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/scheduler/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/scheduler/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new do |config|
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/scheduler/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/scheduler/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Scheduler::V1::ListJobsRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_jobs request
|
38
38
|
```
|
39
39
|
|
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Scheduler::V1::CloudScheduler::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all CloudScheduler clients
|
48
|
+
# ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -68,18 +67,12 @@ module Google
|
|
68
67
|
|
69
68
|
default_config.rpcs.list_jobs.timeout = 600.0
|
70
69
|
default_config.rpcs.list_jobs.retry_policy = {
|
71
|
-
initial_delay: 0.1,
|
72
|
-
max_delay: 60.0,
|
73
|
-
multiplier: 1.3,
|
74
|
-
retry_codes: [4, 14]
|
70
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
75
71
|
}
|
76
72
|
|
77
73
|
default_config.rpcs.get_job.timeout = 600.0
|
78
74
|
default_config.rpcs.get_job.retry_policy = {
|
79
|
-
initial_delay: 0.1,
|
80
|
-
max_delay: 60.0,
|
81
|
-
multiplier: 1.3,
|
82
|
-
retry_codes: [4, 14]
|
75
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
83
76
|
}
|
84
77
|
|
85
78
|
default_config.rpcs.create_job.timeout = 600.0
|
@@ -88,10 +81,7 @@ module Google
|
|
88
81
|
|
89
82
|
default_config.rpcs.delete_job.timeout = 600.0
|
90
83
|
default_config.rpcs.delete_job.retry_policy = {
|
91
|
-
initial_delay: 0.1,
|
92
|
-
max_delay: 60.0,
|
93
|
-
multiplier: 1.3,
|
94
|
-
retry_codes: [4, 14]
|
84
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
95
85
|
}
|
96
86
|
|
97
87
|
default_config.rpcs.pause_job.timeout = 600.0
|
@@ -129,19 +119,15 @@ module Google
|
|
129
119
|
##
|
130
120
|
# Create a new CloudScheduler client object.
|
131
121
|
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
# To create a new CloudScheduler client with the default
|
135
|
-
# configuration:
|
136
|
-
#
|
137
|
-
# client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
122
|
+
# @example
|
138
123
|
#
|
139
|
-
#
|
140
|
-
#
|
124
|
+
# # Create a client using the default configuration
|
125
|
+
# client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
141
126
|
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
127
|
+
# # Create a client using a custom configuration
|
128
|
+
# client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new do |config|
|
129
|
+
# config.timeout = 10.0
|
130
|
+
# end
|
145
131
|
#
|
146
132
|
# @yield [config] Configure the CloudScheduler client.
|
147
133
|
# @yieldparam config [Client::Configuration]
|
@@ -161,14 +147,13 @@ module Google
|
|
161
147
|
|
162
148
|
# Create credentials
|
163
149
|
credentials = @config.credentials
|
164
|
-
# Use self-signed JWT if the
|
150
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
165
151
|
# but only if the default endpoint does not have a region prefix.
|
166
|
-
enable_self_signed_jwt = @config.
|
167
|
-
@config.endpoint == Client.configure.endpoint &&
|
152
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
168
153
|
!@config.endpoint.split(".").first.include?("-")
|
169
154
|
credentials ||= Credentials.default scope: @config.scope,
|
170
155
|
enable_self_signed_jwt: enable_self_signed_jwt
|
171
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
156
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
172
157
|
credentials = Credentials.new credentials, scope: @config.scope
|
173
158
|
end
|
174
159
|
@quota_project_id = @config.quota_project
|
@@ -230,6 +215,27 @@ module Google
|
|
230
215
|
#
|
231
216
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
232
217
|
#
|
218
|
+
# @example Basic example
|
219
|
+
# require "google/cloud/scheduler/v1"
|
220
|
+
#
|
221
|
+
# # Create a client object. The client can be reused for multiple calls.
|
222
|
+
# client = Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
223
|
+
#
|
224
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
225
|
+
# request = Google::Cloud::Scheduler::V1::ListJobsRequest.new
|
226
|
+
#
|
227
|
+
# # Call the list_jobs method.
|
228
|
+
# result = client.list_jobs request
|
229
|
+
#
|
230
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
231
|
+
# # iterate over all elements by calling #each, and the enumerable
|
232
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
233
|
+
# # methods are also available for managing paging directly.
|
234
|
+
# result.each do |response|
|
235
|
+
# # Each element is of type ::Google::Cloud::Scheduler::V1::Job.
|
236
|
+
# p response
|
237
|
+
# end
|
238
|
+
#
|
233
239
|
def list_jobs request, options = nil
|
234
240
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
235
241
|
|
@@ -247,16 +253,20 @@ module Google
|
|
247
253
|
gapic_version: ::Google::Cloud::Scheduler::V1::VERSION
|
248
254
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
249
255
|
|
250
|
-
header_params = {
|
251
|
-
|
252
|
-
|
256
|
+
header_params = {}
|
257
|
+
if request.parent
|
258
|
+
header_params["parent"] = request.parent
|
259
|
+
end
|
260
|
+
|
253
261
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
254
262
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
255
263
|
|
256
264
|
options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
|
257
265
|
metadata: metadata,
|
258
266
|
retry_policy: @config.rpcs.list_jobs.retry_policy
|
259
|
-
|
267
|
+
|
268
|
+
options.apply_defaults timeout: @config.timeout,
|
269
|
+
metadata: @config.metadata,
|
260
270
|
retry_policy: @config.retry_policy
|
261
271
|
|
262
272
|
@cloud_scheduler_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
@@ -298,6 +308,21 @@ module Google
|
|
298
308
|
#
|
299
309
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
300
310
|
#
|
311
|
+
# @example Basic example
|
312
|
+
# require "google/cloud/scheduler/v1"
|
313
|
+
#
|
314
|
+
# # Create a client object. The client can be reused for multiple calls.
|
315
|
+
# client = Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
316
|
+
#
|
317
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
318
|
+
# request = Google::Cloud::Scheduler::V1::GetJobRequest.new
|
319
|
+
#
|
320
|
+
# # Call the get_job method.
|
321
|
+
# result = client.get_job request
|
322
|
+
#
|
323
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1::Job.
|
324
|
+
# p result
|
325
|
+
#
|
301
326
|
def get_job request, options = nil
|
302
327
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
303
328
|
|
@@ -315,16 +340,20 @@ module Google
|
|
315
340
|
gapic_version: ::Google::Cloud::Scheduler::V1::VERSION
|
316
341
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
317
342
|
|
318
|
-
header_params = {
|
319
|
-
|
320
|
-
|
343
|
+
header_params = {}
|
344
|
+
if request.name
|
345
|
+
header_params["name"] = request.name
|
346
|
+
end
|
347
|
+
|
321
348
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
322
349
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
323
350
|
|
324
351
|
options.apply_defaults timeout: @config.rpcs.get_job.timeout,
|
325
352
|
metadata: metadata,
|
326
353
|
retry_policy: @config.rpcs.get_job.retry_policy
|
327
|
-
|
354
|
+
|
355
|
+
options.apply_defaults timeout: @config.timeout,
|
356
|
+
metadata: @config.metadata,
|
328
357
|
retry_policy: @config.retry_policy
|
329
358
|
|
330
359
|
@cloud_scheduler_stub.call_rpc :get_job, request, options: options do |response, operation|
|
@@ -371,6 +400,21 @@ module Google
|
|
371
400
|
#
|
372
401
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
373
402
|
#
|
403
|
+
# @example Basic example
|
404
|
+
# require "google/cloud/scheduler/v1"
|
405
|
+
#
|
406
|
+
# # Create a client object. The client can be reused for multiple calls.
|
407
|
+
# client = Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
408
|
+
#
|
409
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
410
|
+
# request = Google::Cloud::Scheduler::V1::CreateJobRequest.new
|
411
|
+
#
|
412
|
+
# # Call the create_job method.
|
413
|
+
# result = client.create_job request
|
414
|
+
#
|
415
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1::Job.
|
416
|
+
# p result
|
417
|
+
#
|
374
418
|
def create_job request, options = nil
|
375
419
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
376
420
|
|
@@ -388,16 +432,20 @@ module Google
|
|
388
432
|
gapic_version: ::Google::Cloud::Scheduler::V1::VERSION
|
389
433
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
390
434
|
|
391
|
-
header_params = {
|
392
|
-
|
393
|
-
|
435
|
+
header_params = {}
|
436
|
+
if request.parent
|
437
|
+
header_params["parent"] = request.parent
|
438
|
+
end
|
439
|
+
|
394
440
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
395
441
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
396
442
|
|
397
443
|
options.apply_defaults timeout: @config.rpcs.create_job.timeout,
|
398
444
|
metadata: metadata,
|
399
445
|
retry_policy: @config.rpcs.create_job.retry_policy
|
400
|
-
|
446
|
+
|
447
|
+
options.apply_defaults timeout: @config.timeout,
|
448
|
+
metadata: @config.metadata,
|
401
449
|
retry_policy: @config.retry_policy
|
402
450
|
|
403
451
|
@cloud_scheduler_stub.call_rpc :create_job, request, options: options do |response, operation|
|
@@ -450,6 +498,21 @@ module Google
|
|
450
498
|
#
|
451
499
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
452
500
|
#
|
501
|
+
# @example Basic example
|
502
|
+
# require "google/cloud/scheduler/v1"
|
503
|
+
#
|
504
|
+
# # Create a client object. The client can be reused for multiple calls.
|
505
|
+
# client = Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
506
|
+
#
|
507
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
508
|
+
# request = Google::Cloud::Scheduler::V1::UpdateJobRequest.new
|
509
|
+
#
|
510
|
+
# # Call the update_job method.
|
511
|
+
# result = client.update_job request
|
512
|
+
#
|
513
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1::Job.
|
514
|
+
# p result
|
515
|
+
#
|
453
516
|
def update_job request, options = nil
|
454
517
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
455
518
|
|
@@ -467,16 +530,20 @@ module Google
|
|
467
530
|
gapic_version: ::Google::Cloud::Scheduler::V1::VERSION
|
468
531
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
469
532
|
|
470
|
-
header_params = {
|
471
|
-
|
472
|
-
|
533
|
+
header_params = {}
|
534
|
+
if request.job&.name
|
535
|
+
header_params["job.name"] = request.job.name
|
536
|
+
end
|
537
|
+
|
473
538
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
474
539
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
475
540
|
|
476
541
|
options.apply_defaults timeout: @config.rpcs.update_job.timeout,
|
477
542
|
metadata: metadata,
|
478
543
|
retry_policy: @config.rpcs.update_job.retry_policy
|
479
|
-
|
544
|
+
|
545
|
+
options.apply_defaults timeout: @config.timeout,
|
546
|
+
metadata: @config.metadata,
|
480
547
|
retry_policy: @config.retry_policy
|
481
548
|
|
482
549
|
@cloud_scheduler_stub.call_rpc :update_job, request, options: options do |response, operation|
|
@@ -517,6 +584,21 @@ module Google
|
|
517
584
|
#
|
518
585
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
519
586
|
#
|
587
|
+
# @example Basic example
|
588
|
+
# require "google/cloud/scheduler/v1"
|
589
|
+
#
|
590
|
+
# # Create a client object. The client can be reused for multiple calls.
|
591
|
+
# client = Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
592
|
+
#
|
593
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
594
|
+
# request = Google::Cloud::Scheduler::V1::DeleteJobRequest.new
|
595
|
+
#
|
596
|
+
# # Call the delete_job method.
|
597
|
+
# result = client.delete_job request
|
598
|
+
#
|
599
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
600
|
+
# p result
|
601
|
+
#
|
520
602
|
def delete_job request, options = nil
|
521
603
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
522
604
|
|
@@ -534,16 +616,20 @@ module Google
|
|
534
616
|
gapic_version: ::Google::Cloud::Scheduler::V1::VERSION
|
535
617
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
536
618
|
|
537
|
-
header_params = {
|
538
|
-
|
539
|
-
|
619
|
+
header_params = {}
|
620
|
+
if request.name
|
621
|
+
header_params["name"] = request.name
|
622
|
+
end
|
623
|
+
|
540
624
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
541
625
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
542
626
|
|
543
627
|
options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
|
544
628
|
metadata: metadata,
|
545
629
|
retry_policy: @config.rpcs.delete_job.retry_policy
|
546
|
-
|
630
|
+
|
631
|
+
options.apply_defaults timeout: @config.timeout,
|
632
|
+
metadata: @config.metadata,
|
547
633
|
retry_policy: @config.retry_policy
|
548
634
|
|
549
635
|
@cloud_scheduler_stub.call_rpc :delete_job, request, options: options do |response, operation|
|
@@ -590,6 +676,21 @@ module Google
|
|
590
676
|
#
|
591
677
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
592
678
|
#
|
679
|
+
# @example Basic example
|
680
|
+
# require "google/cloud/scheduler/v1"
|
681
|
+
#
|
682
|
+
# # Create a client object. The client can be reused for multiple calls.
|
683
|
+
# client = Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
684
|
+
#
|
685
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
686
|
+
# request = Google::Cloud::Scheduler::V1::PauseJobRequest.new
|
687
|
+
#
|
688
|
+
# # Call the pause_job method.
|
689
|
+
# result = client.pause_job request
|
690
|
+
#
|
691
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1::Job.
|
692
|
+
# p result
|
693
|
+
#
|
593
694
|
def pause_job request, options = nil
|
594
695
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
595
696
|
|
@@ -607,16 +708,20 @@ module Google
|
|
607
708
|
gapic_version: ::Google::Cloud::Scheduler::V1::VERSION
|
608
709
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
609
710
|
|
610
|
-
header_params = {
|
611
|
-
|
612
|
-
|
711
|
+
header_params = {}
|
712
|
+
if request.name
|
713
|
+
header_params["name"] = request.name
|
714
|
+
end
|
715
|
+
|
613
716
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
614
717
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
615
718
|
|
616
719
|
options.apply_defaults timeout: @config.rpcs.pause_job.timeout,
|
617
720
|
metadata: metadata,
|
618
721
|
retry_policy: @config.rpcs.pause_job.retry_policy
|
619
|
-
|
722
|
+
|
723
|
+
options.apply_defaults timeout: @config.timeout,
|
724
|
+
metadata: @config.metadata,
|
620
725
|
retry_policy: @config.retry_policy
|
621
726
|
|
622
727
|
@cloud_scheduler_stub.call_rpc :pause_job, request, options: options do |response, operation|
|
@@ -662,6 +767,21 @@ module Google
|
|
662
767
|
#
|
663
768
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
664
769
|
#
|
770
|
+
# @example Basic example
|
771
|
+
# require "google/cloud/scheduler/v1"
|
772
|
+
#
|
773
|
+
# # Create a client object. The client can be reused for multiple calls.
|
774
|
+
# client = Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
775
|
+
#
|
776
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
777
|
+
# request = Google::Cloud::Scheduler::V1::ResumeJobRequest.new
|
778
|
+
#
|
779
|
+
# # Call the resume_job method.
|
780
|
+
# result = client.resume_job request
|
781
|
+
#
|
782
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1::Job.
|
783
|
+
# p result
|
784
|
+
#
|
665
785
|
def resume_job request, options = nil
|
666
786
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
667
787
|
|
@@ -679,16 +799,20 @@ module Google
|
|
679
799
|
gapic_version: ::Google::Cloud::Scheduler::V1::VERSION
|
680
800
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
681
801
|
|
682
|
-
header_params = {
|
683
|
-
|
684
|
-
|
802
|
+
header_params = {}
|
803
|
+
if request.name
|
804
|
+
header_params["name"] = request.name
|
805
|
+
end
|
806
|
+
|
685
807
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
686
808
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
687
809
|
|
688
810
|
options.apply_defaults timeout: @config.rpcs.resume_job.timeout,
|
689
811
|
metadata: metadata,
|
690
812
|
retry_policy: @config.rpcs.resume_job.retry_policy
|
691
|
-
|
813
|
+
|
814
|
+
options.apply_defaults timeout: @config.timeout,
|
815
|
+
metadata: @config.metadata,
|
692
816
|
retry_policy: @config.retry_policy
|
693
817
|
|
694
818
|
@cloud_scheduler_stub.call_rpc :resume_job, request, options: options do |response, operation|
|
@@ -732,6 +856,21 @@ module Google
|
|
732
856
|
#
|
733
857
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
734
858
|
#
|
859
|
+
# @example Basic example
|
860
|
+
# require "google/cloud/scheduler/v1"
|
861
|
+
#
|
862
|
+
# # Create a client object. The client can be reused for multiple calls.
|
863
|
+
# client = Google::Cloud::Scheduler::V1::CloudScheduler::Client.new
|
864
|
+
#
|
865
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
866
|
+
# request = Google::Cloud::Scheduler::V1::RunJobRequest.new
|
867
|
+
#
|
868
|
+
# # Call the run_job method.
|
869
|
+
# result = client.run_job request
|
870
|
+
#
|
871
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1::Job.
|
872
|
+
# p result
|
873
|
+
#
|
735
874
|
def run_job request, options = nil
|
736
875
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
737
876
|
|
@@ -749,16 +888,20 @@ module Google
|
|
749
888
|
gapic_version: ::Google::Cloud::Scheduler::V1::VERSION
|
750
889
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
751
890
|
|
752
|
-
header_params = {
|
753
|
-
|
754
|
-
|
891
|
+
header_params = {}
|
892
|
+
if request.name
|
893
|
+
header_params["name"] = request.name
|
894
|
+
end
|
895
|
+
|
755
896
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
756
897
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
757
898
|
|
758
899
|
options.apply_defaults timeout: @config.rpcs.run_job.timeout,
|
759
900
|
metadata: metadata,
|
760
901
|
retry_policy: @config.rpcs.run_job.retry_policy
|
761
|
-
|
902
|
+
|
903
|
+
options.apply_defaults timeout: @config.timeout,
|
904
|
+
metadata: @config.metadata,
|
762
905
|
retry_policy: @config.retry_policy
|
763
906
|
|
764
907
|
@cloud_scheduler_stub.call_rpc :run_job, request, options: options do |response, operation|
|
@@ -782,22 +925,21 @@ module Google
|
|
782
925
|
# Configuration can be applied globally to all clients, or to a single client
|
783
926
|
# on construction.
|
784
927
|
#
|
785
|
-
#
|
786
|
-
#
|
787
|
-
#
|
788
|
-
# to 20 seconds,
|
789
|
-
#
|
790
|
-
#
|
791
|
-
#
|
792
|
-
#
|
793
|
-
#
|
794
|
-
#
|
795
|
-
#
|
796
|
-
#
|
797
|
-
#
|
798
|
-
#
|
799
|
-
#
|
800
|
-
# end
|
928
|
+
# @example
|
929
|
+
#
|
930
|
+
# # Modify the global config, setting the timeout for
|
931
|
+
# # list_jobs to 20 seconds,
|
932
|
+
# # and all remaining timeouts to 10 seconds.
|
933
|
+
# ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.configure do |config|
|
934
|
+
# config.timeout = 10.0
|
935
|
+
# config.rpcs.list_jobs.timeout = 20.0
|
936
|
+
# end
|
937
|
+
#
|
938
|
+
# # Apply the above configuration only to a new client.
|
939
|
+
# client = ::Google::Cloud::Scheduler::V1::CloudScheduler::Client.new do |config|
|
940
|
+
# config.timeout = 10.0
|
941
|
+
# config.rpcs.list_jobs.timeout = 20.0
|
942
|
+
# end
|
801
943
|
#
|
802
944
|
# @!attribute [rw] endpoint
|
803
945
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/scheduler/v1/cloudscheduler.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
|
|
10
8
|
require 'google/cloud/scheduler/v1/job_pb'
|
11
9
|
require 'google/protobuf/empty_pb'
|
12
10
|
require 'google/protobuf/field_mask_pb'
|
11
|
+
require 'google/protobuf'
|
12
|
+
|
13
13
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
14
|
add_file("google/cloud/scheduler/v1/cloudscheduler.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.cloud.scheduler.v1.ListJobsRequest" do
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/scheduler/v1/job.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/resource_pb'
|
7
5
|
require 'google/cloud/scheduler/v1/target_pb'
|
8
6
|
require 'google/protobuf/duration_pb'
|
9
7
|
require 'google/protobuf/timestamp_pb'
|
10
8
|
require 'google/rpc/status_pb'
|
11
9
|
require 'google/api/annotations_pb'
|
10
|
+
require 'google/protobuf'
|
11
|
+
|
12
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
13
|
add_file("google/cloud/scheduler/v1/job.proto", :syntax => :proto3) do
|
14
14
|
add_message "google.cloud.scheduler.v1.Job" do
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/scheduler/v1/target.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/resource_pb'
|
7
5
|
require 'google/api/annotations_pb'
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
9
|
add_file("google/cloud/scheduler/v1/target.proto", :syntax => :proto3) do
|
10
10
|
add_message "google.cloud.scheduler.v1.HttpTarget" do
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-scheduler-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.7'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 2.a
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.7'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 2.a
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: google-cloud-errors
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
215
|
- !ruby/object:Gem::Version
|
210
216
|
version: '0'
|
211
217
|
requirements: []
|
212
|
-
rubygems_version: 3.2.
|
218
|
+
rubygems_version: 3.2.17
|
213
219
|
signing_key:
|
214
220
|
specification_version: 4
|
215
221
|
summary: API Client library for the Cloud Scheduler V1 API
|