...

Source file src/google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/conditional_event.pb.go

Documentation: google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel

     1  // Copyright 2024 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        v4.24.4
    19  // source: google/actions/sdk/v2/interactionmodel/conditional_event.proto
    20  
    21  package interactionmodel
    22  
    23  import (
    24  	reflect "reflect"
    25  	sync "sync"
    26  
    27  	_ "google.golang.org/genproto/googleapis/api/annotations"
    28  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    29  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    30  )
    31  
    32  const (
    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  // Registers events that trigger as the result of a true condition.
    40  type ConditionalEvent struct {
    41  	state         protoimpl.MessageState
    42  	sizeCache     protoimpl.SizeCache
    43  	unknownFields protoimpl.UnknownFields
    44  
    45  	// Required. Filter condition for this event to trigger. If condition is evaluated to
    46  	// true then the associated `handler` will be triggered.
    47  	// The following variable references are supported:
    48  	//
    49  	//	`$session` - To reference data in session storage.
    50  	//	`$user` - To reference data in user storage.
    51  	//
    52  	// The following boolean operators are supported (with examples):
    53  	//
    54  	//	`&&` - `session.params.counter > 0 && session.params.counter < 100`
    55  	//	`||` - `session.params.foo == "John" || session.params.counter == "Adam"`
    56  	//	`!`  - `!(session.params.counter == 5)`
    57  	//
    58  	// The following comparisons are supported:
    59  	//
    60  	//	`==`, `!=`, `<`, `>`, `<=`, `>=`
    61  	//
    62  	// The following list and string operators are supported (with examples):
    63  	//
    64  	//	`in`        - "Watermelon" in `session.params.fruitList`
    65  	//	`size`      - `size(session.params.fruitList) > 2`
    66  	//	`substring` - `session.params.fullName.contains("John")`
    67  	Condition string `protobuf:"bytes,1,opt,name=condition,proto3" json:"condition,omitempty"`
    68  	// Optional. Destination scene which the conversation should jump to when the associated
    69  	// condition is evaluated to true. The state of the current scene is destroyed
    70  	// on the transition.
    71  	TransitionToScene string `protobuf:"bytes,2,opt,name=transition_to_scene,json=transitionToScene,proto3" json:"transition_to_scene,omitempty"`
    72  	// Optional. Event handler which is triggered when the associated condition is evaluated
    73  	// to `true`. Should execute before transitioning to the destination scene.
    74  	// Useful to generate Prompts in response to events.
    75  	Handler *EventHandler `protobuf:"bytes,3,opt,name=handler,proto3" json:"handler,omitempty"`
    76  }
    77  
    78  func (x *ConditionalEvent) Reset() {
    79  	*x = ConditionalEvent{}
    80  	if protoimpl.UnsafeEnabled {
    81  		mi := &file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_msgTypes[0]
    82  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    83  		ms.StoreMessageInfo(mi)
    84  	}
    85  }
    86  
    87  func (x *ConditionalEvent) String() string {
    88  	return protoimpl.X.MessageStringOf(x)
    89  }
    90  
    91  func (*ConditionalEvent) ProtoMessage() {}
    92  
    93  func (x *ConditionalEvent) ProtoReflect() protoreflect.Message {
    94  	mi := &file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_msgTypes[0]
    95  	if protoimpl.UnsafeEnabled && x != nil {
    96  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    97  		if ms.LoadMessageInfo() == nil {
    98  			ms.StoreMessageInfo(mi)
    99  		}
   100  		return ms
   101  	}
   102  	return mi.MessageOf(x)
   103  }
   104  
   105  // Deprecated: Use ConditionalEvent.ProtoReflect.Descriptor instead.
   106  func (*ConditionalEvent) Descriptor() ([]byte, []int) {
   107  	return file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDescGZIP(), []int{0}
   108  }
   109  
   110  func (x *ConditionalEvent) GetCondition() string {
   111  	if x != nil {
   112  		return x.Condition
   113  	}
   114  	return ""
   115  }
   116  
   117  func (x *ConditionalEvent) GetTransitionToScene() string {
   118  	if x != nil {
   119  		return x.TransitionToScene
   120  	}
   121  	return ""
   122  }
   123  
   124  func (x *ConditionalEvent) GetHandler() *EventHandler {
   125  	if x != nil {
   126  		return x.Handler
   127  	}
   128  	return nil
   129  }
   130  
   131  var File_google_actions_sdk_v2_interactionmodel_conditional_event_proto protoreflect.FileDescriptor
   132  
   133  var file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDesc = []byte{
   134  	0x0a, 0x3e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
   135  	0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74,
   136  	0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
   137  	0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   138  	0x12, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
   139  	0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x76, 0x32, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74,
   140  	0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x1a, 0x3a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
   141  	0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x32, 0x2f,
   142  	0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
   143  	0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x2e, 0x70,
   144  	0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
   145  	0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e,
   146  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbf, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74,
   147  	0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x21, 0x0a, 0x09, 0x63, 0x6f,
   148  	0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0,
   149  	0x41, 0x02, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a,
   150  	0x13, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x5f, 0x73,
   151  	0x63, 0x65, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52,
   152  	0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x53, 0x63, 0x65,
   153  	0x6e, 0x65, 0x12, 0x53, 0x0a, 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20,
   154  	0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x74,
   155  	0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x76, 0x32, 0x2e, 0x69, 0x6e, 0x74, 0x65,
   156  	0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x76, 0x65,
   157  	0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07,
   158  	0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x42, 0x9d, 0x01, 0x0a, 0x2a, 0x63, 0x6f, 0x6d, 0x2e,
   159  	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x73,
   160  	0x64, 0x6b, 0x2e, 0x76, 0x32, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f,
   161  	0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x42, 0x15, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f,
   162  	0x6e, 0x61, 0x6c, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
   163  	0x56, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f,
   164  	0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67,
   165  	0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,
   166  	0x64, 0x6b, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f,
   167  	0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x3b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x61, 0x63, 0x74, 0x69,
   168  	0x6f, 0x6e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   169  }
   170  
   171  var (
   172  	file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDescOnce sync.Once
   173  	file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDescData = file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDesc
   174  )
   175  
   176  func file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDescGZIP() []byte {
   177  	file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDescOnce.Do(func() {
   178  		file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDescData)
   179  	})
   180  	return file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDescData
   181  }
   182  
   183  var file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   184  var file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_goTypes = []interface{}{
   185  	(*ConditionalEvent)(nil), // 0: google.actions.sdk.v2.interactionmodel.ConditionalEvent
   186  	(*EventHandler)(nil),     // 1: google.actions.sdk.v2.interactionmodel.EventHandler
   187  }
   188  var file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_depIdxs = []int32{
   189  	1, // 0: google.actions.sdk.v2.interactionmodel.ConditionalEvent.handler:type_name -> google.actions.sdk.v2.interactionmodel.EventHandler
   190  	1, // [1:1] is the sub-list for method output_type
   191  	1, // [1:1] is the sub-list for method input_type
   192  	1, // [1:1] is the sub-list for extension type_name
   193  	1, // [1:1] is the sub-list for extension extendee
   194  	0, // [0:1] is the sub-list for field type_name
   195  }
   196  
   197  func init() { file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_init() }
   198  func file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_init() {
   199  	if File_google_actions_sdk_v2_interactionmodel_conditional_event_proto != nil {
   200  		return
   201  	}
   202  	file_google_actions_sdk_v2_interactionmodel_event_handler_proto_init()
   203  	if !protoimpl.UnsafeEnabled {
   204  		file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   205  			switch v := v.(*ConditionalEvent); i {
   206  			case 0:
   207  				return &v.state
   208  			case 1:
   209  				return &v.sizeCache
   210  			case 2:
   211  				return &v.unknownFields
   212  			default:
   213  				return nil
   214  			}
   215  		}
   216  	}
   217  	type x struct{}
   218  	out := protoimpl.TypeBuilder{
   219  		File: protoimpl.DescBuilder{
   220  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   221  			RawDescriptor: file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDesc,
   222  			NumEnums:      0,
   223  			NumMessages:   1,
   224  			NumExtensions: 0,
   225  			NumServices:   0,
   226  		},
   227  		GoTypes:           file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_goTypes,
   228  		DependencyIndexes: file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_depIdxs,
   229  		MessageInfos:      file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_msgTypes,
   230  	}.Build()
   231  	File_google_actions_sdk_v2_interactionmodel_conditional_event_proto = out.File
   232  	file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_rawDesc = nil
   233  	file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_goTypes = nil
   234  	file_google_actions_sdk_v2_interactionmodel_conditional_event_proto_depIdxs = nil
   235  }
   236  

View as plain text