1*6fa6b5e2SAndroid Build Coastguard Worker// Copyright 2022 Google LLC 2*6fa6b5e2SAndroid Build Coastguard Worker// 3*6fa6b5e2SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*6fa6b5e2SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*6fa6b5e2SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*6fa6b5e2SAndroid Build Coastguard Worker// 7*6fa6b5e2SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*6fa6b5e2SAndroid Build Coastguard Worker// 9*6fa6b5e2SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*6fa6b5e2SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*6fa6b5e2SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*6fa6b5e2SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*6fa6b5e2SAndroid Build Coastguard Worker// limitations under the License. 14*6fa6b5e2SAndroid Build Coastguard Workersyntax = "proto2"; 15*6fa6b5e2SAndroid Build Coastguard Worker 16*6fa6b5e2SAndroid Build Coastguard Workerpackage mobiledatadownload.logs; 17*6fa6b5e2SAndroid Build Coastguard Worker 18*6fa6b5e2SAndroid Build Coastguard Workeroption java_multiple_files = true; 19*6fa6b5e2SAndroid Build Coastguard Workeroption java_package = "com.google.mobiledatadownload"; 20*6fa6b5e2SAndroid Build Coastguard Workeroption java_outer_classname = "AtomsProto"; 21*6fa6b5e2SAndroid Build Coastguard Worker 22*6fa6b5e2SAndroid Build Coastguard Worker/** 23*6fa6b5e2SAndroid Build Coastguard Worker * These protos are duplicates of the MobileDataDownload protos logged as 24*6fa6b5e2SAndroid Build Coastguard Worker * MODE_BYTES in <internal>. 25*6fa6b5e2SAndroid Build Coastguard Worker * TODO(b/243579271): remove this duplication 26*6fa6b5e2SAndroid Build Coastguard Worker */ 27*6fa6b5e2SAndroid Build Coastguard Worker 28*6fa6b5e2SAndroid Build Coastguard Worker/** Shared data among MobileDataDownload statistics. Not meant to be a top level 29*6fa6b5e2SAndroid Build Coastguard Worker * atom proto.*/ 30*6fa6b5e2SAndroid Build Coastguard Workermessage MobileDataDownloadFileGroupStats { 31*6fa6b5e2SAndroid Build Coastguard Worker // The name of the file group. This a string set server side used to retrieve 32*6fa6b5e2SAndroid Build Coastguard Worker // the files. Does not contain PII. 33*6fa6b5e2SAndroid Build Coastguard Worker optional string file_group_name = 1; 34*6fa6b5e2SAndroid Build Coastguard Worker // Allows the clients to identify a file group based on a given set of 35*6fa6b5e2SAndroid Build Coastguard Worker // properties. This string is set server side and does not contain PII. 36*6fa6b5e2SAndroid Build Coastguard Worker optional string variant_id = 2; 37*6fa6b5e2SAndroid Build Coastguard Worker // Identifier for the data file group created to identify the version of the 38*6fa6b5e2SAndroid Build Coastguard Worker // file group. 39*6fa6b5e2SAndroid Build Coastguard Worker optional int64 build_id = 3; 40*6fa6b5e2SAndroid Build Coastguard Worker // The number of files in the file group. 41*6fa6b5e2SAndroid Build Coastguard Worker optional int32 file_count = 4; 42*6fa6b5e2SAndroid Build Coastguard Worker // Whether the file group has an account associated with it. 43*6fa6b5e2SAndroid Build Coastguard Worker optional bool has_account = 5; 44*6fa6b5e2SAndroid Build Coastguard Worker // Inverse of the sampling rate used to sample this event. 45*6fa6b5e2SAndroid Build Coastguard Worker optional int32 sampling_interval = 6; 46*6fa6b5e2SAndroid Build Coastguard Worker // Note: we do not have owner_package since that's already transmitted. 47*6fa6b5e2SAndroid Build Coastguard Worker} 48*6fa6b5e2SAndroid Build Coastguard Worker 49*6fa6b5e2SAndroid Build Coastguard Worker/** 50*6fa6b5e2SAndroid Build Coastguard Worker * Container for MobileDataDownloadFileGroupStorageStats 51*6fa6b5e2SAndroid Build Coastguard Worker */ 52*6fa6b5e2SAndroid Build Coastguard Workermessage MobileDataDownloadStorageStats { 53*6fa6b5e2SAndroid Build Coastguard Worker repeated MobileDataDownloadFileGroupStorageStats 54*6fa6b5e2SAndroid Build Coastguard Worker mobile_data_download_file_group_storage_stats = 1; 55*6fa6b5e2SAndroid Build Coastguard Worker} 56*6fa6b5e2SAndroid Build Coastguard Worker 57*6fa6b5e2SAndroid Build Coastguard Worker/** 58*6fa6b5e2SAndroid Build Coastguard Worker * Storage stats for a single file group. This is logged as a nested field and 59*6fa6b5e2SAndroid Build Coastguard Worker * is not meant to be logged as a top level proto. 60*6fa6b5e2SAndroid Build Coastguard Worker */ 61*6fa6b5e2SAndroid Build Coastguard Workermessage MobileDataDownloadFileGroupStorageStats { 62*6fa6b5e2SAndroid Build Coastguard Worker // The total number of bytes used by this file group 63*6fa6b5e2SAndroid Build Coastguard Worker optional int64 total_bytes_used = 1; 64*6fa6b5e2SAndroid Build Coastguard Worker // The total number of inline file bytes used by this file group 65*6fa6b5e2SAndroid Build Coastguard Worker optional int64 total_inline_bytes_used = 2; 66*6fa6b5e2SAndroid Build Coastguard Worker // The number of bytes used for the downloaded version of the file group 67*6fa6b5e2SAndroid Build Coastguard Worker optional int64 downloaded_group_bytes_used = 3; 68*6fa6b5e2SAndroid Build Coastguard Worker // Specifies which file group this storage is associated with 69*6fa6b5e2SAndroid Build Coastguard Worker optional MobileDataDownloadFileGroupStats file_group_stats = 4; 70*6fa6b5e2SAndroid Build Coastguard Worker} 71