google-cloud-dialogflow-v2 0.6.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +188 -190
  3. data/README.md +70 -2
  4. data/lib/google/cloud/dialogflow/v2.rb +13 -2
  5. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +24 -39
  6. data/lib/google/cloud/dialogflow/v2/agents.rb +1 -28
  7. data/lib/google/cloud/dialogflow/v2/agents/client.rb +41 -100
  8. data/lib/google/cloud/dialogflow/v2/agents/operations.rb +96 -11
  9. data/lib/google/cloud/dialogflow/v2/agents/paths.rb +42 -3
  10. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +100 -0
  11. data/lib/google/cloud/dialogflow/v2/answer_record_services_pb.rb +48 -0
  12. data/lib/google/cloud/dialogflow/v2/answer_records.rb +49 -0
  13. data/lib/google/cloud/dialogflow/v2/answer_records/client.rb +478 -0
  14. data/lib/google/cloud/dialogflow/v2/answer_records/credentials.rb +52 -0
  15. data/lib/google/cloud/dialogflow/v2/answer_records/paths.rb +105 -0
  16. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +7 -0
  17. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +7 -24
  18. data/lib/google/cloud/dialogflow/v2/contexts.rb +1 -18
  19. data/lib/google/cloud/dialogflow/v2/contexts/client.rb +24 -63
  20. data/lib/google/cloud/dialogflow/v2/contexts/paths.rb +74 -2
  21. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +39 -0
  22. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +89 -0
  23. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +182 -0
  24. data/lib/google/cloud/dialogflow/v2/conversation_profile_services_pb.rb +61 -0
  25. data/lib/google/cloud/dialogflow/v2/conversation_profiles.rb +49 -0
  26. data/lib/google/cloud/dialogflow/v2/conversation_profiles/client.rb +699 -0
  27. data/lib/google/cloud/dialogflow/v2/conversation_profiles/credentials.rb +52 -0
  28. data/lib/google/cloud/dialogflow/v2/conversation_profiles/paths.rb +246 -0
  29. data/lib/google/cloud/dialogflow/v2/conversation_services_pb.rb +75 -0
  30. data/lib/google/cloud/dialogflow/v2/conversations.rb +49 -0
  31. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +757 -0
  32. data/lib/google/cloud/dialogflow/v2/conversations/credentials.rb +52 -0
  33. data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +146 -0
  34. data/lib/google/cloud/dialogflow/v2/document_pb.rb +99 -0
  35. data/lib/google/cloud/dialogflow/v2/document_services_pb.rb +73 -0
  36. data/lib/google/cloud/dialogflow/v2/documents.rb +50 -0
  37. data/lib/google/cloud/dialogflow/v2/documents/client.rb +810 -0
  38. data/lib/google/cloud/dialogflow/v2/documents/credentials.rb +52 -0
  39. data/lib/google/cloud/dialogflow/v2/documents/operations.rb +655 -0
  40. data/lib/google/cloud/dialogflow/v2/documents/paths.rb +119 -0
  41. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +11 -38
  42. data/lib/google/cloud/dialogflow/v2/entity_types.rb +1 -28
  43. data/lib/google/cloud/dialogflow/v2/entity_types/client.rb +28 -91
  44. data/lib/google/cloud/dialogflow/v2/entity_types/operations.rb +96 -11
  45. data/lib/google/cloud/dialogflow/v2/entity_types/paths.rb +58 -12
  46. data/lib/google/cloud/dialogflow/v2/environment_pb.rb +50 -1
  47. data/lib/google/cloud/dialogflow/v2/environment_services_pb.rb +23 -2
  48. data/lib/google/cloud/dialogflow/v2/environments.rb +1 -1
  49. data/lib/google/cloud/dialogflow/v2/environments/client.rb +430 -14
  50. data/lib/google/cloud/dialogflow/v2/environments/paths.rb +104 -5
  51. data/lib/google/cloud/dialogflow/v2/fulfillment_pb.rb +59 -0
  52. data/lib/google/cloud/dialogflow/v2/fulfillment_services_pb.rb +47 -0
  53. data/lib/google/cloud/dialogflow/v2/fulfillments.rb +49 -0
  54. data/lib/google/cloud/dialogflow/v2/fulfillments/client.rb +460 -0
  55. data/lib/google/cloud/dialogflow/v2/fulfillments/credentials.rb +52 -0
  56. data/lib/google/cloud/dialogflow/v2/fulfillments/paths.rb +69 -0
  57. data/lib/google/cloud/dialogflow/v2/gcs_pb.rb +20 -0
  58. data/lib/google/cloud/dialogflow/v2/human_agent_assistant_event_pb.rb +26 -0
  59. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +2 -0
  60. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +8 -39
  61. data/lib/google/cloud/dialogflow/v2/intents.rb +1 -32
  62. data/lib/google/cloud/dialogflow/v2/intents/client.rb +25 -80
  63. data/lib/google/cloud/dialogflow/v2/intents/operations.rb +96 -11
  64. data/lib/google/cloud/dialogflow/v2/intents/paths.rb +97 -13
  65. data/lib/google/cloud/dialogflow/v2/knowledge_base_pb.rb +60 -0
  66. data/lib/google/cloud/dialogflow/v2/knowledge_base_services_pb.rb +53 -0
  67. data/lib/google/cloud/dialogflow/v2/knowledge_bases.rb +49 -0
  68. data/lib/google/cloud/dialogflow/v2/knowledge_bases/client.rb +696 -0
  69. data/lib/google/cloud/dialogflow/v2/knowledge_bases/credentials.rb +52 -0
  70. data/lib/google/cloud/dialogflow/v2/knowledge_bases/paths.rb +105 -0
  71. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +172 -0
  72. data/lib/google/cloud/dialogflow/v2/participant_services_pb.rb +64 -0
  73. data/lib/google/cloud/dialogflow/v2/participants.rb +49 -0
  74. data/lib/google/cloud/dialogflow/v2/participants/client.rb +894 -0
  75. data/lib/google/cloud/dialogflow/v2/participants/credentials.rb +52 -0
  76. data/lib/google/cloud/dialogflow/v2/participants/paths.rb +334 -0
  77. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +6 -22
  78. data/lib/google/cloud/dialogflow/v2/session_entity_types.rb +1 -17
  79. data/lib/google/cloud/dialogflow/v2/session_entity_types/client.rb +23 -53
  80. data/lib/google/cloud/dialogflow/v2/session_entity_types/paths.rb +74 -2
  81. data/lib/google/cloud/dialogflow/v2/session_pb.rb +1 -0
  82. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +14 -6
  83. data/lib/google/cloud/dialogflow/v2/sessions.rb +4 -4
  84. data/lib/google/cloud/dialogflow/v2/sessions/client.rb +51 -15
  85. data/lib/google/cloud/dialogflow/v2/sessions/paths.rb +113 -3
  86. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  87. data/lib/google/cloud/dialogflow/v2/version_pb.rb +69 -0
  88. data/lib/google/cloud/dialogflow/v2/version_services_pb.rb +59 -0
  89. data/lib/google/cloud/dialogflow/v2/versions.rb +49 -0
  90. data/lib/google/cloud/dialogflow/v2/versions/client.rb +709 -0
  91. data/lib/google/cloud/dialogflow/v2/versions/credentials.rb +52 -0
  92. data/lib/google/cloud/dialogflow/v2/versions/paths.rb +110 -0
  93. data/proto_docs/google/api/field_behavior.rb +6 -0
  94. data/proto_docs/google/api/resource.rb +50 -14
  95. data/proto_docs/google/cloud/dialogflow/v2/agent.rb +9 -1
  96. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +252 -0
  97. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +25 -0
  98. data/proto_docs/google/cloud/dialogflow/v2/context.rb +17 -2
  99. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +253 -0
  100. data/proto_docs/google/cloud/dialogflow/v2/conversation_event.rb +83 -0
  101. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +522 -0
  102. data/proto_docs/google/cloud/dialogflow/v2/document.rb +267 -0
  103. data/proto_docs/google/cloud/dialogflow/v2/entity_type.rb +12 -3
  104. data/proto_docs/google/cloud/dialogflow/v2/environment.rb +187 -5
  105. data/proto_docs/google/cloud/dialogflow/v2/fulfillment.rb +144 -0
  106. data/proto_docs/google/cloud/dialogflow/v2/human_agent_assistant_event.rb +45 -0
  107. data/proto_docs/google/cloud/dialogflow/v2/intent.rb +20 -3
  108. data/proto_docs/google/cloud/dialogflow/v2/knowledge_base.rb +139 -0
  109. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +503 -0
  110. data/proto_docs/google/cloud/dialogflow/v2/session.rb +52 -7
  111. data/proto_docs/google/cloud/dialogflow/v2/session_entity_type.rb +7 -6
  112. data/proto_docs/google/cloud/dialogflow/v2/validation_result.rb +1 -1
  113. data/proto_docs/google/cloud/dialogflow/v2/version.rb +176 -0
  114. data/proto_docs/google/cloud/dialogflow/v2/webhook.rb +2 -2
  115. data/proto_docs/google/longrunning/operations.rb +17 -3
  116. data/proto_docs/google/protobuf/any.rb +5 -2
  117. data/proto_docs/google/protobuf/timestamp.rb +10 -1
  118. data/proto_docs/google/type/latlng.rb +2 -2
  119. metadata +73 -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,334 @@
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
+ # @overload context_path(project:, location:, session:, context:)
51
+ # The resource will be in the following format:
52
+ #
53
+ # `projects/{project}/locations/{location}/agent/sessions/{session}/contexts/{context}`
54
+ #
55
+ # @param project [String]
56
+ # @param location [String]
57
+ # @param session [String]
58
+ # @param context [String]
59
+ #
60
+ # @overload context_path(project:, location:, environment:, user:, session:, context:)
61
+ # The resource will be in the following format:
62
+ #
63
+ # `projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/contexts/{context}`
64
+ #
65
+ # @param project [String]
66
+ # @param location [String]
67
+ # @param environment [String]
68
+ # @param user [String]
69
+ # @param session [String]
70
+ # @param context [String]
71
+ #
72
+ # @return [::String]
73
+ def context_path **args
74
+ resources = {
75
+ "context:project:session" => (proc do |project:, session:, context:|
76
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
77
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
78
+
79
+ "projects/#{project}/agent/sessions/#{session}/contexts/#{context}"
80
+ end),
81
+ "context:environment:project:session:user" => (proc do |project:, environment:, user:, session:, context:|
82
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
83
+ raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
84
+ raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
85
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
86
+
87
+ "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
88
+ end),
89
+ "context:location:project:session" => (proc do |project:, location:, session:, context:|
90
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
91
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
92
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
93
+
94
+ "projects/#{project}/locations/#{location}/agent/sessions/#{session}/contexts/#{context}"
95
+ end),
96
+ "context:environment:location:project:session:user" => (proc do |project:, location:, environment:, user:, session:, context:|
97
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
98
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
99
+ raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
100
+ raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
101
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
102
+
103
+ "projects/#{project}/locations/#{location}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/contexts/#{context}"
104
+ end)
105
+ }
106
+
107
+ resource = resources[args.keys.sort.join(":")]
108
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
109
+ resource.call(**args)
110
+ end
111
+
112
+ ##
113
+ # Create a fully-qualified Conversation resource string.
114
+ #
115
+ # @overload conversation_path(project:, conversation:)
116
+ # The resource will be in the following format:
117
+ #
118
+ # `projects/{project}/conversations/{conversation}`
119
+ #
120
+ # @param project [String]
121
+ # @param conversation [String]
122
+ #
123
+ # @overload conversation_path(project:, location:, conversation:)
124
+ # The resource will be in the following format:
125
+ #
126
+ # `projects/{project}/locations/{location}/conversations/{conversation}`
127
+ #
128
+ # @param project [String]
129
+ # @param location [String]
130
+ # @param conversation [String]
131
+ #
132
+ # @return [::String]
133
+ def conversation_path **args
134
+ resources = {
135
+ "conversation:project" => (proc do |project:, conversation:|
136
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
137
+
138
+ "projects/#{project}/conversations/#{conversation}"
139
+ end),
140
+ "conversation:location:project" => (proc do |project:, location:, conversation:|
141
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
142
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
143
+
144
+ "projects/#{project}/locations/#{location}/conversations/#{conversation}"
145
+ end)
146
+ }
147
+
148
+ resource = resources[args.keys.sort.join(":")]
149
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
150
+ resource.call(**args)
151
+ end
152
+
153
+ ##
154
+ # Create a fully-qualified Message resource string.
155
+ #
156
+ # @overload message_path(project:, conversation:, message:)
157
+ # The resource will be in the following format:
158
+ #
159
+ # `projects/{project}/conversations/{conversation}/messages/{message}`
160
+ #
161
+ # @param project [String]
162
+ # @param conversation [String]
163
+ # @param message [String]
164
+ #
165
+ # @overload message_path(project:, location:, conversation:, message:)
166
+ # The resource will be in the following format:
167
+ #
168
+ # `projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}`
169
+ #
170
+ # @param project [String]
171
+ # @param location [String]
172
+ # @param conversation [String]
173
+ # @param message [String]
174
+ #
175
+ # @return [::String]
176
+ def message_path **args
177
+ resources = {
178
+ "conversation:message:project" => (proc do |project:, conversation:, message:|
179
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
180
+ raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"
181
+
182
+ "projects/#{project}/conversations/#{conversation}/messages/#{message}"
183
+ end),
184
+ "conversation:location:message:project" => (proc do |project:, location:, conversation:, message:|
185
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
186
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
187
+ raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"
188
+
189
+ "projects/#{project}/locations/#{location}/conversations/#{conversation}/messages/#{message}"
190
+ end)
191
+ }
192
+
193
+ resource = resources[args.keys.sort.join(":")]
194
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
195
+ resource.call(**args)
196
+ end
197
+
198
+ ##
199
+ # Create a fully-qualified Participant resource string.
200
+ #
201
+ # @overload participant_path(project:, conversation:, participant:)
202
+ # The resource will be in the following format:
203
+ #
204
+ # `projects/{project}/conversations/{conversation}/participants/{participant}`
205
+ #
206
+ # @param project [String]
207
+ # @param conversation [String]
208
+ # @param participant [String]
209
+ #
210
+ # @overload participant_path(project:, location:, conversation:, participant:)
211
+ # The resource will be in the following format:
212
+ #
213
+ # `projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}`
214
+ #
215
+ # @param project [String]
216
+ # @param location [String]
217
+ # @param conversation [String]
218
+ # @param participant [String]
219
+ #
220
+ # @return [::String]
221
+ def participant_path **args
222
+ resources = {
223
+ "conversation:participant:project" => (proc do |project:, conversation:, participant:|
224
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
225
+ raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"
226
+
227
+ "projects/#{project}/conversations/#{conversation}/participants/#{participant}"
228
+ end),
229
+ "conversation:location:participant:project" => (proc do |project:, location:, conversation:, participant:|
230
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
231
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
232
+ raise ::ArgumentError, "conversation cannot contain /" if conversation.to_s.include? "/"
233
+
234
+ "projects/#{project}/locations/#{location}/conversations/#{conversation}/participants/#{participant}"
235
+ end)
236
+ }
237
+
238
+ resource = resources[args.keys.sort.join(":")]
239
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
240
+ resource.call(**args)
241
+ end
242
+
243
+ ##
244
+ # Create a fully-qualified SessionEntityType resource string.
245
+ #
246
+ # @overload session_entity_type_path(project:, session:, entity_type:)
247
+ # The resource will be in the following format:
248
+ #
249
+ # `projects/{project}/agent/sessions/{session}/entityTypes/{entity_type}`
250
+ #
251
+ # @param project [String]
252
+ # @param session [String]
253
+ # @param entity_type [String]
254
+ #
255
+ # @overload session_entity_type_path(project:, environment:, user:, session:, entity_type:)
256
+ # The resource will be in the following format:
257
+ #
258
+ # `projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}`
259
+ #
260
+ # @param project [String]
261
+ # @param environment [String]
262
+ # @param user [String]
263
+ # @param session [String]
264
+ # @param entity_type [String]
265
+ #
266
+ # @overload session_entity_type_path(project:, location:, session:, entity_type:)
267
+ # The resource will be in the following format:
268
+ #
269
+ # `projects/{project}/locations/{location}/agent/sessions/{session}/entityTypes/{entity_type}`
270
+ #
271
+ # @param project [String]
272
+ # @param location [String]
273
+ # @param session [String]
274
+ # @param entity_type [String]
275
+ #
276
+ # @overload session_entity_type_path(project:, location:, environment:, user:, session:, entity_type:)
277
+ # The resource will be in the following format:
278
+ #
279
+ # `projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}/entityTypes/{entity_type}`
280
+ #
281
+ # @param project [String]
282
+ # @param location [String]
283
+ # @param environment [String]
284
+ # @param user [String]
285
+ # @param session [String]
286
+ # @param entity_type [String]
287
+ #
288
+ # @return [::String]
289
+ def session_entity_type_path **args
290
+ resources = {
291
+ "entity_type:project:session" => (proc do |project:, session:, entity_type:|
292
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
293
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
294
+
295
+ "projects/#{project}/agent/sessions/#{session}/entityTypes/#{entity_type}"
296
+ end),
297
+ "entity_type:environment:project:session:user" => (proc do |project:, environment:, user:, session:, entity_type:|
298
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
299
+ raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
300
+ raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
301
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
302
+
303
+ "projects/#{project}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
304
+ end),
305
+ "entity_type:location:project:session" => (proc do |project:, location:, session:, entity_type:|
306
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
307
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
308
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
309
+
310
+ "projects/#{project}/locations/#{location}/agent/sessions/#{session}/entityTypes/#{entity_type}"
311
+ end),
312
+ "entity_type:environment:location:project:session:user" => (proc do |project:, location:, environment:, user:, session:, entity_type:|
313
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
314
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
315
+ raise ::ArgumentError, "environment cannot contain /" if environment.to_s.include? "/"
316
+ raise ::ArgumentError, "user cannot contain /" if user.to_s.include? "/"
317
+ raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/"
318
+
319
+ "projects/#{project}/locations/#{location}/agent/environments/#{environment}/users/#{user}/sessions/#{session}/entityTypes/#{entity_type}"
320
+ end)
321
+ }
322
+
323
+ resource = resources[args.keys.sort.join(":")]
324
+ raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
325
+ resource.call(**args)
326
+ end
327
+
328
+ extend self
329
+ end
330
+ end
331
+ end
332
+ end
333
+ end
334
+ end
@@ -24,23 +24,7 @@ module Google
24
24
  module Dialogflow
25
25
  module V2
26
26
  module SessionEntityTypes
27
- # Entities are extracted from user input and represent parameters that are
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