google-cloud-workflows-v1beta 0.9.2 → 0.11.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.
- checksums.yaml +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/workflows/v1beta/version.rb +1 -1
- data/lib/google/cloud/workflows/v1beta/workflows/client.rb +38 -6
- data/lib/google/cloud/workflows/v1beta/workflows/operations.rb +16 -5
- data/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb +37 -6
- data/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb +47 -28
- data/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb +54 -32
- data/proto_docs/google/longrunning/operations.rb +4 -0
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ff73112a2201ec60d747492a41a7c01f3b630ae022ea828e2ca70039d7d2413
|
4
|
+
data.tar.gz: 03614563cc95881bcc8eca7e23e1ea4b3443664576751d0fb883ab4203141135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b309d694707b14c7e23fc29d62c442b08252fd1d621139e41f86f8d284be1f37178bd2478433d7fcc0e88a9d50af50007b5e4a5628ee04c82818da31055d862
|
7
|
+
data.tar.gz: 2bbd4f580a92b3c247014b480790e295ad4764dd32c45d57587505889c4f7378cfe8b4b269f25519a26c57c30085ff4b14b8e3bd0b45dcadf0cf6dd6ff79bf93
|
data/README.md
CHANGED
@@ -43,40 +43,50 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/workflows/)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/workflows/v1beta"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
86
|
|
77
87
|
## Supported Ruby Versions
|
78
88
|
|
79
|
-
This library is supported on Ruby
|
89
|
+
This library is supported on Ruby 3.0+.
|
80
90
|
|
81
91
|
Google provides official support for Ruby versions that are actively supported
|
82
92
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -166,8 +166,19 @@ module Google
|
|
166
166
|
universe_domain: @config.universe_domain,
|
167
167
|
channel_args: @config.channel_args,
|
168
168
|
interceptors: @config.interceptors,
|
169
|
-
channel_pool_config: @config.channel_pool
|
169
|
+
channel_pool_config: @config.channel_pool,
|
170
|
+
logger: @config.logger
|
170
171
|
)
|
172
|
+
|
173
|
+
@workflows_stub.stub_logger&.info do |entry|
|
174
|
+
entry.set_system_name
|
175
|
+
entry.set_service
|
176
|
+
entry.message = "Created client for #{entry.service}"
|
177
|
+
entry.set_credentials_fields credentials
|
178
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
179
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
180
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
181
|
+
end
|
171
182
|
end
|
172
183
|
|
173
184
|
##
|
@@ -177,6 +188,15 @@ module Google
|
|
177
188
|
#
|
178
189
|
attr_reader :operations_client
|
179
190
|
|
191
|
+
##
|
192
|
+
# The logger used for request/response debug logging.
|
193
|
+
#
|
194
|
+
# @return [Logger]
|
195
|
+
#
|
196
|
+
def logger
|
197
|
+
@workflows_stub.logger
|
198
|
+
end
|
199
|
+
|
180
200
|
# Service calls
|
181
201
|
|
182
202
|
##
|
@@ -284,7 +304,7 @@ module Google
|
|
284
304
|
@workflows_stub.call_rpc :list_workflows, request, options: options do |response, operation|
|
285
305
|
response = ::Gapic::PagedEnumerable.new @workflows_stub, :list_workflows, request, response, operation, options
|
286
306
|
yield response, operation if block_given?
|
287
|
-
|
307
|
+
throw :response, response
|
288
308
|
end
|
289
309
|
rescue ::GRPC::BadStatus => e
|
290
310
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -371,7 +391,6 @@ module Google
|
|
371
391
|
|
372
392
|
@workflows_stub.call_rpc :get_workflow, request, options: options do |response, operation|
|
373
393
|
yield response, operation if block_given?
|
374
|
-
return response
|
375
394
|
end
|
376
395
|
rescue ::GRPC::BadStatus => e
|
377
396
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -479,7 +498,7 @@ module Google
|
|
479
498
|
@workflows_stub.call_rpc :create_workflow, request, options: options do |response, operation|
|
480
499
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
481
500
|
yield response, operation if block_given?
|
482
|
-
|
501
|
+
throw :response, response
|
483
502
|
end
|
484
503
|
rescue ::GRPC::BadStatus => e
|
485
504
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -576,7 +595,7 @@ module Google
|
|
576
595
|
@workflows_stub.call_rpc :delete_workflow, request, options: options do |response, operation|
|
577
596
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
578
597
|
yield response, operation if block_given?
|
579
|
-
|
598
|
+
throw :response, response
|
580
599
|
end
|
581
600
|
rescue ::GRPC::BadStatus => e
|
582
601
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -677,7 +696,7 @@ module Google
|
|
677
696
|
@workflows_stub.call_rpc :update_workflow, request, options: options do |response, operation|
|
678
697
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
679
698
|
yield response, operation if block_given?
|
680
|
-
|
699
|
+
throw :response, response
|
681
700
|
end
|
682
701
|
rescue ::GRPC::BadStatus => e
|
683
702
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -727,6 +746,13 @@ module Google
|
|
727
746
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
728
747
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
729
748
|
# * (`nil`) indicating no credentials
|
749
|
+
#
|
750
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
751
|
+
# external source for authentication to Google Cloud, you must validate it before
|
752
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
753
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
754
|
+
# For more information, refer to [Validate credential configurations from external
|
755
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
730
756
|
# @return [::Object]
|
731
757
|
# @!attribute [rw] scope
|
732
758
|
# The OAuth scopes
|
@@ -766,6 +792,11 @@ module Google
|
|
766
792
|
# default endpoint URL. The default value of nil uses the environment
|
767
793
|
# universe (usually the default "googleapis.com" universe).
|
768
794
|
# @return [::String,nil]
|
795
|
+
# @!attribute [rw] logger
|
796
|
+
# A custom logger to use for request/response debug logging, or the value
|
797
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
798
|
+
# explicitly disable logging.
|
799
|
+
# @return [::Logger,:default,nil]
|
769
800
|
#
|
770
801
|
class Configuration
|
771
802
|
extend ::Gapic::Config
|
@@ -790,6 +821,7 @@ module Google
|
|
790
821
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
791
822
|
config_attr :quota_project, nil, ::String, nil
|
792
823
|
config_attr :universe_domain, nil, ::String, nil
|
824
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
793
825
|
|
794
826
|
# @private
|
795
827
|
def initialize parent_config = nil
|
@@ -213,7 +213,7 @@ module Google
|
|
213
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
214
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
215
215
|
yield response, operation if block_given?
|
216
|
-
|
216
|
+
throw :response, response
|
217
217
|
end
|
218
218
|
rescue ::GRPC::BadStatus => e
|
219
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -309,7 +309,7 @@ module Google
|
|
309
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
310
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
311
311
|
yield response, operation if block_given?
|
312
|
-
|
312
|
+
throw :response, response
|
313
313
|
end
|
314
314
|
rescue ::GRPC::BadStatus => e
|
315
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +398,6 @@ module Google
|
|
398
398
|
|
399
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
400
400
|
yield response, operation if block_given?
|
401
|
-
return response
|
402
401
|
end
|
403
402
|
rescue ::GRPC::BadStatus => e
|
404
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -592,7 +590,7 @@ module Google
|
|
592
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
593
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
594
592
|
yield response, operation if block_given?
|
595
|
-
|
593
|
+
throw :response, response
|
596
594
|
end
|
597
595
|
rescue ::GRPC::BadStatus => e
|
598
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -642,6 +640,13 @@ module Google
|
|
642
640
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
643
641
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
644
642
|
# * (`nil`) indicating no credentials
|
643
|
+
#
|
644
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
645
|
+
# external source for authentication to Google Cloud, you must validate it before
|
646
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
647
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
648
|
+
# For more information, refer to [Validate credential configurations from external
|
649
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
645
650
|
# @return [::Object]
|
646
651
|
# @!attribute [rw] scope
|
647
652
|
# The OAuth scopes
|
@@ -681,6 +686,11 @@ module Google
|
|
681
686
|
# default endpoint URL. The default value of nil uses the environment
|
682
687
|
# universe (usually the default "googleapis.com" universe).
|
683
688
|
# @return [::String,nil]
|
689
|
+
# @!attribute [rw] logger
|
690
|
+
# A custom logger to use for request/response debug logging, or the value
|
691
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
692
|
+
# explicitly disable logging.
|
693
|
+
# @return [::Logger,:default,nil]
|
684
694
|
#
|
685
695
|
class Configuration
|
686
696
|
extend ::Gapic::Config
|
@@ -705,6 +715,7 @@ module Google
|
|
705
715
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
706
716
|
config_attr :quota_project, nil, ::String, nil
|
707
717
|
config_attr :universe_domain, nil, ::String, nil
|
718
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
708
719
|
|
709
720
|
# @private
|
710
721
|
def initialize parent_config = nil
|
@@ -159,8 +159,19 @@ module Google
|
|
159
159
|
endpoint: @config.endpoint,
|
160
160
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
161
161
|
universe_domain: @config.universe_domain,
|
162
|
-
credentials: credentials
|
162
|
+
credentials: credentials,
|
163
|
+
logger: @config.logger
|
163
164
|
)
|
165
|
+
|
166
|
+
@workflows_stub.logger(stub: true)&.info do |entry|
|
167
|
+
entry.set_system_name
|
168
|
+
entry.set_service
|
169
|
+
entry.message = "Created client for #{entry.service}"
|
170
|
+
entry.set_credentials_fields credentials
|
171
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
172
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
173
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
174
|
+
end
|
164
175
|
end
|
165
176
|
|
166
177
|
##
|
@@ -170,6 +181,15 @@ module Google
|
|
170
181
|
#
|
171
182
|
attr_reader :operations_client
|
172
183
|
|
184
|
+
##
|
185
|
+
# The logger used for request/response debug logging.
|
186
|
+
#
|
187
|
+
# @return [Logger]
|
188
|
+
#
|
189
|
+
def logger
|
190
|
+
@workflows_stub.logger
|
191
|
+
end
|
192
|
+
|
173
193
|
# Service calls
|
174
194
|
|
175
195
|
##
|
@@ -269,7 +289,6 @@ module Google
|
|
269
289
|
|
270
290
|
@workflows_stub.list_workflows request, options do |result, operation|
|
271
291
|
yield result, operation if block_given?
|
272
|
-
return result
|
273
292
|
end
|
274
293
|
rescue ::Gapic::Rest::Error => e
|
275
294
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -349,7 +368,6 @@ module Google
|
|
349
368
|
|
350
369
|
@workflows_stub.get_workflow request, options do |result, operation|
|
351
370
|
yield result, operation if block_given?
|
352
|
-
return result
|
353
371
|
end
|
354
372
|
rescue ::Gapic::Rest::Error => e
|
355
373
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -450,7 +468,7 @@ module Google
|
|
450
468
|
@workflows_stub.create_workflow request, options do |result, operation|
|
451
469
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
452
470
|
yield result, operation if block_given?
|
453
|
-
|
471
|
+
throw :response, result
|
454
472
|
end
|
455
473
|
rescue ::Gapic::Rest::Error => e
|
456
474
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -540,7 +558,7 @@ module Google
|
|
540
558
|
@workflows_stub.delete_workflow request, options do |result, operation|
|
541
559
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
542
560
|
yield result, operation if block_given?
|
543
|
-
|
561
|
+
throw :response, result
|
544
562
|
end
|
545
563
|
rescue ::Gapic::Rest::Error => e
|
546
564
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -634,7 +652,7 @@ module Google
|
|
634
652
|
@workflows_stub.update_workflow request, options do |result, operation|
|
635
653
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
636
654
|
yield result, operation if block_given?
|
637
|
-
|
655
|
+
throw :response, result
|
638
656
|
end
|
639
657
|
rescue ::Gapic::Rest::Error => e
|
640
658
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -682,6 +700,13 @@ module Google
|
|
682
700
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
683
701
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
684
702
|
# * (`nil`) indicating no credentials
|
703
|
+
#
|
704
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
705
|
+
# external source for authentication to Google Cloud, you must validate it before
|
706
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
707
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
708
|
+
# For more information, refer to [Validate credential configurations from external
|
709
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
685
710
|
# @return [::Object]
|
686
711
|
# @!attribute [rw] scope
|
687
712
|
# The OAuth scopes
|
@@ -714,6 +739,11 @@ module Google
|
|
714
739
|
# default endpoint URL. The default value of nil uses the environment
|
715
740
|
# universe (usually the default "googleapis.com" universe).
|
716
741
|
# @return [::String,nil]
|
742
|
+
# @!attribute [rw] logger
|
743
|
+
# A custom logger to use for request/response debug logging, or the value
|
744
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
745
|
+
# explicitly disable logging.
|
746
|
+
# @return [::Logger,:default,nil]
|
717
747
|
#
|
718
748
|
class Configuration
|
719
749
|
extend ::Gapic::Config
|
@@ -735,6 +765,7 @@ module Google
|
|
735
765
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
736
766
|
config_attr :quota_project, nil, ::String, nil
|
737
767
|
config_attr :universe_domain, nil, ::String, nil
|
768
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
738
769
|
|
739
770
|
# @private
|
740
771
|
def initialize parent_config = nil
|
@@ -196,7 +196,7 @@ module Google
|
|
196
196
|
@operations_stub.list_operations request, options do |result, operation|
|
197
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
198
198
|
yield result, operation if block_given?
|
199
|
-
|
199
|
+
throw :response, result
|
200
200
|
end
|
201
201
|
rescue ::Gapic::Rest::Error => e
|
202
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -285,7 +285,7 @@ module Google
|
|
285
285
|
@operations_stub.get_operation request, options do |result, operation|
|
286
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
287
287
|
yield result, operation if block_given?
|
288
|
-
|
288
|
+
throw :response, result
|
289
289
|
end
|
290
290
|
rescue ::Gapic::Rest::Error => e
|
291
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -367,7 +367,6 @@ module Google
|
|
367
367
|
|
368
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
369
369
|
yield result, operation if block_given?
|
370
|
-
return result
|
371
370
|
end
|
372
371
|
rescue ::Gapic::Rest::Error => e
|
373
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -456,7 +455,6 @@ module Google
|
|
456
455
|
|
457
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
458
457
|
yield result, operation if block_given?
|
459
|
-
return result
|
460
458
|
end
|
461
459
|
rescue ::Gapic::Rest::Error => e
|
462
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -504,6 +502,13 @@ module Google
|
|
504
502
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
505
503
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
506
504
|
# * (`nil`) indicating no credentials
|
505
|
+
#
|
506
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
507
|
+
# external source for authentication to Google Cloud, you must validate it before
|
508
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
509
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
510
|
+
# For more information, refer to [Validate credential configurations from external
|
511
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
507
512
|
# @return [::Object]
|
508
513
|
# @!attribute [rw] scope
|
509
514
|
# The OAuth scopes
|
@@ -536,6 +541,11 @@ module Google
|
|
536
541
|
# default endpoint URL. The default value of nil uses the environment
|
537
542
|
# universe (usually the default "googleapis.com" universe).
|
538
543
|
# @return [::String,nil]
|
544
|
+
# @!attribute [rw] logger
|
545
|
+
# A custom logger to use for request/response debug logging, or the value
|
546
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
547
|
+
# explicitly disable logging.
|
548
|
+
# @return [::Logger,:default,nil]
|
539
549
|
#
|
540
550
|
class Configuration
|
541
551
|
extend ::Gapic::Config
|
@@ -557,6 +567,7 @@ module Google
|
|
557
567
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
558
568
|
config_attr :quota_project, nil, ::String, nil
|
559
569
|
config_attr :universe_domain, nil, ::String, nil
|
570
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
560
571
|
|
561
572
|
# @private
|
562
573
|
def initialize parent_config = nil
|
@@ -676,16 +687,18 @@ module Google
|
|
676
687
|
|
677
688
|
response = @client_stub.make_http_request(
|
678
689
|
verb,
|
679
|
-
uri:
|
680
|
-
body:
|
681
|
-
params:
|
690
|
+
uri: uri,
|
691
|
+
body: body || "",
|
692
|
+
params: query_string_params,
|
693
|
+
method_name: "list_operations",
|
682
694
|
options: options
|
683
695
|
)
|
684
696
|
operation = ::Gapic::Rest::TransportOperation.new response
|
685
697
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
686
|
-
|
687
|
-
|
688
|
-
|
698
|
+
catch :response do
|
699
|
+
yield result, operation if block_given?
|
700
|
+
result
|
701
|
+
end
|
689
702
|
end
|
690
703
|
|
691
704
|
##
|
@@ -714,16 +727,18 @@ module Google
|
|
714
727
|
|
715
728
|
response = @client_stub.make_http_request(
|
716
729
|
verb,
|
717
|
-
uri:
|
718
|
-
body:
|
719
|
-
params:
|
730
|
+
uri: uri,
|
731
|
+
body: body || "",
|
732
|
+
params: query_string_params,
|
733
|
+
method_name: "get_operation",
|
720
734
|
options: options
|
721
735
|
)
|
722
736
|
operation = ::Gapic::Rest::TransportOperation.new response
|
723
737
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
724
|
-
|
725
|
-
|
726
|
-
|
738
|
+
catch :response do
|
739
|
+
yield result, operation if block_given?
|
740
|
+
result
|
741
|
+
end
|
727
742
|
end
|
728
743
|
|
729
744
|
##
|
@@ -752,16 +767,18 @@ module Google
|
|
752
767
|
|
753
768
|
response = @client_stub.make_http_request(
|
754
769
|
verb,
|
755
|
-
uri:
|
756
|
-
body:
|
757
|
-
params:
|
770
|
+
uri: uri,
|
771
|
+
body: body || "",
|
772
|
+
params: query_string_params,
|
773
|
+
method_name: "delete_operation",
|
758
774
|
options: options
|
759
775
|
)
|
760
776
|
operation = ::Gapic::Rest::TransportOperation.new response
|
761
777
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
762
|
-
|
763
|
-
|
764
|
-
|
778
|
+
catch :response do
|
779
|
+
yield result, operation if block_given?
|
780
|
+
result
|
781
|
+
end
|
765
782
|
end
|
766
783
|
|
767
784
|
##
|
@@ -790,16 +807,18 @@ module Google
|
|
790
807
|
|
791
808
|
response = @client_stub.make_http_request(
|
792
809
|
verb,
|
793
|
-
uri:
|
794
|
-
body:
|
795
|
-
params:
|
810
|
+
uri: uri,
|
811
|
+
body: body || "",
|
812
|
+
params: query_string_params,
|
813
|
+
method_name: "cancel_operation",
|
796
814
|
options: options
|
797
815
|
)
|
798
816
|
operation = ::Gapic::Rest::TransportOperation.new response
|
799
817
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
800
|
-
|
801
|
-
|
802
|
-
|
818
|
+
catch :response do
|
819
|
+
yield result, operation if block_given?
|
820
|
+
result
|
821
|
+
end
|
803
822
|
end
|
804
823
|
|
805
824
|
##
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the list_workflows REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "list_workflows",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "get_workflow",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::Workflows::V1beta::Workflow.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "create_workflow",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "delete_workflow",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,16 +259,18 @@ module Google
|
|
239
259
|
|
240
260
|
response = @client_stub.make_http_request(
|
241
261
|
verb,
|
242
|
-
uri:
|
243
|
-
body:
|
244
|
-
params:
|
262
|
+
uri: uri,
|
263
|
+
body: body || "",
|
264
|
+
params: query_string_params,
|
265
|
+
method_name: "update_workflow",
|
245
266
|
options: options
|
246
267
|
)
|
247
268
|
operation = ::Gapic::Rest::TransportOperation.new response
|
248
269
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
249
|
-
|
250
|
-
|
251
|
-
|
270
|
+
catch :response do
|
271
|
+
yield result, operation if block_given?
|
272
|
+
result
|
273
|
+
end
|
252
274
|
end
|
253
275
|
|
254
276
|
##
|
@@ -40,6 +40,8 @@ module Google
|
|
40
40
|
# @!attribute [rw] error
|
41
41
|
# @return [::Google::Rpc::Status]
|
42
42
|
# The error result of the operation in case of failure or cancellation.
|
43
|
+
#
|
44
|
+
# Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
43
45
|
# @!attribute [rw] response
|
44
46
|
# @return [::Google::Protobuf::Any]
|
45
47
|
# The normal, successful response of the operation. If the original
|
@@ -50,6 +52,8 @@ module Google
|
|
50
52
|
# is the original method name. For example, if the original method name
|
51
53
|
# is `TakeSnapshot()`, the inferred response type is
|
52
54
|
# `TakeSnapshotResponse`.
|
55
|
+
#
|
56
|
+
# Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
53
57
|
class Operation
|
54
58
|
include ::Google::Protobuf::MessageExts
|
55
59
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-workflows-v1beta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: gapic-common
|
@@ -16,7 +15,7 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
18
|
+
version: 0.25.0
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 2.a
|
@@ -26,7 +25,7 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
28
|
+
version: 0.25.0
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
31
|
version: 2.a
|
@@ -92,7 +91,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
92
91
|
licenses:
|
93
92
|
- Apache-2.0
|
94
93
|
metadata: {}
|
95
|
-
post_install_message:
|
96
94
|
rdoc_options: []
|
97
95
|
require_paths:
|
98
96
|
- lib
|
@@ -100,15 +98,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
98
|
requirements:
|
101
99
|
- - ">="
|
102
100
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
101
|
+
version: '3.0'
|
104
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
103
|
requirements:
|
106
104
|
- - ">="
|
107
105
|
- !ruby/object:Gem::Version
|
108
106
|
version: '0'
|
109
107
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
111
|
-
signing_key:
|
108
|
+
rubygems_version: 3.6.2
|
112
109
|
specification_version: 4
|
113
110
|
summary: Manage workflow definitions. To execute workflows and manage executions,
|
114
111
|
see the Workflows Executions API.
|