/
getFlow.go
146 lines (123 loc) · 9.15 KB
/
getFlow.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v3beta1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Retrieves the specified flow.
func LookupFlow(ctx *pulumi.Context, args *LookupFlowArgs, opts ...pulumi.InvokeOption) (*LookupFlowResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupFlowResult
err := ctx.Invoke("google-native:dialogflow/v3beta1:getFlow", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupFlowArgs struct {
AgentId string `pulumi:"agentId"`
FlowId string `pulumi:"flowId"`
LanguageCode *string `pulumi:"languageCode"`
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
}
type LookupFlowResult struct {
// Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level.
AdvancedSettings GoogleCloudDialogflowCxV3beta1AdvancedSettingsResponse `pulumi:"advancedSettings"`
// The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.
Description string `pulumi:"description"`
// The human-readable name of the flow.
DisplayName string `pulumi:"displayName"`
// A flow's event handlers serve two purposes: * They are responsible for handling events (e.g. no match, webhook errors) in the flow. * They are inherited by every page's event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.
EventHandlers []GoogleCloudDialogflowCxV3beta1EventHandlerResponse `pulumi:"eventHandlers"`
// Optional. Knowledge connector configuration.
KnowledgeConnectorSettings GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettingsResponse `pulumi:"knowledgeConnectorSettings"`
// The unique identifier of the flow. Format: `projects//locations//agents//flows/`.
Name string `pulumi:"name"`
// NLU related settings of the flow.
NluSettings GoogleCloudDialogflowCxV3beta1NluSettingsResponse `pulumi:"nluSettings"`
// A flow's transition route group serve two purposes: * They are responsible for matching the user's first utterances in the flow. * They are inherited by every page's transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.
TransitionRouteGroups []string `pulumi:"transitionRouteGroups"`
// A flow's transition routes serve two purposes: * They are responsible for matching the user's first utterances in the flow. * They are inherited by every page's 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. TransitionRoutes are evalauted in the following order: * TransitionRoutes with intent specified. * TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.
TransitionRoutes []GoogleCloudDialogflowCxV3beta1TransitionRouteResponse `pulumi:"transitionRoutes"`
}
func LookupFlowOutput(ctx *pulumi.Context, args LookupFlowOutputArgs, opts ...pulumi.InvokeOption) LookupFlowResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupFlowResult, error) {
args := v.(LookupFlowArgs)
r, err := LookupFlow(ctx, &args, opts...)
var s LookupFlowResult
if r != nil {
s = *r
}
return s, err
}).(LookupFlowResultOutput)
}
type LookupFlowOutputArgs struct {
AgentId pulumi.StringInput `pulumi:"agentId"`
FlowId pulumi.StringInput `pulumi:"flowId"`
LanguageCode pulumi.StringPtrInput `pulumi:"languageCode"`
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupFlowOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupFlowArgs)(nil)).Elem()
}
type LookupFlowResultOutput struct{ *pulumi.OutputState }
func (LookupFlowResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupFlowResult)(nil)).Elem()
}
func (o LookupFlowResultOutput) ToLookupFlowResultOutput() LookupFlowResultOutput {
return o
}
func (o LookupFlowResultOutput) ToLookupFlowResultOutputWithContext(ctx context.Context) LookupFlowResultOutput {
return o
}
// Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level.
func (o LookupFlowResultOutput) AdvancedSettings() GoogleCloudDialogflowCxV3beta1AdvancedSettingsResponseOutput {
return o.ApplyT(func(v LookupFlowResult) GoogleCloudDialogflowCxV3beta1AdvancedSettingsResponse {
return v.AdvancedSettings
}).(GoogleCloudDialogflowCxV3beta1AdvancedSettingsResponseOutput)
}
// The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.
func (o LookupFlowResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupFlowResult) string { return v.Description }).(pulumi.StringOutput)
}
// The human-readable name of the flow.
func (o LookupFlowResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupFlowResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// A flow's event handlers serve two purposes: * They are responsible for handling events (e.g. no match, webhook errors) in the flow. * They are inherited by every page's event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.
func (o LookupFlowResultOutput) EventHandlers() GoogleCloudDialogflowCxV3beta1EventHandlerResponseArrayOutput {
return o.ApplyT(func(v LookupFlowResult) []GoogleCloudDialogflowCxV3beta1EventHandlerResponse { return v.EventHandlers }).(GoogleCloudDialogflowCxV3beta1EventHandlerResponseArrayOutput)
}
// Optional. Knowledge connector configuration.
func (o LookupFlowResultOutput) KnowledgeConnectorSettings() GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettingsResponseOutput {
return o.ApplyT(func(v LookupFlowResult) GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettingsResponse {
return v.KnowledgeConnectorSettings
}).(GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettingsResponseOutput)
}
// The unique identifier of the flow. Format: `projects//locations//agents//flows/`.
func (o LookupFlowResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupFlowResult) string { return v.Name }).(pulumi.StringOutput)
}
// NLU related settings of the flow.
func (o LookupFlowResultOutput) NluSettings() GoogleCloudDialogflowCxV3beta1NluSettingsResponseOutput {
return o.ApplyT(func(v LookupFlowResult) GoogleCloudDialogflowCxV3beta1NluSettingsResponse { return v.NluSettings }).(GoogleCloudDialogflowCxV3beta1NluSettingsResponseOutput)
}
// A flow's transition route group serve two purposes: * They are responsible for matching the user's first utterances in the flow. * They are inherited by every page's transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.
func (o LookupFlowResultOutput) TransitionRouteGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupFlowResult) []string { return v.TransitionRouteGroups }).(pulumi.StringArrayOutput)
}
// A flow's transition routes serve two purposes: * They are responsible for matching the user's first utterances in the flow. * They are inherited by every page's 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. TransitionRoutes are evalauted in the following order: * TransitionRoutes with intent specified. * TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.
func (o LookupFlowResultOutput) TransitionRoutes() GoogleCloudDialogflowCxV3beta1TransitionRouteResponseArrayOutput {
return o.ApplyT(func(v LookupFlowResult) []GoogleCloudDialogflowCxV3beta1TransitionRouteResponse {
return v.TransitionRoutes
}).(GoogleCloudDialogflowCxV3beta1TransitionRouteResponseArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupFlowResultOutput{})
}