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 com.google.android.libraries.mobiledatadownload; 17*6fa6b5e2SAndroid Build Coastguard Worker 18*6fa6b5e2SAndroid Build Coastguard Workerimport "google/protobuf/any.proto"; 19*6fa6b5e2SAndroid Build Coastguard Worker 20*6fa6b5e2SAndroid Build Coastguard Workeroption java_package = "com.google.mobiledatadownload"; 21*6fa6b5e2SAndroid Build Coastguard Workeroption java_outer_classname = "ClientConfigProto"; 22*6fa6b5e2SAndroid Build Coastguard Workeroption objc_class_prefix = "ICN"; 23*6fa6b5e2SAndroid Build Coastguard Worker 24*6fa6b5e2SAndroid Build Coastguard Worker// Next id: 15 25*6fa6b5e2SAndroid Build Coastguard Workermessage ClientFileGroup { 26*6fa6b5e2SAndroid Build Coastguard Worker // Unique name to identify the group, that the client wants to read. 27*6fa6b5e2SAndroid Build Coastguard Worker optional string group_name = 1; 28*6fa6b5e2SAndroid Build Coastguard Worker 29*6fa6b5e2SAndroid Build Coastguard Worker optional string owner_package = 3; 30*6fa6b5e2SAndroid Build Coastguard Worker 31*6fa6b5e2SAndroid Build Coastguard Worker // The account associated to the file group. 32*6fa6b5e2SAndroid Build Coastguard Worker optional string account = 6; 33*6fa6b5e2SAndroid Build Coastguard Worker 34*6fa6b5e2SAndroid Build Coastguard Worker optional int32 version_number = 4; 35*6fa6b5e2SAndroid Build Coastguard Worker 36*6fa6b5e2SAndroid Build Coastguard Worker enum Status { 37*6fa6b5e2SAndroid Build Coastguard Worker UNSPECIFIED = 0; 38*6fa6b5e2SAndroid Build Coastguard Worker 39*6fa6b5e2SAndroid Build Coastguard Worker // This group is downloaded and ready to use. 40*6fa6b5e2SAndroid Build Coastguard Worker DOWNLOADED = 1; 41*6fa6b5e2SAndroid Build Coastguard Worker 42*6fa6b5e2SAndroid Build Coastguard Worker // This group is pending download, and should be downloaded by calling 43*6fa6b5e2SAndroid Build Coastguard Worker // the download API before it can be used. 44*6fa6b5e2SAndroid Build Coastguard Worker // 45*6fa6b5e2SAndroid Build Coastguard Worker // file.file_uri will not be set if the status is set to pending. 46*6fa6b5e2SAndroid Build Coastguard Worker PENDING = 2; 47*6fa6b5e2SAndroid Build Coastguard Worker 48*6fa6b5e2SAndroid Build Coastguard Worker // This group has finished downloading, but custom validation has 49*6fa6b5e2SAndroid Build Coastguard Worker // not yet been performed. This state is only expected to be seen 50*6fa6b5e2SAndroid Build Coastguard Worker // in the CustomFileGroupValidator. 51*6fa6b5e2SAndroid Build Coastguard Worker PENDING_CUSTOM_VALIDATION = 3; 52*6fa6b5e2SAndroid Build Coastguard Worker } 53*6fa6b5e2SAndroid Build Coastguard Worker 54*6fa6b5e2SAndroid Build Coastguard Worker // Status of the client file group. 55*6fa6b5e2SAndroid Build Coastguard Worker optional Status status = 5; 56*6fa6b5e2SAndroid Build Coastguard Worker 57*6fa6b5e2SAndroid Build Coastguard Worker // List of files in the group. 58*6fa6b5e2SAndroid Build Coastguard Worker repeated ClientFile file = 2; 59*6fa6b5e2SAndroid Build Coastguard Worker 60*6fa6b5e2SAndroid Build Coastguard Worker // Unique identifier of a DataFileGroup config (i.e. a "snapshot") created 61*6fa6b5e2SAndroid Build Coastguard Worker // when using MDD Ingress API. 62*6fa6b5e2SAndroid Build Coastguard Worker // 63*6fa6b5e2SAndroid Build Coastguard Worker // NOTE: This field name and description are not finalized yet! Reach out to 64*6fa6b5e2SAndroid Build Coastguard Worker // <internal>@ to discuss using this field. 65*6fa6b5e2SAndroid Build Coastguard Worker optional int64 build_id = 8; 66*6fa6b5e2SAndroid Build Coastguard Worker 67*6fa6b5e2SAndroid Build Coastguard Worker // A fingerprint allowing clients to identify a DataFileGroup 68*6fa6b5e2SAndroid Build Coastguard Worker // config based on a given set of properties (i.e. a "partition" of 69*6fa6b5e2SAndroid Build Coastguard Worker // any file group properties). This can be used by clients as an exact match 70*6fa6b5e2SAndroid Build Coastguard Worker // for a class of DataFileGroups during targeting or as a compatibility check. 71*6fa6b5e2SAndroid Build Coastguard Worker // 72*6fa6b5e2SAndroid Build Coastguard Worker // NOTE: This field name and description are not finalized yet! Reach out to 73*6fa6b5e2SAndroid Build Coastguard Worker // <internal>@ to discuss using this field. 74*6fa6b5e2SAndroid Build Coastguard Worker optional string variant_id = 12; 75*6fa6b5e2SAndroid Build Coastguard Worker 76*6fa6b5e2SAndroid Build Coastguard Worker // The locales compatible with the file group. This can be different from the 77*6fa6b5e2SAndroid Build Coastguard Worker // device locale. 78*6fa6b5e2SAndroid Build Coastguard Worker // 79*6fa6b5e2SAndroid Build Coastguard Worker // Values in this list may be exact locales (e.g. "en-US") or language-only 80*6fa6b5e2SAndroid Build Coastguard Worker // ("en-*"). 81*6fa6b5e2SAndroid Build Coastguard Worker // Example 1: locale = ["en-US"]; // compatible with "en-US" only 82*6fa6b5e2SAndroid Build Coastguard Worker // Example 2: locale = ["en-US", "en-CA"]; // compatible with "en-US" or 83*6fa6b5e2SAndroid Build Coastguard Worker // // "en-CA" 84*6fa6b5e2SAndroid Build Coastguard Worker // Example 3: locale = ["en-*"]; // compatible with all "en" locales 85*6fa6b5e2SAndroid Build Coastguard Worker repeated string locale = 10; 86*6fa6b5e2SAndroid Build Coastguard Worker 87*6fa6b5e2SAndroid Build Coastguard Worker reserved 11; 88*6fa6b5e2SAndroid Build Coastguard Worker 89*6fa6b5e2SAndroid Build Coastguard Worker // Custom metadata attached to the group. 90*6fa6b5e2SAndroid Build Coastguard Worker // 91*6fa6b5e2SAndroid Build Coastguard Worker // This allows clients to include specific metadata about the group for their 92*6fa6b5e2SAndroid Build Coastguard Worker // own processing purposes. The metadata must be included when the group is 93*6fa6b5e2SAndroid Build Coastguard Worker // added to MDD, then it will be available here when retrieving the group. 94*6fa6b5e2SAndroid Build Coastguard Worker // 95*6fa6b5e2SAndroid Build Coastguard Worker // This property should only be used if absolutely necessary. Please consult 96*6fa6b5e2SAndroid Build Coastguard Worker // with <internal>@ if you have questions about this property or a potential 97*6fa6b5e2SAndroid Build Coastguard Worker // use-case. 98*6fa6b5e2SAndroid Build Coastguard Worker optional .google.protobuf.Any custom_metadata = 13; 99*6fa6b5e2SAndroid Build Coastguard Worker 100*6fa6b5e2SAndroid Build Coastguard Worker reserved 14; 101*6fa6b5e2SAndroid Build Coastguard Worker 102*6fa6b5e2SAndroid Build Coastguard Worker reserved 7, 9; 103*6fa6b5e2SAndroid Build Coastguard Worker} 104*6fa6b5e2SAndroid Build Coastguard Worker 105*6fa6b5e2SAndroid Build Coastguard Worker// Next id: 6 106*6fa6b5e2SAndroid Build Coastguard Workermessage ClientFile { 107*6fa6b5e2SAndroid Build Coastguard Worker // Unique name to identify the file within the group. 108*6fa6b5e2SAndroid Build Coastguard Worker optional string file_id = 1; 109*6fa6b5e2SAndroid Build Coastguard Worker 110*6fa6b5e2SAndroid Build Coastguard Worker // File Uri that can be opened using FileStorage library (<internal>). 111*6fa6b5e2SAndroid Build Coastguard Worker optional string file_uri = 2; 112*6fa6b5e2SAndroid Build Coastguard Worker 113*6fa6b5e2SAndroid Build Coastguard Worker // The full size of the file as specified in byte_size field of the config 114*6fa6b5e2SAndroid Build Coastguard Worker // given to MDD. For files unzipped from zip file with zip download 115*6fa6b5e2SAndroid Build Coastguard Worker // transforms, it will be the actual file size on disk. 116*6fa6b5e2SAndroid Build Coastguard Worker optional int32 full_size_in_bytes = 3; 117*6fa6b5e2SAndroid Build Coastguard Worker 118*6fa6b5e2SAndroid Build Coastguard Worker // The download size of the file as specified in downloaded_file_byte_size 119*6fa6b5e2SAndroid Build Coastguard Worker // field (<internal>) of the 120*6fa6b5e2SAndroid Build Coastguard Worker // config given to MDD. It could be used to track and calculate the download 121*6fa6b5e2SAndroid Build Coastguard Worker // progress. 122*6fa6b5e2SAndroid Build Coastguard Worker optional int32 download_size_in_bytes = 4; 123*6fa6b5e2SAndroid Build Coastguard Worker 124*6fa6b5e2SAndroid Build Coastguard Worker // Custom metadata attached to the file 125*6fa6b5e2SAndroid Build Coastguard Worker // 126*6fa6b5e2SAndroid Build Coastguard Worker // This allows clients to include specific metadata about the file for their 127*6fa6b5e2SAndroid Build Coastguard Worker // own processing purposes. The metadata must be included when the file's 128*6fa6b5e2SAndroid Build Coastguard Worker // group is added to MDD, then it will be available here when retrieving the 129*6fa6b5e2SAndroid Build Coastguard Worker // containing group. 130*6fa6b5e2SAndroid Build Coastguard Worker // 131*6fa6b5e2SAndroid Build Coastguard Worker // This property should only be used if absolutely necessary. Please consult 132*6fa6b5e2SAndroid Build Coastguard Worker // with <internal>@ if you have questions about this property or a potential 133*6fa6b5e2SAndroid Build Coastguard Worker // use-case. 134*6fa6b5e2SAndroid Build Coastguard Worker optional .google.protobuf.Any custom_metadata = 5; 135*6fa6b5e2SAndroid Build Coastguard Worker} 136