YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/rpc/rtest.messages.cc
Line
Count
Source (jump to first uncovered line)
1
// THIS FILE IS AUTOGENERATED FROM yb/rpc/rtest.proto
2
3
#include "yb/rpc/rtest.messages.h"
4
5
#include "yb/gutil/strings/numbers.h"
6
7
namespace yb {
8
namespace rpc_test {
9
10
0
LWAddRequestPB::LWAddRequestPB(::yb::Arena* arena) {
11
0
}
12
13
LWAddRequestPB::LWAddRequestPB(::yb::Arena* arena, const LWAddRequestPB& rhs)
14
    : has_fields_(rhs.has_fields_),
15
      x_(rhs.x_),
16
0
      y_(rhs.y_) {
17
0
}
18
19
0
void LWAddRequestPB::AppendToDebugString(std::string* out) const {
20
0
  bool first = true;if (has_x()) {
21
0
    ::yb::rpc::AppendFieldTitle("x", ": ", &first, out);
22
0
    *out += std::to_string(x());
23
0
  }
24
0
  if (has_y()) {
25
0
    ::yb::rpc::AppendFieldTitle("y", ": ", &first, out);
26
0
    *out += std::to_string(y());
27
0
  }
28
0
}
29
30
0
void LWAddRequestPB::Clear() {
31
0
  clear_x();
32
0
  clear_y();
33
0
}
34
35
0
void LWAddRequestPB::CopyFrom(const LWAddRequestPB& rhs) {
36
0
  if (rhs.has_x()) {
37
0
    x_ = rhs.x_;
38
0
  } else {
39
0
    clear_x();
40
0
  }
41
0
  if (rhs.has_y()) {
42
0
    y_ = rhs.y_;
43
0
  } else {
44
0
    clear_y();
45
0
  }
46
0
  has_fields_ = rhs.has_fields_;
47
0
}
48
49
0
void LWAddRequestPB::CopyFrom(const AddRequestPB& rhs) {
50
0
  if (rhs.has_x()) {
51
0
    x_ = rhs.x();
52
0
    has_fields_.Set(AddRequestPBFields::kX);
53
0
  } else {
54
0
    clear_x();
55
0
  }
56
0
  if (rhs.has_y()) {
57
0
    y_ = rhs.y();
58
0
    has_fields_.Set(AddRequestPBFields::kY);
59
0
  } else {
60
0
    clear_y();
61
0
  }
62
0
}
63
64
0
Status LWAddRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
65
0
  for (;;) {
66
0
    auto p = input->ReadTagWithCutoffNoLastTag(31);
67
0
    if (!p.second && !p.first) {
68
0
      return Status::OK();
69
0
    }
70
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
71
0
      case 1: { // x
72
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_x())) {
73
0
          return ::yb::rpc::ParseFailed("x");
74
0
        }
75
0
        break;
76
0
      }
77
0
      case 2: { // y
78
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_y())) {
79
0
          return ::yb::rpc::ParseFailed("y");
80
0
        }
81
0
        break;
82
0
      }
83
0
    }
84
0
  }
85
0
}
86
87
0
uint8_t* LWAddRequestPB::SerializeToArray(uint8_t* out) const {
88
0
  if (has_x()) {
89
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 8>(x_, out);
90
0
  }
91
0
  if (has_y()) {
92
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 16>(y_, out);
93
0
  }
94
0
  return out;
95
0
}
96
97
0
size_t LWAddRequestPB::SerializedSize() const {
98
0
  size_t result = 0;
99
0
  if (has_x()) {
100
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(x_);
101
0
  }
102
0
  if (has_y()) {
103
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(y_);
104
0
  }
105
0
  cached_size_ = result;
106
0
  return result;
107
0
}
108
109
0
void LWAddRequestPB::ToGoogleProtobuf(AddRequestPB* out) const {
110
0
  if (has_x()) {
111
0
    out->set_x(x_);
112
0
  } else {
113
0
    out->clear_x();
114
0
  }
115
0
  if (has_y()) {
116
0
    out->set_y(y_);
117
0
  } else {
118
0
    out->clear_y();
119
0
  }
120
0
}
121
122
0
LWAddRequestPartialPB::LWAddRequestPartialPB(::yb::Arena* arena) {
123
0
}
124
125
LWAddRequestPartialPB::LWAddRequestPartialPB(::yb::Arena* arena, const LWAddRequestPartialPB& rhs)
126
    : has_fields_(rhs.has_fields_),
127
0
      x_(rhs.x_) {
128
0
}
129
130
0
void LWAddRequestPartialPB::AppendToDebugString(std::string* out) const {
131
0
  bool first = true;if (has_x()) {
132
0
    ::yb::rpc::AppendFieldTitle("x", ": ", &first, out);
133
0
    *out += std::to_string(x());
134
0
  }
135
0
}
136
137
0
void LWAddRequestPartialPB::Clear() {
138
0
  clear_x();
139
0
}
140
141
0
void LWAddRequestPartialPB::CopyFrom(const LWAddRequestPartialPB& rhs) {
142
0
  if (rhs.has_x()) {
143
0
    x_ = rhs.x_;
144
0
  } else {
145
0
    clear_x();
146
0
  }
147
0
  has_fields_ = rhs.has_fields_;
148
0
}
149
150
0
void LWAddRequestPartialPB::CopyFrom(const AddRequestPartialPB& rhs) {
151
0
  if (rhs.has_x()) {
152
0
    x_ = rhs.x();
153
0
    has_fields_.Set(AddRequestPartialPBFields::kX);
154
0
  } else {
155
0
    clear_x();
156
0
  }
157
0
}
158
159
0
Status LWAddRequestPartialPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
160
0
  for (;;) {
161
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
162
0
    if (!p.second && !p.first) {
163
0
      return Status::OK();
164
0
    }
165
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
166
0
      case 1: { // x
167
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_x())) {
168
0
          return ::yb::rpc::ParseFailed("x");
169
0
        }
170
0
        break;
171
0
      }
172
0
    }
173
0
  }
174
0
}
175
176
0
uint8_t* LWAddRequestPartialPB::SerializeToArray(uint8_t* out) const {
177
0
  if (has_x()) {
178
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 8>(x_, out);
179
0
  }
180
0
  return out;
181
0
}
182
183
0
size_t LWAddRequestPartialPB::SerializedSize() const {
184
0
  size_t result = 0;
185
0
  if (has_x()) {
186
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(x_);
187
0
  }
188
0
  cached_size_ = result;
189
0
  return result;
190
0
}
191
192
0
void LWAddRequestPartialPB::ToGoogleProtobuf(AddRequestPartialPB* out) const {
193
0
  if (has_x()) {
194
0
    out->set_x(x_);
195
0
  } else {
196
0
    out->clear_x();
197
0
  }
198
0
}
199
200
0
LWAddResponsePB::LWAddResponsePB(::yb::Arena* arena) {
201
0
}
202
203
LWAddResponsePB::LWAddResponsePB(::yb::Arena* arena, const LWAddResponsePB& rhs)
204
    : has_fields_(rhs.has_fields_),
205
0
      result_(rhs.result_) {
206
0
}
207
208
0
void LWAddResponsePB::AppendToDebugString(std::string* out) const {
209
0
  bool first = true;if (has_result()) {
210
0
    ::yb::rpc::AppendFieldTitle("result", ": ", &first, out);
211
0
    *out += std::to_string(result());
212
0
  }
213
0
}
214
215
0
void LWAddResponsePB::Clear() {
216
0
  clear_result();
217
0
}
218
219
0
void LWAddResponsePB::CopyFrom(const LWAddResponsePB& rhs) {
220
0
  if (rhs.has_result()) {
221
0
    result_ = rhs.result_;
222
0
  } else {
223
0
    clear_result();
224
0
  }
225
0
  has_fields_ = rhs.has_fields_;
226
0
}
227
228
0
void LWAddResponsePB::CopyFrom(const AddResponsePB& rhs) {
229
0
  if (rhs.has_result()) {
230
0
    result_ = rhs.result();
231
0
    has_fields_.Set(AddResponsePBFields::kResult);
232
0
  } else {
233
0
    clear_result();
234
0
  }
235
0
}
236
237
0
Status LWAddResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
238
0
  for (;;) {
239
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
240
0
    if (!p.second && !p.first) {
241
0
      return Status::OK();
242
0
    }
243
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
244
0
      case 1: { // result
245
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_result())) {
246
0
          return ::yb::rpc::ParseFailed("result");
247
0
        }
248
0
        break;
249
0
      }
250
0
    }
251
0
  }
252
0
}
253
254
0
uint8_t* LWAddResponsePB::SerializeToArray(uint8_t* out) const {
255
0
  if (has_result()) {
256
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 8>(result_, out);
257
0
  }
258
0
  return out;
259
0
}
260
261
0
size_t LWAddResponsePB::SerializedSize() const {
262
0
  size_t result = 0;
263
0
  if (has_result()) {
264
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(result_);
265
0
  }
266
0
  cached_size_ = result;
267
0
  return result;
268
0
}
269
270
0
void LWAddResponsePB::ToGoogleProtobuf(AddResponsePB* out) const {
271
0
  if (has_result()) {
272
0
    out->set_result(result_);
273
0
  } else {
274
0
    out->clear_result();
275
0
  }
276
0
}
277
278
0
LWSleepRequestPB::LWSleepRequestPB(::yb::Arena* arena) {
279
0
}
280
281
LWSleepRequestPB::LWSleepRequestPB(::yb::Arena* arena, const LWSleepRequestPB& rhs)
282
    : has_fields_(rhs.has_fields_),
283
      sleep_micros_(rhs.sleep_micros_),
284
      deferred_(rhs.deferred_),
285
      return_app_error_(rhs.return_app_error_),
286
0
      client_timeout_defined_(rhs.client_timeout_defined_) {
287
0
}
288
289
0
void LWSleepRequestPB::AppendToDebugString(std::string* out) const {
290
0
  bool first = true;if (has_sleep_micros()) {
291
0
    ::yb::rpc::AppendFieldTitle("sleep_micros", ": ", &first, out);
292
0
    *out += std::to_string(sleep_micros());
293
0
  }
294
0
  if (has_deferred()) {
295
0
    ::yb::rpc::AppendFieldTitle("deferred", ": ", &first, out);
296
0
    *out += std::to_string(deferred());
297
0
  }
298
0
  if (has_return_app_error()) {
299
0
    ::yb::rpc::AppendFieldTitle("return_app_error", ": ", &first, out);
300
0
    *out += std::to_string(return_app_error());
301
0
  }
302
0
  if (has_client_timeout_defined()) {
303
0
    ::yb::rpc::AppendFieldTitle("client_timeout_defined", ": ", &first, out);
304
0
    *out += std::to_string(client_timeout_defined());
305
0
  }
306
0
}
307
308
0
void LWSleepRequestPB::Clear() {
309
0
  clear_sleep_micros();
310
0
  clear_deferred();
311
0
  clear_return_app_error();
312
0
  clear_client_timeout_defined();
313
0
}
314
315
0
void LWSleepRequestPB::CopyFrom(const LWSleepRequestPB& rhs) {
316
0
  if (rhs.has_sleep_micros()) {
317
0
    sleep_micros_ = rhs.sleep_micros_;
318
0
  } else {
319
0
    clear_sleep_micros();
320
0
  }
321
0
  if (rhs.has_deferred()) {
322
0
    deferred_ = rhs.deferred_;
323
0
  } else {
324
0
    clear_deferred();
325
0
  }
326
0
  if (rhs.has_return_app_error()) {
327
0
    return_app_error_ = rhs.return_app_error_;
328
0
  } else {
329
0
    clear_return_app_error();
330
0
  }
331
0
  if (rhs.has_client_timeout_defined()) {
332
0
    client_timeout_defined_ = rhs.client_timeout_defined_;
333
0
  } else {
334
0
    clear_client_timeout_defined();
335
0
  }
336
0
  has_fields_ = rhs.has_fields_;
337
0
}
338
339
0
void LWSleepRequestPB::CopyFrom(const SleepRequestPB& rhs) {
340
0
  if (rhs.has_sleep_micros()) {
341
0
    sleep_micros_ = rhs.sleep_micros();
342
0
    has_fields_.Set(SleepRequestPBFields::kSleepMicros);
343
0
  } else {
344
0
    clear_sleep_micros();
345
0
  }
346
0
  if (rhs.has_deferred()) {
347
0
    deferred_ = rhs.deferred();
348
0
    has_fields_.Set(SleepRequestPBFields::kDeferred);
349
0
  } else {
350
0
    clear_deferred();
351
0
  }
352
0
  if (rhs.has_return_app_error()) {
353
0
    return_app_error_ = rhs.return_app_error();
354
0
    has_fields_.Set(SleepRequestPBFields::kReturnAppError);
355
0
  } else {
356
0
    clear_return_app_error();
357
0
  }
358
0
  if (rhs.has_client_timeout_defined()) {
359
0
    client_timeout_defined_ = rhs.client_timeout_defined();
360
0
    has_fields_.Set(SleepRequestPBFields::kClientTimeoutDefined);
361
0
  } else {
362
0
    clear_client_timeout_defined();
363
0
  }
364
0
}
365
366
0
Status LWSleepRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
367
0
  for (;;) {
368
0
    auto p = input->ReadTagWithCutoffNoLastTag(63);
369
0
    if (!p.second && !p.first) {
370
0
      return Status::OK();
371
0
    }
372
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
373
0
      case 1: { // sleep_micros
374
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_sleep_micros())) {
375
0
          return ::yb::rpc::ParseFailed("sleep_micros");
376
0
        }
377
0
        break;
378
0
      }
379
0
      case 2: { // deferred
380
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BOOL, bool>::Read(input, mutable_deferred())) {
381
0
          return ::yb::rpc::ParseFailed("deferred");
382
0
        }
383
0
        break;
384
0
      }
385
0
      case 3: { // return_app_error
386
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BOOL, bool>::Read(input, mutable_return_app_error())) {
387
0
          return ::yb::rpc::ParseFailed("return_app_error");
388
0
        }
389
0
        break;
390
0
      }
391
0
      case 4: { // client_timeout_defined
392
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BOOL, bool>::Read(input, mutable_client_timeout_defined())) {
393
0
          return ::yb::rpc::ParseFailed("client_timeout_defined");
394
0
        }
395
0
        break;
396
0
      }
397
0
    }
398
0
  }
399
0
}
400
401
0
uint8_t* LWSleepRequestPB::SerializeToArray(uint8_t* out) const {
402
0
  if (has_sleep_micros()) {
403
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 8>(sleep_micros_, out);
404
0
  }
405
0
  if (has_deferred()) {
406
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BOOL, bool>, 16>(deferred_, out);
407
0
  }
408
0
  if (has_return_app_error()) {
409
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BOOL, bool>, 24>(return_app_error_, out);
410
0
  }
411
0
  if (has_client_timeout_defined()) {
412
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BOOL, bool>, 32>(client_timeout_defined_, out);
413
0
  }
414
0
  return out;
415
0
}
416
417
0
size_t LWSleepRequestPB::SerializedSize() const {
418
0
  size_t result = 0;
419
0
  if (has_sleep_micros()) {
420
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(sleep_micros_);
421
0
  }
422
0
  if (has_deferred()) {
423
0
    result += 2;
424
0
  }
425
0
  if (has_return_app_error()) {
426
0
    result += 2;
427
0
  }
428
0
  if (has_client_timeout_defined()) {
429
0
    result += 2;
430
0
  }
431
0
  cached_size_ = result;
432
0
  return result;
433
0
}
434
435
0
void LWSleepRequestPB::ToGoogleProtobuf(SleepRequestPB* out) const {
436
0
  if (has_sleep_micros()) {
437
0
    out->set_sleep_micros(sleep_micros_);
438
0
  } else {
439
0
    out->clear_sleep_micros();
440
0
  }
441
0
  if (has_deferred()) {
442
0
    out->set_deferred(deferred_);
443
0
  } else {
444
0
    out->clear_deferred();
445
0
  }
446
0
  if (has_return_app_error()) {
447
0
    out->set_return_app_error(return_app_error_);
448
0
  } else {
449
0
    out->clear_return_app_error();
450
0
  }
451
0
  if (has_client_timeout_defined()) {
452
0
    out->set_client_timeout_defined(client_timeout_defined_);
453
0
  } else {
454
0
    out->clear_client_timeout_defined();
455
0
  }
456
0
}
457
458
0
LWSleepResponsePB::LWSleepResponsePB(::yb::Arena* arena) {
459
0
}
460
461
0
LWSleepResponsePB::LWSleepResponsePB(::yb::Arena* arena, const LWSleepResponsePB& rhs) {
462
0
}
463
464
0
void LWSleepResponsePB::AppendToDebugString(std::string* out) const {
465
0
}
466
467
0
void LWSleepResponsePB::Clear() {
468
0
}
469
470
0
void LWSleepResponsePB::CopyFrom(const LWSleepResponsePB& rhs) {
471
0
}
472
473
0
void LWSleepResponsePB::CopyFrom(const SleepResponsePB& rhs) {
474
0
}
475
476
0
Status LWSleepResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
477
0
  for (;;) {
478
0
    auto p = input->ReadTagWithCutoffNoLastTag(1);
479
0
    if (!p.second && !p.first) {
480
0
      return Status::OK();
481
0
    }
482
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
483
0
    }
484
0
  }
485
0
}
486
487
0
uint8_t* LWSleepResponsePB::SerializeToArray(uint8_t* out) const {
488
0
  return out;
489
0
}
490
491
0
size_t LWSleepResponsePB::SerializedSize() const {
492
0
  size_t result = 0;
493
0
  cached_size_ = result;
494
0
  return result;
495
0
}
496
497
0
void LWSleepResponsePB::ToGoogleProtobuf(SleepResponsePB* out) const {
498
0
}
499
500
LWSendStringsRequestPB::LWSendStringsRequestPB(::yb::Arena* arena)
501
0
    : sizes_(arena) {
502
0
}
503
504
LWSendStringsRequestPB::LWSendStringsRequestPB(::yb::Arena* arena, const LWSendStringsRequestPB& rhs)
505
    : has_fields_(rhs.has_fields_),
506
      random_seed_(rhs.random_seed_),
507
0
      sizes_(rhs.sizes_.begin(), rhs.sizes_.end(), arena) {
508
0
}
509
510
0
void LWSendStringsRequestPB::AppendToDebugString(std::string* out) const {
511
0
  bool first = true;if (has_random_seed()) {
512
0
    ::yb::rpc::AppendFieldTitle("random_seed", ": ", &first, out);
513
0
    *out += std::to_string(random_seed());
514
0
  }
515
0
  for (const auto& entry : sizes_) {
516
0
    ::yb::rpc::AppendFieldTitle("sizes", ": ", &first, out);
517
0
    *out += std::to_string(entry);
518
0
  }
519
0
}
520
521
0
void LWSendStringsRequestPB::Clear() {
522
0
  clear_random_seed();
523
0
  sizes_.clear();
524
0
}
525
526
0
void LWSendStringsRequestPB::CopyFrom(const LWSendStringsRequestPB& rhs) {
527
0
  if (rhs.has_random_seed()) {
528
0
    random_seed_ = rhs.random_seed_;
529
0
  } else {
530
0
    clear_random_seed();
531
0
  }
532
0
  sizes_ = rhs.sizes_;
533
0
  has_fields_ = rhs.has_fields_;
534
0
}
535
536
0
void LWSendStringsRequestPB::CopyFrom(const SendStringsRequestPB& rhs) {
537
0
  if (rhs.has_random_seed()) {
538
0
    random_seed_ = rhs.random_seed();
539
0
    has_fields_.Set(SendStringsRequestPBFields::kRandomSeed);
540
0
  } else {
541
0
    clear_random_seed();
542
0
  }
543
0
  sizes_.assign(rhs.sizes().begin(), rhs.sizes().end());
544
0
}
545
546
0
Status LWSendStringsRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
547
0
  for (;;) {
548
0
    auto p = input->ReadTagWithCutoffNoLastTag(31);
549
0
    if (!p.second && !p.first) {
550
0
      return Status::OK();
551
0
    }
552
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
553
0
      case 1: { // random_seed
554
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_random_seed())) {
555
0
          return ::yb::rpc::ParseFailed("random_seed");
556
0
        }
557
0
        break;
558
0
      }
559
0
      case 2: { // sizes
560
0
        if (p.first == 18) {
561
0
          int length;
562
0
          if (!input->ReadVarintSizeAsInt(&length)) {
563
0
            return ::yb::rpc::ParseFailed("sizes");
564
0
          }
565
0
          auto old_limit = input->PushLimit(length);
566
0
          while (input->BytesUntilLimit() > 0) {
567
0
            sizes_.emplace_back();
568
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, &sizes_.back())) {
569
0
              return ::yb::rpc::ParseFailed("sizes");
570
0
            }
571
0
          }
572
573
0
          input->PopLimit(old_limit);
574
0
        } else {
575
0
          sizes_.emplace_back();
576
0
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, &sizes_.back())) {
577
0
            return ::yb::rpc::ParseFailed("sizes");
578
0
          }
579
0
        }
580
0
        break;
581
0
      }
582
0
    }
583
0
  }
584
0
}
585
586
0
uint8_t* LWSendStringsRequestPB::SerializeToArray(uint8_t* out) const {
587
0
  if (has_random_seed()) {
588
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 8>(random_seed_, out);
589
0
  }
590
0
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 16>(sizes_, out);
591
0
  return out;
592
0
}
593
594
0
size_t LWSendStringsRequestPB::SerializedSize() const {
595
0
  size_t result = 0;
596
0
  if (has_random_seed()) {
597
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(random_seed_);
598
0
  }
599
0
  {
600
0
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 1>(sizes_);
601
0
  }
602
0
  cached_size_ = result;
603
0
  return result;
604
0
}
605
606
0
void LWSendStringsRequestPB::ToGoogleProtobuf(SendStringsRequestPB* out) const {
607
0
  if (has_random_seed()) {
608
0
    out->set_random_seed(random_seed_);
609
0
  } else {
610
0
    out->clear_random_seed();
611
0
  }
612
0
  {
613
0
    auto& repeated = *out->mutable_sizes();
614
0
    repeated.Clear();
615
0
    repeated.Reserve(narrow_cast<int>(sizes_.size()));
616
0
    for (const auto& entry : sizes_) {
617
0
      repeated.Add(entry);
618
0
    }
619
0
  }
620
0
}
621
622
LWSendStringsResponsePB::LWSendStringsResponsePB(::yb::Arena* arena)
623
0
    : sidecars_(arena) {
624
0
}
625
626
LWSendStringsResponsePB::LWSendStringsResponsePB(::yb::Arena* arena, const LWSendStringsResponsePB& rhs)
627
0
    : sidecars_(rhs.sidecars_.begin(), rhs.sidecars_.end(), arena) {
628
0
}
629
630
0
void LWSendStringsResponsePB::AppendToDebugString(std::string* out) const {
631
0
  bool first = true;for (const auto& entry : sidecars_) {
632
0
    ::yb::rpc::AppendFieldTitle("sidecars", ": ", &first, out);
633
0
    *out += std::to_string(entry);
634
0
  }
635
0
}
636
637
0
void LWSendStringsResponsePB::Clear() {
638
0
  sidecars_.clear();
639
0
}
640
641
0
void LWSendStringsResponsePB::CopyFrom(const LWSendStringsResponsePB& rhs) {
642
0
  sidecars_ = rhs.sidecars_;
643
0
}
644
645
0
void LWSendStringsResponsePB::CopyFrom(const SendStringsResponsePB& rhs) {
646
0
  sidecars_.assign(rhs.sidecars().begin(), rhs.sidecars().end());
647
0
}
648
649
0
Status LWSendStringsResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
650
0
  for (;;) {
651
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
652
0
    if (!p.second && !p.first) {
653
0
      return Status::OK();
654
0
    }
655
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
656
0
      case 1: { // sidecars
657
0
        if (p.first == 10) {
658
0
          int length;
659
0
          if (!input->ReadVarintSizeAsInt(&length)) {
660
0
            return ::yb::rpc::ParseFailed("sidecars");
661
0
          }
662
0
          auto old_limit = input->PushLimit(length);
663
0
          while (input->BytesUntilLimit() > 0) {
664
0
            sidecars_.emplace_back();
665
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, &sidecars_.back())) {
666
0
              return ::yb::rpc::ParseFailed("sidecars");
667
0
            }
668
0
          }
669
670
0
          input->PopLimit(old_limit);
671
0
        } else {
672
0
          sidecars_.emplace_back();
673
0
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, &sidecars_.back())) {
674
0
            return ::yb::rpc::ParseFailed("sidecars");
675
0
          }
676
0
        }
677
0
        break;
678
0
      }
679
0
    }
680
0
  }
681
0
}
682
683
0
uint8_t* LWSendStringsResponsePB::SerializeToArray(uint8_t* out) const {
684
0
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 8>(sidecars_, out);
685
0
  return out;
686
0
}
687
688
0
size_t LWSendStringsResponsePB::SerializedSize() const {
689
0
  size_t result = 0;
690
0
  {
691
0
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(sidecars_);
692
0
  }
693
0
  cached_size_ = result;
694
0
  return result;
695
0
}
696
697
0
void LWSendStringsResponsePB::ToGoogleProtobuf(SendStringsResponsePB* out) const {
698
0
  {
699
0
    auto& repeated = *out->mutable_sidecars();
700
0
    repeated.Clear();
701
0
    repeated.Reserve(narrow_cast<int>(sidecars_.size()));
702
0
    for (const auto& entry : sidecars_) {
703
0
      repeated.Add(entry);
704
0
    }
705
0
  }
706
0
}
707
708
LWEchoRequestPB::LWEchoRequestPB(::yb::Arena* arena)
709
0
    : arena_(*arena) {
710
0
}
711
712
LWEchoRequestPB::LWEchoRequestPB(::yb::Arena* arena, const LWEchoRequestPB& rhs)
713
    : arena_(*arena),
714
      has_fields_(rhs.has_fields_),
715
0
      data_(arena->DupSlice(rhs.data_)) {
716
0
}
717
718
0
void LWEchoRequestPB::AppendToDebugString(std::string* out) const {
719
0
  bool first = true;if (has_data()) {
720
0
    ::yb::rpc::AppendFieldTitle("data", ": \"", &first, out);
721
0
    *out += data().ToBuffer();
722
0
    *out += '"';
723
0
  }
724
0
}
725
726
0
void LWEchoRequestPB::Clear() {
727
0
  clear_data();
728
0
}
729
730
0
void LWEchoRequestPB::CopyFrom(const LWEchoRequestPB& rhs) {
731
0
  if (rhs.has_data()) {
732
0
    data_ = arena_.DupSlice(rhs.data_);
733
0
  } else {
734
0
    clear_data();
735
0
  }
736
0
  has_fields_ = rhs.has_fields_;
737
0
}
738
739
0
void LWEchoRequestPB::CopyFrom(const EchoRequestPB& rhs) {
740
0
  if (rhs.has_data()) {
741
0
    data_ = arena_.DupSlice(rhs.data());
742
0
    has_fields_.Set(EchoRequestPBFields::kData);
743
0
  } else {
744
0
    clear_data();
745
0
  }
746
0
}
747
748
0
Status LWEchoRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
749
0
  for (;;) {
750
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
751
0
    if (!p.second && !p.first) {
752
0
      return Status::OK();
753
0
    }
754
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
755
0
      case 1: { // data
756
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_data())) {
757
0
          return ::yb::rpc::ParseFailed("data");
758
0
        }
759
0
        break;
760
0
      }
761
0
    }
762
0
  }
763
0
}
764
765
0
uint8_t* LWEchoRequestPB::SerializeToArray(uint8_t* out) const {
766
0
  if (has_data()) {
767
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(data_, out);
768
0
  }
769
0
  return out;
770
0
}
771
772
0
size_t LWEchoRequestPB::SerializedSize() const {
773
0
  size_t result = 0;
774
0
  if (has_data()) {
775
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(data_);
776
0
  }
777
0
  cached_size_ = result;
778
0
  return result;
779
0
}
780
781
0
void LWEchoRequestPB::ToGoogleProtobuf(EchoRequestPB* out) const {
782
0
  if (has_data()) {
783
0
    out->set_data(data_.cdata(), data_.size());
784
0
  } else {
785
0
    out->clear_data();
786
0
  }
787
0
}
788
789
LWEchoResponsePB::LWEchoResponsePB(::yb::Arena* arena)
790
0
    : arena_(*arena) {
791
0
}
792
793
LWEchoResponsePB::LWEchoResponsePB(::yb::Arena* arena, const LWEchoResponsePB& rhs)
794
    : arena_(*arena),
795
      has_fields_(rhs.has_fields_),
796
0
      data_(arena->DupSlice(rhs.data_)) {
797
0
}
798
799
0
void LWEchoResponsePB::AppendToDebugString(std::string* out) const {
800
0
  bool first = true;if (has_data()) {
801
0
    ::yb::rpc::AppendFieldTitle("data", ": \"", &first, out);
802
0
    *out += data().ToBuffer();
803
0
    *out += '"';
804
0
  }
805
0
}
806
807
0
void LWEchoResponsePB::Clear() {
808
0
  clear_data();
809
0
}
810
811
0
void LWEchoResponsePB::CopyFrom(const LWEchoResponsePB& rhs) {
812
0
  if (rhs.has_data()) {
813
0
    data_ = arena_.DupSlice(rhs.data_);
814
0
  } else {
815
0
    clear_data();
816
0
  }
817
0
  has_fields_ = rhs.has_fields_;
818
0
}
819
820
0
void LWEchoResponsePB::CopyFrom(const EchoResponsePB& rhs) {
821
0
  if (rhs.has_data()) {
822
0
    data_ = arena_.DupSlice(rhs.data());
823
0
    has_fields_.Set(EchoResponsePBFields::kData);
824
0
  } else {
825
0
    clear_data();
826
0
  }
827
0
}
828
829
0
Status LWEchoResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
830
0
  for (;;) {
831
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
832
0
    if (!p.second && !p.first) {
833
0
      return Status::OK();
834
0
    }
835
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
836
0
      case 1: { // data
837
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_data())) {
838
0
          return ::yb::rpc::ParseFailed("data");
839
0
        }
840
0
        break;
841
0
      }
842
0
    }
843
0
  }
844
0
}
845
846
0
uint8_t* LWEchoResponsePB::SerializeToArray(uint8_t* out) const {
847
0
  if (has_data()) {
848
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(data_, out);
849
0
  }
850
0
  return out;
851
0
}
852
853
0
size_t LWEchoResponsePB::SerializedSize() const {
854
0
  size_t result = 0;
855
0
  if (has_data()) {
856
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(data_);
857
0
  }
858
0
  cached_size_ = result;
859
0
  return result;
860
0
}
861
862
0
void LWEchoResponsePB::ToGoogleProtobuf(EchoResponsePB* out) const {
863
0
  if (has_data()) {
864
0
    out->set_data(data_.cdata(), data_.size());
865
0
  } else {
866
0
    out->clear_data();
867
0
  }
868
0
}
869
870
0
LWWhoAmIRequestPB::LWWhoAmIRequestPB(::yb::Arena* arena) {
871
0
}
872
873
0
LWWhoAmIRequestPB::LWWhoAmIRequestPB(::yb::Arena* arena, const LWWhoAmIRequestPB& rhs) {
874
0
}
875
876
0
void LWWhoAmIRequestPB::AppendToDebugString(std::string* out) const {
877
0
}
878
879
0
void LWWhoAmIRequestPB::Clear() {
880
0
}
881
882
0
void LWWhoAmIRequestPB::CopyFrom(const LWWhoAmIRequestPB& rhs) {
883
0
}
884
885
0
void LWWhoAmIRequestPB::CopyFrom(const WhoAmIRequestPB& rhs) {
886
0
}
887
888
0
Status LWWhoAmIRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
889
0
  for (;;) {
890
0
    auto p = input->ReadTagWithCutoffNoLastTag(1);
891
0
    if (!p.second && !p.first) {
892
0
      return Status::OK();
893
0
    }
894
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
895
0
    }
896
0
  }
897
0
}
898
899
0
uint8_t* LWWhoAmIRequestPB::SerializeToArray(uint8_t* out) const {
900
0
  return out;
901
0
}
902
903
0
size_t LWWhoAmIRequestPB::SerializedSize() const {
904
0
  size_t result = 0;
905
0
  cached_size_ = result;
906
0
  return result;
907
0
}
908
909
0
void LWWhoAmIRequestPB::ToGoogleProtobuf(WhoAmIRequestPB* out) const {
910
0
}
911
912
LWWhoAmIResponsePB::LWWhoAmIResponsePB(::yb::Arena* arena)
913
0
    : arena_(*arena) {
914
0
}
915
916
LWWhoAmIResponsePB::LWWhoAmIResponsePB(::yb::Arena* arena, const LWWhoAmIResponsePB& rhs)
917
    : arena_(*arena),
918
      has_fields_(rhs.has_fields_),
919
0
      address_(arena->DupSlice(rhs.address_)) {
920
0
}
921
922
0
void LWWhoAmIResponsePB::AppendToDebugString(std::string* out) const {
923
0
  bool first = true;if (has_address()) {
924
0
    ::yb::rpc::AppendFieldTitle("address", ": \"", &first, out);
925
0
    *out += address().ToBuffer();
926
0
    *out += '"';
927
0
  }
928
0
}
929
930
0
void LWWhoAmIResponsePB::Clear() {
931
0
  clear_address();
932
0
}
933
934
0
void LWWhoAmIResponsePB::CopyFrom(const LWWhoAmIResponsePB& rhs) {
935
0
  if (rhs.has_address()) {
936
0
    address_ = arena_.DupSlice(rhs.address_);
937
0
  } else {
938
0
    clear_address();
939
0
  }
940
0
  has_fields_ = rhs.has_fields_;
941
0
}
942
943
0
void LWWhoAmIResponsePB::CopyFrom(const WhoAmIResponsePB& rhs) {
944
0
  if (rhs.has_address()) {
945
0
    address_ = arena_.DupSlice(rhs.address());
946
0
    has_fields_.Set(WhoAmIResponsePBFields::kAddress);
947
0
  } else {
948
0
    clear_address();
949
0
  }
950
0
}
951
952
0
Status LWWhoAmIResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
953
0
  for (;;) {
954
0
    auto p = input->ReadTagWithCutoffNoLastTag(31);
955
0
    if (!p.second && !p.first) {
956
0
      return Status::OK();
957
0
    }
958
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
959
0
      case 2: { // address
960
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_address())) {
961
0
          return ::yb::rpc::ParseFailed("address");
962
0
        }
963
0
        break;
964
0
      }
965
0
    }
966
0
  }
967
0
}
968
969
0
uint8_t* LWWhoAmIResponsePB::SerializeToArray(uint8_t* out) const {
970
0
  if (has_address()) {
971
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 18>(address_, out);
972
0
  }
973
0
  return out;
974
0
}
975
976
0
size_t LWWhoAmIResponsePB::SerializedSize() const {
977
0
  size_t result = 0;
978
0
  if (has_address()) {
979
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(address_);
980
0
  }
981
0
  cached_size_ = result;
982
0
  return result;
983
0
}
984
985
0
void LWWhoAmIResponsePB::ToGoogleProtobuf(WhoAmIResponsePB* out) const {
986
0
  if (has_address()) {
987
0
    out->set_address(address_.cdata(), address_.size());
988
0
  } else {
989
0
    out->clear_address();
990
0
  }
991
0
}
992
993
LWCalculatorError::LWCalculatorError(::yb::Arena* arena)
994
0
    : arena_(*arena) {
995
0
}
996
997
LWCalculatorError::LWCalculatorError(::yb::Arena* arena, const LWCalculatorError& rhs)
998
    : arena_(*arena),
999
      has_fields_(rhs.has_fields_),
1000
0
      extra_error_data_(arena->DupSlice(rhs.extra_error_data_)) {
1001
0
}
1002
1003
0
void LWCalculatorError::AppendToDebugString(std::string* out) const {
1004
0
  bool first = true;if (has_extra_error_data()) {
1005
0
    ::yb::rpc::AppendFieldTitle("extra_error_data", ": \"", &first, out);
1006
0
    *out += extra_error_data().ToBuffer();
1007
0
    *out += '"';
1008
0
  }
1009
0
}
1010
1011
0
void LWCalculatorError::Clear() {
1012
0
  clear_extra_error_data();
1013
0
}
1014
1015
0
void LWCalculatorError::CopyFrom(const LWCalculatorError& rhs) {
1016
0
  if (rhs.has_extra_error_data()) {
1017
0
    extra_error_data_ = arena_.DupSlice(rhs.extra_error_data_);
1018
0
  } else {
1019
0
    clear_extra_error_data();
1020
0
  }
1021
0
  has_fields_ = rhs.has_fields_;
1022
0
}
1023
1024
0
void LWCalculatorError::CopyFrom(const CalculatorError& rhs) {
1025
0
  if (rhs.has_extra_error_data()) {
1026
0
    extra_error_data_ = arena_.DupSlice(rhs.extra_error_data());
1027
0
    has_fields_.Set(CalculatorErrorFields::kExtraErrorData);
1028
0
  } else {
1029
0
    clear_extra_error_data();
1030
0
  }
1031
0
}
1032
1033
0
Status LWCalculatorError::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1034
0
  for (;;) {
1035
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
1036
0
    if (!p.second && !p.first) {
1037
0
      return Status::OK();
1038
0
    }
1039
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1040
0
      case 1: { // extra_error_data
1041
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_extra_error_data())) {
1042
0
          return ::yb::rpc::ParseFailed("extra_error_data");
1043
0
        }
1044
0
        break;
1045
0
      }
1046
0
    }
1047
0
  }
1048
0
}
1049
1050
0
uint8_t* LWCalculatorError::SerializeToArray(uint8_t* out) const {
1051
0
  if (has_extra_error_data()) {
1052
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(extra_error_data_, out);
1053
0
  }
1054
0
  return out;
1055
0
}
1056
1057
0
size_t LWCalculatorError::SerializedSize() const {
1058
0
  size_t result = 0;
1059
0
  if (has_extra_error_data()) {
1060
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(extra_error_data_);
1061
0
  }
1062
0
  cached_size_ = result;
1063
0
  return result;
1064
0
}
1065
1066
0
void LWCalculatorError::ToGoogleProtobuf(CalculatorError* out) const {
1067
0
  if (has_extra_error_data()) {
1068
0
    out->set_extra_error_data(extra_error_data_.cdata(), extra_error_data_.size());
1069
0
  } else {
1070
0
    out->clear_extra_error_data();
1071
0
  }
1072
0
}
1073
1074
0
LWPanicRequestPB::LWPanicRequestPB(::yb::Arena* arena) {
1075
0
}
1076
1077
0
LWPanicRequestPB::LWPanicRequestPB(::yb::Arena* arena, const LWPanicRequestPB& rhs) {
1078
0
}
1079
1080
0
void LWPanicRequestPB::AppendToDebugString(std::string* out) const {
1081
0
}
1082
1083
0
void LWPanicRequestPB::Clear() {
1084
0
}
1085
1086
0
void LWPanicRequestPB::CopyFrom(const LWPanicRequestPB& rhs) {
1087
0
}
1088
1089
0
void LWPanicRequestPB::CopyFrom(const PanicRequestPB& rhs) {
1090
0
}
1091
1092
0
Status LWPanicRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1093
0
  for (;;) {
1094
0
    auto p = input->ReadTagWithCutoffNoLastTag(1);
1095
0
    if (!p.second && !p.first) {
1096
0
      return Status::OK();
1097
0
    }
1098
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1099
0
    }
1100
0
  }
1101
0
}
1102
1103
0
uint8_t* LWPanicRequestPB::SerializeToArray(uint8_t* out) const {
1104
0
  return out;
1105
0
}
1106
1107
0
size_t LWPanicRequestPB::SerializedSize() const {
1108
0
  size_t result = 0;
1109
0
  cached_size_ = result;
1110
0
  return result;
1111
0
}
1112
1113
0
void LWPanicRequestPB::ToGoogleProtobuf(PanicRequestPB* out) const {
1114
0
}
1115
1116
0
LWPanicResponsePB::LWPanicResponsePB(::yb::Arena* arena) {
1117
0
}
1118
1119
0
LWPanicResponsePB::LWPanicResponsePB(::yb::Arena* arena, const LWPanicResponsePB& rhs) {
1120
0
}
1121
1122
0
void LWPanicResponsePB::AppendToDebugString(std::string* out) const {
1123
0
}
1124
1125
0
void LWPanicResponsePB::Clear() {
1126
0
}
1127
1128
0
void LWPanicResponsePB::CopyFrom(const LWPanicResponsePB& rhs) {
1129
0
}
1130
1131
0
void LWPanicResponsePB::CopyFrom(const PanicResponsePB& rhs) {
1132
0
}
1133
1134
0
Status LWPanicResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1135
0
  for (;;) {
1136
0
    auto p = input->ReadTagWithCutoffNoLastTag(1);
1137
0
    if (!p.second && !p.first) {
1138
0
      return Status::OK();
1139
0
    }
1140
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1141
0
    }
1142
0
  }
1143
0
}
1144
1145
0
uint8_t* LWPanicResponsePB::SerializeToArray(uint8_t* out) const {
1146
0
  return out;
1147
0
}
1148
1149
0
size_t LWPanicResponsePB::SerializedSize() const {
1150
0
  size_t result = 0;
1151
0
  cached_size_ = result;
1152
0
  return result;
1153
0
}
1154
1155
0
void LWPanicResponsePB::ToGoogleProtobuf(PanicResponsePB* out) const {
1156
0
}
1157
1158
0
LWPingRequestPB::LWPingRequestPB(::yb::Arena* arena) {
1159
0
}
1160
1161
LWPingRequestPB::LWPingRequestPB(::yb::Arena* arena, const LWPingRequestPB& rhs)
1162
    : has_fields_(rhs.has_fields_),
1163
0
      id_(rhs.id_) {
1164
0
}
1165
1166
0
void LWPingRequestPB::AppendToDebugString(std::string* out) const {
1167
0
  bool first = true;if (has_id()) {
1168
0
    ::yb::rpc::AppendFieldTitle("id", ": ", &first, out);
1169
0
    *out += std::to_string(id());
1170
0
  }
1171
0
}
1172
1173
0
void LWPingRequestPB::Clear() {
1174
0
  clear_id();
1175
0
}
1176
1177
0
void LWPingRequestPB::CopyFrom(const LWPingRequestPB& rhs) {
1178
0
  if (rhs.has_id()) {
1179
0
    id_ = rhs.id_;
1180
0
  } else {
1181
0
    clear_id();
1182
0
  }
1183
0
  has_fields_ = rhs.has_fields_;
1184
0
}
1185
1186
0
void LWPingRequestPB::CopyFrom(const PingRequestPB& rhs) {
1187
0
  if (rhs.has_id()) {
1188
0
    id_ = rhs.id();
1189
0
    has_fields_.Set(PingRequestPBFields::kId);
1190
0
  } else {
1191
0
    clear_id();
1192
0
  }
1193
0
}
1194
1195
0
Status LWPingRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1196
0
  for (;;) {
1197
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
1198
0
    if (!p.second && !p.first) {
1199
0
      return Status::OK();
1200
0
    }
1201
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1202
0
      case 1: { // id
1203
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, mutable_id())) {
1204
0
          return ::yb::rpc::ParseFailed("id");
1205
0
        }
1206
0
        break;
1207
0
      }
1208
0
    }
1209
0
  }
1210
0
}
1211
1212
0
uint8_t* LWPingRequestPB::SerializeToArray(uint8_t* out) const {
1213
0
  if (has_id()) {
1214
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 8>(id_, out);
1215
0
  }
1216
0
  return out;
1217
0
}
1218
1219
0
size_t LWPingRequestPB::SerializedSize() const {
1220
0
  size_t result = 0;
1221
0
  if (has_id()) {
1222
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 1>(id_);
1223
0
  }
1224
0
  cached_size_ = result;
1225
0
  return result;
1226
0
}
1227
1228
0
void LWPingRequestPB::ToGoogleProtobuf(PingRequestPB* out) const {
1229
0
  if (has_id()) {
1230
0
    out->set_id(id_);
1231
0
  } else {
1232
0
    out->clear_id();
1233
0
  }
1234
0
}
1235
1236
0
LWPingResponsePB::LWPingResponsePB(::yb::Arena* arena) {
1237
0
}
1238
1239
LWPingResponsePB::LWPingResponsePB(::yb::Arena* arena, const LWPingResponsePB& rhs)
1240
    : has_fields_(rhs.has_fields_),
1241
0
      time_(rhs.time_) {
1242
0
}
1243
1244
0
void LWPingResponsePB::AppendToDebugString(std::string* out) const {
1245
0
  bool first = true;if (has_time()) {
1246
0
    ::yb::rpc::AppendFieldTitle("time", ": ", &first, out);
1247
0
    *out += std::to_string(time());
1248
0
  }
1249
0
}
1250
1251
0
void LWPingResponsePB::Clear() {
1252
0
  clear_time();
1253
0
}
1254
1255
0
void LWPingResponsePB::CopyFrom(const LWPingResponsePB& rhs) {
1256
0
  if (rhs.has_time()) {
1257
0
    time_ = rhs.time_;
1258
0
  } else {
1259
0
    clear_time();
1260
0
  }
1261
0
  has_fields_ = rhs.has_fields_;
1262
0
}
1263
1264
0
void LWPingResponsePB::CopyFrom(const PingResponsePB& rhs) {
1265
0
  if (rhs.has_time()) {
1266
0
    time_ = rhs.time();
1267
0
    has_fields_.Set(PingResponsePBFields::kTime);
1268
0
  } else {
1269
0
    clear_time();
1270
0
  }
1271
0
}
1272
1273
0
Status LWPingResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1274
0
  for (;;) {
1275
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
1276
0
    if (!p.second && !p.first) {
1277
0
      return Status::OK();
1278
0
    }
1279
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1280
0
      case 1: { // time
1281
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, mutable_time())) {
1282
0
          return ::yb::rpc::ParseFailed("time");
1283
0
        }
1284
0
        break;
1285
0
      }
1286
0
    }
1287
0
  }
1288
0
}
1289
1290
0
uint8_t* LWPingResponsePB::SerializeToArray(uint8_t* out) const {
1291
0
  if (has_time()) {
1292
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 8>(time_, out);
1293
0
  }
1294
0
  return out;
1295
0
}
1296
1297
0
size_t LWPingResponsePB::SerializedSize() const {
1298
0
  size_t result = 0;
1299
0
  if (has_time()) {
1300
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 1>(time_);
1301
0
  }
1302
0
  cached_size_ = result;
1303
0
  return result;
1304
0
}
1305
1306
0
void LWPingResponsePB::ToGoogleProtobuf(PingResponsePB* out) const {
1307
0
  if (has_time()) {
1308
0
    out->set_time(time_);
1309
0
  } else {
1310
0
    out->clear_time();
1311
0
  }
1312
0
}
1313
1314
0
LWDisconnectRequestPB::LWDisconnectRequestPB(::yb::Arena* arena) {
1315
0
}
1316
1317
0
LWDisconnectRequestPB::LWDisconnectRequestPB(::yb::Arena* arena, const LWDisconnectRequestPB& rhs) {
1318
0
}
1319
1320
0
void LWDisconnectRequestPB::AppendToDebugString(std::string* out) const {
1321
0
}
1322
1323
0
void LWDisconnectRequestPB::Clear() {
1324
0
}
1325
1326
0
void LWDisconnectRequestPB::CopyFrom(const LWDisconnectRequestPB& rhs) {
1327
0
}
1328
1329
0
void LWDisconnectRequestPB::CopyFrom(const DisconnectRequestPB& rhs) {
1330
0
}
1331
1332
0
Status LWDisconnectRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1333
0
  for (;;) {
1334
0
    auto p = input->ReadTagWithCutoffNoLastTag(1);
1335
0
    if (!p.second && !p.first) {
1336
0
      return Status::OK();
1337
0
    }
1338
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1339
0
    }
1340
0
  }
1341
0
}
1342
1343
0
uint8_t* LWDisconnectRequestPB::SerializeToArray(uint8_t* out) const {
1344
0
  return out;
1345
0
}
1346
1347
0
size_t LWDisconnectRequestPB::SerializedSize() const {
1348
0
  size_t result = 0;
1349
0
  cached_size_ = result;
1350
0
  return result;
1351
0
}
1352
1353
0
void LWDisconnectRequestPB::ToGoogleProtobuf(DisconnectRequestPB* out) const {
1354
0
}
1355
1356
0
LWDisconnectResponsePB::LWDisconnectResponsePB(::yb::Arena* arena) {
1357
0
}
1358
1359
0
LWDisconnectResponsePB::LWDisconnectResponsePB(::yb::Arena* arena, const LWDisconnectResponsePB& rhs) {
1360
0
}
1361
1362
0
void LWDisconnectResponsePB::AppendToDebugString(std::string* out) const {
1363
0
}
1364
1365
0
void LWDisconnectResponsePB::Clear() {
1366
0
}
1367
1368
0
void LWDisconnectResponsePB::CopyFrom(const LWDisconnectResponsePB& rhs) {
1369
0
}
1370
1371
0
void LWDisconnectResponsePB::CopyFrom(const DisconnectResponsePB& rhs) {
1372
0
}
1373
1374
0
Status LWDisconnectResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1375
0
  for (;;) {
1376
0
    auto p = input->ReadTagWithCutoffNoLastTag(1);
1377
0
    if (!p.second && !p.first) {
1378
0
      return Status::OK();
1379
0
    }
1380
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1381
0
    }
1382
0
  }
1383
0
}
1384
1385
0
uint8_t* LWDisconnectResponsePB::SerializeToArray(uint8_t* out) const {
1386
0
  return out;
1387
0
}
1388
1389
0
size_t LWDisconnectResponsePB::SerializedSize() const {
1390
0
  size_t result = 0;
1391
0
  cached_size_ = result;
1392
0
  return result;
1393
0
}
1394
1395
0
void LWDisconnectResponsePB::ToGoogleProtobuf(DisconnectResponsePB* out) const {
1396
0
}
1397
1398
LWForwardRequestPB::LWForwardRequestPB(::yb::Arena* arena)
1399
0
    : arena_(*arena) {
1400
0
}
1401
1402
LWForwardRequestPB::LWForwardRequestPB(::yb::Arena* arena, const LWForwardRequestPB& rhs)
1403
    : arena_(*arena),
1404
      has_fields_(rhs.has_fields_),
1405
      host_(arena->DupSlice(rhs.host_)),
1406
0
      port_(rhs.port_) {
1407
0
}
1408
1409
0
void LWForwardRequestPB::AppendToDebugString(std::string* out) const {
1410
0
  bool first = true;if (has_host()) {
1411
0
    ::yb::rpc::AppendFieldTitle("host", ": \"", &first, out);
1412
0
    *out += host().ToBuffer();
1413
0
    *out += '"';
1414
0
  }
1415
0
  if (has_port()) {
1416
0
    ::yb::rpc::AppendFieldTitle("port", ": ", &first, out);
1417
0
    *out += std::to_string(port());
1418
0
  }
1419
0
}
1420
1421
0
void LWForwardRequestPB::Clear() {
1422
0
  clear_host();
1423
0
  clear_port();
1424
0
}
1425
1426
0
void LWForwardRequestPB::CopyFrom(const LWForwardRequestPB& rhs) {
1427
0
  if (rhs.has_host()) {
1428
0
    host_ = arena_.DupSlice(rhs.host_);
1429
0
  } else {
1430
0
    clear_host();
1431
0
  }
1432
0
  if (rhs.has_port()) {
1433
0
    port_ = rhs.port_;
1434
0
  } else {
1435
0
    clear_port();
1436
0
  }
1437
0
  has_fields_ = rhs.has_fields_;
1438
0
}
1439
1440
0
void LWForwardRequestPB::CopyFrom(const ForwardRequestPB& rhs) {
1441
0
  if (rhs.has_host()) {
1442
0
    host_ = arena_.DupSlice(rhs.host());
1443
0
    has_fields_.Set(ForwardRequestPBFields::kHost);
1444
0
  } else {
1445
0
    clear_host();
1446
0
  }
1447
0
  if (rhs.has_port()) {
1448
0
    port_ = rhs.port();
1449
0
    has_fields_.Set(ForwardRequestPBFields::kPort);
1450
0
  } else {
1451
0
    clear_port();
1452
0
  }
1453
0
}
1454
1455
0
Status LWForwardRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1456
0
  for (;;) {
1457
0
    auto p = input->ReadTagWithCutoffNoLastTag(31);
1458
0
    if (!p.second && !p.first) {
1459
0
      return Status::OK();
1460
0
    }
1461
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1462
0
      case 1: { // host
1463
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_host())) {
1464
0
          return ::yb::rpc::ParseFailed("host");
1465
0
        }
1466
0
        break;
1467
0
      }
1468
0
      case 2: { // port
1469
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_port())) {
1470
0
          return ::yb::rpc::ParseFailed("port");
1471
0
        }
1472
0
        break;
1473
0
      }
1474
0
    }
1475
0
  }
1476
0
}
1477
1478
0
uint8_t* LWForwardRequestPB::SerializeToArray(uint8_t* out) const {
1479
0
  if (has_host()) {
1480
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(host_, out);
1481
0
  }
1482
0
  if (has_port()) {
1483
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 16>(port_, out);
1484
0
  }
1485
0
  return out;
1486
0
}
1487
1488
0
size_t LWForwardRequestPB::SerializedSize() const {
1489
0
  size_t result = 0;
1490
0
  if (has_host()) {
1491
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(host_);
1492
0
  }
1493
0
  if (has_port()) {
1494
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(port_);
1495
0
  }
1496
0
  cached_size_ = result;
1497
0
  return result;
1498
0
}
1499
1500
0
void LWForwardRequestPB::ToGoogleProtobuf(ForwardRequestPB* out) const {
1501
0
  if (has_host()) {
1502
0
    out->set_host(host_.cdata(), host_.size());
1503
0
  } else {
1504
0
    out->clear_host();
1505
0
  }
1506
0
  if (has_port()) {
1507
0
    out->set_port(port_);
1508
0
  } else {
1509
0
    out->clear_port();
1510
0
  }
1511
0
}
1512
1513
LWForwardResponsePB::LWForwardResponsePB(::yb::Arena* arena)
1514
0
    : arena_(*arena) {
1515
0
}
1516
1517
LWForwardResponsePB::LWForwardResponsePB(::yb::Arena* arena, const LWForwardResponsePB& rhs)
1518
    : arena_(*arena),
1519
      has_fields_(rhs.has_fields_),
1520
0
      name_(arena->DupSlice(rhs.name_)) {
1521
0
}
1522
1523
0
void LWForwardResponsePB::AppendToDebugString(std::string* out) const {
1524
0
  bool first = true;if (has_name()) {
1525
0
    ::yb::rpc::AppendFieldTitle("name", ": \"", &first, out);
1526
0
    *out += name().ToBuffer();
1527
0
    *out += '"';
1528
0
  }
1529
0
}
1530
1531
0
void LWForwardResponsePB::Clear() {
1532
0
  clear_name();
1533
0
}
1534
1535
0
void LWForwardResponsePB::CopyFrom(const LWForwardResponsePB& rhs) {
1536
0
  if (rhs.has_name()) {
1537
0
    name_ = arena_.DupSlice(rhs.name_);
1538
0
  } else {
1539
0
    clear_name();
1540
0
  }
1541
0
  has_fields_ = rhs.has_fields_;
1542
0
}
1543
1544
0
void LWForwardResponsePB::CopyFrom(const ForwardResponsePB& rhs) {
1545
0
  if (rhs.has_name()) {
1546
0
    name_ = arena_.DupSlice(rhs.name());
1547
0
    has_fields_.Set(ForwardResponsePBFields::kName);
1548
0
  } else {
1549
0
    clear_name();
1550
0
  }
1551
0
}
1552
1553
0
Status LWForwardResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1554
0
  for (;;) {
1555
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
1556
0
    if (!p.second && !p.first) {
1557
0
      return Status::OK();
1558
0
    }
1559
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1560
0
      case 1: { // name
1561
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_name())) {
1562
0
          return ::yb::rpc::ParseFailed("name");
1563
0
        }
1564
0
        break;
1565
0
      }
1566
0
    }
1567
0
  }
1568
0
}
1569
1570
0
uint8_t* LWForwardResponsePB::SerializeToArray(uint8_t* out) const {
1571
0
  if (has_name()) {
1572
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(name_, out);
1573
0
  }
1574
0
  return out;
1575
0
}
1576
1577
0
size_t LWForwardResponsePB::SerializedSize() const {
1578
0
  size_t result = 0;
1579
0
  if (has_name()) {
1580
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(name_);
1581
0
  }
1582
0
  cached_size_ = result;
1583
0
  return result;
1584
0
}
1585
1586
0
void LWForwardResponsePB::ToGoogleProtobuf(ForwardResponsePB* out) const {
1587
0
  if (has_name()) {
1588
0
    out->set_name(name_.cdata(), name_.size());
1589
0
  } else {
1590
0
    out->clear_name();
1591
0
  }
1592
0
}
1593
1594
LWConcatRequestPB::LWConcatRequestPB(::yb::Arena* arena)
1595
0
    : arena_(*arena) {
1596
0
}
1597
1598
LWConcatRequestPB::LWConcatRequestPB(::yb::Arena* arena, const LWConcatRequestPB& rhs)
1599
    : arena_(*arena),
1600
      has_fields_(rhs.has_fields_),
1601
      lhs_(arena->DupSlice(rhs.lhs_)),
1602
0
      rhs_(arena->DupSlice(rhs.rhs_)) {
1603
0
}
1604
1605
0
void LWConcatRequestPB::AppendToDebugString(std::string* out) const {
1606
0
  bool first = true;if (has_lhs()) {
1607
0
    ::yb::rpc::AppendFieldTitle("lhs", ": \"", &first, out);
1608
0
    *out += lhs().ToBuffer();
1609
0
    *out += '"';
1610
0
  }
1611
0
  if (has_rhs()) {
1612
0
    ::yb::rpc::AppendFieldTitle("rhs", ": \"", &first, out);
1613
0
    *out += rhs().ToBuffer();
1614
0
    *out += '"';
1615
0
  }
1616
0
}
1617
1618
0
void LWConcatRequestPB::Clear() {
1619
0
  clear_lhs();
1620
0
  clear_rhs();
1621
0
}
1622
1623
0
void LWConcatRequestPB::CopyFrom(const LWConcatRequestPB& rhs) {
1624
0
  if (rhs.has_lhs()) {
1625
0
    lhs_ = arena_.DupSlice(rhs.lhs_);
1626
0
  } else {
1627
0
    clear_lhs();
1628
0
  }
1629
0
  if (rhs.has_rhs()) {
1630
0
    rhs_ = arena_.DupSlice(rhs.rhs_);
1631
0
  } else {
1632
0
    clear_rhs();
1633
0
  }
1634
0
  has_fields_ = rhs.has_fields_;
1635
0
}
1636
1637
0
void LWConcatRequestPB::CopyFrom(const ConcatRequestPB& rhs) {
1638
0
  if (rhs.has_lhs()) {
1639
0
    lhs_ = arena_.DupSlice(rhs.lhs());
1640
0
    has_fields_.Set(ConcatRequestPBFields::kLhs);
1641
0
  } else {
1642
0
    clear_lhs();
1643
0
  }
1644
0
  if (rhs.has_rhs()) {
1645
0
    rhs_ = arena_.DupSlice(rhs.rhs());
1646
0
    has_fields_.Set(ConcatRequestPBFields::kRhs);
1647
0
  } else {
1648
0
    clear_rhs();
1649
0
  }
1650
0
}
1651
1652
0
Status LWConcatRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1653
0
  for (;;) {
1654
0
    auto p = input->ReadTagWithCutoffNoLastTag(31);
1655
0
    if (!p.second && !p.first) {
1656
0
      return Status::OK();
1657
0
    }
1658
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1659
0
      case 1: { // lhs
1660
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_lhs())) {
1661
0
          return ::yb::rpc::ParseFailed("lhs");
1662
0
        }
1663
0
        break;
1664
0
      }
1665
0
      case 2: { // rhs
1666
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_rhs())) {
1667
0
          return ::yb::rpc::ParseFailed("rhs");
1668
0
        }
1669
0
        break;
1670
0
      }
1671
0
    }
1672
0
  }
1673
0
}
1674
1675
0
uint8_t* LWConcatRequestPB::SerializeToArray(uint8_t* out) const {
1676
0
  if (has_lhs()) {
1677
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(lhs_, out);
1678
0
  }
1679
0
  if (has_rhs()) {
1680
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 18>(rhs_, out);
1681
0
  }
1682
0
  return out;
1683
0
}
1684
1685
0
size_t LWConcatRequestPB::SerializedSize() const {
1686
0
  size_t result = 0;
1687
0
  if (has_lhs()) {
1688
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(lhs_);
1689
0
  }
1690
0
  if (has_rhs()) {
1691
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(rhs_);
1692
0
  }
1693
0
  cached_size_ = result;
1694
0
  return result;
1695
0
}
1696
1697
0
void LWConcatRequestPB::ToGoogleProtobuf(ConcatRequestPB* out) const {
1698
0
  if (has_lhs()) {
1699
0
    out->set_lhs(lhs_.cdata(), lhs_.size());
1700
0
  } else {
1701
0
    out->clear_lhs();
1702
0
  }
1703
0
  if (has_rhs()) {
1704
0
    out->set_rhs(rhs_.cdata(), rhs_.size());
1705
0
  } else {
1706
0
    out->clear_rhs();
1707
0
  }
1708
0
}
1709
1710
LWConcatResponsePB::LWConcatResponsePB(::yb::Arena* arena)
1711
0
    : arena_(*arena) {
1712
0
}
1713
1714
LWConcatResponsePB::LWConcatResponsePB(::yb::Arena* arena, const LWConcatResponsePB& rhs)
1715
    : arena_(*arena),
1716
      has_fields_(rhs.has_fields_),
1717
0
      result_(arena->DupSlice(rhs.result_)) {
1718
0
}
1719
1720
0
void LWConcatResponsePB::AppendToDebugString(std::string* out) const {
1721
0
  bool first = true;if (has_result()) {
1722
0
    ::yb::rpc::AppendFieldTitle("result", ": \"", &first, out);
1723
0
    *out += result().ToBuffer();
1724
0
    *out += '"';
1725
0
  }
1726
0
}
1727
1728
0
void LWConcatResponsePB::Clear() {
1729
0
  clear_result();
1730
0
}
1731
1732
0
void LWConcatResponsePB::CopyFrom(const LWConcatResponsePB& rhs) {
1733
0
  if (rhs.has_result()) {
1734
0
    result_ = arena_.DupSlice(rhs.result_);
1735
0
  } else {
1736
0
    clear_result();
1737
0
  }
1738
0
  has_fields_ = rhs.has_fields_;
1739
0
}
1740
1741
0
void LWConcatResponsePB::CopyFrom(const ConcatResponsePB& rhs) {
1742
0
  if (rhs.has_result()) {
1743
0
    result_ = arena_.DupSlice(rhs.result());
1744
0
    has_fields_.Set(ConcatResponsePBFields::kResult);
1745
0
  } else {
1746
0
    clear_result();
1747
0
  }
1748
0
}
1749
1750
0
Status LWConcatResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1751
0
  for (;;) {
1752
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
1753
0
    if (!p.second && !p.first) {
1754
0
      return Status::OK();
1755
0
    }
1756
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1757
0
      case 1: { // result
1758
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_result())) {
1759
0
          return ::yb::rpc::ParseFailed("result");
1760
0
        }
1761
0
        break;
1762
0
      }
1763
0
    }
1764
0
  }
1765
0
}
1766
1767
0
uint8_t* LWConcatResponsePB::SerializeToArray(uint8_t* out) const {
1768
0
  if (has_result()) {
1769
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(result_, out);
1770
0
  }
1771
0
  return out;
1772
0
}
1773
1774
0
size_t LWConcatResponsePB::SerializedSize() const {
1775
0
  size_t result = 0;
1776
0
  if (has_result()) {
1777
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(result_);
1778
0
  }
1779
0
  cached_size_ = result;
1780
0
  return result;
1781
0
}
1782
1783
0
void LWConcatResponsePB::ToGoogleProtobuf(ConcatResponsePB* out) const {
1784
0
  if (has_result()) {
1785
0
    out->set_result(result_.cdata(), result_.size());
1786
0
  } else {
1787
0
    out->clear_result();
1788
0
  }
1789
0
}
1790
1791
LWLightweightSubMessagePB::LWLightweightSubMessagePB(::yb::Arena* arena)
1792
    : arena_(*arena),
1793
      rsi32_(arena),
1794
40
      rbytes_(arena) {
1795
40
}
1796
1797
LWLightweightSubMessagePB::LWLightweightSubMessagePB(::yb::Arena* arena, const LWLightweightSubMessagePB& rhs)
1798
    : arena_(*arena),
1799
      has_fields_(rhs.has_fields_),
1800
      sf32_(rhs.sf32_),
1801
      rsi32_(rhs.rsi32_.begin(), rhs.rsi32_.end(), arena),
1802
      str_(arena->DupSlice(rhs.str_)),
1803
      rbytes_(arena),
1804
11
      cycle_(rhs.cycle_ ? arena->NewObject<::yb::rpc_test::LWLightweightSubMessagePB>(arena, *rhs.cycle_) : nullptr) {
1805
11
  rbytes_.reserve(rhs.rbytes_.size());
1806
121
  for (const auto& entry : rhs.rbytes_) {
1807
121
    rbytes_.push_back(arena->DupSlice(entry));
1808
121
  }
1809
11
}
1810
1811
90
void LWLightweightSubMessagePB::AppendToDebugString(std::string* out) const {
1812
90
  bool first = true;if (has_sf32()) {
1813
90
    ::yb::rpc::AppendFieldTitle("sf32", ": ", &first, out);
1814
90
    *out += std::to_string(sf32());
1815
90
  }
1816
1.17k
  for (const auto& entry : rsi32_) {
1817
1.17k
    ::yb::rpc::AppendFieldTitle("rsi32", ": ", &first, out);
1818
1.17k
    *out += std::to_string(entry);
1819
1.17k
  }
1820
90
  if (has_str()) {
1821
90
    ::yb::rpc::AppendFieldTitle("str", ": \"", &first, out);
1822
90
    *out += str().ToBuffer();
1823
90
    *out += '"';
1824
90
  }
1825
990
  for (const auto& entry : rbytes_) {
1826
990
    ::yb::rpc::AppendFieldTitle("rbytes", ": \"", &first, out);
1827
990
    *out += entry.ToBuffer();
1828
990
    *out += '"';
1829
990
  }
1830
90
  if (has_cycle()) {
1831
45
    ::yb::rpc::AppendFieldTitle("cycle", " { ", &first, out);
1832
45
    cycle().AppendToDebugString(out);
1833
45
    *out += " }";
1834
45
  }
1835
90
}
1836
1837
0
void LWLightweightSubMessagePB::Clear() {
1838
0
  clear_sf32();
1839
0
  rsi32_.clear();
1840
0
  clear_str();
1841
0
  rbytes_.clear();
1842
0
  clear_cycle();
1843
0
}
1844
1845
0
void LWLightweightSubMessagePB::CopyFrom(const LWLightweightSubMessagePB& rhs) {
1846
0
  if (rhs.has_sf32()) {
1847
0
    sf32_ = rhs.sf32_;
1848
0
  } else {
1849
0
    clear_sf32();
1850
0
  }
1851
0
  rsi32_ = rhs.rsi32_;
1852
0
  if (rhs.has_str()) {
1853
0
    str_ = arena_.DupSlice(rhs.str_);
1854
0
  } else {
1855
0
    clear_str();
1856
0
  }
1857
0
  rbytes_.reserve(rhs.rbytes_.size());
1858
0
  for (const auto& entry : rhs.rbytes_) {
1859
0
    rbytes_.push_back(arena_.DupSlice(entry));
1860
0
  }
1861
0
  if (rhs.cycle_) {
1862
0
    mutable_cycle()->CopyFrom(*rhs.cycle_);
1863
0
  } else {
1864
0
    clear_cycle();
1865
0
  }
1866
0
  has_fields_ = rhs.has_fields_;
1867
0
}
1868
1869
25
void LWLightweightSubMessagePB::CopyFrom(const LightweightSubMessagePB& rhs) {
1870
25
  if (rhs.has_sf32()) {
1871
25
    sf32_ = rhs.sf32();
1872
25
    has_fields_.Set(LightweightSubMessagePBFields::kSf32);
1873
0
  } else {
1874
0
    clear_sf32();
1875
0
  }
1876
25
  rsi32_.assign(rhs.rsi32().begin(), rhs.rsi32().end());
1877
25
  if (rhs.has_str()) {
1878
25
    str_ = arena_.DupSlice(rhs.str());
1879
25
    has_fields_.Set(LightweightSubMessagePBFields::kStr);
1880
0
  } else {
1881
0
    clear_str();
1882
0
  }
1883
25
  rbytes_.reserve(rhs.rbytes().size());
1884
275
  for (const auto& entry : rhs.rbytes()) {
1885
275
    rbytes_.push_back(arena_.DupSlice(entry));
1886
275
  }
1887
25
  if (rhs.has_cycle()) {
1888
13
    mutable_cycle()->CopyFrom(rhs.cycle());
1889
12
  } else {
1890
12
    clear_cycle();
1891
12
  }
1892
25
}
1893
1894
14
Status LWLightweightSubMessagePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
1895
385
  for (;;) {
1896
385
    auto p = input->ReadTagWithCutoffNoLastTag(63);
1897
385
    if (!p.second && !p.first) {
1898
14
      return Status::OK();
1899
14
    }
1900
371
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
1901
14
      case 1: { // sf32
1902
14
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32, int32_t>::Read(input, mutable_sf32())) {
1903
0
          return ::yb::rpc::ParseFailed("sf32");
1904
0
        }
1905
14
        break;
1906
14
      }
1907
182
      case 2: { // rsi32
1908
182
        if (p.first == 18) {
1909
0
          int length;
1910
0
          if (!input->ReadVarintSizeAsInt(&length)) {
1911
0
            return ::yb::rpc::ParseFailed("rsi32");
1912
0
          }
1913
0
          auto old_limit = input->PushLimit(length);
1914
0
          while (input->BytesUntilLimit() > 0) {
1915
0
            rsi32_.emplace_back();
1916
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>::Read(input, &rsi32_.back())) {
1917
0
              return ::yb::rpc::ParseFailed("rsi32");
1918
0
            }
1919
0
          }
1920
1921
0
          input->PopLimit(old_limit);
1922
182
        } else {
1923
182
          rsi32_.emplace_back();
1924
182
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>::Read(input, &rsi32_.back())) {
1925
0
            return ::yb::rpc::ParseFailed("rsi32");
1926
0
          }
1927
182
        }
1928
182
        break;
1929
182
      }
1930
14
      case 3: { // str
1931
14
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_str())) {
1932
0
          return ::yb::rpc::ParseFailed("str");
1933
0
        }
1934
14
        break;
1935
14
      }
1936
154
      case 4: { // rbytes
1937
154
        rbytes_.emplace_back();
1938
154
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>::Read(input, &rbytes_.back())) {
1939
0
          return ::yb::rpc::ParseFailed("rbytes");
1940
0
        }
1941
154
        break;
1942
154
      }
1943
7
      case 5: { // cycle
1944
7
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>::Read(input, mutable_cycle())) {
1945
0
          return ::yb::rpc::ParseFailed("cycle");
1946
0
        }
1947
7
        break;
1948
7
      }
1949
371
    }
1950
371
  }
1951
14
}
1952
1953
24
uint8_t* LWLightweightSubMessagePB::SerializeToArray(uint8_t* out) const {
1954
24
  if (has_sf32()) {
1955
24
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32, int32_t>, 13>(sf32_, out);
1956
24
  }
1957
24
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>, 16>(rsi32_, out);
1958
24
  if (has_str()) {
1959
24
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 26>(str_, out);
1960
24
  }
1961
24
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>, 34>(rbytes_, out);
1962
24
  if (has_cycle()) {
1963
12
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 42>(*cycle_, out);
1964
12
  }
1965
24
  return out;
1966
24
}
1967
1968
48
size_t LWLightweightSubMessagePB::SerializedSize() const {
1969
48
  size_t result = 0;
1970
48
  if (has_sf32()) {
1971
48
    result += 5;
1972
48
  }
1973
48
  {
1974
48
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>, 1>(rsi32_);
1975
48
  }
1976
48
  if (has_str()) {
1977
48
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(str_);
1978
48
  }
1979
48
  {
1980
48
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>, 1>(rbytes_);
1981
48
  }
1982
48
  if (has_cycle()) {
1983
24
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 1>(*cycle_);
1984
24
  }
1985
48
  cached_size_ = result;
1986
48
  return result;
1987
48
}
1988
1989
59
void LWLightweightSubMessagePB::ToGoogleProtobuf(LightweightSubMessagePB* out) const {
1990
59
  if (has_sf32()) {
1991
59
    out->set_sf32(sf32_);
1992
0
  } else {
1993
0
    out->clear_sf32();
1994
0
  }
1995
59
  {
1996
59
    auto& repeated = *out->mutable_rsi32();
1997
59
    repeated.Clear();
1998
59
    repeated.Reserve(narrow_cast<int>(rsi32_.size()));
1999
767
    for (const auto& entry : rsi32_) {
2000
767
      repeated.Add(entry);
2001
767
    }
2002
59
  }
2003
59
  if (has_str()) {
2004
59
    out->set_str(str_.cdata(), str_.size());
2005
0
  } else {
2006
0
    out->clear_str();
2007
0
  }
2008
59
  {
2009
59
    auto& repeated = *out->mutable_rbytes();
2010
59
    repeated.Clear();
2011
59
    repeated.Reserve(narrow_cast<int>(rbytes_.size()));
2012
649
    for (const auto& entry : rbytes_) {
2013
649
      repeated.Add()->assign(entry.cdata(), entry.size());
2014
649
    }
2015
59
  }
2016
59
  if (has_cycle()) {
2017
30
    cycle().ToGoogleProtobuf(out->mutable_cycle());
2018
30
  }
2019
59
}
2020
2021
LWLightweightPairPB::LWLightweightPairPB(::yb::Arena* arena)
2022
39
    : arena_(*arena) {
2023
39
}
2024
2025
LWLightweightPairPB::LWLightweightPairPB(::yb::Arena* arena, const LWLightweightPairPB& rhs)
2026
    : arena_(*arena),
2027
      has_fields_(rhs.has_fields_),
2028
      s1_(arena->DupSlice(rhs.s1_)),
2029
0
      s2_(arena->DupSlice(rhs.s2_)) {
2030
0
}
2031
2032
65
void LWLightweightPairPB::AppendToDebugString(std::string* out) const {
2033
65
  bool first = true;if (has_s1()) {
2034
65
    ::yb::rpc::AppendFieldTitle("s1", ": \"", &first, out);
2035
65
    *out += s1().ToBuffer();
2036
65
    *out += '"';
2037
65
  }
2038
65
  if (has_s2()) {
2039
65
    ::yb::rpc::AppendFieldTitle("s2", ": \"", &first, out);
2040
65
    *out += s2().ToBuffer();
2041
65
    *out += '"';
2042
65
  }
2043
65
}
2044
2045
0
void LWLightweightPairPB::Clear() {
2046
0
  clear_s1();
2047
0
  clear_s2();
2048
0
}
2049
2050
0
void LWLightweightPairPB::CopyFrom(const LWLightweightPairPB& rhs) {
2051
0
  if (rhs.has_s1()) {
2052
0
    s1_ = arena_.DupSlice(rhs.s1_);
2053
0
  } else {
2054
0
    clear_s1();
2055
0
  }
2056
0
  if (rhs.has_s2()) {
2057
0
    s2_ = arena_.DupSlice(rhs.s2_);
2058
0
  } else {
2059
0
    clear_s2();
2060
0
  }
2061
0
  has_fields_ = rhs.has_fields_;
2062
0
}
2063
2064
13
void LWLightweightPairPB::CopyFrom(const LightweightPairPB& rhs) {
2065
13
  if (rhs.has_s1()) {
2066
13
    s1_ = arena_.DupSlice(rhs.s1());
2067
13
    has_fields_.Set(LightweightPairPBFields::kS1);
2068
0
  } else {
2069
0
    clear_s1();
2070
0
  }
2071
13
  if (rhs.has_s2()) {
2072
13
    s2_ = arena_.DupSlice(rhs.s2());
2073
13
    has_fields_.Set(LightweightPairPBFields::kS2);
2074
0
  } else {
2075
0
    clear_s2();
2076
0
  }
2077
13
}
2078
2079
13
Status LWLightweightPairPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
2080
39
  for (;;) {
2081
39
    auto p = input->ReadTagWithCutoffNoLastTag(31);
2082
39
    if (!p.second && !p.first) {
2083
13
      return Status::OK();
2084
13
    }
2085
26
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
2086
13
      case 1: { // s1
2087
13
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_s1())) {
2088
0
          return ::yb::rpc::ParseFailed("s1");
2089
0
        }
2090
13
        break;
2091
13
      }
2092
13
      case 2: { // s2
2093
13
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_s2())) {
2094
0
          return ::yb::rpc::ParseFailed("s2");
2095
0
        }
2096
13
        break;
2097
13
      }
2098
26
    }
2099
26
  }
2100
13
}
2101
2102
13
uint8_t* LWLightweightPairPB::SerializeToArray(uint8_t* out) const {
2103
13
  if (has_s1()) {
2104
13
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(s1_, out);
2105
13
  }
2106
13
  if (has_s2()) {
2107
13
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 18>(s2_, out);
2108
13
  }
2109
13
  return out;
2110
13
}
2111
2112
26
size_t LWLightweightPairPB::SerializedSize() const {
2113
26
  size_t result = 0;
2114
26
  if (has_s1()) {
2115
26
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(s1_);
2116
26
  }
2117
26
  if (has_s2()) {
2118
26
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(s2_);
2119
26
  }
2120
26
  cached_size_ = result;
2121
26
  return result;
2122
26
}
2123
2124
26
void LWLightweightPairPB::ToGoogleProtobuf(LightweightPairPB* out) const {
2125
26
  if (has_s1()) {
2126
26
    out->set_s1(s1_.cdata(), s1_.size());
2127
0
  } else {
2128
0
    out->clear_s1();
2129
0
  }
2130
26
  if (has_s2()) {
2131
26
    out->set_s2(s2_.cdata(), s2_.size());
2132
0
  } else {
2133
0
    out->clear_s2();
2134
0
  }
2135
26
}
2136
2137
LWLightweightRequestPB_LWMapEntry_DoNotUse::LWLightweightRequestPB_LWMapEntry_DoNotUse(::yb::Arena* arena)
2138
11
    : arena_(*arena) {
2139
11
}
2140
2141
LWLightweightRequestPB_LWMapEntry_DoNotUse::LWLightweightRequestPB_LWMapEntry_DoNotUse(::yb::Arena* arena, const LWLightweightRequestPB_LWMapEntry_DoNotUse& rhs)
2142
    : arena_(*arena),
2143
      has_fields_(rhs.has_fields_),
2144
      key_(arena->DupSlice(rhs.key_)),
2145
0
      value_(rhs.value_) {
2146
0
}
2147
2148
0
void LWLightweightRequestPB_LWMapEntry_DoNotUse::AppendToDebugString(std::string* out) const {
2149
0
  bool first = true;if (has_key()) {
2150
0
    ::yb::rpc::AppendFieldTitle("key", ": \"", &first, out);
2151
0
    *out += key().ToBuffer();
2152
0
    *out += '"';
2153
0
  }
2154
0
  if (has_value()) {
2155
0
    ::yb::rpc::AppendFieldTitle("value", ": ", &first, out);
2156
0
    *out += std::to_string(value());
2157
0
  }
2158
0
}
2159
2160
0
void LWLightweightRequestPB_LWMapEntry_DoNotUse::Clear() {
2161
0
  clear_key();
2162
0
  clear_value();
2163
0
}
2164
2165
0
void LWLightweightRequestPB_LWMapEntry_DoNotUse::CopyFrom(const LWLightweightRequestPB_LWMapEntry_DoNotUse& rhs) {
2166
0
  {
2167
0
    key_ = arena_.DupSlice(rhs.key_);
2168
0
  }
2169
0
  {
2170
0
    value_ = rhs.value_;
2171
0
  }
2172
0
  has_fields_ = rhs.has_fields_;
2173
0
}
2174
2175
0
void LWLightweightRequestPB_LWMapEntry_DoNotUse::CopyFrom(const ::google::protobuf::MapPair<std::string, int64_t>& rhs) {
2176
0
  {
2177
0
    key_ = arena_.DupSlice(rhs.first);
2178
0
    has_fields_.Set(LightweightRequestPB_MapEntry_DoNotUseFields::kKey);
2179
0
  }
2180
0
  {
2181
0
    value_ = rhs.second;
2182
0
    has_fields_.Set(LightweightRequestPB_MapEntry_DoNotUseFields::kValue);
2183
0
  }
2184
0
}
2185
2186
11
Status LWLightweightRequestPB_LWMapEntry_DoNotUse::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
2187
33
  for (;;) {
2188
33
    auto p = input->ReadTagWithCutoffNoLastTag(31);
2189
33
    if (!p.second && !p.first) {
2190
11
      return Status::OK();
2191
11
    }
2192
22
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
2193
11
      case 1: { // key
2194
11
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_key())) {
2195
0
          return ::yb::rpc::ParseFailed("key");
2196
0
        }
2197
11
        break;
2198
11
      }
2199
11
      case 2: { // value
2200
11
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>::Read(input, mutable_value())) {
2201
0
          return ::yb::rpc::ParseFailed("value");
2202
0
        }
2203
11
        break;
2204
11
      }
2205
22
    }
2206
22
  }
2207
11
}
2208
2209
0
uint8_t* LWLightweightRequestPB_LWMapEntry_DoNotUse::SerializeToArray(uint8_t* out) const {
2210
0
  if (has_key()) {
2211
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(key_, out);
2212
0
  }
2213
0
  if (has_value()) {
2214
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>, 16>(value_, out);
2215
0
  }
2216
0
  return out;
2217
0
}
2218
2219
0
size_t LWLightweightRequestPB_LWMapEntry_DoNotUse::SerializedSize() const {
2220
0
  size_t result = 0;
2221
0
  if (has_key()) {
2222
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(key_);
2223
0
  }
2224
0
  if (has_value()) {
2225
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>, 1>(value_);
2226
0
  }
2227
0
  cached_size_ = result;
2228
0
  return result;
2229
0
}
2230
2231
LWLightweightRequestPB::LWLightweightRequestPB(::yb::Arena* arena)
2232
    : arena_(*arena),
2233
      ru32_(arena),
2234
      rf32_(arena),
2235
      rstr_(arena),
2236
      message_(arena),
2237
      repeated_messages_(arena),
2238
      packed_u64_(arena),
2239
      packed_f32_(arena),
2240
      pairs_(arena),
2241
      map_(arena),
2242
2
      extra_data_(arena) {
2243
2
}
2244
2245
LWLightweightRequestPB::LWLightweightRequestPB(::yb::Arena* arena, const LWLightweightRequestPB& rhs)
2246
    : arena_(*arena),
2247
      has_fields_(rhs.has_fields_),
2248
      i32_(rhs.i32_),
2249
      i64_(rhs.i64_),
2250
      f32_(rhs.f32_),
2251
      f64_(rhs.f64_),
2252
      u32_(rhs.u32_),
2253
      u64_(rhs.u64_),
2254
      r32_(rhs.r32_),
2255
      r64_(rhs.r64_),
2256
      str_(arena->DupSlice(rhs.str_)),
2257
      bytes_(arena->DupSlice(rhs.bytes_)),
2258
      en_(rhs.en_),
2259
      sf32_(rhs.sf32_),
2260
      sf64_(rhs.sf64_),
2261
      si32_(rhs.si32_),
2262
      si64_(rhs.si64_),
2263
      ru32_(rhs.ru32_.begin(), rhs.ru32_.end(), arena),
2264
      rf32_(rhs.rf32_.begin(), rhs.rf32_.end(), arena),
2265
      rstr_(arena),
2266
      message_(arena, rhs.message_),
2267
      repeated_messages_(arena, rhs.repeated_messages_),
2268
      packed_u64_(rhs.packed_u64_.begin(), rhs.packed_u64_.end(), arena),
2269
      packed_f32_(rhs.packed_f32_.begin(), rhs.packed_f32_.end(), arena),
2270
      pairs_(arena, rhs.pairs_),
2271
      ptr_message_(rhs.ptr_message_ ? arena->NewObject<::yb::rpc_test::LWLightweightSubMessagePB>(arena, *rhs.ptr_message_) : nullptr),
2272
      map_(arena, rhs.map_),
2273
0
      extra_data_(arena, rhs.extra_data_) {
2274
0
  rstr_.reserve(rhs.rstr_.size());
2275
0
  for (const auto& entry : rhs.rstr_) {
2276
0
    rstr_.push_back(arena->DupSlice(entry));
2277
0
  }
2278
0
}
2279
2280
3
void LWLightweightRequestPB::AppendToDebugString(std::string* out) const {
2281
3
  bool first = true;if (has_i32()) {
2282
3
    ::yb::rpc::AppendFieldTitle("i32", ": ", &first, out);
2283
3
    *out += std::to_string(i32());
2284
3
  }
2285
3
  if (has_i64()) {
2286
3
    ::yb::rpc::AppendFieldTitle("i64", ": ", &first, out);
2287
3
    *out += std::to_string(i64());
2288
3
  }
2289
3
  if (has_f32()) {
2290
3
    ::yb::rpc::AppendFieldTitle("f32", ": ", &first, out);
2291
3
    *out += std::to_string(f32());
2292
3
  }
2293
3
  if (has_f64()) {
2294
3
    ::yb::rpc::AppendFieldTitle("f64", ": ", &first, out);
2295
3
    *out += std::to_string(f64());
2296
3
  }
2297
3
  if (has_u32()) {
2298
3
    ::yb::rpc::AppendFieldTitle("u32", ": ", &first, out);
2299
3
    *out += std::to_string(u32());
2300
3
  }
2301
3
  if (has_u64()) {
2302
3
    ::yb::rpc::AppendFieldTitle("u64", ": ", &first, out);
2303
3
    *out += std::to_string(u64());
2304
3
  }
2305
3
  if (has_r32()) {
2306
3
    ::yb::rpc::AppendFieldTitle("r32", ": ", &first, out);
2307
3
    *out += ::SimpleFtoa(r32());
2308
3
  }
2309
3
  if (has_r64()) {
2310
3
    ::yb::rpc::AppendFieldTitle("r64", ": ", &first, out);
2311
3
    *out += ::SimpleDtoa(r64());
2312
3
  }
2313
3
  if (has_str()) {
2314
3
    ::yb::rpc::AppendFieldTitle("str", ": \"", &first, out);
2315
3
    *out += str().ToBuffer();
2316
3
    *out += '"';
2317
3
  }
2318
3
  if (has_bytes()) {
2319
3
    ::yb::rpc::AppendFieldTitle("bytes", ": \"", &first, out);
2320
3
    *out += bytes().ToBuffer();
2321
3
    *out += '"';
2322
3
  }
2323
3
  if (has_en()) {
2324
3
    ::yb::rpc::AppendFieldTitle("en", ": ", &first, out);
2325
3
    *out += ::yb::rpc_test::LightweightEnum_Name(en());
2326
3
  }
2327
3
  if (has_sf32()) {
2328
3
    ::yb::rpc::AppendFieldTitle("sf32", ": ", &first, out);
2329
3
    *out += std::to_string(sf32());
2330
3
  }
2331
3
  if (has_sf64()) {
2332
3
    ::yb::rpc::AppendFieldTitle("sf64", ": ", &first, out);
2333
3
    *out += std::to_string(sf64());
2334
3
  }
2335
3
  if (has_si32()) {
2336
3
    ::yb::rpc::AppendFieldTitle("si32", ": ", &first, out);
2337
3
    *out += std::to_string(si32());
2338
3
  }
2339
3
  if (has_si64()) {
2340
3
    ::yb::rpc::AppendFieldTitle("si64", ": ", &first, out);
2341
3
    *out += std::to_string(si64());
2342
3
  }
2343
30
  for (const auto& entry : ru32_) {
2344
30
    ::yb::rpc::AppendFieldTitle("ru32", ": ", &first, out);
2345
30
    *out += std::to_string(entry);
2346
30
  }
2347
60
  for (const auto& entry : rf32_) {
2348
60
    ::yb::rpc::AppendFieldTitle("rf32", ": ", &first, out);
2349
60
    *out += std::to_string(entry);
2350
60
  }
2351
21
  for (const auto& entry : rstr_) {
2352
21
    ::yb::rpc::AppendFieldTitle("rstr", ": \"", &first, out);
2353
21
    *out += entry.ToBuffer();
2354
21
    *out += '"';
2355
21
  }
2356
3
  if (has_message()) {
2357
3
    ::yb::rpc::AppendFieldTitle("message", " { ", &first, out);
2358
3
    message().AppendToDebugString(out);
2359
3
    *out += " }";
2360
3
  }
2361
15
  for (const auto& entry : repeated_messages_) {
2362
15
    ::yb::rpc::AppendFieldTitle("repeated_messages", " { ", &first, out);
2363
15
    entry.AppendToDebugString(out);
2364
15
    *out += " }";
2365
15
  }
2366
381
  for (const auto& entry : packed_u64_) {
2367
381
    ::yb::rpc::AppendFieldTitle("packed_u64", ": ", &first, out);
2368
381
    *out += std::to_string(entry);
2369
381
  }
2370
111
  for (const auto& entry : packed_f32_) {
2371
111
    ::yb::rpc::AppendFieldTitle("packed_f32", ": ", &first, out);
2372
111
    *out += std::to_string(entry);
2373
111
  }
2374
39
  for (const auto& entry : pairs_) {
2375
39
    ::yb::rpc::AppendFieldTitle("pairs", " { ", &first, out);
2376
39
    entry.AppendToDebugString(out);
2377
39
    *out += " }";
2378
39
  }
2379
3
  if (has_ptr_message()) {
2380
3
    ::yb::rpc::AppendFieldTitle("ptr_message", " { ", &first, out);
2381
3
    ptr_message().AppendToDebugString(out);
2382
3
    *out += " }";
2383
3
  }
2384
0
  for (const auto& entry : map_) {
2385
0
    ::yb::rpc::AppendFieldTitle("map", " { ", &first, out);
2386
0
    entry.AppendToDebugString(out);
2387
0
    *out += " }";
2388
0
  }
2389
3
  if (has_extra_data()) {
2390
0
    ::yb::rpc::AppendFieldTitle("extra_data", " { ", &first, out);
2391
0
    extra_data().AppendToDebugString(out);
2392
0
    *out += " }";
2393
0
  }
2394
3
}
2395
2396
0
void LWLightweightRequestPB::Clear() {
2397
0
  clear_i32();
2398
0
  clear_i64();
2399
0
  clear_f32();
2400
0
  clear_f64();
2401
0
  clear_u32();
2402
0
  clear_u64();
2403
0
  clear_r32();
2404
0
  clear_r64();
2405
0
  clear_str();
2406
0
  clear_bytes();
2407
0
  clear_en();
2408
0
  clear_sf32();
2409
0
  clear_sf64();
2410
0
  clear_si32();
2411
0
  clear_si64();
2412
0
  ru32_.clear();
2413
0
  rf32_.clear();
2414
0
  rstr_.clear();
2415
0
  clear_message();
2416
0
  repeated_messages_.clear();
2417
0
  packed_u64_.clear();
2418
0
  packed_f32_.clear();
2419
0
  pairs_.clear();
2420
0
  clear_ptr_message();
2421
0
  map_.clear();
2422
0
  clear_extra_data();
2423
0
}
2424
2425
0
void LWLightweightRequestPB::CopyFrom(const LWLightweightRequestPB& rhs) {
2426
0
  if (rhs.has_i32()) {
2427
0
    i32_ = rhs.i32_;
2428
0
  } else {
2429
0
    clear_i32();
2430
0
  }
2431
0
  if (rhs.has_i64()) {
2432
0
    i64_ = rhs.i64_;
2433
0
  } else {
2434
0
    clear_i64();
2435
0
  }
2436
0
  if (rhs.has_f32()) {
2437
0
    f32_ = rhs.f32_;
2438
0
  } else {
2439
0
    clear_f32();
2440
0
  }
2441
0
  if (rhs.has_f64()) {
2442
0
    f64_ = rhs.f64_;
2443
0
  } else {
2444
0
    clear_f64();
2445
0
  }
2446
0
  if (rhs.has_u32()) {
2447
0
    u32_ = rhs.u32_;
2448
0
  } else {
2449
0
    clear_u32();
2450
0
  }
2451
0
  if (rhs.has_u64()) {
2452
0
    u64_ = rhs.u64_;
2453
0
  } else {
2454
0
    clear_u64();
2455
0
  }
2456
0
  if (rhs.has_r32()) {
2457
0
    r32_ = rhs.r32_;
2458
0
  } else {
2459
0
    clear_r32();
2460
0
  }
2461
0
  if (rhs.has_r64()) {
2462
0
    r64_ = rhs.r64_;
2463
0
  } else {
2464
0
    clear_r64();
2465
0
  }
2466
0
  if (rhs.has_str()) {
2467
0
    str_ = arena_.DupSlice(rhs.str_);
2468
0
  } else {
2469
0
    clear_str();
2470
0
  }
2471
0
  if (rhs.has_bytes()) {
2472
0
    bytes_ = arena_.DupSlice(rhs.bytes_);
2473
0
  } else {
2474
0
    clear_bytes();
2475
0
  }
2476
0
  if (rhs.has_en()) {
2477
0
    en_ = rhs.en_;
2478
0
  } else {
2479
0
    clear_en();
2480
0
  }
2481
0
  if (rhs.has_sf32()) {
2482
0
    sf32_ = rhs.sf32_;
2483
0
  } else {
2484
0
    clear_sf32();
2485
0
  }
2486
0
  if (rhs.has_sf64()) {
2487
0
    sf64_ = rhs.sf64_;
2488
0
  } else {
2489
0
    clear_sf64();
2490
0
  }
2491
0
  if (rhs.has_si32()) {
2492
0
    si32_ = rhs.si32_;
2493
0
  } else {
2494
0
    clear_si32();
2495
0
  }
2496
0
  if (rhs.has_si64()) {
2497
0
    si64_ = rhs.si64_;
2498
0
  } else {
2499
0
    clear_si64();
2500
0
  }
2501
0
  ru32_ = rhs.ru32_;
2502
0
  rf32_ = rhs.rf32_;
2503
0
  rstr_.reserve(rhs.rstr_.size());
2504
0
  for (const auto& entry : rhs.rstr_) {
2505
0
    rstr_.push_back(arena_.DupSlice(entry));
2506
0
  }
2507
0
  if (rhs.has_message()) {
2508
0
    message_.CopyFrom(rhs.message_);
2509
0
  } else {
2510
0
    clear_message();
2511
0
  }
2512
0
  repeated_messages_ = rhs.repeated_messages_;
2513
0
  packed_u64_ = rhs.packed_u64_;
2514
0
  packed_f32_ = rhs.packed_f32_;
2515
0
  pairs_ = rhs.pairs_;
2516
0
  if (rhs.ptr_message_) {
2517
0
    mutable_ptr_message()->CopyFrom(*rhs.ptr_message_);
2518
0
  } else {
2519
0
    clear_ptr_message();
2520
0
  }
2521
0
  map_ = rhs.map_;
2522
0
  if (rhs.has_extra_data()) {
2523
0
    extra_data_.CopyFrom(rhs.extra_data_);
2524
0
  } else {
2525
0
    clear_extra_data();
2526
0
  }
2527
0
  has_fields_ = rhs.has_fields_;
2528
0
}
2529
2530
1
void LWLightweightRequestPB::CopyFrom(const LightweightRequestPB& rhs) {
2531
1
  if (rhs.has_i32()) {
2532
1
    i32_ = rhs.i32();
2533
1
    has_fields_.Set(LightweightRequestPBFields::kI32);
2534
0
  } else {
2535
0
    clear_i32();
2536
0
  }
2537
1
  if (rhs.has_i64()) {
2538
1
    i64_ = rhs.i64();
2539
1
    has_fields_.Set(LightweightRequestPBFields::kI64);
2540
0
  } else {
2541
0
    clear_i64();
2542
0
  }
2543
1
  if (rhs.has_f32()) {
2544
1
    f32_ = rhs.f32();
2545
1
    has_fields_.Set(LightweightRequestPBFields::kF32);
2546
0
  } else {
2547
0
    clear_f32();
2548
0
  }
2549
1
  if (rhs.has_f64()) {
2550
1
    f64_ = rhs.f64();
2551
1
    has_fields_.Set(LightweightRequestPBFields::kF64);
2552
0
  } else {
2553
0
    clear_f64();
2554
0
  }
2555
1
  if (rhs.has_u32()) {
2556
1
    u32_ = rhs.u32();
2557
1
    has_fields_.Set(LightweightRequestPBFields::kU32);
2558
0
  } else {
2559
0
    clear_u32();
2560
0
  }
2561
1
  if (rhs.has_u64()) {
2562
1
    u64_ = rhs.u64();
2563
1
    has_fields_.Set(LightweightRequestPBFields::kU64);
2564
0
  } else {
2565
0
    clear_u64();
2566
0
  }
2567
1
  if (rhs.has_r32()) {
2568
1
    r32_ = rhs.r32();
2569
1
    has_fields_.Set(LightweightRequestPBFields::kR32);
2570
0
  } else {
2571
0
    clear_r32();
2572
0
  }
2573
1
  if (rhs.has_r64()) {
2574
1
    r64_ = rhs.r64();
2575
1
    has_fields_.Set(LightweightRequestPBFields::kR64);
2576
0
  } else {
2577
0
    clear_r64();
2578
0
  }
2579
1
  if (rhs.has_str()) {
2580
1
    str_ = arena_.DupSlice(rhs.str());
2581
1
    has_fields_.Set(LightweightRequestPBFields::kStr);
2582
0
  } else {
2583
0
    clear_str();
2584
0
  }
2585
1
  if (rhs.has_bytes()) {
2586
1
    bytes_ = arena_.DupSlice(rhs.bytes());
2587
1
    has_fields_.Set(LightweightRequestPBFields::kBytes);
2588
0
  } else {
2589
0
    clear_bytes();
2590
0
  }
2591
1
  if (rhs.has_en()) {
2592
1
    en_ = rhs.en();
2593
1
    has_fields_.Set(LightweightRequestPBFields::kEn);
2594
0
  } else {
2595
0
    clear_en();
2596
0
  }
2597
1
  if (rhs.has_sf32()) {
2598
1
    sf32_ = rhs.sf32();
2599
1
    has_fields_.Set(LightweightRequestPBFields::kSf32);
2600
0
  } else {
2601
0
    clear_sf32();
2602
0
  }
2603
1
  if (rhs.has_sf64()) {
2604
1
    sf64_ = rhs.sf64();
2605
1
    has_fields_.Set(LightweightRequestPBFields::kSf64);
2606
0
  } else {
2607
0
    clear_sf64();
2608
0
  }
2609
1
  if (rhs.has_si32()) {
2610
1
    si32_ = rhs.si32();
2611
1
    has_fields_.Set(LightweightRequestPBFields::kSi32);
2612
0
  } else {
2613
0
    clear_si32();
2614
0
  }
2615
1
  if (rhs.has_si64()) {
2616
1
    si64_ = rhs.si64();
2617
1
    has_fields_.Set(LightweightRequestPBFields::kSi64);
2618
0
  } else {
2619
0
    clear_si64();
2620
0
  }
2621
1
  ru32_.assign(rhs.ru32().begin(), rhs.ru32().end());
2622
1
  rf32_.assign(rhs.rf32().begin(), rhs.rf32().end());
2623
1
  rstr_.reserve(rhs.rstr().size());
2624
7
  for (const auto& entry : rhs.rstr()) {
2625
7
    rstr_.push_back(arena_.DupSlice(entry));
2626
7
  }
2627
1
  if (rhs.has_message()) {
2628
1
    message_.CopyFrom(rhs.message());
2629
1
    has_fields_.Set(LightweightRequestPBFields::kMessage);
2630
0
  } else {
2631
0
    clear_message();
2632
0
  }
2633
1
  repeated_messages_.assign(rhs.repeated_messages().begin(), rhs.repeated_messages().end());
2634
1
  packed_u64_.assign(rhs.packed_u64().begin(), rhs.packed_u64().end());
2635
1
  packed_f32_.assign(rhs.packed_f32().begin(), rhs.packed_f32().end());
2636
1
  pairs_.assign(rhs.pairs().begin(), rhs.pairs().end());
2637
1
  if (rhs.has_ptr_message()) {
2638
1
    mutable_ptr_message()->CopyFrom(rhs.ptr_message());
2639
0
  } else {
2640
0
    clear_ptr_message();
2641
0
  }
2642
1
  map_.assign(rhs.map().begin(), rhs.map().end());
2643
1
  if (rhs.has_extra_data()) {
2644
0
    extra_data_.CopyFrom(rhs.extra_data());
2645
0
    has_fields_.Set(LightweightRequestPBFields::kExtraData);
2646
1
  } else {
2647
1
    clear_extra_data();
2648
1
  }
2649
1
}
2650
2651
1
Status LWLightweightRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
2652
86
  for (;;) {
2653
86
    auto p = input->ReadTagWithCutoffNoLastTag(255);
2654
86
    if (!p.second && !p.first) {
2655
1
      return Status::OK();
2656
1
    }
2657
85
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
2658
1
      case 1: { // i32
2659
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>::Read(input, mutable_i32())) {
2660
0
          return ::yb::rpc::ParseFailed("i32");
2661
0
        }
2662
1
        break;
2663
1
      }
2664
1
      case 2: { // i64
2665
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>::Read(input, mutable_i64())) {
2666
0
          return ::yb::rpc::ParseFailed("i64");
2667
0
        }
2668
1
        break;
2669
1
      }
2670
1
      case 3: { // f32
2671
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, mutable_f32())) {
2672
0
          return ::yb::rpc::ParseFailed("f32");
2673
0
        }
2674
1
        break;
2675
1
      }
2676
1
      case 4: { // f64
2677
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED64, uint64_t>::Read(input, mutable_f64())) {
2678
0
          return ::yb::rpc::ParseFailed("f64");
2679
0
        }
2680
1
        break;
2681
1
      }
2682
1
      case 5: { // u32
2683
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_u32())) {
2684
0
          return ::yb::rpc::ParseFailed("u32");
2685
0
        }
2686
1
        break;
2687
1
      }
2688
1
      case 6: { // u64
2689
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, mutable_u64())) {
2690
0
          return ::yb::rpc::ParseFailed("u64");
2691
0
        }
2692
1
        break;
2693
1
      }
2694
1
      case 7: { // r32
2695
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FLOAT, float>::Read(input, mutable_r32())) {
2696
0
          return ::yb::rpc::ParseFailed("r32");
2697
0
        }
2698
1
        break;
2699
1
      }
2700
1
      case 8: { // r64
2701
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE, double>::Read(input, mutable_r64())) {
2702
0
          return ::yb::rpc::ParseFailed("r64");
2703
0
        }
2704
1
        break;
2705
1
      }
2706
1
      case 9: { // str
2707
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_str())) {
2708
0
          return ::yb::rpc::ParseFailed("str");
2709
0
        }
2710
1
        break;
2711
1
      }
2712
1
      case 10: { // bytes
2713
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>::Read(input, mutable_bytes())) {
2714
0
          return ::yb::rpc::ParseFailed("bytes");
2715
0
        }
2716
1
        break;
2717
1
      }
2718
1
      case 11: { // en
2719
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_ENUM, ::yb::rpc_test::LightweightEnum>::Read(input, mutable_en())) {
2720
0
          return ::yb::rpc::ParseFailed("en");
2721
0
        }
2722
1
        break;
2723
1
      }
2724
1
      case 12: { // sf32
2725
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32, int32_t>::Read(input, mutable_sf32())) {
2726
0
          return ::yb::rpc::ParseFailed("sf32");
2727
0
        }
2728
1
        break;
2729
1
      }
2730
1
      case 13: { // sf64
2731
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64, int64_t>::Read(input, mutable_sf64())) {
2732
0
          return ::yb::rpc::ParseFailed("sf64");
2733
0
        }
2734
1
        break;
2735
1
      }
2736
1
      case 14: { // si32
2737
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>::Read(input, mutable_si32())) {
2738
0
          return ::yb::rpc::ParseFailed("si32");
2739
0
        }
2740
1
        break;
2741
1
      }
2742
1
      case 15: { // si64
2743
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT64, int64_t>::Read(input, mutable_si64())) {
2744
0
          return ::yb::rpc::ParseFailed("si64");
2745
0
        }
2746
1
        break;
2747
1
      }
2748
10
      case 16: { // ru32
2749
10
        if (p.first == 130) {
2750
0
          int length;
2751
0
          if (!input->ReadVarintSizeAsInt(&length)) {
2752
0
            return ::yb::rpc::ParseFailed("ru32");
2753
0
          }
2754
0
          auto old_limit = input->PushLimit(length);
2755
0
          while (input->BytesUntilLimit() > 0) {
2756
0
            ru32_.emplace_back();
2757
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, &ru32_.back())) {
2758
0
              return ::yb::rpc::ParseFailed("ru32");
2759
0
            }
2760
0
          }
2761
2762
0
          input->PopLimit(old_limit);
2763
10
        } else {
2764
10
          ru32_.emplace_back();
2765
10
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, &ru32_.back())) {
2766
0
            return ::yb::rpc::ParseFailed("ru32");
2767
0
          }
2768
10
        }
2769
10
        break;
2770
10
      }
2771
20
      case 17: { // rf32
2772
20
        if (p.first == 138) {
2773
0
          int length;
2774
0
          if (!input->ReadVarintSizeAsInt(&length)) {
2775
0
            return ::yb::rpc::ParseFailed("rf32");
2776
0
          }
2777
0
          auto old_limit = input->PushLimit(length);
2778
0
          while (input->BytesUntilLimit() > 0) {
2779
0
            rf32_.emplace_back();
2780
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, &rf32_.back())) {
2781
0
              return ::yb::rpc::ParseFailed("rf32");
2782
0
            }
2783
0
          }
2784
2785
0
          input->PopLimit(old_limit);
2786
20
        } else {
2787
20
          rf32_.emplace_back();
2788
20
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, &rf32_.back())) {
2789
0
            return ::yb::rpc::ParseFailed("rf32");
2790
0
          }
2791
20
        }
2792
20
        break;
2793
20
      }
2794
7
      case 18: { // rstr
2795
7
        rstr_.emplace_back();
2796
7
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, &rstr_.back())) {
2797
0
          return ::yb::rpc::ParseFailed("rstr");
2798
0
        }
2799
7
        break;
2800
7
      }
2801
1
      case 19: { // message
2802
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>::Read(input, mutable_message())) {
2803
0
          return ::yb::rpc::ParseFailed("message");
2804
0
        }
2805
1
        break;
2806
1
      }
2807
5
      case 20: { // repeated_messages
2808
5
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>::Read(input, &repeated_messages_.emplace_back())) {
2809
0
          return ::yb::rpc::ParseFailed("repeated_messages");
2810
0
        }
2811
5
        break;
2812
5
      }
2813
1
      case 21: { // packed_u64
2814
1
        if (p.first == 170) {
2815
1
          int length;
2816
1
          if (!input->ReadVarintSizeAsInt(&length)) {
2817
0
            return ::yb::rpc::ParseFailed("packed_u64");
2818
0
          }
2819
1
          auto old_limit = input->PushLimit(length);
2820
128
          while (input->BytesUntilLimit() > 0) {
2821
127
            packed_u64_.emplace_back();
2822
127
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, &packed_u64_.back())) {
2823
0
              return ::yb::rpc::ParseFailed("packed_u64");
2824
0
            }
2825
127
          }
2826
2827
1
          input->PopLimit(old_limit);
2828
0
        } else {
2829
0
          packed_u64_.emplace_back();
2830
0
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, &packed_u64_.back())) {
2831
0
            return ::yb::rpc::ParseFailed("packed_u64");
2832
0
          }
2833
1
        }
2834
1
        break;
2835
1
      }
2836
1
      case 22: { // packed_f32
2837
1
        if (p.first == 178) {
2838
1
          int length;
2839
1
          if (!input->ReadVarintSizeAsInt(&length)) {
2840
0
            return ::yb::rpc::ParseFailed("packed_f32");
2841
0
          }
2842
1
          auto old_limit = input->PushLimit(length);
2843
38
          while (input->BytesUntilLimit() > 0) {
2844
37
            packed_f32_.emplace_back();
2845
37
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, &packed_f32_.back())) {
2846
0
              return ::yb::rpc::ParseFailed("packed_f32");
2847
0
            }
2848
37
          }
2849
2850
1
          input->PopLimit(old_limit);
2851
0
        } else {
2852
0
          packed_f32_.emplace_back();
2853
0
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, &packed_f32_.back())) {
2854
0
            return ::yb::rpc::ParseFailed("packed_f32");
2855
0
          }
2856
1
        }
2857
1
        break;
2858
1
      }
2859
13
      case 23: { // pairs
2860
13
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightPairPB>::Read(input, &pairs_.emplace_back())) {
2861
0
          return ::yb::rpc::ParseFailed("pairs");
2862
0
        }
2863
13
        break;
2864
13
      }
2865
1
      case 24: { // ptr_message
2866
1
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>::Read(input, mutable_ptr_message())) {
2867
0
          return ::yb::rpc::ParseFailed("ptr_message");
2868
0
        }
2869
1
        break;
2870
1
      }
2871
11
      case 25: { // map
2872
11
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightRequestPB_LWMapEntry_DoNotUse>::Read(input, &map_.emplace_back())) {
2873
0
          return ::yb::rpc::ParseFailed("map");
2874
0
        }
2875
11
        break;
2876
11
      }
2877
0
      case 26: { // extra_data
2878
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc::LWAny>::Read(input, mutable_extra_data())) {
2879
0
          return ::yb::rpc::ParseFailed("extra_data");
2880
0
        }
2881
0
        break;
2882
0
      }
2883
85
    }
2884
85
  }
2885
1
}
2886
2887
0
uint8_t* LWLightweightRequestPB::SerializeToArray(uint8_t* out) const {
2888
0
  if (has_i32()) {
2889
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 8>(i32_, out);
2890
0
  }
2891
0
  if (has_i64()) {
2892
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>, 16>(i64_, out);
2893
0
  }
2894
0
  if (has_f32()) {
2895
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>, 29>(f32_, out);
2896
0
  }
2897
0
  if (has_f64()) {
2898
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED64, uint64_t>, 33>(f64_, out);
2899
0
  }
2900
0
  if (has_u32()) {
2901
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 40>(u32_, out);
2902
0
  }
2903
0
  if (has_u64()) {
2904
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 48>(u64_, out);
2905
0
  }
2906
0
  if (has_r32()) {
2907
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FLOAT, float>, 61>(r32_, out);
2908
0
  }
2909
0
  if (has_r64()) {
2910
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE, double>, 65>(r64_, out);
2911
0
  }
2912
0
  if (has_str()) {
2913
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 74>(str_, out);
2914
0
  }
2915
0
  if (has_bytes()) {
2916
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>, 82>(bytes_, out);
2917
0
  }
2918
0
  if (has_en()) {
2919
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_ENUM, ::yb::rpc_test::LightweightEnum>, 88>(en_, out);
2920
0
  }
2921
0
  if (has_sf32()) {
2922
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32, int32_t>, 101>(sf32_, out);
2923
0
  }
2924
0
  if (has_sf64()) {
2925
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64, int64_t>, 105>(sf64_, out);
2926
0
  }
2927
0
  if (has_si32()) {
2928
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>, 112>(si32_, out);
2929
0
  }
2930
0
  if (has_si64()) {
2931
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT64, int64_t>, 120>(si64_, out);
2932
0
  }
2933
0
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 128>(ru32_, out);
2934
0
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>, 141>(rf32_, out);
2935
0
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 146>(rstr_, out);
2936
0
  if (has_message()) {
2937
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 154>(message_, out);
2938
0
  }
2939
0
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 162>(repeated_messages_, out);
2940
0
  out = ::yb::rpc::PackedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 170>(packed_u64_, packed_u64_cached_size_, out);
2941
0
  out = ::yb::rpc::PackedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>, 178>(packed_f32_, 4 * packed_f32_.size(), out);
2942
0
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightPairPB>, 186>(pairs_, out);
2943
0
  if (has_ptr_message()) {
2944
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 194>(*ptr_message_, out);
2945
0
  }
2946
0
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightRequestPB_LWMapEntry_DoNotUse>, 202>(map_, out);
2947
0
  if (has_extra_data()) {
2948
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc::LWAny>, 210>(extra_data_, out);
2949
0
  }
2950
0
  return out;
2951
0
}
2952
2953
0
size_t LWLightweightRequestPB::SerializedSize() const {
2954
0
  size_t result = 0;
2955
0
  if (has_i32()) {
2956
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 1>(i32_);
2957
0
  }
2958
0
  if (has_i64()) {
2959
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>, 1>(i64_);
2960
0
  }
2961
0
  if (has_f32()) {
2962
0
    result += 5;
2963
0
  }
2964
0
  if (has_f64()) {
2965
0
    result += 9;
2966
0
  }
2967
0
  if (has_u32()) {
2968
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(u32_);
2969
0
  }
2970
0
  if (has_u64()) {
2971
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 1>(u64_);
2972
0
  }
2973
0
  if (has_r32()) {
2974
0
    result += 5;
2975
0
  }
2976
0
  if (has_r64()) {
2977
0
    result += 9;
2978
0
  }
2979
0
  if (has_str()) {
2980
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(str_);
2981
0
  }
2982
0
  if (has_bytes()) {
2983
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>, 1>(bytes_);
2984
0
  }
2985
0
  if (has_en()) {
2986
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_ENUM, ::yb::rpc_test::LightweightEnum>, 1>(en_);
2987
0
  }
2988
0
  if (has_sf32()) {
2989
0
    result += 5;
2990
0
  }
2991
0
  if (has_sf64()) {
2992
0
    result += 9;
2993
0
  }
2994
0
  if (has_si32()) {
2995
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>, 1>(si32_);
2996
0
  }
2997
0
  if (has_si64()) {
2998
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT64, int64_t>, 1>(si64_);
2999
0
  }
3000
0
  {
3001
0
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 2>(ru32_);
3002
0
  }
3003
0
  {
3004
0
    result += 6 * rf32_.size();
3005
0
  }
3006
0
  {
3007
0
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 2>(rstr_);
3008
0
  }
3009
0
  if (has_message()) {
3010
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 2>(message_);
3011
0
  }
3012
0
  {
3013
0
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 2>(repeated_messages_);
3014
0
  }
3015
0
  {
3016
0
    result += ::yb::rpc::PackedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 2>(packed_u64_, &packed_u64_cached_size_);
3017
0
  }
3018
0
  {
3019
0
    size_t body_size = 4 * packed_f32_.size();
3020
0
    result += 2 + ::google::protobuf::io::CodedOutputStream::VarintSize32(narrow_cast<uint32_t>(body_size)) + body_size;
3021
0
  }
3022
0
  {
3023
0
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightPairPB>, 2>(pairs_);
3024
0
  }
3025
0
  if (has_ptr_message()) {
3026
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 2>(*ptr_message_);
3027
0
  }
3028
0
  {
3029
0
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightRequestPB_LWMapEntry_DoNotUse>, 2>(map_);
3030
0
  }
3031
0
  if (has_extra_data()) {
3032
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc::LWAny>, 2>(extra_data_);
3033
0
  }
3034
0
  cached_size_ = result;
3035
0
  return result;
3036
0
}
3037
3038
0
void LWLightweightRequestPB::ToGoogleProtobuf(LightweightRequestPB* out) const {
3039
0
  if (has_i32()) {
3040
0
    out->set_i32(i32_);
3041
0
  } else {
3042
0
    out->clear_i32();
3043
0
  }
3044
0
  if (has_i64()) {
3045
0
    out->set_i64(i64_);
3046
0
  } else {
3047
0
    out->clear_i64();
3048
0
  }
3049
0
  if (has_f32()) {
3050
0
    out->set_f32(f32_);
3051
0
  } else {
3052
0
    out->clear_f32();
3053
0
  }
3054
0
  if (has_f64()) {
3055
0
    out->set_f64(f64_);
3056
0
  } else {
3057
0
    out->clear_f64();
3058
0
  }
3059
0
  if (has_u32()) {
3060
0
    out->set_u32(u32_);
3061
0
  } else {
3062
0
    out->clear_u32();
3063
0
  }
3064
0
  if (has_u64()) {
3065
0
    out->set_u64(u64_);
3066
0
  } else {
3067
0
    out->clear_u64();
3068
0
  }
3069
0
  if (has_r32()) {
3070
0
    out->set_r32(r32_);
3071
0
  } else {
3072
0
    out->clear_r32();
3073
0
  }
3074
0
  if (has_r64()) {
3075
0
    out->set_r64(r64_);
3076
0
  } else {
3077
0
    out->clear_r64();
3078
0
  }
3079
0
  if (has_str()) {
3080
0
    out->set_str(str_.cdata(), str_.size());
3081
0
  } else {
3082
0
    out->clear_str();
3083
0
  }
3084
0
  if (has_bytes()) {
3085
0
    out->set_bytes(bytes_.cdata(), bytes_.size());
3086
0
  } else {
3087
0
    out->clear_bytes();
3088
0
  }
3089
0
  if (has_en()) {
3090
0
    out->set_en(en_);
3091
0
  } else {
3092
0
    out->clear_en();
3093
0
  }
3094
0
  if (has_sf32()) {
3095
0
    out->set_sf32(sf32_);
3096
0
  } else {
3097
0
    out->clear_sf32();
3098
0
  }
3099
0
  if (has_sf64()) {
3100
0
    out->set_sf64(sf64_);
3101
0
  } else {
3102
0
    out->clear_sf64();
3103
0
  }
3104
0
  if (has_si32()) {
3105
0
    out->set_si32(si32_);
3106
0
  } else {
3107
0
    out->clear_si32();
3108
0
  }
3109
0
  if (has_si64()) {
3110
0
    out->set_si64(si64_);
3111
0
  } else {
3112
0
    out->clear_si64();
3113
0
  }
3114
0
  {
3115
0
    auto& repeated = *out->mutable_ru32();
3116
0
    repeated.Clear();
3117
0
    repeated.Reserve(narrow_cast<int>(ru32_.size()));
3118
0
    for (const auto& entry : ru32_) {
3119
0
      repeated.Add(entry);
3120
0
    }
3121
0
  }
3122
0
  {
3123
0
    auto& repeated = *out->mutable_rf32();
3124
0
    repeated.Clear();
3125
0
    repeated.Reserve(narrow_cast<int>(rf32_.size()));
3126
0
    for (const auto& entry : rf32_) {
3127
0
      repeated.Add(entry);
3128
0
    }
3129
0
  }
3130
0
  {
3131
0
    auto& repeated = *out->mutable_rstr();
3132
0
    repeated.Clear();
3133
0
    repeated.Reserve(narrow_cast<int>(rstr_.size()));
3134
0
    for (const auto& entry : rstr_) {
3135
0
      repeated.Add()->assign(entry.cdata(), entry.size());
3136
0
    }
3137
0
  }
3138
0
  if (has_message()) {
3139
0
    message().ToGoogleProtobuf(out->mutable_message());
3140
0
  }
3141
0
  repeated_messages().ToGoogleProtobuf(out->mutable_repeated_messages());
3142
0
  {
3143
0
    auto& repeated = *out->mutable_packed_u64();
3144
0
    repeated.Clear();
3145
0
    repeated.Reserve(narrow_cast<int>(packed_u64_.size()));
3146
0
    for (const auto& entry : packed_u64_) {
3147
0
      repeated.Add(entry);
3148
0
    }
3149
0
  }
3150
0
  {
3151
0
    auto& repeated = *out->mutable_packed_f32();
3152
0
    repeated.Clear();
3153
0
    repeated.Reserve(narrow_cast<int>(packed_f32_.size()));
3154
0
    for (const auto& entry : packed_f32_) {
3155
0
      repeated.Add(entry);
3156
0
    }
3157
0
  }
3158
0
  pairs().ToGoogleProtobuf(out->mutable_pairs());
3159
0
  if (has_ptr_message()) {
3160
0
    ptr_message().ToGoogleProtobuf(out->mutable_ptr_message());
3161
0
  }
3162
0
  {
3163
0
    auto& repeated = *out->mutable_map();
3164
0
    repeated.clear();
3165
0
    for (const auto& entry : map_) {
3166
0
      repeated[entry.key().ToBuffer()] = entry.value();
3167
0
    }
3168
0
  }
3169
0
  if (has_extra_data()) {
3170
0
    extra_data().ToGoogleProtobuf(out->mutable_extra_data());
3171
0
  }
3172
0
}
3173
3174
LWLightweightResponsePB_LWMapEntry_DoNotUse::LWLightweightResponsePB_LWMapEntry_DoNotUse(::yb::Arena* arena)
3175
11
    : arena_(*arena) {
3176
11
}
3177
3178
LWLightweightResponsePB_LWMapEntry_DoNotUse::LWLightweightResponsePB_LWMapEntry_DoNotUse(::yb::Arena* arena, const LWLightweightResponsePB_LWMapEntry_DoNotUse& rhs)
3179
    : arena_(*arena),
3180
      has_fields_(rhs.has_fields_),
3181
      key_(arena->DupSlice(rhs.key_)),
3182
0
      value_(rhs.value_) {
3183
0
}
3184
3185
0
void LWLightweightResponsePB_LWMapEntry_DoNotUse::AppendToDebugString(std::string* out) const {
3186
0
  bool first = true;if (has_key()) {
3187
0
    ::yb::rpc::AppendFieldTitle("key", ": \"", &first, out);
3188
0
    *out += key().ToBuffer();
3189
0
    *out += '"';
3190
0
  }
3191
0
  if (has_value()) {
3192
0
    ::yb::rpc::AppendFieldTitle("value", ": ", &first, out);
3193
0
    *out += std::to_string(value());
3194
0
  }
3195
0
}
3196
3197
0
void LWLightweightResponsePB_LWMapEntry_DoNotUse::Clear() {
3198
0
  clear_key();
3199
0
  clear_value();
3200
0
}
3201
3202
0
void LWLightweightResponsePB_LWMapEntry_DoNotUse::CopyFrom(const LWLightweightResponsePB_LWMapEntry_DoNotUse& rhs) {
3203
0
  {
3204
0
    key_ = arena_.DupSlice(rhs.key_);
3205
0
  }
3206
0
  {
3207
0
    value_ = rhs.value_;
3208
0
  }
3209
0
  has_fields_ = rhs.has_fields_;
3210
0
}
3211
3212
0
void LWLightweightResponsePB_LWMapEntry_DoNotUse::CopyFrom(const ::google::protobuf::MapPair<std::string, int64_t>& rhs) {
3213
0
  {
3214
0
    key_ = arena_.DupSlice(rhs.first);
3215
0
    has_fields_.Set(LightweightResponsePB_MapEntry_DoNotUseFields::kKey);
3216
0
  }
3217
0
  {
3218
0
    value_ = rhs.second;
3219
0
    has_fields_.Set(LightweightResponsePB_MapEntry_DoNotUseFields::kValue);
3220
0
  }
3221
0
}
3222
3223
0
Status LWLightweightResponsePB_LWMapEntry_DoNotUse::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
3224
0
  for (;;) {
3225
0
    auto p = input->ReadTagWithCutoffNoLastTag(31);
3226
0
    if (!p.second && !p.first) {
3227
0
      return Status::OK();
3228
0
    }
3229
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
3230
0
      case 1: { // key
3231
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_key())) {
3232
0
          return ::yb::rpc::ParseFailed("key");
3233
0
        }
3234
0
        break;
3235
0
      }
3236
0
      case 2: { // value
3237
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>::Read(input, mutable_value())) {
3238
0
          return ::yb::rpc::ParseFailed("value");
3239
0
        }
3240
0
        break;
3241
0
      }
3242
0
    }
3243
0
  }
3244
0
}
3245
3246
11
uint8_t* LWLightweightResponsePB_LWMapEntry_DoNotUse::SerializeToArray(uint8_t* out) const {
3247
11
  if (has_key()) {
3248
11
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 10>(key_, out);
3249
11
  }
3250
11
  if (has_value()) {
3251
11
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>, 16>(value_, out);
3252
11
  }
3253
11
  return out;
3254
11
}
3255
3256
22
size_t LWLightweightResponsePB_LWMapEntry_DoNotUse::SerializedSize() const {
3257
22
  size_t result = 0;
3258
22
  if (has_key()) {
3259
22
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(key_);
3260
22
  }
3261
22
  if (has_value()) {
3262
22
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>, 1>(value_);
3263
22
  }
3264
22
  cached_size_ = result;
3265
22
  return result;
3266
22
}
3267
3268
LWLightweightResponsePB::LWLightweightResponsePB(::yb::Arena* arena)
3269
    : arena_(*arena),
3270
      ru32_(arena),
3271
      rf32_(arena),
3272
      rstr_(arena),
3273
      message_(arena),
3274
      repeated_messages_(arena),
3275
      repeated_messages_copy_(arena),
3276
      packed_u64_(arena),
3277
      packed_f32_(arena),
3278
      pairs_(arena),
3279
1
      map_(arena) {
3280
1
}
3281
3282
LWLightweightResponsePB::LWLightweightResponsePB(::yb::Arena* arena, const LWLightweightResponsePB& rhs)
3283
    : arena_(*arena),
3284
      has_fields_(rhs.has_fields_),
3285
      i32_(rhs.i32_),
3286
      i64_(rhs.i64_),
3287
      f32_(rhs.f32_),
3288
      f64_(rhs.f64_),
3289
      u32_(rhs.u32_),
3290
      u64_(rhs.u64_),
3291
      r32_(rhs.r32_),
3292
      r64_(rhs.r64_),
3293
      str_(arena->DupSlice(rhs.str_)),
3294
      bytes_(arena->DupSlice(rhs.bytes_)),
3295
      en_(rhs.en_),
3296
      sf32_(rhs.sf32_),
3297
      sf64_(rhs.sf64_),
3298
      si32_(rhs.si32_),
3299
      si64_(rhs.si64_),
3300
      ru32_(rhs.ru32_.begin(), rhs.ru32_.end(), arena),
3301
      rf32_(rhs.rf32_.begin(), rhs.rf32_.end(), arena),
3302
      rstr_(arena),
3303
      message_(arena, rhs.message_),
3304
      repeated_messages_(arena, rhs.repeated_messages_),
3305
      repeated_messages_copy_(arena, rhs.repeated_messages_copy_),
3306
      packed_u64_(rhs.packed_u64_.begin(), rhs.packed_u64_.end(), arena),
3307
      packed_f32_(rhs.packed_f32_.begin(), rhs.packed_f32_.end(), arena),
3308
      pairs_(arena, rhs.pairs_),
3309
      ptr_message_(rhs.ptr_message_ ? arena->NewObject<::yb::rpc_test::LWLightweightSubMessagePB>(arena, *rhs.ptr_message_) : nullptr),
3310
      map_(arena, rhs.map_),
3311
0
      short_debug_string_(arena->DupSlice(rhs.short_debug_string_)) {
3312
0
  rstr_.reserve(rhs.rstr_.size());
3313
0
  for (const auto& entry : rhs.rstr_) {
3314
0
    rstr_.push_back(arena->DupSlice(entry));
3315
0
  }
3316
0
}
3317
3318
2
void LWLightweightResponsePB::AppendToDebugString(std::string* out) const {
3319
2
  bool first = true;if (has_i32()) {
3320
2
    ::yb::rpc::AppendFieldTitle("i32", ": ", &first, out);
3321
2
    *out += std::to_string(i32());
3322
2
  }
3323
2
  if (has_i64()) {
3324
2
    ::yb::rpc::AppendFieldTitle("i64", ": ", &first, out);
3325
2
    *out += std::to_string(i64());
3326
2
  }
3327
2
  if (has_f32()) {
3328
2
    ::yb::rpc::AppendFieldTitle("f32", ": ", &first, out);
3329
2
    *out += std::to_string(f32());
3330
2
  }
3331
2
  if (has_f64()) {
3332
2
    ::yb::rpc::AppendFieldTitle("f64", ": ", &first, out);
3333
2
    *out += std::to_string(f64());
3334
2
  }
3335
2
  if (has_u32()) {
3336
2
    ::yb::rpc::AppendFieldTitle("u32", ": ", &first, out);
3337
2
    *out += std::to_string(u32());
3338
2
  }
3339
2
  if (has_u64()) {
3340
2
    ::yb::rpc::AppendFieldTitle("u64", ": ", &first, out);
3341
2
    *out += std::to_string(u64());
3342
2
  }
3343
2
  if (has_r32()) {
3344
2
    ::yb::rpc::AppendFieldTitle("r32", ": ", &first, out);
3345
2
    *out += ::SimpleFtoa(r32());
3346
2
  }
3347
2
  if (has_r64()) {
3348
2
    ::yb::rpc::AppendFieldTitle("r64", ": ", &first, out);
3349
2
    *out += ::SimpleDtoa(r64());
3350
2
  }
3351
2
  if (has_str()) {
3352
2
    ::yb::rpc::AppendFieldTitle("str", ": \"", &first, out);
3353
2
    *out += str().ToBuffer();
3354
2
    *out += '"';
3355
2
  }
3356
2
  if (has_bytes()) {
3357
2
    ::yb::rpc::AppendFieldTitle("bytes", ": \"", &first, out);
3358
2
    *out += bytes().ToBuffer();
3359
2
    *out += '"';
3360
2
  }
3361
2
  if (has_en()) {
3362
2
    ::yb::rpc::AppendFieldTitle("en", ": ", &first, out);
3363
2
    *out += ::yb::rpc_test::LightweightEnum_Name(en());
3364
2
  }
3365
2
  if (has_sf32()) {
3366
2
    ::yb::rpc::AppendFieldTitle("sf32", ": ", &first, out);
3367
2
    *out += std::to_string(sf32());
3368
2
  }
3369
2
  if (has_sf64()) {
3370
2
    ::yb::rpc::AppendFieldTitle("sf64", ": ", &first, out);
3371
2
    *out += std::to_string(sf64());
3372
2
  }
3373
2
  if (has_si32()) {
3374
2
    ::yb::rpc::AppendFieldTitle("si32", ": ", &first, out);
3375
2
    *out += std::to_string(si32());
3376
2
  }
3377
2
  if (has_si64()) {
3378
2
    ::yb::rpc::AppendFieldTitle("si64", ": ", &first, out);
3379
2
    *out += std::to_string(si64());
3380
2
  }
3381
40
  for (const auto& entry : ru32_) {
3382
40
    ::yb::rpc::AppendFieldTitle("ru32", ": ", &first, out);
3383
40
    *out += std::to_string(entry);
3384
40
  }
3385
20
  for (const auto& entry : rf32_) {
3386
20
    ::yb::rpc::AppendFieldTitle("rf32", ": ", &first, out);
3387
20
    *out += std::to_string(entry);
3388
20
  }
3389
14
  for (const auto& entry : rstr_) {
3390
14
    ::yb::rpc::AppendFieldTitle("rstr", ": \"", &first, out);
3391
14
    *out += entry.ToBuffer();
3392
14
    *out += '"';
3393
14
  }
3394
2
  if (has_message()) {
3395
2
    ::yb::rpc::AppendFieldTitle("message", " { ", &first, out);
3396
2
    message().AppendToDebugString(out);
3397
2
    *out += " }";
3398
2
  }
3399
10
  for (const auto& entry : repeated_messages_) {
3400
10
    ::yb::rpc::AppendFieldTitle("repeated_messages", " { ", &first, out);
3401
10
    entry.AppendToDebugString(out);
3402
10
    *out += " }";
3403
10
  }
3404
254
  for (const auto& entry : packed_u64_) {
3405
254
    ::yb::rpc::AppendFieldTitle("packed_u64", ": ", &first, out);
3406
254
    *out += std::to_string(entry);
3407
254
  }
3408
74
  for (const auto& entry : packed_f32_) {
3409
74
    ::yb::rpc::AppendFieldTitle("packed_f32", ": ", &first, out);
3410
74
    *out += std::to_string(entry);
3411
74
  }
3412
26
  for (const auto& entry : pairs_) {
3413
26
    ::yb::rpc::AppendFieldTitle("pairs", " { ", &first, out);
3414
26
    entry.AppendToDebugString(out);
3415
26
    *out += " }";
3416
26
  }
3417
2
  if (has_ptr_message()) {
3418
2
    ::yb::rpc::AppendFieldTitle("ptr_message", " { ", &first, out);
3419
2
    ptr_message().AppendToDebugString(out);
3420
2
    *out += " }";
3421
2
  }
3422
0
  for (const auto& entry : map_) {
3423
0
    ::yb::rpc::AppendFieldTitle("map", " { ", &first, out);
3424
0
    entry.AppendToDebugString(out);
3425
0
    *out += " }";
3426
0
  }
3427
2
  if (has_short_debug_string()) {
3428
0
    ::yb::rpc::AppendFieldTitle("short_debug_string", ": \"", &first, out);
3429
0
    *out += short_debug_string().ToBuffer();
3430
0
    *out += '"';
3431
0
  }
3432
10
  for (const auto& entry : repeated_messages_copy_) {
3433
10
    ::yb::rpc::AppendFieldTitle("repeated_messages_copy", " { ", &first, out);
3434
10
    entry.AppendToDebugString(out);
3435
10
    *out += " }";
3436
10
  }
3437
2
}
3438
3439
0
void LWLightweightResponsePB::Clear() {
3440
0
  clear_i32();
3441
0
  clear_i64();
3442
0
  clear_f32();
3443
0
  clear_f64();
3444
0
  clear_u32();
3445
0
  clear_u64();
3446
0
  clear_r32();
3447
0
  clear_r64();
3448
0
  clear_str();
3449
0
  clear_bytes();
3450
0
  clear_en();
3451
0
  clear_sf32();
3452
0
  clear_sf64();
3453
0
  clear_si32();
3454
0
  clear_si64();
3455
0
  ru32_.clear();
3456
0
  rf32_.clear();
3457
0
  rstr_.clear();
3458
0
  clear_message();
3459
0
  repeated_messages_.clear();
3460
0
  repeated_messages_copy_.clear();
3461
0
  packed_u64_.clear();
3462
0
  packed_f32_.clear();
3463
0
  pairs_.clear();
3464
0
  clear_ptr_message();
3465
0
  map_.clear();
3466
0
  clear_short_debug_string();
3467
0
}
3468
3469
0
void LWLightweightResponsePB::CopyFrom(const LWLightweightResponsePB& rhs) {
3470
0
  if (rhs.has_i32()) {
3471
0
    i32_ = rhs.i32_;
3472
0
  } else {
3473
0
    clear_i32();
3474
0
  }
3475
0
  if (rhs.has_i64()) {
3476
0
    i64_ = rhs.i64_;
3477
0
  } else {
3478
0
    clear_i64();
3479
0
  }
3480
0
  if (rhs.has_f32()) {
3481
0
    f32_ = rhs.f32_;
3482
0
  } else {
3483
0
    clear_f32();
3484
0
  }
3485
0
  if (rhs.has_f64()) {
3486
0
    f64_ = rhs.f64_;
3487
0
  } else {
3488
0
    clear_f64();
3489
0
  }
3490
0
  if (rhs.has_u32()) {
3491
0
    u32_ = rhs.u32_;
3492
0
  } else {
3493
0
    clear_u32();
3494
0
  }
3495
0
  if (rhs.has_u64()) {
3496
0
    u64_ = rhs.u64_;
3497
0
  } else {
3498
0
    clear_u64();
3499
0
  }
3500
0
  if (rhs.has_r32()) {
3501
0
    r32_ = rhs.r32_;
3502
0
  } else {
3503
0
    clear_r32();
3504
0
  }
3505
0
  if (rhs.has_r64()) {
3506
0
    r64_ = rhs.r64_;
3507
0
  } else {
3508
0
    clear_r64();
3509
0
  }
3510
0
  if (rhs.has_str()) {
3511
0
    str_ = arena_.DupSlice(rhs.str_);
3512
0
  } else {
3513
0
    clear_str();
3514
0
  }
3515
0
  if (rhs.has_bytes()) {
3516
0
    bytes_ = arena_.DupSlice(rhs.bytes_);
3517
0
  } else {
3518
0
    clear_bytes();
3519
0
  }
3520
0
  if (rhs.has_en()) {
3521
0
    en_ = rhs.en_;
3522
0
  } else {
3523
0
    clear_en();
3524
0
  }
3525
0
  if (rhs.has_sf32()) {
3526
0
    sf32_ = rhs.sf32_;
3527
0
  } else {
3528
0
    clear_sf32();
3529
0
  }
3530
0
  if (rhs.has_sf64()) {
3531
0
    sf64_ = rhs.sf64_;
3532
0
  } else {
3533
0
    clear_sf64();
3534
0
  }
3535
0
  if (rhs.has_si32()) {
3536
0
    si32_ = rhs.si32_;
3537
0
  } else {
3538
0
    clear_si32();
3539
0
  }
3540
0
  if (rhs.has_si64()) {
3541
0
    si64_ = rhs.si64_;
3542
0
  } else {
3543
0
    clear_si64();
3544
0
  }
3545
0
  ru32_ = rhs.ru32_;
3546
0
  rf32_ = rhs.rf32_;
3547
0
  rstr_.reserve(rhs.rstr_.size());
3548
0
  for (const auto& entry : rhs.rstr_) {
3549
0
    rstr_.push_back(arena_.DupSlice(entry));
3550
0
  }
3551
0
  if (rhs.has_message()) {
3552
0
    message_.CopyFrom(rhs.message_);
3553
0
  } else {
3554
0
    clear_message();
3555
0
  }
3556
0
  repeated_messages_ = rhs.repeated_messages_;
3557
0
  repeated_messages_copy_ = rhs.repeated_messages_copy_;
3558
0
  packed_u64_ = rhs.packed_u64_;
3559
0
  packed_f32_ = rhs.packed_f32_;
3560
0
  pairs_ = rhs.pairs_;
3561
0
  if (rhs.ptr_message_) {
3562
0
    mutable_ptr_message()->CopyFrom(*rhs.ptr_message_);
3563
0
  } else {
3564
0
    clear_ptr_message();
3565
0
  }
3566
0
  map_ = rhs.map_;
3567
0
  if (rhs.has_short_debug_string()) {
3568
0
    short_debug_string_ = arena_.DupSlice(rhs.short_debug_string_);
3569
0
  } else {
3570
0
    clear_short_debug_string();
3571
0
  }
3572
0
  has_fields_ = rhs.has_fields_;
3573
0
}
3574
3575
0
void LWLightweightResponsePB::CopyFrom(const LightweightResponsePB& rhs) {
3576
0
  if (rhs.has_i32()) {
3577
0
    i32_ = rhs.i32();
3578
0
    has_fields_.Set(LightweightResponsePBFields::kI32);
3579
0
  } else {
3580
0
    clear_i32();
3581
0
  }
3582
0
  if (rhs.has_i64()) {
3583
0
    i64_ = rhs.i64();
3584
0
    has_fields_.Set(LightweightResponsePBFields::kI64);
3585
0
  } else {
3586
0
    clear_i64();
3587
0
  }
3588
0
  if (rhs.has_f32()) {
3589
0
    f32_ = rhs.f32();
3590
0
    has_fields_.Set(LightweightResponsePBFields::kF32);
3591
0
  } else {
3592
0
    clear_f32();
3593
0
  }
3594
0
  if (rhs.has_f64()) {
3595
0
    f64_ = rhs.f64();
3596
0
    has_fields_.Set(LightweightResponsePBFields::kF64);
3597
0
  } else {
3598
0
    clear_f64();
3599
0
  }
3600
0
  if (rhs.has_u32()) {
3601
0
    u32_ = rhs.u32();
3602
0
    has_fields_.Set(LightweightResponsePBFields::kU32);
3603
0
  } else {
3604
0
    clear_u32();
3605
0
  }
3606
0
  if (rhs.has_u64()) {
3607
0
    u64_ = rhs.u64();
3608
0
    has_fields_.Set(LightweightResponsePBFields::kU64);
3609
0
  } else {
3610
0
    clear_u64();
3611
0
  }
3612
0
  if (rhs.has_r32()) {
3613
0
    r32_ = rhs.r32();
3614
0
    has_fields_.Set(LightweightResponsePBFields::kR32);
3615
0
  } else {
3616
0
    clear_r32();
3617
0
  }
3618
0
  if (rhs.has_r64()) {
3619
0
    r64_ = rhs.r64();
3620
0
    has_fields_.Set(LightweightResponsePBFields::kR64);
3621
0
  } else {
3622
0
    clear_r64();
3623
0
  }
3624
0
  if (rhs.has_str()) {
3625
0
    str_ = arena_.DupSlice(rhs.str());
3626
0
    has_fields_.Set(LightweightResponsePBFields::kStr);
3627
0
  } else {
3628
0
    clear_str();
3629
0
  }
3630
0
  if (rhs.has_bytes()) {
3631
0
    bytes_ = arena_.DupSlice(rhs.bytes());
3632
0
    has_fields_.Set(LightweightResponsePBFields::kBytes);
3633
0
  } else {
3634
0
    clear_bytes();
3635
0
  }
3636
0
  if (rhs.has_en()) {
3637
0
    en_ = rhs.en();
3638
0
    has_fields_.Set(LightweightResponsePBFields::kEn);
3639
0
  } else {
3640
0
    clear_en();
3641
0
  }
3642
0
  if (rhs.has_sf32()) {
3643
0
    sf32_ = rhs.sf32();
3644
0
    has_fields_.Set(LightweightResponsePBFields::kSf32);
3645
0
  } else {
3646
0
    clear_sf32();
3647
0
  }
3648
0
  if (rhs.has_sf64()) {
3649
0
    sf64_ = rhs.sf64();
3650
0
    has_fields_.Set(LightweightResponsePBFields::kSf64);
3651
0
  } else {
3652
0
    clear_sf64();
3653
0
  }
3654
0
  if (rhs.has_si32()) {
3655
0
    si32_ = rhs.si32();
3656
0
    has_fields_.Set(LightweightResponsePBFields::kSi32);
3657
0
  } else {
3658
0
    clear_si32();
3659
0
  }
3660
0
  if (rhs.has_si64()) {
3661
0
    si64_ = rhs.si64();
3662
0
    has_fields_.Set(LightweightResponsePBFields::kSi64);
3663
0
  } else {
3664
0
    clear_si64();
3665
0
  }
3666
0
  ru32_.assign(rhs.ru32().begin(), rhs.ru32().end());
3667
0
  rf32_.assign(rhs.rf32().begin(), rhs.rf32().end());
3668
0
  rstr_.reserve(rhs.rstr().size());
3669
0
  for (const auto& entry : rhs.rstr()) {
3670
0
    rstr_.push_back(arena_.DupSlice(entry));
3671
0
  }
3672
0
  if (rhs.has_message()) {
3673
0
    message_.CopyFrom(rhs.message());
3674
0
    has_fields_.Set(LightweightResponsePBFields::kMessage);
3675
0
  } else {
3676
0
    clear_message();
3677
0
  }
3678
0
  repeated_messages_.assign(rhs.repeated_messages().begin(), rhs.repeated_messages().end());
3679
0
  repeated_messages_copy_.assign(rhs.repeated_messages_copy().begin(), rhs.repeated_messages_copy().end());
3680
0
  packed_u64_.assign(rhs.packed_u64().begin(), rhs.packed_u64().end());
3681
0
  packed_f32_.assign(rhs.packed_f32().begin(), rhs.packed_f32().end());
3682
0
  pairs_.assign(rhs.pairs().begin(), rhs.pairs().end());
3683
0
  if (rhs.has_ptr_message()) {
3684
0
    mutable_ptr_message()->CopyFrom(rhs.ptr_message());
3685
0
  } else {
3686
0
    clear_ptr_message();
3687
0
  }
3688
0
  map_.assign(rhs.map().begin(), rhs.map().end());
3689
0
  if (rhs.has_short_debug_string()) {
3690
0
    short_debug_string_ = arena_.DupSlice(rhs.short_debug_string());
3691
0
    has_fields_.Set(LightweightResponsePBFields::kShortDebugString);
3692
0
  } else {
3693
0
    clear_short_debug_string();
3694
0
  }
3695
0
}
3696
3697
0
Status LWLightweightResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
3698
0
  for (;;) {
3699
0
    auto p = input->ReadTagWithCutoffNoLastTag(1023);
3700
0
    if (!p.second && !p.first) {
3701
0
      return Status::OK();
3702
0
    }
3703
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
3704
0
      case 1: { // i32
3705
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>::Read(input, mutable_i32())) {
3706
0
          return ::yb::rpc::ParseFailed("i32");
3707
0
        }
3708
0
        break;
3709
0
      }
3710
0
      case 2: { // i64
3711
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>::Read(input, mutable_i64())) {
3712
0
          return ::yb::rpc::ParseFailed("i64");
3713
0
        }
3714
0
        break;
3715
0
      }
3716
0
      case 3: { // f32
3717
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, mutable_f32())) {
3718
0
          return ::yb::rpc::ParseFailed("f32");
3719
0
        }
3720
0
        break;
3721
0
      }
3722
0
      case 4: { // f64
3723
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED64, uint64_t>::Read(input, mutable_f64())) {
3724
0
          return ::yb::rpc::ParseFailed("f64");
3725
0
        }
3726
0
        break;
3727
0
      }
3728
0
      case 5: { // u32
3729
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, mutable_u32())) {
3730
0
          return ::yb::rpc::ParseFailed("u32");
3731
0
        }
3732
0
        break;
3733
0
      }
3734
0
      case 6: { // u64
3735
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, mutable_u64())) {
3736
0
          return ::yb::rpc::ParseFailed("u64");
3737
0
        }
3738
0
        break;
3739
0
      }
3740
0
      case 7: { // r32
3741
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FLOAT, float>::Read(input, mutable_r32())) {
3742
0
          return ::yb::rpc::ParseFailed("r32");
3743
0
        }
3744
0
        break;
3745
0
      }
3746
0
      case 8: { // r64
3747
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE, double>::Read(input, mutable_r64())) {
3748
0
          return ::yb::rpc::ParseFailed("r64");
3749
0
        }
3750
0
        break;
3751
0
      }
3752
0
      case 9: { // str
3753
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_str())) {
3754
0
          return ::yb::rpc::ParseFailed("str");
3755
0
        }
3756
0
        break;
3757
0
      }
3758
0
      case 10: { // bytes
3759
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>::Read(input, mutable_bytes())) {
3760
0
          return ::yb::rpc::ParseFailed("bytes");
3761
0
        }
3762
0
        break;
3763
0
      }
3764
0
      case 11: { // en
3765
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_ENUM, ::yb::rpc_test::LightweightEnum>::Read(input, mutable_en())) {
3766
0
          return ::yb::rpc::ParseFailed("en");
3767
0
        }
3768
0
        break;
3769
0
      }
3770
0
      case 12: { // sf32
3771
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32, int32_t>::Read(input, mutable_sf32())) {
3772
0
          return ::yb::rpc::ParseFailed("sf32");
3773
0
        }
3774
0
        break;
3775
0
      }
3776
0
      case 13: { // sf64
3777
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64, int64_t>::Read(input, mutable_sf64())) {
3778
0
          return ::yb::rpc::ParseFailed("sf64");
3779
0
        }
3780
0
        break;
3781
0
      }
3782
0
      case 14: { // si32
3783
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>::Read(input, mutable_si32())) {
3784
0
          return ::yb::rpc::ParseFailed("si32");
3785
0
        }
3786
0
        break;
3787
0
      }
3788
0
      case 15: { // si64
3789
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT64, int64_t>::Read(input, mutable_si64())) {
3790
0
          return ::yb::rpc::ParseFailed("si64");
3791
0
        }
3792
0
        break;
3793
0
      }
3794
0
      case 16: { // ru32
3795
0
        if (p.first == 130) {
3796
0
          int length;
3797
0
          if (!input->ReadVarintSizeAsInt(&length)) {
3798
0
            return ::yb::rpc::ParseFailed("ru32");
3799
0
          }
3800
0
          auto old_limit = input->PushLimit(length);
3801
0
          while (input->BytesUntilLimit() > 0) {
3802
0
            ru32_.emplace_back();
3803
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, &ru32_.back())) {
3804
0
              return ::yb::rpc::ParseFailed("ru32");
3805
0
            }
3806
0
          }
3807
3808
0
          input->PopLimit(old_limit);
3809
0
        } else {
3810
0
          ru32_.emplace_back();
3811
0
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>::Read(input, &ru32_.back())) {
3812
0
            return ::yb::rpc::ParseFailed("ru32");
3813
0
          }
3814
0
        }
3815
0
        break;
3816
0
      }
3817
0
      case 17: { // rf32
3818
0
        if (p.first == 138) {
3819
0
          int length;
3820
0
          if (!input->ReadVarintSizeAsInt(&length)) {
3821
0
            return ::yb::rpc::ParseFailed("rf32");
3822
0
          }
3823
0
          auto old_limit = input->PushLimit(length);
3824
0
          while (input->BytesUntilLimit() > 0) {
3825
0
            rf32_.emplace_back();
3826
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, &rf32_.back())) {
3827
0
              return ::yb::rpc::ParseFailed("rf32");
3828
0
            }
3829
0
          }
3830
3831
0
          input->PopLimit(old_limit);
3832
0
        } else {
3833
0
          rf32_.emplace_back();
3834
0
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, &rf32_.back())) {
3835
0
            return ::yb::rpc::ParseFailed("rf32");
3836
0
          }
3837
0
        }
3838
0
        break;
3839
0
      }
3840
0
      case 18: { // rstr
3841
0
        rstr_.emplace_back();
3842
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, &rstr_.back())) {
3843
0
          return ::yb::rpc::ParseFailed("rstr");
3844
0
        }
3845
0
        break;
3846
0
      }
3847
0
      case 19: { // message
3848
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>::Read(input, mutable_message())) {
3849
0
          return ::yb::rpc::ParseFailed("message");
3850
0
        }
3851
0
        break;
3852
0
      }
3853
0
      case 20: { // repeated_messages
3854
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>::Read(input, &repeated_messages_.emplace_back())) {
3855
0
          return ::yb::rpc::ParseFailed("repeated_messages");
3856
0
        }
3857
0
        break;
3858
0
      }
3859
0
      case 120: { // repeated_messages_copy
3860
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>::Read(input, &repeated_messages_copy_.emplace_back())) {
3861
0
          return ::yb::rpc::ParseFailed("repeated_messages_copy");
3862
0
        }
3863
0
        break;
3864
0
      }
3865
0
      case 21: { // packed_u64
3866
0
        if (p.first == 170) {
3867
0
          int length;
3868
0
          if (!input->ReadVarintSizeAsInt(&length)) {
3869
0
            return ::yb::rpc::ParseFailed("packed_u64");
3870
0
          }
3871
0
          auto old_limit = input->PushLimit(length);
3872
0
          while (input->BytesUntilLimit() > 0) {
3873
0
            packed_u64_.emplace_back();
3874
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, &packed_u64_.back())) {
3875
0
              return ::yb::rpc::ParseFailed("packed_u64");
3876
0
            }
3877
0
          }
3878
3879
0
          input->PopLimit(old_limit);
3880
0
        } else {
3881
0
          packed_u64_.emplace_back();
3882
0
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>::Read(input, &packed_u64_.back())) {
3883
0
            return ::yb::rpc::ParseFailed("packed_u64");
3884
0
          }
3885
0
        }
3886
0
        break;
3887
0
      }
3888
0
      case 22: { // packed_f32
3889
0
        if (p.first == 178) {
3890
0
          int length;
3891
0
          if (!input->ReadVarintSizeAsInt(&length)) {
3892
0
            return ::yb::rpc::ParseFailed("packed_f32");
3893
0
          }
3894
0
          auto old_limit = input->PushLimit(length);
3895
0
          while (input->BytesUntilLimit() > 0) {
3896
0
            packed_f32_.emplace_back();
3897
0
            if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, &packed_f32_.back())) {
3898
0
              return ::yb::rpc::ParseFailed("packed_f32");
3899
0
            }
3900
0
          }
3901
3902
0
          input->PopLimit(old_limit);
3903
0
        } else {
3904
0
          packed_f32_.emplace_back();
3905
0
          if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>::Read(input, &packed_f32_.back())) {
3906
0
            return ::yb::rpc::ParseFailed("packed_f32");
3907
0
          }
3908
0
        }
3909
0
        break;
3910
0
      }
3911
0
      case 23: { // pairs
3912
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightPairPB>::Read(input, &pairs_.emplace_back())) {
3913
0
          return ::yb::rpc::ParseFailed("pairs");
3914
0
        }
3915
0
        break;
3916
0
      }
3917
0
      case 24: { // ptr_message
3918
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>::Read(input, mutable_ptr_message())) {
3919
0
          return ::yb::rpc::ParseFailed("ptr_message");
3920
0
        }
3921
0
        break;
3922
0
      }
3923
0
      case 25: { // map
3924
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightResponsePB_LWMapEntry_DoNotUse>::Read(input, &map_.emplace_back())) {
3925
0
          return ::yb::rpc::ParseFailed("map");
3926
0
        }
3927
0
        break;
3928
0
      }
3929
0
      case 100: { // short_debug_string
3930
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>::Read(input, mutable_short_debug_string())) {
3931
0
          return ::yb::rpc::ParseFailed("short_debug_string");
3932
0
        }
3933
0
        break;
3934
0
      }
3935
0
    }
3936
0
  }
3937
0
}
3938
3939
1
uint8_t* LWLightweightResponsePB::SerializeToArray(uint8_t* out) const {
3940
1
  if (has_i32()) {
3941
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 8>(i32_, out);
3942
1
  }
3943
1
  if (has_i64()) {
3944
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>, 16>(i64_, out);
3945
1
  }
3946
1
  if (has_f32()) {
3947
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>, 29>(f32_, out);
3948
1
  }
3949
1
  if (has_f64()) {
3950
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED64, uint64_t>, 33>(f64_, out);
3951
1
  }
3952
1
  if (has_u32()) {
3953
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 40>(u32_, out);
3954
1
  }
3955
1
  if (has_u64()) {
3956
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 48>(u64_, out);
3957
1
  }
3958
1
  if (has_r32()) {
3959
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FLOAT, float>, 61>(r32_, out);
3960
1
  }
3961
1
  if (has_r64()) {
3962
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE, double>, 65>(r64_, out);
3963
1
  }
3964
1
  if (has_str()) {
3965
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 74>(str_, out);
3966
1
  }
3967
1
  if (has_bytes()) {
3968
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>, 82>(bytes_, out);
3969
1
  }
3970
1
  if (has_en()) {
3971
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_ENUM, ::yb::rpc_test::LightweightEnum>, 88>(en_, out);
3972
1
  }
3973
1
  if (has_sf32()) {
3974
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32, int32_t>, 101>(sf32_, out);
3975
1
  }
3976
1
  if (has_sf64()) {
3977
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64, int64_t>, 105>(sf64_, out);
3978
1
  }
3979
1
  if (has_si32()) {
3980
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>, 112>(si32_, out);
3981
1
  }
3982
1
  if (has_si64()) {
3983
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT64, int64_t>, 120>(si64_, out);
3984
1
  }
3985
1
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 128>(ru32_, out);
3986
1
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>, 141>(rf32_, out);
3987
1
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 146>(rstr_, out);
3988
1
  if (has_message()) {
3989
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 154>(message_, out);
3990
1
  }
3991
1
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 162>(repeated_messages_, out);
3992
1
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 962>(repeated_messages_copy_, out);
3993
1
  out = ::yb::rpc::PackedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 170>(packed_u64_, packed_u64_cached_size_, out);
3994
1
  out = ::yb::rpc::PackedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_FIXED32, uint32_t>, 178>(packed_f32_, 4 * packed_f32_.size(), out);
3995
1
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightPairPB>, 186>(pairs_, out);
3996
1
  if (has_ptr_message()) {
3997
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 194>(*ptr_message_, out);
3998
1
  }
3999
1
  out = ::yb::rpc::RepeatedWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightResponsePB_LWMapEntry_DoNotUse>, 202>(map_, out);
4000
1
  if (has_short_debug_string()) {
4001
1
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 802>(short_debug_string_, out);
4002
1
  }
4003
1
  return out;
4004
1
}
4005
4006
2
size_t LWLightweightResponsePB::SerializedSize() const {
4007
2
  size_t result = 0;
4008
2
  if (has_i32()) {
4009
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 1>(i32_);
4010
2
  }
4011
2
  if (has_i64()) {
4012
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT64, int64_t>, 1>(i64_);
4013
2
  }
4014
2
  if (has_f32()) {
4015
2
    result += 5;
4016
2
  }
4017
2
  if (has_f64()) {
4018
2
    result += 9;
4019
2
  }
4020
2
  if (has_u32()) {
4021
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 1>(u32_);
4022
2
  }
4023
2
  if (has_u64()) {
4024
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 1>(u64_);
4025
2
  }
4026
2
  if (has_r32()) {
4027
2
    result += 5;
4028
2
  }
4029
2
  if (has_r64()) {
4030
2
    result += 9;
4031
2
  }
4032
2
  if (has_str()) {
4033
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 1>(str_);
4034
2
  }
4035
2
  if (has_bytes()) {
4036
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_BYTES, ::yb::Slice>, 1>(bytes_);
4037
2
  }
4038
2
  if (has_en()) {
4039
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_ENUM, ::yb::rpc_test::LightweightEnum>, 1>(en_);
4040
2
  }
4041
2
  if (has_sf32()) {
4042
2
    result += 5;
4043
2
  }
4044
2
  if (has_sf64()) {
4045
2
    result += 9;
4046
2
  }
4047
2
  if (has_si32()) {
4048
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT32, int32_t>, 1>(si32_);
4049
2
  }
4050
2
  if (has_si64()) {
4051
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_SINT64, int64_t>, 1>(si64_);
4052
2
  }
4053
2
  {
4054
2
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT32, uint32_t>, 2>(ru32_);
4055
2
  }
4056
2
  {
4057
2
    result += 6 * rf32_.size();
4058
2
  }
4059
2
  {
4060
2
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 2>(rstr_);
4061
2
  }
4062
2
  if (has_message()) {
4063
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 2>(message_);
4064
2
  }
4065
2
  {
4066
2
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 2>(repeated_messages_);
4067
2
  }
4068
2
  {
4069
2
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 2>(repeated_messages_copy_);
4070
2
  }
4071
2
  {
4072
2
    result += ::yb::rpc::PackedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_UINT64, uint64_t>, 2>(packed_u64_, &packed_u64_cached_size_);
4073
2
  }
4074
2
  {
4075
2
    size_t body_size = 4 * packed_f32_.size();
4076
2
    result += 2 + ::google::protobuf::io::CodedOutputStream::VarintSize32(narrow_cast<uint32_t>(body_size)) + body_size;
4077
2
  }
4078
2
  {
4079
2
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightPairPB>, 2>(pairs_);
4080
2
  }
4081
2
  if (has_ptr_message()) {
4082
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightSubMessagePB>, 2>(*ptr_message_);
4083
2
  }
4084
2
  {
4085
2
    result += ::yb::rpc::RepeatedSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWLightweightResponsePB_LWMapEntry_DoNotUse>, 2>(map_);
4086
2
  }
4087
2
  if (has_short_debug_string()) {
4088
2
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::yb::Slice>, 2>(short_debug_string_);
4089
2
  }
4090
2
  cached_size_ = result;
4091
2
  return result;
4092
2
}
4093
4094
2
void LWLightweightResponsePB::ToGoogleProtobuf(LightweightResponsePB* out) const {
4095
2
  if (has_i32()) {
4096
2
    out->set_i32(i32_);
4097
0
  } else {
4098
0
    out->clear_i32();
4099
0
  }
4100
2
  if (has_i64()) {
4101
2
    out->set_i64(i64_);
4102
0
  } else {
4103
0
    out->clear_i64();
4104
0
  }
4105
2
  if (has_f32()) {
4106
2
    out->set_f32(f32_);
4107
0
  } else {
4108
0
    out->clear_f32();
4109
0
  }
4110
2
  if (has_f64()) {
4111
2
    out->set_f64(f64_);
4112
0
  } else {
4113
0
    out->clear_f64();
4114
0
  }
4115
2
  if (has_u32()) {
4116
2
    out->set_u32(u32_);
4117
0
  } else {
4118
0
    out->clear_u32();
4119
0
  }
4120
2
  if (has_u64()) {
4121
2
    out->set_u64(u64_);
4122
0
  } else {
4123
0
    out->clear_u64();
4124
0
  }
4125
2
  if (has_r32()) {
4126
2
    out->set_r32(r32_);
4127
0
  } else {
4128
0
    out->clear_r32();
4129
0
  }
4130
2
  if (has_r64()) {
4131
2
    out->set_r64(r64_);
4132
0
  } else {
4133
0
    out->clear_r64();
4134
0
  }
4135
2
  if (has_str()) {
4136
2
    out->set_str(str_.cdata(), str_.size());
4137
0
  } else {
4138
0
    out->clear_str();
4139
0
  }
4140
2
  if (has_bytes()) {
4141
2
    out->set_bytes(bytes_.cdata(), bytes_.size());
4142
0
  } else {
4143
0
    out->clear_bytes();
4144
0
  }
4145
2
  if (has_en()) {
4146
2
    out->set_en(en_);
4147
0
  } else {
4148
0
    out->clear_en();
4149
0
  }
4150
2
  if (has_sf32()) {
4151
2
    out->set_sf32(sf32_);
4152
0
  } else {
4153
0
    out->clear_sf32();
4154
0
  }
4155
2
  if (has_sf64()) {
4156
2
    out->set_sf64(sf64_);
4157
0
  } else {
4158
0
    out->clear_sf64();
4159
0
  }
4160
2
  if (has_si32()) {
4161
2
    out->set_si32(si32_);
4162
0
  } else {
4163
0
    out->clear_si32();
4164
0
  }
4165
2
  if (has_si64()) {
4166
2
    out->set_si64(si64_);
4167
0
  } else {
4168
0
    out->clear_si64();
4169
0
  }
4170
2
  {
4171
2
    auto& repeated = *out->mutable_ru32();
4172
2
    repeated.Clear();
4173
2
    repeated.Reserve(narrow_cast<int>(ru32_.size()));
4174
40
    for (const auto& entry : ru32_) {
4175
40
      repeated.Add(entry);
4176
40
    }
4177
2
  }
4178
2
  {
4179
2
    auto& repeated = *out->mutable_rf32();
4180
2
    repeated.Clear();
4181
2
    repeated.Reserve(narrow_cast<int>(rf32_.size()));
4182
20
    for (const auto& entry : rf32_) {
4183
20
      repeated.Add(entry);
4184
20
    }
4185
2
  }
4186
2
  {
4187
2
    auto& repeated = *out->mutable_rstr();
4188
2
    repeated.Clear();
4189
2
    repeated.Reserve(narrow_cast<int>(rstr_.size()));
4190
14
    for (const auto& entry : rstr_) {
4191
14
      repeated.Add()->assign(entry.cdata(), entry.size());
4192
14
    }
4193
2
  }
4194
2
  if (has_message()) {
4195
2
    message().ToGoogleProtobuf(out->mutable_message());
4196
2
  }
4197
2
  repeated_messages().ToGoogleProtobuf(out->mutable_repeated_messages());
4198
2
  repeated_messages_copy().ToGoogleProtobuf(out->mutable_repeated_messages_copy());
4199
2
  {
4200
2
    auto& repeated = *out->mutable_packed_u64();
4201
2
    repeated.Clear();
4202
2
    repeated.Reserve(narrow_cast<int>(packed_u64_.size()));
4203
254
    for (const auto& entry : packed_u64_) {
4204
254
      repeated.Add(entry);
4205
254
    }
4206
2
  }
4207
2
  {
4208
2
    auto& repeated = *out->mutable_packed_f32();
4209
2
    repeated.Clear();
4210
2
    repeated.Reserve(narrow_cast<int>(packed_f32_.size()));
4211
74
    for (const auto& entry : packed_f32_) {
4212
74
      repeated.Add(entry);
4213
74
    }
4214
2
  }
4215
2
  pairs().ToGoogleProtobuf(out->mutable_pairs());
4216
2
  if (has_ptr_message()) {
4217
2
    ptr_message().ToGoogleProtobuf(out->mutable_ptr_message());
4218
2
  }
4219
2
  {
4220
2
    auto& repeated = *out->mutable_map();
4221
2
    repeated.clear();
4222
0
    for (const auto& entry : map_) {
4223
0
      repeated[entry.key().ToBuffer()] = entry.value();
4224
0
    }
4225
2
  }
4226
2
  if (has_short_debug_string()) {
4227
0
    out->set_short_debug_string(short_debug_string_.cdata(), short_debug_string_.size());
4228
2
  } else {
4229
2
    out->clear_short_debug_string();
4230
2
  }
4231
2
}
4232
4233
0
LWTrivialRequestPB::LWTrivialRequestPB(::yb::Arena* arena) {
4234
0
}
4235
4236
LWTrivialRequestPB::LWTrivialRequestPB(::yb::Arena* arena, const LWTrivialRequestPB& rhs)
4237
    : has_fields_(rhs.has_fields_),
4238
0
      value_(rhs.value_) {
4239
0
}
4240
4241
0
void LWTrivialRequestPB::AppendToDebugString(std::string* out) const {
4242
0
  bool first = true;if (has_value()) {
4243
0
    ::yb::rpc::AppendFieldTitle("value", ": ", &first, out);
4244
0
    *out += std::to_string(value());
4245
0
  }
4246
0
}
4247
4248
0
void LWTrivialRequestPB::Clear() {
4249
0
  clear_value();
4250
0
}
4251
4252
0
void LWTrivialRequestPB::CopyFrom(const LWTrivialRequestPB& rhs) {
4253
0
  if (rhs.has_value()) {
4254
0
    value_ = rhs.value_;
4255
0
  } else {
4256
0
    clear_value();
4257
0
  }
4258
0
  has_fields_ = rhs.has_fields_;
4259
0
}
4260
4261
0
void LWTrivialRequestPB::CopyFrom(const TrivialRequestPB& rhs) {
4262
0
  if (rhs.has_value()) {
4263
0
    value_ = rhs.value();
4264
0
    has_fields_.Set(TrivialRequestPBFields::kValue);
4265
0
  } else {
4266
0
    clear_value();
4267
0
  }
4268
0
}
4269
4270
0
Status LWTrivialRequestPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
4271
0
  for (;;) {
4272
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
4273
0
    if (!p.second && !p.first) {
4274
0
      return Status::OK();
4275
0
    }
4276
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
4277
0
      case 1: { // value
4278
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>::Read(input, mutable_value())) {
4279
0
          return ::yb::rpc::ParseFailed("value");
4280
0
        }
4281
0
        break;
4282
0
      }
4283
0
    }
4284
0
  }
4285
0
}
4286
4287
0
uint8_t* LWTrivialRequestPB::SerializeToArray(uint8_t* out) const {
4288
0
  if (has_value()) {
4289
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 8>(value_, out);
4290
0
  }
4291
0
  return out;
4292
0
}
4293
4294
0
size_t LWTrivialRequestPB::SerializedSize() const {
4295
0
  size_t result = 0;
4296
0
  if (has_value()) {
4297
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 1>(value_);
4298
0
  }
4299
0
  cached_size_ = result;
4300
0
  return result;
4301
0
}
4302
4303
0
void LWTrivialRequestPB::ToGoogleProtobuf(TrivialRequestPB* out) const {
4304
0
  if (has_value()) {
4305
0
    out->set_value(value_);
4306
0
  } else {
4307
0
    out->clear_value();
4308
0
  }
4309
0
}
4310
4311
0
LWTrivialErrorPB::LWTrivialErrorPB(::yb::Arena* arena) {
4312
0
}
4313
4314
LWTrivialErrorPB::LWTrivialErrorPB(::yb::Arena* arena, const LWTrivialErrorPB& rhs)
4315
    : has_fields_(rhs.has_fields_),
4316
0
      code_(rhs.code_) {
4317
0
}
4318
4319
0
void LWTrivialErrorPB::AppendToDebugString(std::string* out) const {
4320
0
  bool first = true;if (has_code()) {
4321
0
    ::yb::rpc::AppendFieldTitle("code", ": ", &first, out);
4322
0
    *out += std::to_string(code());
4323
0
  }
4324
0
}
4325
4326
0
void LWTrivialErrorPB::Clear() {
4327
0
  clear_code();
4328
0
}
4329
4330
0
void LWTrivialErrorPB::CopyFrom(const LWTrivialErrorPB& rhs) {
4331
0
  if (rhs.has_code()) {
4332
0
    code_ = rhs.code_;
4333
0
  } else {
4334
0
    clear_code();
4335
0
  }
4336
0
  has_fields_ = rhs.has_fields_;
4337
0
}
4338
4339
0
void LWTrivialErrorPB::CopyFrom(const TrivialErrorPB& rhs) {
4340
0
  if (rhs.has_code()) {
4341
0
    code_ = rhs.code();
4342
0
    has_fields_.Set(TrivialErrorPBFields::kCode);
4343
0
  } else {
4344
0
    clear_code();
4345
0
  }
4346
0
}
4347
4348
0
Status LWTrivialErrorPB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
4349
0
  for (;;) {
4350
0
    auto p = input->ReadTagWithCutoffNoLastTag(15);
4351
0
    if (!p.second && !p.first) {
4352
0
      return Status::OK();
4353
0
    }
4354
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
4355
0
      case 1: { // code
4356
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>::Read(input, mutable_code())) {
4357
0
          return ::yb::rpc::ParseFailed("code");
4358
0
        }
4359
0
        break;
4360
0
      }
4361
0
    }
4362
0
  }
4363
0
}
4364
4365
0
uint8_t* LWTrivialErrorPB::SerializeToArray(uint8_t* out) const {
4366
0
  if (has_code()) {
4367
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 8>(code_, out);
4368
0
  }
4369
0
  return out;
4370
0
}
4371
4372
0
size_t LWTrivialErrorPB::SerializedSize() const {
4373
0
  size_t result = 0;
4374
0
  if (has_code()) {
4375
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 1>(code_);
4376
0
  }
4377
0
  cached_size_ = result;
4378
0
  return result;
4379
0
}
4380
4381
0
void LWTrivialErrorPB::ToGoogleProtobuf(TrivialErrorPB* out) const {
4382
0
  if (has_code()) {
4383
0
    out->set_code(code_);
4384
0
  } else {
4385
0
    out->clear_code();
4386
0
  }
4387
0
}
4388
4389
LWTrivialResponsePB::LWTrivialResponsePB(::yb::Arena* arena)
4390
    : arena_(*arena),
4391
0
      error_(arena) {
4392
0
}
4393
4394
LWTrivialResponsePB::LWTrivialResponsePB(::yb::Arena* arena, const LWTrivialResponsePB& rhs)
4395
    : arena_(*arena),
4396
      has_fields_(rhs.has_fields_),
4397
      error_(arena, rhs.error_),
4398
0
      value_(rhs.value_) {
4399
0
}
4400
4401
0
void LWTrivialResponsePB::AppendToDebugString(std::string* out) const {
4402
0
  bool first = true;if (has_error()) {
4403
0
    ::yb::rpc::AppendFieldTitle("error", " { ", &first, out);
4404
0
    error().AppendToDebugString(out);
4405
0
    *out += " }";
4406
0
  }
4407
0
  if (has_value()) {
4408
0
    ::yb::rpc::AppendFieldTitle("value", ": ", &first, out);
4409
0
    *out += std::to_string(value());
4410
0
  }
4411
0
}
4412
4413
0
void LWTrivialResponsePB::Clear() {
4414
0
  clear_error();
4415
0
  clear_value();
4416
0
}
4417
4418
0
void LWTrivialResponsePB::CopyFrom(const LWTrivialResponsePB& rhs) {
4419
0
  if (rhs.has_error()) {
4420
0
    error_.CopyFrom(rhs.error_);
4421
0
  } else {
4422
0
    clear_error();
4423
0
  }
4424
0
  if (rhs.has_value()) {
4425
0
    value_ = rhs.value_;
4426
0
  } else {
4427
0
    clear_value();
4428
0
  }
4429
0
  has_fields_ = rhs.has_fields_;
4430
0
}
4431
4432
0
void LWTrivialResponsePB::CopyFrom(const TrivialResponsePB& rhs) {
4433
0
  if (rhs.has_error()) {
4434
0
    error_.CopyFrom(rhs.error());
4435
0
    has_fields_.Set(TrivialResponsePBFields::kError);
4436
0
  } else {
4437
0
    clear_error();
4438
0
  }
4439
0
  if (rhs.has_value()) {
4440
0
    value_ = rhs.value();
4441
0
    has_fields_.Set(TrivialResponsePBFields::kValue);
4442
0
  } else {
4443
0
    clear_value();
4444
0
  }
4445
0
}
4446
4447
0
Status LWTrivialResponsePB::ParseFromCodedStream(google::protobuf::io::CodedInputStream* input) {
4448
0
  for (;;) {
4449
0
    auto p = input->ReadTagWithCutoffNoLastTag(31);
4450
0
    if (!p.second && !p.first) {
4451
0
      return Status::OK();
4452
0
    }
4453
0
    switch(::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(p.first)) {
4454
0
      case 1: { // error
4455
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWTrivialErrorPB>::Read(input, mutable_error())) {
4456
0
          return ::yb::rpc::ParseFailed("error");
4457
0
        }
4458
0
        break;
4459
0
      }
4460
0
      case 2: { // value
4461
0
        if (!::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>::Read(input, mutable_value())) {
4462
0
          return ::yb::rpc::ParseFailed("value");
4463
0
        }
4464
0
        break;
4465
0
      }
4466
0
    }
4467
0
  }
4468
0
}
4469
4470
0
uint8_t* LWTrivialResponsePB::SerializeToArray(uint8_t* out) const {
4471
0
  if (has_error()) {
4472
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWTrivialErrorPB>, 10>(error_, out);
4473
0
  }
4474
0
  if (has_value()) {
4475
0
    out = ::yb::rpc::SingleWrite<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 16>(value_, out);
4476
0
  }
4477
0
  return out;
4478
0
}
4479
4480
0
size_t LWTrivialResponsePB::SerializedSize() const {
4481
0
  size_t result = 0;
4482
0
  if (has_error()) {
4483
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, ::yb::rpc_test::LWTrivialErrorPB>, 1>(error_);
4484
0
  }
4485
0
  if (has_value()) {
4486
0
    result += ::yb::rpc::SingleSize<::yb::rpc::LightweightSerialization<::google::protobuf::internal::WireFormatLite::TYPE_INT32, int32_t>, 1>(value_);
4487
0
  }
4488
0
  cached_size_ = result;
4489
0
  return result;
4490
0
}
4491
4492
0
void LWTrivialResponsePB::ToGoogleProtobuf(TrivialResponsePB* out) const {
4493
0
  if (has_error()) {
4494
0
    error().ToGoogleProtobuf(out->mutable_error());
4495
0
  }
4496
0
  if (has_value()) {
4497
0
    out->set_value(value_);
4498
0
  } else {
4499
0
    out->clear_value();
4500
0
  }
4501
0
}
4502
4503
} // namespace rpc_test
4504
} // namespace yb