google-cloud-scheduler-v1beta1 0.4.0 → 0.4.4
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.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/scheduler/v1beta1/cloud_scheduler/client.rb +225 -89
- data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1beta1/cloudscheduler_services_pb.rb +1 -1
- data/lib/google/cloud/scheduler/v1beta1/job_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1beta1/target_pb.rb +2 -2
- data/lib/google/cloud/scheduler/v1beta1/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: bd067375a1add1e8790bc70489e7ff4fee16df690c2383abebe4411ef63d5999
|
4
|
+
data.tar.gz: 29fa207e7759e9aa65bfcd002f987b1eab0689462ba899abe40689c5a5ebe590
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fa6b5bdf913193d5b1313ac42ea9e1b2a1e1d780c9c11540343da70fb984232573ca86075f40797cacd2c0e92aae4e7359e0ff85cbbff347863eb6a655b5813
|
7
|
+
data.tar.gz: ff33594f8b76a59eba604a5ebfc5e9fdab09aeb9e76178f0523887efb93b1ac61e0498bd9c8e47a4fe8367a9af6ecd9ed249bdd6255f7450dcbb17cf06898c23
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-scheduler-v1beta1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Scheduler::V1beta1::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/v1beta1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Scheduler::V1beta1::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/v1beta1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new do |con
|
|
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/v1beta1"
|
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/v1beta1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Scheduler::V1beta1::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::V1beta1::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::V1beta1::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,26 +81,17 @@ 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
|
98
88
|
default_config.rpcs.pause_job.retry_policy = {
|
99
|
-
initial_delay: 0.1,
|
100
|
-
max_delay: 60.0,
|
101
|
-
multiplier: 1.3,
|
102
|
-
retry_codes: [4, 14]
|
89
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
103
90
|
}
|
104
91
|
|
105
92
|
default_config.rpcs.resume_job.timeout = 600.0
|
106
93
|
default_config.rpcs.resume_job.retry_policy = {
|
107
|
-
initial_delay: 0.1,
|
108
|
-
max_delay: 60.0,
|
109
|
-
multiplier: 1.3,
|
110
|
-
retry_codes: [4, 14]
|
94
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
111
95
|
}
|
112
96
|
|
113
97
|
default_config.rpcs.run_job.timeout = 600.0
|
@@ -141,19 +125,15 @@ module Google
|
|
141
125
|
##
|
142
126
|
# Create a new CloudScheduler client object.
|
143
127
|
#
|
144
|
-
#
|
145
|
-
#
|
146
|
-
# To create a new CloudScheduler client with the default
|
147
|
-
# configuration:
|
148
|
-
#
|
149
|
-
# client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
128
|
+
# @example
|
150
129
|
#
|
151
|
-
#
|
152
|
-
#
|
130
|
+
# # Create a client using the default configuration
|
131
|
+
# client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
153
132
|
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
133
|
+
# # Create a client using a custom configuration
|
134
|
+
# client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new do |config|
|
135
|
+
# config.timeout = 10.0
|
136
|
+
# end
|
157
137
|
#
|
158
138
|
# @yield [config] Configure the CloudScheduler client.
|
159
139
|
# @yieldparam config [Client::Configuration]
|
@@ -173,14 +153,13 @@ module Google
|
|
173
153
|
|
174
154
|
# Create credentials
|
175
155
|
credentials = @config.credentials
|
176
|
-
# Use self-signed JWT if the
|
156
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
177
157
|
# but only if the default endpoint does not have a region prefix.
|
178
|
-
enable_self_signed_jwt = @config.
|
179
|
-
@config.endpoint == Client.configure.endpoint &&
|
158
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
180
159
|
!@config.endpoint.split(".").first.include?("-")
|
181
160
|
credentials ||= Credentials.default scope: @config.scope,
|
182
161
|
enable_self_signed_jwt: enable_self_signed_jwt
|
183
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
162
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
184
163
|
credentials = Credentials.new credentials, scope: @config.scope
|
185
164
|
end
|
186
165
|
@quota_project_id = @config.quota_project
|
@@ -242,6 +221,27 @@ module Google
|
|
242
221
|
#
|
243
222
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
244
223
|
#
|
224
|
+
# @example Basic example
|
225
|
+
# require "google/cloud/scheduler/v1beta1"
|
226
|
+
#
|
227
|
+
# # Create a client object. The client can be reused for multiple calls.
|
228
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
229
|
+
#
|
230
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
231
|
+
# request = Google::Cloud::Scheduler::V1beta1::ListJobsRequest.new
|
232
|
+
#
|
233
|
+
# # Call the list_jobs method.
|
234
|
+
# result = client.list_jobs request
|
235
|
+
#
|
236
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
237
|
+
# # iterate over all elements by calling #each, and the enumerable
|
238
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
239
|
+
# # methods are also available for managing paging directly.
|
240
|
+
# result.each do |response|
|
241
|
+
# # Each element is of type ::Google::Cloud::Scheduler::V1beta1::Job.
|
242
|
+
# p response
|
243
|
+
# end
|
244
|
+
#
|
245
245
|
def list_jobs request, options = nil
|
246
246
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
247
247
|
|
@@ -259,16 +259,20 @@ module Google
|
|
259
259
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
260
260
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
261
261
|
|
262
|
-
header_params = {
|
263
|
-
|
264
|
-
|
262
|
+
header_params = {}
|
263
|
+
if request.parent
|
264
|
+
header_params["parent"] = request.parent
|
265
|
+
end
|
266
|
+
|
265
267
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
266
268
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
267
269
|
|
268
270
|
options.apply_defaults timeout: @config.rpcs.list_jobs.timeout,
|
269
271
|
metadata: metadata,
|
270
272
|
retry_policy: @config.rpcs.list_jobs.retry_policy
|
271
|
-
|
273
|
+
|
274
|
+
options.apply_defaults timeout: @config.timeout,
|
275
|
+
metadata: @config.metadata,
|
272
276
|
retry_policy: @config.retry_policy
|
273
277
|
|
274
278
|
@cloud_scheduler_stub.call_rpc :list_jobs, request, options: options do |response, operation|
|
@@ -310,6 +314,21 @@ module Google
|
|
310
314
|
#
|
311
315
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
312
316
|
#
|
317
|
+
# @example Basic example
|
318
|
+
# require "google/cloud/scheduler/v1beta1"
|
319
|
+
#
|
320
|
+
# # Create a client object. The client can be reused for multiple calls.
|
321
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
322
|
+
#
|
323
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
324
|
+
# request = Google::Cloud::Scheduler::V1beta1::GetJobRequest.new
|
325
|
+
#
|
326
|
+
# # Call the get_job method.
|
327
|
+
# result = client.get_job request
|
328
|
+
#
|
329
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
330
|
+
# p result
|
331
|
+
#
|
313
332
|
def get_job request, options = nil
|
314
333
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
315
334
|
|
@@ -327,16 +346,20 @@ module Google
|
|
327
346
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
328
347
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
329
348
|
|
330
|
-
header_params = {
|
331
|
-
|
332
|
-
|
349
|
+
header_params = {}
|
350
|
+
if request.name
|
351
|
+
header_params["name"] = request.name
|
352
|
+
end
|
353
|
+
|
333
354
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
334
355
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
335
356
|
|
336
357
|
options.apply_defaults timeout: @config.rpcs.get_job.timeout,
|
337
358
|
metadata: metadata,
|
338
359
|
retry_policy: @config.rpcs.get_job.retry_policy
|
339
|
-
|
360
|
+
|
361
|
+
options.apply_defaults timeout: @config.timeout,
|
362
|
+
metadata: @config.metadata,
|
340
363
|
retry_policy: @config.retry_policy
|
341
364
|
|
342
365
|
@cloud_scheduler_stub.call_rpc :get_job, request, options: options do |response, operation|
|
@@ -383,6 +406,21 @@ module Google
|
|
383
406
|
#
|
384
407
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
385
408
|
#
|
409
|
+
# @example Basic example
|
410
|
+
# require "google/cloud/scheduler/v1beta1"
|
411
|
+
#
|
412
|
+
# # Create a client object. The client can be reused for multiple calls.
|
413
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
414
|
+
#
|
415
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
416
|
+
# request = Google::Cloud::Scheduler::V1beta1::CreateJobRequest.new
|
417
|
+
#
|
418
|
+
# # Call the create_job method.
|
419
|
+
# result = client.create_job request
|
420
|
+
#
|
421
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
422
|
+
# p result
|
423
|
+
#
|
386
424
|
def create_job request, options = nil
|
387
425
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
388
426
|
|
@@ -400,16 +438,20 @@ module Google
|
|
400
438
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
401
439
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
402
440
|
|
403
|
-
header_params = {
|
404
|
-
|
405
|
-
|
441
|
+
header_params = {}
|
442
|
+
if request.parent
|
443
|
+
header_params["parent"] = request.parent
|
444
|
+
end
|
445
|
+
|
406
446
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
407
447
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
408
448
|
|
409
449
|
options.apply_defaults timeout: @config.rpcs.create_job.timeout,
|
410
450
|
metadata: metadata,
|
411
451
|
retry_policy: @config.rpcs.create_job.retry_policy
|
412
|
-
|
452
|
+
|
453
|
+
options.apply_defaults timeout: @config.timeout,
|
454
|
+
metadata: @config.metadata,
|
413
455
|
retry_policy: @config.retry_policy
|
414
456
|
|
415
457
|
@cloud_scheduler_stub.call_rpc :create_job, request, options: options do |response, operation|
|
@@ -462,6 +504,21 @@ module Google
|
|
462
504
|
#
|
463
505
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
464
506
|
#
|
507
|
+
# @example Basic example
|
508
|
+
# require "google/cloud/scheduler/v1beta1"
|
509
|
+
#
|
510
|
+
# # Create a client object. The client can be reused for multiple calls.
|
511
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
512
|
+
#
|
513
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
514
|
+
# request = Google::Cloud::Scheduler::V1beta1::UpdateJobRequest.new
|
515
|
+
#
|
516
|
+
# # Call the update_job method.
|
517
|
+
# result = client.update_job request
|
518
|
+
#
|
519
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
520
|
+
# p result
|
521
|
+
#
|
465
522
|
def update_job request, options = nil
|
466
523
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
467
524
|
|
@@ -479,16 +536,20 @@ module Google
|
|
479
536
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
480
537
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
481
538
|
|
482
|
-
header_params = {
|
483
|
-
|
484
|
-
|
539
|
+
header_params = {}
|
540
|
+
if request.job&.name
|
541
|
+
header_params["job.name"] = request.job.name
|
542
|
+
end
|
543
|
+
|
485
544
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
486
545
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
487
546
|
|
488
547
|
options.apply_defaults timeout: @config.rpcs.update_job.timeout,
|
489
548
|
metadata: metadata,
|
490
549
|
retry_policy: @config.rpcs.update_job.retry_policy
|
491
|
-
|
550
|
+
|
551
|
+
options.apply_defaults timeout: @config.timeout,
|
552
|
+
metadata: @config.metadata,
|
492
553
|
retry_policy: @config.retry_policy
|
493
554
|
|
494
555
|
@cloud_scheduler_stub.call_rpc :update_job, request, options: options do |response, operation|
|
@@ -529,6 +590,21 @@ module Google
|
|
529
590
|
#
|
530
591
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
531
592
|
#
|
593
|
+
# @example Basic example
|
594
|
+
# require "google/cloud/scheduler/v1beta1"
|
595
|
+
#
|
596
|
+
# # Create a client object. The client can be reused for multiple calls.
|
597
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
598
|
+
#
|
599
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
600
|
+
# request = Google::Cloud::Scheduler::V1beta1::DeleteJobRequest.new
|
601
|
+
#
|
602
|
+
# # Call the delete_job method.
|
603
|
+
# result = client.delete_job request
|
604
|
+
#
|
605
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
606
|
+
# p result
|
607
|
+
#
|
532
608
|
def delete_job request, options = nil
|
533
609
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
534
610
|
|
@@ -546,16 +622,20 @@ module Google
|
|
546
622
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
547
623
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
548
624
|
|
549
|
-
header_params = {
|
550
|
-
|
551
|
-
|
625
|
+
header_params = {}
|
626
|
+
if request.name
|
627
|
+
header_params["name"] = request.name
|
628
|
+
end
|
629
|
+
|
552
630
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
553
631
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
554
632
|
|
555
633
|
options.apply_defaults timeout: @config.rpcs.delete_job.timeout,
|
556
634
|
metadata: metadata,
|
557
635
|
retry_policy: @config.rpcs.delete_job.retry_policy
|
558
|
-
|
636
|
+
|
637
|
+
options.apply_defaults timeout: @config.timeout,
|
638
|
+
metadata: @config.metadata,
|
559
639
|
retry_policy: @config.retry_policy
|
560
640
|
|
561
641
|
@cloud_scheduler_stub.call_rpc :delete_job, request, options: options do |response, operation|
|
@@ -602,6 +682,21 @@ module Google
|
|
602
682
|
#
|
603
683
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
604
684
|
#
|
685
|
+
# @example Basic example
|
686
|
+
# require "google/cloud/scheduler/v1beta1"
|
687
|
+
#
|
688
|
+
# # Create a client object. The client can be reused for multiple calls.
|
689
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
690
|
+
#
|
691
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
692
|
+
# request = Google::Cloud::Scheduler::V1beta1::PauseJobRequest.new
|
693
|
+
#
|
694
|
+
# # Call the pause_job method.
|
695
|
+
# result = client.pause_job request
|
696
|
+
#
|
697
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
698
|
+
# p result
|
699
|
+
#
|
605
700
|
def pause_job request, options = nil
|
606
701
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
607
702
|
|
@@ -619,16 +714,20 @@ module Google
|
|
619
714
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
620
715
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
621
716
|
|
622
|
-
header_params = {
|
623
|
-
|
624
|
-
|
717
|
+
header_params = {}
|
718
|
+
if request.name
|
719
|
+
header_params["name"] = request.name
|
720
|
+
end
|
721
|
+
|
625
722
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
626
723
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
627
724
|
|
628
725
|
options.apply_defaults timeout: @config.rpcs.pause_job.timeout,
|
629
726
|
metadata: metadata,
|
630
727
|
retry_policy: @config.rpcs.pause_job.retry_policy
|
631
|
-
|
728
|
+
|
729
|
+
options.apply_defaults timeout: @config.timeout,
|
730
|
+
metadata: @config.metadata,
|
632
731
|
retry_policy: @config.retry_policy
|
633
732
|
|
634
733
|
@cloud_scheduler_stub.call_rpc :pause_job, request, options: options do |response, operation|
|
@@ -674,6 +773,21 @@ module Google
|
|
674
773
|
#
|
675
774
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
676
775
|
#
|
776
|
+
# @example Basic example
|
777
|
+
# require "google/cloud/scheduler/v1beta1"
|
778
|
+
#
|
779
|
+
# # Create a client object. The client can be reused for multiple calls.
|
780
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
781
|
+
#
|
782
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
783
|
+
# request = Google::Cloud::Scheduler::V1beta1::ResumeJobRequest.new
|
784
|
+
#
|
785
|
+
# # Call the resume_job method.
|
786
|
+
# result = client.resume_job request
|
787
|
+
#
|
788
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
789
|
+
# p result
|
790
|
+
#
|
677
791
|
def resume_job request, options = nil
|
678
792
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
679
793
|
|
@@ -691,16 +805,20 @@ module Google
|
|
691
805
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
692
806
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
693
807
|
|
694
|
-
header_params = {
|
695
|
-
|
696
|
-
|
808
|
+
header_params = {}
|
809
|
+
if request.name
|
810
|
+
header_params["name"] = request.name
|
811
|
+
end
|
812
|
+
|
697
813
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
698
814
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
699
815
|
|
700
816
|
options.apply_defaults timeout: @config.rpcs.resume_job.timeout,
|
701
817
|
metadata: metadata,
|
702
818
|
retry_policy: @config.rpcs.resume_job.retry_policy
|
703
|
-
|
819
|
+
|
820
|
+
options.apply_defaults timeout: @config.timeout,
|
821
|
+
metadata: @config.metadata,
|
704
822
|
retry_policy: @config.retry_policy
|
705
823
|
|
706
824
|
@cloud_scheduler_stub.call_rpc :resume_job, request, options: options do |response, operation|
|
@@ -744,6 +862,21 @@ module Google
|
|
744
862
|
#
|
745
863
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
746
864
|
#
|
865
|
+
# @example Basic example
|
866
|
+
# require "google/cloud/scheduler/v1beta1"
|
867
|
+
#
|
868
|
+
# # Create a client object. The client can be reused for multiple calls.
|
869
|
+
# client = Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new
|
870
|
+
#
|
871
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
872
|
+
# request = Google::Cloud::Scheduler::V1beta1::RunJobRequest.new
|
873
|
+
#
|
874
|
+
# # Call the run_job method.
|
875
|
+
# result = client.run_job request
|
876
|
+
#
|
877
|
+
# # The returned object is of type Google::Cloud::Scheduler::V1beta1::Job.
|
878
|
+
# p result
|
879
|
+
#
|
747
880
|
def run_job request, options = nil
|
748
881
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
749
882
|
|
@@ -761,16 +894,20 @@ module Google
|
|
761
894
|
gapic_version: ::Google::Cloud::Scheduler::V1beta1::VERSION
|
762
895
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
763
896
|
|
764
|
-
header_params = {
|
765
|
-
|
766
|
-
|
897
|
+
header_params = {}
|
898
|
+
if request.name
|
899
|
+
header_params["name"] = request.name
|
900
|
+
end
|
901
|
+
|
767
902
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
768
903
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
769
904
|
|
770
905
|
options.apply_defaults timeout: @config.rpcs.run_job.timeout,
|
771
906
|
metadata: metadata,
|
772
907
|
retry_policy: @config.rpcs.run_job.retry_policy
|
773
|
-
|
908
|
+
|
909
|
+
options.apply_defaults timeout: @config.timeout,
|
910
|
+
metadata: @config.metadata,
|
774
911
|
retry_policy: @config.retry_policy
|
775
912
|
|
776
913
|
@cloud_scheduler_stub.call_rpc :run_job, request, options: options do |response, operation|
|
@@ -794,22 +931,21 @@ module Google
|
|
794
931
|
# Configuration can be applied globally to all clients, or to a single client
|
795
932
|
# on construction.
|
796
933
|
#
|
797
|
-
#
|
798
|
-
#
|
799
|
-
#
|
800
|
-
# to 20 seconds,
|
801
|
-
#
|
802
|
-
#
|
803
|
-
#
|
804
|
-
#
|
805
|
-
#
|
806
|
-
#
|
807
|
-
#
|
808
|
-
#
|
809
|
-
#
|
810
|
-
#
|
811
|
-
#
|
812
|
-
# end
|
934
|
+
# @example
|
935
|
+
#
|
936
|
+
# # Modify the global config, setting the timeout for
|
937
|
+
# # list_jobs to 20 seconds,
|
938
|
+
# # and all remaining timeouts to 10 seconds.
|
939
|
+
# ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.configure do |config|
|
940
|
+
# config.timeout = 10.0
|
941
|
+
# config.rpcs.list_jobs.timeout = 20.0
|
942
|
+
# end
|
943
|
+
#
|
944
|
+
# # Apply the above configuration only to a new client.
|
945
|
+
# client = ::Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client.new do |config|
|
946
|
+
# config.timeout = 10.0
|
947
|
+
# config.rpcs.list_jobs.timeout = 20.0
|
948
|
+
# end
|
813
949
|
#
|
814
950
|
# @!attribute [rw] endpoint
|
815
951
|
# 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/v1beta1/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/v1beta1/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/v1beta1/cloudscheduler.proto", :syntax => :proto3) do
|
15
15
|
add_message "google.cloud.scheduler.v1beta1.ListJobsRequest" do
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/scheduler/v1beta1/job.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/resource_pb'
|
7
5
|
require 'google/cloud/scheduler/v1beta1/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/v1beta1/job.proto", :syntax => :proto3) do
|
14
14
|
add_message "google.cloud.scheduler.v1beta1.Job" do
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/scheduler/v1beta1/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/v1beta1/target.proto", :syntax => :proto3) do
|
10
10
|
add_message "google.cloud.scheduler.v1beta1.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-v1beta1
|
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 V1beta1 API
|