scene.proto 2.9 KB

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