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 = "proto3"; 15 16package mobiledatadownload.logs; 17 18option java_package = "com.google.mobiledatadownload"; 19option java_outer_classname = "LogEnumsProto"; 20 21// MDD client side events used for logging with MddLogData. 22// 23// Each feature gets a range of 1000 enums starting at X000. 1st enum specifies 24// if the feature is enabled. Subsequent 999 enums can be used to define events 25// within the feature. Unused enums in the range are left for future use for 26// the *same* feature. 27// If a feature ever exhausts it's quota of enums, it should be migrated to a 28// new range of contiguous 2000 enums by deprecating the existing enums. 29// 30// Enums should never be deleted or reused, but they can be renamed*. Old enums 31// should be left in their position with [deprecated=true] attribute. 32// 33// * For renaming enums, see <internal> 34message MddClientEvent { 35 enum Code { 36 // Do not use this default value. 37 EVENT_CODE_UNSPECIFIED = 0; 38 39 // Events for Mobile Data Download (<internal>) (1000-1999). 40 // Next enum for data download: 1114 41 42 // Log in a periodic tasks. 43 // Logged with DataDownloadFileGroupStats, MddFileGroupStatus. 44 DATA_DOWNLOAD_FILE_GROUP_STATUS = 1044; 45 46 // Log MddStorageStats in daily maintenance. 47 DATA_DOWNLOAD_STORAGE_STATS = 1055; 48 49 // MDD download result log. 50 DATA_DOWNLOAD_RESULT_LOG = 1068; 51 52 reserved 1000 to 1043, 1045 to 1054, 1056 to 1067, 1069 to 1113; 53 54 reserved 2000 to 2999, 3000 to 3999, 4000 to 4099, 4100 to 4199, 55 5000 to 5999, 6000 to 6999, 7000 to 7999, 8000 to 8999, 9000 to 9999, 56 10000 to 10999, 11000 to 11999, 12000 to 12999, 13000, 13999, 57 14000 to 14999, 15000 to 15999, 16000 to 16999, 17000 to 17999, 58 18000 to 18999, 19000 to 19999; 59 } 60} 61 62message MddFileGroupDownloadStatus { 63 enum Code { 64 INVALID = 0; 65 COMPLETE = 1; 66 PENDING = 2; 67 FAILED = 3; 68 } 69} 70 71// Result of MDD download api call. 72message MddDownloadResult { 73 enum Code { 74 UNSPECIFIED = 0; // unset value 75 76 // File downloaded successfully. 77 SUCCESS = 1; 78 79 // The error we don't know. 80 UNKNOWN_ERROR = 2; 81 82 // The errors from the android downloader v1 outside MDD, which comes from: 83 // <internal> 84 // The block 100-199 (included) is reserved for android downloader v1. 85 // Next tag: 112 86 ANDROID_DOWNLOADER_UNKNOWN = 100; 87 ANDROID_DOWNLOADER_CANCELED = 101; 88 ANDROID_DOWNLOADER_INVALID_REQUEST = 102; 89 ANDROID_DOWNLOADER_HTTP_ERROR = 103; 90 ANDROID_DOWNLOADER_REQUEST_ERROR = 104; 91 ANDROID_DOWNLOADER_RESPONSE_OPEN_ERROR = 105; 92 ANDROID_DOWNLOADER_RESPONSE_CLOSE_ERROR = 106; 93 ANDROID_DOWNLOADER_NETWORK_IO_ERROR = 107; 94 ANDROID_DOWNLOADER_DISK_IO_ERROR = 108; 95 ANDROID_DOWNLOADER_FILE_SYSTEM_ERROR = 109; 96 ANDROID_DOWNLOADER_UNKNOWN_IO_ERROR = 110; 97 ANDROID_DOWNLOADER_OAUTH_ERROR = 111; 98 99 // The errors from the android downloader v2 outside MDD, which comes from: 100 // <internal> 101 // The block 200-299 (included) is reserved for android downloader v2. 102 // Next tag: 201 103 ANDROID_DOWNLOADER2_ERROR = 200; 104 105 // The data file group has not been added to MDD by the time the caller 106 // makes download API call. 107 GROUP_NOT_FOUND_ERROR = 300; 108 109 // The DownloadListener is present but the DownloadMonitor is not provided. 110 DOWNLOAD_MONITOR_NOT_PROVIDED_ERROR = 301; 111 112 // Errors from unsatisfied download preconditions. 113 INSECURE_URL_ERROR = 302; 114 LOW_DISK_ERROR = 303; 115 116 // Errors from download preparation. 117 UNABLE_TO_CREATE_FILE_URI_ERROR = 304; 118 SHARED_FILE_NOT_FOUND_ERROR = 305; 119 MALFORMED_FILE_URI_ERROR = 306; 120 UNABLE_TO_CREATE_MOBSTORE_RESPONSE_WRITER_ERROR = 307; 121 122 // Errors from file validation. 123 UNABLE_TO_VALIDATE_DOWNLOAD_FILE_ERROR = 308; 124 DOWNLOADED_FILE_NOT_FOUND_ERROR = 309; 125 DOWNLOADED_FILE_CHECKSUM_MISMATCH_ERROR = 310; 126 CUSTOM_FILEGROUP_VALIDATION_FAILED = 330; 127 128 // Errors from download transforms. 129 UNABLE_TO_SERIALIZE_DOWNLOAD_TRANSFORM_ERROR = 311; 130 DOWNLOAD_TRANSFORM_IO_ERROR = 312; 131 FINAL_FILE_CHECKSUM_MISMATCH_ERROR = 313; 132 133 // Errors from delta download. 134 DELTA_DOWNLOAD_BASE_FILE_NOT_FOUND_ERROR = 314; 135 DELTA_DOWNLOAD_DECODE_IO_ERROR = 315; 136 137 // The error occurs after the file is ready. 138 UNABLE_TO_UPDATE_FILE_STATE_ERROR = 316; 139 140 // Fail to update the file group metadata. 141 UNABLE_TO_UPDATE_GROUP_METADATA_ERROR = 317; 142 143 // Errors from sharing files with the blob storage. 144 // Failed to update the metadata max_expiration_date. 145 UNABLE_TO_UPDATE_FILE_MAX_EXPIRATION_DATE = 318; 146 UNABLE_SHARE_FILE_BEFORE_DOWNLOAD_ERROR = 319; 147 UNABLE_SHARE_FILE_AFTER_DOWNLOAD_ERROR = 320; 148 149 // Download errors related to isolated file structure 150 UNABLE_TO_REMOVE_SYMLINK_STRUCTURE = 321; 151 UNABLE_TO_CREATE_SYMLINK_STRUCTURE = 322; 152 153 // Download errors related to importing inline files 154 UNABLE_TO_RESERVE_FILE_ENTRY = 323; 155 INVALID_INLINE_FILE_URL_SCHEME = 324; 156 INLINE_FILE_IO_ERROR = 327; 157 MISSING_INLINE_DOWNLOAD_PARAMS = 328; 158 MISSING_INLINE_FILE_SOURCE = 329; 159 160 // Download errors related to URL parsing 161 MALFORMED_DOWNLOAD_URL = 325; 162 UNSUPPORTED_DOWNLOAD_URL_SCHEME = 326; 163 164 // Download errors for manifest file group populator. 165 MANIFEST_FILE_GROUP_POPULATOR_INVALID_FLAG_ERROR = 400; 166 MANIFEST_FILE_GROUP_POPULATOR_CONTENT_CHANGED_DURING_DOWNLOAD_ERROR = 401; 167 MANIFEST_FILE_GROUP_POPULATOR_PARSE_MANIFEST_FILE_ERROR = 402; 168 MANIFEST_FILE_GROUP_POPULATOR_DELETE_MANIFEST_FILE_ERROR = 403; 169 MANIFEST_FILE_GROUP_POPULATOR_METADATA_IO_ERROR = 404; 170 171 reserved 1000 to 3000; 172 } 173} 174