image.proto 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. option go_package = "google.golang.org/genproto/googleapis/actions/sdk/v2/conversation;conversation";
  17. option java_multiple_files = true;
  18. option java_outer_classname = "ImageProto";
  19. option java_package = "com.google.actions.sdk.v2.conversation";
  20. // An image displayed in the card.
  21. message Image {
  22. // Possible image display options for affecting the presentation of the image.
  23. // This should be used for when the image's aspect ratio does not match the
  24. // image container's aspect ratio.
  25. enum ImageFill {
  26. // Unspecified image fill.
  27. UNSPECIFIED = 0;
  28. // Fill the gaps between the image and the image container with gray bars.
  29. GRAY = 1;
  30. // Fill the gaps between the image and the image container with white bars.
  31. WHITE = 2;
  32. // Image is scaled such that the image width and height match or exceed the
  33. // container dimensions. This may crop the top and bottom of the image if
  34. // the scaled image height is greater than the container height, or crop the
  35. // left and right of the image if the scaled image width is greater than the
  36. // container width. This is similar to "Zoom Mode" on a widescreen TV when
  37. // playing a 4:3 video.
  38. CROPPED = 3;
  39. }
  40. // The source url of the image. Images can be JPG, PNG and GIF (animated and
  41. // non-animated). For example,`https://www.agentx.com/logo.png`. Required.
  42. string url = 1;
  43. // A text description of the image to be used for accessibility, e.g. screen
  44. // readers.
  45. // Required.
  46. string alt = 2;
  47. // The height of the image in pixels.
  48. // Optional.
  49. int32 height = 3;
  50. // The width of the image in pixels.
  51. // Optional.
  52. int32 width = 4;
  53. }