Coverage Report

Created: 2026-03-19 06:47

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/brpc/build/brpc/policy/mongo.pb.h
Line
Count
Source
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: brpc/policy/mongo.proto
3
4
#ifndef GOOGLE_PROTOBUF_INCLUDED_brpc_2fpolicy_2fmongo_2eproto
5
#define GOOGLE_PROTOBUF_INCLUDED_brpc_2fpolicy_2fmongo_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/generated_enum_reflection.h>
33
#include <google/protobuf/service.h>
34
#include <google/protobuf/unknown_field_set.h>
35
// @@protoc_insertion_point(includes)
36
#include <google/protobuf/port_def.inc>
37
#define PROTOBUF_INTERNAL_EXPORT_brpc_2fpolicy_2fmongo_2eproto
38
PROTOBUF_NAMESPACE_OPEN
39
namespace internal {
40
class AnyMetadata;
41
}  // namespace internal
42
PROTOBUF_NAMESPACE_CLOSE
43
44
// Internal implementation detail -- do not use these members.
45
struct TableStruct_brpc_2fpolicy_2fmongo_2eproto {
46
  static const uint32_t offsets[];
47
};
48
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_brpc_2fpolicy_2fmongo_2eproto;
49
namespace brpc {
50
namespace policy {
51
class MongoHeader;
52
struct MongoHeaderDefaultTypeInternal;
53
extern MongoHeaderDefaultTypeInternal _MongoHeader_default_instance_;
54
class MongoRequest;
55
struct MongoRequestDefaultTypeInternal;
56
extern MongoRequestDefaultTypeInternal _MongoRequest_default_instance_;
57
class MongoResponse;
58
struct MongoResponseDefaultTypeInternal;
59
extern MongoResponseDefaultTypeInternal _MongoResponse_default_instance_;
60
}  // namespace policy
61
}  // namespace brpc
62
PROTOBUF_NAMESPACE_OPEN
63
template<> ::brpc::policy::MongoHeader* Arena::CreateMaybeMessage<::brpc::policy::MongoHeader>(Arena*);
64
template<> ::brpc::policy::MongoRequest* Arena::CreateMaybeMessage<::brpc::policy::MongoRequest>(Arena*);
65
template<> ::brpc::policy::MongoResponse* Arena::CreateMaybeMessage<::brpc::policy::MongoResponse>(Arena*);
66
PROTOBUF_NAMESPACE_CLOSE
67
namespace brpc {
68
namespace policy {
69
70
enum MongoOp : int {
71
  OPREPLY = 1,
72
  DBMSG = 1000,
73
  DB_UPDATE = 2001,
74
  DB_INSERT = 2002,
75
  DB_QUERY = 2004,
76
  DB_GETMORE = 2005,
77
  DB_DELETE = 2006,
78
  DB_KILLCURSORS = 2007,
79
  DB_COMMAND = 2008,
80
  DB_COMMANDREPLY = 2009
81
};
82
bool MongoOp_IsValid(int value);
83
constexpr MongoOp MongoOp_MIN = OPREPLY;
84
constexpr MongoOp MongoOp_MAX = DB_COMMANDREPLY;
85
constexpr int MongoOp_ARRAYSIZE = MongoOp_MAX + 1;
86
87
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MongoOp_descriptor();
88
template<typename T>
89
inline const std::string& MongoOp_Name(T enum_t_value) {
90
  static_assert(::std::is_same<T, MongoOp>::value ||
91
    ::std::is_integral<T>::value,
92
    "Incorrect type passed to function MongoOp_Name.");
93
  return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
94
    MongoOp_descriptor(), enum_t_value);
95
}
96
inline bool MongoOp_Parse(
97
0
    ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, MongoOp* value) {
98
0
  return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<MongoOp>(
99
0
    MongoOp_descriptor(), name, value);
100
0
}
101
// ===================================================================
102
103
class MongoHeader final :
104
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:brpc.policy.MongoHeader) */ {
105
 public:
106
0
  inline MongoHeader() : MongoHeader(nullptr) {}
107
  ~MongoHeader() override;
108
  explicit PROTOBUF_CONSTEXPR MongoHeader(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
109
110
  MongoHeader(const MongoHeader& from);
111
  MongoHeader(MongoHeader&& from) noexcept
112
0
    : MongoHeader() {
113
0
    *this = ::std::move(from);
114
0
  }
115
116
0
  inline MongoHeader& operator=(const MongoHeader& from) {
117
0
    CopyFrom(from);
118
0
    return *this;
119
0
  }
120
0
  inline MongoHeader& operator=(MongoHeader&& from) noexcept {
121
0
    if (this == &from) return *this;
122
0
    if (GetOwningArena() == from.GetOwningArena()
123
0
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
124
0
        && GetOwningArena() != nullptr
125
0
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
126
0
    ) {
127
0
      InternalSwap(&from);
128
0
    } else {
129
0
      CopyFrom(from);
130
0
    }
131
0
    return *this;
132
0
  }
133
134
0
  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
135
0
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
136
0
  }
137
0
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
138
0
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
139
0
  }
140
141
0
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
142
0
    return GetDescriptor();
143
0
  }
144
0
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
145
0
    return default_instance().GetMetadata().descriptor;
146
0
  }
147
0
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
148
0
    return default_instance().GetMetadata().reflection;
149
0
  }
150
0
  static const MongoHeader& default_instance() {
151
0
    return *internal_default_instance();
152
0
  }
153
0
  static inline const MongoHeader* internal_default_instance() {
154
0
    return reinterpret_cast<const MongoHeader*>(
155
0
               &_MongoHeader_default_instance_);
156
0
  }
157
  static constexpr int kIndexInFileMessages =
158
    0;
159
160
0
  friend void swap(MongoHeader& a, MongoHeader& b) {
161
0
    a.Swap(&b);
162
0
  }
163
0
  inline void Swap(MongoHeader* other) {
164
0
    if (other == this) return;
165
0
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
166
0
    if (GetOwningArena() != nullptr &&
167
0
        GetOwningArena() == other->GetOwningArena()) {
168
0
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
169
0
    if (GetOwningArena() == other->GetOwningArena()) {
170
0
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
171
0
      InternalSwap(other);
172
0
    } else {
173
0
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
174
0
    }
175
0
  }
176
0
  void UnsafeArenaSwap(MongoHeader* other) {
177
0
    if (other == this) return;
178
0
    GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
179
0
    InternalSwap(other);
180
0
  }
181
182
  // implements Message ----------------------------------------------
183
184
0
  MongoHeader* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
185
0
    return CreateMaybeMessage<MongoHeader>(arena);
186
0
  }
187
  using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
188
  void CopyFrom(const MongoHeader& from);
189
  using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
190
0
  void MergeFrom( const MongoHeader& from) {
191
0
    MongoHeader::MergeImpl(*this, from);
192
0
  }
193
  private:
194
  static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
195
  public:
196
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
197
  bool IsInitialized() const final;
198
199
  size_t ByteSizeLong() const final;
200
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
201
  uint8_t* _InternalSerialize(
202
      uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
203
0
  int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
204
205
  private:
206
  void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
207
  void SharedDtor();
208
  void SetCachedSize(int size) const final;
209
  void InternalSwap(MongoHeader* other);
210
211
  private:
212
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
213
0
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
214
0
    return "brpc.policy.MongoHeader";
215
0
  }
216
  protected:
217
  explicit MongoHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena,
218
                       bool is_message_owned = false);
219
  public:
220
221
  static const ClassData _class_data_;
222
  const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
223
224
  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
225
226
  // nested types ----------------------------------------------------
227
228
  // accessors -------------------------------------------------------
229
230
  enum : int {
231
    kMessageLengthFieldNumber = 1,
232
    kRequestIdFieldNumber = 2,
233
    kResponseToFieldNumber = 3,
234
    kOpCodeFieldNumber = 4,
235
  };
236
  // required int32 message_length = 1;
237
  bool has_message_length() const;
238
  private:
239
  bool _internal_has_message_length() const;
240
  public:
241
  void clear_message_length();
242
  int32_t message_length() const;
243
  void set_message_length(int32_t value);
244
  private:
245
  int32_t _internal_message_length() const;
246
  void _internal_set_message_length(int32_t value);
247
  public:
248
249
  // required int32 request_id = 2;
250
  bool has_request_id() const;
251
  private:
252
  bool _internal_has_request_id() const;
253
  public:
254
  void clear_request_id();
255
  int32_t request_id() const;
256
  void set_request_id(int32_t value);
257
  private:
258
  int32_t _internal_request_id() const;
259
  void _internal_set_request_id(int32_t value);
260
  public:
261
262
  // required int32 response_to = 3;
263
  bool has_response_to() const;
264
  private:
265
  bool _internal_has_response_to() const;
266
  public:
267
  void clear_response_to();
268
  int32_t response_to() const;
269
  void set_response_to(int32_t value);
270
  private:
271
  int32_t _internal_response_to() const;
272
  void _internal_set_response_to(int32_t value);
273
  public:
274
275
  // required .brpc.policy.MongoOp op_code = 4;
276
  bool has_op_code() const;
277
  private:
278
  bool _internal_has_op_code() const;
279
  public:
280
  void clear_op_code();
281
  ::brpc::policy::MongoOp op_code() const;
282
  void set_op_code(::brpc::policy::MongoOp value);
283
  private:
284
  ::brpc::policy::MongoOp _internal_op_code() const;
285
  void _internal_set_op_code(::brpc::policy::MongoOp value);
286
  public:
287
288
  // @@protoc_insertion_point(class_scope:brpc.policy.MongoHeader)
289
 private:
290
  class _Internal;
291
292
  // helper for ByteSizeLong()
293
  size_t RequiredFieldsByteSizeFallback() const;
294
295
  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
296
  typedef void InternalArenaConstructable_;
297
  typedef void DestructorSkippable_;
298
  struct Impl_ {
299
    ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
300
    mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
301
    int32_t message_length_;
302
    int32_t request_id_;
303
    int32_t response_to_;
304
    int op_code_;
305
  };
306
  union { Impl_ _impl_; };
307
  friend struct ::TableStruct_brpc_2fpolicy_2fmongo_2eproto;
308
};
309
// -------------------------------------------------------------------
310
311
class MongoRequest final :
312
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:brpc.policy.MongoRequest) */ {
313
 public:
314
0
  inline MongoRequest() : MongoRequest(nullptr) {}
315
  ~MongoRequest() override;
316
  explicit PROTOBUF_CONSTEXPR MongoRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
317
318
  MongoRequest(const MongoRequest& from);
319
  MongoRequest(MongoRequest&& from) noexcept
320
0
    : MongoRequest() {
321
0
    *this = ::std::move(from);
322
0
  }
323
324
0
  inline MongoRequest& operator=(const MongoRequest& from) {
325
0
    CopyFrom(from);
326
0
    return *this;
327
0
  }
328
0
  inline MongoRequest& operator=(MongoRequest&& from) noexcept {
329
0
    if (this == &from) return *this;
330
0
    if (GetOwningArena() == from.GetOwningArena()
331
0
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
332
0
        && GetOwningArena() != nullptr
333
0
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
334
0
    ) {
335
0
      InternalSwap(&from);
336
0
    } else {
337
0
      CopyFrom(from);
338
0
    }
339
0
    return *this;
340
0
  }
341
342
0
  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
343
0
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
344
0
  }
345
0
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
346
0
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
347
0
  }
348
349
0
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
350
0
    return GetDescriptor();
351
0
  }
352
0
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
353
0
    return default_instance().GetMetadata().descriptor;
354
0
  }
355
0
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
356
0
    return default_instance().GetMetadata().reflection;
357
0
  }
358
0
  static const MongoRequest& default_instance() {
359
0
    return *internal_default_instance();
360
0
  }
361
0
  static inline const MongoRequest* internal_default_instance() {
362
0
    return reinterpret_cast<const MongoRequest*>(
363
0
               &_MongoRequest_default_instance_);
364
0
  }
365
  static constexpr int kIndexInFileMessages =
366
    1;
367
368
0
  friend void swap(MongoRequest& a, MongoRequest& b) {
369
0
    a.Swap(&b);
370
0
  }
371
0
  inline void Swap(MongoRequest* other) {
372
0
    if (other == this) return;
373
0
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
374
0
    if (GetOwningArena() != nullptr &&
375
0
        GetOwningArena() == other->GetOwningArena()) {
376
0
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
377
0
    if (GetOwningArena() == other->GetOwningArena()) {
378
0
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
379
0
      InternalSwap(other);
380
0
    } else {
381
0
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
382
0
    }
383
0
  }
384
0
  void UnsafeArenaSwap(MongoRequest* other) {
385
0
    if (other == this) return;
386
0
    GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
387
0
    InternalSwap(other);
388
0
  }
389
390
  // implements Message ----------------------------------------------
391
392
0
  MongoRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
393
0
    return CreateMaybeMessage<MongoRequest>(arena);
394
0
  }
395
  using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
396
  void CopyFrom(const MongoRequest& from);
397
  using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
398
0
  void MergeFrom( const MongoRequest& from) {
399
0
    MongoRequest::MergeImpl(*this, from);
400
0
  }
401
  private:
402
  static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
403
  public:
404
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
405
  bool IsInitialized() const final;
406
407
  size_t ByteSizeLong() const final;
408
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
409
  uint8_t* _InternalSerialize(
410
      uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
411
0
  int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
412
413
  private:
414
  void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
415
  void SharedDtor();
416
  void SetCachedSize(int size) const final;
417
  void InternalSwap(MongoRequest* other);
418
419
  private:
420
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
421
0
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
422
0
    return "brpc.policy.MongoRequest";
423
0
  }
424
  protected:
425
  explicit MongoRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
426
                       bool is_message_owned = false);
427
  public:
428
429
  static const ClassData _class_data_;
430
  const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
431
432
  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
433
434
  // nested types ----------------------------------------------------
435
436
  // accessors -------------------------------------------------------
437
438
  enum : int {
439
    kMessageFieldNumber = 2,
440
    kHeaderFieldNumber = 1,
441
  };
442
  // required string message = 2;
443
  bool has_message() const;
444
  private:
445
  bool _internal_has_message() const;
446
  public:
447
  void clear_message();
448
  const std::string& message() const;
449
  template <typename ArgT0 = const std::string&, typename... ArgT>
450
  void set_message(ArgT0&& arg0, ArgT... args);
451
  std::string* mutable_message();
452
  PROTOBUF_NODISCARD std::string* release_message();
453
  void set_allocated_message(std::string* message);
454
  private:
455
  const std::string& _internal_message() const;
456
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_message(const std::string& value);
457
  std::string* _internal_mutable_message();
458
  public:
459
460
  // required .brpc.policy.MongoHeader header = 1;
461
  bool has_header() const;
462
  private:
463
  bool _internal_has_header() const;
464
  public:
465
  void clear_header();
466
  const ::brpc::policy::MongoHeader& header() const;
467
  PROTOBUF_NODISCARD ::brpc::policy::MongoHeader* release_header();
468
  ::brpc::policy::MongoHeader* mutable_header();
469
  void set_allocated_header(::brpc::policy::MongoHeader* header);
470
  private:
471
  const ::brpc::policy::MongoHeader& _internal_header() const;
472
  ::brpc::policy::MongoHeader* _internal_mutable_header();
473
  public:
474
  void unsafe_arena_set_allocated_header(
475
      ::brpc::policy::MongoHeader* header);
476
  ::brpc::policy::MongoHeader* unsafe_arena_release_header();
477
478
  // @@protoc_insertion_point(class_scope:brpc.policy.MongoRequest)
479
 private:
480
  class _Internal;
481
482
  // helper for ByteSizeLong()
483
  size_t RequiredFieldsByteSizeFallback() const;
484
485
  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
486
  typedef void InternalArenaConstructable_;
487
  typedef void DestructorSkippable_;
488
  struct Impl_ {
489
    ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
490
    mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
491
    ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_;
492
    ::brpc::policy::MongoHeader* header_;
493
  };
494
  union { Impl_ _impl_; };
495
  friend struct ::TableStruct_brpc_2fpolicy_2fmongo_2eproto;
496
};
497
// -------------------------------------------------------------------
498
499
class MongoResponse final :
500
    public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:brpc.policy.MongoResponse) */ {
501
 public:
502
0
  inline MongoResponse() : MongoResponse(nullptr) {}
503
  ~MongoResponse() override;
504
  explicit PROTOBUF_CONSTEXPR MongoResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
505
506
  MongoResponse(const MongoResponse& from);
507
  MongoResponse(MongoResponse&& from) noexcept
508
0
    : MongoResponse() {
509
0
    *this = ::std::move(from);
510
0
  }
511
512
0
  inline MongoResponse& operator=(const MongoResponse& from) {
513
0
    CopyFrom(from);
514
0
    return *this;
515
0
  }
516
0
  inline MongoResponse& operator=(MongoResponse&& from) noexcept {
517
0
    if (this == &from) return *this;
518
0
    if (GetOwningArena() == from.GetOwningArena()
519
0
  #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
520
0
        && GetOwningArena() != nullptr
521
0
  #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
522
0
    ) {
523
0
      InternalSwap(&from);
524
0
    } else {
525
0
      CopyFrom(from);
526
0
    }
527
0
    return *this;
528
0
  }
529
530
0
  inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const {
531
0
    return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance);
532
0
  }
533
0
  inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() {
534
0
    return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
535
0
  }
536
537
0
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
538
0
    return GetDescriptor();
539
0
  }
540
0
  static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
541
0
    return default_instance().GetMetadata().descriptor;
542
0
  }
543
0
  static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
544
0
    return default_instance().GetMetadata().reflection;
545
0
  }
546
0
  static const MongoResponse& default_instance() {
547
0
    return *internal_default_instance();
548
0
  }
549
0
  static inline const MongoResponse* internal_default_instance() {
550
0
    return reinterpret_cast<const MongoResponse*>(
551
0
               &_MongoResponse_default_instance_);
552
0
  }
553
  static constexpr int kIndexInFileMessages =
554
    2;
555
556
0
  friend void swap(MongoResponse& a, MongoResponse& b) {
557
0
    a.Swap(&b);
558
0
  }
559
0
  inline void Swap(MongoResponse* other) {
560
0
    if (other == this) return;
561
0
  #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
562
0
    if (GetOwningArena() != nullptr &&
563
0
        GetOwningArena() == other->GetOwningArena()) {
564
0
   #else  // PROTOBUF_FORCE_COPY_IN_SWAP
565
0
    if (GetOwningArena() == other->GetOwningArena()) {
566
0
  #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
567
0
      InternalSwap(other);
568
0
    } else {
569
0
      ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
570
0
    }
571
0
  }
572
0
  void UnsafeArenaSwap(MongoResponse* other) {
573
0
    if (other == this) return;
574
0
    GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
575
0
    InternalSwap(other);
576
0
  }
577
578
  // implements Message ----------------------------------------------
579
580
0
  MongoResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
581
0
    return CreateMaybeMessage<MongoResponse>(arena);
582
0
  }
583
  using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
584
  void CopyFrom(const MongoResponse& from);
585
  using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
586
0
  void MergeFrom( const MongoResponse& from) {
587
0
    MongoResponse::MergeImpl(*this, from);
588
0
  }
589
  private:
590
  static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
591
  public:
592
  PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
593
  bool IsInitialized() const final;
594
595
  size_t ByteSizeLong() const final;
596
  const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
597
  uint8_t* _InternalSerialize(
598
      uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
599
0
  int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
600
601
  private:
602
  void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
603
  void SharedDtor();
604
  void SetCachedSize(int size) const final;
605
  void InternalSwap(MongoResponse* other);
606
607
  private:
608
  friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
609
0
  static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
610
0
    return "brpc.policy.MongoResponse";
611
0
  }
612
  protected:
613
  explicit MongoResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
614
                       bool is_message_owned = false);
615
  public:
616
617
  static const ClassData _class_data_;
618
  const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
619
620
  ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
621
622
  // nested types ----------------------------------------------------
623
624
  // accessors -------------------------------------------------------
625
626
  enum : int {
627
    kMessageFieldNumber = 6,
628
    kHeaderFieldNumber = 1,
629
    kCursorIdFieldNumber = 3,
630
    kResponseFlagsFieldNumber = 2,
631
    kStartingFromFieldNumber = 4,
632
    kNumberReturnedFieldNumber = 5,
633
  };
634
  // required string message = 6;
635
  bool has_message() const;
636
  private:
637
  bool _internal_has_message() const;
638
  public:
639
  void clear_message();
640
  const std::string& message() const;
641
  template <typename ArgT0 = const std::string&, typename... ArgT>
642
  void set_message(ArgT0&& arg0, ArgT... args);
643
  std::string* mutable_message();
644
  PROTOBUF_NODISCARD std::string* release_message();
645
  void set_allocated_message(std::string* message);
646
  private:
647
  const std::string& _internal_message() const;
648
  inline PROTOBUF_ALWAYS_INLINE void _internal_set_message(const std::string& value);
649
  std::string* _internal_mutable_message();
650
  public:
651
652
  // required .brpc.policy.MongoHeader header = 1;
653
  bool has_header() const;
654
  private:
655
  bool _internal_has_header() const;
656
  public:
657
  void clear_header();
658
  const ::brpc::policy::MongoHeader& header() const;
659
  PROTOBUF_NODISCARD ::brpc::policy::MongoHeader* release_header();
660
  ::brpc::policy::MongoHeader* mutable_header();
661
  void set_allocated_header(::brpc::policy::MongoHeader* header);
662
  private:
663
  const ::brpc::policy::MongoHeader& _internal_header() const;
664
  ::brpc::policy::MongoHeader* _internal_mutable_header();
665
  public:
666
  void unsafe_arena_set_allocated_header(
667
      ::brpc::policy::MongoHeader* header);
668
  ::brpc::policy::MongoHeader* unsafe_arena_release_header();
669
670
  // required int64 cursor_id = 3;
671
  bool has_cursor_id() const;
672
  private:
673
  bool _internal_has_cursor_id() const;
674
  public:
675
  void clear_cursor_id();
676
  int64_t cursor_id() const;
677
  void set_cursor_id(int64_t value);
678
  private:
679
  int64_t _internal_cursor_id() const;
680
  void _internal_set_cursor_id(int64_t value);
681
  public:
682
683
  // required int32 response_flags = 2;
684
  bool has_response_flags() const;
685
  private:
686
  bool _internal_has_response_flags() const;
687
  public:
688
  void clear_response_flags();
689
  int32_t response_flags() const;
690
  void set_response_flags(int32_t value);
691
  private:
692
  int32_t _internal_response_flags() const;
693
  void _internal_set_response_flags(int32_t value);
694
  public:
695
696
  // required int32 starting_from = 4;
697
  bool has_starting_from() const;
698
  private:
699
  bool _internal_has_starting_from() const;
700
  public:
701
  void clear_starting_from();
702
  int32_t starting_from() const;
703
  void set_starting_from(int32_t value);
704
  private:
705
  int32_t _internal_starting_from() const;
706
  void _internal_set_starting_from(int32_t value);
707
  public:
708
709
  // required int32 number_returned = 5;
710
  bool has_number_returned() const;
711
  private:
712
  bool _internal_has_number_returned() const;
713
  public:
714
  void clear_number_returned();
715
  int32_t number_returned() const;
716
  void set_number_returned(int32_t value);
717
  private:
718
  int32_t _internal_number_returned() const;
719
  void _internal_set_number_returned(int32_t value);
720
  public:
721
722
  // @@protoc_insertion_point(class_scope:brpc.policy.MongoResponse)
723
 private:
724
  class _Internal;
725
726
  // helper for ByteSizeLong()
727
  size_t RequiredFieldsByteSizeFallback() const;
728
729
  template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
730
  typedef void InternalArenaConstructable_;
731
  typedef void DestructorSkippable_;
732
  struct Impl_ {
733
    ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
734
    mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
735
    ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_;
736
    ::brpc::policy::MongoHeader* header_;
737
    int64_t cursor_id_;
738
    int32_t response_flags_;
739
    int32_t starting_from_;
740
    int32_t number_returned_;
741
  };
742
  union { Impl_ _impl_; };
743
  friend struct ::TableStruct_brpc_2fpolicy_2fmongo_2eproto;
744
};
745
// ===================================================================
746
747
class MongoService_Stub;
748
749
class MongoService : public ::PROTOBUF_NAMESPACE_ID::Service {
750
 protected:
751
  // This class should be treated as an abstract interface.
752
0
  inline MongoService() {};
753
 public:
754
  virtual ~MongoService();
755
756
  typedef MongoService_Stub Stub;
757
758
  static const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* descriptor();
759
760
  virtual void default_method(::PROTOBUF_NAMESPACE_ID::RpcController* controller,
761
                       const ::brpc::policy::MongoRequest* request,
762
                       ::brpc::policy::MongoResponse* response,
763
                       ::google::protobuf::Closure* done);
764
765
  // implements Service ----------------------------------------------
766
767
  const ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor* GetDescriptor();
768
  void CallMethod(const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method,
769
                  ::PROTOBUF_NAMESPACE_ID::RpcController* controller,
770
                  const ::PROTOBUF_NAMESPACE_ID::Message* request,
771
                  ::PROTOBUF_NAMESPACE_ID::Message* response,
772
                  ::google::protobuf::Closure* done);
773
  const ::PROTOBUF_NAMESPACE_ID::Message& GetRequestPrototype(
774
    const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const;
775
  const ::PROTOBUF_NAMESPACE_ID::Message& GetResponsePrototype(
776
    const ::PROTOBUF_NAMESPACE_ID::MethodDescriptor* method) const;
777
778
 private:
779
  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MongoService);
780
};
781
782
class MongoService_Stub : public MongoService {
783
 public:
784
  MongoService_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel);
785
  MongoService_Stub(::PROTOBUF_NAMESPACE_ID::RpcChannel* channel,
786
                   ::PROTOBUF_NAMESPACE_ID::Service::ChannelOwnership ownership);
787
  ~MongoService_Stub();
788
789
0
  inline ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel() { return channel_; }
790
791
  // implements MongoService ------------------------------------------
792
793
  void default_method(::PROTOBUF_NAMESPACE_ID::RpcController* controller,
794
                       const ::brpc::policy::MongoRequest* request,
795
                       ::brpc::policy::MongoResponse* response,
796
                       ::google::protobuf::Closure* done);
797
 private:
798
  ::PROTOBUF_NAMESPACE_ID::RpcChannel* channel_;
799
  bool owns_channel_;
800
  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MongoService_Stub);
801
};
802
803
804
// ===================================================================
805
806
807
// ===================================================================
808
809
#ifdef __GNUC__
810
  #pragma GCC diagnostic push
811
  #pragma GCC diagnostic ignored "-Wstrict-aliasing"
812
#endif  // __GNUC__
813
// MongoHeader
814
815
// required int32 message_length = 1;
816
0
inline bool MongoHeader::_internal_has_message_length() const {
817
0
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
818
0
  return value;
819
0
}
820
0
inline bool MongoHeader::has_message_length() const {
821
0
  return _internal_has_message_length();
822
0
}
823
0
inline void MongoHeader::clear_message_length() {
824
0
  _impl_.message_length_ = 0;
825
0
  _impl_._has_bits_[0] &= ~0x00000001u;
826
0
}
827
0
inline int32_t MongoHeader::_internal_message_length() const {
828
0
  return _impl_.message_length_;
829
0
}
830
0
inline int32_t MongoHeader::message_length() const {
831
  // @@protoc_insertion_point(field_get:brpc.policy.MongoHeader.message_length)
832
0
  return _internal_message_length();
833
0
}
834
0
inline void MongoHeader::_internal_set_message_length(int32_t value) {
835
0
  _impl_._has_bits_[0] |= 0x00000001u;
836
0
  _impl_.message_length_ = value;
837
0
}
838
0
inline void MongoHeader::set_message_length(int32_t value) {
839
0
  _internal_set_message_length(value);
840
  // @@protoc_insertion_point(field_set:brpc.policy.MongoHeader.message_length)
841
0
}
842
843
// required int32 request_id = 2;
844
0
inline bool MongoHeader::_internal_has_request_id() const {
845
0
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
846
0
  return value;
847
0
}
848
0
inline bool MongoHeader::has_request_id() const {
849
0
  return _internal_has_request_id();
850
0
}
851
0
inline void MongoHeader::clear_request_id() {
852
0
  _impl_.request_id_ = 0;
853
0
  _impl_._has_bits_[0] &= ~0x00000002u;
854
0
}
855
0
inline int32_t MongoHeader::_internal_request_id() const {
856
0
  return _impl_.request_id_;
857
0
}
858
0
inline int32_t MongoHeader::request_id() const {
859
  // @@protoc_insertion_point(field_get:brpc.policy.MongoHeader.request_id)
860
0
  return _internal_request_id();
861
0
}
862
0
inline void MongoHeader::_internal_set_request_id(int32_t value) {
863
0
  _impl_._has_bits_[0] |= 0x00000002u;
864
0
  _impl_.request_id_ = value;
865
0
}
866
0
inline void MongoHeader::set_request_id(int32_t value) {
867
0
  _internal_set_request_id(value);
868
  // @@protoc_insertion_point(field_set:brpc.policy.MongoHeader.request_id)
869
0
}
870
871
// required int32 response_to = 3;
872
0
inline bool MongoHeader::_internal_has_response_to() const {
873
0
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
874
0
  return value;
875
0
}
876
0
inline bool MongoHeader::has_response_to() const {
877
0
  return _internal_has_response_to();
878
0
}
879
0
inline void MongoHeader::clear_response_to() {
880
0
  _impl_.response_to_ = 0;
881
0
  _impl_._has_bits_[0] &= ~0x00000004u;
882
0
}
883
0
inline int32_t MongoHeader::_internal_response_to() const {
884
0
  return _impl_.response_to_;
885
0
}
886
0
inline int32_t MongoHeader::response_to() const {
887
  // @@protoc_insertion_point(field_get:brpc.policy.MongoHeader.response_to)
888
0
  return _internal_response_to();
889
0
}
890
0
inline void MongoHeader::_internal_set_response_to(int32_t value) {
891
0
  _impl_._has_bits_[0] |= 0x00000004u;
892
0
  _impl_.response_to_ = value;
893
0
}
894
0
inline void MongoHeader::set_response_to(int32_t value) {
895
0
  _internal_set_response_to(value);
896
  // @@protoc_insertion_point(field_set:brpc.policy.MongoHeader.response_to)
897
0
}
898
899
// required .brpc.policy.MongoOp op_code = 4;
900
0
inline bool MongoHeader::_internal_has_op_code() const {
901
0
  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
902
0
  return value;
903
0
}
904
0
inline bool MongoHeader::has_op_code() const {
905
0
  return _internal_has_op_code();
906
0
}
907
0
inline void MongoHeader::clear_op_code() {
908
0
  _impl_.op_code_ = 1;
909
0
  _impl_._has_bits_[0] &= ~0x00000008u;
910
0
}
911
0
inline ::brpc::policy::MongoOp MongoHeader::_internal_op_code() const {
912
0
  return static_cast< ::brpc::policy::MongoOp >(_impl_.op_code_);
913
0
}
914
0
inline ::brpc::policy::MongoOp MongoHeader::op_code() const {
915
  // @@protoc_insertion_point(field_get:brpc.policy.MongoHeader.op_code)
916
0
  return _internal_op_code();
917
0
}
918
0
inline void MongoHeader::_internal_set_op_code(::brpc::policy::MongoOp value) {
919
0
  assert(::brpc::policy::MongoOp_IsValid(value));
920
0
  _impl_._has_bits_[0] |= 0x00000008u;
921
0
  _impl_.op_code_ = value;
922
0
}
923
0
inline void MongoHeader::set_op_code(::brpc::policy::MongoOp value) {
924
0
  _internal_set_op_code(value);
925
  // @@protoc_insertion_point(field_set:brpc.policy.MongoHeader.op_code)
926
0
}
927
928
// -------------------------------------------------------------------
929
930
// MongoRequest
931
932
// required .brpc.policy.MongoHeader header = 1;
933
0
inline bool MongoRequest::_internal_has_header() const {
934
0
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
935
0
  PROTOBUF_ASSUME(!value || _impl_.header_ != nullptr);
936
0
  return value;
937
0
}
938
0
inline bool MongoRequest::has_header() const {
939
0
  return _internal_has_header();
940
0
}
941
0
inline void MongoRequest::clear_header() {
942
0
  if (_impl_.header_ != nullptr) _impl_.header_->Clear();
943
0
  _impl_._has_bits_[0] &= ~0x00000002u;
944
0
}
945
0
inline const ::brpc::policy::MongoHeader& MongoRequest::_internal_header() const {
946
0
  const ::brpc::policy::MongoHeader* p = _impl_.header_;
947
0
  return p != nullptr ? *p : reinterpret_cast<const ::brpc::policy::MongoHeader&>(
948
0
      ::brpc::policy::_MongoHeader_default_instance_);
949
0
}
950
0
inline const ::brpc::policy::MongoHeader& MongoRequest::header() const {
951
0
  // @@protoc_insertion_point(field_get:brpc.policy.MongoRequest.header)
952
0
  return _internal_header();
953
0
}
954
inline void MongoRequest::unsafe_arena_set_allocated_header(
955
0
    ::brpc::policy::MongoHeader* header) {
956
0
  if (GetArenaForAllocation() == nullptr) {
957
0
    delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_);
958
0
  }
959
0
  _impl_.header_ = header;
960
0
  if (header) {
961
0
    _impl_._has_bits_[0] |= 0x00000002u;
962
0
  } else {
963
0
    _impl_._has_bits_[0] &= ~0x00000002u;
964
0
  }
965
0
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:brpc.policy.MongoRequest.header)
966
0
}
967
0
inline ::brpc::policy::MongoHeader* MongoRequest::release_header() {
968
0
  _impl_._has_bits_[0] &= ~0x00000002u;
969
0
  ::brpc::policy::MongoHeader* temp = _impl_.header_;
970
0
  _impl_.header_ = nullptr;
971
0
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
972
0
  auto* old =  reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
973
0
  temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
974
0
  if (GetArenaForAllocation() == nullptr) { delete old; }
975
0
#else  // PROTOBUF_FORCE_COPY_IN_RELEASE
976
0
  if (GetArenaForAllocation() != nullptr) {
977
0
    temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
978
0
  }
979
0
#endif  // !PROTOBUF_FORCE_COPY_IN_RELEASE
980
0
  return temp;
981
0
}
982
0
inline ::brpc::policy::MongoHeader* MongoRequest::unsafe_arena_release_header() {
983
0
  // @@protoc_insertion_point(field_release:brpc.policy.MongoRequest.header)
984
0
  _impl_._has_bits_[0] &= ~0x00000002u;
985
0
  ::brpc::policy::MongoHeader* temp = _impl_.header_;
986
0
  _impl_.header_ = nullptr;
987
0
  return temp;
988
0
}
989
0
inline ::brpc::policy::MongoHeader* MongoRequest::_internal_mutable_header() {
990
0
  _impl_._has_bits_[0] |= 0x00000002u;
991
0
  if (_impl_.header_ == nullptr) {
992
0
    auto* p = CreateMaybeMessage<::brpc::policy::MongoHeader>(GetArenaForAllocation());
993
0
    _impl_.header_ = p;
994
0
  }
995
0
  return _impl_.header_;
996
0
}
997
0
inline ::brpc::policy::MongoHeader* MongoRequest::mutable_header() {
998
0
  ::brpc::policy::MongoHeader* _msg = _internal_mutable_header();
999
  // @@protoc_insertion_point(field_mutable:brpc.policy.MongoRequest.header)
1000
0
  return _msg;
1001
0
}
1002
0
inline void MongoRequest::set_allocated_header(::brpc::policy::MongoHeader* header) {
1003
0
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
1004
0
  if (message_arena == nullptr) {
1005
0
    delete _impl_.header_;
1006
0
  }
1007
0
  if (header) {
1008
0
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
1009
0
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(header);
1010
0
    if (message_arena != submessage_arena) {
1011
0
      header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
1012
0
          message_arena, header, submessage_arena);
1013
0
    }
1014
0
    _impl_._has_bits_[0] |= 0x00000002u;
1015
0
  } else {
1016
0
    _impl_._has_bits_[0] &= ~0x00000002u;
1017
0
  }
1018
0
  _impl_.header_ = header;
1019
0
  // @@protoc_insertion_point(field_set_allocated:brpc.policy.MongoRequest.header)
1020
0
}
1021
1022
// required string message = 2;
1023
0
inline bool MongoRequest::_internal_has_message() const {
1024
0
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
1025
0
  return value;
1026
0
}
1027
0
inline bool MongoRequest::has_message() const {
1028
0
  return _internal_has_message();
1029
0
}
1030
0
inline void MongoRequest::clear_message() {
1031
0
  _impl_.message_.ClearToEmpty();
1032
0
  _impl_._has_bits_[0] &= ~0x00000001u;
1033
0
}
1034
0
inline const std::string& MongoRequest::message() const {
1035
0
  // @@protoc_insertion_point(field_get:brpc.policy.MongoRequest.message)
1036
0
  return _internal_message();
1037
0
}
1038
template <typename ArgT0, typename... ArgT>
1039
inline PROTOBUF_ALWAYS_INLINE
1040
0
void MongoRequest::set_message(ArgT0&& arg0, ArgT... args) {
1041
0
 _impl_._has_bits_[0] |= 0x00000001u;
1042
0
 _impl_.message_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
1043
  // @@protoc_insertion_point(field_set:brpc.policy.MongoRequest.message)
1044
0
}
1045
0
inline std::string* MongoRequest::mutable_message() {
1046
0
  std::string* _s = _internal_mutable_message();
1047
0
  // @@protoc_insertion_point(field_mutable:brpc.policy.MongoRequest.message)
1048
0
  return _s;
1049
0
}
1050
0
inline const std::string& MongoRequest::_internal_message() const {
1051
0
  return _impl_.message_.Get();
1052
0
}
1053
0
inline void MongoRequest::_internal_set_message(const std::string& value) {
1054
0
  _impl_._has_bits_[0] |= 0x00000001u;
1055
0
  _impl_.message_.Set(value, GetArenaForAllocation());
1056
0
}
1057
0
inline std::string* MongoRequest::_internal_mutable_message() {
1058
0
  _impl_._has_bits_[0] |= 0x00000001u;
1059
0
  return _impl_.message_.Mutable(GetArenaForAllocation());
1060
0
}
1061
0
inline std::string* MongoRequest::release_message() {
1062
0
  // @@protoc_insertion_point(field_release:brpc.policy.MongoRequest.message)
1063
0
  if (!_internal_has_message()) {
1064
0
    return nullptr;
1065
0
  }
1066
0
  _impl_._has_bits_[0] &= ~0x00000001u;
1067
0
  auto* p = _impl_.message_.Release();
1068
0
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1069
0
  if (_impl_.message_.IsDefault()) {
1070
0
    _impl_.message_.Set("", GetArenaForAllocation());
1071
0
  }
1072
0
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1073
0
  return p;
1074
0
}
1075
0
inline void MongoRequest::set_allocated_message(std::string* message) {
1076
0
  if (message != nullptr) {
1077
0
    _impl_._has_bits_[0] |= 0x00000001u;
1078
0
  } else {
1079
0
    _impl_._has_bits_[0] &= ~0x00000001u;
1080
0
  }
1081
0
  _impl_.message_.SetAllocated(message, GetArenaForAllocation());
1082
0
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1083
0
  if (_impl_.message_.IsDefault()) {
1084
0
    _impl_.message_.Set("", GetArenaForAllocation());
1085
0
  }
1086
0
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1087
0
  // @@protoc_insertion_point(field_set_allocated:brpc.policy.MongoRequest.message)
1088
0
}
1089
1090
// -------------------------------------------------------------------
1091
1092
// MongoResponse
1093
1094
// required .brpc.policy.MongoHeader header = 1;
1095
0
inline bool MongoResponse::_internal_has_header() const {
1096
0
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
1097
0
  PROTOBUF_ASSUME(!value || _impl_.header_ != nullptr);
1098
0
  return value;
1099
0
}
1100
0
inline bool MongoResponse::has_header() const {
1101
0
  return _internal_has_header();
1102
0
}
1103
0
inline void MongoResponse::clear_header() {
1104
0
  if (_impl_.header_ != nullptr) _impl_.header_->Clear();
1105
0
  _impl_._has_bits_[0] &= ~0x00000002u;
1106
0
}
1107
0
inline const ::brpc::policy::MongoHeader& MongoResponse::_internal_header() const {
1108
0
  const ::brpc::policy::MongoHeader* p = _impl_.header_;
1109
0
  return p != nullptr ? *p : reinterpret_cast<const ::brpc::policy::MongoHeader&>(
1110
0
      ::brpc::policy::_MongoHeader_default_instance_);
1111
0
}
1112
0
inline const ::brpc::policy::MongoHeader& MongoResponse::header() const {
1113
  // @@protoc_insertion_point(field_get:brpc.policy.MongoResponse.header)
1114
0
  return _internal_header();
1115
0
}
1116
inline void MongoResponse::unsafe_arena_set_allocated_header(
1117
0
    ::brpc::policy::MongoHeader* header) {
1118
0
  if (GetArenaForAllocation() == nullptr) {
1119
0
    delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.header_);
1120
0
  }
1121
0
  _impl_.header_ = header;
1122
0
  if (header) {
1123
0
    _impl_._has_bits_[0] |= 0x00000002u;
1124
0
  } else {
1125
0
    _impl_._has_bits_[0] &= ~0x00000002u;
1126
0
  }
1127
0
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:brpc.policy.MongoResponse.header)
1128
0
}
1129
0
inline ::brpc::policy::MongoHeader* MongoResponse::release_header() {
1130
0
  _impl_._has_bits_[0] &= ~0x00000002u;
1131
0
  ::brpc::policy::MongoHeader* temp = _impl_.header_;
1132
0
  _impl_.header_ = nullptr;
1133
0
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
1134
0
  auto* old =  reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
1135
0
  temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
1136
0
  if (GetArenaForAllocation() == nullptr) { delete old; }
1137
0
#else  // PROTOBUF_FORCE_COPY_IN_RELEASE
1138
0
  if (GetArenaForAllocation() != nullptr) {
1139
0
    temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
1140
0
  }
1141
0
#endif  // !PROTOBUF_FORCE_COPY_IN_RELEASE
1142
0
  return temp;
1143
0
}
1144
0
inline ::brpc::policy::MongoHeader* MongoResponse::unsafe_arena_release_header() {
1145
0
  // @@protoc_insertion_point(field_release:brpc.policy.MongoResponse.header)
1146
0
  _impl_._has_bits_[0] &= ~0x00000002u;
1147
0
  ::brpc::policy::MongoHeader* temp = _impl_.header_;
1148
0
  _impl_.header_ = nullptr;
1149
0
  return temp;
1150
0
}
1151
0
inline ::brpc::policy::MongoHeader* MongoResponse::_internal_mutable_header() {
1152
0
  _impl_._has_bits_[0] |= 0x00000002u;
1153
0
  if (_impl_.header_ == nullptr) {
1154
0
    auto* p = CreateMaybeMessage<::brpc::policy::MongoHeader>(GetArenaForAllocation());
1155
0
    _impl_.header_ = p;
1156
0
  }
1157
0
  return _impl_.header_;
1158
0
}
1159
0
inline ::brpc::policy::MongoHeader* MongoResponse::mutable_header() {
1160
0
  ::brpc::policy::MongoHeader* _msg = _internal_mutable_header();
1161
  // @@protoc_insertion_point(field_mutable:brpc.policy.MongoResponse.header)
1162
0
  return _msg;
1163
0
}
1164
0
inline void MongoResponse::set_allocated_header(::brpc::policy::MongoHeader* header) {
1165
0
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
1166
0
  if (message_arena == nullptr) {
1167
0
    delete _impl_.header_;
1168
0
  }
1169
0
  if (header) {
1170
0
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
1171
0
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(header);
1172
0
    if (message_arena != submessage_arena) {
1173
0
      header = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
1174
0
          message_arena, header, submessage_arena);
1175
0
    }
1176
0
    _impl_._has_bits_[0] |= 0x00000002u;
1177
0
  } else {
1178
0
    _impl_._has_bits_[0] &= ~0x00000002u;
1179
0
  }
1180
0
  _impl_.header_ = header;
1181
0
  // @@protoc_insertion_point(field_set_allocated:brpc.policy.MongoResponse.header)
1182
0
}
1183
1184
// required int32 response_flags = 2;
1185
0
inline bool MongoResponse::_internal_has_response_flags() const {
1186
0
  bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0;
1187
0
  return value;
1188
0
}
1189
0
inline bool MongoResponse::has_response_flags() const {
1190
0
  return _internal_has_response_flags();
1191
0
}
1192
0
inline void MongoResponse::clear_response_flags() {
1193
0
  _impl_.response_flags_ = 0;
1194
0
  _impl_._has_bits_[0] &= ~0x00000008u;
1195
0
}
1196
0
inline int32_t MongoResponse::_internal_response_flags() const {
1197
0
  return _impl_.response_flags_;
1198
0
}
1199
0
inline int32_t MongoResponse::response_flags() const {
1200
  // @@protoc_insertion_point(field_get:brpc.policy.MongoResponse.response_flags)
1201
0
  return _internal_response_flags();
1202
0
}
1203
0
inline void MongoResponse::_internal_set_response_flags(int32_t value) {
1204
0
  _impl_._has_bits_[0] |= 0x00000008u;
1205
0
  _impl_.response_flags_ = value;
1206
0
}
1207
0
inline void MongoResponse::set_response_flags(int32_t value) {
1208
0
  _internal_set_response_flags(value);
1209
0
  // @@protoc_insertion_point(field_set:brpc.policy.MongoResponse.response_flags)
1210
0
}
1211
1212
// required int64 cursor_id = 3;
1213
0
inline bool MongoResponse::_internal_has_cursor_id() const {
1214
0
  bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0;
1215
0
  return value;
1216
0
}
1217
0
inline bool MongoResponse::has_cursor_id() const {
1218
0
  return _internal_has_cursor_id();
1219
0
}
1220
0
inline void MongoResponse::clear_cursor_id() {
1221
0
  _impl_.cursor_id_ = int64_t{0};
1222
0
  _impl_._has_bits_[0] &= ~0x00000004u;
1223
0
}
1224
0
inline int64_t MongoResponse::_internal_cursor_id() const {
1225
0
  return _impl_.cursor_id_;
1226
0
}
1227
0
inline int64_t MongoResponse::cursor_id() const {
1228
  // @@protoc_insertion_point(field_get:brpc.policy.MongoResponse.cursor_id)
1229
0
  return _internal_cursor_id();
1230
0
}
1231
0
inline void MongoResponse::_internal_set_cursor_id(int64_t value) {
1232
0
  _impl_._has_bits_[0] |= 0x00000004u;
1233
0
  _impl_.cursor_id_ = value;
1234
0
}
1235
0
inline void MongoResponse::set_cursor_id(int64_t value) {
1236
0
  _internal_set_cursor_id(value);
1237
0
  // @@protoc_insertion_point(field_set:brpc.policy.MongoResponse.cursor_id)
1238
0
}
1239
1240
// required int32 starting_from = 4;
1241
0
inline bool MongoResponse::_internal_has_starting_from() const {
1242
0
  bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0;
1243
0
  return value;
1244
0
}
1245
0
inline bool MongoResponse::has_starting_from() const {
1246
0
  return _internal_has_starting_from();
1247
0
}
1248
0
inline void MongoResponse::clear_starting_from() {
1249
0
  _impl_.starting_from_ = 0;
1250
0
  _impl_._has_bits_[0] &= ~0x00000010u;
1251
0
}
1252
0
inline int32_t MongoResponse::_internal_starting_from() const {
1253
0
  return _impl_.starting_from_;
1254
0
}
1255
0
inline int32_t MongoResponse::starting_from() const {
1256
  // @@protoc_insertion_point(field_get:brpc.policy.MongoResponse.starting_from)
1257
0
  return _internal_starting_from();
1258
0
}
1259
0
inline void MongoResponse::_internal_set_starting_from(int32_t value) {
1260
0
  _impl_._has_bits_[0] |= 0x00000010u;
1261
0
  _impl_.starting_from_ = value;
1262
0
}
1263
0
inline void MongoResponse::set_starting_from(int32_t value) {
1264
0
  _internal_set_starting_from(value);
1265
0
  // @@protoc_insertion_point(field_set:brpc.policy.MongoResponse.starting_from)
1266
0
}
1267
1268
// required int32 number_returned = 5;
1269
0
inline bool MongoResponse::_internal_has_number_returned() const {
1270
0
  bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0;
1271
0
  return value;
1272
0
}
1273
0
inline bool MongoResponse::has_number_returned() const {
1274
0
  return _internal_has_number_returned();
1275
0
}
1276
0
inline void MongoResponse::clear_number_returned() {
1277
0
  _impl_.number_returned_ = 0;
1278
0
  _impl_._has_bits_[0] &= ~0x00000020u;
1279
0
}
1280
0
inline int32_t MongoResponse::_internal_number_returned() const {
1281
0
  return _impl_.number_returned_;
1282
0
}
1283
0
inline int32_t MongoResponse::number_returned() const {
1284
  // @@protoc_insertion_point(field_get:brpc.policy.MongoResponse.number_returned)
1285
0
  return _internal_number_returned();
1286
0
}
1287
0
inline void MongoResponse::_internal_set_number_returned(int32_t value) {
1288
0
  _impl_._has_bits_[0] |= 0x00000020u;
1289
0
  _impl_.number_returned_ = value;
1290
0
}
1291
0
inline void MongoResponse::set_number_returned(int32_t value) {
1292
0
  _internal_set_number_returned(value);
1293
0
  // @@protoc_insertion_point(field_set:brpc.policy.MongoResponse.number_returned)
1294
0
}
1295
1296
// required string message = 6;
1297
0
inline bool MongoResponse::_internal_has_message() const {
1298
0
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
1299
0
  return value;
1300
0
}
1301
0
inline bool MongoResponse::has_message() const {
1302
0
  return _internal_has_message();
1303
0
}
1304
0
inline void MongoResponse::clear_message() {
1305
0
  _impl_.message_.ClearToEmpty();
1306
0
  _impl_._has_bits_[0] &= ~0x00000001u;
1307
0
}
1308
0
inline const std::string& MongoResponse::message() const {
1309
  // @@protoc_insertion_point(field_get:brpc.policy.MongoResponse.message)
1310
0
  return _internal_message();
1311
0
}
1312
template <typename ArgT0, typename... ArgT>
1313
inline PROTOBUF_ALWAYS_INLINE
1314
void MongoResponse::set_message(ArgT0&& arg0, ArgT... args) {
1315
 _impl_._has_bits_[0] |= 0x00000001u;
1316
 _impl_.message_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
1317
  // @@protoc_insertion_point(field_set:brpc.policy.MongoResponse.message)
1318
}
1319
0
inline std::string* MongoResponse::mutable_message() {
1320
0
  std::string* _s = _internal_mutable_message();
1321
0
  // @@protoc_insertion_point(field_mutable:brpc.policy.MongoResponse.message)
1322
0
  return _s;
1323
0
}
1324
0
inline const std::string& MongoResponse::_internal_message() const {
1325
0
  return _impl_.message_.Get();
1326
0
}
1327
0
inline void MongoResponse::_internal_set_message(const std::string& value) {
1328
0
  _impl_._has_bits_[0] |= 0x00000001u;
1329
0
  _impl_.message_.Set(value, GetArenaForAllocation());
1330
0
}
1331
0
inline std::string* MongoResponse::_internal_mutable_message() {
1332
0
  _impl_._has_bits_[0] |= 0x00000001u;
1333
0
  return _impl_.message_.Mutable(GetArenaForAllocation());
1334
0
}
1335
0
inline std::string* MongoResponse::release_message() {
1336
0
  // @@protoc_insertion_point(field_release:brpc.policy.MongoResponse.message)
1337
0
  if (!_internal_has_message()) {
1338
0
    return nullptr;
1339
0
  }
1340
0
  _impl_._has_bits_[0] &= ~0x00000001u;
1341
0
  auto* p = _impl_.message_.Release();
1342
0
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1343
0
  if (_impl_.message_.IsDefault()) {
1344
0
    _impl_.message_.Set("", GetArenaForAllocation());
1345
0
  }
1346
0
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1347
0
  return p;
1348
0
}
1349
0
inline void MongoResponse::set_allocated_message(std::string* message) {
1350
0
  if (message != nullptr) {
1351
0
    _impl_._has_bits_[0] |= 0x00000001u;
1352
0
  } else {
1353
0
    _impl_._has_bits_[0] &= ~0x00000001u;
1354
0
  }
1355
0
  _impl_.message_.SetAllocated(message, GetArenaForAllocation());
1356
0
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1357
0
  if (_impl_.message_.IsDefault()) {
1358
0
    _impl_.message_.Set("", GetArenaForAllocation());
1359
0
  }
1360
0
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1361
0
  // @@protoc_insertion_point(field_set_allocated:brpc.policy.MongoResponse.message)
1362
0
}
1363
1364
#ifdef __GNUC__
1365
  #pragma GCC diagnostic pop
1366
#endif  // __GNUC__
1367
// -------------------------------------------------------------------
1368
1369
// -------------------------------------------------------------------
1370
1371
1372
// @@protoc_insertion_point(namespace_scope)
1373
1374
}  // namespace policy
1375
}  // namespace brpc
1376
1377
PROTOBUF_NAMESPACE_OPEN
1378
1379
template <> struct is_proto_enum< ::brpc::policy::MongoOp> : ::std::true_type {};
1380
template <>
1381
0
inline const EnumDescriptor* GetEnumDescriptor< ::brpc::policy::MongoOp>() {
1382
0
  return ::brpc::policy::MongoOp_descriptor();
1383
0
}
1384
1385
PROTOBUF_NAMESPACE_CLOSE
1386
1387
// @@protoc_insertion_point(global_scope)
1388
1389
#include <google/protobuf/port_undef.inc>
1390
#endif  // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_brpc_2fpolicy_2fmongo_2eproto