Skip to content

Commit a0f1aaf

Browse files
Add Dialogflow CX webhook resource (#5831) (#12498)
Co-authored-by: Scott Suarez <[email protected]> Signed-off-by: Modular Magician <[email protected]> Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Scott Suarez <[email protected]>
1 parent c549526 commit a0f1aaf

20 files changed

+1275
-62
lines changed

.changelog/5831.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
dialogflowcx: added `google_dialogflow_cx_webhook` resource to support Dialogflow CX webhook API
3+
```

google/provider.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -888,9 +888,9 @@ func Provider() *schema.Provider {
888888
return provider
889889
}
890890

891-
// Generated resources: 231
891+
// Generated resources: 232
892892
// Generated IAM resources: 138
893-
// Total generated resources: 369
893+
// Total generated resources: 370
894894
func ResourceMap() map[string]*schema.Resource {
895895
resourceMap, _ := ResourceMapWithErrors()
896896
return resourceMap
@@ -1107,6 +1107,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
11071107
"google_dialogflow_cx_page": resourceDialogflowCXPage(),
11081108
"google_dialogflow_cx_entity_type": resourceDialogflowCXEntityType(),
11091109
"google_dialogflow_cx_environment": resourceDialogflowCXEnvironment(),
1110+
"google_dialogflow_cx_webhook": resourceDialogflowCXWebhook(),
11101111
"google_dns_managed_zone": resourceDNSManagedZone(),
11111112
"google_dns_policy": resourceDNSPolicy(),
11121113
"google_document_ai_processor": resourceDocumentAIProcessor(),

google/resource_dialogflow_cx_agent.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func resourceDialogflowCXAgent() *schema.Resource {
4747
Type: schema.TypeString,
4848
Required: true,
4949
ForceNew: true,
50-
Description: `The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
50+
Description: `The default language of the agent as a language tag. [See Language Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
5151
for a list of the currently supported language codes. This field cannot be updated after creation.`,
5252
},
5353
"display_name": {

google/resource_dialogflow_cx_entity_type.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ For KIND_LIST entity types: A string that can contain references to other entity
100100
"excluded_phrases": {
101101
Type: schema.TypeList,
102102
Optional: true,
103-
Description: `Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry giant(an adjective), you might consider adding giants(a noun) as an exclusion.
103+
Description: `Collection of exceptional words and phrases that shouldn't be matched. For example, if you have a size entity type with entry giant(an adjective), you might consider adding giants(a noun) as an exclusion.
104104
If the kind of entity type is KIND_MAP, then the phrases specified by entities and excluded phrases should be mutually exclusive.`,
105105
Elem: &schema.Resource{
106106
Schema: map[string]*schema.Schema{
@@ -126,7 +126,7 @@ If not specified, the agent's default language is used. Many languages are suppo
126126
Type: schema.TypeString,
127127
Optional: true,
128128
ForceNew: true,
129-
Description: `The agent to create a entity type for.
129+
Description: `The agent to create a entity type for.
130130
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.`,
131131
},
132132
"redact": {

google/resource_dialogflow_cx_environment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func resourceDialogflowCXEnvironment() *schema.Resource {
7474
Type: schema.TypeString,
7575
Optional: true,
7676
ForceNew: true,
77-
Description: `The Agent to create an Environment for.
77+
Description: `The Agent to create an Environment for.
7878
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.`,
7979
},
8080
"name": {

google/resource_dialogflow_cx_flow.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ Unlike transitionRoutes, these handlers are evaluated on a first-match basis. Th
7373
"target_flow": {
7474
Type: schema.TypeString,
7575
Optional: true,
76-
Description: `The target flow to transition to.
76+
Description: `The target flow to transition to.
7777
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.`,
7878
},
7979
"target_page": {
8080
Type: schema.TypeString,
8181
Optional: true,
82-
Description: `The target page to transition to.
82+
Description: `The target page to transition to.
8383
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.`,
8484
},
8585
"trigger_fulfillment": {
@@ -168,7 +168,7 @@ If not specified, the agent's default language is used. Many languages are suppo
168168
"classification_threshold": {
169169
Type: schema.TypeFloat,
170170
Optional: true,
171-
Description: `To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold.
171+
Description: `To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold.
172172
If the returned score value is less than the threshold value, then a no-match event will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.`,
173173
},
174174
"model_training_mode": {
@@ -194,7 +194,7 @@ If the returned score value is less than the threshold value, then a no-match ev
194194
Type: schema.TypeString,
195195
Optional: true,
196196
ForceNew: true,
197-
Description: `The agent to create a flow for.
197+
Description: `The agent to create a flow for.
198198
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>.`,
199199
},
200200
"transition_route_groups": {
@@ -214,7 +214,7 @@ Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Fl
214214
Description: `A flow's transition routes serve two purposes:
215215
They are responsible for matching the user's first utterances in the flow.
216216
They are inherited by every page's [transition routes][Page.transition_routes] and can support use cases such as the user saying "help" or "can I talk to a human?", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow.
217-
217+
218218
TransitionRoutes are evalauted in the following order:
219219
TransitionRoutes with intent specified.
220220
TransitionRoutes with only condition specified.
@@ -230,19 +230,19 @@ At least one of intent or condition must be specified. When both intent and cond
230230
"intent": {
231231
Type: schema.TypeString,
232232
Optional: true,
233-
Description: `The unique identifier of an Intent.
233+
Description: `The unique identifier of an Intent.
234234
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>. Indicates that the transition can only happen when the given intent is matched. At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.`,
235235
},
236236
"target_flow": {
237237
Type: schema.TypeString,
238238
Optional: true,
239-
Description: `The target flow to transition to.
239+
Description: `The target flow to transition to.
240240
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.`,
241241
},
242242
"target_page": {
243243
Type: schema.TypeString,
244244
Optional: true,
245-
Description: `The target page to transition to.
245+
Description: `The target page to transition to.
246246
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.`,
247247
},
248248
"trigger_fulfillment": {
@@ -313,7 +313,7 @@ Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<F
313313
"name": {
314314
Type: schema.TypeString,
315315
Computed: true,
316-
Description: `The unique identifier of the flow.
316+
Description: `The unique identifier of the flow.
317317
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.`,
318318
},
319319
},

google/resource_dialogflow_cx_intent.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func resourceDialogflowCXIntent() *schema.Resource {
5959
"is_fallback": {
6060
Type: schema.TypeBool,
6161
Optional: true,
62-
Description: `Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation.
62+
Description: `Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation.
6363
Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.`,
6464
},
6565
"labels": {
@@ -87,7 +87,7 @@ If not specified, the agent's default language is used. Many languages are suppo
8787
"entity_type": {
8888
Type: schema.TypeString,
8989
Required: true,
90-
Description: `The entity type of the parameter.
90+
Description: `The entity type of the parameter.
9191
Format: projects/-/locations/-/agents/-/entityTypes/<System Entity Type ID> for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type ID> for developer entity types.`,
9292
},
9393
"id": {
@@ -103,7 +103,7 @@ Format: projects/-/locations/-/agents/-/entityTypes/<System Entity Type ID> for
103103
"redact": {
104104
Type: schema.TypeBool,
105105
Optional: true,
106-
Description: `Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging.
106+
Description: `Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging.
107107
Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.`,
108108
},
109109
},
@@ -170,7 +170,7 @@ Part.text is set to a part of the phrase that you want to annotate, and the para
170170
"name": {
171171
Type: schema.TypeString,
172172
Computed: true,
173-
Description: `The unique identifier of the intent.
173+
Description: `The unique identifier of the intent.
174174
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>.`,
175175
},
176176
},

google/resource_dialogflow_cx_page.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ func resourceDialogflowCXPage() *schema.Resource {
121121
"target_flow": {
122122
Type: schema.TypeString,
123123
Optional: true,
124-
Description: `The target flow to transition to.
124+
Description: `The target flow to transition to.
125125
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.`,
126126
},
127127
"target_page": {
128128
Type: schema.TypeString,
129129
Optional: true,
130-
Description: `The target page to transition to.
130+
Description: `The target page to transition to.
131131
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.`,
132132
},
133133
"trigger_fulfillment": {
@@ -216,7 +216,7 @@ Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<F
216216
"entity_type": {
217217
Type: schema.TypeString,
218218
Optional: true,
219-
Description: `The entity type of the parameter.
219+
Description: `The entity type of the parameter.
220220
Format: projects/-/locations/-/agents/-/entityTypes/<System Entity Type ID> for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type ID> for developer entity types.`,
221221
},
222222
"fill_behavior": {
@@ -294,13 +294,13 @@ Format: projects/-/locations/-/agents/-/entityTypes/<System Entity Type ID> for
294294
"redact": {
295295
Type: schema.TypeBool,
296296
Optional: true,
297-
Description: `Indicates whether the parameter content should be redacted in log.
297+
Description: `Indicates whether the parameter content should be redacted in log.
298298
If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.`,
299299
},
300300
"required": {
301301
Type: schema.TypeBool,
302302
Optional: true,
303-
Description: `Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them.
303+
Description: `Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them.
304304
Required parameters must be filled before form filling concludes.`,
305305
},
306306
},
@@ -331,7 +331,7 @@ If not specified, the agent's default language is used. Many languages are suppo
331331
Type: schema.TypeString,
332332
Optional: true,
333333
ForceNew: true,
334-
Description: `The flow to create a page for.
334+
Description: `The flow to create a page for.
335335
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.`,
336336
},
337337
"transition_route_groups": {
@@ -367,19 +367,19 @@ At least one of intent or condition must be specified. When both intent and cond
367367
"intent": {
368368
Type: schema.TypeString,
369369
Optional: true,
370-
Description: `The unique identifier of an Intent.
370+
Description: `The unique identifier of an Intent.
371371
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>. Indicates that the transition can only happen when the given intent is matched. At least one of intent or condition must be specified. When both intent and condition are specified, the transition can only happen when both are fulfilled.`,
372372
},
373373
"target_flow": {
374374
Type: schema.TypeString,
375375
Optional: true,
376-
Description: `The target flow to transition to.
376+
Description: `The target flow to transition to.
377377
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.`,
378378
},
379379
"target_page": {
380380
Type: schema.TypeString,
381381
Optional: true,
382-
Description: `The target page to transition to.
382+
Description: `The target page to transition to.
383383
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.`,
384384
},
385385
"trigger_fulfillment": {
@@ -450,7 +450,7 @@ Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<F
450450
"name": {
451451
Type: schema.TypeString,
452452
Computed: true,
453-
Description: `The unique identifier of the page.
453+
Description: `The unique identifier of the page.
454454
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.`,
455455
},
456456
},

google/resource_dialogflow_cx_version.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func resourceDialogflowCXVersion() *schema.Resource {
6060
Type: schema.TypeString,
6161
Optional: true,
6262
ForceNew: true,
63-
Description: `The Flow to create an Version for.
63+
Description: `The Flow to create an Version for.
6464
Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.`,
6565
},
6666
"create_time": {
@@ -82,7 +82,7 @@ Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<F
8282
"classification_threshold": {
8383
Type: schema.TypeFloat,
8484
Optional: true,
85-
Description: `To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a no-match event will be triggered.
85+
Description: `To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a no-match event will be triggered.
8686
The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.`,
8787
},
8888
"model_training_mode": {

0 commit comments

Comments
 (0)