tile_response.proto 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. syntax = "proto3";
  5. option optimize_for = LITE_RUNTIME;
  6. package query_tiles.proto;
  7. // URL and id of the image to be displayed on tiles.
  8. message TileImage {
  9. // URL of the image.
  10. string url = 1;
  11. }
  12. // Information about each tile.
  13. message TileInfo {
  14. // id of the tile.
  15. string tile_id = 1;
  16. // The whole query string that will be sent to the search engine if
  17. // user starts searching on this tile.
  18. string query_string = 2;
  19. // Images for this tile. Could be more than one images so that
  20. // client can use fallback URLs if the first one doesn't work. Ordered by
  21. // confidence score from high to low.
  22. repeated TileImage tile_images = 3;
  23. // Text to be displayed on the image, translated to the
  24. // language given in |GetQueryTilesRequest|.
  25. string display_text = 4;
  26. // Text for accessibility purpose.
  27. string accessibility_text = 5;
  28. // Whether this is a top level tile.
  29. bool is_top_level = 6;
  30. // A list sub tiles.
  31. repeated string sub_tile_ids = 7;
  32. // Additional params for the search query.
  33. repeated string search_params = 8;
  34. }
  35. // A group of tile info for a given locale.
  36. message TileInfoGroup {
  37. repeated TileInfo tiles = 1;
  38. // Language for this tile group.
  39. string locale = 2;
  40. }
  41. // Response from the server.
  42. message ServerResponse {
  43. TileInfoGroup tile_group = 1;
  44. }