data_file.proto 2.3 KB

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