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// http://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// Code generated by protoc-gen-go. DO NOT EDIT. 16// versions: 17// protoc-gen-go v1.26.0 18// protoc v3.12.2 19// source: google/actions/sdk/v2/interactionmodel/event_handler.proto 20 21package interactionmodel 22 23import ( 24 reflect "reflect" 25 sync "sync" 26 27 prompt "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt" 28 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 29 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 30) 31 32const ( 33 // Verify that this generated code is sufficiently up-to-date. 34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 35 // Verify that runtime/protoimpl is sufficiently up-to-date. 36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 37) 38 39// Defines a handler to be executed after an event. Examples of events are 40// intent and condition based events in a scene. 41type EventHandler struct { 42 state protoimpl.MessageState 43 sizeCache protoimpl.SizeCache 44 unknownFields protoimpl.UnknownFields 45 46 // Name of the webhook handler to call. 47 WebhookHandler string `protobuf:"bytes,1,opt,name=webhook_handler,json=webhookHandler,proto3" json:"webhook_handler,omitempty"` 48 // Prompts can either be inlined or referenced by name. 49 // 50 // Types that are assignable to Prompt: 51 // *EventHandler_StaticPrompt 52 // *EventHandler_StaticPromptName 53 Prompt isEventHandler_Prompt `protobuf_oneof:"prompt"` 54} 55 56func (x *EventHandler) Reset() { 57 *x = EventHandler{} 58 if protoimpl.UnsafeEnabled { 59 mi := &file_google_actions_sdk_v2_interactionmodel_event_handler_proto_msgTypes[0] 60 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 61 ms.StoreMessageInfo(mi) 62 } 63} 64 65func (x *EventHandler) String() string { 66 return protoimpl.X.MessageStringOf(x) 67} 68 69func (*EventHandler) ProtoMessage() {} 70 71func (x *EventHandler) ProtoReflect() protoreflect.Message { 72 mi := &file_google_actions_sdk_v2_interactionmodel_event_handler_proto_msgTypes[0] 73 if protoimpl.UnsafeEnabled && x != nil { 74 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 75 if ms.LoadMessageInfo() == nil { 76 ms.StoreMessageInfo(mi) 77 } 78 return ms 79 } 80 return mi.MessageOf(x) 81} 82 83// Deprecated: Use EventHandler.ProtoReflect.Descriptor instead. 84func (*EventHandler) Descriptor() ([]byte, []int) { 85 return file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDescGZIP(), []int{0} 86} 87 88func (x *EventHandler) GetWebhookHandler() string { 89 if x != nil { 90 return x.WebhookHandler 91 } 92 return "" 93} 94 95func (m *EventHandler) GetPrompt() isEventHandler_Prompt { 96 if m != nil { 97 return m.Prompt 98 } 99 return nil 100} 101 102func (x *EventHandler) GetStaticPrompt() *prompt.StaticPrompt { 103 if x, ok := x.GetPrompt().(*EventHandler_StaticPrompt); ok { 104 return x.StaticPrompt 105 } 106 return nil 107} 108 109func (x *EventHandler) GetStaticPromptName() string { 110 if x, ok := x.GetPrompt().(*EventHandler_StaticPromptName); ok { 111 return x.StaticPromptName 112 } 113 return "" 114} 115 116type isEventHandler_Prompt interface { 117 isEventHandler_Prompt() 118} 119 120type EventHandler_StaticPrompt struct { 121 // Inlined static prompt. Can contain references to string resources in 122 // bundles. 123 StaticPrompt *prompt.StaticPrompt `protobuf:"bytes,2,opt,name=static_prompt,json=staticPrompt,proto3,oneof"` 124} 125 126type EventHandler_StaticPromptName struct { 127 // Name of the static prompt to invoke. 128 StaticPromptName string `protobuf:"bytes,3,opt,name=static_prompt_name,json=staticPromptName,proto3,oneof"` 129} 130 131func (*EventHandler_StaticPrompt) isEventHandler_Prompt() {} 132 133func (*EventHandler_StaticPromptName) isEventHandler_Prompt() {} 134 135var File_google_actions_sdk_v2_interactionmodel_event_handler_proto protoreflect.FileDescriptor 136 137var file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDesc = []byte{ 138 0x0a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 139 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 140 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x68, 141 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x26, 0x67, 0x6f, 142 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x64, 0x6b, 143 0x2e, 0x76, 0x32, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 144 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x63, 0x74, 145 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 146 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 147 0x6d, 0x70, 0x74, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x70, 148 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, 149 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x65, 0x62, 0x68, 150 0x6f, 0x6f, 0x6b, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 151 0x09, 0x52, 0x0e, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 152 0x72, 0x12, 0x62, 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 153 0x70, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 154 0x65, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x76, 0x32, 155 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 156 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x50, 157 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x50, 158 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x12, 0x2e, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 159 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 160 0x09, 0x48, 0x00, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x50, 0x72, 0x6f, 0x6d, 0x70, 161 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x42, 162 0x99, 0x01, 0x0a, 0x2a, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 163 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x76, 0x32, 0x2e, 0x69, 0x6e, 164 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x11, 165 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 166 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 167 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 168 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 169 0x6e, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 170 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 171 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 172 0x74, 0x6f, 0x33, 173} 174 175var ( 176 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDescOnce sync.Once 177 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDescData = file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDesc 178) 179 180func file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDescGZIP() []byte { 181 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDescOnce.Do(func() { 182 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDescData) 183 }) 184 return file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDescData 185} 186 187var file_google_actions_sdk_v2_interactionmodel_event_handler_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 188var file_google_actions_sdk_v2_interactionmodel_event_handler_proto_goTypes = []interface{}{ 189 (*EventHandler)(nil), // 0: google.actions.sdk.v2.interactionmodel.EventHandler 190 (*prompt.StaticPrompt)(nil), // 1: google.actions.sdk.v2.interactionmodel.prompt.StaticPrompt 191} 192var file_google_actions_sdk_v2_interactionmodel_event_handler_proto_depIdxs = []int32{ 193 1, // 0: google.actions.sdk.v2.interactionmodel.EventHandler.static_prompt:type_name -> google.actions.sdk.v2.interactionmodel.prompt.StaticPrompt 194 1, // [1:1] is the sub-list for method output_type 195 1, // [1:1] is the sub-list for method input_type 196 1, // [1:1] is the sub-list for extension type_name 197 1, // [1:1] is the sub-list for extension extendee 198 0, // [0:1] is the sub-list for field type_name 199} 200 201func init() { file_google_actions_sdk_v2_interactionmodel_event_handler_proto_init() } 202func file_google_actions_sdk_v2_interactionmodel_event_handler_proto_init() { 203 if File_google_actions_sdk_v2_interactionmodel_event_handler_proto != nil { 204 return 205 } 206 if !protoimpl.UnsafeEnabled { 207 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 208 switch v := v.(*EventHandler); i { 209 case 0: 210 return &v.state 211 case 1: 212 return &v.sizeCache 213 case 2: 214 return &v.unknownFields 215 default: 216 return nil 217 } 218 } 219 } 220 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_msgTypes[0].OneofWrappers = []interface{}{ 221 (*EventHandler_StaticPrompt)(nil), 222 (*EventHandler_StaticPromptName)(nil), 223 } 224 type x struct{} 225 out := protoimpl.TypeBuilder{ 226 File: protoimpl.DescBuilder{ 227 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 228 RawDescriptor: file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDesc, 229 NumEnums: 0, 230 NumMessages: 1, 231 NumExtensions: 0, 232 NumServices: 0, 233 }, 234 GoTypes: file_google_actions_sdk_v2_interactionmodel_event_handler_proto_goTypes, 235 DependencyIndexes: file_google_actions_sdk_v2_interactionmodel_event_handler_proto_depIdxs, 236 MessageInfos: file_google_actions_sdk_v2_interactionmodel_event_handler_proto_msgTypes, 237 }.Build() 238 File_google_actions_sdk_v2_interactionmodel_event_handler_proto = out.File 239 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_rawDesc = nil 240 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_goTypes = nil 241 file_google_actions_sdk_v2_interactionmodel_event_handler_proto_depIdxs = nil 242} 243