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