google-cloud-dialogflow-v2 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +33 -10
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +33 -10
- data/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/v2/agents/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +29 -3
- data/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +29 -3
- data/lib/google/cloud/dialogflow/v2/answer_records/rest/service_stub.rb +30 -14
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +29 -7
- data/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +29 -7
- data/lib/google/cloud/dialogflow/v2/contexts/rest/service_stub.rb +62 -38
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb +32 -6
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +32 -6
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/v2/conversation_models/client.rb +35 -10
- data/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +35 -10
- data/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/v2/conversation_models/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +6 -2
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +37 -10
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +37 -10
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +30 -10
- data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +30 -10
- data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +35 -9
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +35 -9
- data/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/v2/documents/rest/service_stub.rb +78 -50
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/client.rb +29 -3
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/client.rb +29 -3
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/v2/encryption_spec_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +34 -11
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +34 -11
- data/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/v2/entity_types/rest/service_stub.rb +94 -62
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +30 -7
- data/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +30 -7
- data/lib/google/cloud/dialogflow/v2/environments/rest/service_stub.rb +62 -38
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +28 -3
- data/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +28 -3
- data/lib/google/cloud/dialogflow/v2/fulfillments/rest/service_stub.rb +30 -14
- data/lib/google/cloud/dialogflow/v2/generators/client.rb +29 -6
- data/lib/google/cloud/dialogflow/v2/generators/rest/client.rb +29 -6
- data/lib/google/cloud/dialogflow/v2/generators/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/v2/intent_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +31 -8
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +31 -8
- data/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/v2/intents/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +29 -6
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +29 -6
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +29 -11
- data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +29 -10
- data/lib/google/cloud/dialogflow/v2/participants/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +29 -6
- data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +29 -6
- data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +28 -3
- data/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +28 -2
- data/lib/google/cloud/dialogflow/v2/sessions/rest/service_stub.rb +22 -8
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +29 -6
- data/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +29 -6
- data/lib/google/cloud/dialogflow/v2/versions/rest/service_stub.rb +54 -32
- data/proto_docs/google/api/client.rb +19 -0
- data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +3 -2
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +2 -2
- data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +10 -6
- data/proto_docs/google/cloud/dialogflow/v2/conversation_dataset.rb +2 -2
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +7 -4
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +10 -8
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +12 -10
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -171,14 +171,26 @@ module Google
|
|
171
171
|
universe_domain: @config.universe_domain,
|
172
172
|
channel_args: @config.channel_args,
|
173
173
|
interceptors: @config.interceptors,
|
174
|
-
channel_pool_config: @config.channel_pool
|
174
|
+
channel_pool_config: @config.channel_pool,
|
175
|
+
logger: @config.logger
|
175
176
|
)
|
176
177
|
|
178
|
+
@conversation_profiles_stub.stub_logger&.info do |entry|
|
179
|
+
entry.set_system_name
|
180
|
+
entry.set_service
|
181
|
+
entry.message = "Created client for #{entry.service}"
|
182
|
+
entry.set_credentials_fields credentials
|
183
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
184
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
185
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
186
|
+
end
|
187
|
+
|
177
188
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
178
189
|
config.credentials = credentials
|
179
190
|
config.quota_project = @quota_project_id
|
180
191
|
config.endpoint = @conversation_profiles_stub.endpoint
|
181
192
|
config.universe_domain = @conversation_profiles_stub.universe_domain
|
193
|
+
config.logger = @conversation_profiles_stub.logger if config.respond_to? :logger=
|
182
194
|
end
|
183
195
|
end
|
184
196
|
|
@@ -196,6 +208,15 @@ module Google
|
|
196
208
|
#
|
197
209
|
attr_reader :location_client
|
198
210
|
|
211
|
+
##
|
212
|
+
# The logger used for request/response debug logging.
|
213
|
+
#
|
214
|
+
# @return [Logger]
|
215
|
+
#
|
216
|
+
def logger
|
217
|
+
@conversation_profiles_stub.logger
|
218
|
+
end
|
219
|
+
|
199
220
|
# Service calls
|
200
221
|
|
201
222
|
##
|
@@ -289,7 +310,7 @@ module Google
|
|
289
310
|
@conversation_profiles_stub.call_rpc :list_conversation_profiles, request, options: options do |response, operation|
|
290
311
|
response = ::Gapic::PagedEnumerable.new @conversation_profiles_stub, :list_conversation_profiles, request, response, operation, options
|
291
312
|
yield response, operation if block_given?
|
292
|
-
|
313
|
+
throw :response, response
|
293
314
|
end
|
294
315
|
rescue ::GRPC::BadStatus => e
|
295
316
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -377,7 +398,6 @@ module Google
|
|
377
398
|
|
378
399
|
@conversation_profiles_stub.call_rpc :get_conversation_profile, request, options: options do |response, operation|
|
379
400
|
yield response, operation if block_given?
|
380
|
-
return response
|
381
401
|
end
|
382
402
|
rescue ::GRPC::BadStatus => e
|
383
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -386,7 +406,9 @@ module Google
|
|
386
406
|
##
|
387
407
|
# Creates a conversation profile in the specified project.
|
388
408
|
#
|
389
|
-
#
|
409
|
+
# {::Google::Cloud::Dialogflow::V2::ConversationProfile#create_time ConversationProfile.create_time}
|
410
|
+
# and
|
411
|
+
# {::Google::Cloud::Dialogflow::V2::ConversationProfile#update_time ConversationProfile.update_time}
|
390
412
|
# aren't populated in the response. You can retrieve them via
|
391
413
|
# {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#get_conversation_profile GetConversationProfile}
|
392
414
|
# API.
|
@@ -471,7 +493,6 @@ module Google
|
|
471
493
|
|
472
494
|
@conversation_profiles_stub.call_rpc :create_conversation_profile, request, options: options do |response, operation|
|
473
495
|
yield response, operation if block_given?
|
474
|
-
return response
|
475
496
|
end
|
476
497
|
rescue ::GRPC::BadStatus => e
|
477
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -480,7 +501,9 @@ module Google
|
|
480
501
|
##
|
481
502
|
# Updates the specified conversation profile.
|
482
503
|
#
|
483
|
-
#
|
504
|
+
# {::Google::Cloud::Dialogflow::V2::ConversationProfile#create_time ConversationProfile.create_time}
|
505
|
+
# and
|
506
|
+
# {::Google::Cloud::Dialogflow::V2::ConversationProfile#update_time ConversationProfile.update_time}
|
484
507
|
# aren't populated in the response. You can retrieve them via
|
485
508
|
# {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Client#get_conversation_profile GetConversationProfile}
|
486
509
|
# API.
|
@@ -564,7 +587,6 @@ module Google
|
|
564
587
|
|
565
588
|
@conversation_profiles_stub.call_rpc :update_conversation_profile, request, options: options do |response, operation|
|
566
589
|
yield response, operation if block_given?
|
567
|
-
return response
|
568
590
|
end
|
569
591
|
rescue ::GRPC::BadStatus => e
|
570
592
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -652,7 +674,6 @@ module Google
|
|
652
674
|
|
653
675
|
@conversation_profiles_stub.call_rpc :delete_conversation_profile, request, options: options do |response, operation|
|
654
676
|
yield response, operation if block_given?
|
655
|
-
return response
|
656
677
|
end
|
657
678
|
rescue ::GRPC::BadStatus => e
|
658
679
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -770,7 +791,7 @@ module Google
|
|
770
791
|
@conversation_profiles_stub.call_rpc :set_suggestion_feature_config, request, options: options do |response, operation|
|
771
792
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
772
793
|
yield response, operation if block_given?
|
773
|
-
|
794
|
+
throw :response, response
|
774
795
|
end
|
775
796
|
rescue ::GRPC::BadStatus => e
|
776
797
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -881,7 +902,7 @@ module Google
|
|
881
902
|
@conversation_profiles_stub.call_rpc :clear_suggestion_feature_config, request, options: options do |response, operation|
|
882
903
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
883
904
|
yield response, operation if block_given?
|
884
|
-
|
905
|
+
throw :response, response
|
885
906
|
end
|
886
907
|
rescue ::GRPC::BadStatus => e
|
887
908
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -970,6 +991,11 @@ module Google
|
|
970
991
|
# default endpoint URL. The default value of nil uses the environment
|
971
992
|
# universe (usually the default "googleapis.com" universe).
|
972
993
|
# @return [::String,nil]
|
994
|
+
# @!attribute [rw] logger
|
995
|
+
# A custom logger to use for request/response debug logging, or the value
|
996
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
997
|
+
# explicitly disable logging.
|
998
|
+
# @return [::Logger,:default,nil]
|
973
999
|
#
|
974
1000
|
class Configuration
|
975
1001
|
extend ::Gapic::Config
|
@@ -994,6 +1020,7 @@ module Google
|
|
994
1020
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
995
1021
|
config_attr :quota_project, nil, ::String, nil
|
996
1022
|
config_attr :universe_domain, nil, ::String, nil
|
1023
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
997
1024
|
|
998
1025
|
# @private
|
999
1026
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -688,6 +679,11 @@ module Google
|
|
688
679
|
# default endpoint URL. The default value of nil uses the environment
|
689
680
|
# universe (usually the default "googleapis.com" universe).
|
690
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
691
687
|
#
|
692
688
|
class Configuration
|
693
689
|
extend ::Gapic::Config
|
@@ -712,6 +708,7 @@ module Google
|
|
712
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
709
|
config_attr :quota_project, nil, ::String, nil
|
714
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
712
|
|
716
713
|
# @private
|
717
714
|
def initialize parent_config = nil
|
@@ -164,15 +164,27 @@ module Google
|
|
164
164
|
endpoint: @config.endpoint,
|
165
165
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
166
166
|
universe_domain: @config.universe_domain,
|
167
|
-
credentials: credentials
|
167
|
+
credentials: credentials,
|
168
|
+
logger: @config.logger
|
168
169
|
)
|
169
170
|
|
171
|
+
@conversation_profiles_stub.logger(stub: true)&.info do |entry|
|
172
|
+
entry.set_system_name
|
173
|
+
entry.set_service
|
174
|
+
entry.message = "Created client for #{entry.service}"
|
175
|
+
entry.set_credentials_fields credentials
|
176
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
177
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
178
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
179
|
+
end
|
180
|
+
|
170
181
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
171
182
|
config.credentials = credentials
|
172
183
|
config.quota_project = @quota_project_id
|
173
184
|
config.endpoint = @conversation_profiles_stub.endpoint
|
174
185
|
config.universe_domain = @conversation_profiles_stub.universe_domain
|
175
186
|
config.bindings_override = @config.bindings_override
|
187
|
+
config.logger = @conversation_profiles_stub.logger if config.respond_to? :logger=
|
176
188
|
end
|
177
189
|
end
|
178
190
|
|
@@ -190,6 +202,15 @@ module Google
|
|
190
202
|
#
|
191
203
|
attr_reader :location_client
|
192
204
|
|
205
|
+
##
|
206
|
+
# The logger used for request/response debug logging.
|
207
|
+
#
|
208
|
+
# @return [Logger]
|
209
|
+
#
|
210
|
+
def logger
|
211
|
+
@conversation_profiles_stub.logger
|
212
|
+
end
|
213
|
+
|
193
214
|
# Service calls
|
194
215
|
|
195
216
|
##
|
@@ -276,7 +297,7 @@ module Google
|
|
276
297
|
@conversation_profiles_stub.list_conversation_profiles request, options do |result, operation|
|
277
298
|
result = ::Gapic::Rest::PagedEnumerable.new @conversation_profiles_stub, :list_conversation_profiles, "conversation_profiles", request, result, options
|
278
299
|
yield result, operation if block_given?
|
279
|
-
|
300
|
+
throw :response, result
|
280
301
|
end
|
281
302
|
rescue ::Gapic::Rest::Error => e
|
282
303
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -357,7 +378,6 @@ module Google
|
|
357
378
|
|
358
379
|
@conversation_profiles_stub.get_conversation_profile request, options do |result, operation|
|
359
380
|
yield result, operation if block_given?
|
360
|
-
return result
|
361
381
|
end
|
362
382
|
rescue ::Gapic::Rest::Error => e
|
363
383
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -366,7 +386,9 @@ module Google
|
|
366
386
|
##
|
367
387
|
# Creates a conversation profile in the specified project.
|
368
388
|
#
|
369
|
-
#
|
389
|
+
# {::Google::Cloud::Dialogflow::V2::ConversationProfile#create_time ConversationProfile.create_time}
|
390
|
+
# and
|
391
|
+
# {::Google::Cloud::Dialogflow::V2::ConversationProfile#update_time ConversationProfile.update_time}
|
370
392
|
# aren't populated in the response. You can retrieve them via
|
371
393
|
# {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Rest::Client#get_conversation_profile GetConversationProfile}
|
372
394
|
# API.
|
@@ -444,7 +466,6 @@ module Google
|
|
444
466
|
|
445
467
|
@conversation_profiles_stub.create_conversation_profile request, options do |result, operation|
|
446
468
|
yield result, operation if block_given?
|
447
|
-
return result
|
448
469
|
end
|
449
470
|
rescue ::Gapic::Rest::Error => e
|
450
471
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -453,7 +474,9 @@ module Google
|
|
453
474
|
##
|
454
475
|
# Updates the specified conversation profile.
|
455
476
|
#
|
456
|
-
#
|
477
|
+
# {::Google::Cloud::Dialogflow::V2::ConversationProfile#create_time ConversationProfile.create_time}
|
478
|
+
# and
|
479
|
+
# {::Google::Cloud::Dialogflow::V2::ConversationProfile#update_time ConversationProfile.update_time}
|
457
480
|
# aren't populated in the response. You can retrieve them via
|
458
481
|
# {::Google::Cloud::Dialogflow::V2::ConversationProfiles::Rest::Client#get_conversation_profile GetConversationProfile}
|
459
482
|
# API.
|
@@ -530,7 +553,6 @@ module Google
|
|
530
553
|
|
531
554
|
@conversation_profiles_stub.update_conversation_profile request, options do |result, operation|
|
532
555
|
yield result, operation if block_given?
|
533
|
-
return result
|
534
556
|
end
|
535
557
|
rescue ::Gapic::Rest::Error => e
|
536
558
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -611,7 +633,6 @@ module Google
|
|
611
633
|
|
612
634
|
@conversation_profiles_stub.delete_conversation_profile request, options do |result, operation|
|
613
635
|
yield result, operation if block_given?
|
614
|
-
return result
|
615
636
|
end
|
616
637
|
rescue ::Gapic::Rest::Error => e
|
617
638
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -722,7 +743,7 @@ module Google
|
|
722
743
|
@conversation_profiles_stub.set_suggestion_feature_config request, options do |result, operation|
|
723
744
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
724
745
|
yield result, operation if block_given?
|
725
|
-
|
746
|
+
throw :response, result
|
726
747
|
end
|
727
748
|
rescue ::Gapic::Rest::Error => e
|
728
749
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -826,7 +847,7 @@ module Google
|
|
826
847
|
@conversation_profiles_stub.clear_suggestion_feature_config request, options do |result, operation|
|
827
848
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
828
849
|
yield result, operation if block_given?
|
829
|
-
|
850
|
+
throw :response, result
|
830
851
|
end
|
831
852
|
rescue ::Gapic::Rest::Error => e
|
832
853
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -906,6 +927,11 @@ module Google
|
|
906
927
|
# default endpoint URL. The default value of nil uses the environment
|
907
928
|
# universe (usually the default "googleapis.com" universe).
|
908
929
|
# @return [::String,nil]
|
930
|
+
# @!attribute [rw] logger
|
931
|
+
# A custom logger to use for request/response debug logging, or the value
|
932
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
933
|
+
# explicitly disable logging.
|
934
|
+
# @return [::Logger,:default,nil]
|
909
935
|
#
|
910
936
|
class Configuration
|
911
937
|
extend ::Gapic::Config
|
@@ -934,6 +960,7 @@ module Google
|
|
934
960
|
# by the host service.
|
935
961
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
936
962
|
config_attr :bindings_override, {}, ::Hash, nil
|
963
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
937
964
|
|
938
965
|
# @private
|
939
966
|
def initialize parent_config = nil
|
@@ -115,14 +115,6 @@ module Google
|
|
115
115
|
# Lists operations that match the specified filter in the request. If the
|
116
116
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
117
117
|
#
|
118
|
-
# NOTE: the `name` binding allows API services to override the binding
|
119
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
120
|
-
# override the binding, API services can add a binding such as
|
121
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
122
|
-
# For backwards compatibility, the default name includes the operations
|
123
|
-
# collection id, however overriding users must ensure the name binding
|
124
|
-
# is the parent resource, without the operations collection id.
|
125
|
-
#
|
126
118
|
# @overload list_operations(request, options = nil)
|
127
119
|
# Pass arguments to `list_operations` via a request object, either of type
|
128
120
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -204,7 +196,7 @@ module Google
|
|
204
196
|
@operations_stub.list_operations request, options do |result, operation|
|
205
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
206
198
|
yield result, operation if block_given?
|
207
|
-
|
199
|
+
throw :response, result
|
208
200
|
end
|
209
201
|
rescue ::Gapic::Rest::Error => e
|
210
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -293,7 +285,7 @@ module Google
|
|
293
285
|
@operations_stub.get_operation request, options do |result, operation|
|
294
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
295
287
|
yield result, operation if block_given?
|
296
|
-
|
288
|
+
throw :response, result
|
297
289
|
end
|
298
290
|
rescue ::Gapic::Rest::Error => e
|
299
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -375,7 +367,6 @@ module Google
|
|
375
367
|
|
376
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
377
369
|
yield result, operation if block_given?
|
378
|
-
return result
|
379
370
|
end
|
380
371
|
rescue ::Gapic::Rest::Error => e
|
381
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -390,8 +381,9 @@ module Google
|
|
390
381
|
# other methods to check whether the cancellation succeeded or whether the
|
391
382
|
# operation completed despite cancellation. On successful cancellation,
|
392
383
|
# the operation is not deleted; instead, it becomes an operation with
|
393
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
394
|
-
# corresponding to
|
384
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
385
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
386
|
+
# `Code.CANCELLED`.
|
395
387
|
#
|
396
388
|
# @overload cancel_operation(request, options = nil)
|
397
389
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -463,7 +455,6 @@ module Google
|
|
463
455
|
|
464
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
465
457
|
yield result, operation if block_given?
|
466
|
-
return result
|
467
458
|
end
|
468
459
|
rescue ::Gapic::Rest::Error => e
|
469
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -543,6 +534,11 @@ module Google
|
|
543
534
|
# default endpoint URL. The default value of nil uses the environment
|
544
535
|
# universe (usually the default "googleapis.com" universe).
|
545
536
|
# @return [::String,nil]
|
537
|
+
# @!attribute [rw] logger
|
538
|
+
# A custom logger to use for request/response debug logging, or the value
|
539
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
540
|
+
# explicitly disable logging.
|
541
|
+
# @return [::Logger,:default,nil]
|
546
542
|
#
|
547
543
|
class Configuration
|
548
544
|
extend ::Gapic::Config
|
@@ -564,6 +560,7 @@ module Google
|
|
564
560
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
565
561
|
config_attr :quota_project, nil, ::String, nil
|
566
562
|
config_attr :universe_domain, nil, ::String, nil
|
563
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
567
564
|
|
568
565
|
# @private
|
569
566
|
def initialize parent_config = nil
|
@@ -683,16 +680,18 @@ module Google
|
|
683
680
|
|
684
681
|
response = @client_stub.make_http_request(
|
685
682
|
verb,
|
686
|
-
uri:
|
687
|
-
body:
|
688
|
-
params:
|
683
|
+
uri: uri,
|
684
|
+
body: body || "",
|
685
|
+
params: query_string_params,
|
686
|
+
method_name: "list_operations",
|
689
687
|
options: options
|
690
688
|
)
|
691
689
|
operation = ::Gapic::Rest::TransportOperation.new response
|
692
690
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
693
|
-
|
694
|
-
|
695
|
-
|
691
|
+
catch :response do
|
692
|
+
yield result, operation if block_given?
|
693
|
+
result
|
694
|
+
end
|
696
695
|
end
|
697
696
|
|
698
697
|
##
|
@@ -721,16 +720,18 @@ module Google
|
|
721
720
|
|
722
721
|
response = @client_stub.make_http_request(
|
723
722
|
verb,
|
724
|
-
uri:
|
725
|
-
body:
|
726
|
-
params:
|
723
|
+
uri: uri,
|
724
|
+
body: body || "",
|
725
|
+
params: query_string_params,
|
726
|
+
method_name: "get_operation",
|
727
727
|
options: options
|
728
728
|
)
|
729
729
|
operation = ::Gapic::Rest::TransportOperation.new response
|
730
730
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
731
|
-
|
732
|
-
|
733
|
-
|
731
|
+
catch :response do
|
732
|
+
yield result, operation if block_given?
|
733
|
+
result
|
734
|
+
end
|
734
735
|
end
|
735
736
|
|
736
737
|
##
|
@@ -759,16 +760,18 @@ module Google
|
|
759
760
|
|
760
761
|
response = @client_stub.make_http_request(
|
761
762
|
verb,
|
762
|
-
uri:
|
763
|
-
body:
|
764
|
-
params:
|
763
|
+
uri: uri,
|
764
|
+
body: body || "",
|
765
|
+
params: query_string_params,
|
766
|
+
method_name: "delete_operation",
|
765
767
|
options: options
|
766
768
|
)
|
767
769
|
operation = ::Gapic::Rest::TransportOperation.new response
|
768
770
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
769
|
-
|
770
|
-
|
771
|
-
|
771
|
+
catch :response do
|
772
|
+
yield result, operation if block_given?
|
773
|
+
result
|
774
|
+
end
|
772
775
|
end
|
773
776
|
|
774
777
|
##
|
@@ -797,16 +800,18 @@ module Google
|
|
797
800
|
|
798
801
|
response = @client_stub.make_http_request(
|
799
802
|
verb,
|
800
|
-
uri:
|
801
|
-
body:
|
802
|
-
params:
|
803
|
+
uri: uri,
|
804
|
+
body: body || "",
|
805
|
+
params: query_string_params,
|
806
|
+
method_name: "cancel_operation",
|
803
807
|
options: options
|
804
808
|
)
|
805
809
|
operation = ::Gapic::Rest::TransportOperation.new response
|
806
810
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
807
|
-
|
808
|
-
|
809
|
-
|
811
|
+
catch :response do
|
812
|
+
yield result, operation if block_given?
|
813
|
+
result
|
814
|
+
end
|
810
815
|
end
|
811
816
|
|
812
817
|
##
|