blob: 66861588a0085c8704d4d4399c358cee6fed7eeb [file] [log] [blame]
Yao Chend54f9dd2017-10-17 17:37:48 +00001/*
2 * Copyright (C) 2017 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";
18
Stefan Lafonae2df012017-11-14 09:17:21 -080019import "frameworks/base/cmds/statsd/src/atoms.proto";
Yao Chend54f9dd2017-10-17 17:37:48 +000020
21package android.stats_log_api_gen;
22
23message IntAtom {
24 optional int32 field1 = 1;
25}
26
27message AnotherIntAtom {
28 optional int32 field1 = 1;
29}
30
31message OutOfOrderAtom {
32 optional int32 field2 = 2;
33 optional int32 field1 = 1;
34}
35
36enum AnEnum {
37 VALUE0 = 0;
38 VALUE1 = 1;
39}
40
41message AllTypesAtom {
42 optional android.os.statsd.WorkSource attribution = 1;
43 optional double double_field = 2;
44 optional float float_field = 3;
45 optional int64 int64_field = 4;
46 optional uint64 uint64_field = 5;
47 optional int32 int32_field = 6;
48 optional fixed64 fixed64_field = 7;
49 optional fixed32 fixed32_field = 8;
50 optional bool bool_field = 9;
51 optional string string_field = 10;
52 optional uint32 uint32_field = 11;
53 optional AnEnum enum_field = 12;
54 optional sfixed32 sfixed32_field = 13;
55 optional sfixed64 sfixed64_field = 14;
56 optional sint32 sint32_field = 15;
57 optional sint64 sint64_field = 16;
58}
59
60message Event {
61 oneof event {
62 OutOfOrderAtom out_of_order_atom = 2;
63 IntAtom int_atom = 1;
64 AnotherIntAtom another_int_atom = 3;
65 AllTypesAtom all_types_atom = 4;
66 }
67}
68
69message BadTypesAtom {
70 optional IntAtom bad_int_atom = 1;
71 optional bytes bad_bytes = 2;
72}
73
74message BadTypesEvent {
75 oneof event {
76 BadTypesAtom bad_types_atom = 1;
77 }
78}
79
80message BadSkippedFieldSingleAtom {
81 optional int32 field2 = 2;
82}
83
84message BadSkippedFieldSingle {
85 oneof event {
86 BadSkippedFieldSingleAtom bad = 1;
87 }
88}
89
90message BadSkippedFieldMultipleAtom {
91 optional int32 field1 = 1;
92 optional int32 field3 = 3;
93 optional int32 field5 = 5;
94}
95
96message BadSkippedFieldMultiple {
97 oneof event {
98 BadSkippedFieldMultipleAtom bad = 1;
99 }
100}
101
102message BadWorkSourcePositionAtom {
103 optional int32 field1 = 1;
104 optional android.os.statsd.WorkSource attribution = 2;
105}
106
107message BadWorkSourcePosition {
108 oneof event {
109 BadWorkSourcePositionAtom bad = 1;
110 }
111}
112