google-cloud-dialogflow-cx-v3 0.20.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/dialogflow/cx/v3/advanced_settings_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/agent_pb.rb +6 -1
- data/lib/google/cloud/dialogflow/cx/v3/agent_services_pb.rb +4 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/client.rb +200 -1
- data/lib/google/cloud/dialogflow/cx/v3/agents/operations.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/agents/paths.rb +19 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/client.rb +338 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/operations.rb +75 -0
- data/lib/google/cloud/dialogflow/cx/v3/agents/rest/service_stub.rb +119 -0
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/changelogs/rest/client.rb +36 -0
- data/lib/google/cloud/dialogflow/cx/v3/data_store_connection_pb.rb +45 -0
- data/lib/google/cloud/dialogflow/cx/v3/deployments/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/deployments/rest/client.rb +36 -0
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/entity_types/rest/client.rb +84 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/environments/operations.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/client.rb +184 -0
- data/lib/google/cloud/dialogflow/cx/v3/environments/rest/operations.rb +75 -0
- data/lib/google/cloud/dialogflow/cx/v3/experiments/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/experiments/rest/client.rb +116 -0
- data/lib/google/cloud/dialogflow/cx/v3/flow_pb.rb +3 -1
- data/lib/google/cloud/dialogflow/cx/v3/flows/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/flows/operations.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/client.rb +185 -0
- data/lib/google/cloud/dialogflow/cx/v3/flows/rest/operations.rb +75 -0
- data/lib/google/cloud/dialogflow/cx/v3/fulfillment_pb.rb +3 -1
- data/lib/google/cloud/dialogflow/cx/v3/generative_settings_pb.rb +51 -0
- data/lib/google/cloud/dialogflow/cx/v3/import_strategy_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/cx/v3/inline_pb.rb +47 -0
- data/lib/google/cloud/dialogflow/cx/v3/intent_pb.rb +13 -1
- data/lib/google/cloud/dialogflow/cx/v3/intent_services_pb.rb +22 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/client.rb +278 -1
- data/lib/google/cloud/dialogflow/cx/v3/intents/operations.rb +781 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/client.rb +338 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/operations.rb +892 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest/service_stub.rb +120 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents/rest.rb +1 -0
- data/lib/google/cloud/dialogflow/cx/v3/intents.rb +1 -0
- data/lib/google/cloud/dialogflow/cx/v3/page_pb.rb +6 -1
- data/lib/google/cloud/dialogflow/cx/v3/pages/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/pages/rest/client.rb +84 -0
- data/lib/google/cloud/dialogflow/cx/v3/response_message_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/safety_settings_pb.rb +47 -0
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_pb.rb +2 -1
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/security_settings_service/rest/client.rb +84 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/session_entity_types/rest/client.rb +84 -0
- data/lib/google/cloud/dialogflow/cx/v3/session_pb.rb +3 -1
- data/lib/google/cloud/dialogflow/cx/v3/sessions/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/sessions/rest/client.rb +48 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/operations.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/client.rb +228 -0
- data/lib/google/cloud/dialogflow/cx/v3/test_cases/rest/operations.rb +75 -0
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/transition_route_groups/rest/client.rb +84 -0
- 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/versions/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/versions/operations.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/client.rb +130 -0
- data/lib/google/cloud/dialogflow/cx/v3/versions/rest/operations.rb +75 -0
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/client.rb +10 -1
- data/lib/google/cloud/dialogflow/cx/v3/webhooks/rest/client.rb +84 -0
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/advanced_settings.rb +28 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/agent.rb +44 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/data_store_connection.rb +61 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/flow.rb +7 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/fulfillment.rb +11 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/generative_settings.rb +109 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/import_strategy.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/cx/v3/inline.rb +49 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/intent.rb +175 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/page.rb +52 -2
- data/proto_docs/google/cloud/dialogflow/cx/v3/response_message.rb +14 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/safety_settings.rb +49 -0
- data/proto_docs/google/cloud/dialogflow/cx/v3/security_settings.rb +17 -2
- data/proto_docs/google/cloud/dialogflow/cx/v3/session.rb +11 -1
- data/proto_docs/google/cloud/dialogflow/cx/v3/validation_message.rb +3 -0
- metadata +15 -5
@@ -207,6 +207,26 @@ module Google
|
|
207
207
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dialogflow::CX::V3::Agent>]
|
208
208
|
#
|
209
209
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
210
|
+
#
|
211
|
+
# @example Basic example
|
212
|
+
# require "google/cloud/dialogflow/cx/v3"
|
213
|
+
#
|
214
|
+
# # Create a client object. The client can be reused for multiple calls.
|
215
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
216
|
+
#
|
217
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
218
|
+
# request = Google::Cloud::Dialogflow::CX::V3::ListAgentsRequest.new
|
219
|
+
#
|
220
|
+
# # Call the list_agents method.
|
221
|
+
# result = client.list_agents request
|
222
|
+
#
|
223
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
224
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
225
|
+
# result.each do |item|
|
226
|
+
# # Each element is of type ::Google::Cloud::Dialogflow::CX::V3::Agent.
|
227
|
+
# p item
|
228
|
+
# end
|
229
|
+
#
|
210
230
|
def list_agents request, options = nil
|
211
231
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
212
232
|
|
@@ -271,6 +291,22 @@ module Google
|
|
271
291
|
# @return [::Google::Cloud::Dialogflow::CX::V3::Agent]
|
272
292
|
#
|
273
293
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
294
|
+
#
|
295
|
+
# @example Basic example
|
296
|
+
# require "google/cloud/dialogflow/cx/v3"
|
297
|
+
#
|
298
|
+
# # Create a client object. The client can be reused for multiple calls.
|
299
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
300
|
+
#
|
301
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
302
|
+
# request = Google::Cloud::Dialogflow::CX::V3::GetAgentRequest.new
|
303
|
+
#
|
304
|
+
# # Call the get_agent method.
|
305
|
+
# result = client.get_agent request
|
306
|
+
#
|
307
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Agent.
|
308
|
+
# p result
|
309
|
+
#
|
274
310
|
def get_agent request, options = nil
|
275
311
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
276
312
|
|
@@ -340,6 +376,22 @@ module Google
|
|
340
376
|
# @return [::Google::Cloud::Dialogflow::CX::V3::Agent]
|
341
377
|
#
|
342
378
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
379
|
+
#
|
380
|
+
# @example Basic example
|
381
|
+
# require "google/cloud/dialogflow/cx/v3"
|
382
|
+
#
|
383
|
+
# # Create a client object. The client can be reused for multiple calls.
|
384
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
385
|
+
#
|
386
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
387
|
+
# request = Google::Cloud::Dialogflow::CX::V3::CreateAgentRequest.new
|
388
|
+
#
|
389
|
+
# # Call the create_agent method.
|
390
|
+
# result = client.create_agent request
|
391
|
+
#
|
392
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Agent.
|
393
|
+
# p result
|
394
|
+
#
|
343
395
|
def create_agent request, options = nil
|
344
396
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
345
397
|
|
@@ -409,6 +461,22 @@ module Google
|
|
409
461
|
# @return [::Google::Cloud::Dialogflow::CX::V3::Agent]
|
410
462
|
#
|
411
463
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
464
|
+
#
|
465
|
+
# @example Basic example
|
466
|
+
# require "google/cloud/dialogflow/cx/v3"
|
467
|
+
#
|
468
|
+
# # Create a client object. The client can be reused for multiple calls.
|
469
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
470
|
+
#
|
471
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
472
|
+
# request = Google::Cloud::Dialogflow::CX::V3::UpdateAgentRequest.new
|
473
|
+
#
|
474
|
+
# # Call the update_agent method.
|
475
|
+
# result = client.update_agent request
|
476
|
+
#
|
477
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::Agent.
|
478
|
+
# p result
|
479
|
+
#
|
412
480
|
def update_agent request, options = nil
|
413
481
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
414
482
|
|
@@ -472,6 +540,22 @@ module Google
|
|
472
540
|
# @return [::Google::Protobuf::Empty]
|
473
541
|
#
|
474
542
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
543
|
+
#
|
544
|
+
# @example Basic example
|
545
|
+
# require "google/cloud/dialogflow/cx/v3"
|
546
|
+
#
|
547
|
+
# # Create a client object. The client can be reused for multiple calls.
|
548
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
549
|
+
#
|
550
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
551
|
+
# request = Google::Cloud::Dialogflow::CX::V3::DeleteAgentRequest.new
|
552
|
+
#
|
553
|
+
# # Call the delete_agent method.
|
554
|
+
# result = client.delete_agent request
|
555
|
+
#
|
556
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
557
|
+
# p result
|
558
|
+
#
|
475
559
|
def delete_agent request, options = nil
|
476
560
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
477
561
|
|
@@ -566,6 +650,29 @@ module Google
|
|
566
650
|
# @return [::Gapic::Operation]
|
567
651
|
#
|
568
652
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
653
|
+
#
|
654
|
+
# @example Basic example
|
655
|
+
# require "google/cloud/dialogflow/cx/v3"
|
656
|
+
#
|
657
|
+
# # Create a client object. The client can be reused for multiple calls.
|
658
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
659
|
+
#
|
660
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
661
|
+
# request = Google::Cloud::Dialogflow::CX::V3::ExportAgentRequest.new
|
662
|
+
#
|
663
|
+
# # Call the export_agent method.
|
664
|
+
# result = client.export_agent request
|
665
|
+
#
|
666
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
667
|
+
# # check the status of an operation, cancel it, or wait for results.
|
668
|
+
# # Here is how to wait for a response.
|
669
|
+
# result.wait_until_done! timeout: 60
|
670
|
+
# if result.response?
|
671
|
+
# p result.response
|
672
|
+
# else
|
673
|
+
# puts "No response received."
|
674
|
+
# end
|
675
|
+
#
|
569
676
|
def export_agent request, options = nil
|
570
677
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
571
678
|
|
@@ -662,6 +769,29 @@ module Google
|
|
662
769
|
# @return [::Gapic::Operation]
|
663
770
|
#
|
664
771
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
772
|
+
#
|
773
|
+
# @example Basic example
|
774
|
+
# require "google/cloud/dialogflow/cx/v3"
|
775
|
+
#
|
776
|
+
# # Create a client object. The client can be reused for multiple calls.
|
777
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
778
|
+
#
|
779
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
780
|
+
# request = Google::Cloud::Dialogflow::CX::V3::RestoreAgentRequest.new
|
781
|
+
#
|
782
|
+
# # Call the restore_agent method.
|
783
|
+
# result = client.restore_agent request
|
784
|
+
#
|
785
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
786
|
+
# # check the status of an operation, cancel it, or wait for results.
|
787
|
+
# # Here is how to wait for a response.
|
788
|
+
# result.wait_until_done! timeout: 60
|
789
|
+
# if result.response?
|
790
|
+
# p result.response
|
791
|
+
# else
|
792
|
+
# puts "No response received."
|
793
|
+
# end
|
794
|
+
#
|
665
795
|
def restore_agent request, options = nil
|
666
796
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
667
797
|
|
@@ -730,6 +860,22 @@ module Google
|
|
730
860
|
# @return [::Google::Cloud::Dialogflow::CX::V3::AgentValidationResult]
|
731
861
|
#
|
732
862
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
863
|
+
#
|
864
|
+
# @example Basic example
|
865
|
+
# require "google/cloud/dialogflow/cx/v3"
|
866
|
+
#
|
867
|
+
# # Create a client object. The client can be reused for multiple calls.
|
868
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
869
|
+
#
|
870
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
871
|
+
# request = Google::Cloud::Dialogflow::CX::V3::ValidateAgentRequest.new
|
872
|
+
#
|
873
|
+
# # Call the validate_agent method.
|
874
|
+
# result = client.validate_agent request
|
875
|
+
#
|
876
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::AgentValidationResult.
|
877
|
+
# p result
|
878
|
+
#
|
733
879
|
def validate_agent request, options = nil
|
734
880
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
735
881
|
|
@@ -797,6 +943,22 @@ module Google
|
|
797
943
|
# @return [::Google::Cloud::Dialogflow::CX::V3::AgentValidationResult]
|
798
944
|
#
|
799
945
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
946
|
+
#
|
947
|
+
# @example Basic example
|
948
|
+
# require "google/cloud/dialogflow/cx/v3"
|
949
|
+
#
|
950
|
+
# # Create a client object. The client can be reused for multiple calls.
|
951
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
952
|
+
#
|
953
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
954
|
+
# request = Google::Cloud::Dialogflow::CX::V3::GetAgentValidationResultRequest.new
|
955
|
+
#
|
956
|
+
# # Call the get_agent_validation_result method.
|
957
|
+
# result = client.get_agent_validation_result request
|
958
|
+
#
|
959
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::AgentValidationResult.
|
960
|
+
# p result
|
961
|
+
#
|
800
962
|
def get_agent_validation_result request, options = nil
|
801
963
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
802
964
|
|
@@ -832,6 +994,168 @@ module Google
|
|
832
994
|
raise ::Google::Cloud::Error.from_error(e)
|
833
995
|
end
|
834
996
|
|
997
|
+
##
|
998
|
+
# Gets the generative settings for the agent.
|
999
|
+
#
|
1000
|
+
# @overload get_generative_settings(request, options = nil)
|
1001
|
+
# Pass arguments to `get_generative_settings` via a request object, either of type
|
1002
|
+
# {::Google::Cloud::Dialogflow::CX::V3::GetGenerativeSettingsRequest} or an equivalent Hash.
|
1003
|
+
#
|
1004
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::GetGenerativeSettingsRequest, ::Hash]
|
1005
|
+
# A request object representing the call parameters. Required. To specify no
|
1006
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1007
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1008
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1009
|
+
#
|
1010
|
+
# @overload get_generative_settings(name: nil, language_code: nil)
|
1011
|
+
# Pass arguments to `get_generative_settings` via keyword arguments. Note that at
|
1012
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1013
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1014
|
+
#
|
1015
|
+
# @param name [::String]
|
1016
|
+
# Required. Format: `projects/<Project ID>/locations/<Location
|
1017
|
+
# ID>/agents/<Agent ID>/generativeSettings`.
|
1018
|
+
# @param language_code [::String]
|
1019
|
+
# Required. Language code of the generative settings.
|
1020
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1021
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
|
1022
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1023
|
+
#
|
1024
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
|
1025
|
+
#
|
1026
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1027
|
+
#
|
1028
|
+
# @example Basic example
|
1029
|
+
# require "google/cloud/dialogflow/cx/v3"
|
1030
|
+
#
|
1031
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1032
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
1033
|
+
#
|
1034
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1035
|
+
# request = Google::Cloud::Dialogflow::CX::V3::GetGenerativeSettingsRequest.new
|
1036
|
+
#
|
1037
|
+
# # Call the get_generative_settings method.
|
1038
|
+
# result = client.get_generative_settings request
|
1039
|
+
#
|
1040
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::GenerativeSettings.
|
1041
|
+
# p result
|
1042
|
+
#
|
1043
|
+
def get_generative_settings request, options = nil
|
1044
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1045
|
+
|
1046
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::GetGenerativeSettingsRequest
|
1047
|
+
|
1048
|
+
# Converts hash and nil to an options object
|
1049
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1050
|
+
|
1051
|
+
# Customize the options with defaults
|
1052
|
+
call_metadata = @config.rpcs.get_generative_settings.metadata.to_h
|
1053
|
+
|
1054
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1055
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1056
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1057
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
|
1058
|
+
transports_version_send: [:rest]
|
1059
|
+
|
1060
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1061
|
+
|
1062
|
+
options.apply_defaults timeout: @config.rpcs.get_generative_settings.timeout,
|
1063
|
+
metadata: call_metadata,
|
1064
|
+
retry_policy: @config.rpcs.get_generative_settings.retry_policy
|
1065
|
+
|
1066
|
+
options.apply_defaults timeout: @config.timeout,
|
1067
|
+
metadata: @config.metadata,
|
1068
|
+
retry_policy: @config.retry_policy
|
1069
|
+
|
1070
|
+
@agents_stub.get_generative_settings request, options do |result, operation|
|
1071
|
+
yield result, operation if block_given?
|
1072
|
+
return result
|
1073
|
+
end
|
1074
|
+
rescue ::Gapic::Rest::Error => e
|
1075
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1076
|
+
end
|
1077
|
+
|
1078
|
+
##
|
1079
|
+
# Updates the generative settings for the agent.
|
1080
|
+
#
|
1081
|
+
# @overload update_generative_settings(request, options = nil)
|
1082
|
+
# Pass arguments to `update_generative_settings` via a request object, either of type
|
1083
|
+
# {::Google::Cloud::Dialogflow::CX::V3::UpdateGenerativeSettingsRequest} or an equivalent Hash.
|
1084
|
+
#
|
1085
|
+
# @param request [::Google::Cloud::Dialogflow::CX::V3::UpdateGenerativeSettingsRequest, ::Hash]
|
1086
|
+
# A request object representing the call parameters. Required. To specify no
|
1087
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1088
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1089
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1090
|
+
#
|
1091
|
+
# @overload update_generative_settings(generative_settings: nil, update_mask: nil)
|
1092
|
+
# Pass arguments to `update_generative_settings` via keyword arguments. Note that at
|
1093
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1094
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1095
|
+
#
|
1096
|
+
# @param generative_settings [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings, ::Hash]
|
1097
|
+
# Required. Generative settings to update.
|
1098
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1099
|
+
# Optional. The mask to control which fields get updated. If the mask is not
|
1100
|
+
# present, all fields will be updated.
|
1101
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1102
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
|
1103
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1104
|
+
#
|
1105
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
|
1106
|
+
#
|
1107
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1108
|
+
#
|
1109
|
+
# @example Basic example
|
1110
|
+
# require "google/cloud/dialogflow/cx/v3"
|
1111
|
+
#
|
1112
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1113
|
+
# client = Google::Cloud::Dialogflow::CX::V3::Agents::Rest::Client.new
|
1114
|
+
#
|
1115
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1116
|
+
# request = Google::Cloud::Dialogflow::CX::V3::UpdateGenerativeSettingsRequest.new
|
1117
|
+
#
|
1118
|
+
# # Call the update_generative_settings method.
|
1119
|
+
# result = client.update_generative_settings request
|
1120
|
+
#
|
1121
|
+
# # The returned object is of type Google::Cloud::Dialogflow::CX::V3::GenerativeSettings.
|
1122
|
+
# p result
|
1123
|
+
#
|
1124
|
+
def update_generative_settings request, options = nil
|
1125
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1126
|
+
|
1127
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::CX::V3::UpdateGenerativeSettingsRequest
|
1128
|
+
|
1129
|
+
# Converts hash and nil to an options object
|
1130
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1131
|
+
|
1132
|
+
# Customize the options with defaults
|
1133
|
+
call_metadata = @config.rpcs.update_generative_settings.metadata.to_h
|
1134
|
+
|
1135
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1136
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1137
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1138
|
+
gapic_version: ::Google::Cloud::Dialogflow::CX::V3::VERSION,
|
1139
|
+
transports_version_send: [:rest]
|
1140
|
+
|
1141
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1142
|
+
|
1143
|
+
options.apply_defaults timeout: @config.rpcs.update_generative_settings.timeout,
|
1144
|
+
metadata: call_metadata,
|
1145
|
+
retry_policy: @config.rpcs.update_generative_settings.retry_policy
|
1146
|
+
|
1147
|
+
options.apply_defaults timeout: @config.timeout,
|
1148
|
+
metadata: @config.metadata,
|
1149
|
+
retry_policy: @config.retry_policy
|
1150
|
+
|
1151
|
+
@agents_stub.update_generative_settings request, options do |result, operation|
|
1152
|
+
yield result, operation if block_given?
|
1153
|
+
return result
|
1154
|
+
end
|
1155
|
+
rescue ::Gapic::Rest::Error => e
|
1156
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1157
|
+
end
|
1158
|
+
|
835
1159
|
##
|
836
1160
|
# Configuration class for the Agents REST API.
|
837
1161
|
#
|
@@ -1009,6 +1333,16 @@ module Google
|
|
1009
1333
|
# @return [::Gapic::Config::Method]
|
1010
1334
|
#
|
1011
1335
|
attr_reader :get_agent_validation_result
|
1336
|
+
##
|
1337
|
+
# RPC-specific configuration for `get_generative_settings`
|
1338
|
+
# @return [::Gapic::Config::Method]
|
1339
|
+
#
|
1340
|
+
attr_reader :get_generative_settings
|
1341
|
+
##
|
1342
|
+
# RPC-specific configuration for `update_generative_settings`
|
1343
|
+
# @return [::Gapic::Config::Method]
|
1344
|
+
#
|
1345
|
+
attr_reader :update_generative_settings
|
1012
1346
|
|
1013
1347
|
# @private
|
1014
1348
|
def initialize parent_rpcs = nil
|
@@ -1030,6 +1364,10 @@ module Google
|
|
1030
1364
|
@validate_agent = ::Gapic::Config::Method.new validate_agent_config
|
1031
1365
|
get_agent_validation_result_config = parent_rpcs.get_agent_validation_result if parent_rpcs.respond_to? :get_agent_validation_result
|
1032
1366
|
@get_agent_validation_result = ::Gapic::Config::Method.new get_agent_validation_result_config
|
1367
|
+
get_generative_settings_config = parent_rpcs.get_generative_settings if parent_rpcs.respond_to? :get_generative_settings
|
1368
|
+
@get_generative_settings = ::Gapic::Config::Method.new get_generative_settings_config
|
1369
|
+
update_generative_settings_config = parent_rpcs.update_generative_settings if parent_rpcs.respond_to? :update_generative_settings
|
1370
|
+
@update_generative_settings = ::Gapic::Config::Method.new update_generative_settings_config
|
1033
1371
|
|
1034
1372
|
yield self if block_given?
|
1035
1373
|
end
|
@@ -137,6 +137,26 @@ module Google
|
|
137
137
|
# @return [::Gapic::Operation]
|
138
138
|
#
|
139
139
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
140
|
+
#
|
141
|
+
# @example Basic example
|
142
|
+
# require "google/longrunning"
|
143
|
+
#
|
144
|
+
# # Create a client object. The client can be reused for multiple calls.
|
145
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
146
|
+
#
|
147
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
148
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
149
|
+
#
|
150
|
+
# # Call the list_operations method.
|
151
|
+
# result = client.list_operations request
|
152
|
+
#
|
153
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
154
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
155
|
+
# result.each do |item|
|
156
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
157
|
+
# p item
|
158
|
+
# end
|
159
|
+
#
|
140
160
|
def list_operations request, options = nil
|
141
161
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
142
162
|
|
@@ -202,6 +222,29 @@ module Google
|
|
202
222
|
# @return [::Gapic::Operation]
|
203
223
|
#
|
204
224
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
225
|
+
#
|
226
|
+
# @example Basic example
|
227
|
+
# require "google/longrunning"
|
228
|
+
#
|
229
|
+
# # Create a client object. The client can be reused for multiple calls.
|
230
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
231
|
+
#
|
232
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
233
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
234
|
+
#
|
235
|
+
# # Call the get_operation method.
|
236
|
+
# result = client.get_operation request
|
237
|
+
#
|
238
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
239
|
+
# # check the status of an operation, cancel it, or wait for results.
|
240
|
+
# # Here is how to wait for a response.
|
241
|
+
# result.wait_until_done! timeout: 60
|
242
|
+
# if result.response?
|
243
|
+
# p result.response
|
244
|
+
# else
|
245
|
+
# puts "No response received."
|
246
|
+
# end
|
247
|
+
#
|
205
248
|
def get_operation request, options = nil
|
206
249
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
207
250
|
|
@@ -268,6 +311,22 @@ module Google
|
|
268
311
|
# @return [::Google::Protobuf::Empty]
|
269
312
|
#
|
270
313
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
314
|
+
#
|
315
|
+
# @example Basic example
|
316
|
+
# require "google/longrunning"
|
317
|
+
#
|
318
|
+
# # Create a client object. The client can be reused for multiple calls.
|
319
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
320
|
+
#
|
321
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
322
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
323
|
+
#
|
324
|
+
# # Call the delete_operation method.
|
325
|
+
# result = client.delete_operation request
|
326
|
+
#
|
327
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
328
|
+
# p result
|
329
|
+
#
|
271
330
|
def delete_operation request, options = nil
|
272
331
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
273
332
|
|
@@ -339,6 +398,22 @@ module Google
|
|
339
398
|
# @return [::Google::Protobuf::Empty]
|
340
399
|
#
|
341
400
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
401
|
+
#
|
402
|
+
# @example Basic example
|
403
|
+
# require "google/longrunning"
|
404
|
+
#
|
405
|
+
# # Create a client object. The client can be reused for multiple calls.
|
406
|
+
# client = Google::Longrunning::Operations::Rest::Client.new
|
407
|
+
#
|
408
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
409
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
410
|
+
#
|
411
|
+
# # Call the cancel_operation method.
|
412
|
+
# result = client.cancel_operation request
|
413
|
+
#
|
414
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
415
|
+
# p result
|
416
|
+
#
|
342
417
|
def cancel_operation request, options = nil
|
343
418
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
344
419
|
|
@@ -383,6 +383,82 @@ module Google
|
|
383
383
|
result
|
384
384
|
end
|
385
385
|
|
386
|
+
##
|
387
|
+
# Baseline implementation for the get_generative_settings REST call
|
388
|
+
#
|
389
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::GetGenerativeSettingsRequest]
|
390
|
+
# A request object representing the call parameters. Required.
|
391
|
+
# @param options [::Gapic::CallOptions]
|
392
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
393
|
+
#
|
394
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
395
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
|
396
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
397
|
+
#
|
398
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
|
399
|
+
# A result object deserialized from the server's reply
|
400
|
+
def get_generative_settings request_pb, options = nil
|
401
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
402
|
+
|
403
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_generative_settings_request request_pb
|
404
|
+
query_string_params = if query_string_params.any?
|
405
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
406
|
+
else
|
407
|
+
{}
|
408
|
+
end
|
409
|
+
|
410
|
+
response = @client_stub.make_http_request(
|
411
|
+
verb,
|
412
|
+
uri: uri,
|
413
|
+
body: body || "",
|
414
|
+
params: query_string_params,
|
415
|
+
options: options
|
416
|
+
)
|
417
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
418
|
+
result = ::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings.decode_json response.body, ignore_unknown_fields: true
|
419
|
+
|
420
|
+
yield result, operation if block_given?
|
421
|
+
result
|
422
|
+
end
|
423
|
+
|
424
|
+
##
|
425
|
+
# Baseline implementation for the update_generative_settings REST call
|
426
|
+
#
|
427
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::UpdateGenerativeSettingsRequest]
|
428
|
+
# A request object representing the call parameters. Required.
|
429
|
+
# @param options [::Gapic::CallOptions]
|
430
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
431
|
+
#
|
432
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
433
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
|
434
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
435
|
+
#
|
436
|
+
# @return [::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings]
|
437
|
+
# A result object deserialized from the server's reply
|
438
|
+
def update_generative_settings request_pb, options = nil
|
439
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
440
|
+
|
441
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_generative_settings_request request_pb
|
442
|
+
query_string_params = if query_string_params.any?
|
443
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
444
|
+
else
|
445
|
+
{}
|
446
|
+
end
|
447
|
+
|
448
|
+
response = @client_stub.make_http_request(
|
449
|
+
verb,
|
450
|
+
uri: uri,
|
451
|
+
body: body || "",
|
452
|
+
params: query_string_params,
|
453
|
+
options: options
|
454
|
+
)
|
455
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
456
|
+
result = ::Google::Cloud::Dialogflow::CX::V3::GenerativeSettings.decode_json response.body, ignore_unknown_fields: true
|
457
|
+
|
458
|
+
yield result, operation if block_given?
|
459
|
+
result
|
460
|
+
end
|
461
|
+
|
386
462
|
##
|
387
463
|
# @private
|
388
464
|
#
|
@@ -576,6 +652,49 @@ module Google
|
|
576
652
|
)
|
577
653
|
transcoder.transcode request_pb
|
578
654
|
end
|
655
|
+
|
656
|
+
##
|
657
|
+
# @private
|
658
|
+
#
|
659
|
+
# GRPC transcoding helper method for the get_generative_settings REST call
|
660
|
+
#
|
661
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::GetGenerativeSettingsRequest]
|
662
|
+
# A request object representing the call parameters. Required.
|
663
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
664
|
+
# Uri, Body, Query string parameters
|
665
|
+
def self.transcode_get_generative_settings_request request_pb
|
666
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
667
|
+
.with_bindings(
|
668
|
+
uri_method: :get,
|
669
|
+
uri_template: "/v3/{name}",
|
670
|
+
matches: [
|
671
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings/?$}, false]
|
672
|
+
]
|
673
|
+
)
|
674
|
+
transcoder.transcode request_pb
|
675
|
+
end
|
676
|
+
|
677
|
+
##
|
678
|
+
# @private
|
679
|
+
#
|
680
|
+
# GRPC transcoding helper method for the update_generative_settings REST call
|
681
|
+
#
|
682
|
+
# @param request_pb [::Google::Cloud::Dialogflow::CX::V3::UpdateGenerativeSettingsRequest]
|
683
|
+
# A request object representing the call parameters. Required.
|
684
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
685
|
+
# Uri, Body, Query string parameters
|
686
|
+
def self.transcode_update_generative_settings_request request_pb
|
687
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
688
|
+
.with_bindings(
|
689
|
+
uri_method: :patch,
|
690
|
+
uri_template: "/v3/{generative_settings.name}",
|
691
|
+
body: "generative_settings",
|
692
|
+
matches: [
|
693
|
+
["generative_settings.name", %r{^projects/[^/]+/locations/[^/]+/agents/[^/]+/generativeSettings/?$}, false]
|
694
|
+
]
|
695
|
+
)
|
696
|
+
transcoder.transcode request_pb
|
697
|
+
end
|
579
698
|
end
|
580
699
|
end
|
581
700
|
end
|