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