1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: user_demographics.proto
3
4 #ifndef GOOGLE_PROTOBUF_INCLUDED_user_5fdemographics_2eproto
5 #define GOOGLE_PROTOBUF_INCLUDED_user_5fdemographics_2eproto
6
7 #include <limits>
8 #include <string>
9
10 #include <google/protobuf/port_def.inc>
11 #if PROTOBUF_VERSION < 3021000
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
14 #error your headers.
15 #endif
16 #if 3021012 < PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
20 #endif
21
22 #include <google/protobuf/port_undef.inc>
23 #include <google/protobuf/io/coded_stream.h>
24 #include <google/protobuf/arena.h>
25 #include <google/protobuf/arenastring.h>
26 #include <google/protobuf/generated_message_util.h>
27 #include <google/protobuf/metadata_lite.h>
28 #include <google/protobuf/message_lite.h>
29 #include <google/protobuf/repeated_field.h> // IWYU pragma: export
30 #include <google/protobuf/extension_set.h> // IWYU pragma: export
31 #include <google/protobuf/generated_enum_util.h>
32 // @@protoc_insertion_point(includes)
33 #include <google/protobuf/port_def.inc>
34 #define PROTOBUF_INTERNAL_EXPORT_user_5fdemographics_2eproto
35 PROTOBUF_NAMESPACE_OPEN
36 namespace internal {
37 class AnyMetadata;
38 } // namespace internal
39 PROTOBUF_NAMESPACE_CLOSE
40
41 // Internal implementation detail -- do not use these members.
42 struct TableStruct_user_5fdemographics_2eproto {
43 static const uint32_t offsets[];
44 };
45 namespace metrics {
46 class UserDemographicsProto;
47 struct UserDemographicsProtoDefaultTypeInternal;
48 extern UserDemographicsProtoDefaultTypeInternal _UserDemographicsProto_default_instance_;
49 } // namespace metrics
50 PROTOBUF_NAMESPACE_OPEN
51 template<> ::metrics::UserDemographicsProto* Arena::CreateMaybeMessage<::metrics::UserDemographicsProto>(Arena*);
52 PROTOBUF_NAMESPACE_CLOSE
53 namespace metrics {
54
55 enum UserDemographicsProto_Gender : int {
56 UserDemographicsProto_Gender_GENDER_UNKNOWN = 0,
57 UserDemographicsProto_Gender_GENDER_MALE = 1,
58 UserDemographicsProto_Gender_GENDER_FEMALE = 2,
59 UserDemographicsProto_Gender_GENDER_CUSTOM_OR_OTHER = 3
60 };
61 bool UserDemographicsProto_Gender_IsValid(int value);
62 constexpr UserDemographicsProto_Gender UserDemographicsProto_Gender_Gender_MIN = UserDemographicsProto_Gender_GENDER_UNKNOWN;
63 constexpr UserDemographicsProto_Gender UserDemographicsProto_Gender_Gender_MAX = UserDemographicsProto_Gender_GENDER_CUSTOM_OR_OTHER;
64 constexpr int UserDemographicsProto_Gender_Gender_ARRAYSIZE = UserDemographicsProto_Gender_Gender_MAX + 1;
65
66 const std::string& UserDemographicsProto_Gender_Name(UserDemographicsProto_Gender value);
67 template<typename T>
UserDemographicsProto_Gender_Name(T enum_t_value)68 inline const std::string& UserDemographicsProto_Gender_Name(T enum_t_value) {
69 static_assert(::std::is_same<T, UserDemographicsProto_Gender>::value ||
70 ::std::is_integral<T>::value,
71 "Incorrect type passed to function UserDemographicsProto_Gender_Name.");
72 return UserDemographicsProto_Gender_Name(static_cast<UserDemographicsProto_Gender>(enum_t_value));
73 }
74 bool UserDemographicsProto_Gender_Parse(
75 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, UserDemographicsProto_Gender* value);
76 // ===================================================================
77
78 class UserDemographicsProto final :
79 public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:metrics.UserDemographicsProto) */ {
80 public:
UserDemographicsProto()81 inline UserDemographicsProto() : UserDemographicsProto(nullptr) {}
82 ~UserDemographicsProto() override;
83 explicit PROTOBUF_CONSTEXPR UserDemographicsProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
84
85 UserDemographicsProto(const UserDemographicsProto& from);
UserDemographicsProto(UserDemographicsProto && from)86 UserDemographicsProto(UserDemographicsProto&& from) noexcept
87 : UserDemographicsProto() {
88 *this = ::std::move(from);
89 }
90
91 inline UserDemographicsProto& operator=(const UserDemographicsProto& from) {
92 CopyFrom(from);
93 return *this;
94 }
95 inline UserDemographicsProto& operator=(UserDemographicsProto&& from) noexcept {
96 if (this == &from) return *this;
97 if (GetOwningArena() == from.GetOwningArena()
98 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
99 && GetOwningArena() != nullptr
100 #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
101 ) {
102 InternalSwap(&from);
103 } else {
104 CopyFrom(from);
105 }
106 return *this;
107 }
108
unknown_fields()109 inline const std::string& unknown_fields() const {
110 return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString);
111 }
mutable_unknown_fields()112 inline std::string* mutable_unknown_fields() {
113 return _internal_metadata_.mutable_unknown_fields<std::string>();
114 }
115
default_instance()116 static const UserDemographicsProto& default_instance() {
117 return *internal_default_instance();
118 }
internal_default_instance()119 static inline const UserDemographicsProto* internal_default_instance() {
120 return reinterpret_cast<const UserDemographicsProto*>(
121 &_UserDemographicsProto_default_instance_);
122 }
123 static constexpr int kIndexInFileMessages =
124 0;
125
swap(UserDemographicsProto & a,UserDemographicsProto & b)126 friend void swap(UserDemographicsProto& a, UserDemographicsProto& b) {
127 a.Swap(&b);
128 }
Swap(UserDemographicsProto * other)129 PROTOBUF_NOINLINE void Swap(UserDemographicsProto* other) {
130 if (other == this) return;
131 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
132 if (GetOwningArena() != nullptr &&
133 GetOwningArena() == other->GetOwningArena()) {
134 #else // PROTOBUF_FORCE_COPY_IN_SWAP
135 if (GetOwningArena() == other->GetOwningArena()) {
136 #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
137 InternalSwap(other);
138 } else {
139 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
140 }
141 }
142 void UnsafeArenaSwap(UserDemographicsProto* other) {
143 if (other == this) return;
144 GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
145 InternalSwap(other);
146 }
147
148 // implements Message ----------------------------------------------
149
150 UserDemographicsProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
151 return CreateMaybeMessage<UserDemographicsProto>(arena);
152 }
153 void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final;
154 void CopyFrom(const UserDemographicsProto& from);
155 void MergeFrom(const UserDemographicsProto& from);
156 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
157 bool IsInitialized() const final;
158
159 size_t ByteSizeLong() const final;
160 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
161 uint8_t* _InternalSerialize(
162 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
163 int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
164
165 private:
166 void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
167 void SharedDtor();
168 void SetCachedSize(int size) const;
169 void InternalSwap(UserDemographicsProto* other);
170
171 private:
172 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
173 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
174 return "metrics.UserDemographicsProto";
175 }
176 protected:
177 explicit UserDemographicsProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
178 bool is_message_owned = false);
179 public:
180
181 std::string GetTypeName() const final;
182
183 // nested types ----------------------------------------------------
184
185 typedef UserDemographicsProto_Gender Gender;
186 static constexpr Gender GENDER_UNKNOWN =
187 UserDemographicsProto_Gender_GENDER_UNKNOWN;
188 static constexpr Gender GENDER_MALE =
189 UserDemographicsProto_Gender_GENDER_MALE;
190 static constexpr Gender GENDER_FEMALE =
191 UserDemographicsProto_Gender_GENDER_FEMALE;
192 static constexpr Gender GENDER_CUSTOM_OR_OTHER =
193 UserDemographicsProto_Gender_GENDER_CUSTOM_OR_OTHER;
194 static inline bool Gender_IsValid(int value) {
195 return UserDemographicsProto_Gender_IsValid(value);
196 }
197 static constexpr Gender Gender_MIN =
198 UserDemographicsProto_Gender_Gender_MIN;
199 static constexpr Gender Gender_MAX =
200 UserDemographicsProto_Gender_Gender_MAX;
201 static constexpr int Gender_ARRAYSIZE =
202 UserDemographicsProto_Gender_Gender_ARRAYSIZE;
203 template<typename T>
204 static inline const std::string& Gender_Name(T enum_t_value) {
205 static_assert(::std::is_same<T, Gender>::value ||
206 ::std::is_integral<T>::value,
207 "Incorrect type passed to function Gender_Name.");
208 return UserDemographicsProto_Gender_Name(enum_t_value);
209 }
210 static inline bool Gender_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,
211 Gender* value) {
212 return UserDemographicsProto_Gender_Parse(name, value);
213 }
214
215 // accessors -------------------------------------------------------
216
217 enum : int {
218 kBirthYearFieldNumber = 1,
219 kGenderFieldNumber = 2,
220 };
221 // optional int32 birth_year = 1;
222 bool has_birth_year() const;
223 private:
224 bool _internal_has_birth_year() const;
225 public:
226 void clear_birth_year();
227 int32_t birth_year() const;
228 void set_birth_year(int32_t value);
229 private:
230 int32_t _internal_birth_year() const;
231 void _internal_set_birth_year(int32_t value);
232 public:
233
234 // optional .metrics.UserDemographicsProto.Gender gender = 2;
235 bool has_gender() const;
236 private:
237 bool _internal_has_gender() const;
238 public:
239 void clear_gender();
240 ::metrics::UserDemographicsProto_Gender gender() const;
241 void set_gender(::metrics::UserDemographicsProto_Gender value);
242 private:
243 ::metrics::UserDemographicsProto_Gender _internal_gender() const;
244 void _internal_set_gender(::metrics::UserDemographicsProto_Gender value);
245 public:
246
247 // @@protoc_insertion_point(class_scope:metrics.UserDemographicsProto)
248 private:
249 class _Internal;
250
251 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
252 typedef void InternalArenaConstructable_;
253 typedef void DestructorSkippable_;
254 struct Impl_ {
255 ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
256 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
257 int32_t birth_year_;
258 int gender_;
259 };
260 union { Impl_ _impl_; };
261 friend struct ::TableStruct_user_5fdemographics_2eproto;
262 };
263 // ===================================================================
264
265
266 // ===================================================================
267
268 #ifdef __GNUC__
269 #pragma GCC diagnostic push
270 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
271 #endif // __GNUC__
272 // UserDemographicsProto
273
274 // optional int32 birth_year = 1;
_internal_has_birth_year()275 inline bool UserDemographicsProto::_internal_has_birth_year() const {
276 bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
277 return value;
278 }
has_birth_year()279 inline bool UserDemographicsProto::has_birth_year() const {
280 return _internal_has_birth_year();
281 }
clear_birth_year()282 inline void UserDemographicsProto::clear_birth_year() {
283 _impl_.birth_year_ = 0;
284 _impl_._has_bits_[0] &= ~0x00000001u;
285 }
_internal_birth_year()286 inline int32_t UserDemographicsProto::_internal_birth_year() const {
287 return _impl_.birth_year_;
288 }
birth_year()289 inline int32_t UserDemographicsProto::birth_year() const {
290 // @@protoc_insertion_point(field_get:metrics.UserDemographicsProto.birth_year)
291 return _internal_birth_year();
292 }
_internal_set_birth_year(int32_t value)293 inline void UserDemographicsProto::_internal_set_birth_year(int32_t value) {
294 _impl_._has_bits_[0] |= 0x00000001u;
295 _impl_.birth_year_ = value;
296 }
set_birth_year(int32_t value)297 inline void UserDemographicsProto::set_birth_year(int32_t value) {
298 _internal_set_birth_year(value);
299 // @@protoc_insertion_point(field_set:metrics.UserDemographicsProto.birth_year)
300 }
301
302 // optional .metrics.UserDemographicsProto.Gender gender = 2;
_internal_has_gender()303 inline bool UserDemographicsProto::_internal_has_gender() const {
304 bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
305 return value;
306 }
has_gender()307 inline bool UserDemographicsProto::has_gender() const {
308 return _internal_has_gender();
309 }
clear_gender()310 inline void UserDemographicsProto::clear_gender() {
311 _impl_.gender_ = 0;
312 _impl_._has_bits_[0] &= ~0x00000002u;
313 }
_internal_gender()314 inline ::metrics::UserDemographicsProto_Gender UserDemographicsProto::_internal_gender() const {
315 return static_cast< ::metrics::UserDemographicsProto_Gender >(_impl_.gender_);
316 }
gender()317 inline ::metrics::UserDemographicsProto_Gender UserDemographicsProto::gender() const {
318 // @@protoc_insertion_point(field_get:metrics.UserDemographicsProto.gender)
319 return _internal_gender();
320 }
_internal_set_gender(::metrics::UserDemographicsProto_Gender value)321 inline void UserDemographicsProto::_internal_set_gender(::metrics::UserDemographicsProto_Gender value) {
322 assert(::metrics::UserDemographicsProto_Gender_IsValid(value));
323 _impl_._has_bits_[0] |= 0x00000002u;
324 _impl_.gender_ = value;
325 }
set_gender(::metrics::UserDemographicsProto_Gender value)326 inline void UserDemographicsProto::set_gender(::metrics::UserDemographicsProto_Gender value) {
327 _internal_set_gender(value);
328 // @@protoc_insertion_point(field_set:metrics.UserDemographicsProto.gender)
329 }
330
331 #ifdef __GNUC__
332 #pragma GCC diagnostic pop
333 #endif // __GNUC__
334
335 // @@protoc_insertion_point(namespace_scope)
336
337 } // namespace metrics
338
339 PROTOBUF_NAMESPACE_OPEN
340
341 template <> struct is_proto_enum< ::metrics::UserDemographicsProto_Gender> : ::std::true_type {};
342
343 PROTOBUF_NAMESPACE_CLOSE
344
345 // @@protoc_insertion_point(global_scope)
346
347 #include <google/protobuf/port_undef.inc>
348 #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_user_5fdemographics_2eproto
349