xref: /aosp_15_r20/external/googleapis/google/actions/sdk/v2/data_file.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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;
18
19option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2;sdk";
20option java_multiple_files = true;
21option java_outer_classname = "DataFileProto";
22option java_package = "com.google.actions.sdk.v2";
23
24// Wrapper for repeated data file. Repeated fields cannot exist in a oneof.
25message DataFiles {
26  // Multiple data files.
27  repeated DataFile data_files = 1;
28}
29
30// Represents a single file which contains unstructured data. Examples include
31// image files, audio files, and cloud function source code.
32message DataFile {
33  // Relative path of the data file from the project root in the SDK file
34  // structure.
35  // Allowed file paths:
36  //     - Images: `resources/images/{multiple
37  //     directories}?/{ImageName}.{extension}`
38  //     - Audio: `resources/audio/{multiple
39  //     directories}?/{AudioFileName}.{extension}`
40  //     - Inline Cloud Function Code: `webhooks/{WebhookName}.zip`
41  // Allowed extensions:
42  //     - Images: `png`, `jpg`, `jpeg`
43  //     - Audio: `mp3`, `mpeg`
44  //     - Inline Cloud Functions: `zip`
45  string file_path = 1;
46
47  // Required. The content type of this asset. Example: `text/html`. The content
48  // type must comply with the specification
49  // (http://www.w3.org/Protocols/rfc1341/4_Content-Type.html).
50  // Cloud functions must be in zip format and the content type should
51  // be `application/zip;zip_type=cloud_function`. The zip_type parameter
52  // indicates that the zip is for a cloud function.
53  string content_type = 2;
54
55  // Content of the data file. Examples would be raw bytes of images, audio
56  // files, or cloud function zip format.
57  // There is 10 MB strict limit on the payload size.
58  bytes payload = 3;
59}
60