1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
2 
3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_ANDROID_INPUT_EVENT_PROTO_H_
4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_ANDROID_INPUT_EVENT_PROTO_H_
5 
6 #include <stddef.h>
7 #include <stdint.h>
8 
9 #include "perfetto/protozero/field_writer.h"
10 #include "perfetto/protozero/message.h"
11 #include "perfetto/protozero/packed_repeated_fields.h"
12 #include "perfetto/protozero/proto_decoder.h"
13 #include "perfetto/protozero/proto_utils.h"
14 
15 namespace perfetto {
16 namespace protos {
17 namespace pbzero {
18 class AndroidKeyEvent;
19 class AndroidMotionEvent;
20 class AndroidMotionEvent_Pointer;
21 class AndroidMotionEvent_Pointer_AxisValue;
22 class AndroidWindowInputDispatchEvent;
23 class AndroidWindowInputDispatchEvent_DispatchedPointer;
24 } // Namespace pbzero.
25 } // Namespace protos.
26 } // Namespace perfetto.
27 
28 namespace perfetto {
29 namespace protos {
30 namespace pbzero {
31 
32 class AndroidInputEvent_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/6, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
33  public:
AndroidInputEvent_Decoder(const uint8_t * data,size_t len)34   AndroidInputEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
AndroidInputEvent_Decoder(const std::string & raw)35   explicit AndroidInputEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
AndroidInputEvent_Decoder(const::protozero::ConstBytes & raw)36   explicit AndroidInputEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_dispatcher_motion_event()37   bool has_dispatcher_motion_event() const { return at<1>().valid(); }
dispatcher_motion_event()38   ::protozero::ConstBytes dispatcher_motion_event() const { return at<1>().as_bytes(); }
has_dispatcher_motion_event_redacted()39   bool has_dispatcher_motion_event_redacted() const { return at<2>().valid(); }
dispatcher_motion_event_redacted()40   ::protozero::ConstBytes dispatcher_motion_event_redacted() const { return at<2>().as_bytes(); }
has_dispatcher_key_event()41   bool has_dispatcher_key_event() const { return at<3>().valid(); }
dispatcher_key_event()42   ::protozero::ConstBytes dispatcher_key_event() const { return at<3>().as_bytes(); }
has_dispatcher_key_event_redacted()43   bool has_dispatcher_key_event_redacted() const { return at<4>().valid(); }
dispatcher_key_event_redacted()44   ::protozero::ConstBytes dispatcher_key_event_redacted() const { return at<4>().as_bytes(); }
has_dispatcher_window_dispatch_event()45   bool has_dispatcher_window_dispatch_event() const { return at<5>().valid(); }
dispatcher_window_dispatch_event()46   ::protozero::ConstBytes dispatcher_window_dispatch_event() const { return at<5>().as_bytes(); }
has_dispatcher_window_dispatch_event_redacted()47   bool has_dispatcher_window_dispatch_event_redacted() const { return at<6>().valid(); }
dispatcher_window_dispatch_event_redacted()48   ::protozero::ConstBytes dispatcher_window_dispatch_event_redacted() const { return at<6>().as_bytes(); }
49 };
50 
51 class AndroidInputEvent : public ::protozero::Message {
52  public:
53   using Decoder = AndroidInputEvent_Decoder;
54   enum : int32_t {
55     kDispatcherMotionEventFieldNumber = 1,
56     kDispatcherMotionEventRedactedFieldNumber = 2,
57     kDispatcherKeyEventFieldNumber = 3,
58     kDispatcherKeyEventRedactedFieldNumber = 4,
59     kDispatcherWindowDispatchEventFieldNumber = 5,
60     kDispatcherWindowDispatchEventRedactedFieldNumber = 6,
61   };
GetName()62   static constexpr const char* GetName() { return ".perfetto.protos.AndroidInputEvent"; }
63 
64 
65   using FieldMetadata_DispatcherMotionEvent =
66     ::protozero::proto_utils::FieldMetadata<
67       1,
68       ::protozero::proto_utils::RepetitionType::kNotRepeated,
69       ::protozero::proto_utils::ProtoSchemaType::kMessage,
70       AndroidMotionEvent,
71       AndroidInputEvent>;
72 
73   static constexpr FieldMetadata_DispatcherMotionEvent kDispatcherMotionEvent{};
set_dispatcher_motion_event()74   template <typename T = AndroidMotionEvent> T* set_dispatcher_motion_event() {
75     return BeginNestedMessage<T>(1);
76   }
77 
78 
79   using FieldMetadata_DispatcherMotionEventRedacted =
80     ::protozero::proto_utils::FieldMetadata<
81       2,
82       ::protozero::proto_utils::RepetitionType::kNotRepeated,
83       ::protozero::proto_utils::ProtoSchemaType::kMessage,
84       AndroidMotionEvent,
85       AndroidInputEvent>;
86 
87   static constexpr FieldMetadata_DispatcherMotionEventRedacted kDispatcherMotionEventRedacted{};
set_dispatcher_motion_event_redacted()88   template <typename T = AndroidMotionEvent> T* set_dispatcher_motion_event_redacted() {
89     return BeginNestedMessage<T>(2);
90   }
91 
92 
93   using FieldMetadata_DispatcherKeyEvent =
94     ::protozero::proto_utils::FieldMetadata<
95       3,
96       ::protozero::proto_utils::RepetitionType::kNotRepeated,
97       ::protozero::proto_utils::ProtoSchemaType::kMessage,
98       AndroidKeyEvent,
99       AndroidInputEvent>;
100 
101   static constexpr FieldMetadata_DispatcherKeyEvent kDispatcherKeyEvent{};
set_dispatcher_key_event()102   template <typename T = AndroidKeyEvent> T* set_dispatcher_key_event() {
103     return BeginNestedMessage<T>(3);
104   }
105 
106 
107   using FieldMetadata_DispatcherKeyEventRedacted =
108     ::protozero::proto_utils::FieldMetadata<
109       4,
110       ::protozero::proto_utils::RepetitionType::kNotRepeated,
111       ::protozero::proto_utils::ProtoSchemaType::kMessage,
112       AndroidKeyEvent,
113       AndroidInputEvent>;
114 
115   static constexpr FieldMetadata_DispatcherKeyEventRedacted kDispatcherKeyEventRedacted{};
set_dispatcher_key_event_redacted()116   template <typename T = AndroidKeyEvent> T* set_dispatcher_key_event_redacted() {
117     return BeginNestedMessage<T>(4);
118   }
119 
120 
121   using FieldMetadata_DispatcherWindowDispatchEvent =
122     ::protozero::proto_utils::FieldMetadata<
123       5,
124       ::protozero::proto_utils::RepetitionType::kNotRepeated,
125       ::protozero::proto_utils::ProtoSchemaType::kMessage,
126       AndroidWindowInputDispatchEvent,
127       AndroidInputEvent>;
128 
129   static constexpr FieldMetadata_DispatcherWindowDispatchEvent kDispatcherWindowDispatchEvent{};
set_dispatcher_window_dispatch_event()130   template <typename T = AndroidWindowInputDispatchEvent> T* set_dispatcher_window_dispatch_event() {
131     return BeginNestedMessage<T>(5);
132   }
133 
134 
135   using FieldMetadata_DispatcherWindowDispatchEventRedacted =
136     ::protozero::proto_utils::FieldMetadata<
137       6,
138       ::protozero::proto_utils::RepetitionType::kNotRepeated,
139       ::protozero::proto_utils::ProtoSchemaType::kMessage,
140       AndroidWindowInputDispatchEvent,
141       AndroidInputEvent>;
142 
143   static constexpr FieldMetadata_DispatcherWindowDispatchEventRedacted kDispatcherWindowDispatchEventRedacted{};
set_dispatcher_window_dispatch_event_redacted()144   template <typename T = AndroidWindowInputDispatchEvent> T* set_dispatcher_window_dispatch_event_redacted() {
145     return BeginNestedMessage<T>(6);
146   }
147 
148 };
149 
150 class AndroidWindowInputDispatchEvent_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/5, /*HAS_NONPACKED_REPEATED_FIELDS=*/true> {
151  public:
AndroidWindowInputDispatchEvent_Decoder(const uint8_t * data,size_t len)152   AndroidWindowInputDispatchEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
AndroidWindowInputDispatchEvent_Decoder(const std::string & raw)153   explicit AndroidWindowInputDispatchEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
AndroidWindowInputDispatchEvent_Decoder(const::protozero::ConstBytes & raw)154   explicit AndroidWindowInputDispatchEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_event_id()155   bool has_event_id() const { return at<1>().valid(); }
event_id()156   uint32_t event_id() const { return at<1>().as_uint32(); }
has_vsync_id()157   bool has_vsync_id() const { return at<2>().valid(); }
vsync_id()158   int64_t vsync_id() const { return at<2>().as_int64(); }
has_window_id()159   bool has_window_id() const { return at<3>().valid(); }
window_id()160   int32_t window_id() const { return at<3>().as_int32(); }
has_dispatched_pointer()161   bool has_dispatched_pointer() const { return at<4>().valid(); }
dispatched_pointer()162   ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> dispatched_pointer() const { return GetRepeated<::protozero::ConstBytes>(4); }
has_resolved_flags()163   bool has_resolved_flags() const { return at<5>().valid(); }
resolved_flags()164   uint32_t resolved_flags() const { return at<5>().as_uint32(); }
165 };
166 
167 class AndroidWindowInputDispatchEvent : public ::protozero::Message {
168  public:
169   using Decoder = AndroidWindowInputDispatchEvent_Decoder;
170   enum : int32_t {
171     kEventIdFieldNumber = 1,
172     kVsyncIdFieldNumber = 2,
173     kWindowIdFieldNumber = 3,
174     kDispatchedPointerFieldNumber = 4,
175     kResolvedFlagsFieldNumber = 5,
176   };
GetName()177   static constexpr const char* GetName() { return ".perfetto.protos.AndroidWindowInputDispatchEvent"; }
178 
179   using DispatchedPointer = ::perfetto::protos::pbzero::AndroidWindowInputDispatchEvent_DispatchedPointer;
180 
181   using FieldMetadata_EventId =
182     ::protozero::proto_utils::FieldMetadata<
183       1,
184       ::protozero::proto_utils::RepetitionType::kNotRepeated,
185       ::protozero::proto_utils::ProtoSchemaType::kFixed32,
186       uint32_t,
187       AndroidWindowInputDispatchEvent>;
188 
189   static constexpr FieldMetadata_EventId kEventId{};
set_event_id(uint32_t value)190   void set_event_id(uint32_t value) {
191     static constexpr uint32_t field_id = FieldMetadata_EventId::kFieldId;
192     // Call the appropriate protozero::Message::Append(field_id, ...)
193     // method based on the type of the field.
194     ::protozero::internal::FieldWriter<
195       ::protozero::proto_utils::ProtoSchemaType::kFixed32>
196         ::Append(*this, field_id, value);
197   }
198 
199   using FieldMetadata_VsyncId =
200     ::protozero::proto_utils::FieldMetadata<
201       2,
202       ::protozero::proto_utils::RepetitionType::kNotRepeated,
203       ::protozero::proto_utils::ProtoSchemaType::kInt64,
204       int64_t,
205       AndroidWindowInputDispatchEvent>;
206 
207   static constexpr FieldMetadata_VsyncId kVsyncId{};
set_vsync_id(int64_t value)208   void set_vsync_id(int64_t value) {
209     static constexpr uint32_t field_id = FieldMetadata_VsyncId::kFieldId;
210     // Call the appropriate protozero::Message::Append(field_id, ...)
211     // method based on the type of the field.
212     ::protozero::internal::FieldWriter<
213       ::protozero::proto_utils::ProtoSchemaType::kInt64>
214         ::Append(*this, field_id, value);
215   }
216 
217   using FieldMetadata_WindowId =
218     ::protozero::proto_utils::FieldMetadata<
219       3,
220       ::protozero::proto_utils::RepetitionType::kNotRepeated,
221       ::protozero::proto_utils::ProtoSchemaType::kInt32,
222       int32_t,
223       AndroidWindowInputDispatchEvent>;
224 
225   static constexpr FieldMetadata_WindowId kWindowId{};
set_window_id(int32_t value)226   void set_window_id(int32_t value) {
227     static constexpr uint32_t field_id = FieldMetadata_WindowId::kFieldId;
228     // Call the appropriate protozero::Message::Append(field_id, ...)
229     // method based on the type of the field.
230     ::protozero::internal::FieldWriter<
231       ::protozero::proto_utils::ProtoSchemaType::kInt32>
232         ::Append(*this, field_id, value);
233   }
234 
235   using FieldMetadata_DispatchedPointer =
236     ::protozero::proto_utils::FieldMetadata<
237       4,
238       ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
239       ::protozero::proto_utils::ProtoSchemaType::kMessage,
240       AndroidWindowInputDispatchEvent_DispatchedPointer,
241       AndroidWindowInputDispatchEvent>;
242 
243   static constexpr FieldMetadata_DispatchedPointer kDispatchedPointer{};
add_dispatched_pointer()244   template <typename T = AndroidWindowInputDispatchEvent_DispatchedPointer> T* add_dispatched_pointer() {
245     return BeginNestedMessage<T>(4);
246   }
247 
248 
249   using FieldMetadata_ResolvedFlags =
250     ::protozero::proto_utils::FieldMetadata<
251       5,
252       ::protozero::proto_utils::RepetitionType::kNotRepeated,
253       ::protozero::proto_utils::ProtoSchemaType::kUint32,
254       uint32_t,
255       AndroidWindowInputDispatchEvent>;
256 
257   static constexpr FieldMetadata_ResolvedFlags kResolvedFlags{};
set_resolved_flags(uint32_t value)258   void set_resolved_flags(uint32_t value) {
259     static constexpr uint32_t field_id = FieldMetadata_ResolvedFlags::kFieldId;
260     // Call the appropriate protozero::Message::Append(field_id, ...)
261     // method based on the type of the field.
262     ::protozero::internal::FieldWriter<
263       ::protozero::proto_utils::ProtoSchemaType::kUint32>
264         ::Append(*this, field_id, value);
265   }
266 };
267 
268 class AndroidWindowInputDispatchEvent_DispatchedPointer_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/4, /*HAS_NONPACKED_REPEATED_FIELDS=*/true> {
269  public:
AndroidWindowInputDispatchEvent_DispatchedPointer_Decoder(const uint8_t * data,size_t len)270   AndroidWindowInputDispatchEvent_DispatchedPointer_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
AndroidWindowInputDispatchEvent_DispatchedPointer_Decoder(const std::string & raw)271   explicit AndroidWindowInputDispatchEvent_DispatchedPointer_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
AndroidWindowInputDispatchEvent_DispatchedPointer_Decoder(const::protozero::ConstBytes & raw)272   explicit AndroidWindowInputDispatchEvent_DispatchedPointer_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_pointer_id()273   bool has_pointer_id() const { return at<1>().valid(); }
pointer_id()274   int32_t pointer_id() const { return at<1>().as_int32(); }
has_x_in_display()275   bool has_x_in_display() const { return at<2>().valid(); }
x_in_display()276   float x_in_display() const { return at<2>().as_float(); }
has_y_in_display()277   bool has_y_in_display() const { return at<3>().valid(); }
y_in_display()278   float y_in_display() const { return at<3>().as_float(); }
has_axis_value_in_window()279   bool has_axis_value_in_window() const { return at<4>().valid(); }
axis_value_in_window()280   ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> axis_value_in_window() const { return GetRepeated<::protozero::ConstBytes>(4); }
281 };
282 
283 class AndroidWindowInputDispatchEvent_DispatchedPointer : public ::protozero::Message {
284  public:
285   using Decoder = AndroidWindowInputDispatchEvent_DispatchedPointer_Decoder;
286   enum : int32_t {
287     kPointerIdFieldNumber = 1,
288     kXInDisplayFieldNumber = 2,
289     kYInDisplayFieldNumber = 3,
290     kAxisValueInWindowFieldNumber = 4,
291   };
GetName()292   static constexpr const char* GetName() { return ".perfetto.protos.AndroidWindowInputDispatchEvent.DispatchedPointer"; }
293 
294 
295   using FieldMetadata_PointerId =
296     ::protozero::proto_utils::FieldMetadata<
297       1,
298       ::protozero::proto_utils::RepetitionType::kNotRepeated,
299       ::protozero::proto_utils::ProtoSchemaType::kInt32,
300       int32_t,
301       AndroidWindowInputDispatchEvent_DispatchedPointer>;
302 
303   static constexpr FieldMetadata_PointerId kPointerId{};
set_pointer_id(int32_t value)304   void set_pointer_id(int32_t value) {
305     static constexpr uint32_t field_id = FieldMetadata_PointerId::kFieldId;
306     // Call the appropriate protozero::Message::Append(field_id, ...)
307     // method based on the type of the field.
308     ::protozero::internal::FieldWriter<
309       ::protozero::proto_utils::ProtoSchemaType::kInt32>
310         ::Append(*this, field_id, value);
311   }
312 
313   using FieldMetadata_XInDisplay =
314     ::protozero::proto_utils::FieldMetadata<
315       2,
316       ::protozero::proto_utils::RepetitionType::kNotRepeated,
317       ::protozero::proto_utils::ProtoSchemaType::kFloat,
318       float,
319       AndroidWindowInputDispatchEvent_DispatchedPointer>;
320 
321   static constexpr FieldMetadata_XInDisplay kXInDisplay{};
set_x_in_display(float value)322   void set_x_in_display(float value) {
323     static constexpr uint32_t field_id = FieldMetadata_XInDisplay::kFieldId;
324     // Call the appropriate protozero::Message::Append(field_id, ...)
325     // method based on the type of the field.
326     ::protozero::internal::FieldWriter<
327       ::protozero::proto_utils::ProtoSchemaType::kFloat>
328         ::Append(*this, field_id, value);
329   }
330 
331   using FieldMetadata_YInDisplay =
332     ::protozero::proto_utils::FieldMetadata<
333       3,
334       ::protozero::proto_utils::RepetitionType::kNotRepeated,
335       ::protozero::proto_utils::ProtoSchemaType::kFloat,
336       float,
337       AndroidWindowInputDispatchEvent_DispatchedPointer>;
338 
339   static constexpr FieldMetadata_YInDisplay kYInDisplay{};
set_y_in_display(float value)340   void set_y_in_display(float value) {
341     static constexpr uint32_t field_id = FieldMetadata_YInDisplay::kFieldId;
342     // Call the appropriate protozero::Message::Append(field_id, ...)
343     // method based on the type of the field.
344     ::protozero::internal::FieldWriter<
345       ::protozero::proto_utils::ProtoSchemaType::kFloat>
346         ::Append(*this, field_id, value);
347   }
348 
349   using FieldMetadata_AxisValueInWindow =
350     ::protozero::proto_utils::FieldMetadata<
351       4,
352       ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
353       ::protozero::proto_utils::ProtoSchemaType::kMessage,
354       AndroidMotionEvent_Pointer_AxisValue,
355       AndroidWindowInputDispatchEvent_DispatchedPointer>;
356 
357   static constexpr FieldMetadata_AxisValueInWindow kAxisValueInWindow{};
add_axis_value_in_window()358   template <typename T = AndroidMotionEvent_Pointer_AxisValue> T* add_axis_value_in_window() {
359     return BeginNestedMessage<T>(4);
360   }
361 
362 };
363 
364 class AndroidKeyEvent_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/13, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
365  public:
AndroidKeyEvent_Decoder(const uint8_t * data,size_t len)366   AndroidKeyEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
AndroidKeyEvent_Decoder(const std::string & raw)367   explicit AndroidKeyEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
AndroidKeyEvent_Decoder(const::protozero::ConstBytes & raw)368   explicit AndroidKeyEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_event_id()369   bool has_event_id() const { return at<1>().valid(); }
event_id()370   uint32_t event_id() const { return at<1>().as_uint32(); }
has_event_time_nanos()371   bool has_event_time_nanos() const { return at<2>().valid(); }
event_time_nanos()372   int64_t event_time_nanos() const { return at<2>().as_int64(); }
has_down_time_nanos()373   bool has_down_time_nanos() const { return at<3>().valid(); }
down_time_nanos()374   int64_t down_time_nanos() const { return at<3>().as_int64(); }
has_source()375   bool has_source() const { return at<4>().valid(); }
source()376   uint32_t source() const { return at<4>().as_uint32(); }
has_action()377   bool has_action() const { return at<5>().valid(); }
action()378   int32_t action() const { return at<5>().as_int32(); }
has_device_id()379   bool has_device_id() const { return at<6>().valid(); }
device_id()380   int32_t device_id() const { return at<6>().as_int32(); }
has_display_id()381   bool has_display_id() const { return at<7>().valid(); }
display_id()382   int32_t display_id() const { return at<7>().as_sint32(); }
has_key_code()383   bool has_key_code() const { return at<8>().valid(); }
key_code()384   int32_t key_code() const { return at<8>().as_int32(); }
has_scan_code()385   bool has_scan_code() const { return at<9>().valid(); }
scan_code()386   uint32_t scan_code() const { return at<9>().as_uint32(); }
has_meta_state()387   bool has_meta_state() const { return at<10>().valid(); }
meta_state()388   uint32_t meta_state() const { return at<10>().as_uint32(); }
has_repeat_count()389   bool has_repeat_count() const { return at<11>().valid(); }
repeat_count()390   int32_t repeat_count() const { return at<11>().as_int32(); }
has_flags()391   bool has_flags() const { return at<12>().valid(); }
flags()392   uint32_t flags() const { return at<12>().as_uint32(); }
has_policy_flags()393   bool has_policy_flags() const { return at<13>().valid(); }
policy_flags()394   uint32_t policy_flags() const { return at<13>().as_uint32(); }
395 };
396 
397 class AndroidKeyEvent : public ::protozero::Message {
398  public:
399   using Decoder = AndroidKeyEvent_Decoder;
400   enum : int32_t {
401     kEventIdFieldNumber = 1,
402     kEventTimeNanosFieldNumber = 2,
403     kDownTimeNanosFieldNumber = 3,
404     kSourceFieldNumber = 4,
405     kActionFieldNumber = 5,
406     kDeviceIdFieldNumber = 6,
407     kDisplayIdFieldNumber = 7,
408     kKeyCodeFieldNumber = 8,
409     kScanCodeFieldNumber = 9,
410     kMetaStateFieldNumber = 10,
411     kRepeatCountFieldNumber = 11,
412     kFlagsFieldNumber = 12,
413     kPolicyFlagsFieldNumber = 13,
414   };
GetName()415   static constexpr const char* GetName() { return ".perfetto.protos.AndroidKeyEvent"; }
416 
417 
418   using FieldMetadata_EventId =
419     ::protozero::proto_utils::FieldMetadata<
420       1,
421       ::protozero::proto_utils::RepetitionType::kNotRepeated,
422       ::protozero::proto_utils::ProtoSchemaType::kFixed32,
423       uint32_t,
424       AndroidKeyEvent>;
425 
426   static constexpr FieldMetadata_EventId kEventId{};
set_event_id(uint32_t value)427   void set_event_id(uint32_t value) {
428     static constexpr uint32_t field_id = FieldMetadata_EventId::kFieldId;
429     // Call the appropriate protozero::Message::Append(field_id, ...)
430     // method based on the type of the field.
431     ::protozero::internal::FieldWriter<
432       ::protozero::proto_utils::ProtoSchemaType::kFixed32>
433         ::Append(*this, field_id, value);
434   }
435 
436   using FieldMetadata_EventTimeNanos =
437     ::protozero::proto_utils::FieldMetadata<
438       2,
439       ::protozero::proto_utils::RepetitionType::kNotRepeated,
440       ::protozero::proto_utils::ProtoSchemaType::kInt64,
441       int64_t,
442       AndroidKeyEvent>;
443 
444   static constexpr FieldMetadata_EventTimeNanos kEventTimeNanos{};
set_event_time_nanos(int64_t value)445   void set_event_time_nanos(int64_t value) {
446     static constexpr uint32_t field_id = FieldMetadata_EventTimeNanos::kFieldId;
447     // Call the appropriate protozero::Message::Append(field_id, ...)
448     // method based on the type of the field.
449     ::protozero::internal::FieldWriter<
450       ::protozero::proto_utils::ProtoSchemaType::kInt64>
451         ::Append(*this, field_id, value);
452   }
453 
454   using FieldMetadata_DownTimeNanos =
455     ::protozero::proto_utils::FieldMetadata<
456       3,
457       ::protozero::proto_utils::RepetitionType::kNotRepeated,
458       ::protozero::proto_utils::ProtoSchemaType::kInt64,
459       int64_t,
460       AndroidKeyEvent>;
461 
462   static constexpr FieldMetadata_DownTimeNanos kDownTimeNanos{};
set_down_time_nanos(int64_t value)463   void set_down_time_nanos(int64_t value) {
464     static constexpr uint32_t field_id = FieldMetadata_DownTimeNanos::kFieldId;
465     // Call the appropriate protozero::Message::Append(field_id, ...)
466     // method based on the type of the field.
467     ::protozero::internal::FieldWriter<
468       ::protozero::proto_utils::ProtoSchemaType::kInt64>
469         ::Append(*this, field_id, value);
470   }
471 
472   using FieldMetadata_Source =
473     ::protozero::proto_utils::FieldMetadata<
474       4,
475       ::protozero::proto_utils::RepetitionType::kNotRepeated,
476       ::protozero::proto_utils::ProtoSchemaType::kUint32,
477       uint32_t,
478       AndroidKeyEvent>;
479 
480   static constexpr FieldMetadata_Source kSource{};
set_source(uint32_t value)481   void set_source(uint32_t value) {
482     static constexpr uint32_t field_id = FieldMetadata_Source::kFieldId;
483     // Call the appropriate protozero::Message::Append(field_id, ...)
484     // method based on the type of the field.
485     ::protozero::internal::FieldWriter<
486       ::protozero::proto_utils::ProtoSchemaType::kUint32>
487         ::Append(*this, field_id, value);
488   }
489 
490   using FieldMetadata_Action =
491     ::protozero::proto_utils::FieldMetadata<
492       5,
493       ::protozero::proto_utils::RepetitionType::kNotRepeated,
494       ::protozero::proto_utils::ProtoSchemaType::kInt32,
495       int32_t,
496       AndroidKeyEvent>;
497 
498   static constexpr FieldMetadata_Action kAction{};
set_action(int32_t value)499   void set_action(int32_t value) {
500     static constexpr uint32_t field_id = FieldMetadata_Action::kFieldId;
501     // Call the appropriate protozero::Message::Append(field_id, ...)
502     // method based on the type of the field.
503     ::protozero::internal::FieldWriter<
504       ::protozero::proto_utils::ProtoSchemaType::kInt32>
505         ::Append(*this, field_id, value);
506   }
507 
508   using FieldMetadata_DeviceId =
509     ::protozero::proto_utils::FieldMetadata<
510       6,
511       ::protozero::proto_utils::RepetitionType::kNotRepeated,
512       ::protozero::proto_utils::ProtoSchemaType::kInt32,
513       int32_t,
514       AndroidKeyEvent>;
515 
516   static constexpr FieldMetadata_DeviceId kDeviceId{};
set_device_id(int32_t value)517   void set_device_id(int32_t value) {
518     static constexpr uint32_t field_id = FieldMetadata_DeviceId::kFieldId;
519     // Call the appropriate protozero::Message::Append(field_id, ...)
520     // method based on the type of the field.
521     ::protozero::internal::FieldWriter<
522       ::protozero::proto_utils::ProtoSchemaType::kInt32>
523         ::Append(*this, field_id, value);
524   }
525 
526   using FieldMetadata_DisplayId =
527     ::protozero::proto_utils::FieldMetadata<
528       7,
529       ::protozero::proto_utils::RepetitionType::kNotRepeated,
530       ::protozero::proto_utils::ProtoSchemaType::kSint32,
531       int32_t,
532       AndroidKeyEvent>;
533 
534   static constexpr FieldMetadata_DisplayId kDisplayId{};
set_display_id(int32_t value)535   void set_display_id(int32_t value) {
536     static constexpr uint32_t field_id = FieldMetadata_DisplayId::kFieldId;
537     // Call the appropriate protozero::Message::Append(field_id, ...)
538     // method based on the type of the field.
539     ::protozero::internal::FieldWriter<
540       ::protozero::proto_utils::ProtoSchemaType::kSint32>
541         ::Append(*this, field_id, value);
542   }
543 
544   using FieldMetadata_KeyCode =
545     ::protozero::proto_utils::FieldMetadata<
546       8,
547       ::protozero::proto_utils::RepetitionType::kNotRepeated,
548       ::protozero::proto_utils::ProtoSchemaType::kInt32,
549       int32_t,
550       AndroidKeyEvent>;
551 
552   static constexpr FieldMetadata_KeyCode kKeyCode{};
set_key_code(int32_t value)553   void set_key_code(int32_t value) {
554     static constexpr uint32_t field_id = FieldMetadata_KeyCode::kFieldId;
555     // Call the appropriate protozero::Message::Append(field_id, ...)
556     // method based on the type of the field.
557     ::protozero::internal::FieldWriter<
558       ::protozero::proto_utils::ProtoSchemaType::kInt32>
559         ::Append(*this, field_id, value);
560   }
561 
562   using FieldMetadata_ScanCode =
563     ::protozero::proto_utils::FieldMetadata<
564       9,
565       ::protozero::proto_utils::RepetitionType::kNotRepeated,
566       ::protozero::proto_utils::ProtoSchemaType::kUint32,
567       uint32_t,
568       AndroidKeyEvent>;
569 
570   static constexpr FieldMetadata_ScanCode kScanCode{};
set_scan_code(uint32_t value)571   void set_scan_code(uint32_t value) {
572     static constexpr uint32_t field_id = FieldMetadata_ScanCode::kFieldId;
573     // Call the appropriate protozero::Message::Append(field_id, ...)
574     // method based on the type of the field.
575     ::protozero::internal::FieldWriter<
576       ::protozero::proto_utils::ProtoSchemaType::kUint32>
577         ::Append(*this, field_id, value);
578   }
579 
580   using FieldMetadata_MetaState =
581     ::protozero::proto_utils::FieldMetadata<
582       10,
583       ::protozero::proto_utils::RepetitionType::kNotRepeated,
584       ::protozero::proto_utils::ProtoSchemaType::kUint32,
585       uint32_t,
586       AndroidKeyEvent>;
587 
588   static constexpr FieldMetadata_MetaState kMetaState{};
set_meta_state(uint32_t value)589   void set_meta_state(uint32_t value) {
590     static constexpr uint32_t field_id = FieldMetadata_MetaState::kFieldId;
591     // Call the appropriate protozero::Message::Append(field_id, ...)
592     // method based on the type of the field.
593     ::protozero::internal::FieldWriter<
594       ::protozero::proto_utils::ProtoSchemaType::kUint32>
595         ::Append(*this, field_id, value);
596   }
597 
598   using FieldMetadata_RepeatCount =
599     ::protozero::proto_utils::FieldMetadata<
600       11,
601       ::protozero::proto_utils::RepetitionType::kNotRepeated,
602       ::protozero::proto_utils::ProtoSchemaType::kInt32,
603       int32_t,
604       AndroidKeyEvent>;
605 
606   static constexpr FieldMetadata_RepeatCount kRepeatCount{};
set_repeat_count(int32_t value)607   void set_repeat_count(int32_t value) {
608     static constexpr uint32_t field_id = FieldMetadata_RepeatCount::kFieldId;
609     // Call the appropriate protozero::Message::Append(field_id, ...)
610     // method based on the type of the field.
611     ::protozero::internal::FieldWriter<
612       ::protozero::proto_utils::ProtoSchemaType::kInt32>
613         ::Append(*this, field_id, value);
614   }
615 
616   using FieldMetadata_Flags =
617     ::protozero::proto_utils::FieldMetadata<
618       12,
619       ::protozero::proto_utils::RepetitionType::kNotRepeated,
620       ::protozero::proto_utils::ProtoSchemaType::kUint32,
621       uint32_t,
622       AndroidKeyEvent>;
623 
624   static constexpr FieldMetadata_Flags kFlags{};
set_flags(uint32_t value)625   void set_flags(uint32_t value) {
626     static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId;
627     // Call the appropriate protozero::Message::Append(field_id, ...)
628     // method based on the type of the field.
629     ::protozero::internal::FieldWriter<
630       ::protozero::proto_utils::ProtoSchemaType::kUint32>
631         ::Append(*this, field_id, value);
632   }
633 
634   using FieldMetadata_PolicyFlags =
635     ::protozero::proto_utils::FieldMetadata<
636       13,
637       ::protozero::proto_utils::RepetitionType::kNotRepeated,
638       ::protozero::proto_utils::ProtoSchemaType::kUint32,
639       uint32_t,
640       AndroidKeyEvent>;
641 
642   static constexpr FieldMetadata_PolicyFlags kPolicyFlags{};
set_policy_flags(uint32_t value)643   void set_policy_flags(uint32_t value) {
644     static constexpr uint32_t field_id = FieldMetadata_PolicyFlags::kFieldId;
645     // Call the appropriate protozero::Message::Append(field_id, ...)
646     // method based on the type of the field.
647     ::protozero::internal::FieldWriter<
648       ::protozero::proto_utils::ProtoSchemaType::kUint32>
649         ::Append(*this, field_id, value);
650   }
651 };
652 
653 class AndroidMotionEvent_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/25, /*HAS_NONPACKED_REPEATED_FIELDS=*/true> {
654  public:
AndroidMotionEvent_Decoder(const uint8_t * data,size_t len)655   AndroidMotionEvent_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
AndroidMotionEvent_Decoder(const std::string & raw)656   explicit AndroidMotionEvent_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
AndroidMotionEvent_Decoder(const::protozero::ConstBytes & raw)657   explicit AndroidMotionEvent_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_event_id()658   bool has_event_id() const { return at<1>().valid(); }
event_id()659   uint32_t event_id() const { return at<1>().as_uint32(); }
has_event_time_nanos()660   bool has_event_time_nanos() const { return at<2>().valid(); }
event_time_nanos()661   int64_t event_time_nanos() const { return at<2>().as_int64(); }
has_source()662   bool has_source() const { return at<3>().valid(); }
source()663   uint32_t source() const { return at<3>().as_uint32(); }
has_action()664   bool has_action() const { return at<4>().valid(); }
action()665   int32_t action() const { return at<4>().as_int32(); }
has_device_id()666   bool has_device_id() const { return at<5>().valid(); }
device_id()667   int32_t device_id() const { return at<5>().as_int32(); }
has_display_id()668   bool has_display_id() const { return at<6>().valid(); }
display_id()669   int32_t display_id() const { return at<6>().as_sint32(); }
has_classification()670   bool has_classification() const { return at<7>().valid(); }
classification()671   int32_t classification() const { return at<7>().as_int32(); }
has_flags()672   bool has_flags() const { return at<8>().valid(); }
flags()673   uint32_t flags() const { return at<8>().as_uint32(); }
has_pointer()674   bool has_pointer() const { return at<9>().valid(); }
pointer()675   ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> pointer() const { return GetRepeated<::protozero::ConstBytes>(9); }
has_original_event_id()676   bool has_original_event_id() const { return at<16>().valid(); }
original_event_id(bool * parse_error_ptr)677   ::protozero::PackedRepeatedFieldIterator<::protozero::proto_utils::ProtoWireType::kFixed32, uint32_t> original_event_id(bool* parse_error_ptr) const { return GetPackedRepeated<::protozero::proto_utils::ProtoWireType::kFixed32, uint32_t>(16, parse_error_ptr); }
has_down_time_nanos()678   bool has_down_time_nanos() const { return at<17>().valid(); }
down_time_nanos()679   int64_t down_time_nanos() const { return at<17>().as_int64(); }
has_cursor_position_x()680   bool has_cursor_position_x() const { return at<18>().valid(); }
cursor_position_x()681   float cursor_position_x() const { return at<18>().as_float(); }
has_cursor_position_y()682   bool has_cursor_position_y() const { return at<19>().valid(); }
cursor_position_y()683   float cursor_position_y() const { return at<19>().as_float(); }
has_action_button()684   bool has_action_button() const { return at<20>().valid(); }
action_button()685   int32_t action_button() const { return at<20>().as_int32(); }
has_button_state()686   bool has_button_state() const { return at<21>().valid(); }
button_state()687   uint32_t button_state() const { return at<21>().as_uint32(); }
has_meta_state()688   bool has_meta_state() const { return at<22>().valid(); }
meta_state()689   uint32_t meta_state() const { return at<22>().as_uint32(); }
has_policy_flags()690   bool has_policy_flags() const { return at<23>().valid(); }
policy_flags()691   uint32_t policy_flags() const { return at<23>().as_uint32(); }
has_precision_x()692   bool has_precision_x() const { return at<24>().valid(); }
precision_x()693   float precision_x() const { return at<24>().as_float(); }
has_precision_y()694   bool has_precision_y() const { return at<25>().valid(); }
precision_y()695   float precision_y() const { return at<25>().as_float(); }
696 };
697 
698 class AndroidMotionEvent : public ::protozero::Message {
699  public:
700   using Decoder = AndroidMotionEvent_Decoder;
701   enum : int32_t {
702     kEventIdFieldNumber = 1,
703     kEventTimeNanosFieldNumber = 2,
704     kSourceFieldNumber = 3,
705     kActionFieldNumber = 4,
706     kDeviceIdFieldNumber = 5,
707     kDisplayIdFieldNumber = 6,
708     kClassificationFieldNumber = 7,
709     kFlagsFieldNumber = 8,
710     kPointerFieldNumber = 9,
711     kOriginalEventIdFieldNumber = 16,
712     kDownTimeNanosFieldNumber = 17,
713     kCursorPositionXFieldNumber = 18,
714     kCursorPositionYFieldNumber = 19,
715     kActionButtonFieldNumber = 20,
716     kButtonStateFieldNumber = 21,
717     kMetaStateFieldNumber = 22,
718     kPolicyFlagsFieldNumber = 23,
719     kPrecisionXFieldNumber = 24,
720     kPrecisionYFieldNumber = 25,
721   };
GetName()722   static constexpr const char* GetName() { return ".perfetto.protos.AndroidMotionEvent"; }
723 
724   using Pointer = ::perfetto::protos::pbzero::AndroidMotionEvent_Pointer;
725 
726   using FieldMetadata_EventId =
727     ::protozero::proto_utils::FieldMetadata<
728       1,
729       ::protozero::proto_utils::RepetitionType::kNotRepeated,
730       ::protozero::proto_utils::ProtoSchemaType::kFixed32,
731       uint32_t,
732       AndroidMotionEvent>;
733 
734   static constexpr FieldMetadata_EventId kEventId{};
set_event_id(uint32_t value)735   void set_event_id(uint32_t value) {
736     static constexpr uint32_t field_id = FieldMetadata_EventId::kFieldId;
737     // Call the appropriate protozero::Message::Append(field_id, ...)
738     // method based on the type of the field.
739     ::protozero::internal::FieldWriter<
740       ::protozero::proto_utils::ProtoSchemaType::kFixed32>
741         ::Append(*this, field_id, value);
742   }
743 
744   using FieldMetadata_EventTimeNanos =
745     ::protozero::proto_utils::FieldMetadata<
746       2,
747       ::protozero::proto_utils::RepetitionType::kNotRepeated,
748       ::protozero::proto_utils::ProtoSchemaType::kInt64,
749       int64_t,
750       AndroidMotionEvent>;
751 
752   static constexpr FieldMetadata_EventTimeNanos kEventTimeNanos{};
set_event_time_nanos(int64_t value)753   void set_event_time_nanos(int64_t value) {
754     static constexpr uint32_t field_id = FieldMetadata_EventTimeNanos::kFieldId;
755     // Call the appropriate protozero::Message::Append(field_id, ...)
756     // method based on the type of the field.
757     ::protozero::internal::FieldWriter<
758       ::protozero::proto_utils::ProtoSchemaType::kInt64>
759         ::Append(*this, field_id, value);
760   }
761 
762   using FieldMetadata_Source =
763     ::protozero::proto_utils::FieldMetadata<
764       3,
765       ::protozero::proto_utils::RepetitionType::kNotRepeated,
766       ::protozero::proto_utils::ProtoSchemaType::kUint32,
767       uint32_t,
768       AndroidMotionEvent>;
769 
770   static constexpr FieldMetadata_Source kSource{};
set_source(uint32_t value)771   void set_source(uint32_t value) {
772     static constexpr uint32_t field_id = FieldMetadata_Source::kFieldId;
773     // Call the appropriate protozero::Message::Append(field_id, ...)
774     // method based on the type of the field.
775     ::protozero::internal::FieldWriter<
776       ::protozero::proto_utils::ProtoSchemaType::kUint32>
777         ::Append(*this, field_id, value);
778   }
779 
780   using FieldMetadata_Action =
781     ::protozero::proto_utils::FieldMetadata<
782       4,
783       ::protozero::proto_utils::RepetitionType::kNotRepeated,
784       ::protozero::proto_utils::ProtoSchemaType::kInt32,
785       int32_t,
786       AndroidMotionEvent>;
787 
788   static constexpr FieldMetadata_Action kAction{};
set_action(int32_t value)789   void set_action(int32_t value) {
790     static constexpr uint32_t field_id = FieldMetadata_Action::kFieldId;
791     // Call the appropriate protozero::Message::Append(field_id, ...)
792     // method based on the type of the field.
793     ::protozero::internal::FieldWriter<
794       ::protozero::proto_utils::ProtoSchemaType::kInt32>
795         ::Append(*this, field_id, value);
796   }
797 
798   using FieldMetadata_DeviceId =
799     ::protozero::proto_utils::FieldMetadata<
800       5,
801       ::protozero::proto_utils::RepetitionType::kNotRepeated,
802       ::protozero::proto_utils::ProtoSchemaType::kInt32,
803       int32_t,
804       AndroidMotionEvent>;
805 
806   static constexpr FieldMetadata_DeviceId kDeviceId{};
set_device_id(int32_t value)807   void set_device_id(int32_t value) {
808     static constexpr uint32_t field_id = FieldMetadata_DeviceId::kFieldId;
809     // Call the appropriate protozero::Message::Append(field_id, ...)
810     // method based on the type of the field.
811     ::protozero::internal::FieldWriter<
812       ::protozero::proto_utils::ProtoSchemaType::kInt32>
813         ::Append(*this, field_id, value);
814   }
815 
816   using FieldMetadata_DisplayId =
817     ::protozero::proto_utils::FieldMetadata<
818       6,
819       ::protozero::proto_utils::RepetitionType::kNotRepeated,
820       ::protozero::proto_utils::ProtoSchemaType::kSint32,
821       int32_t,
822       AndroidMotionEvent>;
823 
824   static constexpr FieldMetadata_DisplayId kDisplayId{};
set_display_id(int32_t value)825   void set_display_id(int32_t value) {
826     static constexpr uint32_t field_id = FieldMetadata_DisplayId::kFieldId;
827     // Call the appropriate protozero::Message::Append(field_id, ...)
828     // method based on the type of the field.
829     ::protozero::internal::FieldWriter<
830       ::protozero::proto_utils::ProtoSchemaType::kSint32>
831         ::Append(*this, field_id, value);
832   }
833 
834   using FieldMetadata_Classification =
835     ::protozero::proto_utils::FieldMetadata<
836       7,
837       ::protozero::proto_utils::RepetitionType::kNotRepeated,
838       ::protozero::proto_utils::ProtoSchemaType::kInt32,
839       int32_t,
840       AndroidMotionEvent>;
841 
842   static constexpr FieldMetadata_Classification kClassification{};
set_classification(int32_t value)843   void set_classification(int32_t value) {
844     static constexpr uint32_t field_id = FieldMetadata_Classification::kFieldId;
845     // Call the appropriate protozero::Message::Append(field_id, ...)
846     // method based on the type of the field.
847     ::protozero::internal::FieldWriter<
848       ::protozero::proto_utils::ProtoSchemaType::kInt32>
849         ::Append(*this, field_id, value);
850   }
851 
852   using FieldMetadata_Flags =
853     ::protozero::proto_utils::FieldMetadata<
854       8,
855       ::protozero::proto_utils::RepetitionType::kNotRepeated,
856       ::protozero::proto_utils::ProtoSchemaType::kUint32,
857       uint32_t,
858       AndroidMotionEvent>;
859 
860   static constexpr FieldMetadata_Flags kFlags{};
set_flags(uint32_t value)861   void set_flags(uint32_t value) {
862     static constexpr uint32_t field_id = FieldMetadata_Flags::kFieldId;
863     // Call the appropriate protozero::Message::Append(field_id, ...)
864     // method based on the type of the field.
865     ::protozero::internal::FieldWriter<
866       ::protozero::proto_utils::ProtoSchemaType::kUint32>
867         ::Append(*this, field_id, value);
868   }
869 
870   using FieldMetadata_Pointer =
871     ::protozero::proto_utils::FieldMetadata<
872       9,
873       ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
874       ::protozero::proto_utils::ProtoSchemaType::kMessage,
875       AndroidMotionEvent_Pointer,
876       AndroidMotionEvent>;
877 
878   static constexpr FieldMetadata_Pointer kPointer{};
add_pointer()879   template <typename T = AndroidMotionEvent_Pointer> T* add_pointer() {
880     return BeginNestedMessage<T>(9);
881   }
882 
883 
884   using FieldMetadata_OriginalEventId =
885     ::protozero::proto_utils::FieldMetadata<
886       16,
887       ::protozero::proto_utils::RepetitionType::kRepeatedPacked,
888       ::protozero::proto_utils::ProtoSchemaType::kFixed32,
889       uint32_t,
890       AndroidMotionEvent>;
891 
892   static constexpr FieldMetadata_OriginalEventId kOriginalEventId{};
set_original_event_id(const::protozero::PackedFixedSizeInt<uint32_t> & packed_buffer)893   void set_original_event_id(const ::protozero::PackedFixedSizeInt<uint32_t>& packed_buffer) {
894     AppendBytes(FieldMetadata_OriginalEventId::kFieldId, packed_buffer.data(),
895                 packed_buffer.size());
896   }
897 
898   using FieldMetadata_DownTimeNanos =
899     ::protozero::proto_utils::FieldMetadata<
900       17,
901       ::protozero::proto_utils::RepetitionType::kNotRepeated,
902       ::protozero::proto_utils::ProtoSchemaType::kInt64,
903       int64_t,
904       AndroidMotionEvent>;
905 
906   static constexpr FieldMetadata_DownTimeNanos kDownTimeNanos{};
set_down_time_nanos(int64_t value)907   void set_down_time_nanos(int64_t value) {
908     static constexpr uint32_t field_id = FieldMetadata_DownTimeNanos::kFieldId;
909     // Call the appropriate protozero::Message::Append(field_id, ...)
910     // method based on the type of the field.
911     ::protozero::internal::FieldWriter<
912       ::protozero::proto_utils::ProtoSchemaType::kInt64>
913         ::Append(*this, field_id, value);
914   }
915 
916   using FieldMetadata_CursorPositionX =
917     ::protozero::proto_utils::FieldMetadata<
918       18,
919       ::protozero::proto_utils::RepetitionType::kNotRepeated,
920       ::protozero::proto_utils::ProtoSchemaType::kFloat,
921       float,
922       AndroidMotionEvent>;
923 
924   static constexpr FieldMetadata_CursorPositionX kCursorPositionX{};
set_cursor_position_x(float value)925   void set_cursor_position_x(float value) {
926     static constexpr uint32_t field_id = FieldMetadata_CursorPositionX::kFieldId;
927     // Call the appropriate protozero::Message::Append(field_id, ...)
928     // method based on the type of the field.
929     ::protozero::internal::FieldWriter<
930       ::protozero::proto_utils::ProtoSchemaType::kFloat>
931         ::Append(*this, field_id, value);
932   }
933 
934   using FieldMetadata_CursorPositionY =
935     ::protozero::proto_utils::FieldMetadata<
936       19,
937       ::protozero::proto_utils::RepetitionType::kNotRepeated,
938       ::protozero::proto_utils::ProtoSchemaType::kFloat,
939       float,
940       AndroidMotionEvent>;
941 
942   static constexpr FieldMetadata_CursorPositionY kCursorPositionY{};
set_cursor_position_y(float value)943   void set_cursor_position_y(float value) {
944     static constexpr uint32_t field_id = FieldMetadata_CursorPositionY::kFieldId;
945     // Call the appropriate protozero::Message::Append(field_id, ...)
946     // method based on the type of the field.
947     ::protozero::internal::FieldWriter<
948       ::protozero::proto_utils::ProtoSchemaType::kFloat>
949         ::Append(*this, field_id, value);
950   }
951 
952   using FieldMetadata_ActionButton =
953     ::protozero::proto_utils::FieldMetadata<
954       20,
955       ::protozero::proto_utils::RepetitionType::kNotRepeated,
956       ::protozero::proto_utils::ProtoSchemaType::kInt32,
957       int32_t,
958       AndroidMotionEvent>;
959 
960   static constexpr FieldMetadata_ActionButton kActionButton{};
set_action_button(int32_t value)961   void set_action_button(int32_t value) {
962     static constexpr uint32_t field_id = FieldMetadata_ActionButton::kFieldId;
963     // Call the appropriate protozero::Message::Append(field_id, ...)
964     // method based on the type of the field.
965     ::protozero::internal::FieldWriter<
966       ::protozero::proto_utils::ProtoSchemaType::kInt32>
967         ::Append(*this, field_id, value);
968   }
969 
970   using FieldMetadata_ButtonState =
971     ::protozero::proto_utils::FieldMetadata<
972       21,
973       ::protozero::proto_utils::RepetitionType::kNotRepeated,
974       ::protozero::proto_utils::ProtoSchemaType::kUint32,
975       uint32_t,
976       AndroidMotionEvent>;
977 
978   static constexpr FieldMetadata_ButtonState kButtonState{};
set_button_state(uint32_t value)979   void set_button_state(uint32_t value) {
980     static constexpr uint32_t field_id = FieldMetadata_ButtonState::kFieldId;
981     // Call the appropriate protozero::Message::Append(field_id, ...)
982     // method based on the type of the field.
983     ::protozero::internal::FieldWriter<
984       ::protozero::proto_utils::ProtoSchemaType::kUint32>
985         ::Append(*this, field_id, value);
986   }
987 
988   using FieldMetadata_MetaState =
989     ::protozero::proto_utils::FieldMetadata<
990       22,
991       ::protozero::proto_utils::RepetitionType::kNotRepeated,
992       ::protozero::proto_utils::ProtoSchemaType::kUint32,
993       uint32_t,
994       AndroidMotionEvent>;
995 
996   static constexpr FieldMetadata_MetaState kMetaState{};
set_meta_state(uint32_t value)997   void set_meta_state(uint32_t value) {
998     static constexpr uint32_t field_id = FieldMetadata_MetaState::kFieldId;
999     // Call the appropriate protozero::Message::Append(field_id, ...)
1000     // method based on the type of the field.
1001     ::protozero::internal::FieldWriter<
1002       ::protozero::proto_utils::ProtoSchemaType::kUint32>
1003         ::Append(*this, field_id, value);
1004   }
1005 
1006   using FieldMetadata_PolicyFlags =
1007     ::protozero::proto_utils::FieldMetadata<
1008       23,
1009       ::protozero::proto_utils::RepetitionType::kNotRepeated,
1010       ::protozero::proto_utils::ProtoSchemaType::kUint32,
1011       uint32_t,
1012       AndroidMotionEvent>;
1013 
1014   static constexpr FieldMetadata_PolicyFlags kPolicyFlags{};
set_policy_flags(uint32_t value)1015   void set_policy_flags(uint32_t value) {
1016     static constexpr uint32_t field_id = FieldMetadata_PolicyFlags::kFieldId;
1017     // Call the appropriate protozero::Message::Append(field_id, ...)
1018     // method based on the type of the field.
1019     ::protozero::internal::FieldWriter<
1020       ::protozero::proto_utils::ProtoSchemaType::kUint32>
1021         ::Append(*this, field_id, value);
1022   }
1023 
1024   using FieldMetadata_PrecisionX =
1025     ::protozero::proto_utils::FieldMetadata<
1026       24,
1027       ::protozero::proto_utils::RepetitionType::kNotRepeated,
1028       ::protozero::proto_utils::ProtoSchemaType::kFloat,
1029       float,
1030       AndroidMotionEvent>;
1031 
1032   static constexpr FieldMetadata_PrecisionX kPrecisionX{};
set_precision_x(float value)1033   void set_precision_x(float value) {
1034     static constexpr uint32_t field_id = FieldMetadata_PrecisionX::kFieldId;
1035     // Call the appropriate protozero::Message::Append(field_id, ...)
1036     // method based on the type of the field.
1037     ::protozero::internal::FieldWriter<
1038       ::protozero::proto_utils::ProtoSchemaType::kFloat>
1039         ::Append(*this, field_id, value);
1040   }
1041 
1042   using FieldMetadata_PrecisionY =
1043     ::protozero::proto_utils::FieldMetadata<
1044       25,
1045       ::protozero::proto_utils::RepetitionType::kNotRepeated,
1046       ::protozero::proto_utils::ProtoSchemaType::kFloat,
1047       float,
1048       AndroidMotionEvent>;
1049 
1050   static constexpr FieldMetadata_PrecisionY kPrecisionY{};
set_precision_y(float value)1051   void set_precision_y(float value) {
1052     static constexpr uint32_t field_id = FieldMetadata_PrecisionY::kFieldId;
1053     // Call the appropriate protozero::Message::Append(field_id, ...)
1054     // method based on the type of the field.
1055     ::protozero::internal::FieldWriter<
1056       ::protozero::proto_utils::ProtoSchemaType::kFloat>
1057         ::Append(*this, field_id, value);
1058   }
1059 };
1060 
1061 class AndroidMotionEvent_Pointer_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/3, /*HAS_NONPACKED_REPEATED_FIELDS=*/true> {
1062  public:
AndroidMotionEvent_Pointer_Decoder(const uint8_t * data,size_t len)1063   AndroidMotionEvent_Pointer_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
AndroidMotionEvent_Pointer_Decoder(const std::string & raw)1064   explicit AndroidMotionEvent_Pointer_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
AndroidMotionEvent_Pointer_Decoder(const::protozero::ConstBytes & raw)1065   explicit AndroidMotionEvent_Pointer_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_axis_value()1066   bool has_axis_value() const { return at<1>().valid(); }
axis_value()1067   ::protozero::RepeatedFieldIterator<::protozero::ConstBytes> axis_value() const { return GetRepeated<::protozero::ConstBytes>(1); }
has_pointer_id()1068   bool has_pointer_id() const { return at<2>().valid(); }
pointer_id()1069   int32_t pointer_id() const { return at<2>().as_int32(); }
has_tool_type()1070   bool has_tool_type() const { return at<3>().valid(); }
tool_type()1071   int32_t tool_type() const { return at<3>().as_int32(); }
1072 };
1073 
1074 class AndroidMotionEvent_Pointer : public ::protozero::Message {
1075  public:
1076   using Decoder = AndroidMotionEvent_Pointer_Decoder;
1077   enum : int32_t {
1078     kAxisValueFieldNumber = 1,
1079     kPointerIdFieldNumber = 2,
1080     kToolTypeFieldNumber = 3,
1081   };
GetName()1082   static constexpr const char* GetName() { return ".perfetto.protos.AndroidMotionEvent.Pointer"; }
1083 
1084   using AxisValue = ::perfetto::protos::pbzero::AndroidMotionEvent_Pointer_AxisValue;
1085 
1086   using FieldMetadata_AxisValue =
1087     ::protozero::proto_utils::FieldMetadata<
1088       1,
1089       ::protozero::proto_utils::RepetitionType::kRepeatedNotPacked,
1090       ::protozero::proto_utils::ProtoSchemaType::kMessage,
1091       AndroidMotionEvent_Pointer_AxisValue,
1092       AndroidMotionEvent_Pointer>;
1093 
1094   static constexpr FieldMetadata_AxisValue kAxisValue{};
add_axis_value()1095   template <typename T = AndroidMotionEvent_Pointer_AxisValue> T* add_axis_value() {
1096     return BeginNestedMessage<T>(1);
1097   }
1098 
1099 
1100   using FieldMetadata_PointerId =
1101     ::protozero::proto_utils::FieldMetadata<
1102       2,
1103       ::protozero::proto_utils::RepetitionType::kNotRepeated,
1104       ::protozero::proto_utils::ProtoSchemaType::kInt32,
1105       int32_t,
1106       AndroidMotionEvent_Pointer>;
1107 
1108   static constexpr FieldMetadata_PointerId kPointerId{};
set_pointer_id(int32_t value)1109   void set_pointer_id(int32_t value) {
1110     static constexpr uint32_t field_id = FieldMetadata_PointerId::kFieldId;
1111     // Call the appropriate protozero::Message::Append(field_id, ...)
1112     // method based on the type of the field.
1113     ::protozero::internal::FieldWriter<
1114       ::protozero::proto_utils::ProtoSchemaType::kInt32>
1115         ::Append(*this, field_id, value);
1116   }
1117 
1118   using FieldMetadata_ToolType =
1119     ::protozero::proto_utils::FieldMetadata<
1120       3,
1121       ::protozero::proto_utils::RepetitionType::kNotRepeated,
1122       ::protozero::proto_utils::ProtoSchemaType::kInt32,
1123       int32_t,
1124       AndroidMotionEvent_Pointer>;
1125 
1126   static constexpr FieldMetadata_ToolType kToolType{};
set_tool_type(int32_t value)1127   void set_tool_type(int32_t value) {
1128     static constexpr uint32_t field_id = FieldMetadata_ToolType::kFieldId;
1129     // Call the appropriate protozero::Message::Append(field_id, ...)
1130     // method based on the type of the field.
1131     ::protozero::internal::FieldWriter<
1132       ::protozero::proto_utils::ProtoSchemaType::kInt32>
1133         ::Append(*this, field_id, value);
1134   }
1135 };
1136 
1137 class AndroidMotionEvent_Pointer_AxisValue_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/2, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
1138  public:
AndroidMotionEvent_Pointer_AxisValue_Decoder(const uint8_t * data,size_t len)1139   AndroidMotionEvent_Pointer_AxisValue_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
AndroidMotionEvent_Pointer_AxisValue_Decoder(const std::string & raw)1140   explicit AndroidMotionEvent_Pointer_AxisValue_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
AndroidMotionEvent_Pointer_AxisValue_Decoder(const::protozero::ConstBytes & raw)1141   explicit AndroidMotionEvent_Pointer_AxisValue_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_axis()1142   bool has_axis() const { return at<1>().valid(); }
axis()1143   int32_t axis() const { return at<1>().as_int32(); }
has_value()1144   bool has_value() const { return at<2>().valid(); }
value()1145   float value() const { return at<2>().as_float(); }
1146 };
1147 
1148 class AndroidMotionEvent_Pointer_AxisValue : public ::protozero::Message {
1149  public:
1150   using Decoder = AndroidMotionEvent_Pointer_AxisValue_Decoder;
1151   enum : int32_t {
1152     kAxisFieldNumber = 1,
1153     kValueFieldNumber = 2,
1154   };
GetName()1155   static constexpr const char* GetName() { return ".perfetto.protos.AndroidMotionEvent.Pointer.AxisValue"; }
1156 
1157 
1158   using FieldMetadata_Axis =
1159     ::protozero::proto_utils::FieldMetadata<
1160       1,
1161       ::protozero::proto_utils::RepetitionType::kNotRepeated,
1162       ::protozero::proto_utils::ProtoSchemaType::kInt32,
1163       int32_t,
1164       AndroidMotionEvent_Pointer_AxisValue>;
1165 
1166   static constexpr FieldMetadata_Axis kAxis{};
set_axis(int32_t value)1167   void set_axis(int32_t value) {
1168     static constexpr uint32_t field_id = FieldMetadata_Axis::kFieldId;
1169     // Call the appropriate protozero::Message::Append(field_id, ...)
1170     // method based on the type of the field.
1171     ::protozero::internal::FieldWriter<
1172       ::protozero::proto_utils::ProtoSchemaType::kInt32>
1173         ::Append(*this, field_id, value);
1174   }
1175 
1176   using FieldMetadata_Value =
1177     ::protozero::proto_utils::FieldMetadata<
1178       2,
1179       ::protozero::proto_utils::RepetitionType::kNotRepeated,
1180       ::protozero::proto_utils::ProtoSchemaType::kFloat,
1181       float,
1182       AndroidMotionEvent_Pointer_AxisValue>;
1183 
1184   static constexpr FieldMetadata_Value kValue{};
set_value(float value)1185   void set_value(float value) {
1186     static constexpr uint32_t field_id = FieldMetadata_Value::kFieldId;
1187     // Call the appropriate protozero::Message::Append(field_id, ...)
1188     // method based on the type of the field.
1189     ::protozero::internal::FieldWriter<
1190       ::protozero::proto_utils::ProtoSchemaType::kFloat>
1191         ::Append(*this, field_id, value);
1192   }
1193 };
1194 
1195 } // Namespace.
1196 } // Namespace.
1197 } // Namespace.
1198 #endif  // Include guard.
1199