1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
2 
3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INSETSSOURCECONSUMER_PROTO_H_
4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INSETSSOURCECONSUMER_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 InsetsSourceControlProto;
19 class RectProto;
20 } // Namespace pbzero.
21 } // Namespace protos.
22 } // Namespace perfetto.
23 
24 namespace perfetto {
25 namespace protos {
26 namespace pbzero {
27 
28 class InsetsSourceConsumerProto_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/8, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
29  public:
InsetsSourceConsumerProto_Decoder(const uint8_t * data,size_t len)30   InsetsSourceConsumerProto_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
InsetsSourceConsumerProto_Decoder(const std::string & raw)31   explicit InsetsSourceConsumerProto_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
InsetsSourceConsumerProto_Decoder(const::protozero::ConstBytes & raw)32   explicit InsetsSourceConsumerProto_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_internal_insets_type()33   bool has_internal_insets_type() const { return at<1>().valid(); }
internal_insets_type()34   ::protozero::ConstChars internal_insets_type() const { return at<1>().as_string(); }
has_has_window_focus()35   bool has_has_window_focus() const { return at<2>().valid(); }
has_window_focus()36   bool has_window_focus() const { return at<2>().as_bool(); }
has_is_requested_visible()37   bool has_is_requested_visible() const { return at<3>().valid(); }
is_requested_visible()38   bool is_requested_visible() const { return at<3>().as_bool(); }
has_source_control()39   bool has_source_control() const { return at<4>().valid(); }
source_control()40   ::protozero::ConstBytes source_control() const { return at<4>().as_bytes(); }
has_pending_frame()41   bool has_pending_frame() const { return at<5>().valid(); }
pending_frame()42   ::protozero::ConstBytes pending_frame() const { return at<5>().as_bytes(); }
has_pending_visible_frame()43   bool has_pending_visible_frame() const { return at<6>().valid(); }
pending_visible_frame()44   ::protozero::ConstBytes pending_visible_frame() const { return at<6>().as_bytes(); }
has_animation_state()45   bool has_animation_state() const { return at<7>().valid(); }
animation_state()46   int32_t animation_state() const { return at<7>().as_int32(); }
has_type_number()47   bool has_type_number() const { return at<8>().valid(); }
type_number()48   int32_t type_number() const { return at<8>().as_int32(); }
49 };
50 
51 class InsetsSourceConsumerProto : public ::protozero::Message {
52  public:
53   using Decoder = InsetsSourceConsumerProto_Decoder;
54   enum : int32_t {
55     kInternalInsetsTypeFieldNumber = 1,
56     kHasWindowFocusFieldNumber = 2,
57     kIsRequestedVisibleFieldNumber = 3,
58     kSourceControlFieldNumber = 4,
59     kPendingFrameFieldNumber = 5,
60     kPendingVisibleFrameFieldNumber = 6,
61     kAnimationStateFieldNumber = 7,
62     kTypeNumberFieldNumber = 8,
63   };
GetName()64   static constexpr const char* GetName() { return ".perfetto.protos.InsetsSourceConsumerProto"; }
65 
66 
67   using FieldMetadata_InternalInsetsType =
68     ::protozero::proto_utils::FieldMetadata<
69       1,
70       ::protozero::proto_utils::RepetitionType::kNotRepeated,
71       ::protozero::proto_utils::ProtoSchemaType::kString,
72       std::string,
73       InsetsSourceConsumerProto>;
74 
75   static constexpr FieldMetadata_InternalInsetsType kInternalInsetsType{};
set_internal_insets_type(const char * data,size_t size)76   void set_internal_insets_type(const char* data, size_t size) {
77     AppendBytes(FieldMetadata_InternalInsetsType::kFieldId, data, size);
78   }
set_internal_insets_type(::protozero::ConstChars chars)79   void set_internal_insets_type(::protozero::ConstChars chars) {
80     AppendBytes(FieldMetadata_InternalInsetsType::kFieldId, chars.data, chars.size);
81   }
set_internal_insets_type(std::string value)82   void set_internal_insets_type(std::string value) {
83     static constexpr uint32_t field_id = FieldMetadata_InternalInsetsType::kFieldId;
84     // Call the appropriate protozero::Message::Append(field_id, ...)
85     // method based on the type of the field.
86     ::protozero::internal::FieldWriter<
87       ::protozero::proto_utils::ProtoSchemaType::kString>
88         ::Append(*this, field_id, value);
89   }
90 
91   using FieldMetadata_HasWindowFocus =
92     ::protozero::proto_utils::FieldMetadata<
93       2,
94       ::protozero::proto_utils::RepetitionType::kNotRepeated,
95       ::protozero::proto_utils::ProtoSchemaType::kBool,
96       bool,
97       InsetsSourceConsumerProto>;
98 
99   static constexpr FieldMetadata_HasWindowFocus kHasWindowFocus{};
set_has_window_focus(bool value)100   void set_has_window_focus(bool value) {
101     static constexpr uint32_t field_id = FieldMetadata_HasWindowFocus::kFieldId;
102     // Call the appropriate protozero::Message::Append(field_id, ...)
103     // method based on the type of the field.
104     ::protozero::internal::FieldWriter<
105       ::protozero::proto_utils::ProtoSchemaType::kBool>
106         ::Append(*this, field_id, value);
107   }
108 
109   using FieldMetadata_IsRequestedVisible =
110     ::protozero::proto_utils::FieldMetadata<
111       3,
112       ::protozero::proto_utils::RepetitionType::kNotRepeated,
113       ::protozero::proto_utils::ProtoSchemaType::kBool,
114       bool,
115       InsetsSourceConsumerProto>;
116 
117   static constexpr FieldMetadata_IsRequestedVisible kIsRequestedVisible{};
set_is_requested_visible(bool value)118   void set_is_requested_visible(bool value) {
119     static constexpr uint32_t field_id = FieldMetadata_IsRequestedVisible::kFieldId;
120     // Call the appropriate protozero::Message::Append(field_id, ...)
121     // method based on the type of the field.
122     ::protozero::internal::FieldWriter<
123       ::protozero::proto_utils::ProtoSchemaType::kBool>
124         ::Append(*this, field_id, value);
125   }
126 
127   using FieldMetadata_SourceControl =
128     ::protozero::proto_utils::FieldMetadata<
129       4,
130       ::protozero::proto_utils::RepetitionType::kNotRepeated,
131       ::protozero::proto_utils::ProtoSchemaType::kMessage,
132       InsetsSourceControlProto,
133       InsetsSourceConsumerProto>;
134 
135   static constexpr FieldMetadata_SourceControl kSourceControl{};
set_source_control()136   template <typename T = InsetsSourceControlProto> T* set_source_control() {
137     return BeginNestedMessage<T>(4);
138   }
139 
140 
141   using FieldMetadata_PendingFrame =
142     ::protozero::proto_utils::FieldMetadata<
143       5,
144       ::protozero::proto_utils::RepetitionType::kNotRepeated,
145       ::protozero::proto_utils::ProtoSchemaType::kMessage,
146       RectProto,
147       InsetsSourceConsumerProto>;
148 
149   static constexpr FieldMetadata_PendingFrame kPendingFrame{};
set_pending_frame()150   template <typename T = RectProto> T* set_pending_frame() {
151     return BeginNestedMessage<T>(5);
152   }
153 
154 
155   using FieldMetadata_PendingVisibleFrame =
156     ::protozero::proto_utils::FieldMetadata<
157       6,
158       ::protozero::proto_utils::RepetitionType::kNotRepeated,
159       ::protozero::proto_utils::ProtoSchemaType::kMessage,
160       RectProto,
161       InsetsSourceConsumerProto>;
162 
163   static constexpr FieldMetadata_PendingVisibleFrame kPendingVisibleFrame{};
set_pending_visible_frame()164   template <typename T = RectProto> T* set_pending_visible_frame() {
165     return BeginNestedMessage<T>(6);
166   }
167 
168 
169   using FieldMetadata_AnimationState =
170     ::protozero::proto_utils::FieldMetadata<
171       7,
172       ::protozero::proto_utils::RepetitionType::kNotRepeated,
173       ::protozero::proto_utils::ProtoSchemaType::kInt32,
174       int32_t,
175       InsetsSourceConsumerProto>;
176 
177   static constexpr FieldMetadata_AnimationState kAnimationState{};
set_animation_state(int32_t value)178   void set_animation_state(int32_t value) {
179     static constexpr uint32_t field_id = FieldMetadata_AnimationState::kFieldId;
180     // Call the appropriate protozero::Message::Append(field_id, ...)
181     // method based on the type of the field.
182     ::protozero::internal::FieldWriter<
183       ::protozero::proto_utils::ProtoSchemaType::kInt32>
184         ::Append(*this, field_id, value);
185   }
186 
187   using FieldMetadata_TypeNumber =
188     ::protozero::proto_utils::FieldMetadata<
189       8,
190       ::protozero::proto_utils::RepetitionType::kNotRepeated,
191       ::protozero::proto_utils::ProtoSchemaType::kInt32,
192       int32_t,
193       InsetsSourceConsumerProto>;
194 
195   static constexpr FieldMetadata_TypeNumber kTypeNumber{};
set_type_number(int32_t value)196   void set_type_number(int32_t value) {
197     static constexpr uint32_t field_id = FieldMetadata_TypeNumber::kFieldId;
198     // Call the appropriate protozero::Message::Append(field_id, ...)
199     // method based on the type of the field.
200     ::protozero::internal::FieldWriter<
201       ::protozero::proto_utils::ProtoSchemaType::kInt32>
202         ::Append(*this, field_id, value);
203   }
204 };
205 
206 } // Namespace.
207 } // Namespace.
208 } // Namespace.
209 #endif  // Include guard.
210