1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18option java_multiple_files = true;
19
20package android.os;
21
22// This field contains internal metadata associated with an incident report,
23// such as the section ids and privacy policy specs from caller as well as how long
24// and how many bytes a section takes, etc.
25message IncidentMetadata {
26
27    // The id of the incident report.
28    optional int64 report_id = 1;
29
30    // No longer filled in as of Qt.
31    optional int32 sequence_number = 2;
32
33    // privacy level of the incident report.
34    enum Destination {
35        AUTOMATIC = 0;
36        EXPLICIT = 1;
37        LOCAL = 2;
38    }
39    optional Destination dest = 3;
40
41    // No longer filled in as of Qt.
42    optional int32 request_size = 4;
43
44    // No longer filled in as of Qt.
45    optional bool use_dropbox = 5;
46
47    // stats of each section taken in this incident report.
48    message SectionStats {
49        // section id.
50        optional int32 id = 1;
51        // if the section is successfully taken.
52        optional bool success = 2;
53        // number of bytes in the report after filtering.
54        optional int32 report_size_bytes = 3;
55        // the total duration to execute the section.
56        optional int64 exec_duration_ms = 4;
57
58        // number of bytes dumped from the section directly.
59        optional int32 dump_size_bytes = 5;
60        // duration of the dump takes.
61        optional int64 dump_duration_ms = 6;
62        // true if the section timed out.
63        optional bool timed_out = 7;
64        // true if the section is truncated.
65        optional bool is_truncated = 8;
66        // message for debugging if there is an error.
67        optional string error_msg = 9;
68
69        // Next Tag: 10;
70    }
71    repeated SectionStats sections = 6;
72
73    // Next Tag: 7
74}
75
76