google-cloud-workflows-v1 0.1.0 → 0.1.2
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/workflows/v1/version.rb +1 -1
- data/lib/google/cloud/workflows/v1/workflows/client.rb +45 -42
- data/lib/google/cloud/workflows/v1/workflows/operations.rb +31 -22
- data/proto_docs/google/api/field_behavior.rb +6 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 664489d75ccc335bf98d78001acd33f786426d8682c008c214b58ac0e8a0e848
|
4
|
+
data.tar.gz: 477b2f0818547c77e94d0ec27621f0f9d014dc03a15b6a56779ac37420c19330
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24ea2ac4b3af0b27d39891ea9957a782c1c87339ff0bbc510b9e0f3fafe42b32cac91bfe9450bd659c003868372c9bb5b4d0f781f9fa201f42f95d773ab8b8cf
|
7
|
+
data.tar.gz: cc56a6f40cbb76444a7e94149dbddcdeab827add7ea3e241c73fea39d6b8db82c8c7fb514c8e23ccec9a4d162eb8ea563d21e9d97ad19ad8e190bc10e2fe2d02
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-workflows-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Workflows::V1::Workflows::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `WORKFLOWS_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `WORKFLOWS_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/workflows/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Workflows::V1::Workflows::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/workflows/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Workflows::V1::Workflows::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/workflows/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/workflows/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Workflows::V1::Workflows::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.list_workflows request
|
38
38
|
```
|
39
39
|
|
@@ -43,13 +43,12 @@ module Google
|
|
43
43
|
# See {::Google::Cloud::Workflows::V1::Workflows::Client::Configuration}
|
44
44
|
# for a description of the configuration fields.
|
45
45
|
#
|
46
|
-
#
|
46
|
+
# @example
|
47
47
|
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# end
|
48
|
+
# # Modify the configuration for all Workflows clients
|
49
|
+
# ::Google::Cloud::Workflows::V1::Workflows::Client.configure do |config|
|
50
|
+
# config.timeout = 10.0
|
51
|
+
# end
|
53
52
|
#
|
54
53
|
# @yield [config] Configure the Client client.
|
55
54
|
# @yieldparam config [Client::Configuration]
|
@@ -96,19 +95,15 @@ module Google
|
|
96
95
|
##
|
97
96
|
# Create a new Workflows client object.
|
98
97
|
#
|
99
|
-
#
|
100
|
-
#
|
101
|
-
# To create a new Workflows client with the default
|
102
|
-
# configuration:
|
103
|
-
#
|
104
|
-
# client = ::Google::Cloud::Workflows::V1::Workflows::Client.new
|
98
|
+
# @example
|
105
99
|
#
|
106
|
-
#
|
107
|
-
#
|
100
|
+
# # Create a client using the default configuration
|
101
|
+
# client = ::Google::Cloud::Workflows::V1::Workflows::Client.new
|
108
102
|
#
|
109
|
-
#
|
110
|
-
#
|
111
|
-
#
|
103
|
+
# # Create a client using a custom configuration
|
104
|
+
# client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config|
|
105
|
+
# config.timeout = 10.0
|
106
|
+
# end
|
112
107
|
#
|
113
108
|
# @yield [config] Configure the Workflows client.
|
114
109
|
# @yieldparam config [Client::Configuration]
|
@@ -128,14 +123,13 @@ module Google
|
|
128
123
|
|
129
124
|
# Create credentials
|
130
125
|
credentials = @config.credentials
|
131
|
-
# Use self-signed JWT if the
|
126
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
132
127
|
# but only if the default endpoint does not have a region prefix.
|
133
|
-
enable_self_signed_jwt = @config.
|
134
|
-
@config.endpoint == Client.configure.endpoint &&
|
128
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
135
129
|
!@config.endpoint.split(".").first.include?("-")
|
136
130
|
credentials ||= Credentials.default scope: @config.scope,
|
137
131
|
enable_self_signed_jwt: enable_self_signed_jwt
|
138
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
132
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
139
133
|
credentials = Credentials.new credentials, scope: @config.scope
|
140
134
|
end
|
141
135
|
@quota_project_id = @config.quota_project
|
@@ -239,7 +233,9 @@ module Google
|
|
239
233
|
options.apply_defaults timeout: @config.rpcs.list_workflows.timeout,
|
240
234
|
metadata: metadata,
|
241
235
|
retry_policy: @config.rpcs.list_workflows.retry_policy
|
242
|
-
|
236
|
+
|
237
|
+
options.apply_defaults timeout: @config.timeout,
|
238
|
+
metadata: @config.metadata,
|
243
239
|
retry_policy: @config.retry_policy
|
244
240
|
|
245
241
|
@workflows_stub.call_rpc :list_workflows, request, options: options do |response, operation|
|
@@ -307,7 +303,9 @@ module Google
|
|
307
303
|
options.apply_defaults timeout: @config.rpcs.get_workflow.timeout,
|
308
304
|
metadata: metadata,
|
309
305
|
retry_policy: @config.rpcs.get_workflow.retry_policy
|
310
|
-
|
306
|
+
|
307
|
+
options.apply_defaults timeout: @config.timeout,
|
308
|
+
metadata: @config.metadata,
|
311
309
|
retry_policy: @config.retry_policy
|
312
310
|
|
313
311
|
@workflows_stub.call_rpc :get_workflow, request, options: options do |response, operation|
|
@@ -387,7 +385,9 @@ module Google
|
|
387
385
|
options.apply_defaults timeout: @config.rpcs.create_workflow.timeout,
|
388
386
|
metadata: metadata,
|
389
387
|
retry_policy: @config.rpcs.create_workflow.retry_policy
|
390
|
-
|
388
|
+
|
389
|
+
options.apply_defaults timeout: @config.timeout,
|
390
|
+
metadata: @config.metadata,
|
391
391
|
retry_policy: @config.retry_policy
|
392
392
|
|
393
393
|
@workflows_stub.call_rpc :create_workflow, request, options: options do |response, operation|
|
@@ -457,7 +457,9 @@ module Google
|
|
457
457
|
options.apply_defaults timeout: @config.rpcs.delete_workflow.timeout,
|
458
458
|
metadata: metadata,
|
459
459
|
retry_policy: @config.rpcs.delete_workflow.retry_policy
|
460
|
-
|
460
|
+
|
461
|
+
options.apply_defaults timeout: @config.timeout,
|
462
|
+
metadata: @config.metadata,
|
461
463
|
retry_policy: @config.retry_policy
|
462
464
|
|
463
465
|
@workflows_stub.call_rpc :delete_workflow, request, options: options do |response, operation|
|
@@ -531,7 +533,9 @@ module Google
|
|
531
533
|
options.apply_defaults timeout: @config.rpcs.update_workflow.timeout,
|
532
534
|
metadata: metadata,
|
533
535
|
retry_policy: @config.rpcs.update_workflow.retry_policy
|
534
|
-
|
536
|
+
|
537
|
+
options.apply_defaults timeout: @config.timeout,
|
538
|
+
metadata: @config.metadata,
|
535
539
|
retry_policy: @config.retry_policy
|
536
540
|
|
537
541
|
@workflows_stub.call_rpc :update_workflow, request, options: options do |response, operation|
|
@@ -556,22 +560,21 @@ module Google
|
|
556
560
|
# Configuration can be applied globally to all clients, or to a single client
|
557
561
|
# on construction.
|
558
562
|
#
|
559
|
-
#
|
560
|
-
#
|
561
|
-
#
|
562
|
-
# to 20 seconds,
|
563
|
-
#
|
564
|
-
#
|
565
|
-
#
|
566
|
-
#
|
567
|
-
#
|
568
|
-
#
|
569
|
-
#
|
570
|
-
#
|
571
|
-
#
|
572
|
-
#
|
573
|
-
#
|
574
|
-
# end
|
563
|
+
# @example
|
564
|
+
#
|
565
|
+
# # Modify the global config, setting the timeout for
|
566
|
+
# # list_workflows to 20 seconds,
|
567
|
+
# # and all remaining timeouts to 10 seconds.
|
568
|
+
# ::Google::Cloud::Workflows::V1::Workflows::Client.configure do |config|
|
569
|
+
# config.timeout = 10.0
|
570
|
+
# config.rpcs.list_workflows.timeout = 20.0
|
571
|
+
# end
|
572
|
+
#
|
573
|
+
# # Apply the above configuration only to a new client.
|
574
|
+
# client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config|
|
575
|
+
# config.timeout = 10.0
|
576
|
+
# config.rpcs.list_workflows.timeout = 20.0
|
577
|
+
# end
|
575
578
|
#
|
576
579
|
# @!attribute [rw] endpoint
|
577
580
|
# The hostname or hostname:port of the service endpoint.
|
@@ -82,7 +82,7 @@ module Google
|
|
82
82
|
# Create credentials
|
83
83
|
credentials = @config.credentials
|
84
84
|
credentials ||= Credentials.default scope: @config.scope
|
85
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
85
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
86
86
|
credentials = Credentials.new credentials, scope: @config.scope
|
87
87
|
end
|
88
88
|
@quota_project_id = @config.quota_project
|
@@ -169,7 +169,9 @@ module Google
|
|
169
169
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
170
170
|
metadata: metadata,
|
171
171
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
172
|
-
|
172
|
+
|
173
|
+
options.apply_defaults timeout: @config.timeout,
|
174
|
+
metadata: @config.metadata,
|
173
175
|
retry_policy: @config.retry_policy
|
174
176
|
|
175
177
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -239,7 +241,9 @@ module Google
|
|
239
241
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
240
242
|
metadata: metadata,
|
241
243
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
242
|
-
|
244
|
+
|
245
|
+
options.apply_defaults timeout: @config.timeout,
|
246
|
+
metadata: @config.metadata,
|
243
247
|
retry_policy: @config.retry_policy
|
244
248
|
|
245
249
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -309,7 +313,9 @@ module Google
|
|
309
313
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
310
314
|
metadata: metadata,
|
311
315
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
312
|
-
|
316
|
+
|
317
|
+
options.apply_defaults timeout: @config.timeout,
|
318
|
+
metadata: @config.metadata,
|
313
319
|
retry_policy: @config.retry_policy
|
314
320
|
|
315
321
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -384,7 +390,9 @@ module Google
|
|
384
390
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
385
391
|
metadata: metadata,
|
386
392
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
387
|
-
|
393
|
+
|
394
|
+
options.apply_defaults timeout: @config.timeout,
|
395
|
+
metadata: @config.metadata,
|
388
396
|
retry_policy: @config.retry_policy
|
389
397
|
|
390
398
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -456,7 +464,9 @@ module Google
|
|
456
464
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
457
465
|
metadata: metadata,
|
458
466
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
459
|
-
|
467
|
+
|
468
|
+
options.apply_defaults timeout: @config.timeout,
|
469
|
+
metadata: @config.metadata,
|
460
470
|
retry_policy: @config.retry_policy
|
461
471
|
|
462
472
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -481,22 +491,21 @@ module Google
|
|
481
491
|
# Configuration can be applied globally to all clients, or to a single client
|
482
492
|
# on construction.
|
483
493
|
#
|
484
|
-
#
|
485
|
-
#
|
486
|
-
#
|
487
|
-
# to 20 seconds,
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
# end
|
494
|
+
# @example
|
495
|
+
#
|
496
|
+
# # Modify the global config, setting the timeout for
|
497
|
+
# # list_operations to 20 seconds,
|
498
|
+
# # and all remaining timeouts to 10 seconds.
|
499
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
500
|
+
# config.timeout = 10.0
|
501
|
+
# config.rpcs.list_operations.timeout = 20.0
|
502
|
+
# end
|
503
|
+
#
|
504
|
+
# # Apply the above configuration only to a new client.
|
505
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
506
|
+
# config.timeout = 10.0
|
507
|
+
# config.rpcs.list_operations.timeout = 20.0
|
508
|
+
# end
|
500
509
|
#
|
501
510
|
# @!attribute [rw] endpoint
|
502
511
|
# The hostname or hostname:port of the service endpoint.
|
@@ -60,6 +60,12 @@ module Google
|
|
60
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,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-workflows-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
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-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|