google-cloud-dialogflow-v2 0.23.0 → 0.24.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 +1 -1
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/agents/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/agents/rest/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/answer_records/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/contexts/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_datasets/rest/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_models/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_models/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_models/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_models/rest/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +24 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/rest/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +3 -0
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +109 -2
- data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +182 -0
- data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +86 -2
- data/lib/google/cloud/dialogflow/v2/conversations/rest/service_stub.rb +68 -0
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/documents/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/documents/rest/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_types/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/entity_types/rest/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/environments/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/fulfillments/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/intents/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/intents/rest/operations.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/participants/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/rest.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/session_entity_types/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +22 -0
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/sessions/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/versions/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/versions/rest/client.rb +2 -2
- data/lib/google/cloud/dialogflow/v2.rb +1 -1
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +2 -0
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +9 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +89 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +10 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +8 -0
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +75 -0
- metadata +2 -2
@@ -24,6 +24,61 @@ module Google
|
|
24
24
|
module Conversations
|
25
25
|
# Path helper methods for the Conversations API.
|
26
26
|
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Agent resource string.
|
29
|
+
#
|
30
|
+
# @overload agent_path(project:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/agent`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
#
|
37
|
+
# @overload agent_path(project:, location:)
|
38
|
+
# The resource will be in the following format:
|
39
|
+
#
|
40
|
+
# `projects/{project}/locations/{location}/agent`
|
41
|
+
#
|
42
|
+
# @param project [String]
|
43
|
+
# @param location [String]
|
44
|
+
#
|
45
|
+
# @return [::String]
|
46
|
+
def agent_path **args
|
47
|
+
resources = {
|
48
|
+
"project" => (proc do |project:|
|
49
|
+
"projects/#{project}/agent"
|
50
|
+
end),
|
51
|
+
"location:project" => (proc do |project:, location:|
|
52
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
53
|
+
|
54
|
+
"projects/#{project}/locations/#{location}/agent"
|
55
|
+
end)
|
56
|
+
}
|
57
|
+
|
58
|
+
resource = resources[args.keys.sort.join(":")]
|
59
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
60
|
+
resource.call(**args)
|
61
|
+
end
|
62
|
+
|
63
|
+
##
|
64
|
+
# Create a fully-qualified CXSecuritySettings resource string.
|
65
|
+
#
|
66
|
+
# The resource will be in the following format:
|
67
|
+
#
|
68
|
+
# `projects/{project}/locations/{location}/securitySettings/{security_settings}`
|
69
|
+
#
|
70
|
+
# @param project [String]
|
71
|
+
# @param location [String]
|
72
|
+
# @param security_settings [String]
|
73
|
+
#
|
74
|
+
# @return [::String]
|
75
|
+
def cx_security_settings_path project:, location:, security_settings:
|
76
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
77
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
78
|
+
|
79
|
+
"projects/#{project}/locations/#{location}/securitySettings/#{security_settings}"
|
80
|
+
end
|
81
|
+
|
27
82
|
##
|
28
83
|
# Create a fully-qualified Conversation resource string.
|
29
84
|
#
|
@@ -65,6 +120,47 @@ module Google
|
|
65
120
|
resource.call(**args)
|
66
121
|
end
|
67
122
|
|
123
|
+
##
|
124
|
+
# Create a fully-qualified ConversationModel resource string.
|
125
|
+
#
|
126
|
+
# @overload conversation_model_path(project:, location:, conversation_model:)
|
127
|
+
# The resource will be in the following format:
|
128
|
+
#
|
129
|
+
# `projects/{project}/locations/{location}/conversationModels/{conversation_model}`
|
130
|
+
#
|
131
|
+
# @param project [String]
|
132
|
+
# @param location [String]
|
133
|
+
# @param conversation_model [String]
|
134
|
+
#
|
135
|
+
# @overload conversation_model_path(project:, conversation_model:)
|
136
|
+
# The resource will be in the following format:
|
137
|
+
#
|
138
|
+
# `projects/{project}/conversationModels/{conversation_model}`
|
139
|
+
#
|
140
|
+
# @param project [String]
|
141
|
+
# @param conversation_model [String]
|
142
|
+
#
|
143
|
+
# @return [::String]
|
144
|
+
def conversation_model_path **args
|
145
|
+
resources = {
|
146
|
+
"conversation_model:location:project" => (proc do |project:, location:, conversation_model:|
|
147
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
148
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
149
|
+
|
150
|
+
"projects/#{project}/locations/#{location}/conversationModels/#{conversation_model}"
|
151
|
+
end),
|
152
|
+
"conversation_model:project" => (proc do |project:, conversation_model:|
|
153
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
154
|
+
|
155
|
+
"projects/#{project}/conversationModels/#{conversation_model}"
|
156
|
+
end)
|
157
|
+
}
|
158
|
+
|
159
|
+
resource = resources[args.keys.sort.join(":")]
|
160
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
161
|
+
resource.call(**args)
|
162
|
+
end
|
163
|
+
|
68
164
|
##
|
69
165
|
# Create a fully-qualified ConversationProfile resource string.
|
70
166
|
#
|
@@ -106,6 +202,92 @@ module Google
|
|
106
202
|
resource.call(**args)
|
107
203
|
end
|
108
204
|
|
205
|
+
##
|
206
|
+
# Create a fully-qualified Document resource string.
|
207
|
+
#
|
208
|
+
# @overload document_path(project:, knowledge_base:, document:)
|
209
|
+
# The resource will be in the following format:
|
210
|
+
#
|
211
|
+
# `projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}`
|
212
|
+
#
|
213
|
+
# @param project [String]
|
214
|
+
# @param knowledge_base [String]
|
215
|
+
# @param document [String]
|
216
|
+
#
|
217
|
+
# @overload document_path(project:, location:, knowledge_base:, document:)
|
218
|
+
# The resource will be in the following format:
|
219
|
+
#
|
220
|
+
# `projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}/documents/{document}`
|
221
|
+
#
|
222
|
+
# @param project [String]
|
223
|
+
# @param location [String]
|
224
|
+
# @param knowledge_base [String]
|
225
|
+
# @param document [String]
|
226
|
+
#
|
227
|
+
# @return [::String]
|
228
|
+
def document_path **args
|
229
|
+
resources = {
|
230
|
+
"document:knowledge_base:project" => (proc do |project:, knowledge_base:, document:|
|
231
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
232
|
+
raise ::ArgumentError, "knowledge_base cannot contain /" if knowledge_base.to_s.include? "/"
|
233
|
+
|
234
|
+
"projects/#{project}/knowledgeBases/#{knowledge_base}/documents/#{document}"
|
235
|
+
end),
|
236
|
+
"document:knowledge_base:location:project" => (proc do |project:, location:, knowledge_base:, document:|
|
237
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
238
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
239
|
+
raise ::ArgumentError, "knowledge_base cannot contain /" if knowledge_base.to_s.include? "/"
|
240
|
+
|
241
|
+
"projects/#{project}/locations/#{location}/knowledgeBases/#{knowledge_base}/documents/#{document}"
|
242
|
+
end)
|
243
|
+
}
|
244
|
+
|
245
|
+
resource = resources[args.keys.sort.join(":")]
|
246
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
247
|
+
resource.call(**args)
|
248
|
+
end
|
249
|
+
|
250
|
+
##
|
251
|
+
# Create a fully-qualified KnowledgeBase resource string.
|
252
|
+
#
|
253
|
+
# @overload knowledge_base_path(project:, knowledge_base:)
|
254
|
+
# The resource will be in the following format:
|
255
|
+
#
|
256
|
+
# `projects/{project}/knowledgeBases/{knowledge_base}`
|
257
|
+
#
|
258
|
+
# @param project [String]
|
259
|
+
# @param knowledge_base [String]
|
260
|
+
#
|
261
|
+
# @overload knowledge_base_path(project:, location:, knowledge_base:)
|
262
|
+
# The resource will be in the following format:
|
263
|
+
#
|
264
|
+
# `projects/{project}/locations/{location}/knowledgeBases/{knowledge_base}`
|
265
|
+
#
|
266
|
+
# @param project [String]
|
267
|
+
# @param location [String]
|
268
|
+
# @param knowledge_base [String]
|
269
|
+
#
|
270
|
+
# @return [::String]
|
271
|
+
def knowledge_base_path **args
|
272
|
+
resources = {
|
273
|
+
"knowledge_base:project" => (proc do |project:, knowledge_base:|
|
274
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
275
|
+
|
276
|
+
"projects/#{project}/knowledgeBases/#{knowledge_base}"
|
277
|
+
end),
|
278
|
+
"knowledge_base:location:project" => (proc do |project:, location:, knowledge_base:|
|
279
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
280
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
281
|
+
|
282
|
+
"projects/#{project}/locations/#{location}/knowledgeBases/#{knowledge_base}"
|
283
|
+
end)
|
284
|
+
}
|
285
|
+
|
286
|
+
resource = resources[args.keys.sort.join(":")]
|
287
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
288
|
+
resource.call(**args)
|
289
|
+
end
|
290
|
+
|
109
291
|
##
|
110
292
|
# Create a fully-qualified Location resource string.
|
111
293
|
#
|
@@ -630,6 +630,83 @@ module Google
|
|
630
630
|
raise ::Google::Cloud::Error.from_error(e)
|
631
631
|
end
|
632
632
|
|
633
|
+
##
|
634
|
+
# Generates and returns a summary for a conversation that does not have a
|
635
|
+
# resource created for it.
|
636
|
+
#
|
637
|
+
# @overload generate_stateless_summary(request, options = nil)
|
638
|
+
# Pass arguments to `generate_stateless_summary` via a request object, either of type
|
639
|
+
# {::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryRequest} or an equivalent Hash.
|
640
|
+
#
|
641
|
+
# @param request [::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryRequest, ::Hash]
|
642
|
+
# A request object representing the call parameters. Required. To specify no
|
643
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
644
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
645
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
646
|
+
#
|
647
|
+
# @overload generate_stateless_summary(stateless_conversation: nil, conversation_profile: nil, latest_message: nil, max_context_size: nil)
|
648
|
+
# Pass arguments to `generate_stateless_summary` via keyword arguments. Note that at
|
649
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
650
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
651
|
+
#
|
652
|
+
# @param stateless_conversation [::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryRequest::MinimalConversation, ::Hash]
|
653
|
+
# Required. The conversation to suggest a summary for.
|
654
|
+
# @param conversation_profile [::Google::Cloud::Dialogflow::V2::ConversationProfile, ::Hash]
|
655
|
+
# Required. A ConversationProfile containing information required for Summary
|
656
|
+
# generation.
|
657
|
+
# Required fields: \\{language_code, security_settings}
|
658
|
+
# Optional fields: \\{agent_assistant_config}
|
659
|
+
# @param latest_message [::String]
|
660
|
+
# The name of the latest conversation message used as context for
|
661
|
+
# generating a Summary. If empty, the latest message of the conversation will
|
662
|
+
# be used. The format is specific to the user and the names of the messages
|
663
|
+
# provided.
|
664
|
+
# @param max_context_size [::Integer]
|
665
|
+
# Max number of messages prior to and including
|
666
|
+
# [latest_message] to use as context when compiling the
|
667
|
+
# suggestion. By default 500 and at most 1000.
|
668
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
669
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryResponse]
|
670
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
671
|
+
#
|
672
|
+
# @return [::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryResponse]
|
673
|
+
#
|
674
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
675
|
+
def generate_stateless_summary request, options = nil
|
676
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
677
|
+
|
678
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryRequest
|
679
|
+
|
680
|
+
# Converts hash and nil to an options object
|
681
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
682
|
+
|
683
|
+
# Customize the options with defaults
|
684
|
+
call_metadata = @config.rpcs.generate_stateless_summary.metadata.to_h
|
685
|
+
|
686
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
687
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
688
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
689
|
+
gapic_version: ::Google::Cloud::Dialogflow::V2::VERSION,
|
690
|
+
transports_version_send: [:rest]
|
691
|
+
|
692
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
693
|
+
|
694
|
+
options.apply_defaults timeout: @config.rpcs.generate_stateless_summary.timeout,
|
695
|
+
metadata: call_metadata,
|
696
|
+
retry_policy: @config.rpcs.generate_stateless_summary.retry_policy
|
697
|
+
|
698
|
+
options.apply_defaults timeout: @config.timeout,
|
699
|
+
metadata: @config.metadata,
|
700
|
+
retry_policy: @config.retry_policy
|
701
|
+
|
702
|
+
@conversations_stub.generate_stateless_summary request, options do |result, operation|
|
703
|
+
yield result, operation if block_given?
|
704
|
+
return result
|
705
|
+
end
|
706
|
+
rescue ::Gapic::Rest::Error => e
|
707
|
+
raise ::Google::Cloud::Error.from_error(e)
|
708
|
+
end
|
709
|
+
|
633
710
|
##
|
634
711
|
# Configuration class for the Conversations REST API.
|
635
712
|
#
|
@@ -668,9 +745,9 @@ module Google
|
|
668
745
|
# * (`String`) The path to a service account key file in JSON format
|
669
746
|
# * (`Hash`) A service account key as a Hash
|
670
747
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
671
|
-
# (see the [googleauth docs](https://
|
748
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
672
749
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
673
|
-
# (see the [signet docs](https://
|
750
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
674
751
|
# * (`nil`) indicating no credentials
|
675
752
|
# @return [::Object]
|
676
753
|
# @!attribute [rw] scope
|
@@ -790,6 +867,11 @@ module Google
|
|
790
867
|
# @return [::Gapic::Config::Method]
|
791
868
|
#
|
792
869
|
attr_reader :suggest_conversation_summary
|
870
|
+
##
|
871
|
+
# RPC-specific configuration for `generate_stateless_summary`
|
872
|
+
# @return [::Gapic::Config::Method]
|
873
|
+
#
|
874
|
+
attr_reader :generate_stateless_summary
|
793
875
|
|
794
876
|
# @private
|
795
877
|
def initialize parent_rpcs = nil
|
@@ -805,6 +887,8 @@ module Google
|
|
805
887
|
@list_messages = ::Gapic::Config::Method.new list_messages_config
|
806
888
|
suggest_conversation_summary_config = parent_rpcs.suggest_conversation_summary if parent_rpcs.respond_to? :suggest_conversation_summary
|
807
889
|
@suggest_conversation_summary = ::Gapic::Config::Method.new suggest_conversation_summary_config
|
890
|
+
generate_stateless_summary_config = parent_rpcs.generate_stateless_summary if parent_rpcs.respond_to? :generate_stateless_summary
|
891
|
+
@generate_stateless_summary = ::Gapic::Config::Method.new generate_stateless_summary_config
|
808
892
|
|
809
893
|
yield self if block_given?
|
810
894
|
end
|
@@ -268,6 +268,44 @@ module Google
|
|
268
268
|
result
|
269
269
|
end
|
270
270
|
|
271
|
+
##
|
272
|
+
# Baseline implementation for the generate_stateless_summary REST call
|
273
|
+
#
|
274
|
+
# @param request_pb [::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryRequest]
|
275
|
+
# A request object representing the call parameters. Required.
|
276
|
+
# @param options [::Gapic::CallOptions]
|
277
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
278
|
+
#
|
279
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
280
|
+
# @yieldparam result [::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryResponse]
|
281
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
282
|
+
#
|
283
|
+
# @return [::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryResponse]
|
284
|
+
# A result object deserialized from the server's reply
|
285
|
+
def generate_stateless_summary request_pb, options = nil
|
286
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
287
|
+
|
288
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_generate_stateless_summary_request request_pb
|
289
|
+
query_string_params = if query_string_params.any?
|
290
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
291
|
+
else
|
292
|
+
{}
|
293
|
+
end
|
294
|
+
|
295
|
+
response = @client_stub.make_http_request(
|
296
|
+
verb,
|
297
|
+
uri: uri,
|
298
|
+
body: body || "",
|
299
|
+
params: query_string_params,
|
300
|
+
options: options
|
301
|
+
)
|
302
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
303
|
+
result = ::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryResponse.decode_json response.body, ignore_unknown_fields: true
|
304
|
+
|
305
|
+
yield result, operation if block_given?
|
306
|
+
result
|
307
|
+
end
|
308
|
+
|
271
309
|
##
|
272
310
|
# @private
|
273
311
|
#
|
@@ -441,6 +479,36 @@ module Google
|
|
441
479
|
)
|
442
480
|
transcoder.transcode request_pb
|
443
481
|
end
|
482
|
+
|
483
|
+
##
|
484
|
+
# @private
|
485
|
+
#
|
486
|
+
# GRPC transcoding helper method for the generate_stateless_summary REST call
|
487
|
+
#
|
488
|
+
# @param request_pb [::Google::Cloud::Dialogflow::V2::GenerateStatelessSummaryRequest]
|
489
|
+
# A request object representing the call parameters. Required.
|
490
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
491
|
+
# Uri, Body, Query string parameters
|
492
|
+
def self.transcode_generate_stateless_summary_request request_pb
|
493
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
494
|
+
.with_bindings(
|
495
|
+
uri_method: :post,
|
496
|
+
uri_template: "/v2/{stateless_conversation.parent}/suggestions:generateStatelessSummary",
|
497
|
+
body: "*",
|
498
|
+
matches: [
|
499
|
+
["stateless_conversation.parent", %r{^projects/[^/]+/?$}, false]
|
500
|
+
]
|
501
|
+
)
|
502
|
+
.with_bindings(
|
503
|
+
uri_method: :post,
|
504
|
+
uri_template: "/v2/{stateless_conversation.parent}/suggestions:generateStatelessSummary",
|
505
|
+
body: "*",
|
506
|
+
matches: [
|
507
|
+
["stateless_conversation.parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
508
|
+
]
|
509
|
+
)
|
510
|
+
transcoder.transcode request_pb
|
511
|
+
end
|
444
512
|
end
|
445
513
|
end
|
446
514
|
end
|
@@ -1086,9 +1086,9 @@ module Google
|
|
1086
1086
|
# * (`String`) The path to a service account key file in JSON format
|
1087
1087
|
# * (`Hash`) A service account key as a Hash
|
1088
1088
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1089
|
-
# (see the [googleauth docs](https://
|
1089
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1090
1090
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1091
|
-
# (see the [signet docs](https://
|
1091
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1092
1092
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1093
1093
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1094
1094
|
# * (`nil`) indicating no credentials
|
@@ -620,9 +620,9 @@ module Google
|
|
620
620
|
# * (`String`) The path to a service account key file in JSON format
|
621
621
|
# * (`Hash`) A service account key as a Hash
|
622
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
628
|
# * (`nil`) indicating no credentials
|
@@ -848,9 +848,9 @@ module Google
|
|
848
848
|
# * (`String`) The path to a service account key file in JSON format
|
849
849
|
# * (`Hash`) A service account key as a Hash
|
850
850
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
851
|
-
# (see the [googleauth docs](https://
|
851
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
852
852
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
853
|
-
# (see the [signet docs](https://
|
853
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
854
854
|
# * (`nil`) indicating no credentials
|
855
855
|
# @return [::Object]
|
856
856
|
# @!attribute [rw] scope
|
@@ -411,9 +411,9 @@ module Google
|
|
411
411
|
# * (`String`) The path to a service account key file in JSON format
|
412
412
|
# * (`Hash`) A service account key as a Hash
|
413
413
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
414
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
415
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
416
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
417
|
# * (`nil`) indicating no credentials
|
418
418
|
# @return [::Object]
|
419
419
|
# @!attribute [rw] scope
|
@@ -1276,9 +1276,9 @@ module Google
|
|
1276
1276
|
# * (`String`) The path to a service account key file in JSON format
|
1277
1277
|
# * (`Hash`) A service account key as a Hash
|
1278
1278
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1279
|
-
# (see the [googleauth docs](https://
|
1279
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1280
1280
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1281
|
-
# (see the [signet docs](https://
|
1281
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1282
1282
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1283
1283
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1284
1284
|
# * (`nil`) indicating no credentials
|
@@ -620,9 +620,9 @@ module Google
|
|
620
620
|
# * (`String`) The path to a service account key file in JSON format
|
621
621
|
# * (`Hash`) A service account key as a Hash
|
622
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
628
|
# * (`nil`) indicating no credentials
|
@@ -999,9 +999,9 @@ module Google
|
|
999
999
|
# * (`String`) The path to a service account key file in JSON format
|
1000
1000
|
# * (`Hash`) A service account key as a Hash
|
1001
1001
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1002
|
-
# (see the [googleauth docs](https://
|
1002
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1003
1003
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1004
|
-
# (see the [signet docs](https://
|
1004
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1005
1005
|
# * (`nil`) indicating no credentials
|
1006
1006
|
# @return [::Object]
|
1007
1007
|
# @!attribute [rw] scope
|
@@ -411,9 +411,9 @@ module Google
|
|
411
411
|
# * (`String`) The path to a service account key file in JSON format
|
412
412
|
# * (`Hash`) A service account key as a Hash
|
413
413
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
414
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
415
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
416
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
417
|
# * (`nil`) indicating no credentials
|
418
418
|
# @return [::Object]
|
419
419
|
# @!attribute [rw] scope
|
@@ -782,9 +782,9 @@ module Google
|
|
782
782
|
# * (`String`) The path to a service account key file in JSON format
|
783
783
|
# * (`Hash`) A service account key as a Hash
|
784
784
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
785
|
-
# (see the [googleauth docs](https://
|
785
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
786
786
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
787
|
-
# (see the [signet docs](https://
|
787
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
788
788
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
789
789
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
790
790
|
# * (`nil`) indicating no credentials
|
@@ -628,9 +628,9 @@ module Google
|
|
628
628
|
# * (`String`) The path to a service account key file in JSON format
|
629
629
|
# * (`Hash`) A service account key as a Hash
|
630
630
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
631
|
-
# (see the [googleauth docs](https://
|
631
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
632
632
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
633
|
-
# (see the [signet docs](https://
|
633
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
634
634
|
# * (`nil`) indicating no credentials
|
635
635
|
# @return [::Object]
|
636
636
|
# @!attribute [rw] scope
|
@@ -375,9 +375,9 @@ module Google
|
|
375
375
|
# * (`String`) The path to a service account key file in JSON format
|
376
376
|
# * (`Hash`) A service account key as a Hash
|
377
377
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
378
|
-
# (see the [googleauth docs](https://
|
378
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
379
379
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
380
|
-
# (see the [signet docs](https://
|
380
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
381
381
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
382
382
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
383
383
|
# * (`nil`) indicating no credentials
|
@@ -321,9 +321,9 @@ module Google
|
|
321
321
|
# * (`String`) The path to a service account key file in JSON format
|
322
322
|
# * (`Hash`) A service account key as a Hash
|
323
323
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
324
|
-
# (see the [googleauth docs](https://
|
324
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
325
325
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
326
|
-
# (see the [signet docs](https://
|
326
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
327
327
|
# * (`nil`) indicating no credentials
|
328
328
|
# @return [::Object]
|
329
329
|
# @!attribute [rw] scope
|
@@ -943,9 +943,9 @@ module Google
|
|
943
943
|
# * (`String`) The path to a service account key file in JSON format
|
944
944
|
# * (`Hash`) A service account key as a Hash
|
945
945
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
946
|
-
# (see the [googleauth docs](https://
|
946
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
947
947
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
948
|
-
# (see the [signet docs](https://
|
948
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
949
949
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
950
950
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
951
951
|
# * (`nil`) indicating no credentials
|
@@ -620,9 +620,9 @@ module Google
|
|
620
620
|
# * (`String`) The path to a service account key file in JSON format
|
621
621
|
# * (`Hash`) A service account key as a Hash
|
622
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
628
|
# * (`nil`) indicating no credentials
|
@@ -756,9 +756,9 @@ module Google
|
|
756
756
|
# * (`String`) The path to a service account key file in JSON format
|
757
757
|
# * (`Hash`) A service account key as a Hash
|
758
758
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
759
|
-
# (see the [googleauth docs](https://
|
759
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
760
760
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
761
|
-
# (see the [signet docs](https://
|
761
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
762
762
|
# * (`nil`) indicating no credentials
|
763
763
|
# @return [::Object]
|
764
764
|
# @!attribute [rw] scope
|
@@ -411,9 +411,9 @@ module Google
|
|
411
411
|
# * (`String`) The path to a service account key file in JSON format
|
412
412
|
# * (`Hash`) A service account key as a Hash
|
413
413
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
414
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
415
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
416
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
417
|
# * (`nil`) indicating no credentials
|
418
418
|
# @return [::Object]
|
419
419
|
# @!attribute [rw] scope
|
@@ -679,9 +679,9 @@ module Google
|
|
679
679
|
# * (`String`) The path to a service account key file in JSON format
|
680
680
|
# * (`Hash`) A service account key as a Hash
|
681
681
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
682
|
-
# (see the [googleauth docs](https://
|
682
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
683
683
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
684
|
-
# (see the [signet docs](https://
|
684
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
685
685
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
686
686
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
687
687
|
# * (`nil`) indicating no credentials
|