/src/brpc/build/test/snappy_message.pb.h
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: snappy_message.proto |
3 | | |
4 | | #ifndef GOOGLE_PROTOBUF_INCLUDED_snappy_5fmessage_2eproto |
5 | | #define GOOGLE_PROTOBUF_INCLUDED_snappy_5fmessage_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/generated_message_reflection.h> |
29 | | #include <google/protobuf/message.h> |
30 | | #include <google/protobuf/repeated_field.h> // IWYU pragma: export |
31 | | #include <google/protobuf/extension_set.h> // IWYU pragma: export |
32 | | #include <google/protobuf/unknown_field_set.h> |
33 | | // @@protoc_insertion_point(includes) |
34 | | #include <google/protobuf/port_def.inc> |
35 | | #define PROTOBUF_INTERNAL_EXPORT_snappy_5fmessage_2eproto |
36 | | PROTOBUF_NAMESPACE_OPEN |
37 | | namespace internal { |
38 | | class AnyMetadata; |
39 | | } // namespace internal |
40 | | PROTOBUF_NAMESPACE_CLOSE |
41 | | |
42 | | // Internal implementation detail -- do not use these members. |
43 | | struct TableStruct_snappy_5fmessage_2eproto { |
44 | | static const uint32_t offsets[]; |
45 | | }; |
46 | | extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_snappy_5fmessage_2eproto; |
47 | | namespace snappy_message { |
48 | | class SnappyMessageProto; |
49 | | struct SnappyMessageProtoDefaultTypeInternal; |
50 | | extern SnappyMessageProtoDefaultTypeInternal _SnappyMessageProto_default_instance_; |
51 | | } // namespace snappy_message |
52 | | PROTOBUF_NAMESPACE_OPEN |
53 | | template<> ::snappy_message::SnappyMessageProto* Arena::CreateMaybeMessage<::snappy_message::SnappyMessageProto>(Arena*); |
54 | | PROTOBUF_NAMESPACE_CLOSE |
55 | | namespace snappy_message { |
56 | | |
57 | | // =================================================================== |
58 | | |
59 | | class SnappyMessageProto final : |
60 | | public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:snappy_message.SnappyMessageProto) */ { |
61 | | public: |
62 | 0 | inline SnappyMessageProto() : SnappyMessageProto(nullptr) {} |
63 | | ~SnappyMessageProto() override; |
64 | | explicit PROTOBUF_CONSTEXPR SnappyMessageProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); |
65 | | |
66 | | SnappyMessageProto(const SnappyMessageProto& from); |
67 | | SnappyMessageProto(SnappyMessageProto&& from) noexcept |
68 | 0 | : SnappyMessageProto() { |
69 | 0 | *this = ::std::move(from); |
70 | 0 | } |
71 | | |
72 | 0 | inline SnappyMessageProto& operator=(const SnappyMessageProto& from) { |
73 | 0 | CopyFrom(from); |
74 | 0 | return *this; |
75 | 0 | } |
76 | 0 | inline SnappyMessageProto& operator=(SnappyMessageProto&& from) noexcept { |
77 | 0 | if (this == &from) return *this; |
78 | 0 | if (GetOwningArena() == from.GetOwningArena() |
79 | 0 | #ifdef PROTOBUF_FORCE_COPY_IN_MOVE |
80 | 0 | && GetOwningArena() != nullptr |
81 | 0 | #endif // !PROTOBUF_FORCE_COPY_IN_MOVE |
82 | 0 | ) { |
83 | 0 | InternalSwap(&from); |
84 | 0 | } else { |
85 | 0 | CopyFrom(from); |
86 | 0 | } |
87 | 0 | return *this; |
88 | 0 | } |
89 | | |
90 | 0 | inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { |
91 | 0 | return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); |
92 | 0 | } |
93 | 0 | inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { |
94 | 0 | return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
95 | 0 | } |
96 | | |
97 | 0 | static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { |
98 | 0 | return GetDescriptor(); |
99 | 0 | } |
100 | 0 | static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { |
101 | 0 | return default_instance().GetMetadata().descriptor; |
102 | 0 | } |
103 | 0 | static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { |
104 | 0 | return default_instance().GetMetadata().reflection; |
105 | 0 | } |
106 | 0 | static const SnappyMessageProto& default_instance() { |
107 | 0 | return *internal_default_instance(); |
108 | 0 | } |
109 | 0 | static inline const SnappyMessageProto* internal_default_instance() { |
110 | 0 | return reinterpret_cast<const SnappyMessageProto*>( |
111 | 0 | &_SnappyMessageProto_default_instance_); |
112 | 0 | } |
113 | | static constexpr int kIndexInFileMessages = |
114 | | 0; |
115 | | |
116 | 0 | friend void swap(SnappyMessageProto& a, SnappyMessageProto& b) { |
117 | 0 | a.Swap(&b); |
118 | 0 | } |
119 | 0 | inline void Swap(SnappyMessageProto* other) { |
120 | 0 | if (other == this) return; |
121 | 0 | #ifdef PROTOBUF_FORCE_COPY_IN_SWAP |
122 | 0 | if (GetOwningArena() != nullptr && |
123 | 0 | GetOwningArena() == other->GetOwningArena()) { |
124 | 0 | #else // PROTOBUF_FORCE_COPY_IN_SWAP |
125 | 0 | if (GetOwningArena() == other->GetOwningArena()) { |
126 | 0 | #endif // !PROTOBUF_FORCE_COPY_IN_SWAP |
127 | 0 | InternalSwap(other); |
128 | 0 | } else { |
129 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); |
130 | 0 | } |
131 | 0 | } |
132 | 0 | void UnsafeArenaSwap(SnappyMessageProto* other) { |
133 | 0 | if (other == this) return; |
134 | 0 | GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); |
135 | 0 | InternalSwap(other); |
136 | 0 | } |
137 | | |
138 | | // implements Message ---------------------------------------------- |
139 | | |
140 | 0 | SnappyMessageProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { |
141 | 0 | return CreateMaybeMessage<SnappyMessageProto>(arena); |
142 | 0 | } |
143 | | using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; |
144 | | void CopyFrom(const SnappyMessageProto& from); |
145 | | using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; |
146 | 0 | void MergeFrom( const SnappyMessageProto& from) { |
147 | 0 | SnappyMessageProto::MergeImpl(*this, from); |
148 | 0 | } |
149 | | private: |
150 | | static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); |
151 | | public: |
152 | | PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; |
153 | | bool IsInitialized() const final; |
154 | | |
155 | | size_t ByteSizeLong() const final; |
156 | | const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; |
157 | | uint8_t* _InternalSerialize( |
158 | | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; |
159 | 0 | int GetCachedSize() const final { return _impl_._cached_size_.Get(); } |
160 | | |
161 | | private: |
162 | | void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); |
163 | | void SharedDtor(); |
164 | | void SetCachedSize(int size) const final; |
165 | | void InternalSwap(SnappyMessageProto* other); |
166 | | |
167 | | private: |
168 | | friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; |
169 | 0 | static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { |
170 | 0 | return "snappy_message.SnappyMessageProto"; |
171 | 0 | } |
172 | | protected: |
173 | | explicit SnappyMessageProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
174 | | bool is_message_owned = false); |
175 | | public: |
176 | | |
177 | | static const ClassData _class_data_; |
178 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; |
179 | | |
180 | | ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; |
181 | | |
182 | | // nested types ---------------------------------------------------- |
183 | | |
184 | | // accessors ------------------------------------------------------- |
185 | | |
186 | | enum : int { |
187 | | kNumbersFieldNumber = 2, |
188 | | kTextFieldNumber = 1, |
189 | | }; |
190 | | // repeated int32 numbers = 2; |
191 | | int numbers_size() const; |
192 | | private: |
193 | | int _internal_numbers_size() const; |
194 | | public: |
195 | | void clear_numbers(); |
196 | | private: |
197 | | int32_t _internal_numbers(int index) const; |
198 | | const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& |
199 | | _internal_numbers() const; |
200 | | void _internal_add_numbers(int32_t value); |
201 | | ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* |
202 | | _internal_mutable_numbers(); |
203 | | public: |
204 | | int32_t numbers(int index) const; |
205 | | void set_numbers(int index, int32_t value); |
206 | | void add_numbers(int32_t value); |
207 | | const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& |
208 | | numbers() const; |
209 | | ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* |
210 | | mutable_numbers(); |
211 | | |
212 | | // optional string text = 1; |
213 | | bool has_text() const; |
214 | | private: |
215 | | bool _internal_has_text() const; |
216 | | public: |
217 | | void clear_text(); |
218 | | const std::string& text() const; |
219 | | template <typename ArgT0 = const std::string&, typename... ArgT> |
220 | | void set_text(ArgT0&& arg0, ArgT... args); |
221 | | std::string* mutable_text(); |
222 | | PROTOBUF_NODISCARD std::string* release_text(); |
223 | | void set_allocated_text(std::string* text); |
224 | | private: |
225 | | const std::string& _internal_text() const; |
226 | | inline PROTOBUF_ALWAYS_INLINE void _internal_set_text(const std::string& value); |
227 | | std::string* _internal_mutable_text(); |
228 | | public: |
229 | | |
230 | | // @@protoc_insertion_point(class_scope:snappy_message.SnappyMessageProto) |
231 | | private: |
232 | | class _Internal; |
233 | | |
234 | | template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; |
235 | | typedef void InternalArenaConstructable_; |
236 | | typedef void DestructorSkippable_; |
237 | | struct Impl_ { |
238 | | ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; |
239 | | mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; |
240 | | ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > numbers_; |
241 | | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr text_; |
242 | | }; |
243 | | union { Impl_ _impl_; }; |
244 | | friend struct ::TableStruct_snappy_5fmessage_2eproto; |
245 | | }; |
246 | | // =================================================================== |
247 | | |
248 | | |
249 | | // =================================================================== |
250 | | |
251 | | #ifdef __GNUC__ |
252 | | #pragma GCC diagnostic push |
253 | | #pragma GCC diagnostic ignored "-Wstrict-aliasing" |
254 | | #endif // __GNUC__ |
255 | | // SnappyMessageProto |
256 | | |
257 | | // optional string text = 1; |
258 | 0 | inline bool SnappyMessageProto::_internal_has_text() const { |
259 | 0 | bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; |
260 | 0 | return value; |
261 | 0 | } |
262 | 0 | inline bool SnappyMessageProto::has_text() const { |
263 | 0 | return _internal_has_text(); |
264 | 0 | } |
265 | 0 | inline void SnappyMessageProto::clear_text() { |
266 | 0 | _impl_.text_.ClearToEmpty(); |
267 | 0 | _impl_._has_bits_[0] &= ~0x00000001u; |
268 | 0 | } |
269 | 0 | inline const std::string& SnappyMessageProto::text() const { |
270 | 0 | // @@protoc_insertion_point(field_get:snappy_message.SnappyMessageProto.text) |
271 | 0 | return _internal_text(); |
272 | 0 | } |
273 | | template <typename ArgT0, typename... ArgT> |
274 | | inline PROTOBUF_ALWAYS_INLINE |
275 | | void SnappyMessageProto::set_text(ArgT0&& arg0, ArgT... args) { |
276 | | _impl_._has_bits_[0] |= 0x00000001u; |
277 | | _impl_.text_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation()); |
278 | | // @@protoc_insertion_point(field_set:snappy_message.SnappyMessageProto.text) |
279 | | } |
280 | 0 | inline std::string* SnappyMessageProto::mutable_text() { |
281 | 0 | std::string* _s = _internal_mutable_text(); |
282 | 0 | // @@protoc_insertion_point(field_mutable:snappy_message.SnappyMessageProto.text) |
283 | 0 | return _s; |
284 | 0 | } |
285 | 0 | inline const std::string& SnappyMessageProto::_internal_text() const { |
286 | 0 | return _impl_.text_.Get(); |
287 | 0 | } |
288 | 0 | inline void SnappyMessageProto::_internal_set_text(const std::string& value) { |
289 | 0 | _impl_._has_bits_[0] |= 0x00000001u; |
290 | 0 | _impl_.text_.Set(value, GetArenaForAllocation()); |
291 | 0 | } |
292 | 0 | inline std::string* SnappyMessageProto::_internal_mutable_text() { |
293 | 0 | _impl_._has_bits_[0] |= 0x00000001u; |
294 | 0 | return _impl_.text_.Mutable(GetArenaForAllocation()); |
295 | 0 | } |
296 | 0 | inline std::string* SnappyMessageProto::release_text() { |
297 | 0 | // @@protoc_insertion_point(field_release:snappy_message.SnappyMessageProto.text) |
298 | 0 | if (!_internal_has_text()) { |
299 | 0 | return nullptr; |
300 | 0 | } |
301 | 0 | _impl_._has_bits_[0] &= ~0x00000001u; |
302 | 0 | auto* p = _impl_.text_.Release(); |
303 | 0 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
304 | 0 | if (_impl_.text_.IsDefault()) { |
305 | 0 | _impl_.text_.Set("", GetArenaForAllocation()); |
306 | 0 | } |
307 | 0 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
308 | 0 | return p; |
309 | 0 | } |
310 | 0 | inline void SnappyMessageProto::set_allocated_text(std::string* text) { |
311 | 0 | if (text != nullptr) { |
312 | 0 | _impl_._has_bits_[0] |= 0x00000001u; |
313 | 0 | } else { |
314 | 0 | _impl_._has_bits_[0] &= ~0x00000001u; |
315 | 0 | } |
316 | 0 | _impl_.text_.SetAllocated(text, GetArenaForAllocation()); |
317 | 0 | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
318 | 0 | if (_impl_.text_.IsDefault()) { |
319 | 0 | _impl_.text_.Set("", GetArenaForAllocation()); |
320 | 0 | } |
321 | 0 | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
322 | 0 | // @@protoc_insertion_point(field_set_allocated:snappy_message.SnappyMessageProto.text) |
323 | 0 | } |
324 | | |
325 | | // repeated int32 numbers = 2; |
326 | 0 | inline int SnappyMessageProto::_internal_numbers_size() const { |
327 | 0 | return _impl_.numbers_.size(); |
328 | 0 | } |
329 | 0 | inline int SnappyMessageProto::numbers_size() const { |
330 | 0 | return _internal_numbers_size(); |
331 | 0 | } |
332 | 0 | inline void SnappyMessageProto::clear_numbers() { |
333 | 0 | _impl_.numbers_.Clear(); |
334 | 0 | } |
335 | 0 | inline int32_t SnappyMessageProto::_internal_numbers(int index) const { |
336 | 0 | return _impl_.numbers_.Get(index); |
337 | 0 | } |
338 | 0 | inline int32_t SnappyMessageProto::numbers(int index) const { |
339 | 0 | // @@protoc_insertion_point(field_get:snappy_message.SnappyMessageProto.numbers) |
340 | 0 | return _internal_numbers(index); |
341 | 0 | } |
342 | 0 | inline void SnappyMessageProto::set_numbers(int index, int32_t value) { |
343 | 0 | _impl_.numbers_.Set(index, value); |
344 | 0 | // @@protoc_insertion_point(field_set:snappy_message.SnappyMessageProto.numbers) |
345 | 0 | } |
346 | 0 | inline void SnappyMessageProto::_internal_add_numbers(int32_t value) { |
347 | 0 | _impl_.numbers_.Add(value); |
348 | 0 | } |
349 | 0 | inline void SnappyMessageProto::add_numbers(int32_t value) { |
350 | 0 | _internal_add_numbers(value); |
351 | 0 | // @@protoc_insertion_point(field_add:snappy_message.SnappyMessageProto.numbers) |
352 | 0 | } |
353 | | inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& |
354 | 0 | SnappyMessageProto::_internal_numbers() const { |
355 | 0 | return _impl_.numbers_; |
356 | 0 | } |
357 | | inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& |
358 | 0 | SnappyMessageProto::numbers() const { |
359 | 0 | // @@protoc_insertion_point(field_list:snappy_message.SnappyMessageProto.numbers) |
360 | 0 | return _internal_numbers(); |
361 | 0 | } |
362 | | inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* |
363 | 0 | SnappyMessageProto::_internal_mutable_numbers() { |
364 | 0 | return &_impl_.numbers_; |
365 | 0 | } |
366 | | inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* |
367 | 0 | SnappyMessageProto::mutable_numbers() { |
368 | 0 | // @@protoc_insertion_point(field_mutable_list:snappy_message.SnappyMessageProto.numbers) |
369 | 0 | return _internal_mutable_numbers(); |
370 | 0 | } |
371 | | |
372 | | #ifdef __GNUC__ |
373 | | #pragma GCC diagnostic pop |
374 | | #endif // __GNUC__ |
375 | | |
376 | | // @@protoc_insertion_point(namespace_scope) |
377 | | |
378 | | } // namespace snappy_message |
379 | | |
380 | | // @@protoc_insertion_point(global_scope) |
381 | | |
382 | | #include <google/protobuf/port_undef.inc> |
383 | | #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_snappy_5fmessage_2eproto |