google-cloud-dialogflow-v2 0.6.4 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/cloud/dialogflow/v2.rb +11 -2
- data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +9 -9
- data/lib/google/cloud/dialogflow/v2/agents/client.rb +24 -18
- data/lib/google/cloud/dialogflow/v2/agents/operations.rb +96 -11
- data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +100 -0
- data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/answer_records.rb +50 -0
- data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +479 -0
- data/lib/google/cloud/dialogflow/v2/answer_records/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/answer_records/paths.rb +105 -0
- data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +7 -0
- data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +7 -24
- data/lib/google/cloud/dialogflow/v2/contexts.rb +1 -18
- data/lib/google/cloud/dialogflow/v2/contexts/client.rb +22 -33
- data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +39 -0
- data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +89 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +182 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +61 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +699 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +205 -0
- data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +75 -0
- data/lib/google/cloud/dialogflow/v2/conversations.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/conversations/client.rb +757 -0
- data/lib/google/cloud/dialogflow/v2/conversations/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +146 -0
- data/lib/google/cloud/dialogflow/v2/document_pb.rb +99 -0
- data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +73 -0
- data/lib/google/cloud/dialogflow/v2/documents.rb +50 -0
- data/lib/google/cloud/dialogflow/v2/documents/client.rb +810 -0
- data/lib/google/cloud/dialogflow/v2/documents/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/documents/operations.rb +655 -0
- data/lib/google/cloud/dialogflow/v2/documents/paths.rb +119 -0
- data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +11 -38
- data/lib/google/cloud/dialogflow/v2/entity_types.rb +1 -28
- data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +26 -47
- data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +96 -11
- data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/environments/client.rb +17 -11
- data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +20 -0
- data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +26 -0
- data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
- data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +8 -39
- data/lib/google/cloud/dialogflow/v2/intents.rb +1 -32
- data/lib/google/cloud/dialogflow/v2/intents/client.rb +23 -48
- data/lib/google/cloud/dialogflow/v2/intents/operations.rb +96 -11
- data/lib/google/cloud/dialogflow/v2/intents/paths.rb +1 -1
- data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +60 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +53 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +696 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/knowledge_bases/paths.rb +105 -0
- data/lib/google/cloud/dialogflow/v2/participant_pb.rb +172 -0
- data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +64 -0
- data/lib/google/cloud/dialogflow/v2/participants.rb +49 -0
- data/lib/google/cloud/dialogflow/v2/participants/client.rb +894 -0
- data/lib/google/cloud/dialogflow/v2/participants/credentials.rb +52 -0
- data/lib/google/cloud/dialogflow/v2/participants/paths.rb +258 -0
- data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +6 -22
- data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -17
- data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +21 -31
- data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +2 -2
- data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
- data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +14 -6
- data/lib/google/cloud/dialogflow/v2/sessions.rb +4 -4
- data/lib/google/cloud/dialogflow/v2/sessions/client.rb +43 -21
- data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +3 -3
- data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/cloud/dialogflow/v2/agent.rb +1 -2
- data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +259 -0
- data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +25 -0
- data/proto_docs/google/cloud/dialogflow/v2/context.rb +17 -2
- data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +253 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation_event.rb +83 -0
- data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +510 -0
- data/proto_docs/google/cloud/dialogflow/v2/document.rb +267 -0
- data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +12 -3
- data/proto_docs/google/cloud/dialogflow/v2/environment.rb +18 -1
- data/proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb +45 -0
- data/proto_docs/google/cloud/dialogflow/v2/intent.rb +20 -3
- data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +139 -0
- data/proto_docs/google/cloud/dialogflow/v2/participant.rb +503 -0
- data/proto_docs/google/cloud/dialogflow/v2/session.rb +52 -7
- data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +7 -6
- data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
- data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +2 -2
- data/proto_docs/google/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- data/proto_docs/google/type/latlng.rb +2 -2
- metadata +59 -9
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "googleauth"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Dialogflow
|
24
|
+
module V2
|
25
|
+
module Participants
|
26
|
+
# Credentials for the Participants API.
|
27
|
+
class Credentials < ::Google::Auth::Credentials
|
28
|
+
self.scope = [
|
29
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
30
|
+
"https://www.googleapis.com/auth/dialogflow"
|
31
|
+
]
|
32
|
+
self.env_vars = [
|
33
|
+
"DIALOGFLOW_CREDENTIALS",
|
34
|
+
"DIALOGFLOW_KEYFILE",
|
35
|
+
"GOOGLE_CLOUD_CREDENTIALS",
|
36
|
+
"GOOGLE_CLOUD_KEYFILE",
|
37
|
+
"GCLOUD_KEYFILE",
|
38
|
+
"DIALOGFLOW_CREDENTIALS_JSON",
|
39
|
+
"DIALOGFLOW_KEYFILE_JSON",
|
40
|
+
"GOOGLE_CLOUD_CREDENTIALS_JSON",
|
41
|
+
"GOOGLE_CLOUD_KEYFILE_JSON",
|
42
|
+
"GCLOUD_KEYFILE_JSON"
|
43
|
+
]
|
44
|
+
self.paths = [
|
45
|
+
"~/.config/google_cloud/application_default_credentials.json"
|
46
|
+
]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,258 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module Dialogflow
|
23
|
+
module V2
|
24
|
+
module Participants
|
25
|
+
# Path helper methods for the Participants API.
|
26
|
+
module Paths
|
27
|
+
##
|
28
|
+
# Create a fully-qualified Context resource string.
|
29
|
+
#
|
30
|
+
# @overload context_path(project:, session:, context:)
|
31
|
+
# The resource will be in the following format:
|
32
|
+
#
|
33
|
+
# `projects/{project}/agent/sessions/{session}/contexts/{context}`
|
34
|
+
#
|
35
|
+
# @param project [String]
|
36
|
+
# @param session [String]
|
37
|
+
# @param context [String]
|
38
|
+
#
|
39
|
+
# @overload context_path(project:, environment:, user:, session:, context:)
|
40
|
+
# The resource will be in the following format:
|
41
|
+
#
|
42
|
+
# `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}`
|
43
|
+
#
|
44
|
+
# @param project [String]
|
45
|
+
# @param environment [String]
|
46
|
+
# @param user [String]
|
47
|
+
# @param session [String]
|
48
|
+
# @param context [String]
|
49
|
+
#
|
50
|
+
# @return [::String]
|
51
|
+
def context_path **args
|
52
|
+
resources = {
|
53
|
+
"context:project:session" => (proc do |project:, session:, context:|
|
54
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
55
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
56
|
+
|
57
|
+
"projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
|
58
|
+
end),
|
59
|
+
"context:environment:project:session:user" => (proc do |project:, environment:, user:, session:, context:|
|
60
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
61
|
+
raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
|
62
|
+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
63
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
64
|
+
|
65
|
+
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
|
66
|
+
end)
|
67
|
+
}
|
68
|
+
|
69
|
+
resource = resources[args.keys.sort.join(":")]
|
70
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
71
|
+
resource.call(**args)
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Create a fully-qualified Conversation resource string.
|
76
|
+
#
|
77
|
+
# @overload conversation_path(project:, conversation:)
|
78
|
+
# The resource will be in the following format:
|
79
|
+
#
|
80
|
+
# `projects/{project}/conversations/{conversation}`
|
81
|
+
#
|
82
|
+
# @param project [String]
|
83
|
+
# @param conversation [String]
|
84
|
+
#
|
85
|
+
# @overload conversation_path(project:, location:, conversation:)
|
86
|
+
# The resource will be in the following format:
|
87
|
+
#
|
88
|
+
# `projects/{project}/locations/{location}/conversations/{conversation}`
|
89
|
+
#
|
90
|
+
# @param project [String]
|
91
|
+
# @param location [String]
|
92
|
+
# @param conversation [String]
|
93
|
+
#
|
94
|
+
# @return [::String]
|
95
|
+
def conversation_path **args
|
96
|
+
resources = {
|
97
|
+
"conversation:project" => (proc do |project:, conversation:|
|
98
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
99
|
+
|
100
|
+
"projects/#{project}/conversations/#{conversation}"
|
101
|
+
end),
|
102
|
+
"conversation:location:project" => (proc do |project:, location:, conversation:|
|
103
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
104
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
105
|
+
|
106
|
+
"projects/#{project}/locations/#{location}/conversations/#{conversation}"
|
107
|
+
end)
|
108
|
+
}
|
109
|
+
|
110
|
+
resource = resources[args.keys.sort.join(":")]
|
111
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
112
|
+
resource.call(**args)
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# Create a fully-qualified Message resource string.
|
117
|
+
#
|
118
|
+
# @overload message_path(project:, conversation:, message:)
|
119
|
+
# The resource will be in the following format:
|
120
|
+
#
|
121
|
+
# `projects/{project}/conversations/{conversation}/messages/{message}`
|
122
|
+
#
|
123
|
+
# @param project [String]
|
124
|
+
# @param conversation [String]
|
125
|
+
# @param message [String]
|
126
|
+
#
|
127
|
+
# @overload message_path(project:, location:, conversation:, message:)
|
128
|
+
# The resource will be in the following format:
|
129
|
+
#
|
130
|
+
# `projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}`
|
131
|
+
#
|
132
|
+
# @param project [String]
|
133
|
+
# @param location [String]
|
134
|
+
# @param conversation [String]
|
135
|
+
# @param message [String]
|
136
|
+
#
|
137
|
+
# @return [::String]
|
138
|
+
def message_path **args
|
139
|
+
resources = {
|
140
|
+
"conversation:message:project" => (proc do |project:, conversation:, message:|
|
141
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
142
|
+
raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"
|
143
|
+
|
144
|
+
"projects/#{project}/conversations/#{conversation}/messages/#{message}"
|
145
|
+
end),
|
146
|
+
"conversation:location:message:project" => (proc do |project:, location:, conversation:, message:|
|
147
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
148
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
149
|
+
raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"
|
150
|
+
|
151
|
+
"projects/#{project}/locations/#{location}/conversations/#{conversation}/messages/#{message}"
|
152
|
+
end)
|
153
|
+
}
|
154
|
+
|
155
|
+
resource = resources[args.keys.sort.join(":")]
|
156
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
157
|
+
resource.call(**args)
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# Create a fully-qualified Participant resource string.
|
162
|
+
#
|
163
|
+
# @overload participant_path(project:, conversation:, participant:)
|
164
|
+
# The resource will be in the following format:
|
165
|
+
#
|
166
|
+
# `projects/{project}/conversations/{conversation}/participants/{participant}`
|
167
|
+
#
|
168
|
+
# @param project [String]
|
169
|
+
# @param conversation [String]
|
170
|
+
# @param participant [String]
|
171
|
+
#
|
172
|
+
# @overload participant_path(project:, location:, conversation:, participant:)
|
173
|
+
# The resource will be in the following format:
|
174
|
+
#
|
175
|
+
# `projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}`
|
176
|
+
#
|
177
|
+
# @param project [String]
|
178
|
+
# @param location [String]
|
179
|
+
# @param conversation [String]
|
180
|
+
# @param participant [String]
|
181
|
+
#
|
182
|
+
# @return [::String]
|
183
|
+
def participant_path **args
|
184
|
+
resources = {
|
185
|
+
"conversation:participant:project" => (proc do |project:, conversation:, participant:|
|
186
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
187
|
+
raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"
|
188
|
+
|
189
|
+
"projects/#{project}/conversations/#{conversation}/participants/#{participant}"
|
190
|
+
end),
|
191
|
+
"conversation:location:participant:project" => (proc do |project:, location:, conversation:, participant:|
|
192
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
193
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
194
|
+
raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"
|
195
|
+
|
196
|
+
"projects/#{project}/locations/#{location}/conversations/#{conversation}/participants/#{participant}"
|
197
|
+
end)
|
198
|
+
}
|
199
|
+
|
200
|
+
resource = resources[args.keys.sort.join(":")]
|
201
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
202
|
+
resource.call(**args)
|
203
|
+
end
|
204
|
+
|
205
|
+
##
|
206
|
+
# Create a fully-qualified SessionEntityType resource string.
|
207
|
+
#
|
208
|
+
# @overload session_entity_type_path(project:, session:, entity_type:)
|
209
|
+
# The resource will be in the following format:
|
210
|
+
#
|
211
|
+
# `projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}`
|
212
|
+
#
|
213
|
+
# @param project [String]
|
214
|
+
# @param session [String]
|
215
|
+
# @param entity_type [String]
|
216
|
+
#
|
217
|
+
# @overload session_entity_type_path(project:, environment:, user:, session:, entity_type:)
|
218
|
+
# The resource will be in the following format:
|
219
|
+
#
|
220
|
+
# `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}`
|
221
|
+
#
|
222
|
+
# @param project [String]
|
223
|
+
# @param environment [String]
|
224
|
+
# @param user [String]
|
225
|
+
# @param session [String]
|
226
|
+
# @param entity_type [String]
|
227
|
+
#
|
228
|
+
# @return [::String]
|
229
|
+
def session_entity_type_path **args
|
230
|
+
resources = {
|
231
|
+
"entity_type:project:session" => (proc do |project:, session:, entity_type:|
|
232
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
233
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
234
|
+
|
235
|
+
"projects/#{project}/agent/sessions/#{session}/entityTypes/#{entity_type}"
|
236
|
+
end),
|
237
|
+
"entity_type:environment:project:session:user" => (proc do |project:, environment:, user:, session:, entity_type:|
|
238
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
239
|
+
raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
|
240
|
+
raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
|
241
|
+
raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
|
242
|
+
|
243
|
+
"projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
|
244
|
+
end)
|
245
|
+
}
|
246
|
+
|
247
|
+
resource = resources[args.keys.sort.join(":")]
|
248
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
249
|
+
resource.call(**args)
|
250
|
+
end
|
251
|
+
|
252
|
+
extend self
|
253
|
+
end
|
254
|
+
end
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
end
|
@@ -24,23 +24,7 @@ module Google
|
|
24
24
|
module Dialogflow
|
25
25
|
module V2
|
26
26
|
module SessionEntityTypes
|
27
|
-
#
|
28
|
-
# meaningful to your application. For example, a date range, a proper name
|
29
|
-
# such as a geographic location or landmark, and so on. Entities represent
|
30
|
-
# actionable data for your application.
|
31
|
-
#
|
32
|
-
# Session entity types are referred to as **User** entity types and are
|
33
|
-
# entities that are built for an individual user such as
|
34
|
-
# favorites, preferences, playlists, and so on. You can redefine a session
|
35
|
-
# entity type at the session level.
|
36
|
-
#
|
37
|
-
# Session entity methods do not work with Google Assistant integration.
|
38
|
-
# Contact Dialogflow support if you need to use session entities
|
39
|
-
# with Google Assistant integration.
|
40
|
-
#
|
41
|
-
# For more information about entity types, see the
|
42
|
-
# [Dialogflow
|
43
|
-
# documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
27
|
+
# Service for managing [SessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityType].
|
44
28
|
class Service
|
45
29
|
|
46
30
|
include GRPC::GenericService
|
@@ -54,13 +38,13 @@ module Google
|
|
54
38
|
# This method doesn't work with Google Assistant integration.
|
55
39
|
# Contact Dialogflow support if you need to use session entities
|
56
40
|
# with Google Assistant integration.
|
57
|
-
rpc :ListSessionEntityTypes, ListSessionEntityTypesRequest, ListSessionEntityTypesResponse
|
41
|
+
rpc :ListSessionEntityTypes, ::Google::Cloud::Dialogflow::V2::ListSessionEntityTypesRequest, ::Google::Cloud::Dialogflow::V2::ListSessionEntityTypesResponse
|
58
42
|
# Retrieves the specified session entity type.
|
59
43
|
#
|
60
44
|
# This method doesn't work with Google Assistant integration.
|
61
45
|
# Contact Dialogflow support if you need to use session entities
|
62
46
|
# with Google Assistant integration.
|
63
|
-
rpc :GetSessionEntityType, GetSessionEntityTypeRequest, SessionEntityType
|
47
|
+
rpc :GetSessionEntityType, ::Google::Cloud::Dialogflow::V2::GetSessionEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::SessionEntityType
|
64
48
|
# Creates a session entity type.
|
65
49
|
#
|
66
50
|
# If the specified session entity type already exists, overrides the session
|
@@ -69,19 +53,19 @@ module Google
|
|
69
53
|
# This method doesn't work with Google Assistant integration.
|
70
54
|
# Contact Dialogflow support if you need to use session entities
|
71
55
|
# with Google Assistant integration.
|
72
|
-
rpc :CreateSessionEntityType, CreateSessionEntityTypeRequest, SessionEntityType
|
56
|
+
rpc :CreateSessionEntityType, ::Google::Cloud::Dialogflow::V2::CreateSessionEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::SessionEntityType
|
73
57
|
# Updates the specified session entity type.
|
74
58
|
#
|
75
59
|
# This method doesn't work with Google Assistant integration.
|
76
60
|
# Contact Dialogflow support if you need to use session entities
|
77
61
|
# with Google Assistant integration.
|
78
|
-
rpc :UpdateSessionEntityType, UpdateSessionEntityTypeRequest, SessionEntityType
|
62
|
+
rpc :UpdateSessionEntityType, ::Google::Cloud::Dialogflow::V2::UpdateSessionEntityTypeRequest, ::Google::Cloud::Dialogflow::V2::SessionEntityType
|
79
63
|
# Deletes the specified session entity type.
|
80
64
|
#
|
81
65
|
# This method doesn't work with Google Assistant integration.
|
82
66
|
# Contact Dialogflow support if you need to use session entities
|
83
67
|
# with Google Assistant integration.
|
84
|
-
rpc :DeleteSessionEntityType, DeleteSessionEntityTypeRequest, Google::Protobuf::Empty
|
68
|
+
rpc :DeleteSessionEntityType, ::Google::Cloud::Dialogflow::V2::DeleteSessionEntityTypeRequest, ::Google::Protobuf::Empty
|
85
69
|
end
|
86
70
|
|
87
71
|
Stub = Service.rpc_stub_class
|
@@ -31,23 +31,7 @@ module Google
|
|
31
31
|
module Dialogflow
|
32
32
|
module V2
|
33
33
|
##
|
34
|
-
#
|
35
|
-
# meaningful to your application. For example, a date range, a proper name
|
36
|
-
# such as a geographic location or landmark, and so on. Entities represent
|
37
|
-
# actionable data for your application.
|
38
|
-
#
|
39
|
-
# Session entity types are referred to as **User** entity types and are
|
40
|
-
# entities that are built for an individual user such as
|
41
|
-
# favorites, preferences, playlists, and so on. You can redefine a session
|
42
|
-
# entity type at the session level.
|
43
|
-
#
|
44
|
-
# Session entity methods do not work with Google Assistant integration.
|
45
|
-
# Contact Dialogflow support if you need to use session entities
|
46
|
-
# with Google Assistant integration.
|
47
|
-
#
|
48
|
-
# For more information about entity types, see the
|
49
|
-
# [Dialogflow
|
50
|
-
# documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
34
|
+
# Service for managing {::Google::Cloud::Dialogflow::V2::SessionEntityType SessionEntityTypes}.
|
51
35
|
#
|
52
36
|
# To load this service and instantiate a client:
|
53
37
|
#
|
@@ -27,23 +27,7 @@ module Google
|
|
27
27
|
##
|
28
28
|
# Client for the SessionEntityTypes service.
|
29
29
|
#
|
30
|
-
#
|
31
|
-
# meaningful to your application. For example, a date range, a proper name
|
32
|
-
# such as a geographic location or landmark, and so on. Entities represent
|
33
|
-
# actionable data for your application.
|
34
|
-
#
|
35
|
-
# Session entity types are referred to as **User** entity types and are
|
36
|
-
# entities that are built for an individual user such as
|
37
|
-
# favorites, preferences, playlists, and so on. You can redefine a session
|
38
|
-
# entity type at the session level.
|
39
|
-
#
|
40
|
-
# Session entity methods do not work with Google Assistant integration.
|
41
|
-
# Contact Dialogflow support if you need to use session entities
|
42
|
-
# with Google Assistant integration.
|
43
|
-
#
|
44
|
-
# For more information about entity types, see the
|
45
|
-
# [Dialogflow
|
46
|
-
# documentation](https://cloud.google.com/dialogflow/docs/entities-overview).
|
30
|
+
# Service for managing {::Google::Cloud::Dialogflow::V2::SessionEntityType SessionEntityTypes}.
|
47
31
|
#
|
48
32
|
class Client
|
49
33
|
include Paths
|
@@ -76,7 +60,7 @@ module Google
|
|
76
60
|
parent_config = while namespace.any?
|
77
61
|
parent_name = namespace.join "::"
|
78
62
|
parent_const = const_get parent_name
|
79
|
-
break parent_const.configure if parent_const
|
63
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
80
64
|
namespace.pop
|
81
65
|
end
|
82
66
|
default_config = Client::Configuration.new parent_config
|
@@ -84,9 +68,9 @@ module Google
|
|
84
68
|
default_config.timeout = 60.0
|
85
69
|
default_config.retry_policy = {
|
86
70
|
initial_delay: 0.1,
|
87
|
-
|
88
|
-
|
89
|
-
|
71
|
+
max_delay: 60.0,
|
72
|
+
multiplier: 1.3,
|
73
|
+
retry_codes: [14]
|
90
74
|
}
|
91
75
|
|
92
76
|
default_config
|
@@ -150,7 +134,13 @@ module Google
|
|
150
134
|
|
151
135
|
# Create credentials
|
152
136
|
credentials = @config.credentials
|
153
|
-
|
137
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
138
|
+
# but only if the default endpoint does not have a region prefix.
|
139
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
140
|
+
@config.endpoint == Client.configure.endpoint &&
|
141
|
+
!@config.endpoint.split(".").first.include?("-")
|
142
|
+
credentials ||= Credentials.default scope: @config.scope,
|
143
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
154
144
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
155
145
|
credentials = Credentials.new credentials, scope: @config.scope
|
156
146
|
end
|
@@ -638,14 +628,14 @@ module Google
|
|
638
628
|
|
639
629
|
config_attr :endpoint, "dialogflow.googleapis.com", ::String
|
640
630
|
config_attr :credentials, nil do |value|
|
641
|
-
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
631
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
642
632
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
643
633
|
allowed.any? { |klass| klass === value }
|
644
634
|
end
|
645
635
|
config_attr :scope, nil, ::String, ::Array, nil
|
646
636
|
config_attr :lib_name, nil, ::String, nil
|
647
637
|
config_attr :lib_version, nil, ::String, nil
|
648
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
638
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
649
639
|
config_attr :interceptors, nil, ::Array, nil
|
650
640
|
config_attr :timeout, nil, ::Numeric, nil
|
651
641
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -666,7 +656,7 @@ module Google
|
|
666
656
|
def rpcs
|
667
657
|
@rpcs ||= begin
|
668
658
|
parent_rpcs = nil
|
669
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
659
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
670
660
|
Rpcs.new parent_rpcs
|
671
661
|
end
|
672
662
|
end
|
@@ -678,7 +668,7 @@ module Google
|
|
678
668
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
679
669
|
# the following configuration fields:
|
680
670
|
#
|
681
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
671
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
682
672
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
683
673
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
684
674
|
# include the following keys:
|
@@ -717,15 +707,15 @@ module Google
|
|
717
707
|
|
718
708
|
# @private
|
719
709
|
def initialize parent_rpcs = nil
|
720
|
-
list_session_entity_types_config = parent_rpcs
|
710
|
+
list_session_entity_types_config = parent_rpcs.list_session_entity_types if parent_rpcs.respond_to? :list_session_entity_types
|
721
711
|
@list_session_entity_types = ::Gapic::Config::Method.new list_session_entity_types_config
|
722
|
-
get_session_entity_type_config = parent_rpcs
|
712
|
+
get_session_entity_type_config = parent_rpcs.get_session_entity_type if parent_rpcs.respond_to? :get_session_entity_type
|
723
713
|
@get_session_entity_type = ::Gapic::Config::Method.new get_session_entity_type_config
|
724
|
-
create_session_entity_type_config = parent_rpcs
|
714
|
+
create_session_entity_type_config = parent_rpcs.create_session_entity_type if parent_rpcs.respond_to? :create_session_entity_type
|
725
715
|
@create_session_entity_type = ::Gapic::Config::Method.new create_session_entity_type_config
|
726
|
-
update_session_entity_type_config = parent_rpcs
|
716
|
+
update_session_entity_type_config = parent_rpcs.update_session_entity_type if parent_rpcs.respond_to? :update_session_entity_type
|
727
717
|
@update_session_entity_type = ::Gapic::Config::Method.new update_session_entity_type_config
|
728
|
-
delete_session_entity_type_config = parent_rpcs
|
718
|
+
delete_session_entity_type_config = parent_rpcs.delete_session_entity_type if parent_rpcs.respond_to? :delete_session_entity_type
|
729
719
|
@delete_session_entity_type = ::Gapic::Config::Method.new delete_session_entity_type_config
|
730
720
|
|
731
721
|
yield self if block_given?
|