static_image_prompt.proto 2.5 KB

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