| // Copyright 2020 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| option optimize_for = LITE_RUNTIME; |
| |
| package query_tiles.proto; |
| |
| // The Tile is the schema to represent data in entries. |
| // Next tag: 7 |
| message Tile { |
| // Metadata about the image. |
| // Next tag: 2 |
| message ImageMetadata { |
| // URL of the image. |
| string url = 1; |
| } |
| |
| // Unique id of a query tile entry. |
| string id = 1; |
| |
| // Text of query that send to the search engine. |
| string query_text = 2; |
| |
| // Text for accessibility purposes. |
| string display_text = 3; |
| |
| // Counterpart of |display_text| for accessibility purposes. |
| string accessibility_text = 4; |
| |
| // A list of image metadatas. |
| repeated ImageMetadata image_metadatas = 5; |
| |
| // Sub level children. |
| repeated Tile sub_tiles = 6; |
| |
| // Additional params for the search query. |
| repeated string search_params = 7; |
| } |
| |
| // Stats of the tile. Used for ranking tiles. |
| // Next tag: 3 |
| message TileStats { |
| // Timestamp when the tile is last clicked, in ms. |
| int64 last_clicked_time_ms = 1; |
| |
| // Score of the tile, used for ranking. |
| double score = 2; |
| } |
| |
| // Data schema of a group of entries and its metadata. |
| // Next tag: 6 |
| message TileGroup { |
| // Unique id of each group. |
| string id = 1; |
| |
| // Locale setting of this group. |
| string locale = 2; |
| |
| // Last updated timestamp in ms; |
| int64 last_updated_time_ms = 3; |
| |
| // Top level tiles; |
| repeated Tile tiles = 4; |
| |
| // Map from tile id to its stats. |
| map<string, TileStats> tile_stats = 5; |
| } |