1 // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT.
2 
3 #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INPUTMETHOD_EDITORINFO_PROTO_H_
4 #define PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_ANDROID_VIEW_INPUTMETHOD_EDITORINFO_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 
16 namespace perfetto {
17 namespace protos {
18 namespace pbzero {
19 
20 class EditorInfoProto_Decoder : public ::protozero::TypedProtoDecoder</*MAX_FIELD_ID=*/6, /*HAS_NONPACKED_REPEATED_FIELDS=*/false> {
21  public:
EditorInfoProto_Decoder(const uint8_t * data,size_t len)22   EditorInfoProto_Decoder(const uint8_t* data, size_t len) : TypedProtoDecoder(data, len) {}
EditorInfoProto_Decoder(const std::string & raw)23   explicit EditorInfoProto_Decoder(const std::string& raw) : TypedProtoDecoder(reinterpret_cast<const uint8_t*>(raw.data()), raw.size()) {}
EditorInfoProto_Decoder(const::protozero::ConstBytes & raw)24   explicit EditorInfoProto_Decoder(const ::protozero::ConstBytes& raw) : TypedProtoDecoder(raw.data, raw.size) {}
has_input_type()25   bool has_input_type() const { return at<1>().valid(); }
input_type()26   int32_t input_type() const { return at<1>().as_int32(); }
has_ime_options()27   bool has_ime_options() const { return at<2>().valid(); }
ime_options()28   int32_t ime_options() const { return at<2>().as_int32(); }
has_private_ime_options()29   bool has_private_ime_options() const { return at<3>().valid(); }
private_ime_options()30   ::protozero::ConstChars private_ime_options() const { return at<3>().as_string(); }
has_package_name()31   bool has_package_name() const { return at<4>().valid(); }
package_name()32   ::protozero::ConstChars package_name() const { return at<4>().as_string(); }
has_field_id()33   bool has_field_id() const { return at<5>().valid(); }
field_id()34   int32_t field_id() const { return at<5>().as_int32(); }
has_target_input_method_user_id()35   bool has_target_input_method_user_id() const { return at<6>().valid(); }
target_input_method_user_id()36   int32_t target_input_method_user_id() const { return at<6>().as_int32(); }
37 };
38 
39 class EditorInfoProto : public ::protozero::Message {
40  public:
41   using Decoder = EditorInfoProto_Decoder;
42   enum : int32_t {
43     kInputTypeFieldNumber = 1,
44     kImeOptionsFieldNumber = 2,
45     kPrivateImeOptionsFieldNumber = 3,
46     kPackageNameFieldNumber = 4,
47     kFieldIdFieldNumber = 5,
48     kTargetInputMethodUserIdFieldNumber = 6,
49   };
GetName()50   static constexpr const char* GetName() { return ".perfetto.protos.EditorInfoProto"; }
51 
52 
53   using FieldMetadata_InputType =
54     ::protozero::proto_utils::FieldMetadata<
55       1,
56       ::protozero::proto_utils::RepetitionType::kNotRepeated,
57       ::protozero::proto_utils::ProtoSchemaType::kInt32,
58       int32_t,
59       EditorInfoProto>;
60 
61   static constexpr FieldMetadata_InputType kInputType{};
set_input_type(int32_t value)62   void set_input_type(int32_t value) {
63     static constexpr uint32_t field_id = FieldMetadata_InputType::kFieldId;
64     // Call the appropriate protozero::Message::Append(field_id, ...)
65     // method based on the type of the field.
66     ::protozero::internal::FieldWriter<
67       ::protozero::proto_utils::ProtoSchemaType::kInt32>
68         ::Append(*this, field_id, value);
69   }
70 
71   using FieldMetadata_ImeOptions =
72     ::protozero::proto_utils::FieldMetadata<
73       2,
74       ::protozero::proto_utils::RepetitionType::kNotRepeated,
75       ::protozero::proto_utils::ProtoSchemaType::kInt32,
76       int32_t,
77       EditorInfoProto>;
78 
79   static constexpr FieldMetadata_ImeOptions kImeOptions{};
set_ime_options(int32_t value)80   void set_ime_options(int32_t value) {
81     static constexpr uint32_t field_id = FieldMetadata_ImeOptions::kFieldId;
82     // Call the appropriate protozero::Message::Append(field_id, ...)
83     // method based on the type of the field.
84     ::protozero::internal::FieldWriter<
85       ::protozero::proto_utils::ProtoSchemaType::kInt32>
86         ::Append(*this, field_id, value);
87   }
88 
89   using FieldMetadata_PrivateImeOptions =
90     ::protozero::proto_utils::FieldMetadata<
91       3,
92       ::protozero::proto_utils::RepetitionType::kNotRepeated,
93       ::protozero::proto_utils::ProtoSchemaType::kString,
94       std::string,
95       EditorInfoProto>;
96 
97   static constexpr FieldMetadata_PrivateImeOptions kPrivateImeOptions{};
set_private_ime_options(const char * data,size_t size)98   void set_private_ime_options(const char* data, size_t size) {
99     AppendBytes(FieldMetadata_PrivateImeOptions::kFieldId, data, size);
100   }
set_private_ime_options(::protozero::ConstChars chars)101   void set_private_ime_options(::protozero::ConstChars chars) {
102     AppendBytes(FieldMetadata_PrivateImeOptions::kFieldId, chars.data, chars.size);
103   }
set_private_ime_options(std::string value)104   void set_private_ime_options(std::string value) {
105     static constexpr uint32_t field_id = FieldMetadata_PrivateImeOptions::kFieldId;
106     // Call the appropriate protozero::Message::Append(field_id, ...)
107     // method based on the type of the field.
108     ::protozero::internal::FieldWriter<
109       ::protozero::proto_utils::ProtoSchemaType::kString>
110         ::Append(*this, field_id, value);
111   }
112 
113   using FieldMetadata_PackageName =
114     ::protozero::proto_utils::FieldMetadata<
115       4,
116       ::protozero::proto_utils::RepetitionType::kNotRepeated,
117       ::protozero::proto_utils::ProtoSchemaType::kString,
118       std::string,
119       EditorInfoProto>;
120 
121   static constexpr FieldMetadata_PackageName kPackageName{};
set_package_name(const char * data,size_t size)122   void set_package_name(const char* data, size_t size) {
123     AppendBytes(FieldMetadata_PackageName::kFieldId, data, size);
124   }
set_package_name(::protozero::ConstChars chars)125   void set_package_name(::protozero::ConstChars chars) {
126     AppendBytes(FieldMetadata_PackageName::kFieldId, chars.data, chars.size);
127   }
set_package_name(std::string value)128   void set_package_name(std::string value) {
129     static constexpr uint32_t field_id = FieldMetadata_PackageName::kFieldId;
130     // Call the appropriate protozero::Message::Append(field_id, ...)
131     // method based on the type of the field.
132     ::protozero::internal::FieldWriter<
133       ::protozero::proto_utils::ProtoSchemaType::kString>
134         ::Append(*this, field_id, value);
135   }
136 
137   using FieldMetadata_FieldId =
138     ::protozero::proto_utils::FieldMetadata<
139       5,
140       ::protozero::proto_utils::RepetitionType::kNotRepeated,
141       ::protozero::proto_utils::ProtoSchemaType::kInt32,
142       int32_t,
143       EditorInfoProto>;
144 
145   static constexpr FieldMetadata_FieldId kFieldId{};
set_field_id(int32_t value)146   void set_field_id(int32_t value) {
147     static constexpr uint32_t field_id = FieldMetadata_FieldId::kFieldId;
148     // Call the appropriate protozero::Message::Append(field_id, ...)
149     // method based on the type of the field.
150     ::protozero::internal::FieldWriter<
151       ::protozero::proto_utils::ProtoSchemaType::kInt32>
152         ::Append(*this, field_id, value);
153   }
154 
155   using FieldMetadata_TargetInputMethodUserId =
156     ::protozero::proto_utils::FieldMetadata<
157       6,
158       ::protozero::proto_utils::RepetitionType::kNotRepeated,
159       ::protozero::proto_utils::ProtoSchemaType::kInt32,
160       int32_t,
161       EditorInfoProto>;
162 
163   static constexpr FieldMetadata_TargetInputMethodUserId kTargetInputMethodUserId{};
set_target_input_method_user_id(int32_t value)164   void set_target_input_method_user_id(int32_t value) {
165     static constexpr uint32_t field_id = FieldMetadata_TargetInputMethodUserId::kFieldId;
166     // Call the appropriate protozero::Message::Append(field_id, ...)
167     // method based on the type of the field.
168     ::protozero::internal::FieldWriter<
169       ::protozero::proto_utils::ProtoSchemaType::kInt32>
170         ::Append(*this, field_id, value);
171   }
172 };
173 
174 } // Namespace.
175 } // Namespace.
176 } // Namespace.
177 #endif  // Include guard.
178