google-cloud-dialogflow-cx-v3 1.1.1 → 1.3.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 +30 -20
- data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +44 -25
- data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/cx/v3/agents/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +44 -25
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +102 -68
- data/lib/google/cloud/dialogflow/cx/v3/audio_config_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/changelog_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +32 -6
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +32 -6
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/service_stub.rb +30 -14
- data/lib/google/cloud/dialogflow/cx/v3/data_store_connection_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +32 -8
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/service_stub.rb +30 -14
- data/lib/google/cloud/dialogflow/cx/v3/entity_type_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +43 -21
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +43 -21
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/cx/v3/environment_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +50 -27
- data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +50 -27
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/service_stub.rb +86 -56
- data/lib/google/cloud/dialogflow/cx/v3/experiment_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +38 -21
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +38 -21
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +47 -26
- data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +47 -26
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/service_stub.rb +94 -62
- data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/gcs_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/generative_settings_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/generator_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/generators/client.rb +35 -12
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/client.rb +35 -12
- data/lib/google/cloud/dialogflow/cx/v3/generators/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/import_strategy_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +41 -19
- data/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +41 -19
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +37 -14
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +37 -14
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/safety_settings_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +35 -12
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +35 -12
- 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 +54 -29
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +54 -29
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +5 -1
- data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +40 -16
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +40 -14
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/service_stub.rb +47 -26
- data/lib/google/cloud/dialogflow/cx/v3/test_case_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +59 -38
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +59 -38
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +43 -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_group_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +43 -21
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +43 -21
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/service_stub.rb +54 -32
- data/lib/google/cloud/dialogflow/cx/v3/validation_message_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/version.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/version_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/versions/client.rb +44 -22
- data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +12 -15
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +44 -22
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +43 -38
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/service_stub.rb +70 -44
- data/lib/google/cloud/dialogflow/cx/v3/webhook_pb.rb +1 -1
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +35 -12
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +35 -12
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/service_stub.rb +54 -32
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/advanced_settings.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +44 -20
- data/proto_docs/google/cloud/dialogflow/cx/v3/audio_config.rb +6 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/changelog.rb +5 -5
- data/proto_docs/google/cloud/dialogflow/cx/v3/deployment.rb +11 -13
- data/proto_docs/google/cloud/dialogflow/cx/v3/entity_type.rb +16 -17
- data/proto_docs/google/cloud/dialogflow/cx/v3/environment.rb +26 -28
- data/proto_docs/google/cloud/dialogflow/cx/v3/experiment.rb +15 -19
- data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +28 -27
- data/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +2 -2
- data/proto_docs/google/cloud/dialogflow/cx/v3/generative_settings.rb +2 -2
- data/proto_docs/google/cloud/dialogflow/cx/v3/generator.rb +41 -8
- data/proto_docs/google/cloud/dialogflow/cx/v3/intent.rb +19 -19
- data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +33 -33
- data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +2 -1
- data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +14 -14
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +107 -22
- data/proto_docs/google/cloud/dialogflow/cx/v3/session_entity_type.rb +30 -28
- data/proto_docs/google/cloud/dialogflow/cx/v3/test_case.rb +41 -43
- data/proto_docs/google/cloud/dialogflow/cx/v3/transition_route_group.rb +16 -18
- data/proto_docs/google/cloud/dialogflow/cx/v3/version.rb +19 -19
- data/proto_docs/google/cloud/dialogflow/cx/v3/webhook.rb +24 -25
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -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
|
+
@environments_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 = @environments_stub.endpoint
|
182
193
|
config.universe_domain = @environments_stub.universe_domain
|
194
|
+
config.logger = @environments_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
|
+
@environments_stub.logger
|
219
|
+
end
|
220
|
+
|
200
221
|
# Service calls
|
201
222
|
|
202
223
|
##
|
@@ -220,8 +241,8 @@ module Google
|
|
220
241
|
#
|
221
242
|
# @param parent [::String]
|
222
243
|
# Required. The {::Google::Cloud::Dialogflow::CX::V3::Agent Agent} to list all
|
223
|
-
# environments for. Format:
|
224
|
-
#
|
244
|
+
# environments for. Format:
|
245
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
|
225
246
|
# @param page_size [::Integer]
|
226
247
|
# The maximum number of items to return in a single page. By default 20 and
|
227
248
|
# at most 100.
|
@@ -292,7 +313,7 @@ module Google
|
|
292
313
|
@environments_stub.call_rpc :list_environments, request, options: options do |response, operation|
|
293
314
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :list_environments, request, response, operation, options
|
294
315
|
yield response, operation if block_given?
|
295
|
-
|
316
|
+
throw :response, response
|
296
317
|
end
|
297
318
|
rescue ::GRPC::BadStatus => e
|
298
319
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -320,8 +341,7 @@ module Google
|
|
320
341
|
# @param name [::String]
|
321
342
|
# Required. The name of the
|
322
343
|
# {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}. Format:
|
323
|
-
# `projects/<
|
324
|
-
# ID>/environments/<Environment ID>`.
|
344
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
325
345
|
#
|
326
346
|
# @yield [response, operation] Access the result along with the RPC operation
|
327
347
|
# @yieldparam response [::Google::Cloud::Dialogflow::CX::V3::Environment]
|
@@ -382,7 +402,6 @@ module Google
|
|
382
402
|
|
383
403
|
@environments_stub.call_rpc :get_environment, request, options: options do |response, operation|
|
384
404
|
yield response, operation if block_given?
|
385
|
-
return response
|
386
405
|
end
|
387
406
|
rescue ::GRPC::BadStatus => e
|
388
407
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -418,7 +437,7 @@ module Google
|
|
418
437
|
# @param parent [::String]
|
419
438
|
# Required. The {::Google::Cloud::Dialogflow::CX::V3::Agent Agent} to create an
|
420
439
|
# {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} for. Format:
|
421
|
-
# `projects/<
|
440
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
|
422
441
|
# @param environment [::Google::Cloud::Dialogflow::CX::V3::Environment, ::Hash]
|
423
442
|
# Required. The environment to create.
|
424
443
|
#
|
@@ -489,7 +508,7 @@ module Google
|
|
489
508
|
@environments_stub.call_rpc :create_environment, request, options: options do |response, operation|
|
490
509
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
491
510
|
yield response, operation if block_given?
|
492
|
-
|
511
|
+
throw :response, response
|
493
512
|
end
|
494
513
|
rescue ::GRPC::BadStatus => e
|
495
514
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -594,7 +613,7 @@ module Google
|
|
594
613
|
@environments_stub.call_rpc :update_environment, request, options: options do |response, operation|
|
595
614
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
596
615
|
yield response, operation if block_given?
|
597
|
-
|
616
|
+
throw :response, response
|
598
617
|
end
|
599
618
|
rescue ::GRPC::BadStatus => e
|
600
619
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -622,8 +641,7 @@ module Google
|
|
622
641
|
# @param name [::String]
|
623
642
|
# Required. The name of the
|
624
643
|
# {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} to delete. Format:
|
625
|
-
# `projects/<
|
626
|
-
# ID>/environments/<Environment ID>`.
|
644
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
627
645
|
#
|
628
646
|
# @yield [response, operation] Access the result along with the RPC operation
|
629
647
|
# @yieldparam response [::Google::Protobuf::Empty]
|
@@ -684,7 +702,6 @@ module Google
|
|
684
702
|
|
685
703
|
@environments_stub.call_rpc :delete_environment, request, options: options do |response, operation|
|
686
704
|
yield response, operation if block_given?
|
687
|
-
return response
|
688
705
|
end
|
689
706
|
rescue ::GRPC::BadStatus => e
|
690
707
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -711,8 +728,8 @@ module Google
|
|
711
728
|
#
|
712
729
|
# @param name [::String]
|
713
730
|
# Required. Resource name of the environment to look up the history for.
|
714
|
-
# Format:
|
715
|
-
#
|
731
|
+
# Format:
|
732
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
716
733
|
# @param page_size [::Integer]
|
717
734
|
# The maximum number of items to return in a single page. By default 100 and
|
718
735
|
# at most 1000.
|
@@ -783,7 +800,7 @@ module Google
|
|
783
800
|
@environments_stub.call_rpc :lookup_environment_history, request, options: options do |response, operation|
|
784
801
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :lookup_environment_history, request, response, operation, options
|
785
802
|
yield response, operation if block_given?
|
786
|
-
|
803
|
+
throw :response, response
|
787
804
|
end
|
788
805
|
rescue ::GRPC::BadStatus => e
|
789
806
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -818,8 +835,8 @@ module Google
|
|
818
835
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
819
836
|
#
|
820
837
|
# @param environment [::String]
|
821
|
-
# Required. Format:
|
822
|
-
#
|
838
|
+
# Required. Format:
|
839
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
823
840
|
#
|
824
841
|
# @yield [response, operation] Access the result along with the RPC operation
|
825
842
|
# @yieldparam response [::Gapic::Operation]
|
@@ -888,7 +905,7 @@ module Google
|
|
888
905
|
@environments_stub.call_rpc :run_continuous_test, request, options: options do |response, operation|
|
889
906
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
890
907
|
yield response, operation if block_given?
|
891
|
-
|
908
|
+
throw :response, response
|
892
909
|
end
|
893
910
|
rescue ::GRPC::BadStatus => e
|
894
911
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -914,8 +931,8 @@ module Google
|
|
914
931
|
#
|
915
932
|
# @param parent [::String]
|
916
933
|
# Required. The environment to list results for.
|
917
|
-
# Format:
|
918
|
-
# environments/<
|
934
|
+
# Format:
|
935
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
919
936
|
# @param page_size [::Integer]
|
920
937
|
# The maximum number of items to return in a single page. By default 100 and
|
921
938
|
# at most 1000.
|
@@ -986,7 +1003,7 @@ module Google
|
|
986
1003
|
@environments_stub.call_rpc :list_continuous_test_results, request, options: options do |response, operation|
|
987
1004
|
response = ::Gapic::PagedEnumerable.new @environments_stub, :list_continuous_test_results, request, response, operation, options
|
988
1005
|
yield response, operation if block_given?
|
989
|
-
|
1006
|
+
throw :response, response
|
990
1007
|
end
|
991
1008
|
rescue ::GRPC::BadStatus => e
|
992
1009
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1022,12 +1039,12 @@ module Google
|
|
1022
1039
|
#
|
1023
1040
|
# @param environment [::String]
|
1024
1041
|
# Required. The environment to deploy the flow to.
|
1025
|
-
# Format:
|
1026
|
-
# environments/<
|
1042
|
+
# Format:
|
1043
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
1027
1044
|
# @param flow_version [::String]
|
1028
1045
|
# Required. The flow version to deploy.
|
1029
|
-
# Format:
|
1030
|
-
# flows/<
|
1046
|
+
# Format:
|
1047
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
|
1031
1048
|
#
|
1032
1049
|
# @yield [response, operation] Access the result along with the RPC operation
|
1033
1050
|
# @yieldparam response [::Gapic::Operation]
|
@@ -1096,7 +1113,7 @@ module Google
|
|
1096
1113
|
@environments_stub.call_rpc :deploy_flow, request, options: options do |response, operation|
|
1097
1114
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1098
1115
|
yield response, operation if block_given?
|
1099
|
-
|
1116
|
+
throw :response, response
|
1100
1117
|
end
|
1101
1118
|
rescue ::GRPC::BadStatus => e
|
1102
1119
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1185,6 +1202,11 @@ module Google
|
|
1185
1202
|
# default endpoint URL. The default value of nil uses the environment
|
1186
1203
|
# universe (usually the default "googleapis.com" universe).
|
1187
1204
|
# @return [::String,nil]
|
1205
|
+
# @!attribute [rw] logger
|
1206
|
+
# A custom logger to use for request/response debug logging, or the value
|
1207
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1208
|
+
# explicitly disable logging.
|
1209
|
+
# @return [::Logger,:default,nil]
|
1188
1210
|
#
|
1189
1211
|
class Configuration
|
1190
1212
|
extend ::Gapic::Config
|
@@ -1209,6 +1231,7 @@ module Google
|
|
1209
1231
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1210
1232
|
config_attr :quota_project, nil, ::String, nil
|
1211
1233
|
config_attr :universe_domain, nil, ::String, nil
|
1234
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1212
1235
|
|
1213
1236
|
# @private
|
1214
1237
|
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)
|
@@ -689,6 +680,11 @@ module Google
|
|
689
680
|
# default endpoint URL. The default value of nil uses the environment
|
690
681
|
# universe (usually the default "googleapis.com" universe).
|
691
682
|
# @return [::String,nil]
|
683
|
+
# @!attribute [rw] logger
|
684
|
+
# A custom logger to use for request/response debug logging, or the value
|
685
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
686
|
+
# explicitly disable logging.
|
687
|
+
# @return [::Logger,:default,nil]
|
692
688
|
#
|
693
689
|
class Configuration
|
694
690
|
extend ::Gapic::Config
|
@@ -713,6 +709,7 @@ module Google
|
|
713
709
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
714
710
|
config_attr :quota_project, nil, ::String, nil
|
715
711
|
config_attr :universe_domain, nil, ::String, nil
|
712
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
716
713
|
|
717
714
|
# @private
|
718
715
|
def initialize parent_config = nil
|
@@ -165,15 +165,27 @@ module Google
|
|
165
165
|
endpoint: @config.endpoint,
|
166
166
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
167
167
|
universe_domain: @config.universe_domain,
|
168
|
-
credentials: credentials
|
168
|
+
credentials: credentials,
|
169
|
+
logger: @config.logger
|
169
170
|
)
|
170
171
|
|
172
|
+
@environments_stub.logger(stub: true)&.info do |entry|
|
173
|
+
entry.set_system_name
|
174
|
+
entry.set_service
|
175
|
+
entry.message = "Created client for #{entry.service}"
|
176
|
+
entry.set_credentials_fields credentials
|
177
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
178
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
179
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
180
|
+
end
|
181
|
+
|
171
182
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
172
183
|
config.credentials = credentials
|
173
184
|
config.quota_project = @quota_project_id
|
174
185
|
config.endpoint = @environments_stub.endpoint
|
175
186
|
config.universe_domain = @environments_stub.universe_domain
|
176
187
|
config.bindings_override = @config.bindings_override
|
188
|
+
config.logger = @environments_stub.logger if config.respond_to? :logger=
|
177
189
|
end
|
178
190
|
end
|
179
191
|
|
@@ -191,6 +203,15 @@ module Google
|
|
191
203
|
#
|
192
204
|
attr_reader :location_client
|
193
205
|
|
206
|
+
##
|
207
|
+
# The logger used for request/response debug logging.
|
208
|
+
#
|
209
|
+
# @return [Logger]
|
210
|
+
#
|
211
|
+
def logger
|
212
|
+
@environments_stub.logger
|
213
|
+
end
|
214
|
+
|
194
215
|
# Service calls
|
195
216
|
|
196
217
|
##
|
@@ -214,8 +235,8 @@ module Google
|
|
214
235
|
#
|
215
236
|
# @param parent [::String]
|
216
237
|
# Required. The {::Google::Cloud::Dialogflow::CX::V3::Agent Agent} to list all
|
217
|
-
# environments for. Format:
|
218
|
-
#
|
238
|
+
# environments for. Format:
|
239
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
|
219
240
|
# @param page_size [::Integer]
|
220
241
|
# The maximum number of items to return in a single page. By default 20 and
|
221
242
|
# at most 100.
|
@@ -279,7 +300,7 @@ module Google
|
|
279
300
|
@environments_stub.list_environments request, options do |result, operation|
|
280
301
|
result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_environments, "environments", request, result, options
|
281
302
|
yield result, operation if block_given?
|
282
|
-
|
303
|
+
throw :response, result
|
283
304
|
end
|
284
305
|
rescue ::Gapic::Rest::Error => e
|
285
306
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -307,8 +328,7 @@ module Google
|
|
307
328
|
# @param name [::String]
|
308
329
|
# Required. The name of the
|
309
330
|
# {::Google::Cloud::Dialogflow::CX::V3::Environment Environment}. Format:
|
310
|
-
# `projects/<
|
311
|
-
# ID>/environments/<Environment ID>`.
|
331
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
312
332
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
313
333
|
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::Environment]
|
314
334
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -362,7 +382,6 @@ module Google
|
|
362
382
|
|
363
383
|
@environments_stub.get_environment request, options do |result, operation|
|
364
384
|
yield result, operation if block_given?
|
365
|
-
return result
|
366
385
|
end
|
367
386
|
rescue ::Gapic::Rest::Error => e
|
368
387
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,7 +417,7 @@ module Google
|
|
398
417
|
# @param parent [::String]
|
399
418
|
# Required. The {::Google::Cloud::Dialogflow::CX::V3::Agent Agent} to create an
|
400
419
|
# {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} for. Format:
|
401
|
-
# `projects/<
|
420
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.
|
402
421
|
# @param environment [::Google::Cloud::Dialogflow::CX::V3::Environment, ::Hash]
|
403
422
|
# Required. The environment to create.
|
404
423
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
@@ -462,7 +481,7 @@ module Google
|
|
462
481
|
@environments_stub.create_environment request, options do |result, operation|
|
463
482
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
464
483
|
yield result, operation if block_given?
|
465
|
-
|
484
|
+
throw :response, result
|
466
485
|
end
|
467
486
|
rescue ::Gapic::Rest::Error => e
|
468
487
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -560,7 +579,7 @@ module Google
|
|
560
579
|
@environments_stub.update_environment request, options do |result, operation|
|
561
580
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
562
581
|
yield result, operation if block_given?
|
563
|
-
|
582
|
+
throw :response, result
|
564
583
|
end
|
565
584
|
rescue ::Gapic::Rest::Error => e
|
566
585
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -588,8 +607,7 @@ module Google
|
|
588
607
|
# @param name [::String]
|
589
608
|
# Required. The name of the
|
590
609
|
# {::Google::Cloud::Dialogflow::CX::V3::Environment Environment} to delete. Format:
|
591
|
-
# `projects/<
|
592
|
-
# ID>/environments/<Environment ID>`.
|
610
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
593
611
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
594
612
|
# @yieldparam result [::Google::Protobuf::Empty]
|
595
613
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -643,7 +661,6 @@ module Google
|
|
643
661
|
|
644
662
|
@environments_stub.delete_environment request, options do |result, operation|
|
645
663
|
yield result, operation if block_given?
|
646
|
-
return result
|
647
664
|
end
|
648
665
|
rescue ::Gapic::Rest::Error => e
|
649
666
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -670,8 +687,8 @@ module Google
|
|
670
687
|
#
|
671
688
|
# @param name [::String]
|
672
689
|
# Required. Resource name of the environment to look up the history for.
|
673
|
-
# Format:
|
674
|
-
#
|
690
|
+
# Format:
|
691
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
675
692
|
# @param page_size [::Integer]
|
676
693
|
# The maximum number of items to return in a single page. By default 100 and
|
677
694
|
# at most 1000.
|
@@ -735,7 +752,7 @@ module Google
|
|
735
752
|
@environments_stub.lookup_environment_history request, options do |result, operation|
|
736
753
|
result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :lookup_environment_history, "environments", request, result, options
|
737
754
|
yield result, operation if block_given?
|
738
|
-
|
755
|
+
throw :response, result
|
739
756
|
end
|
740
757
|
rescue ::Gapic::Rest::Error => e
|
741
758
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -770,8 +787,8 @@ module Google
|
|
770
787
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
771
788
|
#
|
772
789
|
# @param environment [::String]
|
773
|
-
# Required. Format:
|
774
|
-
#
|
790
|
+
# Required. Format:
|
791
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
775
792
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
776
793
|
# @yieldparam result [::Gapic::Operation]
|
777
794
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -833,7 +850,7 @@ module Google
|
|
833
850
|
@environments_stub.run_continuous_test request, options do |result, operation|
|
834
851
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
835
852
|
yield result, operation if block_given?
|
836
|
-
|
853
|
+
throw :response, result
|
837
854
|
end
|
838
855
|
rescue ::Gapic::Rest::Error => e
|
839
856
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -859,8 +876,8 @@ module Google
|
|
859
876
|
#
|
860
877
|
# @param parent [::String]
|
861
878
|
# Required. The environment to list results for.
|
862
|
-
# Format:
|
863
|
-
# environments/<
|
879
|
+
# Format:
|
880
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
864
881
|
# @param page_size [::Integer]
|
865
882
|
# The maximum number of items to return in a single page. By default 100 and
|
866
883
|
# at most 1000.
|
@@ -924,7 +941,7 @@ module Google
|
|
924
941
|
@environments_stub.list_continuous_test_results request, options do |result, operation|
|
925
942
|
result = ::Gapic::Rest::PagedEnumerable.new @environments_stub, :list_continuous_test_results, "continuous_test_results", request, result, options
|
926
943
|
yield result, operation if block_given?
|
927
|
-
|
944
|
+
throw :response, result
|
928
945
|
end
|
929
946
|
rescue ::Gapic::Rest::Error => e
|
930
947
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -960,12 +977,12 @@ module Google
|
|
960
977
|
#
|
961
978
|
# @param environment [::String]
|
962
979
|
# Required. The environment to deploy the flow to.
|
963
|
-
# Format:
|
964
|
-
# environments/<
|
980
|
+
# Format:
|
981
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.
|
965
982
|
# @param flow_version [::String]
|
966
983
|
# Required. The flow version to deploy.
|
967
|
-
# Format:
|
968
|
-
# flows/<
|
984
|
+
# Format:
|
985
|
+
# `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/versions/<VersionID>`.
|
969
986
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
970
987
|
# @yieldparam result [::Gapic::Operation]
|
971
988
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1027,7 +1044,7 @@ module Google
|
|
1027
1044
|
@environments_stub.deploy_flow request, options do |result, operation|
|
1028
1045
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1029
1046
|
yield result, operation if block_given?
|
1030
|
-
|
1047
|
+
throw :response, result
|
1031
1048
|
end
|
1032
1049
|
rescue ::Gapic::Rest::Error => e
|
1033
1050
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1107,6 +1124,11 @@ module Google
|
|
1107
1124
|
# default endpoint URL. The default value of nil uses the environment
|
1108
1125
|
# universe (usually the default "googleapis.com" universe).
|
1109
1126
|
# @return [::String,nil]
|
1127
|
+
# @!attribute [rw] logger
|
1128
|
+
# A custom logger to use for request/response debug logging, or the value
|
1129
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1130
|
+
# explicitly disable logging.
|
1131
|
+
# @return [::Logger,:default,nil]
|
1110
1132
|
#
|
1111
1133
|
class Configuration
|
1112
1134
|
extend ::Gapic::Config
|
@@ -1135,6 +1157,7 @@ module Google
|
|
1135
1157
|
# by the host service.
|
1136
1158
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1137
1159
|
config_attr :bindings_override, {}, ::Hash, nil
|
1160
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1138
1161
|
|
1139
1162
|
# @private
|
1140
1163
|
def initialize parent_config = nil
|