/
getPage.go
148 lines (125 loc) · 9.54 KB
/
getPage.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
147
148
// 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 page.
func LookupPage(ctx *pulumi.Context, args *LookupPageArgs, opts ...pulumi.InvokeOption) (*LookupPageResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupPageResult
err := ctx.Invoke("google-native:dialogflow/v3beta1:getPage", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupPageArgs struct {
AgentId string `pulumi:"agentId"`
FlowId string `pulumi:"flowId"`
LanguageCode *string `pulumi:"languageCode"`
Location string `pulumi:"location"`
PageId string `pulumi:"pageId"`
Project *string `pulumi:"project"`
}
type LookupPageResult struct {
// Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level.
AdvancedSettings GoogleCloudDialogflowCxV3beta1AdvancedSettingsResponse `pulumi:"advancedSettings"`
// The human-readable name of the page, unique within the flow.
DisplayName string `pulumi:"displayName"`
// The fulfillment to call when the session is entering the page.
EntryFulfillment GoogleCloudDialogflowCxV3beta1FulfillmentResponse `pulumi:"entryFulfillment"`
// Handlers associated with the page to handle events such as webhook errors, no match or no input.
EventHandlers []GoogleCloudDialogflowCxV3beta1EventHandlerResponse `pulumi:"eventHandlers"`
// The form associated with the page, used for collecting parameters relevant to the page.
Form GoogleCloudDialogflowCxV3beta1FormResponse `pulumi:"form"`
// Optional. Knowledge connector configuration.
KnowledgeConnectorSettings GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettingsResponse `pulumi:"knowledgeConnectorSettings"`
// The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.
Name string `pulumi:"name"`
// Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -> page's transition route group -> flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.
TransitionRouteGroups []string `pulumi:"transitionRouteGroups"`
// A list of transitions for the transition rules of this page. They route the conversation to another page in the same flow, or another flow. When we are in a certain page, the TransitionRoutes are evalauted in the following order: * TransitionRoutes defined in the page with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in flow with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in the page with only condition specified. * TransitionRoutes defined in the transition route groups with only condition specified.
TransitionRoutes []GoogleCloudDialogflowCxV3beta1TransitionRouteResponse `pulumi:"transitionRoutes"`
}
func LookupPageOutput(ctx *pulumi.Context, args LookupPageOutputArgs, opts ...pulumi.InvokeOption) LookupPageResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupPageResult, error) {
args := v.(LookupPageArgs)
r, err := LookupPage(ctx, &args, opts...)
var s LookupPageResult
if r != nil {
s = *r
}
return s, err
}).(LookupPageResultOutput)
}
type LookupPageOutputArgs struct {
AgentId pulumi.StringInput `pulumi:"agentId"`
FlowId pulumi.StringInput `pulumi:"flowId"`
LanguageCode pulumi.StringPtrInput `pulumi:"languageCode"`
Location pulumi.StringInput `pulumi:"location"`
PageId pulumi.StringInput `pulumi:"pageId"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupPageOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPageArgs)(nil)).Elem()
}
type LookupPageResultOutput struct{ *pulumi.OutputState }
func (LookupPageResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPageResult)(nil)).Elem()
}
func (o LookupPageResultOutput) ToLookupPageResultOutput() LookupPageResultOutput {
return o
}
func (o LookupPageResultOutput) ToLookupPageResultOutputWithContext(ctx context.Context) LookupPageResultOutput {
return o
}
// Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level.
func (o LookupPageResultOutput) AdvancedSettings() GoogleCloudDialogflowCxV3beta1AdvancedSettingsResponseOutput {
return o.ApplyT(func(v LookupPageResult) GoogleCloudDialogflowCxV3beta1AdvancedSettingsResponse {
return v.AdvancedSettings
}).(GoogleCloudDialogflowCxV3beta1AdvancedSettingsResponseOutput)
}
// The human-readable name of the page, unique within the flow.
func (o LookupPageResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupPageResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The fulfillment to call when the session is entering the page.
func (o LookupPageResultOutput) EntryFulfillment() GoogleCloudDialogflowCxV3beta1FulfillmentResponseOutput {
return o.ApplyT(func(v LookupPageResult) GoogleCloudDialogflowCxV3beta1FulfillmentResponse { return v.EntryFulfillment }).(GoogleCloudDialogflowCxV3beta1FulfillmentResponseOutput)
}
// Handlers associated with the page to handle events such as webhook errors, no match or no input.
func (o LookupPageResultOutput) EventHandlers() GoogleCloudDialogflowCxV3beta1EventHandlerResponseArrayOutput {
return o.ApplyT(func(v LookupPageResult) []GoogleCloudDialogflowCxV3beta1EventHandlerResponse { return v.EventHandlers }).(GoogleCloudDialogflowCxV3beta1EventHandlerResponseArrayOutput)
}
// The form associated with the page, used for collecting parameters relevant to the page.
func (o LookupPageResultOutput) Form() GoogleCloudDialogflowCxV3beta1FormResponseOutput {
return o.ApplyT(func(v LookupPageResult) GoogleCloudDialogflowCxV3beta1FormResponse { return v.Form }).(GoogleCloudDialogflowCxV3beta1FormResponseOutput)
}
// Optional. Knowledge connector configuration.
func (o LookupPageResultOutput) KnowledgeConnectorSettings() GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettingsResponseOutput {
return o.ApplyT(func(v LookupPageResult) GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettingsResponse {
return v.KnowledgeConnectorSettings
}).(GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettingsResponseOutput)
}
// The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: `projects//locations//agents//flows//pages/`.
func (o LookupPageResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupPageResult) string { return v.Name }).(pulumi.StringOutput)
}
// Ordered list of `TransitionRouteGroups` added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -> page's transition route group -> flow's transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:`projects//locations//agents//flows//transitionRouteGroups/` or `projects//locations//agents//transitionRouteGroups/` for agent-level groups.
func (o LookupPageResultOutput) TransitionRouteGroups() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupPageResult) []string { return v.TransitionRouteGroups }).(pulumi.StringArrayOutput)
}
// A list of transitions for the transition rules of this page. They route the conversation to another page in the same flow, or another flow. When we are in a certain page, the TransitionRoutes are evalauted in the following order: * TransitionRoutes defined in the page with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in flow with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in the page with only condition specified. * TransitionRoutes defined in the transition route groups with only condition specified.
func (o LookupPageResultOutput) TransitionRoutes() GoogleCloudDialogflowCxV3beta1TransitionRouteResponseArrayOutput {
return o.ApplyT(func(v LookupPageResult) []GoogleCloudDialogflowCxV3beta1TransitionRouteResponse {
return v.TransitionRoutes
}).(GoogleCloudDialogflowCxV3beta1TransitionRouteResponseArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupPageResultOutput{})
}