-
Notifications
You must be signed in to change notification settings - Fork 64
/
zz_flow_types.go
executable file
·361 lines (278 loc) · 17.2 KB
/
zz_flow_types.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
/*
Copyright 2021 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by upjet. DO NOT EDIT.
package v1beta1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
v1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
)
type EventHandlersObservation struct {
// The unique identifier of this event handler.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
// Structure is documented below.
// +kubebuilder:validation:Optional
TriggerFulfillment []TriggerFulfillmentObservation `json:"triggerFulfillment,omitempty" tf:"trigger_fulfillment,omitempty"`
}
type EventHandlersParameters struct {
// The name of the event to handle.
// +kubebuilder:validation:Optional
Event *string `json:"event,omitempty" tf:"event,omitempty"`
// The target flow to transition to.
// Format: projects//locations//agents//flows/.
// +kubebuilder:validation:Optional
TargetFlow *string `json:"targetFlow,omitempty" tf:"target_flow,omitempty"`
// The target page to transition to.
// Format: projects//locations//agents//flows//pages/.
// +kubebuilder:validation:Optional
TargetPage *string `json:"targetPage,omitempty" tf:"target_page,omitempty"`
// The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
// Structure is documented below.
// +kubebuilder:validation:Optional
TriggerFulfillment []TriggerFulfillmentParameters `json:"triggerFulfillment,omitempty" tf:"trigger_fulfillment,omitempty"`
}
type FlowObservation struct {
// 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][Page.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 transitionRoutes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.
// Structure is documented below.
// +kubebuilder:validation:Optional
EventHandlers []EventHandlersObservation `json:"eventHandlers,omitempty" tf:"event_handlers,omitempty"`
// an identifier for the resource with format {{parent}}/flows/{{name}}
ID *string `json:"id,omitempty" tf:"id,omitempty"`
// The unique identifier of the flow.
// Format: projects//locations//agents//flows/.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// 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][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.
// +kubebuilder:validation:Optional
TransitionRoutes []TransitionRoutesObservation `json:"transitionRoutes,omitempty" tf:"transition_routes,omitempty"`
}
type FlowParameters struct {
// The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.
// +kubebuilder:validation:Optional
Description *string `json:"description,omitempty" tf:"description,omitempty"`
// The human-readable name of the flow.
// +kubebuilder:validation:Required
DisplayName *string `json:"displayName" tf:"display_name,omitempty"`
// 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][Page.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 transitionRoutes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.
// Structure is documented below.
// +kubebuilder:validation:Optional
EventHandlers []EventHandlersParameters `json:"eventHandlers,omitempty" tf:"event_handlers,omitempty"`
// The language of the following fields in flow:
// Flow.event_handlers.trigger_fulfillment.messages
// Flow.event_handlers.trigger_fulfillment.conditional_cases
// Flow.transition_routes.trigger_fulfillment.messages
// Flow.transition_routes.trigger_fulfillment.conditional_cases
// If not specified, the agent's default language is used. Many languages are supported. Note: languages must be enabled in the agent before they can be used.
// +kubebuilder:validation:Optional
LanguageCode *string `json:"languageCode,omitempty" tf:"language_code,omitempty"`
// NLU related settings of the flow.
// Structure is documented below.
// +kubebuilder:validation:Optional
NluSettings []NluSettingsParameters `json:"nluSettings,omitempty" tf:"nlu_settings,omitempty"`
// The agent to create a flow for.
// Format: projects//locations//agents/.
// +crossplane:generate:reference:type=github.com/upbound/provider-gcp/apis/dialogflowcx/v1beta1.Agent
// +crossplane:generate:reference:extractor=github.com/upbound/upjet/pkg/resource.ExtractResourceID()
// +kubebuilder:validation:Optional
Parent *string `json:"parent,omitempty" tf:"parent,omitempty"`
// Reference to a Agent in dialogflowcx to populate parent.
// +kubebuilder:validation:Optional
ParentRef *v1.Reference `json:"parentRef,omitempty" tf:"-"`
// Selector for a Agent in dialogflowcx to populate parent.
// +kubebuilder:validation:Optional
ParentSelector *v1.Selector `json:"parentSelector,omitempty" tf:"-"`
// 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][Page.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/.
// +kubebuilder:validation:Optional
TransitionRouteGroups []*string `json:"transitionRouteGroups,omitempty" tf:"transition_route_groups,omitempty"`
// 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][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.
// +kubebuilder:validation:Optional
TransitionRoutes []TransitionRoutesParameters `json:"transitionRoutes,omitempty" tf:"transition_routes,omitempty"`
}
type MessagesObservation struct {
// A collection of text responses.
// +kubebuilder:validation:Optional
Text []TextObservation `json:"text,omitempty" tf:"text,omitempty"`
}
type MessagesParameters struct {
// A collection of text responses.
// +kubebuilder:validation:Optional
Text []TextParameters `json:"text,omitempty" tf:"text,omitempty"`
}
type MessagesTextObservation struct {
// Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request.
AllowPlaybackInterruption *bool `json:"allowPlaybackInterruption,omitempty" tf:"allow_playback_interruption,omitempty"`
}
type MessagesTextParameters struct {
// A collection of text responses.
// +kubebuilder:validation:Optional
Text []*string `json:"text,omitempty" tf:"text,omitempty"`
}
type NluSettingsObservation struct {
}
type NluSettingsParameters struct {
// 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. 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.
// +kubebuilder:validation:Optional
ClassificationThreshold *float64 `json:"classificationThreshold,omitempty" tf:"classification_threshold,omitempty"`
// Indicates NLU model training mode.
// +kubebuilder:validation:Optional
ModelTrainingMode *string `json:"modelTrainingMode,omitempty" tf:"model_training_mode,omitempty"`
// Indicates the type of NLU model.
// +kubebuilder:validation:Optional
ModelType *string `json:"modelType,omitempty" tf:"model_type,omitempty"`
}
type TextObservation struct {
// Whether the playback of this message can be interrupted by the end user's speech and the client can then starts the next Dialogflow request.
AllowPlaybackInterruption *bool `json:"allowPlaybackInterruption,omitempty" tf:"allow_playback_interruption,omitempty"`
}
type TextParameters struct {
// A collection of text responses.
// +kubebuilder:validation:Optional
Text []*string `json:"text,omitempty" tf:"text,omitempty"`
}
type TransitionRoutesObservation struct {
// The unique identifier of this transition route.
Name *string `json:"name,omitempty" tf:"name,omitempty"`
// The fulfillment to call when the condition is satisfied. At least one of triggerFulfillment and target must be specified. When both are defined, triggerFulfillment is executed first.
// Structure is documented below.
// +kubebuilder:validation:Optional
TriggerFulfillment []TransitionRoutesTriggerFulfillmentObservation `json:"triggerFulfillment,omitempty" tf:"trigger_fulfillment,omitempty"`
}
type TransitionRoutesParameters struct {
// The condition to evaluate against form parameters or session parameters.
// 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.
// +kubebuilder:validation:Optional
Condition *string `json:"condition,omitempty" tf:"condition,omitempty"`
// The unique identifier of an Intent.
// Format: projects//locations//agents//intents/. 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.
// +kubebuilder:validation:Optional
Intent *string `json:"intent,omitempty" tf:"intent,omitempty"`
// The target flow to transition to.
// Format: projects//locations//agents//flows/.
// +kubebuilder:validation:Optional
TargetFlow *string `json:"targetFlow,omitempty" tf:"target_flow,omitempty"`
// The target page to transition to.
// Format: projects//locations//agents//flows//pages/.
// +kubebuilder:validation:Optional
TargetPage *string `json:"targetPage,omitempty" tf:"target_page,omitempty"`
// The fulfillment to call when the condition is satisfied. At least one of triggerFulfillment and target must be specified. When both are defined, triggerFulfillment is executed first.
// Structure is documented below.
// +kubebuilder:validation:Optional
TriggerFulfillment []TransitionRoutesTriggerFulfillmentParameters `json:"triggerFulfillment,omitempty" tf:"trigger_fulfillment,omitempty"`
}
type TransitionRoutesTriggerFulfillmentObservation struct {
// The list of rich message responses to present to the user.
// Structure is documented below.
// +kubebuilder:validation:Optional
Messages []TriggerFulfillmentMessagesObservation `json:"messages,omitempty" tf:"messages,omitempty"`
}
type TransitionRoutesTriggerFulfillmentParameters struct {
// The list of rich message responses to present to the user.
// Structure is documented below.
// +kubebuilder:validation:Optional
Messages []TriggerFulfillmentMessagesParameters `json:"messages,omitempty" tf:"messages,omitempty"`
// Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
// +kubebuilder:validation:Optional
ReturnPartialResponses *bool `json:"returnPartialResponses,omitempty" tf:"return_partial_responses,omitempty"`
// The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified.
// +kubebuilder:validation:Optional
Tag *string `json:"tag,omitempty" tf:"tag,omitempty"`
// The webhook to call. Format: projects//locations//agents//webhooks/.
// +kubebuilder:validation:Optional
Webhook *string `json:"webhook,omitempty" tf:"webhook,omitempty"`
}
type TriggerFulfillmentMessagesObservation struct {
// A collection of text responses.
// +kubebuilder:validation:Optional
Text []MessagesTextObservation `json:"text,omitempty" tf:"text,omitempty"`
}
type TriggerFulfillmentMessagesParameters struct {
// A collection of text responses.
// +kubebuilder:validation:Optional
Text []MessagesTextParameters `json:"text,omitempty" tf:"text,omitempty"`
}
type TriggerFulfillmentObservation struct {
// The list of rich message responses to present to the user.
// Structure is documented below.
// +kubebuilder:validation:Optional
Messages []MessagesObservation `json:"messages,omitempty" tf:"messages,omitempty"`
}
type TriggerFulfillmentParameters struct {
// The list of rich message responses to present to the user.
// Structure is documented below.
// +kubebuilder:validation:Optional
Messages []MessagesParameters `json:"messages,omitempty" tf:"messages,omitempty"`
// Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
// +kubebuilder:validation:Optional
ReturnPartialResponses *bool `json:"returnPartialResponses,omitempty" tf:"return_partial_responses,omitempty"`
// The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified.
// +kubebuilder:validation:Optional
Tag *string `json:"tag,omitempty" tf:"tag,omitempty"`
// The webhook to call. Format: projects//locations//agents//webhooks/.
// +kubebuilder:validation:Optional
Webhook *string `json:"webhook,omitempty" tf:"webhook,omitempty"`
}
// FlowSpec defines the desired state of Flow
type FlowSpec struct {
v1.ResourceSpec `json:",inline"`
ForProvider FlowParameters `json:"forProvider"`
}
// FlowStatus defines the observed state of Flow.
type FlowStatus struct {
v1.ResourceStatus `json:",inline"`
AtProvider FlowObservation `json:"atProvider,omitempty"`
}
// +kubebuilder:object:root=true
// Flow is the Schema for the Flows API. Flows represents the conversation flows when you build your chatbot agent.
// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status"
// +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
// +kubebuilder:subresource:status
// +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,gcp}
type Flow struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec FlowSpec `json:"spec"`
Status FlowStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// FlowList contains a list of Flows
type FlowList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Flow `json:"items"`
}
// Repository type metadata.
var (
Flow_Kind = "Flow"
Flow_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: Flow_Kind}.String()
Flow_KindAPIVersion = Flow_Kind + "." + CRDGroupVersion.String()
Flow_GroupVersionKind = CRDGroupVersion.WithKind(Flow_Kind)
)
func init() {
SchemeBuilder.Register(&Flow{}, &FlowList{})
}