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.conversation; 18 19import "google/actions/sdk/v2/conversation/prompt/prompt.proto"; 20import "google/protobuf/struct.proto"; 21 22option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation"; 23option java_multiple_files = true; 24option java_outer_classname = "SceneProto"; 25option java_package = "com.google.actions.sdk.v2.conversation"; 26 27// Represents the current status of slot filling. 28enum SlotFillingStatus { 29 // Fallback value when the usage field is not populated. 30 UNSPECIFIED = 0; 31 32 // The slots have been initialized but slot filling has not started. 33 INITIALIZED = 1; 34 35 // The slot values are being collected. 36 COLLECTING = 2; 37 38 // All slot values are final and cannot be changed. 39 FINAL = 4; 40} 41 42// Represents a slot. 43message Slot { 44 // Represents the mode of a slot, that is, if it is required or not. 45 enum SlotMode { 46 // Fallback value when the usage field is not populated. 47 MODE_UNSPECIFIED = 0; 48 49 // Indicates that the slot is not required to complete slot filling. 50 OPTIONAL = 1; 51 52 // Indicates that the slot is required to complete slot filling. 53 REQUIRED = 2; 54 } 55 56 // Represents the status of a slot. 57 enum SlotStatus { 58 // Fallback value when the usage field is not populated. 59 SLOT_UNSPECIFIED = 0; 60 61 // Indicates that the slot does not have any values. This status cannot be 62 // modified through the response. 63 EMPTY = 1; 64 65 // Indicates that the slot value is invalid. This status can be set 66 // through the response. 67 INVALID = 2; 68 69 // Indicates that the slot has a value. This status cannot be modified 70 // through the response. 71 FILLED = 3; 72 } 73 74 // The mode of the slot (required or optional). Can be set by developer. 75 SlotMode mode = 1; 76 77 // The status of the slot. 78 SlotStatus status = 2; 79 80 // The value of the slot. Changing this value in the response, will 81 // modify the value in slot filling. 82 google.protobuf.Value value = 3; 83 84 // Indicates if the slot value was collected on the last turn. 85 // This field is read-only. 86 bool updated = 4; 87 88 // Optional. This prompt is sent to the user when needed to fill a required 89 // slot. This prompt overrides the existing prompt defined in the console. 90 // This field is not included in the webhook request. 91 Prompt prompt = 5; 92} 93