google-cloud-dialogflow-cx-v3 1.2.0 → 1.4.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/dialogflow/cx/v3/agents/client.rb +44 -12
- data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +19 -15
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +44 -12
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +50 -38
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +102 -68
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +36 -3
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +36 -3
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/service_stub.rb +30 -14
- data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +36 -3
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +36 -3
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/service_stub.rb +30 -14
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +46 -8
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/operations.rb +19 -15
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +46 -8
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/operations.rb +50 -38
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +42 -10
- data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +19 -15
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +42 -10
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +50 -38
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +36 -8
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +36 -8
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +43 -11
- data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +19 -15
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +43 -11
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +50 -38
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/service_stub.rb +94 -62
- data/lib/google/cloud/dialogflow/cx/v3/generators/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +46 -8
- data/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb +19 -15
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +46 -8
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb +50 -38
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +35 -7
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +35 -5
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +47 -26
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +45 -13
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +19 -15
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +45 -13
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +50 -38
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/service_stub.rb +110 -74
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +38 -8
- data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +19 -15
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +38 -8
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +50 -38
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +36 -6
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/service_stub.rb +54 -32
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +12 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/entity_type.rb +12 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/experiment.rb +4 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +8 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +4 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/intent.rb +12 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +12 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +28 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +4 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +32 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +22 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +18 -0
- data/proto_docs/google/longrunning/operations.rb +23 -14
- data/proto_docs/google/protobuf/struct.rb +12 -0
- metadata +6 -9
@@ -167,15 +167,27 @@ module Google
|
|
167
167
|
endpoint: @config.endpoint,
|
168
168
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
169
169
|
universe_domain: @config.universe_domain,
|
170
|
-
credentials: credentials
|
170
|
+
credentials: credentials,
|
171
|
+
logger: @config.logger
|
171
172
|
)
|
172
173
|
|
174
|
+
@sessions_stub.logger(stub: true)&.info do |entry|
|
175
|
+
entry.set_system_name
|
176
|
+
entry.set_service
|
177
|
+
entry.message = "Created client for #{entry.service}"
|
178
|
+
entry.set_credentials_fields credentials
|
179
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
180
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
181
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
182
|
+
end
|
183
|
+
|
173
184
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
174
185
|
config.credentials = credentials
|
175
186
|
config.quota_project = @quota_project_id
|
176
187
|
config.endpoint = @sessions_stub.endpoint
|
177
188
|
config.universe_domain = @sessions_stub.universe_domain
|
178
189
|
config.bindings_override = @config.bindings_override
|
190
|
+
config.logger = @sessions_stub.logger if config.respond_to? :logger=
|
179
191
|
end
|
180
192
|
end
|
181
193
|
|
@@ -186,6 +198,15 @@ module Google
|
|
186
198
|
#
|
187
199
|
attr_reader :location_client
|
188
200
|
|
201
|
+
##
|
202
|
+
# The logger used for request/response debug logging.
|
203
|
+
#
|
204
|
+
# @return [Logger]
|
205
|
+
#
|
206
|
+
def logger
|
207
|
+
@sessions_stub.logger
|
208
|
+
end
|
209
|
+
|
189
210
|
# Service calls
|
190
211
|
|
191
212
|
##
|
@@ -290,7 +311,6 @@ module Google
|
|
290
311
|
|
291
312
|
@sessions_stub.detect_intent request, options do |result, operation|
|
292
313
|
yield result, operation if block_given?
|
293
|
-
return result
|
294
314
|
end
|
295
315
|
rescue ::Gapic::Rest::Error => e
|
296
316
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -497,7 +517,6 @@ module Google
|
|
497
517
|
|
498
518
|
@sessions_stub.match_intent request, options do |result, operation|
|
499
519
|
yield result, operation if block_given?
|
500
|
-
return result
|
501
520
|
end
|
502
521
|
rescue ::Gapic::Rest::Error => e
|
503
522
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -587,7 +606,6 @@ module Google
|
|
587
606
|
|
588
607
|
@sessions_stub.fulfill_intent request, options do |result, operation|
|
589
608
|
yield result, operation if block_given?
|
590
|
-
return result
|
591
609
|
end
|
592
610
|
rescue ::Gapic::Rest::Error => e
|
593
611
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -675,7 +693,6 @@ module Google
|
|
675
693
|
|
676
694
|
@sessions_stub.submit_answer_feedback request, options do |result, operation|
|
677
695
|
yield result, operation if block_given?
|
678
|
-
return result
|
679
696
|
end
|
680
697
|
rescue ::Gapic::Rest::Error => e
|
681
698
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -723,6 +740,13 @@ module Google
|
|
723
740
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
724
741
|
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
725
742
|
# * (`nil`) indicating no credentials
|
743
|
+
#
|
744
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
745
|
+
# external source for authentication to Google Cloud, you must validate it before
|
746
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
747
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
748
|
+
# For more information, refer to [Validate credential configurations from external
|
749
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
726
750
|
# @return [::Object]
|
727
751
|
# @!attribute [rw] scope
|
728
752
|
# The OAuth scopes
|
@@ -755,6 +779,11 @@ module Google
|
|
755
779
|
# default endpoint URL. The default value of nil uses the environment
|
756
780
|
# universe (usually the default "googleapis.com" universe).
|
757
781
|
# @return [::String,nil]
|
782
|
+
# @!attribute [rw] logger
|
783
|
+
# A custom logger to use for request/response debug logging, or the value
|
784
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
785
|
+
# explicitly disable logging.
|
786
|
+
# @return [::Logger,:default,nil]
|
758
787
|
#
|
759
788
|
class Configuration
|
760
789
|
extend ::Gapic::Config
|
@@ -783,6 +812,7 @@ module Google
|
|
783
812
|
# by the host service.
|
784
813
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
785
814
|
config_attr :bindings_override, {}, ::Hash, nil
|
815
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
786
816
|
|
787
817
|
# @private
|
788
818
|
def initialize parent_config = nil
|
@@ -31,7 +31,8 @@ module Google
|
|
31
31
|
# including transcoding, making the REST call, and deserialing the response.
|
32
32
|
#
|
33
33
|
class ServiceStub
|
34
|
-
|
34
|
+
# @private
|
35
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
35
36
|
# These require statements are intentionally placed here to initialize
|
36
37
|
# the REST modules only when it's required.
|
37
38
|
require "gapic/rest"
|
@@ -41,7 +42,9 @@ module Google
|
|
41
42
|
universe_domain: universe_domain,
|
42
43
|
credentials: credentials,
|
43
44
|
numeric_enums: true,
|
44
|
-
|
45
|
+
service_name: self.class,
|
46
|
+
raise_faraday_errors: false,
|
47
|
+
logger: logger
|
45
48
|
end
|
46
49
|
|
47
50
|
##
|
@@ -62,6 +65,15 @@ module Google
|
|
62
65
|
@client_stub.endpoint
|
63
66
|
end
|
64
67
|
|
68
|
+
##
|
69
|
+
# The logger used for request/response debug logging.
|
70
|
+
#
|
71
|
+
# @return [Logger]
|
72
|
+
#
|
73
|
+
def logger stub: false
|
74
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
75
|
+
end
|
76
|
+
|
65
77
|
##
|
66
78
|
# Baseline implementation for the detect_intent REST call
|
67
79
|
#
|
@@ -88,16 +100,18 @@ module Google
|
|
88
100
|
|
89
101
|
response = @client_stub.make_http_request(
|
90
102
|
verb,
|
91
|
-
uri:
|
92
|
-
body:
|
93
|
-
params:
|
103
|
+
uri: uri,
|
104
|
+
body: body || "",
|
105
|
+
params: query_string_params,
|
106
|
+
method_name: "detect_intent",
|
94
107
|
options: options
|
95
108
|
)
|
96
109
|
operation = ::Gapic::Rest::TransportOperation.new response
|
97
110
|
result = ::Google::Cloud::Dialogflow::CX::V3::DetectIntentResponse.decode_json response.body, ignore_unknown_fields: true
|
98
|
-
|
99
|
-
|
100
|
-
|
111
|
+
catch :response do
|
112
|
+
yield result, operation if block_given?
|
113
|
+
result
|
114
|
+
end
|
101
115
|
end
|
102
116
|
|
103
117
|
##
|
@@ -126,6 +140,7 @@ module Google
|
|
126
140
|
uri: uri,
|
127
141
|
body: body || "",
|
128
142
|
params: query_string_params,
|
143
|
+
method_name: "server_streaming_detect_intent",
|
129
144
|
options: options,
|
130
145
|
is_server_streaming: true,
|
131
146
|
&block
|
@@ -159,16 +174,18 @@ module Google
|
|
159
174
|
|
160
175
|
response = @client_stub.make_http_request(
|
161
176
|
verb,
|
162
|
-
uri:
|
163
|
-
body:
|
164
|
-
params:
|
177
|
+
uri: uri,
|
178
|
+
body: body || "",
|
179
|
+
params: query_string_params,
|
180
|
+
method_name: "match_intent",
|
165
181
|
options: options
|
166
182
|
)
|
167
183
|
operation = ::Gapic::Rest::TransportOperation.new response
|
168
184
|
result = ::Google::Cloud::Dialogflow::CX::V3::MatchIntentResponse.decode_json response.body, ignore_unknown_fields: true
|
169
|
-
|
170
|
-
|
171
|
-
|
185
|
+
catch :response do
|
186
|
+
yield result, operation if block_given?
|
187
|
+
result
|
188
|
+
end
|
172
189
|
end
|
173
190
|
|
174
191
|
##
|
@@ -197,16 +214,18 @@ module Google
|
|
197
214
|
|
198
215
|
response = @client_stub.make_http_request(
|
199
216
|
verb,
|
200
|
-
uri:
|
201
|
-
body:
|
202
|
-
params:
|
217
|
+
uri: uri,
|
218
|
+
body: body || "",
|
219
|
+
params: query_string_params,
|
220
|
+
method_name: "fulfill_intent",
|
203
221
|
options: options
|
204
222
|
)
|
205
223
|
operation = ::Gapic::Rest::TransportOperation.new response
|
206
224
|
result = ::Google::Cloud::Dialogflow::CX::V3::FulfillIntentResponse.decode_json response.body, ignore_unknown_fields: true
|
207
|
-
|
208
|
-
|
209
|
-
|
225
|
+
catch :response do
|
226
|
+
yield result, operation if block_given?
|
227
|
+
result
|
228
|
+
end
|
210
229
|
end
|
211
230
|
|
212
231
|
##
|
@@ -235,16 +254,18 @@ module Google
|
|
235
254
|
|
236
255
|
response = @client_stub.make_http_request(
|
237
256
|
verb,
|
238
|
-
uri:
|
239
|
-
body:
|
240
|
-
params:
|
257
|
+
uri: uri,
|
258
|
+
body: body || "",
|
259
|
+
params: query_string_params,
|
260
|
+
method_name: "submit_answer_feedback",
|
241
261
|
options: options
|
242
262
|
)
|
243
263
|
operation = ::Gapic::Rest::TransportOperation.new response
|
244
264
|
result = ::Google::Cloud::Dialogflow::CX::V3::AnswerFeedback.decode_json response.body, ignore_unknown_fields: true
|
245
|
-
|
246
|
-
|
247
|
-
|
265
|
+
catch :response do
|
266
|
+
yield result, operation if block_given?
|
267
|
+
result
|
268
|
+
end
|
248
269
|
end
|
249
270
|
|
250
271
|
##
|
@@ -172,14 +172,26 @@ module Google
|
|
172
172
|
universe_domain: @config.universe_domain,
|
173
173
|
channel_args: @config.channel_args,
|
174
174
|
interceptors: @config.interceptors,
|
175
|
-
channel_pool_config: @config.channel_pool
|
175
|
+
channel_pool_config: @config.channel_pool,
|
176
|
+
logger: @config.logger
|
176
177
|
)
|
177
178
|
|
179
|
+
@test_cases_stub.stub_logger&.info do |entry|
|
180
|
+
entry.set_system_name
|
181
|
+
entry.set_service
|
182
|
+
entry.message = "Created client for #{entry.service}"
|
183
|
+
entry.set_credentials_fields credentials
|
184
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
185
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
186
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
187
|
+
end
|
188
|
+
|
178
189
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
179
190
|
config.credentials = credentials
|
180
191
|
config.quota_project = @quota_project_id
|
181
192
|
config.endpoint = @test_cases_stub.endpoint
|
182
193
|
config.universe_domain = @test_cases_stub.universe_domain
|
194
|
+
config.logger = @test_cases_stub.logger if config.respond_to? :logger=
|
183
195
|
end
|
184
196
|
end
|
185
197
|
|
@@ -197,6 +209,15 @@ module Google
|
|
197
209
|
#
|
198
210
|
attr_reader :location_client
|
199
211
|
|
212
|
+
##
|
213
|
+
# The logger used for request/response debug logging.
|
214
|
+
#
|
215
|
+
# @return [Logger]
|
216
|
+
#
|
217
|
+
def logger
|
218
|
+
@test_cases_stub.logger
|
219
|
+
end
|
220
|
+
|
200
221
|
# Service calls
|
201
222
|
|
202
223
|
##
|
@@ -293,7 +314,7 @@ module Google
|
|
293
314
|
@test_cases_stub.call_rpc :list_test_cases, request, options: options do |response, operation|
|
294
315
|
response = ::Gapic::PagedEnumerable.new @test_cases_stub, :list_test_cases, request, response, operation, options
|
295
316
|
yield response, operation if block_given?
|
296
|
-
|
317
|
+
throw :response, response
|
297
318
|
end
|
298
319
|
rescue ::GRPC::BadStatus => e
|
299
320
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -383,7 +404,6 @@ module Google
|
|
383
404
|
|
384
405
|
@test_cases_stub.call_rpc :batch_delete_test_cases, request, options: options do |response, operation|
|
385
406
|
yield response, operation if block_given?
|
386
|
-
return response
|
387
407
|
end
|
388
408
|
rescue ::GRPC::BadStatus => e
|
389
409
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -471,7 +491,6 @@ module Google
|
|
471
491
|
|
472
492
|
@test_cases_stub.call_rpc :get_test_case, request, options: options do |response, operation|
|
473
493
|
yield response, operation if block_given?
|
474
|
-
return response
|
475
494
|
end
|
476
495
|
rescue ::GRPC::BadStatus => e
|
477
496
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -560,7 +579,6 @@ module Google
|
|
560
579
|
|
561
580
|
@test_cases_stub.call_rpc :create_test_case, request, options: options do |response, operation|
|
562
581
|
yield response, operation if block_given?
|
563
|
-
return response
|
564
582
|
end
|
565
583
|
rescue ::GRPC::BadStatus => e
|
566
584
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -651,7 +669,6 @@ module Google
|
|
651
669
|
|
652
670
|
@test_cases_stub.call_rpc :update_test_case, request, options: options do |response, operation|
|
653
671
|
yield response, operation if block_given?
|
654
|
-
return response
|
655
672
|
end
|
656
673
|
rescue ::GRPC::BadStatus => e
|
657
674
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -759,7 +776,7 @@ module Google
|
|
759
776
|
@test_cases_stub.call_rpc :run_test_case, request, options: options do |response, operation|
|
760
777
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
761
778
|
yield response, operation if block_given?
|
762
|
-
|
779
|
+
throw :response, response
|
763
780
|
end
|
764
781
|
rescue ::GRPC::BadStatus => e
|
765
782
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -869,7 +886,7 @@ module Google
|
|
869
886
|
@test_cases_stub.call_rpc :batch_run_test_cases, request, options: options do |response, operation|
|
870
887
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
871
888
|
yield response, operation if block_given?
|
872
|
-
|
889
|
+
throw :response, response
|
873
890
|
end
|
874
891
|
rescue ::GRPC::BadStatus => e
|
875
892
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -958,7 +975,6 @@ module Google
|
|
958
975
|
|
959
976
|
@test_cases_stub.call_rpc :calculate_coverage, request, options: options do |response, operation|
|
960
977
|
yield response, operation if block_given?
|
961
|
-
return response
|
962
978
|
end
|
963
979
|
rescue ::GRPC::BadStatus => e
|
964
980
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1006,9 +1022,13 @@ module Google
|
|
1006
1022
|
# have read permissions for the object. For more information, see
|
1007
1023
|
# [Dialogflow access
|
1008
1024
|
# control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).
|
1025
|
+
#
|
1026
|
+
# Note: The following fields are mutually exclusive: `gcs_uri`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1009
1027
|
# @param content [::String]
|
1010
1028
|
# Uncompressed raw byte content for test cases.
|
1011
1029
|
#
|
1030
|
+
# Note: The following fields are mutually exclusive: `content`, `gcs_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
1031
|
+
#
|
1012
1032
|
# @yield [response, operation] Access the result along with the RPC operation
|
1013
1033
|
# @yieldparam response [::Gapic::Operation]
|
1014
1034
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
@@ -1076,7 +1096,7 @@ module Google
|
|
1076
1096
|
@test_cases_stub.call_rpc :import_test_cases, request, options: options do |response, operation|
|
1077
1097
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1078
1098
|
yield response, operation if block_given?
|
1079
|
-
|
1099
|
+
throw :response, response
|
1080
1100
|
end
|
1081
1101
|
rescue ::GRPC::BadStatus => e
|
1082
1102
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1206,7 +1226,7 @@ module Google
|
|
1206
1226
|
@test_cases_stub.call_rpc :export_test_cases, request, options: options do |response, operation|
|
1207
1227
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1208
1228
|
yield response, operation if block_given?
|
1209
|
-
|
1229
|
+
throw :response, response
|
1210
1230
|
end
|
1211
1231
|
rescue ::GRPC::BadStatus => e
|
1212
1232
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1332,7 +1352,7 @@ module Google
|
|
1332
1352
|
@test_cases_stub.call_rpc :list_test_case_results, request, options: options do |response, operation|
|
1333
1353
|
response = ::Gapic::PagedEnumerable.new @test_cases_stub, :list_test_case_results, request, response, operation, options
|
1334
1354
|
yield response, operation if block_given?
|
1335
|
-
|
1355
|
+
throw :response, response
|
1336
1356
|
end
|
1337
1357
|
rescue ::GRPC::BadStatus => e
|
1338
1358
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1420,7 +1440,6 @@ module Google
|
|
1420
1440
|
|
1421
1441
|
@test_cases_stub.call_rpc :get_test_case_result, request, options: options do |response, operation|
|
1422
1442
|
yield response, operation if block_given?
|
1423
|
-
return response
|
1424
1443
|
end
|
1425
1444
|
rescue ::GRPC::BadStatus => e
|
1426
1445
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1470,6 +1489,13 @@ module Google
|
|
1470
1489
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1471
1490
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1472
1491
|
# * (`nil`) indicating no credentials
|
1492
|
+
#
|
1493
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
1494
|
+
# external source for authentication to Google Cloud, you must validate it before
|
1495
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
1496
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
1497
|
+
# For more information, refer to [Validate credential configurations from external
|
1498
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
1473
1499
|
# @return [::Object]
|
1474
1500
|
# @!attribute [rw] scope
|
1475
1501
|
# The OAuth scopes
|
@@ -1509,6 +1535,11 @@ module Google
|
|
1509
1535
|
# default endpoint URL. The default value of nil uses the environment
|
1510
1536
|
# universe (usually the default "googleapis.com" universe).
|
1511
1537
|
# @return [::String,nil]
|
1538
|
+
# @!attribute [rw] logger
|
1539
|
+
# A custom logger to use for request/response debug logging, or the value
|
1540
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1541
|
+
# explicitly disable logging.
|
1542
|
+
# @return [::Logger,:default,nil]
|
1512
1543
|
#
|
1513
1544
|
class Configuration
|
1514
1545
|
extend ::Gapic::Config
|
@@ -1533,6 +1564,7 @@ module Google
|
|
1533
1564
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1534
1565
|
config_attr :quota_project, nil, ::String, nil
|
1535
1566
|
config_attr :universe_domain, nil, ::String, nil
|
1567
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1536
1568
|
|
1537
1569
|
# @private
|
1538
1570
|
def initialize parent_config = nil
|
@@ -125,14 +125,6 @@ module Google
|
|
125
125
|
# Lists operations that match the specified filter in the request. If the
|
126
126
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
127
127
|
#
|
128
|
-
# NOTE: the `name` binding allows API services to override the binding
|
129
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
130
|
-
# override the binding, API services can add a binding such as
|
131
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
132
|
-
# For backwards compatibility, the default name includes the operations
|
133
|
-
# collection id, however overriding users must ensure the name binding
|
134
|
-
# is the parent resource, without the operations collection id.
|
135
|
-
#
|
136
128
|
# @overload list_operations(request, options = nil)
|
137
129
|
# Pass arguments to `list_operations` via a request object, either of type
|
138
130
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -222,7 +214,7 @@ module Google
|
|
222
214
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
223
215
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
224
216
|
yield response, operation if block_given?
|
225
|
-
|
217
|
+
throw :response, response
|
226
218
|
end
|
227
219
|
rescue ::GRPC::BadStatus => e
|
228
220
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -318,7 +310,7 @@ module Google
|
|
318
310
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
319
311
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
320
312
|
yield response, operation if block_given?
|
321
|
-
|
313
|
+
throw :response, response
|
322
314
|
end
|
323
315
|
rescue ::GRPC::BadStatus => e
|
324
316
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -407,7 +399,6 @@ module Google
|
|
407
399
|
|
408
400
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
409
401
|
yield response, operation if block_given?
|
410
|
-
return response
|
411
402
|
end
|
412
403
|
rescue ::GRPC::BadStatus => e
|
413
404
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -422,8 +413,9 @@ module Google
|
|
422
413
|
# other methods to check whether the cancellation succeeded or whether the
|
423
414
|
# operation completed despite cancellation. On successful cancellation,
|
424
415
|
# the operation is not deleted; instead, it becomes an operation with
|
425
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
426
|
-
# corresponding to
|
416
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
417
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
418
|
+
# `Code.CANCELLED`.
|
427
419
|
#
|
428
420
|
# @overload cancel_operation(request, options = nil)
|
429
421
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -502,7 +494,6 @@ module Google
|
|
502
494
|
|
503
495
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
504
496
|
yield response, operation if block_given?
|
505
|
-
return response
|
506
497
|
end
|
507
498
|
rescue ::GRPC::BadStatus => e
|
508
499
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -600,7 +591,7 @@ module Google
|
|
600
591
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
601
592
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
602
593
|
yield response, operation if block_given?
|
603
|
-
|
594
|
+
throw :response, response
|
604
595
|
end
|
605
596
|
rescue ::GRPC::BadStatus => e
|
606
597
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -650,6 +641,13 @@ module Google
|
|
650
641
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
651
642
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
652
643
|
# * (`nil`) indicating no credentials
|
644
|
+
#
|
645
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
646
|
+
# external source for authentication to Google Cloud, you must validate it before
|
647
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
648
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
649
|
+
# For more information, refer to [Validate credential configurations from external
|
650
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
653
651
|
# @return [::Object]
|
654
652
|
# @!attribute [rw] scope
|
655
653
|
# The OAuth scopes
|
@@ -689,6 +687,11 @@ module Google
|
|
689
687
|
# default endpoint URL. The default value of nil uses the environment
|
690
688
|
# universe (usually the default "googleapis.com" universe).
|
691
689
|
# @return [::String,nil]
|
690
|
+
# @!attribute [rw] logger
|
691
|
+
# A custom logger to use for request/response debug logging, or the value
|
692
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
693
|
+
# explicitly disable logging.
|
694
|
+
# @return [::Logger,:default,nil]
|
692
695
|
#
|
693
696
|
class Configuration
|
694
697
|
extend ::Gapic::Config
|
@@ -713,6 +716,7 @@ module Google
|
|
713
716
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
714
717
|
config_attr :quota_project, nil, ::String, nil
|
715
718
|
config_attr :universe_domain, nil, ::String, nil
|
719
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
716
720
|
|
717
721
|
# @private
|
718
722
|
def initialize parent_config = nil
|