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 15syntax = "proto3"; 16 17package google.actions.sdk.v2.interactionmodel.type; 18 19import "google/actions/sdk/v2/interactionmodel/type/free_text_type.proto"; 20import "google/actions/sdk/v2/interactionmodel/type/regular_expression_type.proto"; 21import "google/actions/sdk/v2/interactionmodel/type/synonym_type.proto"; 22 23option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/type"; 24option java_multiple_files = true; 25option java_outer_classname = "TypeProto"; 26option java_package = "com.google.actions.sdk.v2.interactionmodel.type"; 27 28// Declaration of a custom type, as opposed to built-in types. Types can be 29// assigned to slots in a scene or parameters of an intent's training phrases. 30// Practically, Types can be thought of as enums. 31// Note, type name is specified in the name of the file. 32message Type { 33 // Selection of sub type based on the type of matching to be done. 34 oneof sub_type { 35 // Synonyms type, which is essentially an enum. 36 SynonymType synonym = 1; 37 38 // Regex type, allows regular expression matching. 39 RegularExpressionType regular_expression = 2; 40 41 // FreeText type. 42 FreeTextType free_text = 3; 43 } 44 45 // Set of exceptional words/phrases that shouldn't be matched by type. 46 // Note: If word/phrase is matched by the type but listed as an exclusion it 47 // won't be returned in parameter extraction result. 48 // **This field is localizable.** 49 repeated string exclusions = 4; 50} 51