• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/content/image.proto";
20import "google/protobuf/duration.proto";
21
22option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
23option java_multiple_files = true;
24option java_outer_classname = "MediaProto";
25option java_package = "com.google.actions.sdk.v2.conversation";
26
27// Represents one media object.
28// Contains information about the media, such as name, description, url, etc.
29message Media {
30  // Media type of this response.
31  enum MediaType {
32    // Unspecified media type.
33    MEDIA_TYPE_UNSPECIFIED = 0;
34
35    // Audio file.
36    AUDIO = 1;
37
38    // Response to acknowledge a media status report.
39    MEDIA_STATUS_ACK = 2;
40  }
41
42  // Optional media control types the media response can support
43  enum OptionalMediaControls {
44    // Unspecified value
45    OPTIONAL_MEDIA_CONTROLS_UNSPECIFIED = 0;
46
47    // Paused event. Triggered when user pauses the media.
48    PAUSED = 1;
49
50    // Stopped event. Triggered when user exits out of 3p session during media
51    // play.
52    STOPPED = 2;
53  }
54
55  // Media type.
56  MediaType media_type = 8;
57
58  // Start offset of the first media object.
59  google.protobuf.Duration start_offset = 5;
60
61  // Optional media control types this media response session can support.
62  // If set, request will be made to 3p when a certain media event happens.
63  // If not set, 3p must still handle two default control type, FINISHED and
64  // FAILED.
65  repeated OptionalMediaControls optional_media_controls = 6;
66
67  // List of Media Objects
68  repeated MediaObject media_objects = 7;
69}
70
71// Represents a single media object
72message MediaObject {
73  // Name of this media object.
74  string name = 1;
75
76  // Description of this media object.
77  string description = 2;
78
79  // The url pointing to the media content.
80  string url = 3;
81
82  // Image to show with the media card.
83  MediaImage image = 4;
84}
85
86// Image to show with the media card.
87message MediaImage {
88  // Image.
89  oneof image {
90    // A large image, such as the cover of the album, etc.
91    Image large = 1;
92
93    // A small image icon displayed on the right from the title.
94    // It's resized to 36x36 dp.
95    Image icon = 2;
96  }
97}
98