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