Coverage Report

Created: 2025-12-02 06:36

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/brpc/build/brpc/policy/baidu_rpc_meta.pb.cc
Line
Count
Source
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: brpc/policy/baidu_rpc_meta.proto
3
4
#include "brpc/policy/baidu_rpc_meta.pb.h"
5
6
#include <algorithm>
7
8
#include <google/protobuf/stubs/common.h>
9
#include <google/protobuf/stubs/port.h>
10
#include <google/protobuf/io/coded_stream.h>
11
#include <google/protobuf/wire_format_lite_inl.h>
12
#include <google/protobuf/descriptor.h>
13
#include <google/protobuf/generated_message_reflection.h>
14
#include <google/protobuf/reflection_ops.h>
15
#include <google/protobuf/wire_format.h>
16
// This is a temporary google only hack
17
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
18
#include "third_party/protobuf/version.h"
19
#endif
20
// @@protoc_insertion_point(includes)
21
22
namespace protobuf_brpc_2foptions_2eproto {
23
extern PROTOBUF_INTERNAL_EXPORT_protobuf_brpc_2foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ChunkInfo;
24
}  // namespace protobuf_brpc_2foptions_2eproto
25
namespace protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto {
26
extern PROTOBUF_INTERNAL_EXPORT_protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RpcMeta_UserFieldsEntry_DoNotUse;
27
extern PROTOBUF_INTERNAL_EXPORT_protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RpcRequestMeta;
28
extern PROTOBUF_INTERNAL_EXPORT_protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_RpcResponseMeta;
29
}  // namespace protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto
30
namespace protobuf_brpc_2fstreaming_5frpc_5fmeta_2eproto {
31
extern PROTOBUF_INTERNAL_EXPORT_protobuf_brpc_2fstreaming_5frpc_5fmeta_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_StreamSettings;
32
}  // namespace protobuf_brpc_2fstreaming_5frpc_5fmeta_2eproto
33
namespace brpc {
34
namespace policy {
35
class RpcMeta_UserFieldsEntry_DoNotUseDefaultTypeInternal {
36
 public:
37
  ::google::protobuf::internal::ExplicitlyConstructed<RpcMeta_UserFieldsEntry_DoNotUse>
38
      _instance;
39
} _RpcMeta_UserFieldsEntry_DoNotUse_default_instance_;
40
class RpcMetaDefaultTypeInternal {
41
 public:
42
  ::google::protobuf::internal::ExplicitlyConstructed<RpcMeta>
43
      _instance;
44
} _RpcMeta_default_instance_;
45
class RpcRequestMetaDefaultTypeInternal {
46
 public:
47
  ::google::protobuf::internal::ExplicitlyConstructed<RpcRequestMeta>
48
      _instance;
49
} _RpcRequestMeta_default_instance_;
50
class RpcResponseMetaDefaultTypeInternal {
51
 public:
52
  ::google::protobuf::internal::ExplicitlyConstructed<RpcResponseMeta>
53
      _instance;
54
} _RpcResponseMeta_default_instance_;
55
}  // namespace policy
56
}  // namespace brpc
57
namespace protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto {
58
12
static void InitDefaultsRpcMeta_UserFieldsEntry_DoNotUse() {
59
12
  GOOGLE_PROTOBUF_VERIFY_VERSION;
60
61
12
  {
62
12
    void* ptr = &::brpc::policy::_RpcMeta_UserFieldsEntry_DoNotUse_default_instance_;
63
12
    new (ptr) ::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse();
64
12
  }
65
12
  ::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse::InitAsDefaultInstance();
66
12
}
67
68
::google::protobuf::internal::SCCInfo<0> scc_info_RpcMeta_UserFieldsEntry_DoNotUse =
69
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRpcMeta_UserFieldsEntry_DoNotUse}, {}};
70
71
12
static void InitDefaultsRpcMeta() {
72
12
  GOOGLE_PROTOBUF_VERIFY_VERSION;
73
74
12
  {
75
12
    void* ptr = &::brpc::policy::_RpcMeta_default_instance_;
76
12
    new (ptr) ::brpc::policy::RpcMeta();
77
12
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
78
12
  }
79
12
  ::brpc::policy::RpcMeta::InitAsDefaultInstance();
80
12
}
81
82
::google::protobuf::internal::SCCInfo<5> scc_info_RpcMeta =
83
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 5, InitDefaultsRpcMeta}, {
84
      &protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcRequestMeta.base,
85
      &protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcResponseMeta.base,
86
      &protobuf_brpc_2foptions_2eproto::scc_info_ChunkInfo.base,
87
      &protobuf_brpc_2fstreaming_5frpc_5fmeta_2eproto::scc_info_StreamSettings.base,
88
      &protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcMeta_UserFieldsEntry_DoNotUse.base,}};
89
90
12
static void InitDefaultsRpcRequestMeta() {
91
12
  GOOGLE_PROTOBUF_VERIFY_VERSION;
92
93
12
  {
94
12
    void* ptr = &::brpc::policy::_RpcRequestMeta_default_instance_;
95
12
    new (ptr) ::brpc::policy::RpcRequestMeta();
96
12
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
97
12
  }
98
12
  ::brpc::policy::RpcRequestMeta::InitAsDefaultInstance();
99
12
}
100
101
::google::protobuf::internal::SCCInfo<0> scc_info_RpcRequestMeta =
102
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRpcRequestMeta}, {}};
103
104
12
static void InitDefaultsRpcResponseMeta() {
105
12
  GOOGLE_PROTOBUF_VERIFY_VERSION;
106
107
12
  {
108
12
    void* ptr = &::brpc::policy::_RpcResponseMeta_default_instance_;
109
12
    new (ptr) ::brpc::policy::RpcResponseMeta();
110
12
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
111
12
  }
112
12
  ::brpc::policy::RpcResponseMeta::InitAsDefaultInstance();
113
12
}
114
115
::google::protobuf::internal::SCCInfo<0> scc_info_RpcResponseMeta =
116
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRpcResponseMeta}, {}};
117
118
12
void InitDefaults() {
119
12
  ::google::protobuf::internal::InitSCC(&scc_info_RpcMeta_UserFieldsEntry_DoNotUse.base);
120
12
  ::google::protobuf::internal::InitSCC(&scc_info_RpcMeta.base);
121
12
  ::google::protobuf::internal::InitSCC(&scc_info_RpcRequestMeta.base);
122
12
  ::google::protobuf::internal::InitSCC(&scc_info_RpcResponseMeta.base);
123
12
}
124
125
::google::protobuf::Metadata file_level_metadata[4];
126
127
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
128
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse, _has_bits_),
129
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse, _internal_metadata_),
130
  ~0u,  // no _extensions_
131
  ~0u,  // no _oneof_case_
132
  ~0u,  // no _weak_field_map_
133
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse, key_),
134
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse, value_),
135
  0,
136
  1,
137
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, _has_bits_),
138
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, _internal_metadata_),
139
  ~0u,  // no _extensions_
140
  ~0u,  // no _oneof_case_
141
  ~0u,  // no _weak_field_map_
142
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, request_),
143
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, response_),
144
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, compress_type_),
145
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, correlation_id_),
146
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, attachment_size_),
147
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, chunk_info_),
148
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, authentication_data_),
149
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, stream_settings_),
150
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, user_fields_),
151
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, content_type_),
152
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, checksum_type_),
153
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcMeta, checksum_value_),
154
  2,
155
  3,
156
  7,
157
  6,
158
  8,
159
  4,
160
  0,
161
  5,
162
  ~0u,
163
  9,
164
  10,
165
  1,
166
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, _has_bits_),
167
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, _internal_metadata_),
168
  ~0u,  // no _extensions_
169
  ~0u,  // no _oneof_case_
170
  ~0u,  // no _weak_field_map_
171
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, service_name_),
172
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, method_name_),
173
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, log_id_),
174
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, trace_id_),
175
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, span_id_),
176
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, parent_span_id_),
177
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, request_id_),
178
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcRequestMeta, timeout_ms_),
179
  0,
180
  1,
181
  3,
182
  4,
183
  5,
184
  6,
185
  2,
186
  7,
187
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcResponseMeta, _has_bits_),
188
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcResponseMeta, _internal_metadata_),
189
  ~0u,  // no _extensions_
190
  ~0u,  // no _oneof_case_
191
  ~0u,  // no _weak_field_map_
192
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcResponseMeta, error_code_),
193
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::brpc::policy::RpcResponseMeta, error_text_),
194
  1,
195
  0,
196
};
197
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
198
  { 0, 7, sizeof(::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse)},
199
  { 9, 26, sizeof(::brpc::policy::RpcMeta)},
200
  { 38, 51, sizeof(::brpc::policy::RpcRequestMeta)},
201
  { 59, 66, sizeof(::brpc::policy::RpcResponseMeta)},
202
};
203
204
static ::google::protobuf::Message const * const file_default_instances[] = {
205
  reinterpret_cast<const ::google::protobuf::Message*>(&::brpc::policy::_RpcMeta_UserFieldsEntry_DoNotUse_default_instance_),
206
  reinterpret_cast<const ::google::protobuf::Message*>(&::brpc::policy::_RpcMeta_default_instance_),
207
  reinterpret_cast<const ::google::protobuf::Message*>(&::brpc::policy::_RpcRequestMeta_default_instance_),
208
  reinterpret_cast<const ::google::protobuf::Message*>(&::brpc::policy::_RpcResponseMeta_default_instance_),
209
};
210
211
0
void protobuf_AssignDescriptors() {
212
0
  AddDescriptors();
213
0
  AssignDescriptors(
214
0
      "brpc/policy/baidu_rpc_meta.proto", schemas, file_default_instances, TableStruct::offsets,
215
0
      file_level_metadata, NULL, NULL);
216
0
}
217
218
0
void protobuf_AssignDescriptorsOnce() {
219
0
  static ::google::protobuf::internal::once_flag once;
220
0
  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
221
0
}
222
223
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
224
0
void protobuf_RegisterTypes(const ::std::string&) {
225
0
  protobuf_AssignDescriptorsOnce();
226
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
227
0
}
228
229
12
void AddDescriptorsImpl() {
230
12
  InitDefaults();
231
12
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
232
12
      "\n brpc/policy/baidu_rpc_meta.proto\022\013brpc"
233
12
      ".policy\032\022brpc/options.proto\032\035brpc/stream"
234
12
      "ing_rpc_meta.proto\"\346\003\n\007RpcMeta\022,\n\007reques"
235
12
      "t\030\001 \001(\0132\033.brpc.policy.RpcRequestMeta\022.\n\010"
236
12
      "response\030\002 \001(\0132\034.brpc.policy.RpcResponse"
237
12
      "Meta\022\025\n\rcompress_type\030\003 \001(\005\022\026\n\016correlati"
238
12
      "on_id\030\004 \001(\003\022\027\n\017attachment_size\030\005 \001(\005\022#\n\n"
239
12
      "chunk_info\030\006 \001(\0132\017.brpc.ChunkInfo\022\033\n\023aut"
240
12
      "hentication_data\030\007 \001(\014\022-\n\017stream_setting"
241
12
      "s\030\010 \001(\0132\024.brpc.StreamSettings\0229\n\013user_fi"
242
12
      "elds\030\t \003(\0132$.brpc.policy.RpcMeta.UserFie"
243
12
      "ldsEntry\022\'\n\014content_type\030\n \001(\0162\021.brpc.Co"
244
12
      "ntentType\022\025\n\rchecksum_type\030\013 \001(\005\022\026\n\016chec"
245
12
      "ksum_value\030\014 \001(\014\0321\n\017UserFieldsEntry\022\013\n\003k"
246
12
      "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\256\001\n\016RpcReque"
247
12
      "stMeta\022\024\n\014service_name\030\001 \002(\t\022\023\n\013method_n"
248
12
      "ame\030\002 \002(\t\022\016\n\006log_id\030\003 \001(\003\022\020\n\010trace_id\030\004 "
249
12
      "\001(\003\022\017\n\007span_id\030\005 \001(\003\022\026\n\016parent_span_id\030\006"
250
12
      " \001(\003\022\022\n\nrequest_id\030\007 \001(\t\022\022\n\ntimeout_ms\030\010"
251
12
      " \001(\005\"9\n\017RpcResponseMeta\022\022\n\nerror_code\030\001 "
252
12
      "\001(\005\022\022\n\nerror_text\030\002 \001(\tB \n\017com.brpc.poli"
253
12
      "cyB\rBaiduRpcProto"
254
12
  };
255
12
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
256
12
      descriptor, 857);
257
12
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
258
12
    "brpc/policy/baidu_rpc_meta.proto", &protobuf_RegisterTypes);
259
12
  ::protobuf_brpc_2foptions_2eproto::AddDescriptors();
260
12
  ::protobuf_brpc_2fstreaming_5frpc_5fmeta_2eproto::AddDescriptors();
261
12
}
262
263
12
void AddDescriptors() {
264
12
  static ::google::protobuf::internal::once_flag once;
265
12
  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
266
12
}
267
// Force AddDescriptors() to be called at dynamic initialization time.
268
struct StaticDescriptorInitializer {
269
12
  StaticDescriptorInitializer() {
270
12
    AddDescriptors();
271
12
  }
272
} static_descriptor_initializer;
273
}  // namespace protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto
274
namespace brpc {
275
namespace policy {
276
277
// ===================================================================
278
279
12
RpcMeta_UserFieldsEntry_DoNotUse::RpcMeta_UserFieldsEntry_DoNotUse() {}
280
0
RpcMeta_UserFieldsEntry_DoNotUse::RpcMeta_UserFieldsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
281
0
void RpcMeta_UserFieldsEntry_DoNotUse::MergeFrom(const RpcMeta_UserFieldsEntry_DoNotUse& other) {
282
0
  MergeFromInternal(other);
283
0
}
284
0
::google::protobuf::Metadata RpcMeta_UserFieldsEntry_DoNotUse::GetMetadata() const {
285
0
  ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::protobuf_AssignDescriptorsOnce();
286
0
  return ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::file_level_metadata[0];
287
0
}
288
void RpcMeta_UserFieldsEntry_DoNotUse::MergeFrom(
289
0
    const ::google::protobuf::Message& other) {
290
0
  ::google::protobuf::Message::MergeFrom(other);
291
0
}
292
293
294
// ===================================================================
295
296
12
void RpcMeta::InitAsDefaultInstance() {
297
12
  ::brpc::policy::_RpcMeta_default_instance_._instance.get_mutable()->request_ = const_cast< ::brpc::policy::RpcRequestMeta*>(
298
12
      ::brpc::policy::RpcRequestMeta::internal_default_instance());
299
12
  ::brpc::policy::_RpcMeta_default_instance_._instance.get_mutable()->response_ = const_cast< ::brpc::policy::RpcResponseMeta*>(
300
12
      ::brpc::policy::RpcResponseMeta::internal_default_instance());
301
12
  ::brpc::policy::_RpcMeta_default_instance_._instance.get_mutable()->chunk_info_ = const_cast< ::brpc::ChunkInfo*>(
302
12
      ::brpc::ChunkInfo::internal_default_instance());
303
12
  ::brpc::policy::_RpcMeta_default_instance_._instance.get_mutable()->stream_settings_ = const_cast< ::brpc::StreamSettings*>(
304
12
      ::brpc::StreamSettings::internal_default_instance());
305
12
}
306
0
void RpcMeta::clear_chunk_info() {
307
0
  if (chunk_info_ != NULL) chunk_info_->Clear();
308
0
  clear_has_chunk_info();
309
0
}
310
0
void RpcMeta::clear_stream_settings() {
311
0
  if (stream_settings_ != NULL) stream_settings_->Clear();
312
0
  clear_has_stream_settings();
313
0
}
314
#if !defined(_MSC_VER) || _MSC_VER >= 1900
315
const int RpcMeta::kRequestFieldNumber;
316
const int RpcMeta::kResponseFieldNumber;
317
const int RpcMeta::kCompressTypeFieldNumber;
318
const int RpcMeta::kCorrelationIdFieldNumber;
319
const int RpcMeta::kAttachmentSizeFieldNumber;
320
const int RpcMeta::kChunkInfoFieldNumber;
321
const int RpcMeta::kAuthenticationDataFieldNumber;
322
const int RpcMeta::kStreamSettingsFieldNumber;
323
const int RpcMeta::kUserFieldsFieldNumber;
324
const int RpcMeta::kContentTypeFieldNumber;
325
const int RpcMeta::kChecksumTypeFieldNumber;
326
const int RpcMeta::kChecksumValueFieldNumber;
327
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
328
329
RpcMeta::RpcMeta()
330
12
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
331
12
  ::google::protobuf::internal::InitSCC(
332
12
      &protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcMeta.base);
333
12
  SharedCtor();
334
  // @@protoc_insertion_point(constructor:brpc.policy.RpcMeta)
335
12
}
336
RpcMeta::RpcMeta(const RpcMeta& from)
337
0
  : ::google::protobuf::Message(),
338
0
      _internal_metadata_(NULL),
339
0
      _has_bits_(from._has_bits_) {
340
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
341
0
  user_fields_.MergeFrom(from.user_fields_);
342
0
  authentication_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
343
0
  if (from.has_authentication_data()) {
344
0
    authentication_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.authentication_data_);
345
0
  }
346
0
  checksum_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
347
0
  if (from.has_checksum_value()) {
348
0
    checksum_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.checksum_value_);
349
0
  }
350
0
  if (from.has_request()) {
351
0
    request_ = new ::brpc::policy::RpcRequestMeta(*from.request_);
352
0
  } else {
353
0
    request_ = NULL;
354
0
  }
355
0
  if (from.has_response()) {
356
0
    response_ = new ::brpc::policy::RpcResponseMeta(*from.response_);
357
0
  } else {
358
0
    response_ = NULL;
359
0
  }
360
0
  if (from.has_chunk_info()) {
361
0
    chunk_info_ = new ::brpc::ChunkInfo(*from.chunk_info_);
362
0
  } else {
363
0
    chunk_info_ = NULL;
364
0
  }
365
0
  if (from.has_stream_settings()) {
366
0
    stream_settings_ = new ::brpc::StreamSettings(*from.stream_settings_);
367
0
  } else {
368
0
    stream_settings_ = NULL;
369
0
  }
370
0
  ::memcpy(&correlation_id_, &from.correlation_id_,
371
0
    static_cast<size_t>(reinterpret_cast<char*>(&checksum_type_) -
372
0
    reinterpret_cast<char*>(&correlation_id_)) + sizeof(checksum_type_));
373
  // @@protoc_insertion_point(copy_constructor:brpc.policy.RpcMeta)
374
0
}
375
376
12
void RpcMeta::SharedCtor() {
377
12
  authentication_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
378
12
  checksum_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
379
12
  ::memset(&request_, 0, static_cast<size_t>(
380
12
      reinterpret_cast<char*>(&checksum_type_) -
381
12
      reinterpret_cast<char*>(&request_)) + sizeof(checksum_type_));
382
12
}
383
384
0
RpcMeta::~RpcMeta() {
385
  // @@protoc_insertion_point(destructor:brpc.policy.RpcMeta)
386
0
  SharedDtor();
387
0
}
388
389
0
void RpcMeta::SharedDtor() {
390
0
  authentication_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
391
0
  checksum_value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
392
0
  if (this != internal_default_instance()) delete request_;
393
0
  if (this != internal_default_instance()) delete response_;
394
0
  if (this != internal_default_instance()) delete chunk_info_;
395
0
  if (this != internal_default_instance()) delete stream_settings_;
396
0
}
397
398
0
void RpcMeta::SetCachedSize(int size) const {
399
0
  _cached_size_.Set(size);
400
0
}
401
0
const ::google::protobuf::Descriptor* RpcMeta::descriptor() {
402
0
  ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::protobuf_AssignDescriptorsOnce();
403
0
  return ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
404
0
}
405
406
0
const RpcMeta& RpcMeta::default_instance() {
407
0
  ::google::protobuf::internal::InitSCC(&protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcMeta.base);
408
0
  return *internal_default_instance();
409
0
}
410
411
412
0
void RpcMeta::Clear() {
413
// @@protoc_insertion_point(message_clear_start:brpc.policy.RpcMeta)
414
0
  ::google::protobuf::uint32 cached_has_bits = 0;
415
  // Prevent compiler warnings about cached_has_bits being unused
416
0
  (void) cached_has_bits;
417
418
0
  user_fields_.Clear();
419
0
  cached_has_bits = _has_bits_[0];
420
0
  if (cached_has_bits & 63u) {
421
0
    if (cached_has_bits & 0x00000001u) {
422
0
      authentication_data_.ClearNonDefaultToEmptyNoArena();
423
0
    }
424
0
    if (cached_has_bits & 0x00000002u) {
425
0
      checksum_value_.ClearNonDefaultToEmptyNoArena();
426
0
    }
427
0
    if (cached_has_bits & 0x00000004u) {
428
0
      GOOGLE_DCHECK(request_ != NULL);
429
0
      request_->Clear();
430
0
    }
431
0
    if (cached_has_bits & 0x00000008u) {
432
0
      GOOGLE_DCHECK(response_ != NULL);
433
0
      response_->Clear();
434
0
    }
435
0
    if (cached_has_bits & 0x00000010u) {
436
0
      GOOGLE_DCHECK(chunk_info_ != NULL);
437
0
      chunk_info_->Clear();
438
0
    }
439
0
    if (cached_has_bits & 0x00000020u) {
440
0
      GOOGLE_DCHECK(stream_settings_ != NULL);
441
0
      stream_settings_->Clear();
442
0
    }
443
0
  }
444
0
  if (cached_has_bits & 192u) {
445
0
    ::memset(&correlation_id_, 0, static_cast<size_t>(
446
0
        reinterpret_cast<char*>(&compress_type_) -
447
0
        reinterpret_cast<char*>(&correlation_id_)) + sizeof(compress_type_));
448
0
  }
449
0
  if (cached_has_bits & 1792u) {
450
0
    ::memset(&attachment_size_, 0, static_cast<size_t>(
451
0
        reinterpret_cast<char*>(&checksum_type_) -
452
0
        reinterpret_cast<char*>(&attachment_size_)) + sizeof(checksum_type_));
453
0
  }
454
0
  _has_bits_.Clear();
455
0
  _internal_metadata_.Clear();
456
0
}
457
458
bool RpcMeta::MergePartialFromCodedStream(
459
0
    ::google::protobuf::io::CodedInputStream* input) {
460
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
461
0
  ::google::protobuf::uint32 tag;
462
  // @@protoc_insertion_point(parse_start:brpc.policy.RpcMeta)
463
0
  for (;;) {
464
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
465
0
    tag = p.first;
466
0
    if (!p.second) goto handle_unusual;
467
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
468
      // optional .brpc.policy.RpcRequestMeta request = 1;
469
0
      case 1: {
470
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
471
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
472
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
473
0
               input, mutable_request()));
474
0
        } else {
475
0
          goto handle_unusual;
476
0
        }
477
0
        break;
478
0
      }
479
480
      // optional .brpc.policy.RpcResponseMeta response = 2;
481
0
      case 2: {
482
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
483
0
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
484
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
485
0
               input, mutable_response()));
486
0
        } else {
487
0
          goto handle_unusual;
488
0
        }
489
0
        break;
490
0
      }
491
492
      // optional int32 compress_type = 3;
493
0
      case 3: {
494
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
495
0
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
496
0
          set_has_compress_type();
497
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
498
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
499
0
                 input, &compress_type_)));
500
0
        } else {
501
0
          goto handle_unusual;
502
0
        }
503
0
        break;
504
0
      }
505
506
      // optional int64 correlation_id = 4;
507
0
      case 4: {
508
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
509
0
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
510
0
          set_has_correlation_id();
511
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
512
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
513
0
                 input, &correlation_id_)));
514
0
        } else {
515
0
          goto handle_unusual;
516
0
        }
517
0
        break;
518
0
      }
519
520
      // optional int32 attachment_size = 5;
521
0
      case 5: {
522
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
523
0
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
524
0
          set_has_attachment_size();
525
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
526
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
527
0
                 input, &attachment_size_)));
528
0
        } else {
529
0
          goto handle_unusual;
530
0
        }
531
0
        break;
532
0
      }
533
534
      // optional .brpc.ChunkInfo chunk_info = 6;
535
0
      case 6: {
536
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
537
0
            static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
538
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
539
0
               input, mutable_chunk_info()));
540
0
        } else {
541
0
          goto handle_unusual;
542
0
        }
543
0
        break;
544
0
      }
545
546
      // optional bytes authentication_data = 7;
547
0
      case 7: {
548
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
549
0
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
550
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
551
0
                input, this->mutable_authentication_data()));
552
0
        } else {
553
0
          goto handle_unusual;
554
0
        }
555
0
        break;
556
0
      }
557
558
      // optional .brpc.StreamSettings stream_settings = 8;
559
0
      case 8: {
560
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
561
0
            static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
562
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
563
0
               input, mutable_stream_settings()));
564
0
        } else {
565
0
          goto handle_unusual;
566
0
        }
567
0
        break;
568
0
      }
569
570
      // map<string, string> user_fields = 9;
571
0
      case 9: {
572
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
573
0
            static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
574
0
          RpcMeta_UserFieldsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
575
0
              RpcMeta_UserFieldsEntry_DoNotUse,
576
0
              ::std::string, ::std::string,
577
0
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
578
0
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
579
0
              0 >,
580
0
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&user_fields_);
581
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
582
0
              input, &parser));
583
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
584
0
            parser.key().data(), static_cast<int>(parser.key().length()),
585
0
            ::google::protobuf::internal::WireFormat::PARSE,
586
0
            "brpc.policy.RpcMeta.UserFieldsEntry.key");
587
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
588
0
            parser.value().data(), static_cast<int>(parser.value().length()),
589
0
            ::google::protobuf::internal::WireFormat::PARSE,
590
0
            "brpc.policy.RpcMeta.UserFieldsEntry.value");
591
0
        } else {
592
0
          goto handle_unusual;
593
0
        }
594
0
        break;
595
0
      }
596
597
      // optional .brpc.ContentType content_type = 10;
598
0
      case 10: {
599
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
600
0
            static_cast< ::google::protobuf::uint8>(80u /* 80 & 0xFF */)) {
601
0
          int value;
602
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
603
0
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
604
0
                 input, &value)));
605
0
          if (::brpc::ContentType_IsValid(value)) {
606
0
            set_content_type(static_cast< ::brpc::ContentType >(value));
607
0
          } else {
608
0
            mutable_unknown_fields()->AddVarint(
609
0
                10, static_cast< ::google::protobuf::uint64>(value));
610
0
          }
611
0
        } else {
612
0
          goto handle_unusual;
613
0
        }
614
0
        break;
615
0
      }
616
617
      // optional int32 checksum_type = 11;
618
0
      case 11: {
619
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
620
0
            static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
621
0
          set_has_checksum_type();
622
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
623
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
624
0
                 input, &checksum_type_)));
625
0
        } else {
626
0
          goto handle_unusual;
627
0
        }
628
0
        break;
629
0
      }
630
631
      // optional bytes checksum_value = 12;
632
0
      case 12: {
633
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
634
0
            static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
635
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
636
0
                input, this->mutable_checksum_value()));
637
0
        } else {
638
0
          goto handle_unusual;
639
0
        }
640
0
        break;
641
0
      }
642
643
0
      default: {
644
0
      handle_unusual:
645
0
        if (tag == 0) {
646
0
          goto success;
647
0
        }
648
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
649
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
650
0
        break;
651
0
      }
652
0
    }
653
0
  }
654
0
success:
655
  // @@protoc_insertion_point(parse_success:brpc.policy.RpcMeta)
656
0
  return true;
657
0
failure:
658
  // @@protoc_insertion_point(parse_failure:brpc.policy.RpcMeta)
659
0
  return false;
660
0
#undef DO_
661
0
}
662
663
void RpcMeta::SerializeWithCachedSizes(
664
0
    ::google::protobuf::io::CodedOutputStream* output) const {
665
  // @@protoc_insertion_point(serialize_start:brpc.policy.RpcMeta)
666
0
  ::google::protobuf::uint32 cached_has_bits = 0;
667
0
  (void) cached_has_bits;
668
669
0
  cached_has_bits = _has_bits_[0];
670
  // optional .brpc.policy.RpcRequestMeta request = 1;
671
0
  if (cached_has_bits & 0x00000004u) {
672
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
673
0
      1, this->_internal_request(), output);
674
0
  }
675
676
  // optional .brpc.policy.RpcResponseMeta response = 2;
677
0
  if (cached_has_bits & 0x00000008u) {
678
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
679
0
      2, this->_internal_response(), output);
680
0
  }
681
682
  // optional int32 compress_type = 3;
683
0
  if (cached_has_bits & 0x00000080u) {
684
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->compress_type(), output);
685
0
  }
686
687
  // optional int64 correlation_id = 4;
688
0
  if (cached_has_bits & 0x00000040u) {
689
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->correlation_id(), output);
690
0
  }
691
692
  // optional int32 attachment_size = 5;
693
0
  if (cached_has_bits & 0x00000100u) {
694
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->attachment_size(), output);
695
0
  }
696
697
  // optional .brpc.ChunkInfo chunk_info = 6;
698
0
  if (cached_has_bits & 0x00000010u) {
699
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
700
0
      6, this->_internal_chunk_info(), output);
701
0
  }
702
703
  // optional bytes authentication_data = 7;
704
0
  if (cached_has_bits & 0x00000001u) {
705
0
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
706
0
      7, this->authentication_data(), output);
707
0
  }
708
709
  // optional .brpc.StreamSettings stream_settings = 8;
710
0
  if (cached_has_bits & 0x00000020u) {
711
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
712
0
      8, this->_internal_stream_settings(), output);
713
0
  }
714
715
  // map<string, string> user_fields = 9;
716
0
  if (!this->user_fields().empty()) {
717
0
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
718
0
        ConstPtr;
719
0
    typedef ConstPtr SortItem;
720
0
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
721
0
    struct Utf8Check {
722
0
      static void Check(ConstPtr p) {
723
0
        ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
724
0
          p->first.data(), static_cast<int>(p->first.length()),
725
0
          ::google::protobuf::internal::WireFormat::SERIALIZE,
726
0
          "brpc.policy.RpcMeta.UserFieldsEntry.key");
727
0
        ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
728
0
          p->second.data(), static_cast<int>(p->second.length()),
729
0
          ::google::protobuf::internal::WireFormat::SERIALIZE,
730
0
          "brpc.policy.RpcMeta.UserFieldsEntry.value");
731
0
      }
732
0
    };
733
734
0
    if (output->IsSerializationDeterministic() &&
735
0
        this->user_fields().size() > 1) {
736
0
      ::std::unique_ptr<SortItem[]> items(
737
0
          new SortItem[this->user_fields().size()]);
738
0
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
739
0
      size_type n = 0;
740
0
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
741
0
          it = this->user_fields().begin();
742
0
          it != this->user_fields().end(); ++it, ++n) {
743
0
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
744
0
      }
745
0
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
746
0
      ::std::unique_ptr<RpcMeta_UserFieldsEntry_DoNotUse> entry;
747
0
      for (size_type i = 0; i < n; i++) {
748
0
        entry.reset(user_fields_.NewEntryWrapper(
749
0
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
750
0
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
751
0
            9, *entry, output);
752
0
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
753
0
      }
754
0
    } else {
755
0
      ::std::unique_ptr<RpcMeta_UserFieldsEntry_DoNotUse> entry;
756
0
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
757
0
          it = this->user_fields().begin();
758
0
          it != this->user_fields().end(); ++it) {
759
0
        entry.reset(user_fields_.NewEntryWrapper(
760
0
            it->first, it->second));
761
0
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
762
0
            9, *entry, output);
763
0
        Utf8Check::Check(&*it);
764
0
      }
765
0
    }
766
0
  }
767
768
  // optional .brpc.ContentType content_type = 10;
769
0
  if (cached_has_bits & 0x00000200u) {
770
0
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
771
0
      10, this->content_type(), output);
772
0
  }
773
774
  // optional int32 checksum_type = 11;
775
0
  if (cached_has_bits & 0x00000400u) {
776
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(11, this->checksum_type(), output);
777
0
  }
778
779
  // optional bytes checksum_value = 12;
780
0
  if (cached_has_bits & 0x00000002u) {
781
0
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
782
0
      12, this->checksum_value(), output);
783
0
  }
784
785
0
  if (_internal_metadata_.have_unknown_fields()) {
786
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
787
0
        _internal_metadata_.unknown_fields(), output);
788
0
  }
789
  // @@protoc_insertion_point(serialize_end:brpc.policy.RpcMeta)
790
0
}
791
792
::google::protobuf::uint8* RpcMeta::InternalSerializeWithCachedSizesToArray(
793
0
    bool deterministic, ::google::protobuf::uint8* target) const {
794
0
  (void)deterministic; // Unused
795
  // @@protoc_insertion_point(serialize_to_array_start:brpc.policy.RpcMeta)
796
0
  ::google::protobuf::uint32 cached_has_bits = 0;
797
0
  (void) cached_has_bits;
798
799
0
  cached_has_bits = _has_bits_[0];
800
  // optional .brpc.policy.RpcRequestMeta request = 1;
801
0
  if (cached_has_bits & 0x00000004u) {
802
0
    target = ::google::protobuf::internal::WireFormatLite::
803
0
      InternalWriteMessageToArray(
804
0
        1, this->_internal_request(), deterministic, target);
805
0
  }
806
807
  // optional .brpc.policy.RpcResponseMeta response = 2;
808
0
  if (cached_has_bits & 0x00000008u) {
809
0
    target = ::google::protobuf::internal::WireFormatLite::
810
0
      InternalWriteMessageToArray(
811
0
        2, this->_internal_response(), deterministic, target);
812
0
  }
813
814
  // optional int32 compress_type = 3;
815
0
  if (cached_has_bits & 0x00000080u) {
816
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->compress_type(), target);
817
0
  }
818
819
  // optional int64 correlation_id = 4;
820
0
  if (cached_has_bits & 0x00000040u) {
821
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->correlation_id(), target);
822
0
  }
823
824
  // optional int32 attachment_size = 5;
825
0
  if (cached_has_bits & 0x00000100u) {
826
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->attachment_size(), target);
827
0
  }
828
829
  // optional .brpc.ChunkInfo chunk_info = 6;
830
0
  if (cached_has_bits & 0x00000010u) {
831
0
    target = ::google::protobuf::internal::WireFormatLite::
832
0
      InternalWriteMessageToArray(
833
0
        6, this->_internal_chunk_info(), deterministic, target);
834
0
  }
835
836
  // optional bytes authentication_data = 7;
837
0
  if (cached_has_bits & 0x00000001u) {
838
0
    target =
839
0
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
840
0
        7, this->authentication_data(), target);
841
0
  }
842
843
  // optional .brpc.StreamSettings stream_settings = 8;
844
0
  if (cached_has_bits & 0x00000020u) {
845
0
    target = ::google::protobuf::internal::WireFormatLite::
846
0
      InternalWriteMessageToArray(
847
0
        8, this->_internal_stream_settings(), deterministic, target);
848
0
  }
849
850
  // map<string, string> user_fields = 9;
851
0
  if (!this->user_fields().empty()) {
852
0
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
853
0
        ConstPtr;
854
0
    typedef ConstPtr SortItem;
855
0
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
856
0
    struct Utf8Check {
857
0
      static void Check(ConstPtr p) {
858
0
        ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
859
0
          p->first.data(), static_cast<int>(p->first.length()),
860
0
          ::google::protobuf::internal::WireFormat::SERIALIZE,
861
0
          "brpc.policy.RpcMeta.UserFieldsEntry.key");
862
0
        ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
863
0
          p->second.data(), static_cast<int>(p->second.length()),
864
0
          ::google::protobuf::internal::WireFormat::SERIALIZE,
865
0
          "brpc.policy.RpcMeta.UserFieldsEntry.value");
866
0
      }
867
0
    };
868
869
0
    if (deterministic &&
870
0
        this->user_fields().size() > 1) {
871
0
      ::std::unique_ptr<SortItem[]> items(
872
0
          new SortItem[this->user_fields().size()]);
873
0
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
874
0
      size_type n = 0;
875
0
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
876
0
          it = this->user_fields().begin();
877
0
          it != this->user_fields().end(); ++it, ++n) {
878
0
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
879
0
      }
880
0
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
881
0
      ::std::unique_ptr<RpcMeta_UserFieldsEntry_DoNotUse> entry;
882
0
      for (size_type i = 0; i < n; i++) {
883
0
        entry.reset(user_fields_.NewEntryWrapper(
884
0
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
885
0
        target = ::google::protobuf::internal::WireFormatLite::
886
0
                   InternalWriteMessageNoVirtualToArray(
887
0
                       9, *entry, deterministic, target);
888
0
;
889
0
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
890
0
      }
891
0
    } else {
892
0
      ::std::unique_ptr<RpcMeta_UserFieldsEntry_DoNotUse> entry;
893
0
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
894
0
          it = this->user_fields().begin();
895
0
          it != this->user_fields().end(); ++it) {
896
0
        entry.reset(user_fields_.NewEntryWrapper(
897
0
            it->first, it->second));
898
0
        target = ::google::protobuf::internal::WireFormatLite::
899
0
                   InternalWriteMessageNoVirtualToArray(
900
0
                       9, *entry, deterministic, target);
901
0
;
902
0
        Utf8Check::Check(&*it);
903
0
      }
904
0
    }
905
0
  }
906
907
  // optional .brpc.ContentType content_type = 10;
908
0
  if (cached_has_bits & 0x00000200u) {
909
0
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
910
0
      10, this->content_type(), target);
911
0
  }
912
913
  // optional int32 checksum_type = 11;
914
0
  if (cached_has_bits & 0x00000400u) {
915
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(11, this->checksum_type(), target);
916
0
  }
917
918
  // optional bytes checksum_value = 12;
919
0
  if (cached_has_bits & 0x00000002u) {
920
0
    target =
921
0
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
922
0
        12, this->checksum_value(), target);
923
0
  }
924
925
0
  if (_internal_metadata_.have_unknown_fields()) {
926
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
927
0
        _internal_metadata_.unknown_fields(), target);
928
0
  }
929
  // @@protoc_insertion_point(serialize_to_array_end:brpc.policy.RpcMeta)
930
0
  return target;
931
0
}
932
933
0
size_t RpcMeta::ByteSizeLong() const {
934
// @@protoc_insertion_point(message_byte_size_start:brpc.policy.RpcMeta)
935
0
  size_t total_size = 0;
936
937
0
  if (_internal_metadata_.have_unknown_fields()) {
938
0
    total_size +=
939
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
940
0
        _internal_metadata_.unknown_fields());
941
0
  }
942
  // map<string, string> user_fields = 9;
943
0
  total_size += 1 *
944
0
      ::google::protobuf::internal::FromIntSize(this->user_fields_size());
945
0
  {
946
0
    ::std::unique_ptr<RpcMeta_UserFieldsEntry_DoNotUse> entry;
947
0
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
948
0
        it = this->user_fields().begin();
949
0
        it != this->user_fields().end(); ++it) {
950
0
      entry.reset(user_fields_.NewEntryWrapper(it->first, it->second));
951
0
      total_size += ::google::protobuf::internal::WireFormatLite::
952
0
          MessageSizeNoVirtual(*entry);
953
0
    }
954
0
  }
955
956
0
  if (_has_bits_[0 / 32] & 255u) {
957
    // optional bytes authentication_data = 7;
958
0
    if (has_authentication_data()) {
959
0
      total_size += 1 +
960
0
        ::google::protobuf::internal::WireFormatLite::BytesSize(
961
0
          this->authentication_data());
962
0
    }
963
964
    // optional bytes checksum_value = 12;
965
0
    if (has_checksum_value()) {
966
0
      total_size += 1 +
967
0
        ::google::protobuf::internal::WireFormatLite::BytesSize(
968
0
          this->checksum_value());
969
0
    }
970
971
    // optional .brpc.policy.RpcRequestMeta request = 1;
972
0
    if (has_request()) {
973
0
      total_size += 1 +
974
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
975
0
          *request_);
976
0
    }
977
978
    // optional .brpc.policy.RpcResponseMeta response = 2;
979
0
    if (has_response()) {
980
0
      total_size += 1 +
981
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
982
0
          *response_);
983
0
    }
984
985
    // optional .brpc.ChunkInfo chunk_info = 6;
986
0
    if (has_chunk_info()) {
987
0
      total_size += 1 +
988
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
989
0
          *chunk_info_);
990
0
    }
991
992
    // optional .brpc.StreamSettings stream_settings = 8;
993
0
    if (has_stream_settings()) {
994
0
      total_size += 1 +
995
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
996
0
          *stream_settings_);
997
0
    }
998
999
    // optional int64 correlation_id = 4;
1000
0
    if (has_correlation_id()) {
1001
0
      total_size += 1 +
1002
0
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1003
0
          this->correlation_id());
1004
0
    }
1005
1006
    // optional int32 compress_type = 3;
1007
0
    if (has_compress_type()) {
1008
0
      total_size += 1 +
1009
0
        ::google::protobuf::internal::WireFormatLite::Int32Size(
1010
0
          this->compress_type());
1011
0
    }
1012
1013
0
  }
1014
0
  if (_has_bits_[8 / 32] & 1792u) {
1015
    // optional int32 attachment_size = 5;
1016
0
    if (has_attachment_size()) {
1017
0
      total_size += 1 +
1018
0
        ::google::protobuf::internal::WireFormatLite::Int32Size(
1019
0
          this->attachment_size());
1020
0
    }
1021
1022
    // optional .brpc.ContentType content_type = 10;
1023
0
    if (has_content_type()) {
1024
0
      total_size += 1 +
1025
0
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->content_type());
1026
0
    }
1027
1028
    // optional int32 checksum_type = 11;
1029
0
    if (has_checksum_type()) {
1030
0
      total_size += 1 +
1031
0
        ::google::protobuf::internal::WireFormatLite::Int32Size(
1032
0
          this->checksum_type());
1033
0
    }
1034
1035
0
  }
1036
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1037
0
  SetCachedSize(cached_size);
1038
0
  return total_size;
1039
0
}
1040
1041
0
void RpcMeta::MergeFrom(const ::google::protobuf::Message& from) {
1042
// @@protoc_insertion_point(generalized_merge_from_start:brpc.policy.RpcMeta)
1043
0
  GOOGLE_DCHECK_NE(&from, this);
1044
0
  const RpcMeta* source =
1045
0
      ::google::protobuf::internal::DynamicCastToGenerated<const RpcMeta>(
1046
0
          &from);
1047
0
  if (source == NULL) {
1048
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:brpc.policy.RpcMeta)
1049
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1050
0
  } else {
1051
  // @@protoc_insertion_point(generalized_merge_from_cast_success:brpc.policy.RpcMeta)
1052
0
    MergeFrom(*source);
1053
0
  }
1054
0
}
1055
1056
0
void RpcMeta::MergeFrom(const RpcMeta& from) {
1057
// @@protoc_insertion_point(class_specific_merge_from_start:brpc.policy.RpcMeta)
1058
0
  GOOGLE_DCHECK_NE(&from, this);
1059
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1060
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1061
0
  (void) cached_has_bits;
1062
1063
0
  user_fields_.MergeFrom(from.user_fields_);
1064
0
  cached_has_bits = from._has_bits_[0];
1065
0
  if (cached_has_bits & 255u) {
1066
0
    if (cached_has_bits & 0x00000001u) {
1067
0
      set_has_authentication_data();
1068
0
      authentication_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.authentication_data_);
1069
0
    }
1070
0
    if (cached_has_bits & 0x00000002u) {
1071
0
      set_has_checksum_value();
1072
0
      checksum_value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.checksum_value_);
1073
0
    }
1074
0
    if (cached_has_bits & 0x00000004u) {
1075
0
      mutable_request()->::brpc::policy::RpcRequestMeta::MergeFrom(from.request());
1076
0
    }
1077
0
    if (cached_has_bits & 0x00000008u) {
1078
0
      mutable_response()->::brpc::policy::RpcResponseMeta::MergeFrom(from.response());
1079
0
    }
1080
0
    if (cached_has_bits & 0x00000010u) {
1081
0
      mutable_chunk_info()->::brpc::ChunkInfo::MergeFrom(from.chunk_info());
1082
0
    }
1083
0
    if (cached_has_bits & 0x00000020u) {
1084
0
      mutable_stream_settings()->::brpc::StreamSettings::MergeFrom(from.stream_settings());
1085
0
    }
1086
0
    if (cached_has_bits & 0x00000040u) {
1087
0
      correlation_id_ = from.correlation_id_;
1088
0
    }
1089
0
    if (cached_has_bits & 0x00000080u) {
1090
0
      compress_type_ = from.compress_type_;
1091
0
    }
1092
0
    _has_bits_[0] |= cached_has_bits;
1093
0
  }
1094
0
  if (cached_has_bits & 1792u) {
1095
0
    if (cached_has_bits & 0x00000100u) {
1096
0
      attachment_size_ = from.attachment_size_;
1097
0
    }
1098
0
    if (cached_has_bits & 0x00000200u) {
1099
0
      content_type_ = from.content_type_;
1100
0
    }
1101
0
    if (cached_has_bits & 0x00000400u) {
1102
0
      checksum_type_ = from.checksum_type_;
1103
0
    }
1104
0
    _has_bits_[0] |= cached_has_bits;
1105
0
  }
1106
0
}
1107
1108
0
void RpcMeta::CopyFrom(const ::google::protobuf::Message& from) {
1109
// @@protoc_insertion_point(generalized_copy_from_start:brpc.policy.RpcMeta)
1110
0
  if (&from == this) return;
1111
0
  Clear();
1112
0
  MergeFrom(from);
1113
0
}
1114
1115
0
void RpcMeta::CopyFrom(const RpcMeta& from) {
1116
// @@protoc_insertion_point(class_specific_copy_from_start:brpc.policy.RpcMeta)
1117
0
  if (&from == this) return;
1118
0
  Clear();
1119
0
  MergeFrom(from);
1120
0
}
1121
1122
0
bool RpcMeta::IsInitialized() const {
1123
0
  if (has_request()) {
1124
0
    if (!this->request_->IsInitialized()) return false;
1125
0
  }
1126
0
  if (has_chunk_info()) {
1127
0
    if (!this->chunk_info_->IsInitialized()) return false;
1128
0
  }
1129
0
  if (has_stream_settings()) {
1130
0
    if (!this->stream_settings_->IsInitialized()) return false;
1131
0
  }
1132
0
  return true;
1133
0
}
1134
1135
0
void RpcMeta::Swap(RpcMeta* other) {
1136
0
  if (other == this) return;
1137
0
  InternalSwap(other);
1138
0
}
1139
0
void RpcMeta::InternalSwap(RpcMeta* other) {
1140
0
  using std::swap;
1141
0
  user_fields_.Swap(&other->user_fields_);
1142
0
  authentication_data_.Swap(&other->authentication_data_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1143
0
    GetArenaNoVirtual());
1144
0
  checksum_value_.Swap(&other->checksum_value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1145
0
    GetArenaNoVirtual());
1146
0
  swap(request_, other->request_);
1147
0
  swap(response_, other->response_);
1148
0
  swap(chunk_info_, other->chunk_info_);
1149
0
  swap(stream_settings_, other->stream_settings_);
1150
0
  swap(correlation_id_, other->correlation_id_);
1151
0
  swap(compress_type_, other->compress_type_);
1152
0
  swap(attachment_size_, other->attachment_size_);
1153
0
  swap(content_type_, other->content_type_);
1154
0
  swap(checksum_type_, other->checksum_type_);
1155
0
  swap(_has_bits_[0], other->_has_bits_[0]);
1156
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
1157
0
}
1158
1159
0
::google::protobuf::Metadata RpcMeta::GetMetadata() const {
1160
0
  protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::protobuf_AssignDescriptorsOnce();
1161
0
  return ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::file_level_metadata[kIndexInFileMessages];
1162
0
}
1163
1164
1165
// ===================================================================
1166
1167
12
void RpcRequestMeta::InitAsDefaultInstance() {
1168
12
}
1169
#if !defined(_MSC_VER) || _MSC_VER >= 1900
1170
const int RpcRequestMeta::kServiceNameFieldNumber;
1171
const int RpcRequestMeta::kMethodNameFieldNumber;
1172
const int RpcRequestMeta::kLogIdFieldNumber;
1173
const int RpcRequestMeta::kTraceIdFieldNumber;
1174
const int RpcRequestMeta::kSpanIdFieldNumber;
1175
const int RpcRequestMeta::kParentSpanIdFieldNumber;
1176
const int RpcRequestMeta::kRequestIdFieldNumber;
1177
const int RpcRequestMeta::kTimeoutMsFieldNumber;
1178
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
1179
1180
RpcRequestMeta::RpcRequestMeta()
1181
12
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
1182
12
  ::google::protobuf::internal::InitSCC(
1183
12
      &protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcRequestMeta.base);
1184
12
  SharedCtor();
1185
  // @@protoc_insertion_point(constructor:brpc.policy.RpcRequestMeta)
1186
12
}
1187
RpcRequestMeta::RpcRequestMeta(const RpcRequestMeta& from)
1188
0
  : ::google::protobuf::Message(),
1189
0
      _internal_metadata_(NULL),
1190
0
      _has_bits_(from._has_bits_) {
1191
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1192
0
  service_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1193
0
  if (from.has_service_name()) {
1194
0
    service_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.service_name_);
1195
0
  }
1196
0
  method_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1197
0
  if (from.has_method_name()) {
1198
0
    method_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.method_name_);
1199
0
  }
1200
0
  request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1201
0
  if (from.has_request_id()) {
1202
0
    request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_);
1203
0
  }
1204
0
  ::memcpy(&log_id_, &from.log_id_,
1205
0
    static_cast<size_t>(reinterpret_cast<char*>(&timeout_ms_) -
1206
0
    reinterpret_cast<char*>(&log_id_)) + sizeof(timeout_ms_));
1207
  // @@protoc_insertion_point(copy_constructor:brpc.policy.RpcRequestMeta)
1208
0
}
1209
1210
12
void RpcRequestMeta::SharedCtor() {
1211
12
  service_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1212
12
  method_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1213
12
  request_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1214
12
  ::memset(&log_id_, 0, static_cast<size_t>(
1215
12
      reinterpret_cast<char*>(&timeout_ms_) -
1216
12
      reinterpret_cast<char*>(&log_id_)) + sizeof(timeout_ms_));
1217
12
}
1218
1219
0
RpcRequestMeta::~RpcRequestMeta() {
1220
  // @@protoc_insertion_point(destructor:brpc.policy.RpcRequestMeta)
1221
0
  SharedDtor();
1222
0
}
1223
1224
0
void RpcRequestMeta::SharedDtor() {
1225
0
  service_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1226
0
  method_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1227
0
  request_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1228
0
}
1229
1230
0
void RpcRequestMeta::SetCachedSize(int size) const {
1231
0
  _cached_size_.Set(size);
1232
0
}
1233
0
const ::google::protobuf::Descriptor* RpcRequestMeta::descriptor() {
1234
0
  ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::protobuf_AssignDescriptorsOnce();
1235
0
  return ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1236
0
}
1237
1238
0
const RpcRequestMeta& RpcRequestMeta::default_instance() {
1239
0
  ::google::protobuf::internal::InitSCC(&protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcRequestMeta.base);
1240
0
  return *internal_default_instance();
1241
0
}
1242
1243
1244
0
void RpcRequestMeta::Clear() {
1245
// @@protoc_insertion_point(message_clear_start:brpc.policy.RpcRequestMeta)
1246
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1247
  // Prevent compiler warnings about cached_has_bits being unused
1248
0
  (void) cached_has_bits;
1249
1250
0
  cached_has_bits = _has_bits_[0];
1251
0
  if (cached_has_bits & 7u) {
1252
0
    if (cached_has_bits & 0x00000001u) {
1253
0
      service_name_.ClearNonDefaultToEmptyNoArena();
1254
0
    }
1255
0
    if (cached_has_bits & 0x00000002u) {
1256
0
      method_name_.ClearNonDefaultToEmptyNoArena();
1257
0
    }
1258
0
    if (cached_has_bits & 0x00000004u) {
1259
0
      request_id_.ClearNonDefaultToEmptyNoArena();
1260
0
    }
1261
0
  }
1262
0
  if (cached_has_bits & 248u) {
1263
0
    ::memset(&log_id_, 0, static_cast<size_t>(
1264
0
        reinterpret_cast<char*>(&timeout_ms_) -
1265
0
        reinterpret_cast<char*>(&log_id_)) + sizeof(timeout_ms_));
1266
0
  }
1267
0
  _has_bits_.Clear();
1268
0
  _internal_metadata_.Clear();
1269
0
}
1270
1271
bool RpcRequestMeta::MergePartialFromCodedStream(
1272
0
    ::google::protobuf::io::CodedInputStream* input) {
1273
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1274
0
  ::google::protobuf::uint32 tag;
1275
  // @@protoc_insertion_point(parse_start:brpc.policy.RpcRequestMeta)
1276
0
  for (;;) {
1277
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1278
0
    tag = p.first;
1279
0
    if (!p.second) goto handle_unusual;
1280
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1281
      // required string service_name = 1;
1282
0
      case 1: {
1283
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1284
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
1285
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1286
0
                input, this->mutable_service_name()));
1287
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1288
0
            this->service_name().data(), static_cast<int>(this->service_name().length()),
1289
0
            ::google::protobuf::internal::WireFormat::PARSE,
1290
0
            "brpc.policy.RpcRequestMeta.service_name");
1291
0
        } else {
1292
0
          goto handle_unusual;
1293
0
        }
1294
0
        break;
1295
0
      }
1296
1297
      // required string method_name = 2;
1298
0
      case 2: {
1299
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1300
0
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
1301
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1302
0
                input, this->mutable_method_name()));
1303
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1304
0
            this->method_name().data(), static_cast<int>(this->method_name().length()),
1305
0
            ::google::protobuf::internal::WireFormat::PARSE,
1306
0
            "brpc.policy.RpcRequestMeta.method_name");
1307
0
        } else {
1308
0
          goto handle_unusual;
1309
0
        }
1310
0
        break;
1311
0
      }
1312
1313
      // optional int64 log_id = 3;
1314
0
      case 3: {
1315
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1316
0
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
1317
0
          set_has_log_id();
1318
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1319
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1320
0
                 input, &log_id_)));
1321
0
        } else {
1322
0
          goto handle_unusual;
1323
0
        }
1324
0
        break;
1325
0
      }
1326
1327
      // optional int64 trace_id = 4;
1328
0
      case 4: {
1329
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1330
0
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
1331
0
          set_has_trace_id();
1332
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1333
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1334
0
                 input, &trace_id_)));
1335
0
        } else {
1336
0
          goto handle_unusual;
1337
0
        }
1338
0
        break;
1339
0
      }
1340
1341
      // optional int64 span_id = 5;
1342
0
      case 5: {
1343
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1344
0
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
1345
0
          set_has_span_id();
1346
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1347
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1348
0
                 input, &span_id_)));
1349
0
        } else {
1350
0
          goto handle_unusual;
1351
0
        }
1352
0
        break;
1353
0
      }
1354
1355
      // optional int64 parent_span_id = 6;
1356
0
      case 6: {
1357
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1358
0
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
1359
0
          set_has_parent_span_id();
1360
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1361
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1362
0
                 input, &parent_span_id_)));
1363
0
        } else {
1364
0
          goto handle_unusual;
1365
0
        }
1366
0
        break;
1367
0
      }
1368
1369
      // optional string request_id = 7;
1370
0
      case 7: {
1371
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1372
0
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
1373
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1374
0
                input, this->mutable_request_id()));
1375
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1376
0
            this->request_id().data(), static_cast<int>(this->request_id().length()),
1377
0
            ::google::protobuf::internal::WireFormat::PARSE,
1378
0
            "brpc.policy.RpcRequestMeta.request_id");
1379
0
        } else {
1380
0
          goto handle_unusual;
1381
0
        }
1382
0
        break;
1383
0
      }
1384
1385
      // optional int32 timeout_ms = 8;
1386
0
      case 8: {
1387
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1388
0
            static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
1389
0
          set_has_timeout_ms();
1390
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1391
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1392
0
                 input, &timeout_ms_)));
1393
0
        } else {
1394
0
          goto handle_unusual;
1395
0
        }
1396
0
        break;
1397
0
      }
1398
1399
0
      default: {
1400
0
      handle_unusual:
1401
0
        if (tag == 0) {
1402
0
          goto success;
1403
0
        }
1404
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
1405
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
1406
0
        break;
1407
0
      }
1408
0
    }
1409
0
  }
1410
0
success:
1411
  // @@protoc_insertion_point(parse_success:brpc.policy.RpcRequestMeta)
1412
0
  return true;
1413
0
failure:
1414
  // @@protoc_insertion_point(parse_failure:brpc.policy.RpcRequestMeta)
1415
0
  return false;
1416
0
#undef DO_
1417
0
}
1418
1419
void RpcRequestMeta::SerializeWithCachedSizes(
1420
0
    ::google::protobuf::io::CodedOutputStream* output) const {
1421
  // @@protoc_insertion_point(serialize_start:brpc.policy.RpcRequestMeta)
1422
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1423
0
  (void) cached_has_bits;
1424
1425
0
  cached_has_bits = _has_bits_[0];
1426
  // required string service_name = 1;
1427
0
  if (cached_has_bits & 0x00000001u) {
1428
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1429
0
      this->service_name().data(), static_cast<int>(this->service_name().length()),
1430
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1431
0
      "brpc.policy.RpcRequestMeta.service_name");
1432
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1433
0
      1, this->service_name(), output);
1434
0
  }
1435
1436
  // required string method_name = 2;
1437
0
  if (cached_has_bits & 0x00000002u) {
1438
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1439
0
      this->method_name().data(), static_cast<int>(this->method_name().length()),
1440
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1441
0
      "brpc.policy.RpcRequestMeta.method_name");
1442
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1443
0
      2, this->method_name(), output);
1444
0
  }
1445
1446
  // optional int64 log_id = 3;
1447
0
  if (cached_has_bits & 0x00000008u) {
1448
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->log_id(), output);
1449
0
  }
1450
1451
  // optional int64 trace_id = 4;
1452
0
  if (cached_has_bits & 0x00000010u) {
1453
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->trace_id(), output);
1454
0
  }
1455
1456
  // optional int64 span_id = 5;
1457
0
  if (cached_has_bits & 0x00000020u) {
1458
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->span_id(), output);
1459
0
  }
1460
1461
  // optional int64 parent_span_id = 6;
1462
0
  if (cached_has_bits & 0x00000040u) {
1463
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->parent_span_id(), output);
1464
0
  }
1465
1466
  // optional string request_id = 7;
1467
0
  if (cached_has_bits & 0x00000004u) {
1468
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1469
0
      this->request_id().data(), static_cast<int>(this->request_id().length()),
1470
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1471
0
      "brpc.policy.RpcRequestMeta.request_id");
1472
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1473
0
      7, this->request_id(), output);
1474
0
  }
1475
1476
  // optional int32 timeout_ms = 8;
1477
0
  if (cached_has_bits & 0x00000080u) {
1478
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->timeout_ms(), output);
1479
0
  }
1480
1481
0
  if (_internal_metadata_.have_unknown_fields()) {
1482
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1483
0
        _internal_metadata_.unknown_fields(), output);
1484
0
  }
1485
  // @@protoc_insertion_point(serialize_end:brpc.policy.RpcRequestMeta)
1486
0
}
1487
1488
::google::protobuf::uint8* RpcRequestMeta::InternalSerializeWithCachedSizesToArray(
1489
0
    bool deterministic, ::google::protobuf::uint8* target) const {
1490
0
  (void)deterministic; // Unused
1491
  // @@protoc_insertion_point(serialize_to_array_start:brpc.policy.RpcRequestMeta)
1492
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1493
0
  (void) cached_has_bits;
1494
1495
0
  cached_has_bits = _has_bits_[0];
1496
  // required string service_name = 1;
1497
0
  if (cached_has_bits & 0x00000001u) {
1498
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1499
0
      this->service_name().data(), static_cast<int>(this->service_name().length()),
1500
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1501
0
      "brpc.policy.RpcRequestMeta.service_name");
1502
0
    target =
1503
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1504
0
        1, this->service_name(), target);
1505
0
  }
1506
1507
  // required string method_name = 2;
1508
0
  if (cached_has_bits & 0x00000002u) {
1509
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1510
0
      this->method_name().data(), static_cast<int>(this->method_name().length()),
1511
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1512
0
      "brpc.policy.RpcRequestMeta.method_name");
1513
0
    target =
1514
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1515
0
        2, this->method_name(), target);
1516
0
  }
1517
1518
  // optional int64 log_id = 3;
1519
0
  if (cached_has_bits & 0x00000008u) {
1520
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->log_id(), target);
1521
0
  }
1522
1523
  // optional int64 trace_id = 4;
1524
0
  if (cached_has_bits & 0x00000010u) {
1525
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->trace_id(), target);
1526
0
  }
1527
1528
  // optional int64 span_id = 5;
1529
0
  if (cached_has_bits & 0x00000020u) {
1530
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->span_id(), target);
1531
0
  }
1532
1533
  // optional int64 parent_span_id = 6;
1534
0
  if (cached_has_bits & 0x00000040u) {
1535
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->parent_span_id(), target);
1536
0
  }
1537
1538
  // optional string request_id = 7;
1539
0
  if (cached_has_bits & 0x00000004u) {
1540
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1541
0
      this->request_id().data(), static_cast<int>(this->request_id().length()),
1542
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1543
0
      "brpc.policy.RpcRequestMeta.request_id");
1544
0
    target =
1545
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1546
0
        7, this->request_id(), target);
1547
0
  }
1548
1549
  // optional int32 timeout_ms = 8;
1550
0
  if (cached_has_bits & 0x00000080u) {
1551
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->timeout_ms(), target);
1552
0
  }
1553
1554
0
  if (_internal_metadata_.have_unknown_fields()) {
1555
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1556
0
        _internal_metadata_.unknown_fields(), target);
1557
0
  }
1558
  // @@protoc_insertion_point(serialize_to_array_end:brpc.policy.RpcRequestMeta)
1559
0
  return target;
1560
0
}
1561
1562
0
size_t RpcRequestMeta::RequiredFieldsByteSizeFallback() const {
1563
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:brpc.policy.RpcRequestMeta)
1564
0
  size_t total_size = 0;
1565
1566
0
  if (has_service_name()) {
1567
    // required string service_name = 1;
1568
0
    total_size += 1 +
1569
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
1570
0
        this->service_name());
1571
0
  }
1572
1573
0
  if (has_method_name()) {
1574
    // required string method_name = 2;
1575
0
    total_size += 1 +
1576
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
1577
0
        this->method_name());
1578
0
  }
1579
1580
0
  return total_size;
1581
0
}
1582
0
size_t RpcRequestMeta::ByteSizeLong() const {
1583
// @@protoc_insertion_point(message_byte_size_start:brpc.policy.RpcRequestMeta)
1584
0
  size_t total_size = 0;
1585
1586
0
  if (_internal_metadata_.have_unknown_fields()) {
1587
0
    total_size +=
1588
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1589
0
        _internal_metadata_.unknown_fields());
1590
0
  }
1591
0
  if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
1592
    // required string service_name = 1;
1593
0
    total_size += 1 +
1594
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
1595
0
        this->service_name());
1596
1597
    // required string method_name = 2;
1598
0
    total_size += 1 +
1599
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
1600
0
        this->method_name());
1601
1602
0
  } else {
1603
0
    total_size += RequiredFieldsByteSizeFallback();
1604
0
  }
1605
0
  if (_has_bits_[0 / 32] & 252u) {
1606
    // optional string request_id = 7;
1607
0
    if (has_request_id()) {
1608
0
      total_size += 1 +
1609
0
        ::google::protobuf::internal::WireFormatLite::StringSize(
1610
0
          this->request_id());
1611
0
    }
1612
1613
    // optional int64 log_id = 3;
1614
0
    if (has_log_id()) {
1615
0
      total_size += 1 +
1616
0
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1617
0
          this->log_id());
1618
0
    }
1619
1620
    // optional int64 trace_id = 4;
1621
0
    if (has_trace_id()) {
1622
0
      total_size += 1 +
1623
0
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1624
0
          this->trace_id());
1625
0
    }
1626
1627
    // optional int64 span_id = 5;
1628
0
    if (has_span_id()) {
1629
0
      total_size += 1 +
1630
0
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1631
0
          this->span_id());
1632
0
    }
1633
1634
    // optional int64 parent_span_id = 6;
1635
0
    if (has_parent_span_id()) {
1636
0
      total_size += 1 +
1637
0
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1638
0
          this->parent_span_id());
1639
0
    }
1640
1641
    // optional int32 timeout_ms = 8;
1642
0
    if (has_timeout_ms()) {
1643
0
      total_size += 1 +
1644
0
        ::google::protobuf::internal::WireFormatLite::Int32Size(
1645
0
          this->timeout_ms());
1646
0
    }
1647
1648
0
  }
1649
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1650
0
  SetCachedSize(cached_size);
1651
0
  return total_size;
1652
0
}
1653
1654
0
void RpcRequestMeta::MergeFrom(const ::google::protobuf::Message& from) {
1655
// @@protoc_insertion_point(generalized_merge_from_start:brpc.policy.RpcRequestMeta)
1656
0
  GOOGLE_DCHECK_NE(&from, this);
1657
0
  const RpcRequestMeta* source =
1658
0
      ::google::protobuf::internal::DynamicCastToGenerated<const RpcRequestMeta>(
1659
0
          &from);
1660
0
  if (source == NULL) {
1661
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:brpc.policy.RpcRequestMeta)
1662
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1663
0
  } else {
1664
  // @@protoc_insertion_point(generalized_merge_from_cast_success:brpc.policy.RpcRequestMeta)
1665
0
    MergeFrom(*source);
1666
0
  }
1667
0
}
1668
1669
0
void RpcRequestMeta::MergeFrom(const RpcRequestMeta& from) {
1670
// @@protoc_insertion_point(class_specific_merge_from_start:brpc.policy.RpcRequestMeta)
1671
0
  GOOGLE_DCHECK_NE(&from, this);
1672
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1673
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1674
0
  (void) cached_has_bits;
1675
1676
0
  cached_has_bits = from._has_bits_[0];
1677
0
  if (cached_has_bits & 255u) {
1678
0
    if (cached_has_bits & 0x00000001u) {
1679
0
      set_has_service_name();
1680
0
      service_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.service_name_);
1681
0
    }
1682
0
    if (cached_has_bits & 0x00000002u) {
1683
0
      set_has_method_name();
1684
0
      method_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.method_name_);
1685
0
    }
1686
0
    if (cached_has_bits & 0x00000004u) {
1687
0
      set_has_request_id();
1688
0
      request_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_id_);
1689
0
    }
1690
0
    if (cached_has_bits & 0x00000008u) {
1691
0
      log_id_ = from.log_id_;
1692
0
    }
1693
0
    if (cached_has_bits & 0x00000010u) {
1694
0
      trace_id_ = from.trace_id_;
1695
0
    }
1696
0
    if (cached_has_bits & 0x00000020u) {
1697
0
      span_id_ = from.span_id_;
1698
0
    }
1699
0
    if (cached_has_bits & 0x00000040u) {
1700
0
      parent_span_id_ = from.parent_span_id_;
1701
0
    }
1702
0
    if (cached_has_bits & 0x00000080u) {
1703
0
      timeout_ms_ = from.timeout_ms_;
1704
0
    }
1705
0
    _has_bits_[0] |= cached_has_bits;
1706
0
  }
1707
0
}
1708
1709
0
void RpcRequestMeta::CopyFrom(const ::google::protobuf::Message& from) {
1710
// @@protoc_insertion_point(generalized_copy_from_start:brpc.policy.RpcRequestMeta)
1711
0
  if (&from == this) return;
1712
0
  Clear();
1713
0
  MergeFrom(from);
1714
0
}
1715
1716
0
void RpcRequestMeta::CopyFrom(const RpcRequestMeta& from) {
1717
// @@protoc_insertion_point(class_specific_copy_from_start:brpc.policy.RpcRequestMeta)
1718
0
  if (&from == this) return;
1719
0
  Clear();
1720
0
  MergeFrom(from);
1721
0
}
1722
1723
0
bool RpcRequestMeta::IsInitialized() const {
1724
0
  if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
1725
0
  return true;
1726
0
}
1727
1728
0
void RpcRequestMeta::Swap(RpcRequestMeta* other) {
1729
0
  if (other == this) return;
1730
0
  InternalSwap(other);
1731
0
}
1732
0
void RpcRequestMeta::InternalSwap(RpcRequestMeta* other) {
1733
0
  using std::swap;
1734
0
  service_name_.Swap(&other->service_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1735
0
    GetArenaNoVirtual());
1736
0
  method_name_.Swap(&other->method_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1737
0
    GetArenaNoVirtual());
1738
0
  request_id_.Swap(&other->request_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
1739
0
    GetArenaNoVirtual());
1740
0
  swap(log_id_, other->log_id_);
1741
0
  swap(trace_id_, other->trace_id_);
1742
0
  swap(span_id_, other->span_id_);
1743
0
  swap(parent_span_id_, other->parent_span_id_);
1744
0
  swap(timeout_ms_, other->timeout_ms_);
1745
0
  swap(_has_bits_[0], other->_has_bits_[0]);
1746
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
1747
0
}
1748
1749
0
::google::protobuf::Metadata RpcRequestMeta::GetMetadata() const {
1750
0
  protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::protobuf_AssignDescriptorsOnce();
1751
0
  return ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::file_level_metadata[kIndexInFileMessages];
1752
0
}
1753
1754
1755
// ===================================================================
1756
1757
12
void RpcResponseMeta::InitAsDefaultInstance() {
1758
12
}
1759
#if !defined(_MSC_VER) || _MSC_VER >= 1900
1760
const int RpcResponseMeta::kErrorCodeFieldNumber;
1761
const int RpcResponseMeta::kErrorTextFieldNumber;
1762
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
1763
1764
RpcResponseMeta::RpcResponseMeta()
1765
12
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
1766
12
  ::google::protobuf::internal::InitSCC(
1767
12
      &protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcResponseMeta.base);
1768
12
  SharedCtor();
1769
  // @@protoc_insertion_point(constructor:brpc.policy.RpcResponseMeta)
1770
12
}
1771
RpcResponseMeta::RpcResponseMeta(const RpcResponseMeta& from)
1772
0
  : ::google::protobuf::Message(),
1773
0
      _internal_metadata_(NULL),
1774
0
      _has_bits_(from._has_bits_) {
1775
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1776
0
  error_text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1777
0
  if (from.has_error_text()) {
1778
0
    error_text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_text_);
1779
0
  }
1780
0
  error_code_ = from.error_code_;
1781
  // @@protoc_insertion_point(copy_constructor:brpc.policy.RpcResponseMeta)
1782
0
}
1783
1784
12
void RpcResponseMeta::SharedCtor() {
1785
12
  error_text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1786
12
  error_code_ = 0;
1787
12
}
1788
1789
0
RpcResponseMeta::~RpcResponseMeta() {
1790
  // @@protoc_insertion_point(destructor:brpc.policy.RpcResponseMeta)
1791
0
  SharedDtor();
1792
0
}
1793
1794
0
void RpcResponseMeta::SharedDtor() {
1795
0
  error_text_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1796
0
}
1797
1798
0
void RpcResponseMeta::SetCachedSize(int size) const {
1799
0
  _cached_size_.Set(size);
1800
0
}
1801
0
const ::google::protobuf::Descriptor* RpcResponseMeta::descriptor() {
1802
0
  ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::protobuf_AssignDescriptorsOnce();
1803
0
  return ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1804
0
}
1805
1806
0
const RpcResponseMeta& RpcResponseMeta::default_instance() {
1807
0
  ::google::protobuf::internal::InitSCC(&protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::scc_info_RpcResponseMeta.base);
1808
0
  return *internal_default_instance();
1809
0
}
1810
1811
1812
0
void RpcResponseMeta::Clear() {
1813
// @@protoc_insertion_point(message_clear_start:brpc.policy.RpcResponseMeta)
1814
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1815
  // Prevent compiler warnings about cached_has_bits being unused
1816
0
  (void) cached_has_bits;
1817
1818
0
  cached_has_bits = _has_bits_[0];
1819
0
  if (cached_has_bits & 0x00000001u) {
1820
0
    error_text_.ClearNonDefaultToEmptyNoArena();
1821
0
  }
1822
0
  error_code_ = 0;
1823
0
  _has_bits_.Clear();
1824
0
  _internal_metadata_.Clear();
1825
0
}
1826
1827
bool RpcResponseMeta::MergePartialFromCodedStream(
1828
0
    ::google::protobuf::io::CodedInputStream* input) {
1829
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1830
0
  ::google::protobuf::uint32 tag;
1831
  // @@protoc_insertion_point(parse_start:brpc.policy.RpcResponseMeta)
1832
0
  for (;;) {
1833
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1834
0
    tag = p.first;
1835
0
    if (!p.second) goto handle_unusual;
1836
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1837
      // optional int32 error_code = 1;
1838
0
      case 1: {
1839
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1840
0
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
1841
0
          set_has_error_code();
1842
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1843
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1844
0
                 input, &error_code_)));
1845
0
        } else {
1846
0
          goto handle_unusual;
1847
0
        }
1848
0
        break;
1849
0
      }
1850
1851
      // optional string error_text = 2;
1852
0
      case 2: {
1853
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1854
0
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
1855
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1856
0
                input, this->mutable_error_text()));
1857
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1858
0
            this->error_text().data(), static_cast<int>(this->error_text().length()),
1859
0
            ::google::protobuf::internal::WireFormat::PARSE,
1860
0
            "brpc.policy.RpcResponseMeta.error_text");
1861
0
        } else {
1862
0
          goto handle_unusual;
1863
0
        }
1864
0
        break;
1865
0
      }
1866
1867
0
      default: {
1868
0
      handle_unusual:
1869
0
        if (tag == 0) {
1870
0
          goto success;
1871
0
        }
1872
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
1873
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
1874
0
        break;
1875
0
      }
1876
0
    }
1877
0
  }
1878
0
success:
1879
  // @@protoc_insertion_point(parse_success:brpc.policy.RpcResponseMeta)
1880
0
  return true;
1881
0
failure:
1882
  // @@protoc_insertion_point(parse_failure:brpc.policy.RpcResponseMeta)
1883
0
  return false;
1884
0
#undef DO_
1885
0
}
1886
1887
void RpcResponseMeta::SerializeWithCachedSizes(
1888
0
    ::google::protobuf::io::CodedOutputStream* output) const {
1889
  // @@protoc_insertion_point(serialize_start:brpc.policy.RpcResponseMeta)
1890
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1891
0
  (void) cached_has_bits;
1892
1893
0
  cached_has_bits = _has_bits_[0];
1894
  // optional int32 error_code = 1;
1895
0
  if (cached_has_bits & 0x00000002u) {
1896
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->error_code(), output);
1897
0
  }
1898
1899
  // optional string error_text = 2;
1900
0
  if (cached_has_bits & 0x00000001u) {
1901
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1902
0
      this->error_text().data(), static_cast<int>(this->error_text().length()),
1903
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1904
0
      "brpc.policy.RpcResponseMeta.error_text");
1905
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1906
0
      2, this->error_text(), output);
1907
0
  }
1908
1909
0
  if (_internal_metadata_.have_unknown_fields()) {
1910
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1911
0
        _internal_metadata_.unknown_fields(), output);
1912
0
  }
1913
  // @@protoc_insertion_point(serialize_end:brpc.policy.RpcResponseMeta)
1914
0
}
1915
1916
::google::protobuf::uint8* RpcResponseMeta::InternalSerializeWithCachedSizesToArray(
1917
0
    bool deterministic, ::google::protobuf::uint8* target) const {
1918
0
  (void)deterministic; // Unused
1919
  // @@protoc_insertion_point(serialize_to_array_start:brpc.policy.RpcResponseMeta)
1920
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1921
0
  (void) cached_has_bits;
1922
1923
0
  cached_has_bits = _has_bits_[0];
1924
  // optional int32 error_code = 1;
1925
0
  if (cached_has_bits & 0x00000002u) {
1926
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->error_code(), target);
1927
0
  }
1928
1929
  // optional string error_text = 2;
1930
0
  if (cached_has_bits & 0x00000001u) {
1931
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1932
0
      this->error_text().data(), static_cast<int>(this->error_text().length()),
1933
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1934
0
      "brpc.policy.RpcResponseMeta.error_text");
1935
0
    target =
1936
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1937
0
        2, this->error_text(), target);
1938
0
  }
1939
1940
0
  if (_internal_metadata_.have_unknown_fields()) {
1941
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1942
0
        _internal_metadata_.unknown_fields(), target);
1943
0
  }
1944
  // @@protoc_insertion_point(serialize_to_array_end:brpc.policy.RpcResponseMeta)
1945
0
  return target;
1946
0
}
1947
1948
0
size_t RpcResponseMeta::ByteSizeLong() const {
1949
// @@protoc_insertion_point(message_byte_size_start:brpc.policy.RpcResponseMeta)
1950
0
  size_t total_size = 0;
1951
1952
0
  if (_internal_metadata_.have_unknown_fields()) {
1953
0
    total_size +=
1954
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1955
0
        _internal_metadata_.unknown_fields());
1956
0
  }
1957
0
  if (_has_bits_[0 / 32] & 3u) {
1958
    // optional string error_text = 2;
1959
0
    if (has_error_text()) {
1960
0
      total_size += 1 +
1961
0
        ::google::protobuf::internal::WireFormatLite::StringSize(
1962
0
          this->error_text());
1963
0
    }
1964
1965
    // optional int32 error_code = 1;
1966
0
    if (has_error_code()) {
1967
0
      total_size += 1 +
1968
0
        ::google::protobuf::internal::WireFormatLite::Int32Size(
1969
0
          this->error_code());
1970
0
    }
1971
1972
0
  }
1973
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1974
0
  SetCachedSize(cached_size);
1975
0
  return total_size;
1976
0
}
1977
1978
0
void RpcResponseMeta::MergeFrom(const ::google::protobuf::Message& from) {
1979
// @@protoc_insertion_point(generalized_merge_from_start:brpc.policy.RpcResponseMeta)
1980
0
  GOOGLE_DCHECK_NE(&from, this);
1981
0
  const RpcResponseMeta* source =
1982
0
      ::google::protobuf::internal::DynamicCastToGenerated<const RpcResponseMeta>(
1983
0
          &from);
1984
0
  if (source == NULL) {
1985
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:brpc.policy.RpcResponseMeta)
1986
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1987
0
  } else {
1988
  // @@protoc_insertion_point(generalized_merge_from_cast_success:brpc.policy.RpcResponseMeta)
1989
0
    MergeFrom(*source);
1990
0
  }
1991
0
}
1992
1993
0
void RpcResponseMeta::MergeFrom(const RpcResponseMeta& from) {
1994
// @@protoc_insertion_point(class_specific_merge_from_start:brpc.policy.RpcResponseMeta)
1995
0
  GOOGLE_DCHECK_NE(&from, this);
1996
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1997
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1998
0
  (void) cached_has_bits;
1999
2000
0
  cached_has_bits = from._has_bits_[0];
2001
0
  if (cached_has_bits & 3u) {
2002
0
    if (cached_has_bits & 0x00000001u) {
2003
0
      set_has_error_text();
2004
0
      error_text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_text_);
2005
0
    }
2006
0
    if (cached_has_bits & 0x00000002u) {
2007
0
      error_code_ = from.error_code_;
2008
0
    }
2009
0
    _has_bits_[0] |= cached_has_bits;
2010
0
  }
2011
0
}
2012
2013
0
void RpcResponseMeta::CopyFrom(const ::google::protobuf::Message& from) {
2014
// @@protoc_insertion_point(generalized_copy_from_start:brpc.policy.RpcResponseMeta)
2015
0
  if (&from == this) return;
2016
0
  Clear();
2017
0
  MergeFrom(from);
2018
0
}
2019
2020
0
void RpcResponseMeta::CopyFrom(const RpcResponseMeta& from) {
2021
// @@protoc_insertion_point(class_specific_copy_from_start:brpc.policy.RpcResponseMeta)
2022
0
  if (&from == this) return;
2023
0
  Clear();
2024
0
  MergeFrom(from);
2025
0
}
2026
2027
0
bool RpcResponseMeta::IsInitialized() const {
2028
0
  return true;
2029
0
}
2030
2031
0
void RpcResponseMeta::Swap(RpcResponseMeta* other) {
2032
0
  if (other == this) return;
2033
0
  InternalSwap(other);
2034
0
}
2035
0
void RpcResponseMeta::InternalSwap(RpcResponseMeta* other) {
2036
0
  using std::swap;
2037
0
  error_text_.Swap(&other->error_text_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
2038
0
    GetArenaNoVirtual());
2039
0
  swap(error_code_, other->error_code_);
2040
0
  swap(_has_bits_[0], other->_has_bits_[0]);
2041
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
2042
0
}
2043
2044
0
::google::protobuf::Metadata RpcResponseMeta::GetMetadata() const {
2045
0
  protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::protobuf_AssignDescriptorsOnce();
2046
0
  return ::protobuf_brpc_2fpolicy_2fbaidu_5frpc_5fmeta_2eproto::file_level_metadata[kIndexInFileMessages];
2047
0
}
2048
2049
2050
// @@protoc_insertion_point(namespace_scope)
2051
}  // namespace policy
2052
}  // namespace brpc
2053
namespace google {
2054
namespace protobuf {
2055
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse* Arena::CreateMaybeMessage< ::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse >(Arena* arena) {
2056
0
  return Arena::CreateInternal< ::brpc::policy::RpcMeta_UserFieldsEntry_DoNotUse >(arena);
2057
0
}
2058
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::brpc::policy::RpcMeta* Arena::CreateMaybeMessage< ::brpc::policy::RpcMeta >(Arena* arena) {
2059
0
  return Arena::CreateInternal< ::brpc::policy::RpcMeta >(arena);
2060
0
}
2061
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::brpc::policy::RpcRequestMeta* Arena::CreateMaybeMessage< ::brpc::policy::RpcRequestMeta >(Arena* arena) {
2062
0
  return Arena::CreateInternal< ::brpc::policy::RpcRequestMeta >(arena);
2063
0
}
2064
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::brpc::policy::RpcResponseMeta* Arena::CreateMaybeMessage< ::brpc::policy::RpcResponseMeta >(Arena* arena) {
2065
0
  return Arena::CreateInternal< ::brpc::policy::RpcResponseMeta >(arena);
2066
0
}
2067
}  // namespace protobuf
2068
}  // namespace google
2069
2070
// @@protoc_insertion_point(global_scope)