google-cloud-dialogflow 0.15.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +397 -0
  6. data/README.md +35 -25
  7. data/lib/{google/cloud/dialogflow/v2/doc/google/protobuf/empty.rb → google-cloud-dialogflow.rb} +4 -14
  8. data/lib/google/cloud/dialogflow.rb +368 -506
  9. data/lib/google/cloud/dialogflow/version.rb +1 -1
  10. metadata +88 -83
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/dialogflow/v2.rb +0 -598
  13. data/lib/google/cloud/dialogflow/v2/agent_pb.rb +0 -121
  14. data/lib/google/cloud/dialogflow/v2/agent_services_pb.rb +0 -111
  15. data/lib/google/cloud/dialogflow/v2/agents_client.rb +0 -810
  16. data/lib/google/cloud/dialogflow/v2/agents_client_config.json +0 -71
  17. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +0 -96
  18. data/lib/google/cloud/dialogflow/v2/context_pb.rb +0 -63
  19. data/lib/google/cloud/dialogflow/v2/context_services_pb.rb +0 -75
  20. data/lib/google/cloud/dialogflow/v2/contexts_client.rb +0 -522
  21. data/lib/google/cloud/dialogflow/v2/contexts_client_config.json +0 -56
  22. data/lib/google/cloud/dialogflow/v2/credentials.rb +0 -42
  23. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/agent.rb +0 -247
  24. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/audio_config.rb +0 -341
  25. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/context.rb +0 -116
  26. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/entity_type.rb +0 -305
  27. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb +0 -937
  28. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session.rb +0 -498
  29. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/session_entity_type.rb +0 -130
  30. data/lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/validation_result.rb +0 -71
  31. data/lib/google/cloud/dialogflow/v2/doc/google/longrunning/operations.rb +0 -51
  32. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/any.rb +0 -131
  33. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/duration.rb +0 -91
  34. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/field_mask.rb +0 -222
  35. data/lib/google/cloud/dialogflow/v2/doc/google/protobuf/struct.rb +0 -74
  36. data/lib/google/cloud/dialogflow/v2/doc/google/rpc/status.rb +0 -39
  37. data/lib/google/cloud/dialogflow/v2/doc/google/type/latlng.rb +0 -31
  38. data/lib/google/cloud/dialogflow/v2/entity_type_pb.rb +0 -125
  39. data/lib/google/cloud/dialogflow/v2/entity_type_services_pb.rb +0 -105
  40. data/lib/google/cloud/dialogflow/v2/entity_types_client.rb +0 -997
  41. data/lib/google/cloud/dialogflow/v2/entity_types_client_config.json +0 -76
  42. data/lib/google/cloud/dialogflow/v2/intent_pb.rb +0 -367
  43. data/lib/google/cloud/dialogflow/v2/intent_services_pb.rb +0 -93
  44. data/lib/google/cloud/dialogflow/v2/intents_client.rb +0 -763
  45. data/lib/google/cloud/dialogflow/v2/intents_client_config.json +0 -61
  46. data/lib/google/cloud/dialogflow/v2/session_entity_type_pb.rb +0 -65
  47. data/lib/google/cloud/dialogflow/v2/session_entity_type_services_pb.rb +0 -93
  48. data/lib/google/cloud/dialogflow/v2/session_entity_types_client.rb +0 -507
  49. data/lib/google/cloud/dialogflow/v2/session_entity_types_client_config.json +0 -51
  50. data/lib/google/cloud/dialogflow/v2/session_pb.rb +0 -141
  51. data/lib/google/cloud/dialogflow/v2/session_services_pb.rb +0 -56
  52. data/lib/google/cloud/dialogflow/v2/sessions_client.rb +0 -340
  53. data/lib/google/cloud/dialogflow/v2/sessions_client_config.json +0 -36
  54. data/lib/google/cloud/dialogflow/v2/validation_result_pb.rb +0 -36
  55. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +0 -46
@@ -1,116 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Dialogflow
19
- module V2
20
- # Represents a context.
21
- # @!attribute [rw] name
22
- # @return [String]
23
- # Required. The unique identifier of the context. Format:
24
- # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
25
- #
26
- # The `Context ID` is always converted to lowercase, may only contain
27
- # characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
28
- #
29
- # The following context names are reserved for internal use by Dialogflow.
30
- # You should not use these contexts or create contexts with these names:
31
- #
32
- # * `__system_counters__`
33
- # * `*_id_dialog_context`
34
- # * `*_dialog_params_size`
35
- # @!attribute [rw] lifespan_count
36
- # @return [Integer]
37
- # Optional. The number of conversational query requests after which the
38
- # context expires. If set to `0` (the default) the context expires
39
- # immediately. Contexts expire automatically after 20 minutes if there
40
- # are no matching queries.
41
- # @!attribute [rw] parameters
42
- # @return [Google::Protobuf::Struct]
43
- # Optional. The collection of parameters associated with this context.
44
- # Refer to [this
45
- # doc](https://cloud.google.com/dialogflow/docs/intents-actions-parameters)
46
- # for syntax.
47
- class Context; end
48
-
49
- # The request message for {Google::Cloud::Dialogflow::V2::Contexts::ListContexts Contexts::ListContexts}.
50
- # @!attribute [rw] parent
51
- # @return [String]
52
- # Required. The session to list all contexts from.
53
- # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
54
- # @!attribute [rw] page_size
55
- # @return [Integer]
56
- # Optional. The maximum number of items to return in a single page. By
57
- # default 100 and at most 1000.
58
- # @!attribute [rw] page_token
59
- # @return [String]
60
- # Optional. The next_page_token value returned from a previous list request.
61
- class ListContextsRequest; end
62
-
63
- # The response message for {Google::Cloud::Dialogflow::V2::Contexts::ListContexts Contexts::ListContexts}.
64
- # @!attribute [rw] contexts
65
- # @return [Array<Google::Cloud::Dialogflow::V2::Context>]
66
- # The list of contexts. There will be a maximum number of items
67
- # returned based on the page_size field in the request.
68
- # @!attribute [rw] next_page_token
69
- # @return [String]
70
- # Token to retrieve the next page of results, or empty if there are no
71
- # more results in the list.
72
- class ListContextsResponse; end
73
-
74
- # The request message for {Google::Cloud::Dialogflow::V2::Contexts::GetContext Contexts::GetContext}.
75
- # @!attribute [rw] name
76
- # @return [String]
77
- # Required. The name of the context. Format:
78
- # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
79
- class GetContextRequest; end
80
-
81
- # The request message for {Google::Cloud::Dialogflow::V2::Contexts::CreateContext Contexts::CreateContext}.
82
- # @!attribute [rw] parent
83
- # @return [String]
84
- # Required. The session to create a context for.
85
- # Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
86
- # @!attribute [rw] context
87
- # @return [Google::Cloud::Dialogflow::V2::Context]
88
- # Required. The context to create.
89
- class CreateContextRequest; end
90
-
91
- # The request message for {Google::Cloud::Dialogflow::V2::Contexts::UpdateContext Contexts::UpdateContext}.
92
- # @!attribute [rw] context
93
- # @return [Google::Cloud::Dialogflow::V2::Context]
94
- # Required. The context to update.
95
- # @!attribute [rw] update_mask
96
- # @return [Google::Protobuf::FieldMask]
97
- # Optional. The mask to control which fields get updated.
98
- class UpdateContextRequest; end
99
-
100
- # The request message for {Google::Cloud::Dialogflow::V2::Contexts::DeleteContext Contexts::DeleteContext}.
101
- # @!attribute [rw] name
102
- # @return [String]
103
- # Required. The name of the context to delete. Format:
104
- # `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
105
- class DeleteContextRequest; end
106
-
107
- # The request message for {Google::Cloud::Dialogflow::V2::Contexts::DeleteAllContexts Contexts::DeleteAllContexts}.
108
- # @!attribute [rw] parent
109
- # @return [String]
110
- # Required. The name of the session to delete all contexts from. Format:
111
- # `projects/<Project ID>/agent/sessions/<Session ID>`.
112
- class DeleteAllContextsRequest; end
113
- end
114
- end
115
- end
116
- end
@@ -1,305 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Dialogflow
19
- module V2
20
- # Represents an entity type.
21
- # Entity types serve as a tool for extracting parameter values from natural
22
- # language queries.
23
- # @!attribute [rw] name
24
- # @return [String]
25
- # The unique identifier of the entity type.
26
- # Required for {Google::Cloud::Dialogflow::V2::EntityTypes::UpdateEntityType EntityTypes::UpdateEntityType} and
27
- # {Google::Cloud::Dialogflow::V2::EntityTypes::BatchUpdateEntityTypes EntityTypes::BatchUpdateEntityTypes} methods.
28
- # Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
29
- # @!attribute [rw] display_name
30
- # @return [String]
31
- # Required. The name of the entity type.
32
- # @!attribute [rw] kind
33
- # @return [Google::Cloud::Dialogflow::V2::EntityType::Kind]
34
- # Required. Indicates the kind of entity type.
35
- # @!attribute [rw] auto_expansion_mode
36
- # @return [Google::Cloud::Dialogflow::V2::EntityType::AutoExpansionMode]
37
- # Optional. Indicates whether the entity type can be automatically
38
- # expanded.
39
- # @!attribute [rw] entities
40
- # @return [Array<Google::Cloud::Dialogflow::V2::EntityType::Entity>]
41
- # Optional. The collection of entity entries associated with the entity type.
42
- # @!attribute [rw] enable_fuzzy_extraction
43
- # @return [true, false]
44
- # Optional. Enables fuzzy entity extraction during classification.
45
- class EntityType
46
- # An **entity entry** for an associated entity type.
47
- # @!attribute [rw] value
48
- # @return [String]
49
- # Required. The primary value associated with this entity entry.
50
- # For example, if the entity type is *vegetable*, the value could be
51
- # *scallions*.
52
- #
53
- # For `KIND_MAP` entity types:
54
- #
55
- # * A reference value to be used in place of synonyms.
56
- #
57
- # For `KIND_LIST` entity types:
58
- #
59
- # * A string that can contain references to other entity types (with or
60
- # without aliases).
61
- # @!attribute [rw] synonyms
62
- # @return [Array<String>]
63
- # Required. A collection of value synonyms. For example, if the entity type
64
- # is *vegetable*, and `value` is *scallions*, a synonym could be *green
65
- # onions*.
66
- #
67
- # For `KIND_LIST` entity types:
68
- #
69
- # * This collection must contain exactly one synonym equal to `value`.
70
- class Entity; end
71
-
72
- # Represents different entity type expansion modes. Automated expansion
73
- # allows an agent to recognize values that have not been explicitly listed in
74
- # the entity (for example, new kinds of shopping list items).
75
- module AutoExpansionMode
76
- # Auto expansion disabled for the entity.
77
- AUTO_EXPANSION_MODE_UNSPECIFIED = 0
78
-
79
- # Allows an agent to recognize values that have not been explicitly
80
- # listed in the entity.
81
- AUTO_EXPANSION_MODE_DEFAULT = 1
82
- end
83
-
84
- # Represents kinds of entities.
85
- module Kind
86
- # Not specified. This value should be never used.
87
- KIND_UNSPECIFIED = 0
88
-
89
- # Map entity types allow mapping of a group of synonyms to a reference
90
- # value.
91
- KIND_MAP = 1
92
-
93
- # List entity types contain a set of entries that do not map to reference
94
- # values. However, list entity types can contain references to other entity
95
- # types (with or without aliases).
96
- KIND_LIST = 2
97
-
98
- # Regexp entity types allow to specify regular expressions in entries
99
- # values.
100
- KIND_REGEXP = 3
101
- end
102
- end
103
-
104
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::ListEntityTypes EntityTypes::ListEntityTypes}.
105
- # @!attribute [rw] parent
106
- # @return [String]
107
- # Required. The agent to list all entity types from.
108
- # Format: `projects/<Project ID>/agent`.
109
- # @!attribute [rw] language_code
110
- # @return [String]
111
- # Optional. The language to list entity synonyms for. If not specified,
112
- # the agent's default language is used.
113
- # [Many
114
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
115
- # are supported. Note: languages must be enabled in the agent before they can
116
- # be used.
117
- # @!attribute [rw] page_size
118
- # @return [Integer]
119
- # Optional. The maximum number of items to return in a single page. By
120
- # default 100 and at most 1000.
121
- # @!attribute [rw] page_token
122
- # @return [String]
123
- # Optional. The next_page_token value returned from a previous list request.
124
- class ListEntityTypesRequest; end
125
-
126
- # The response message for {Google::Cloud::Dialogflow::V2::EntityTypes::ListEntityTypes EntityTypes::ListEntityTypes}.
127
- # @!attribute [rw] entity_types
128
- # @return [Array<Google::Cloud::Dialogflow::V2::EntityType>]
129
- # The list of agent entity types. There will be a maximum number of items
130
- # returned based on the page_size field in the request.
131
- # @!attribute [rw] next_page_token
132
- # @return [String]
133
- # Token to retrieve the next page of results, or empty if there are no
134
- # more results in the list.
135
- class ListEntityTypesResponse; end
136
-
137
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::GetEntityType EntityTypes::GetEntityType}.
138
- # @!attribute [rw] name
139
- # @return [String]
140
- # Required. The name of the entity type.
141
- # Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
142
- # @!attribute [rw] language_code
143
- # @return [String]
144
- # Optional. The language to retrieve entity synonyms for. If not specified,
145
- # the agent's default language is used.
146
- # [Many
147
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
148
- # are supported. Note: languages must be enabled in the agent before they can
149
- # be used.
150
- class GetEntityTypeRequest; end
151
-
152
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::CreateEntityType EntityTypes::CreateEntityType}.
153
- # @!attribute [rw] parent
154
- # @return [String]
155
- # Required. The agent to create a entity type for.
156
- # Format: `projects/<Project ID>/agent`.
157
- # @!attribute [rw] entity_type
158
- # @return [Google::Cloud::Dialogflow::V2::EntityType]
159
- # Required. The entity type to create.
160
- # @!attribute [rw] language_code
161
- # @return [String]
162
- # Optional. The language of entity synonyms defined in `entity_type`. If not
163
- # specified, the agent's default language is used.
164
- # [Many
165
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
166
- # are supported. Note: languages must be enabled in the agent before they can
167
- # be used.
168
- class CreateEntityTypeRequest; end
169
-
170
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::UpdateEntityType EntityTypes::UpdateEntityType}.
171
- # @!attribute [rw] entity_type
172
- # @return [Google::Cloud::Dialogflow::V2::EntityType]
173
- # Required. The entity type to update.
174
- # @!attribute [rw] language_code
175
- # @return [String]
176
- # Optional. The language of entity synonyms defined in `entity_type`. If not
177
- # specified, the agent's default language is used.
178
- # [Many
179
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
180
- # are supported. Note: languages must be enabled in the agent before they can
181
- # be used.
182
- # @!attribute [rw] update_mask
183
- # @return [Google::Protobuf::FieldMask]
184
- # Optional. The mask to control which fields get updated.
185
- class UpdateEntityTypeRequest; end
186
-
187
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::DeleteEntityType EntityTypes::DeleteEntityType}.
188
- # @!attribute [rw] name
189
- # @return [String]
190
- # Required. The name of the entity type to delete.
191
- # Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
192
- class DeleteEntityTypeRequest; end
193
-
194
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchUpdateEntityTypes EntityTypes::BatchUpdateEntityTypes}.
195
- # @!attribute [rw] parent
196
- # @return [String]
197
- # Required. The name of the agent to update or create entity types in.
198
- # Format: `projects/<Project ID>/agent`.
199
- # @!attribute [rw] entity_type_batch_uri
200
- # @return [String]
201
- # The URI to a Google Cloud Storage file containing entity types to update
202
- # or create. The file format can either be a serialized proto (of
203
- # EntityBatch type) or a JSON object. Note: The URI must start with
204
- # "gs://".
205
- # @!attribute [rw] entity_type_batch_inline
206
- # @return [Google::Cloud::Dialogflow::V2::EntityTypeBatch]
207
- # The collection of entity types to update or create.
208
- # @!attribute [rw] language_code
209
- # @return [String]
210
- # Optional. The language of entity synonyms defined in `entity_types`. If not
211
- # specified, the agent's default language is used.
212
- # [Many
213
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
214
- # are supported. Note: languages must be enabled in the agent before they can
215
- # be used.
216
- # @!attribute [rw] update_mask
217
- # @return [Google::Protobuf::FieldMask]
218
- # Optional. The mask to control which fields get updated.
219
- class BatchUpdateEntityTypesRequest; end
220
-
221
- # The response message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchUpdateEntityTypes EntityTypes::BatchUpdateEntityTypes}.
222
- # @!attribute [rw] entity_types
223
- # @return [Array<Google::Cloud::Dialogflow::V2::EntityType>]
224
- # The collection of updated or created entity types.
225
- class BatchUpdateEntityTypesResponse; end
226
-
227
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchDeleteEntityTypes EntityTypes::BatchDeleteEntityTypes}.
228
- # @!attribute [rw] parent
229
- # @return [String]
230
- # Required. The name of the agent to delete all entities types for. Format:
231
- # `projects/<Project ID>/agent`.
232
- # @!attribute [rw] entity_type_names
233
- # @return [Array<String>]
234
- # Required. The names entity types to delete. All names must point to the
235
- # same agent as `parent`.
236
- class BatchDeleteEntityTypesRequest; end
237
-
238
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchCreateEntities EntityTypes::BatchCreateEntities}.
239
- # @!attribute [rw] parent
240
- # @return [String]
241
- # Required. The name of the entity type to create entities in. Format:
242
- # `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
243
- # @!attribute [rw] entities
244
- # @return [Array<Google::Cloud::Dialogflow::V2::EntityType::Entity>]
245
- # Required. The entities to create.
246
- # @!attribute [rw] language_code
247
- # @return [String]
248
- # Optional. The language of entity synonyms defined in `entities`. If not
249
- # specified, the agent's default language is used.
250
- # [Many
251
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
252
- # are supported. Note: languages must be enabled in the agent before they can
253
- # be used.
254
- class BatchCreateEntitiesRequest; end
255
-
256
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchUpdateEntities EntityTypes::BatchUpdateEntities}.
257
- # @!attribute [rw] parent
258
- # @return [String]
259
- # Required. The name of the entity type to update or create entities in.
260
- # Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
261
- # @!attribute [rw] entities
262
- # @return [Array<Google::Cloud::Dialogflow::V2::EntityType::Entity>]
263
- # Required. The entities to update or create.
264
- # @!attribute [rw] language_code
265
- # @return [String]
266
- # Optional. The language of entity synonyms defined in `entities`. If not
267
- # specified, the agent's default language is used.
268
- # [Many
269
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
270
- # are supported. Note: languages must be enabled in the agent before they can
271
- # be used.
272
- # @!attribute [rw] update_mask
273
- # @return [Google::Protobuf::FieldMask]
274
- # Optional. The mask to control which fields get updated.
275
- class BatchUpdateEntitiesRequest; end
276
-
277
- # The request message for {Google::Cloud::Dialogflow::V2::EntityTypes::BatchDeleteEntities EntityTypes::BatchDeleteEntities}.
278
- # @!attribute [rw] parent
279
- # @return [String]
280
- # Required. The name of the entity type to delete entries for. Format:
281
- # `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
282
- # @!attribute [rw] entity_values
283
- # @return [Array<String>]
284
- # Required. The reference `values` of the entities to delete. Note that
285
- # these are not fully-qualified names, i.e. they don't start with
286
- # `projects/<Project ID>`.
287
- # @!attribute [rw] language_code
288
- # @return [String]
289
- # Optional. The language of entity synonyms defined in `entities`. If not
290
- # specified, the agent's default language is used.
291
- # [Many
292
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
293
- # are supported. Note: languages must be enabled in the agent before they can
294
- # be used.
295
- class BatchDeleteEntitiesRequest; end
296
-
297
- # This message is a wrapper around a collection of entity types.
298
- # @!attribute [rw] entity_types
299
- # @return [Array<Google::Cloud::Dialogflow::V2::EntityType>]
300
- # A collection of entity types.
301
- class EntityTypeBatch; end
302
- end
303
- end
304
- end
305
- end
@@ -1,937 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Dialogflow
19
- module V2
20
- # Represents an intent.
21
- # Intents convert a number of user expressions or patterns into an action. An
22
- # action is an extraction of a user command or sentence semantics.
23
- # @!attribute [rw] name
24
- # @return [String]
25
- # The unique identifier of this intent.
26
- # Required for {Google::Cloud::Dialogflow::V2::Intents::UpdateIntent Intents::UpdateIntent} and {Google::Cloud::Dialogflow::V2::Intents::BatchUpdateIntents Intents::BatchUpdateIntents}
27
- # methods.
28
- # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
29
- # @!attribute [rw] display_name
30
- # @return [String]
31
- # Required. The name of this intent.
32
- # @!attribute [rw] webhook_state
33
- # @return [Google::Cloud::Dialogflow::V2::Intent::WebhookState]
34
- # Optional. Indicates whether webhooks are enabled for the intent.
35
- # @!attribute [rw] priority
36
- # @return [Integer]
37
- # Optional. The priority of this intent. Higher numbers represent higher
38
- # priorities.
39
- #
40
- # * If the supplied value is unspecified or 0, the service
41
- # translates the value to 500,000, which corresponds to the
42
- # `Normal` priority in the console.
43
- # * If the supplied value is negative, the intent is ignored
44
- # in runtime detect intent requests.
45
- # @!attribute [rw] is_fallback
46
- # @return [true, false]
47
- # Optional. Indicates whether this is a fallback intent.
48
- # @!attribute [rw] ml_disabled
49
- # @return [true, false]
50
- # Optional. Indicates whether Machine Learning is disabled for the intent.
51
- # Note: If `ml_disabled` setting is set to true, then this intent is not
52
- # taken into account during inference in `ML ONLY` match mode. Also,
53
- # auto-markup in the UI is turned off.
54
- # @!attribute [rw] input_context_names
55
- # @return [Array<String>]
56
- # Optional. The list of context names required for this intent to be
57
- # triggered.
58
- # Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
59
- # @!attribute [rw] events
60
- # @return [Array<String>]
61
- # Optional. The collection of event names that trigger the intent.
62
- # If the collection of input contexts is not empty, all of the contexts must
63
- # be present in the active user session for an event to trigger this intent.
64
- # @!attribute [rw] training_phrases
65
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase>]
66
- # Optional. The collection of examples that the agent is
67
- # trained on.
68
- # @!attribute [rw] action
69
- # @return [String]
70
- # Optional. The name of the action associated with the intent.
71
- # Note: The action name must not contain whitespaces.
72
- # @!attribute [rw] output_contexts
73
- # @return [Array<Google::Cloud::Dialogflow::V2::Context>]
74
- # Optional. The collection of contexts that are activated when the intent
75
- # is matched. Context messages in this collection should not set the
76
- # parameters field. Setting the `lifespan_count` to 0 will reset the context
77
- # when the intent is matched.
78
- # Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
79
- # @!attribute [rw] reset_contexts
80
- # @return [true, false]
81
- # Optional. Indicates whether to delete all contexts in the current
82
- # session when this intent is matched.
83
- # @!attribute [rw] parameters
84
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Parameter>]
85
- # Optional. The collection of parameters associated with the intent.
86
- # @!attribute [rw] messages
87
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message>]
88
- # Optional. The collection of rich messages corresponding to the
89
- # `Response` field in the Dialogflow console.
90
- # @!attribute [rw] default_response_platforms
91
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Platform>]
92
- # Optional. The list of platforms for which the first responses will be
93
- # copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
94
- # @!attribute [rw] root_followup_intent_name
95
- # @return [String]
96
- # Read-only. The unique identifier of the root intent in the chain of
97
- # followup intents. It identifies the correct followup intents chain for
98
- # this intent. We populate this field only in the output.
99
- #
100
- # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
101
- # @!attribute [rw] parent_followup_intent_name
102
- # @return [String]
103
- # Read-only after creation. The unique identifier of the parent intent in the
104
- # chain of followup intents. You can set this field when creating an intent,
105
- # for example with {Google::Cloud::Dialogflow::V2::Intents::CreateIntent CreateIntent} or
106
- # {Google::Cloud::Dialogflow::V2::Intents::BatchUpdateIntents BatchUpdateIntents}, in order to make this
107
- # intent a followup intent.
108
- #
109
- # It identifies the parent followup intent.
110
- # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
111
- # @!attribute [rw] followup_intent_info
112
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::FollowupIntentInfo>]
113
- # Read-only. Information about all followup intents that have this intent as
114
- # a direct or indirect parent. We populate this field only in the output.
115
- class Intent
116
- # Represents an example that the agent is trained on.
117
- # @!attribute [rw] name
118
- # @return [String]
119
- # Output only. The unique identifier of this training phrase.
120
- # @!attribute [rw] type
121
- # @return [Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Type]
122
- # Required. The type of the training phrase.
123
- # @!attribute [rw] parts
124
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part>]
125
- # Required. The ordered list of training phrase parts.
126
- # The parts are concatenated in order to form the training phrase.
127
- #
128
- # Note: The API does not automatically annotate training phrases like the
129
- # Dialogflow Console does.
130
- #
131
- # Note: Do not forget to include whitespace at part boundaries,
132
- # so the training phrase is well formatted when the parts are concatenated.
133
- #
134
- # If the training phrase does not need to be annotated with parameters,
135
- # you just need a single part with only the {Google::Cloud::Dialogflow::V2::Intent::TrainingPhrase::Part#text Part#text} field set.
136
- #
137
- # If you want to annotate the training phrase, you must create multiple
138
- # parts, where the fields of each part are populated in one of two ways:
139
- #
140
- # * `Part.text` is set to a part of the phrase that has no parameters.
141
- # * `Part.text` is set to a part of the phrase that you want to annotate,
142
- # and the `entity_type`, `alias`, and `user_defined` fields are all
143
- # set.
144
- # @!attribute [rw] times_added_count
145
- # @return [Integer]
146
- # Optional. Indicates how many times this example was added to
147
- # the intent. Each time a developer adds an existing sample by editing an
148
- # intent or training, this counter is increased.
149
- class TrainingPhrase
150
- # Represents a part of a training phrase.
151
- # @!attribute [rw] text
152
- # @return [String]
153
- # Required. The text for this part.
154
- # @!attribute [rw] entity_type
155
- # @return [String]
156
- # Optional. The entity type name prefixed with `@`.
157
- # This field is required for annotated parts of the training phrase.
158
- # @!attribute [rw] alias
159
- # @return [String]
160
- # Optional. The parameter name for the value extracted from the
161
- # annotated part of the example.
162
- # This field is required for annotated parts of the training phrase.
163
- # @!attribute [rw] user_defined
164
- # @return [true, false]
165
- # Optional. Indicates whether the text was manually annotated.
166
- # This field is set to true when the Dialogflow Console is used to
167
- # manually annotate the part. When creating an annotated part with the
168
- # API, you must set this to true.
169
- class Part; end
170
-
171
- # Represents different types of training phrases.
172
- module Type
173
- # Not specified. This value should never be used.
174
- TYPE_UNSPECIFIED = 0
175
-
176
- # Examples do not contain @-prefixed entity type names, but example parts
177
- # can be annotated with entity types.
178
- EXAMPLE = 1
179
-
180
- # Templates are not annotated with entity types, but they can contain
181
- # @-prefixed entity type names as substrings.
182
- # Template mode has been deprecated. Example mode is the only supported
183
- # way to create new training phrases. If you have existing training
184
- # phrases that you've created in template mode, those will continue to
185
- # work.
186
- TEMPLATE = 2
187
- end
188
- end
189
-
190
- # Represents intent parameters.
191
- # @!attribute [rw] name
192
- # @return [String]
193
- # The unique identifier of this parameter.
194
- # @!attribute [rw] display_name
195
- # @return [String]
196
- # Required. The name of the parameter.
197
- # @!attribute [rw] value
198
- # @return [String]
199
- # Optional. The definition of the parameter value. It can be:
200
- # * a constant string,
201
- # * a parameter value defined as `$parameter_name`,
202
- # * an original parameter value defined as `$parameter_name.original`,
203
- # * a parameter value from some context defined as
204
- # `#context_name.parameter_name`.
205
- # @!attribute [rw] default_value
206
- # @return [String]
207
- # Optional. The default value to use when the `value` yields an empty
208
- # result.
209
- # Default values can be extracted from contexts by using the following
210
- # syntax: `#context_name.parameter_name`.
211
- # @!attribute [rw] entity_type_display_name
212
- # @return [String]
213
- # Optional. The name of the entity type, prefixed with `@`, that
214
- # describes values of the parameter. If the parameter is
215
- # required, this must be provided.
216
- # @!attribute [rw] mandatory
217
- # @return [true, false]
218
- # Optional. Indicates whether the parameter is required. That is,
219
- # whether the intent cannot be completed without collecting the parameter
220
- # value.
221
- # @!attribute [rw] prompts
222
- # @return [Array<String>]
223
- # Optional. The collection of prompts that the agent can present to the
224
- # user in order to collect a value for the parameter.
225
- # @!attribute [rw] is_list
226
- # @return [true, false]
227
- # Optional. Indicates whether the parameter represents a list of values.
228
- class Parameter; end
229
-
230
- # Corresponds to the `Response` field in the Dialogflow console.
231
- # @!attribute [rw] text
232
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Text]
233
- # The text response.
234
- # @!attribute [rw] image
235
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
236
- # The image response.
237
- # @!attribute [rw] quick_replies
238
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::QuickReplies]
239
- # The quick replies response.
240
- # @!attribute [rw] card
241
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Card]
242
- # The card response.
243
- # @!attribute [rw] payload
244
- # @return [Google::Protobuf::Struct]
245
- # Returns a response containing a custom, platform-specific payload.
246
- # See the Intent.Message.Platform type for a description of the
247
- # structure that may be required for your platform.
248
- # @!attribute [rw] simple_responses
249
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponses]
250
- # The voice and text-only responses for Actions on Google.
251
- # @!attribute [rw] basic_card
252
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard]
253
- # The basic card response for Actions on Google.
254
- # @!attribute [rw] suggestions
255
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Suggestions]
256
- # The suggestion chips for Actions on Google.
257
- # @!attribute [rw] link_out_suggestion
258
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::LinkOutSuggestion]
259
- # The link out suggestion chip for Actions on Google.
260
- # @!attribute [rw] list_select
261
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect]
262
- # The list card response for Actions on Google.
263
- # @!attribute [rw] carousel_select
264
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect]
265
- # The carousel card response for Actions on Google.
266
- # @!attribute [rw] browse_carousel_card
267
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard]
268
- # Browse carousel card for Actions on Google.
269
- # @!attribute [rw] table_card
270
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::TableCard]
271
- # Table card for Actions on Google.
272
- # @!attribute [rw] media_content
273
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::MediaContent]
274
- # The media content card for Actions on Google.
275
- # @!attribute [rw] platform
276
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Platform]
277
- # Optional. The platform that this message is intended for.
278
- class Message
279
- # The text response message.
280
- # @!attribute [rw] text
281
- # @return [Array<String>]
282
- # Optional. The collection of the agent's responses.
283
- class Text; end
284
-
285
- # The image response message.
286
- # @!attribute [rw] image_uri
287
- # @return [String]
288
- # Optional. The public URI to an image file.
289
- # @!attribute [rw] accessibility_text
290
- # @return [String]
291
- # Optional. A text description of the image to be used for accessibility,
292
- # e.g., screen readers.
293
- class Image; end
294
-
295
- # The quick replies response message.
296
- # @!attribute [rw] title
297
- # @return [String]
298
- # Optional. The title of the collection of quick replies.
299
- # @!attribute [rw] quick_replies
300
- # @return [Array<String>]
301
- # Optional. The collection of quick replies.
302
- class QuickReplies; end
303
-
304
- # The card response message.
305
- # @!attribute [rw] title
306
- # @return [String]
307
- # Optional. The title of the card.
308
- # @!attribute [rw] subtitle
309
- # @return [String]
310
- # Optional. The subtitle of the card.
311
- # @!attribute [rw] image_uri
312
- # @return [String]
313
- # Optional. The public URI to an image file for the card.
314
- # @!attribute [rw] buttons
315
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Card::Button>]
316
- # Optional. The collection of card buttons.
317
- class Card
318
- # Contains information about a button.
319
- # @!attribute [rw] text
320
- # @return [String]
321
- # Optional. The text to show on the button.
322
- # @!attribute [rw] postback
323
- # @return [String]
324
- # Optional. The text to send back to the Dialogflow API or a URI to
325
- # open.
326
- class Button; end
327
- end
328
-
329
- # The simple response message containing speech or text.
330
- # @!attribute [rw] text_to_speech
331
- # @return [String]
332
- # One of text_to_speech or ssml must be provided. The plain text of the
333
- # speech output. Mutually exclusive with ssml.
334
- # @!attribute [rw] ssml
335
- # @return [String]
336
- # One of text_to_speech or ssml must be provided. Structured spoken
337
- # response to the user in the SSML format. Mutually exclusive with
338
- # text_to_speech.
339
- # @!attribute [rw] display_text
340
- # @return [String]
341
- # Optional. The text to display.
342
- class SimpleResponse; end
343
-
344
- # The collection of simple response candidates.
345
- # This message in `QueryResult.fulfillment_messages` and
346
- # `WebhookResponse.fulfillment_messages` should contain only one
347
- # `SimpleResponse`.
348
- # @!attribute [rw] simple_responses
349
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::SimpleResponse>]
350
- # Required. The list of simple responses.
351
- class SimpleResponses; end
352
-
353
- # The basic card message. Useful for displaying information.
354
- # @!attribute [rw] title
355
- # @return [String]
356
- # Optional. The title of the card.
357
- # @!attribute [rw] subtitle
358
- # @return [String]
359
- # Optional. The subtitle of the card.
360
- # @!attribute [rw] formatted_text
361
- # @return [String]
362
- # Required, unless image is present. The body text of the card.
363
- # @!attribute [rw] image
364
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
365
- # Optional. The image for the card.
366
- # @!attribute [rw] buttons
367
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>]
368
- # Optional. The collection of card buttons.
369
- class BasicCard
370
- # The button object that appears at the bottom of a card.
371
- # @!attribute [rw] title
372
- # @return [String]
373
- # Required. The title of the button.
374
- # @!attribute [rw] open_uri_action
375
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button::OpenUriAction]
376
- # Required. Action to take when a user taps on the button.
377
- class Button
378
- # Opens the given URI.
379
- # @!attribute [rw] uri
380
- # @return [String]
381
- # Required. The HTTP or HTTPS scheme URI.
382
- class OpenUriAction; end
383
- end
384
- end
385
-
386
- # The suggestion chip message that the user can tap to quickly post a reply
387
- # to the conversation.
388
- # @!attribute [rw] title
389
- # @return [String]
390
- # Required. The text shown the in the suggestion chip.
391
- class Suggestion; end
392
-
393
- # The collection of suggestions.
394
- # @!attribute [rw] suggestions
395
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::Suggestion>]
396
- # Required. The list of suggested replies.
397
- class Suggestions; end
398
-
399
- # The suggestion chip message that allows the user to jump out to the app
400
- # or website associated with this agent.
401
- # @!attribute [rw] destination_name
402
- # @return [String]
403
- # Required. The name of the app or site this chip is linking to.
404
- # @!attribute [rw] uri
405
- # @return [String]
406
- # Required. The URI of the app or site to open when the user taps the
407
- # suggestion chip.
408
- class LinkOutSuggestion; end
409
-
410
- # The card for presenting a list of options to select from.
411
- # @!attribute [rw] title
412
- # @return [String]
413
- # Optional. The overall title of the list.
414
- # @!attribute [rw] items
415
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ListSelect::Item>]
416
- # Required. List items.
417
- # @!attribute [rw] subtitle
418
- # @return [String]
419
- # Optional. Subtitle of the list.
420
- class ListSelect
421
- # An item in the list.
422
- # @!attribute [rw] info
423
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo]
424
- # Required. Additional information about this option.
425
- # @!attribute [rw] title
426
- # @return [String]
427
- # Required. The title of the list item.
428
- # @!attribute [rw] description
429
- # @return [String]
430
- # Optional. The main text describing the item.
431
- # @!attribute [rw] image
432
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
433
- # Optional. The image to display.
434
- class Item; end
435
- end
436
-
437
- # The card for presenting a carousel of options to select from.
438
- # @!attribute [rw] items
439
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::CarouselSelect::Item>]
440
- # Required. Carousel items.
441
- class CarouselSelect
442
- # An item in the carousel.
443
- # @!attribute [rw] info
444
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::SelectItemInfo]
445
- # Required. Additional info about the option item.
446
- # @!attribute [rw] title
447
- # @return [String]
448
- # Required. Title of the carousel item.
449
- # @!attribute [rw] description
450
- # @return [String]
451
- # Optional. The body text of the card.
452
- # @!attribute [rw] image
453
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
454
- # Optional. The image to display.
455
- class Item; end
456
- end
457
-
458
- # Additional info about the select item for when it is triggered in a
459
- # dialog.
460
- # @!attribute [rw] key
461
- # @return [String]
462
- # Required. A unique key that will be sent back to the agent if this
463
- # response is given.
464
- # @!attribute [rw] synonyms
465
- # @return [Array<String>]
466
- # Optional. A list of synonyms that can also be used to trigger this
467
- # item in dialog.
468
- class SelectItemInfo; end
469
-
470
- # The media content card for Actions on Google.
471
- # @!attribute [rw] media_type
472
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::MediaContent::ResponseMediaType]
473
- # Optional. What type of media is the content (ie "audio").
474
- # @!attribute [rw] media_objects
475
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::MediaContent::ResponseMediaObject>]
476
- # Required. List of media objects.
477
- class MediaContent
478
- # Response media object for media content card.
479
- # @!attribute [rw] name
480
- # @return [String]
481
- # Required. Name of media card.
482
- # @!attribute [rw] description
483
- # @return [String]
484
- # Optional. Description of media card.
485
- # @!attribute [rw] large_image
486
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
487
- # Optional. Image to display above media content.
488
- # @!attribute [rw] icon
489
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
490
- # Optional. Icon to display above media content.
491
- # @!attribute [rw] content_url
492
- # @return [String]
493
- # Required. Url where the media is stored.
494
- class ResponseMediaObject; end
495
-
496
- # Format of response media type.
497
- module ResponseMediaType
498
- # Unspecified.
499
- RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0
500
-
501
- # Response media type is audio.
502
- AUDIO = 1
503
- end
504
- end
505
-
506
- # Browse Carousel Card for Actions on Google.
507
- # https://developers.google.com/actions/assistant/responses#browsing_carousel
508
- # @!attribute [rw] items
509
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::BrowseCarouselCardItem>]
510
- # Required. List of items in the Browse Carousel Card. Minimum of two
511
- # items, maximum of ten.
512
- # @!attribute [rw] image_display_options
513
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::ImageDisplayOptions]
514
- # Optional. Settings for displaying the image. Applies to every image in
515
- # {Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard#items items}.
516
- class BrowseCarouselCard
517
- # Browsing carousel tile
518
- # @!attribute [rw] open_uri_action
519
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::BrowseCarouselCardItem::OpenUrlAction]
520
- # Required. Action to present to the user.
521
- # @!attribute [rw] title
522
- # @return [String]
523
- # Required. Title of the carousel item. Maximum of two lines of text.
524
- # @!attribute [rw] description
525
- # @return [String]
526
- # Optional. Description of the carousel item. Maximum of four lines of
527
- # text.
528
- # @!attribute [rw] image
529
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
530
- # Optional. Hero image for the carousel item.
531
- # @!attribute [rw] footer
532
- # @return [String]
533
- # Optional. Text that appears at the bottom of the Browse Carousel
534
- # Card. Maximum of one line of text.
535
- class BrowseCarouselCardItem
536
- # Actions on Google action to open a given url.
537
- # @!attribute [rw] url
538
- # @return [String]
539
- # Required. URL
540
- # @!attribute [rw] url_type_hint
541
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::BrowseCarouselCardItem::OpenUrlAction::UrlTypeHint]
542
- # Optional. Specifies the type of viewer that is used when opening
543
- # the URL. Defaults to opening via web browser.
544
- class OpenUrlAction
545
- # Type of the URI.
546
- module UrlTypeHint
547
- # Unspecified
548
- URL_TYPE_HINT_UNSPECIFIED = 0
549
-
550
- # Url would be an amp action
551
- AMP_ACTION = 1
552
-
553
- # URL that points directly to AMP content, or to a canonical URL
554
- # which refers to AMP content via <link rel="amphtml">.
555
- AMP_CONTENT = 2
556
- end
557
- end
558
- end
559
-
560
- # Image display options for Actions on Google. This should be used for
561
- # when the image's aspect ratio does not match the image container's
562
- # aspect ratio.
563
- module ImageDisplayOptions
564
- # Fill the gaps between the image and the image container with gray
565
- # bars.
566
- IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0
567
-
568
- # Fill the gaps between the image and the image container with gray
569
- # bars.
570
- GRAY = 1
571
-
572
- # Fill the gaps between the image and the image container with white
573
- # bars.
574
- WHITE = 2
575
-
576
- # Image is scaled such that the image width and height match or exceed
577
- # the container dimensions. This may crop the top and bottom of the
578
- # image if the scaled image height is greater than the container
579
- # height, or crop the left and right of the image if the scaled image
580
- # width is greater than the container width. This is similar to "Zoom
581
- # Mode" on a widescreen TV when playing a 4:3 video.
582
- CROPPED = 3
583
-
584
- # Pad the gaps between image and image frame with a blurred copy of the
585
- # same image.
586
- BLURRED_BACKGROUND = 4
587
- end
588
- end
589
-
590
- # Table card for Actions on Google.
591
- # @!attribute [rw] title
592
- # @return [String]
593
- # Required. Title of the card.
594
- # @!attribute [rw] subtitle
595
- # @return [String]
596
- # Optional. Subtitle to the title.
597
- # @!attribute [rw] image
598
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
599
- # Optional. Image which should be displayed on the card.
600
- # @!attribute [rw] column_properties
601
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::ColumnProperties>]
602
- # Optional. Display properties for the columns in this table.
603
- # @!attribute [rw] rows
604
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::TableCardRow>]
605
- # Optional. Rows in this table of data.
606
- # @!attribute [rw] buttons
607
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::BasicCard::Button>]
608
- # Optional. List of buttons for the card.
609
- class TableCard; end
610
-
611
- # Column properties for {Google::Cloud::Dialogflow::V2::Intent::Message::TableCard TableCard}.
612
- # @!attribute [rw] header
613
- # @return [String]
614
- # Required. Column heading.
615
- # @!attribute [rw] horizontal_alignment
616
- # @return [Google::Cloud::Dialogflow::V2::Intent::Message::ColumnProperties::HorizontalAlignment]
617
- # Optional. Defines text alignment for all cells in this column.
618
- class ColumnProperties
619
- # Text alignments within a cell.
620
- module HorizontalAlignment
621
- # Text is aligned to the leading edge of the column.
622
- HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0
623
-
624
- # Text is aligned to the leading edge of the column.
625
- LEADING = 1
626
-
627
- # Text is centered in the column.
628
- CENTER = 2
629
-
630
- # Text is aligned to the trailing edge of the column.
631
- TRAILING = 3
632
- end
633
- end
634
-
635
- # Row of {Google::Cloud::Dialogflow::V2::Intent::Message::TableCard TableCard}.
636
- # @!attribute [rw] cells
637
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent::Message::TableCardCell>]
638
- # Optional. List of cells that make up this row.
639
- # @!attribute [rw] divider_after
640
- # @return [true, false]
641
- # Optional. Whether to add a visual divider after this row.
642
- class TableCardRow; end
643
-
644
- # Cell of {Google::Cloud::Dialogflow::V2::Intent::Message::TableCardRow TableCardRow}.
645
- # @!attribute [rw] text
646
- # @return [String]
647
- # Required. Text in this cell.
648
- class TableCardCell; end
649
-
650
- # Represents different platforms that a rich message can be intended for.
651
- module Platform
652
- # Not specified.
653
- PLATFORM_UNSPECIFIED = 0
654
-
655
- # Facebook.
656
- FACEBOOK = 1
657
-
658
- # Slack.
659
- SLACK = 2
660
-
661
- # Telegram.
662
- TELEGRAM = 3
663
-
664
- # Kik.
665
- KIK = 4
666
-
667
- # Skype.
668
- SKYPE = 5
669
-
670
- # Line.
671
- LINE = 6
672
-
673
- # Viber.
674
- VIBER = 7
675
-
676
- # Actions on Google.
677
- # When using Actions on Google, you can choose one of the specific
678
- # Intent.Message types that mention support for Actions on Google,
679
- # or you can use the advanced Intent.Message.payload field.
680
- # The payload field provides access to AoG features not available in the
681
- # specific message types.
682
- # If using the Intent.Message.payload field, it should have a structure
683
- # similar to the JSON message shown here. For more information, see
684
- # [Actions on Google Webhook
685
- # Format](https://developers.google.com/actions/dialogflow/webhook)
686
- # <pre>{
687
- # "expectUserResponse": true,
688
- # "isSsml": false,
689
- # "noInputPrompts": [],
690
- # "richResponse": {
691
- # "items": [
692
- # {
693
- # "simpleResponse": {
694
- # "displayText": "hi",
695
- # "textToSpeech": "hello"
696
- # }
697
- # }
698
- # ],
699
- # "suggestions": [
700
- # {
701
- # "title": "Say this"
702
- # },
703
- # {
704
- # "title": "or this"
705
- # }
706
- # ]
707
- # },
708
- # "systemIntent": {
709
- # "data": {
710
- # "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
711
- # "listSelect": {
712
- # "items": [
713
- # {
714
- # "optionInfo": {
715
- # "key": "key1",
716
- # "synonyms": [
717
- # "key one"
718
- # ]
719
- # },
720
- # "title": "must not be empty, but unique"
721
- # },
722
- # {
723
- # "optionInfo": {
724
- # "key": "key2",
725
- # "synonyms": [
726
- # "key two"
727
- # ]
728
- # },
729
- # "title": "must not be empty, but unique"
730
- # }
731
- # ]
732
- # }
733
- # },
734
- # "intent": "actions.intent.OPTION"
735
- # }
736
- # }</pre>
737
- ACTIONS_ON_GOOGLE = 8
738
-
739
- # Google Hangouts.
740
- GOOGLE_HANGOUTS = 11
741
- end
742
- end
743
-
744
- # Represents a single followup intent in the chain.
745
- # @!attribute [rw] followup_intent_name
746
- # @return [String]
747
- # The unique identifier of the followup intent.
748
- # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
749
- # @!attribute [rw] parent_followup_intent_name
750
- # @return [String]
751
- # The unique identifier of the followup intent's parent.
752
- # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
753
- class FollowupIntentInfo; end
754
-
755
- # Represents the different states that webhooks can be in.
756
- module WebhookState
757
- # Webhook is disabled in the agent and in the intent.
758
- WEBHOOK_STATE_UNSPECIFIED = 0
759
-
760
- # Webhook is enabled in the agent and in the intent.
761
- WEBHOOK_STATE_ENABLED = 1
762
-
763
- # Webhook is enabled in the agent and in the intent. Also, each slot
764
- # filling prompt is forwarded to the webhook.
765
- WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2
766
- end
767
- end
768
-
769
- # The request message for {Google::Cloud::Dialogflow::V2::Intents::ListIntents Intents::ListIntents}.
770
- # @!attribute [rw] parent
771
- # @return [String]
772
- # Required. The agent to list all intents from.
773
- # Format: `projects/<Project ID>/agent`.
774
- # @!attribute [rw] language_code
775
- # @return [String]
776
- # Optional. The language to list training phrases, parameters and rich
777
- # messages for. If not specified, the agent's default language is used.
778
- # [Many
779
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
780
- # are supported. Note: languages must be enabled in the agent before they can
781
- # be used.
782
- # @!attribute [rw] intent_view
783
- # @return [Google::Cloud::Dialogflow::V2::IntentView]
784
- # Optional. The resource view to apply to the returned intent.
785
- # @!attribute [rw] page_size
786
- # @return [Integer]
787
- # Optional. The maximum number of items to return in a single page. By
788
- # default 100 and at most 1000.
789
- # @!attribute [rw] page_token
790
- # @return [String]
791
- # Optional. The next_page_token value returned from a previous list request.
792
- class ListIntentsRequest; end
793
-
794
- # The response message for {Google::Cloud::Dialogflow::V2::Intents::ListIntents Intents::ListIntents}.
795
- # @!attribute [rw] intents
796
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent>]
797
- # The list of agent intents. There will be a maximum number of items
798
- # returned based on the page_size field in the request.
799
- # @!attribute [rw] next_page_token
800
- # @return [String]
801
- # Token to retrieve the next page of results, or empty if there are no
802
- # more results in the list.
803
- class ListIntentsResponse; end
804
-
805
- # The request message for {Google::Cloud::Dialogflow::V2::Intents::GetIntent Intents::GetIntent}.
806
- # @!attribute [rw] name
807
- # @return [String]
808
- # Required. The name of the intent.
809
- # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
810
- # @!attribute [rw] language_code
811
- # @return [String]
812
- # Optional. The language to retrieve training phrases, parameters and rich
813
- # messages for. If not specified, the agent's default language is used.
814
- # [Many
815
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
816
- # are supported. Note: languages must be enabled in the agent before they can
817
- # be used.
818
- # @!attribute [rw] intent_view
819
- # @return [Google::Cloud::Dialogflow::V2::IntentView]
820
- # Optional. The resource view to apply to the returned intent.
821
- class GetIntentRequest; end
822
-
823
- # The request message for {Google::Cloud::Dialogflow::V2::Intents::CreateIntent Intents::CreateIntent}.
824
- # @!attribute [rw] parent
825
- # @return [String]
826
- # Required. The agent to create a intent for.
827
- # Format: `projects/<Project ID>/agent`.
828
- # @!attribute [rw] intent
829
- # @return [Google::Cloud::Dialogflow::V2::Intent]
830
- # Required. The intent to create.
831
- # @!attribute [rw] language_code
832
- # @return [String]
833
- # Optional. The language of training phrases, parameters and rich messages
834
- # defined in `intent`. If not specified, the agent's default language is
835
- # used. [Many
836
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
837
- # are supported. Note: languages must be enabled in the agent before they can
838
- # be used.
839
- # @!attribute [rw] intent_view
840
- # @return [Google::Cloud::Dialogflow::V2::IntentView]
841
- # Optional. The resource view to apply to the returned intent.
842
- class CreateIntentRequest; end
843
-
844
- # The request message for {Google::Cloud::Dialogflow::V2::Intents::UpdateIntent Intents::UpdateIntent}.
845
- # @!attribute [rw] intent
846
- # @return [Google::Cloud::Dialogflow::V2::Intent]
847
- # Required. The intent to update.
848
- # @!attribute [rw] language_code
849
- # @return [String]
850
- # Optional. The language of training phrases, parameters and rich messages
851
- # defined in `intent`. If not specified, the agent's default language is
852
- # used. [Many
853
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
854
- # are supported. Note: languages must be enabled in the agent before they can
855
- # be used.
856
- # @!attribute [rw] update_mask
857
- # @return [Google::Protobuf::FieldMask]
858
- # Optional. The mask to control which fields get updated.
859
- # @!attribute [rw] intent_view
860
- # @return [Google::Cloud::Dialogflow::V2::IntentView]
861
- # Optional. The resource view to apply to the returned intent.
862
- class UpdateIntentRequest; end
863
-
864
- # The request message for {Google::Cloud::Dialogflow::V2::Intents::DeleteIntent Intents::DeleteIntent}.
865
- # @!attribute [rw] name
866
- # @return [String]
867
- # Required. The name of the intent to delete. If this intent has direct or
868
- # indirect followup intents, we also delete them.
869
- # Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
870
- class DeleteIntentRequest; end
871
-
872
- # The request message for {Google::Cloud::Dialogflow::V2::Intents::BatchUpdateIntents Intents::BatchUpdateIntents}.
873
- # @!attribute [rw] parent
874
- # @return [String]
875
- # Required. The name of the agent to update or create intents in.
876
- # Format: `projects/<Project ID>/agent`.
877
- # @!attribute [rw] intent_batch_uri
878
- # @return [String]
879
- # The URI to a Google Cloud Storage file containing intents to update or
880
- # create. The file format can either be a serialized proto (of IntentBatch
881
- # type) or JSON object. Note: The URI must start with "gs://".
882
- # @!attribute [rw] intent_batch_inline
883
- # @return [Google::Cloud::Dialogflow::V2::IntentBatch]
884
- # The collection of intents to update or create.
885
- # @!attribute [rw] language_code
886
- # @return [String]
887
- # Optional. The language of training phrases, parameters and rich messages
888
- # defined in `intents`. If not specified, the agent's default language is
889
- # used. [Many
890
- # languages](https://cloud.google.com/dialogflow/docs/reference/language)
891
- # are supported. Note: languages must be enabled in the agent before they can
892
- # be used.
893
- # @!attribute [rw] update_mask
894
- # @return [Google::Protobuf::FieldMask]
895
- # Optional. The mask to control which fields get updated.
896
- # @!attribute [rw] intent_view
897
- # @return [Google::Cloud::Dialogflow::V2::IntentView]
898
- # Optional. The resource view to apply to the returned intent.
899
- class BatchUpdateIntentsRequest; end
900
-
901
- # The response message for {Google::Cloud::Dialogflow::V2::Intents::BatchUpdateIntents Intents::BatchUpdateIntents}.
902
- # @!attribute [rw] intents
903
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent>]
904
- # The collection of updated or created intents.
905
- class BatchUpdateIntentsResponse; end
906
-
907
- # The request message for {Google::Cloud::Dialogflow::V2::Intents::BatchDeleteIntents Intents::BatchDeleteIntents}.
908
- # @!attribute [rw] parent
909
- # @return [String]
910
- # Required. The name of the agent to delete all entities types for. Format:
911
- # `projects/<Project ID>/agent`.
912
- # @!attribute [rw] intents
913
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent>]
914
- # Required. The collection of intents to delete. Only intent `name` must be
915
- # filled in.
916
- class BatchDeleteIntentsRequest; end
917
-
918
- # This message is a wrapper around a collection of intents.
919
- # @!attribute [rw] intents
920
- # @return [Array<Google::Cloud::Dialogflow::V2::Intent>]
921
- # A collection of intents.
922
- class IntentBatch; end
923
-
924
- # Represents the options for views of an intent.
925
- # An intent can be a sizable object. Therefore, we provide a resource view that
926
- # does not return training phrases in the response by default.
927
- module IntentView
928
- # Training phrases field is not populated in the response.
929
- INTENT_VIEW_UNSPECIFIED = 0
930
-
931
- # All fields are populated.
932
- INTENT_VIEW_FULL = 1
933
- end
934
- end
935
- end
936
- end
937
- end