/src/brpc/build/test/grpc.pb.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: grpc.proto |
3 | | |
4 | | #ifndef PROTOBUF_INCLUDED_grpc_2eproto |
5 | | #define PROTOBUF_INCLUDED_grpc_2eproto |
6 | | |
7 | | #include <string> |
8 | | |
9 | | #include <google/protobuf/stubs/common.h> |
10 | | |
11 | | #if GOOGLE_PROTOBUF_VERSION < 3006001 |
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 3006001 < GOOGLE_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/io/coded_stream.h> |
23 | | #include <google/protobuf/arena.h> |
24 | | #include <google/protobuf/arenastring.h> |
25 | | #include <google/protobuf/generated_message_table_driven.h> |
26 | | #include <google/protobuf/generated_message_util.h> |
27 | | #include <google/protobuf/inlined_string_field.h> |
28 | | #include <google/protobuf/metadata.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/service.h> |
33 | | #include <google/protobuf/unknown_field_set.h> |
34 | | // @@protoc_insertion_point(includes) |
35 | | #define PROTOBUF_INTERNAL_EXPORT_protobuf_grpc_2eproto |
36 | | |
37 | | namespace protobuf_grpc_2eproto { |
38 | | // Internal implementation detail -- do not use these members. |
39 | | struct TableStruct { |
40 | | static const ::google::protobuf::internal::ParseTableField entries[]; |
41 | | static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; |
42 | | static const ::google::protobuf::internal::ParseTable schema[2]; |
43 | | static const ::google::protobuf::internal::FieldMetadata field_metadata[]; |
44 | | static const ::google::protobuf::internal::SerializationTable serialization_table[]; |
45 | | static const ::google::protobuf::uint32 offsets[]; |
46 | | }; |
47 | | void AddDescriptors(); |
48 | | } // namespace protobuf_grpc_2eproto |
49 | | namespace test { |
50 | | class GrpcRequest; |
51 | | class GrpcRequestDefaultTypeInternal; |
52 | | extern GrpcRequestDefaultTypeInternal _GrpcRequest_default_instance_; |
53 | | class GrpcResponse; |
54 | | class GrpcResponseDefaultTypeInternal; |
55 | | extern GrpcResponseDefaultTypeInternal _GrpcResponse_default_instance_; |
56 | | } // namespace test |
57 | | namespace google { |
58 | | namespace protobuf { |
59 | | template<> ::test::GrpcRequest* Arena::CreateMaybeMessage<::test::GrpcRequest>(Arena*); |
60 | | template<> ::test::GrpcResponse* Arena::CreateMaybeMessage<::test::GrpcResponse>(Arena*); |
61 | | } // namespace protobuf |
62 | | } // namespace google |
63 | | namespace test { |
64 | | |
65 | | // =================================================================== |
66 | | |
67 | | class GrpcRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:test.GrpcRequest) */ { |
68 | | public: |
69 | | GrpcRequest(); |
70 | | virtual ~GrpcRequest(); |
71 | | |
72 | | GrpcRequest(const GrpcRequest& from); |
73 | | |
74 | 0 | inline GrpcRequest& operator=(const GrpcRequest& from) { |
75 | 0 | CopyFrom(from); |
76 | 0 | return *this; |
77 | 0 | } |
78 | | #if LANG_CXX11 |
79 | | GrpcRequest(GrpcRequest&& from) noexcept |
80 | 0 | : GrpcRequest() { |
81 | 0 | *this = ::std::move(from); |
82 | 0 | } |
83 | | |
84 | 0 | inline GrpcRequest& operator=(GrpcRequest&& from) noexcept { |
85 | 0 | if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { |
86 | 0 | if (this != &from) InternalSwap(&from); |
87 | 0 | } else { |
88 | 0 | CopyFrom(from); |
89 | 0 | } |
90 | 0 | return *this; |
91 | 0 | } |
92 | | #endif |
93 | 0 | inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { |
94 | 0 | return _internal_metadata_.unknown_fields(); |
95 | 0 | } |
96 | 0 | inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { |
97 | 0 | return _internal_metadata_.mutable_unknown_fields(); |
98 | 0 | } |
99 | | |
100 | | static const ::google::protobuf::Descriptor* descriptor(); |
101 | | static const GrpcRequest& default_instance(); |
102 | | |
103 | | static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY |
104 | 0 | static inline const GrpcRequest* internal_default_instance() { |
105 | 0 | return reinterpret_cast<const GrpcRequest*>( |
106 | 0 | &_GrpcRequest_default_instance_); |
107 | 0 | } |
108 | | static constexpr int kIndexInFileMessages = |
109 | | 0; |
110 | | |
111 | | void Swap(GrpcRequest* other); |
112 | 0 | friend void swap(GrpcRequest& a, GrpcRequest& b) { |
113 | 0 | a.Swap(&b); |
114 | 0 | } |
115 | | |
116 | | // implements Message ---------------------------------------------- |
117 | | |
118 | 0 | inline GrpcRequest* New() const final { |
119 | 0 | return CreateMaybeMessage<GrpcRequest>(NULL); |
120 | 0 | } |
121 | | |
122 | 0 | GrpcRequest* New(::google::protobuf::Arena* arena) const final { |
123 | 0 | return CreateMaybeMessage<GrpcRequest>(arena); |
124 | 0 | } |
125 | | void CopyFrom(const ::google::protobuf::Message& from) final; |
126 | | void MergeFrom(const ::google::protobuf::Message& from) final; |
127 | | void CopyFrom(const GrpcRequest& from); |
128 | | void MergeFrom(const GrpcRequest& from); |
129 | | void Clear() final; |
130 | | bool IsInitialized() const final; |
131 | | |
132 | | size_t ByteSizeLong() const final; |
133 | | bool MergePartialFromCodedStream( |
134 | | ::google::protobuf::io::CodedInputStream* input) final; |
135 | | void SerializeWithCachedSizes( |
136 | | ::google::protobuf::io::CodedOutputStream* output) const final; |
137 | | ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( |
138 | | bool deterministic, ::google::protobuf::uint8* target) const final; |
139 | 0 | int GetCachedSize() const final { return _cached_size_.Get(); } |
140 | | |
141 | | private: |
142 | | void SharedCtor(); |
143 | | void SharedDtor(); |
144 | | void SetCachedSize(int size) const final; |
145 | | void InternalSwap(GrpcRequest* other); |
146 | | private: |
147 | 0 | inline ::google::protobuf::Arena* GetArenaNoVirtual() const { |
148 | 0 | return NULL; |
149 | 0 | } |
150 | 0 | inline void* MaybeArenaPtr() const { |
151 | 0 | return NULL; |
152 | 0 | } |
153 | | public: |
154 | | |
155 | | ::google::protobuf::Metadata GetMetadata() const final; |
156 | | |
157 | | // nested types ---------------------------------------------------- |
158 | | |
159 | | // accessors ------------------------------------------------------- |
160 | | |
161 | | // required string message = 1; |
162 | | bool has_message() const; |
163 | | void clear_message(); |
164 | | static const int kMessageFieldNumber = 1; |
165 | | const ::std::string& message() const; |
166 | | void set_message(const ::std::string& value); |
167 | | #if LANG_CXX11 |
168 | | void set_message(::std::string&& value); |
169 | | #endif |
170 | | void set_message(const char* value); |
171 | | void set_message(const char* value, size_t size); |
172 | | ::std::string* mutable_message(); |
173 | | ::std::string* release_message(); |
174 | | void set_allocated_message(::std::string* message); |
175 | | |
176 | | // optional int64 timeout_us = 4; |
177 | | bool has_timeout_us() const; |
178 | | void clear_timeout_us(); |
179 | | static const int kTimeoutUsFieldNumber = 4; |
180 | | ::google::protobuf::int64 timeout_us() const; |
181 | | void set_timeout_us(::google::protobuf::int64 value); |
182 | | |
183 | | // required bool gzip = 2; |
184 | | bool has_gzip() const; |
185 | | void clear_gzip(); |
186 | | static const int kGzipFieldNumber = 2; |
187 | | bool gzip() const; |
188 | | void set_gzip(bool value); |
189 | | |
190 | | // required bool return_error = 3; |
191 | | bool has_return_error() const; |
192 | | void clear_return_error(); |
193 | | static const int kReturnErrorFieldNumber = 3; |
194 | | bool return_error() const; |
195 | | void set_return_error(bool value); |
196 | | |
197 | | // @@protoc_insertion_point(class_scope:test.GrpcRequest) |
198 | | private: |
199 | | void set_has_message(); |
200 | | void clear_has_message(); |
201 | | void set_has_gzip(); |
202 | | void clear_has_gzip(); |
203 | | void set_has_return_error(); |
204 | | void clear_has_return_error(); |
205 | | void set_has_timeout_us(); |
206 | | void clear_has_timeout_us(); |
207 | | |
208 | | // helper for ByteSizeLong() |
209 | | size_t RequiredFieldsByteSizeFallback() const; |
210 | | |
211 | | ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; |
212 | | ::google::protobuf::internal::HasBits<1> _has_bits_; |
213 | | mutable ::google::protobuf::internal::CachedSize _cached_size_; |
214 | | ::google::protobuf::internal::ArenaStringPtr message_; |
215 | | ::google::protobuf::int64 timeout_us_; |
216 | | bool gzip_; |
217 | | bool return_error_; |
218 | | friend struct ::protobuf_grpc_2eproto::TableStruct; |
219 | | }; |
220 | | // ------------------------------------------------------------------- |
221 | | |
222 | | class GrpcResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:test.GrpcResponse) */ { |
223 | | public: |
224 | | GrpcResponse(); |
225 | | virtual ~GrpcResponse(); |
226 | | |
227 | | GrpcResponse(const GrpcResponse& from); |
228 | | |
229 | 0 | inline GrpcResponse& operator=(const GrpcResponse& from) { |
230 | 0 | CopyFrom(from); |
231 | 0 | return *this; |
232 | 0 | } |
233 | | #if LANG_CXX11 |
234 | | GrpcResponse(GrpcResponse&& from) noexcept |
235 | 0 | : GrpcResponse() { |
236 | 0 | *this = ::std::move(from); |
237 | 0 | } |
238 | | |
239 | 0 | inline GrpcResponse& operator=(GrpcResponse&& from) noexcept { |
240 | 0 | if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { |
241 | 0 | if (this != &from) InternalSwap(&from); |
242 | 0 | } else { |
243 | 0 | CopyFrom(from); |
244 | 0 | } |
245 | 0 | return *this; |
246 | 0 | } |
247 | | #endif |
248 | 0 | inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { |
249 | 0 | return _internal_metadata_.unknown_fields(); |
250 | 0 | } |
251 | 0 | inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { |
252 | 0 | return _internal_metadata_.mutable_unknown_fields(); |
253 | 0 | } |
254 | | |
255 | | static const ::google::protobuf::Descriptor* descriptor(); |
256 | | static const GrpcResponse& default_instance(); |
257 | | |
258 | | static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY |
259 | 0 | static inline const GrpcResponse* internal_default_instance() { |
260 | 0 | return reinterpret_cast<const GrpcResponse*>( |
261 | 0 | &_GrpcResponse_default_instance_); |
262 | 0 | } |
263 | | static constexpr int kIndexInFileMessages = |
264 | | 1; |
265 | | |
266 | | void Swap(GrpcResponse* other); |
267 | 0 | friend void swap(GrpcResponse& a, GrpcResponse& b) { |
268 | 0 | a.Swap(&b); |
269 | 0 | } |
270 | | |
271 | | // implements Message ---------------------------------------------- |
272 | | |
273 | 0 | inline GrpcResponse* New() const final { |
274 | 0 | return CreateMaybeMessage<GrpcResponse>(NULL); |
275 | 0 | } |
276 | | |
277 | 0 | GrpcResponse* New(::google::protobuf::Arena* arena) const final { |
278 | 0 | return CreateMaybeMessage<GrpcResponse>(arena); |
279 | 0 | } |
280 | | void CopyFrom(const ::google::protobuf::Message& from) final; |
281 | | void MergeFrom(const ::google::protobuf::Message& from) final; |
282 | | void CopyFrom(const GrpcResponse& from); |
283 | | void MergeFrom(const GrpcResponse& from); |
284 | | void Clear() final; |
285 | | bool IsInitialized() const final; |
286 | | |
287 | | size_t ByteSizeLong() const final; |
288 | | bool MergePartialFromCodedStream( |
289 | | ::google::protobuf::io::CodedInputStream* input) final; |
290 | | void SerializeWithCachedSizes( |
291 | | ::google::protobuf::io::CodedOutputStream* output) const final; |
292 | | ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( |
293 | | bool deterministic, ::google::protobuf::uint8* target) const final; |
294 | 0 | int GetCachedSize() const final { return _cached_size_.Get(); } |
295 | | |
296 | | private: |
297 | | void SharedCtor(); |
298 | | void SharedDtor(); |
299 | | void SetCachedSize(int size) const final; |
300 | | void InternalSwap(GrpcResponse* other); |
301 | | private: |
302 | 0 | inline ::google::protobuf::Arena* GetArenaNoVirtual() const { |
303 | 0 | return NULL; |
304 | 0 | } |
305 | 0 | inline void* MaybeArenaPtr() const { |
306 | 0 | return NULL; |
307 | 0 | } |
308 | | public: |
309 | | |
310 | | ::google::protobuf::Metadata GetMetadata() const final; |
311 | | |
312 | | // nested types ---------------------------------------------------- |
313 | | |
314 | | // accessors ------------------------------------------------------- |
315 | | |
316 | | // required string message = 1; |
317 | | bool has_message() const; |
318 | | void clear_message(); |
319 | | static const int kMessageFieldNumber = 1; |
320 | | const ::std::string& message() const; |
321 | | void set_message(const ::std::string& value); |
322 | | #if LANG_CXX11 |
323 | | void set_message(::std::string&& value); |
324 | | #endif |
325 | | void set_message(const char* value); |
326 | | void set_message(const char* value, size_t size); |
327 | | ::std::string* mutable_message(); |
328 | | ::std::string* release_message(); |
329 | | void set_allocated_message(::std::string* message); |
330 | | |
331 | | // @@protoc_insertion_point(class_scope:test.GrpcResponse) |
332 | | private: |
333 | | void set_has_message(); |
334 | | void clear_has_message(); |
335 | | |
336 | | ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; |
337 | | ::google::protobuf::internal::HasBits<1> _has_bits_; |
338 | | mutable ::google::protobuf::internal::CachedSize _cached_size_; |
339 | | ::google::protobuf::internal::ArenaStringPtr message_; |
340 | | friend struct ::protobuf_grpc_2eproto::TableStruct; |
341 | | }; |
342 | | // =================================================================== |
343 | | |
344 | | class GrpcService_Stub; |
345 | | |
346 | | class GrpcService : public ::google::protobuf::Service { |
347 | | protected: |
348 | | // This class should be treated as an abstract interface. |
349 | 0 | inline GrpcService() {}; |
350 | | public: |
351 | | virtual ~GrpcService(); |
352 | | |
353 | | typedef GrpcService_Stub Stub; |
354 | | |
355 | | static const ::google::protobuf::ServiceDescriptor* descriptor(); |
356 | | |
357 | | virtual void Method(::google::protobuf::RpcController* controller, |
358 | | const ::test::GrpcRequest* request, |
359 | | ::test::GrpcResponse* response, |
360 | | ::google::protobuf::Closure* done); |
361 | | virtual void MethodTimeOut(::google::protobuf::RpcController* controller, |
362 | | const ::test::GrpcRequest* request, |
363 | | ::test::GrpcResponse* response, |
364 | | ::google::protobuf::Closure* done); |
365 | | virtual void MethodNotExist(::google::protobuf::RpcController* controller, |
366 | | const ::test::GrpcRequest* request, |
367 | | ::test::GrpcResponse* response, |
368 | | ::google::protobuf::Closure* done); |
369 | | |
370 | | // implements Service ---------------------------------------------- |
371 | | |
372 | | const ::google::protobuf::ServiceDescriptor* GetDescriptor(); |
373 | | void CallMethod(const ::google::protobuf::MethodDescriptor* method, |
374 | | ::google::protobuf::RpcController* controller, |
375 | | const ::google::protobuf::Message* request, |
376 | | ::google::protobuf::Message* response, |
377 | | ::google::protobuf::Closure* done); |
378 | | const ::google::protobuf::Message& GetRequestPrototype( |
379 | | const ::google::protobuf::MethodDescriptor* method) const; |
380 | | const ::google::protobuf::Message& GetResponsePrototype( |
381 | | const ::google::protobuf::MethodDescriptor* method) const; |
382 | | |
383 | | private: |
384 | | GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GrpcService); |
385 | | }; |
386 | | |
387 | | class GrpcService_Stub : public GrpcService { |
388 | | public: |
389 | | GrpcService_Stub(::google::protobuf::RpcChannel* channel); |
390 | | GrpcService_Stub(::google::protobuf::RpcChannel* channel, |
391 | | ::google::protobuf::Service::ChannelOwnership ownership); |
392 | | ~GrpcService_Stub(); |
393 | | |
394 | 0 | inline ::google::protobuf::RpcChannel* channel() { return channel_; } |
395 | | |
396 | | // implements GrpcService ------------------------------------------ |
397 | | |
398 | | void Method(::google::protobuf::RpcController* controller, |
399 | | const ::test::GrpcRequest* request, |
400 | | ::test::GrpcResponse* response, |
401 | | ::google::protobuf::Closure* done); |
402 | | void MethodTimeOut(::google::protobuf::RpcController* controller, |
403 | | const ::test::GrpcRequest* request, |
404 | | ::test::GrpcResponse* response, |
405 | | ::google::protobuf::Closure* done); |
406 | | void MethodNotExist(::google::protobuf::RpcController* controller, |
407 | | const ::test::GrpcRequest* request, |
408 | | ::test::GrpcResponse* response, |
409 | | ::google::protobuf::Closure* done); |
410 | | private: |
411 | | ::google::protobuf::RpcChannel* channel_; |
412 | | bool owns_channel_; |
413 | | GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(GrpcService_Stub); |
414 | | }; |
415 | | |
416 | | |
417 | | // =================================================================== |
418 | | |
419 | | |
420 | | // =================================================================== |
421 | | |
422 | | #ifdef __GNUC__ |
423 | | #pragma GCC diagnostic push |
424 | | #pragma GCC diagnostic ignored "-Wstrict-aliasing" |
425 | | #endif // __GNUC__ |
426 | | // GrpcRequest |
427 | | |
428 | | // required string message = 1; |
429 | 0 | inline bool GrpcRequest::has_message() const { |
430 | 0 | return (_has_bits_[0] & 0x00000001u) != 0; |
431 | 0 | } |
432 | 0 | inline void GrpcRequest::set_has_message() { |
433 | 0 | _has_bits_[0] |= 0x00000001u; |
434 | 0 | } |
435 | 0 | inline void GrpcRequest::clear_has_message() { |
436 | 0 | _has_bits_[0] &= ~0x00000001u; |
437 | 0 | } |
438 | 0 | inline void GrpcRequest::clear_message() { |
439 | 0 | message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
440 | 0 | clear_has_message(); |
441 | 0 | } |
442 | 0 | inline const ::std::string& GrpcRequest::message() const { |
443 | | // @@protoc_insertion_point(field_get:test.GrpcRequest.message) |
444 | 0 | return message_.GetNoArena(); |
445 | 0 | } |
446 | 0 | inline void GrpcRequest::set_message(const ::std::string& value) { |
447 | 0 | set_has_message(); |
448 | 0 | message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
449 | 0 | // @@protoc_insertion_point(field_set:test.GrpcRequest.message) |
450 | 0 | } |
451 | | #if LANG_CXX11 |
452 | 0 | inline void GrpcRequest::set_message(::std::string&& value) { |
453 | 0 | set_has_message(); |
454 | 0 | message_.SetNoArena( |
455 | 0 | &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); |
456 | 0 | // @@protoc_insertion_point(field_set_rvalue:test.GrpcRequest.message) |
457 | 0 | } |
458 | | #endif |
459 | 0 | inline void GrpcRequest::set_message(const char* value) { |
460 | 0 | GOOGLE_DCHECK(value != NULL); |
461 | 0 | set_has_message(); |
462 | 0 | message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
463 | 0 | // @@protoc_insertion_point(field_set_char:test.GrpcRequest.message) |
464 | 0 | } |
465 | 0 | inline void GrpcRequest::set_message(const char* value, size_t size) { |
466 | 0 | set_has_message(); |
467 | 0 | message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
468 | 0 | ::std::string(reinterpret_cast<const char*>(value), size)); |
469 | 0 | // @@protoc_insertion_point(field_set_pointer:test.GrpcRequest.message) |
470 | 0 | } |
471 | 0 | inline ::std::string* GrpcRequest::mutable_message() { |
472 | 0 | set_has_message(); |
473 | | // @@protoc_insertion_point(field_mutable:test.GrpcRequest.message) |
474 | 0 | return message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
475 | 0 | } |
476 | 0 | inline ::std::string* GrpcRequest::release_message() { |
477 | 0 | // @@protoc_insertion_point(field_release:test.GrpcRequest.message) |
478 | 0 | if (!has_message()) { |
479 | 0 | return NULL; |
480 | 0 | } |
481 | 0 | clear_has_message(); |
482 | 0 | return message_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
483 | 0 | } |
484 | 0 | inline void GrpcRequest::set_allocated_message(::std::string* message) { |
485 | 0 | if (message != NULL) { |
486 | 0 | set_has_message(); |
487 | 0 | } else { |
488 | 0 | clear_has_message(); |
489 | 0 | } |
490 | 0 | message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), message); |
491 | 0 | // @@protoc_insertion_point(field_set_allocated:test.GrpcRequest.message) |
492 | 0 | } |
493 | | |
494 | | // required bool gzip = 2; |
495 | 0 | inline bool GrpcRequest::has_gzip() const { |
496 | 0 | return (_has_bits_[0] & 0x00000004u) != 0; |
497 | 0 | } |
498 | 0 | inline void GrpcRequest::set_has_gzip() { |
499 | 0 | _has_bits_[0] |= 0x00000004u; |
500 | 0 | } |
501 | 0 | inline void GrpcRequest::clear_has_gzip() { |
502 | 0 | _has_bits_[0] &= ~0x00000004u; |
503 | 0 | } |
504 | 0 | inline void GrpcRequest::clear_gzip() { |
505 | 0 | gzip_ = false; |
506 | 0 | clear_has_gzip(); |
507 | 0 | } |
508 | 0 | inline bool GrpcRequest::gzip() const { |
509 | | // @@protoc_insertion_point(field_get:test.GrpcRequest.gzip) |
510 | 0 | return gzip_; |
511 | 0 | } |
512 | 0 | inline void GrpcRequest::set_gzip(bool value) { |
513 | 0 | set_has_gzip(); |
514 | 0 | gzip_ = value; |
515 | 0 | // @@protoc_insertion_point(field_set:test.GrpcRequest.gzip) |
516 | 0 | } |
517 | | |
518 | | // required bool return_error = 3; |
519 | 0 | inline bool GrpcRequest::has_return_error() const { |
520 | 0 | return (_has_bits_[0] & 0x00000008u) != 0; |
521 | 0 | } |
522 | 0 | inline void GrpcRequest::set_has_return_error() { |
523 | 0 | _has_bits_[0] |= 0x00000008u; |
524 | 0 | } |
525 | 0 | inline void GrpcRequest::clear_has_return_error() { |
526 | 0 | _has_bits_[0] &= ~0x00000008u; |
527 | 0 | } |
528 | 0 | inline void GrpcRequest::clear_return_error() { |
529 | 0 | return_error_ = false; |
530 | 0 | clear_has_return_error(); |
531 | 0 | } |
532 | 0 | inline bool GrpcRequest::return_error() const { |
533 | | // @@protoc_insertion_point(field_get:test.GrpcRequest.return_error) |
534 | 0 | return return_error_; |
535 | 0 | } |
536 | 0 | inline void GrpcRequest::set_return_error(bool value) { |
537 | 0 | set_has_return_error(); |
538 | 0 | return_error_ = value; |
539 | 0 | // @@protoc_insertion_point(field_set:test.GrpcRequest.return_error) |
540 | 0 | } |
541 | | |
542 | | // optional int64 timeout_us = 4; |
543 | 0 | inline bool GrpcRequest::has_timeout_us() const { |
544 | 0 | return (_has_bits_[0] & 0x00000002u) != 0; |
545 | 0 | } |
546 | 0 | inline void GrpcRequest::set_has_timeout_us() { |
547 | 0 | _has_bits_[0] |= 0x00000002u; |
548 | 0 | } |
549 | 0 | inline void GrpcRequest::clear_has_timeout_us() { |
550 | 0 | _has_bits_[0] &= ~0x00000002u; |
551 | 0 | } |
552 | 0 | inline void GrpcRequest::clear_timeout_us() { |
553 | 0 | timeout_us_ = GOOGLE_LONGLONG(0); |
554 | 0 | clear_has_timeout_us(); |
555 | 0 | } |
556 | 0 | inline ::google::protobuf::int64 GrpcRequest::timeout_us() const { |
557 | | // @@protoc_insertion_point(field_get:test.GrpcRequest.timeout_us) |
558 | 0 | return timeout_us_; |
559 | 0 | } |
560 | 0 | inline void GrpcRequest::set_timeout_us(::google::protobuf::int64 value) { |
561 | 0 | set_has_timeout_us(); |
562 | 0 | timeout_us_ = value; |
563 | 0 | // @@protoc_insertion_point(field_set:test.GrpcRequest.timeout_us) |
564 | 0 | } |
565 | | |
566 | | // ------------------------------------------------------------------- |
567 | | |
568 | | // GrpcResponse |
569 | | |
570 | | // required string message = 1; |
571 | 0 | inline bool GrpcResponse::has_message() const { |
572 | 0 | return (_has_bits_[0] & 0x00000001u) != 0; |
573 | 0 | } |
574 | 0 | inline void GrpcResponse::set_has_message() { |
575 | 0 | _has_bits_[0] |= 0x00000001u; |
576 | 0 | } |
577 | 0 | inline void GrpcResponse::clear_has_message() { |
578 | 0 | _has_bits_[0] &= ~0x00000001u; |
579 | 0 | } |
580 | 0 | inline void GrpcResponse::clear_message() { |
581 | 0 | message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
582 | 0 | clear_has_message(); |
583 | 0 | } |
584 | 0 | inline const ::std::string& GrpcResponse::message() const { |
585 | | // @@protoc_insertion_point(field_get:test.GrpcResponse.message) |
586 | 0 | return message_.GetNoArena(); |
587 | 0 | } |
588 | 0 | inline void GrpcResponse::set_message(const ::std::string& value) { |
589 | 0 | set_has_message(); |
590 | 0 | message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); |
591 | 0 | // @@protoc_insertion_point(field_set:test.GrpcResponse.message) |
592 | 0 | } |
593 | | #if LANG_CXX11 |
594 | 0 | inline void GrpcResponse::set_message(::std::string&& value) { |
595 | 0 | set_has_message(); |
596 | 0 | message_.SetNoArena( |
597 | 0 | &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); |
598 | 0 | // @@protoc_insertion_point(field_set_rvalue:test.GrpcResponse.message) |
599 | 0 | } |
600 | | #endif |
601 | 0 | inline void GrpcResponse::set_message(const char* value) { |
602 | 0 | GOOGLE_DCHECK(value != NULL); |
603 | 0 | set_has_message(); |
604 | 0 | message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); |
605 | 0 | // @@protoc_insertion_point(field_set_char:test.GrpcResponse.message) |
606 | 0 | } |
607 | 0 | inline void GrpcResponse::set_message(const char* value, size_t size) { |
608 | 0 | set_has_message(); |
609 | 0 | message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), |
610 | 0 | ::std::string(reinterpret_cast<const char*>(value), size)); |
611 | 0 | // @@protoc_insertion_point(field_set_pointer:test.GrpcResponse.message) |
612 | 0 | } |
613 | 0 | inline ::std::string* GrpcResponse::mutable_message() { |
614 | 0 | set_has_message(); |
615 | | // @@protoc_insertion_point(field_mutable:test.GrpcResponse.message) |
616 | 0 | return message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
617 | 0 | } |
618 | 0 | inline ::std::string* GrpcResponse::release_message() { |
619 | 0 | // @@protoc_insertion_point(field_release:test.GrpcResponse.message) |
620 | 0 | if (!has_message()) { |
621 | 0 | return NULL; |
622 | 0 | } |
623 | 0 | clear_has_message(); |
624 | 0 | return message_.ReleaseNonDefaultNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
625 | 0 | } |
626 | 0 | inline void GrpcResponse::set_allocated_message(::std::string* message) { |
627 | 0 | if (message != NULL) { |
628 | 0 | set_has_message(); |
629 | 0 | } else { |
630 | 0 | clear_has_message(); |
631 | 0 | } |
632 | 0 | message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), message); |
633 | 0 | // @@protoc_insertion_point(field_set_allocated:test.GrpcResponse.message) |
634 | 0 | } |
635 | | |
636 | | #ifdef __GNUC__ |
637 | | #pragma GCC diagnostic pop |
638 | | #endif // __GNUC__ |
639 | | // ------------------------------------------------------------------- |
640 | | |
641 | | |
642 | | // @@protoc_insertion_point(namespace_scope) |
643 | | |
644 | | } // namespace test |
645 | | |
646 | | // @@protoc_insertion_point(global_scope) |
647 | | |
648 | | #endif // PROTOBUF_INCLUDED_grpc_2eproto |