static_media_prompt.proto 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.interactionmodel.prompt;
  16. import "google/actions/sdk/v2/interactionmodel/prompt/content/static_image_prompt.proto";
  17. import "google/protobuf/duration.proto";
  18. option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/interactionmodel/prompt;prompt";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "StaticMediaPromptProto";
  21. option java_package = "com.google.actions.sdk.v2.interactionmodel.prompt";
  22. // Contains information about the media, such as name, description, url, etc.
  23. // Next id: 11
  24. message StaticMediaPrompt {
  25. // Media type of this response.
  26. enum MediaType {
  27. // UNSPECIFIED value
  28. MEDIA_TYPE_UNSPECIFIED = 0;
  29. // Audio file.
  30. AUDIO = 1;
  31. // Response to acknowledge a media status report.
  32. MEDIA_STATUS_ACK = 2;
  33. }
  34. // Media control types the media response can supported optionally
  35. enum OptionalMediaControls {
  36. // Unspecified value
  37. OPTIONAL_MEDIA_CONTROLS_UNSPECIFIED = 0;
  38. // Paused event. Triggered when user pauses the media.
  39. PAUSED = 1;
  40. // Stopped event. Triggered when user exit out 3p session during media play.
  41. STOPPED = 2;
  42. }
  43. // The types of repeat mode for a list of media objects.
  44. enum RepeatMode {
  45. // Equivalent to OFF.
  46. REPEAT_MODE_UNSPECIFIED = 0;
  47. // End media session at the end of the last media object.
  48. OFF = 1;
  49. // Loop to the beginning of the first media object when the end of the last
  50. // media object is reached.
  51. ALL = 2;
  52. }
  53. // Media type of this response.
  54. MediaType media_type = 8;
  55. // Start offset of the first media object.
  56. google.protobuf.Duration start_offset = 5;
  57. // Optional media control types this media response session can support.
  58. // If set, request will be made to 3p when a certain media event happens.
  59. // If not set, 3p must still handle two default control type, FINISHED and
  60. // FAILED.
  61. repeated OptionalMediaControls optional_media_controls = 6;
  62. // List of media objects.
  63. repeated MediaObject media_objects = 7;
  64. // Repeat mode for the list of Media Objects.
  65. RepeatMode repeat_mode = 9;
  66. }
  67. // Represents a single media object.
  68. message MediaObject {
  69. // Name of this media object.
  70. string name = 1;
  71. // Description of this media object.
  72. string description = 2;
  73. // The url pointing to the media content.
  74. string url = 3;
  75. // Image to show with the media card.
  76. MediaImage image = 4;
  77. }
  78. // Image to be shown inside a MediaPrompt.
  79. message MediaImage {
  80. // Only one type of MediaImage is allowed.
  81. oneof image {
  82. // A large image, such as the cover of the album, etc.
  83. StaticImagePrompt large = 1;
  84. // A small image icon displayed on the right from the title.
  85. // It's resized to 36x36 dp.
  86. StaticImagePrompt icon = 2;
  87. }
  88. }