Coverage Report

Created: 2025-06-13 06:23

/src/brpc/build/test/v1.pb.cc
Line
Count
Source (jump to first uncovered line)
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: v1.proto
3
4
#include "v1.pb.h"
5
6
#include <algorithm>
7
8
#include <google/protobuf/stubs/common.h>
9
#include <google/protobuf/stubs/port.h>
10
#include <google/protobuf/io/coded_stream.h>
11
#include <google/protobuf/wire_format_lite_inl.h>
12
#include <google/protobuf/descriptor.h>
13
#include <google/protobuf/generated_message_reflection.h>
14
#include <google/protobuf/reflection_ops.h>
15
#include <google/protobuf/wire_format.h>
16
// This is a temporary google only hack
17
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
18
#include "third_party/protobuf/version.h"
19
#endif
20
// @@protoc_insertion_point(includes)
21
22
namespace v1 {
23
class EchoRequestDefaultTypeInternal {
24
 public:
25
  ::google::protobuf::internal::ExplicitlyConstructed<EchoRequest>
26
      _instance;
27
} _EchoRequest_default_instance_;
28
class EchoResponseDefaultTypeInternal {
29
 public:
30
  ::google::protobuf::internal::ExplicitlyConstructed<EchoResponse>
31
      _instance;
32
} _EchoResponse_default_instance_;
33
}  // namespace v1
34
namespace protobuf_v1_2eproto {
35
2
static void InitDefaultsEchoRequest() {
36
2
  GOOGLE_PROTOBUF_VERIFY_VERSION;
37
38
2
  {
39
2
    void* ptr = &::v1::_EchoRequest_default_instance_;
40
2
    new (ptr) ::v1::EchoRequest();
41
2
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
42
2
  }
43
2
  ::v1::EchoRequest::InitAsDefaultInstance();
44
2
}
45
46
::google::protobuf::internal::SCCInfo<0> scc_info_EchoRequest =
47
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEchoRequest}, {}};
48
49
2
static void InitDefaultsEchoResponse() {
50
2
  GOOGLE_PROTOBUF_VERIFY_VERSION;
51
52
2
  {
53
2
    void* ptr = &::v1::_EchoResponse_default_instance_;
54
2
    new (ptr) ::v1::EchoResponse();
55
2
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
56
2
  }
57
2
  ::v1::EchoResponse::InitAsDefaultInstance();
58
2
}
59
60
::google::protobuf::internal::SCCInfo<0> scc_info_EchoResponse =
61
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEchoResponse}, {}};
62
63
2
void InitDefaults() {
64
2
  ::google::protobuf::internal::InitSCC(&scc_info_EchoRequest.base);
65
2
  ::google::protobuf::internal::InitSCC(&scc_info_EchoResponse.base);
66
2
}
67
68
::google::protobuf::Metadata file_level_metadata[2];
69
const ::google::protobuf::ServiceDescriptor* file_level_service_descriptors[1];
70
71
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
72
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::v1::EchoRequest, _has_bits_),
73
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::v1::EchoRequest, _internal_metadata_),
74
  ~0u,  // no _extensions_
75
  ~0u,  // no _oneof_case_
76
  ~0u,  // no _weak_field_map_
77
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::v1::EchoRequest, message_),
78
  0,
79
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::v1::EchoResponse, _has_bits_),
80
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::v1::EchoResponse, _internal_metadata_),
81
  ~0u,  // no _extensions_
82
  ~0u,  // no _oneof_case_
83
  ~0u,  // no _weak_field_map_
84
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::v1::EchoResponse, message_),
85
  0,
86
};
87
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
88
  { 0, 6, sizeof(::v1::EchoRequest)},
89
  { 7, 13, sizeof(::v1::EchoResponse)},
90
};
91
92
static ::google::protobuf::Message const * const file_default_instances[] = {
93
  reinterpret_cast<const ::google::protobuf::Message*>(&::v1::_EchoRequest_default_instance_),
94
  reinterpret_cast<const ::google::protobuf::Message*>(&::v1::_EchoResponse_default_instance_),
95
};
96
97
0
void protobuf_AssignDescriptors() {
98
0
  AddDescriptors();
99
0
  AssignDescriptors(
100
0
      "v1.proto", schemas, file_default_instances, TableStruct::offsets,
101
0
      file_level_metadata, NULL, file_level_service_descriptors);
102
0
}
103
104
0
void protobuf_AssignDescriptorsOnce() {
105
0
  static ::google::protobuf::internal::once_flag once;
106
0
  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
107
0
}
108
109
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
110
0
void protobuf_RegisterTypes(const ::std::string&) {
111
0
  protobuf_AssignDescriptorsOnce();
112
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
113
0
}
114
115
2
void AddDescriptorsImpl() {
116
2
  InitDefaults();
117
2
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
118
2
      "\n\010v1.proto\022\002v1\"\036\n\013EchoRequest\022\017\n\007message"
119
2
      "\030\001 \002(\t\"\037\n\014EchoResponse\022\017\n\007message\030\001 \002(\t2"
120
2
      "\350\001\n\013EchoService\022)\n\004Echo\022\017.v1.EchoRequest"
121
2
      "\032\020.v1.EchoResponse\022*\n\005Echo2\022\017.v1.EchoReq"
122
2
      "uest\032\020.v1.EchoResponse\022*\n\005Echo3\022\017.v1.Ech"
123
2
      "oRequest\032\020.v1.EchoResponse\022*\n\005Echo4\022\017.v1"
124
2
      ".EchoRequest\032\020.v1.EchoResponse\022*\n\005Echo5\022"
125
2
      "\017.v1.EchoRequest\032\020.v1.EchoResponseB\003\200\001\001"
126
2
  };
127
2
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
128
2
      descriptor, 319);
129
2
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
130
2
    "v1.proto", &protobuf_RegisterTypes);
131
2
}
132
133
2
void AddDescriptors() {
134
2
  static ::google::protobuf::internal::once_flag once;
135
2
  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
136
2
}
137
// Force AddDescriptors() to be called at dynamic initialization time.
138
struct StaticDescriptorInitializer {
139
2
  StaticDescriptorInitializer() {
140
2
    AddDescriptors();
141
2
  }
142
} static_descriptor_initializer;
143
}  // namespace protobuf_v1_2eproto
144
namespace v1 {
145
146
// ===================================================================
147
148
2
void EchoRequest::InitAsDefaultInstance() {
149
2
}
150
#if !defined(_MSC_VER) || _MSC_VER >= 1900
151
const int EchoRequest::kMessageFieldNumber;
152
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
153
154
EchoRequest::EchoRequest()
155
2
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
156
2
  ::google::protobuf::internal::InitSCC(
157
2
      &protobuf_v1_2eproto::scc_info_EchoRequest.base);
158
2
  SharedCtor();
159
  // @@protoc_insertion_point(constructor:v1.EchoRequest)
160
2
}
161
EchoRequest::EchoRequest(const EchoRequest& from)
162
0
  : ::google::protobuf::Message(),
163
0
      _internal_metadata_(NULL),
164
0
      _has_bits_(from._has_bits_) {
165
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
166
0
  message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
167
0
  if (from.has_message()) {
168
0
    message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_);
169
0
  }
170
  // @@protoc_insertion_point(copy_constructor:v1.EchoRequest)
171
0
}
172
173
2
void EchoRequest::SharedCtor() {
174
2
  message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
175
2
}
176
177
0
EchoRequest::~EchoRequest() {
178
  // @@protoc_insertion_point(destructor:v1.EchoRequest)
179
0
  SharedDtor();
180
0
}
181
182
0
void EchoRequest::SharedDtor() {
183
0
  message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
184
0
}
185
186
0
void EchoRequest::SetCachedSize(int size) const {
187
0
  _cached_size_.Set(size);
188
0
}
189
0
const ::google::protobuf::Descriptor* EchoRequest::descriptor() {
190
0
  ::protobuf_v1_2eproto::protobuf_AssignDescriptorsOnce();
191
0
  return ::protobuf_v1_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
192
0
}
193
194
0
const EchoRequest& EchoRequest::default_instance() {
195
0
  ::google::protobuf::internal::InitSCC(&protobuf_v1_2eproto::scc_info_EchoRequest.base);
196
0
  return *internal_default_instance();
197
0
}
198
199
200
0
void EchoRequest::Clear() {
201
// @@protoc_insertion_point(message_clear_start:v1.EchoRequest)
202
0
  ::google::protobuf::uint32 cached_has_bits = 0;
203
  // Prevent compiler warnings about cached_has_bits being unused
204
0
  (void) cached_has_bits;
205
206
0
  cached_has_bits = _has_bits_[0];
207
0
  if (cached_has_bits & 0x00000001u) {
208
0
    message_.ClearNonDefaultToEmptyNoArena();
209
0
  }
210
0
  _has_bits_.Clear();
211
0
  _internal_metadata_.Clear();
212
0
}
213
214
bool EchoRequest::MergePartialFromCodedStream(
215
0
    ::google::protobuf::io::CodedInputStream* input) {
216
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
217
0
  ::google::protobuf::uint32 tag;
218
  // @@protoc_insertion_point(parse_start:v1.EchoRequest)
219
0
  for (;;) {
220
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
221
0
    tag = p.first;
222
0
    if (!p.second) goto handle_unusual;
223
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
224
      // required string message = 1;
225
0
      case 1: {
226
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
227
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
228
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
229
0
                input, this->mutable_message()));
230
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
231
0
            this->message().data(), static_cast<int>(this->message().length()),
232
0
            ::google::protobuf::internal::WireFormat::PARSE,
233
0
            "v1.EchoRequest.message");
234
0
        } else {
235
0
          goto handle_unusual;
236
0
        }
237
0
        break;
238
0
      }
239
240
0
      default: {
241
0
      handle_unusual:
242
0
        if (tag == 0) {
243
0
          goto success;
244
0
        }
245
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
246
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
247
0
        break;
248
0
      }
249
0
    }
250
0
  }
251
0
success:
252
  // @@protoc_insertion_point(parse_success:v1.EchoRequest)
253
0
  return true;
254
0
failure:
255
  // @@protoc_insertion_point(parse_failure:v1.EchoRequest)
256
0
  return false;
257
0
#undef DO_
258
0
}
259
260
void EchoRequest::SerializeWithCachedSizes(
261
0
    ::google::protobuf::io::CodedOutputStream* output) const {
262
  // @@protoc_insertion_point(serialize_start:v1.EchoRequest)
263
0
  ::google::protobuf::uint32 cached_has_bits = 0;
264
0
  (void) cached_has_bits;
265
266
0
  cached_has_bits = _has_bits_[0];
267
  // required string message = 1;
268
0
  if (cached_has_bits & 0x00000001u) {
269
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
270
0
      this->message().data(), static_cast<int>(this->message().length()),
271
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
272
0
      "v1.EchoRequest.message");
273
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
274
0
      1, this->message(), output);
275
0
  }
276
277
0
  if (_internal_metadata_.have_unknown_fields()) {
278
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
279
0
        _internal_metadata_.unknown_fields(), output);
280
0
  }
281
  // @@protoc_insertion_point(serialize_end:v1.EchoRequest)
282
0
}
283
284
::google::protobuf::uint8* EchoRequest::InternalSerializeWithCachedSizesToArray(
285
0
    bool deterministic, ::google::protobuf::uint8* target) const {
286
0
  (void)deterministic; // Unused
287
  // @@protoc_insertion_point(serialize_to_array_start:v1.EchoRequest)
288
0
  ::google::protobuf::uint32 cached_has_bits = 0;
289
0
  (void) cached_has_bits;
290
291
0
  cached_has_bits = _has_bits_[0];
292
  // required string message = 1;
293
0
  if (cached_has_bits & 0x00000001u) {
294
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
295
0
      this->message().data(), static_cast<int>(this->message().length()),
296
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
297
0
      "v1.EchoRequest.message");
298
0
    target =
299
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
300
0
        1, this->message(), target);
301
0
  }
302
303
0
  if (_internal_metadata_.have_unknown_fields()) {
304
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
305
0
        _internal_metadata_.unknown_fields(), target);
306
0
  }
307
  // @@protoc_insertion_point(serialize_to_array_end:v1.EchoRequest)
308
0
  return target;
309
0
}
310
311
0
size_t EchoRequest::ByteSizeLong() const {
312
// @@protoc_insertion_point(message_byte_size_start:v1.EchoRequest)
313
0
  size_t total_size = 0;
314
315
0
  if (_internal_metadata_.have_unknown_fields()) {
316
0
    total_size +=
317
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
318
0
        _internal_metadata_.unknown_fields());
319
0
  }
320
  // required string message = 1;
321
0
  if (has_message()) {
322
0
    total_size += 1 +
323
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
324
0
        this->message());
325
0
  }
326
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
327
0
  SetCachedSize(cached_size);
328
0
  return total_size;
329
0
}
330
331
0
void EchoRequest::MergeFrom(const ::google::protobuf::Message& from) {
332
// @@protoc_insertion_point(generalized_merge_from_start:v1.EchoRequest)
333
0
  GOOGLE_DCHECK_NE(&from, this);
334
0
  const EchoRequest* source =
335
0
      ::google::protobuf::internal::DynamicCastToGenerated<const EchoRequest>(
336
0
          &from);
337
0
  if (source == NULL) {
338
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:v1.EchoRequest)
339
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
340
0
  } else {
341
  // @@protoc_insertion_point(generalized_merge_from_cast_success:v1.EchoRequest)
342
0
    MergeFrom(*source);
343
0
  }
344
0
}
345
346
0
void EchoRequest::MergeFrom(const EchoRequest& from) {
347
// @@protoc_insertion_point(class_specific_merge_from_start:v1.EchoRequest)
348
0
  GOOGLE_DCHECK_NE(&from, this);
349
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
350
0
  ::google::protobuf::uint32 cached_has_bits = 0;
351
0
  (void) cached_has_bits;
352
353
0
  if (from.has_message()) {
354
0
    set_has_message();
355
0
    message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_);
356
0
  }
357
0
}
358
359
0
void EchoRequest::CopyFrom(const ::google::protobuf::Message& from) {
360
// @@protoc_insertion_point(generalized_copy_from_start:v1.EchoRequest)
361
0
  if (&from == this) return;
362
0
  Clear();
363
0
  MergeFrom(from);
364
0
}
365
366
0
void EchoRequest::CopyFrom(const EchoRequest& from) {
367
// @@protoc_insertion_point(class_specific_copy_from_start:v1.EchoRequest)
368
0
  if (&from == this) return;
369
0
  Clear();
370
0
  MergeFrom(from);
371
0
}
372
373
0
bool EchoRequest::IsInitialized() const {
374
0
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
375
0
  return true;
376
0
}
377
378
0
void EchoRequest::Swap(EchoRequest* other) {
379
0
  if (other == this) return;
380
0
  InternalSwap(other);
381
0
}
382
0
void EchoRequest::InternalSwap(EchoRequest* other) {
383
0
  using std::swap;
384
0
  message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
385
0
    GetArenaNoVirtual());
386
0
  swap(_has_bits_[0], other->_has_bits_[0]);
387
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
388
0
}
389
390
0
::google::protobuf::Metadata EchoRequest::GetMetadata() const {
391
0
  protobuf_v1_2eproto::protobuf_AssignDescriptorsOnce();
392
0
  return ::protobuf_v1_2eproto::file_level_metadata[kIndexInFileMessages];
393
0
}
394
395
396
// ===================================================================
397
398
2
void EchoResponse::InitAsDefaultInstance() {
399
2
}
400
#if !defined(_MSC_VER) || _MSC_VER >= 1900
401
const int EchoResponse::kMessageFieldNumber;
402
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
403
404
EchoResponse::EchoResponse()
405
2
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
406
2
  ::google::protobuf::internal::InitSCC(
407
2
      &protobuf_v1_2eproto::scc_info_EchoResponse.base);
408
2
  SharedCtor();
409
  // @@protoc_insertion_point(constructor:v1.EchoResponse)
410
2
}
411
EchoResponse::EchoResponse(const EchoResponse& from)
412
0
  : ::google::protobuf::Message(),
413
0
      _internal_metadata_(NULL),
414
0
      _has_bits_(from._has_bits_) {
415
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
416
0
  message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
417
0
  if (from.has_message()) {
418
0
    message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_);
419
0
  }
420
  // @@protoc_insertion_point(copy_constructor:v1.EchoResponse)
421
0
}
422
423
2
void EchoResponse::SharedCtor() {
424
2
  message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
425
2
}
426
427
0
EchoResponse::~EchoResponse() {
428
  // @@protoc_insertion_point(destructor:v1.EchoResponse)
429
0
  SharedDtor();
430
0
}
431
432
0
void EchoResponse::SharedDtor() {
433
0
  message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
434
0
}
435
436
0
void EchoResponse::SetCachedSize(int size) const {
437
0
  _cached_size_.Set(size);
438
0
}
439
0
const ::google::protobuf::Descriptor* EchoResponse::descriptor() {
440
0
  ::protobuf_v1_2eproto::protobuf_AssignDescriptorsOnce();
441
0
  return ::protobuf_v1_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
442
0
}
443
444
0
const EchoResponse& EchoResponse::default_instance() {
445
0
  ::google::protobuf::internal::InitSCC(&protobuf_v1_2eproto::scc_info_EchoResponse.base);
446
0
  return *internal_default_instance();
447
0
}
448
449
450
0
void EchoResponse::Clear() {
451
// @@protoc_insertion_point(message_clear_start:v1.EchoResponse)
452
0
  ::google::protobuf::uint32 cached_has_bits = 0;
453
  // Prevent compiler warnings about cached_has_bits being unused
454
0
  (void) cached_has_bits;
455
456
0
  cached_has_bits = _has_bits_[0];
457
0
  if (cached_has_bits & 0x00000001u) {
458
0
    message_.ClearNonDefaultToEmptyNoArena();
459
0
  }
460
0
  _has_bits_.Clear();
461
0
  _internal_metadata_.Clear();
462
0
}
463
464
bool EchoResponse::MergePartialFromCodedStream(
465
0
    ::google::protobuf::io::CodedInputStream* input) {
466
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
467
0
  ::google::protobuf::uint32 tag;
468
  // @@protoc_insertion_point(parse_start:v1.EchoResponse)
469
0
  for (;;) {
470
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
471
0
    tag = p.first;
472
0
    if (!p.second) goto handle_unusual;
473
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
474
      // required string message = 1;
475
0
      case 1: {
476
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
477
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
478
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
479
0
                input, this->mutable_message()));
480
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
481
0
            this->message().data(), static_cast<int>(this->message().length()),
482
0
            ::google::protobuf::internal::WireFormat::PARSE,
483
0
            "v1.EchoResponse.message");
484
0
        } else {
485
0
          goto handle_unusual;
486
0
        }
487
0
        break;
488
0
      }
489
490
0
      default: {
491
0
      handle_unusual:
492
0
        if (tag == 0) {
493
0
          goto success;
494
0
        }
495
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
496
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
497
0
        break;
498
0
      }
499
0
    }
500
0
  }
501
0
success:
502
  // @@protoc_insertion_point(parse_success:v1.EchoResponse)
503
0
  return true;
504
0
failure:
505
  // @@protoc_insertion_point(parse_failure:v1.EchoResponse)
506
0
  return false;
507
0
#undef DO_
508
0
}
509
510
void EchoResponse::SerializeWithCachedSizes(
511
0
    ::google::protobuf::io::CodedOutputStream* output) const {
512
  // @@protoc_insertion_point(serialize_start:v1.EchoResponse)
513
0
  ::google::protobuf::uint32 cached_has_bits = 0;
514
0
  (void) cached_has_bits;
515
516
0
  cached_has_bits = _has_bits_[0];
517
  // required string message = 1;
518
0
  if (cached_has_bits & 0x00000001u) {
519
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
520
0
      this->message().data(), static_cast<int>(this->message().length()),
521
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
522
0
      "v1.EchoResponse.message");
523
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
524
0
      1, this->message(), output);
525
0
  }
526
527
0
  if (_internal_metadata_.have_unknown_fields()) {
528
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
529
0
        _internal_metadata_.unknown_fields(), output);
530
0
  }
531
  // @@protoc_insertion_point(serialize_end:v1.EchoResponse)
532
0
}
533
534
::google::protobuf::uint8* EchoResponse::InternalSerializeWithCachedSizesToArray(
535
0
    bool deterministic, ::google::protobuf::uint8* target) const {
536
0
  (void)deterministic; // Unused
537
  // @@protoc_insertion_point(serialize_to_array_start:v1.EchoResponse)
538
0
  ::google::protobuf::uint32 cached_has_bits = 0;
539
0
  (void) cached_has_bits;
540
541
0
  cached_has_bits = _has_bits_[0];
542
  // required string message = 1;
543
0
  if (cached_has_bits & 0x00000001u) {
544
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
545
0
      this->message().data(), static_cast<int>(this->message().length()),
546
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
547
0
      "v1.EchoResponse.message");
548
0
    target =
549
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
550
0
        1, this->message(), target);
551
0
  }
552
553
0
  if (_internal_metadata_.have_unknown_fields()) {
554
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
555
0
        _internal_metadata_.unknown_fields(), target);
556
0
  }
557
  // @@protoc_insertion_point(serialize_to_array_end:v1.EchoResponse)
558
0
  return target;
559
0
}
560
561
0
size_t EchoResponse::ByteSizeLong() const {
562
// @@protoc_insertion_point(message_byte_size_start:v1.EchoResponse)
563
0
  size_t total_size = 0;
564
565
0
  if (_internal_metadata_.have_unknown_fields()) {
566
0
    total_size +=
567
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
568
0
        _internal_metadata_.unknown_fields());
569
0
  }
570
  // required string message = 1;
571
0
  if (has_message()) {
572
0
    total_size += 1 +
573
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
574
0
        this->message());
575
0
  }
576
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
577
0
  SetCachedSize(cached_size);
578
0
  return total_size;
579
0
}
580
581
0
void EchoResponse::MergeFrom(const ::google::protobuf::Message& from) {
582
// @@protoc_insertion_point(generalized_merge_from_start:v1.EchoResponse)
583
0
  GOOGLE_DCHECK_NE(&from, this);
584
0
  const EchoResponse* source =
585
0
      ::google::protobuf::internal::DynamicCastToGenerated<const EchoResponse>(
586
0
          &from);
587
0
  if (source == NULL) {
588
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:v1.EchoResponse)
589
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
590
0
  } else {
591
  // @@protoc_insertion_point(generalized_merge_from_cast_success:v1.EchoResponse)
592
0
    MergeFrom(*source);
593
0
  }
594
0
}
595
596
0
void EchoResponse::MergeFrom(const EchoResponse& from) {
597
// @@protoc_insertion_point(class_specific_merge_from_start:v1.EchoResponse)
598
0
  GOOGLE_DCHECK_NE(&from, this);
599
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
600
0
  ::google::protobuf::uint32 cached_has_bits = 0;
601
0
  (void) cached_has_bits;
602
603
0
  if (from.has_message()) {
604
0
    set_has_message();
605
0
    message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.message_);
606
0
  }
607
0
}
608
609
0
void EchoResponse::CopyFrom(const ::google::protobuf::Message& from) {
610
// @@protoc_insertion_point(generalized_copy_from_start:v1.EchoResponse)
611
0
  if (&from == this) return;
612
0
  Clear();
613
0
  MergeFrom(from);
614
0
}
615
616
0
void EchoResponse::CopyFrom(const EchoResponse& from) {
617
// @@protoc_insertion_point(class_specific_copy_from_start:v1.EchoResponse)
618
0
  if (&from == this) return;
619
0
  Clear();
620
0
  MergeFrom(from);
621
0
}
622
623
0
bool EchoResponse::IsInitialized() const {
624
0
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
625
0
  return true;
626
0
}
627
628
0
void EchoResponse::Swap(EchoResponse* other) {
629
0
  if (other == this) return;
630
0
  InternalSwap(other);
631
0
}
632
0
void EchoResponse::InternalSwap(EchoResponse* other) {
633
0
  using std::swap;
634
0
  message_.Swap(&other->message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
635
0
    GetArenaNoVirtual());
636
0
  swap(_has_bits_[0], other->_has_bits_[0]);
637
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
638
0
}
639
640
0
::google::protobuf::Metadata EchoResponse::GetMetadata() const {
641
0
  protobuf_v1_2eproto::protobuf_AssignDescriptorsOnce();
642
0
  return ::protobuf_v1_2eproto::file_level_metadata[kIndexInFileMessages];
643
0
}
644
645
646
// ===================================================================
647
648
0
EchoService::~EchoService() {}
649
650
0
const ::google::protobuf::ServiceDescriptor* EchoService::descriptor() {
651
0
  protobuf_v1_2eproto::protobuf_AssignDescriptorsOnce();
652
0
  return protobuf_v1_2eproto::file_level_service_descriptors[0];
653
0
}
654
655
0
const ::google::protobuf::ServiceDescriptor* EchoService::GetDescriptor() {
656
0
  return descriptor();
657
0
}
658
659
void EchoService::Echo(::google::protobuf::RpcController* controller,
660
                         const ::v1::EchoRequest*,
661
                         ::v1::EchoResponse*,
662
0
                         ::google::protobuf::Closure* done) {
663
0
  controller->SetFailed("Method Echo() not implemented.");
664
0
  done->Run();
665
0
}
666
667
void EchoService::Echo2(::google::protobuf::RpcController* controller,
668
                         const ::v1::EchoRequest*,
669
                         ::v1::EchoResponse*,
670
0
                         ::google::protobuf::Closure* done) {
671
0
  controller->SetFailed("Method Echo2() not implemented.");
672
0
  done->Run();
673
0
}
674
675
void EchoService::Echo3(::google::protobuf::RpcController* controller,
676
                         const ::v1::EchoRequest*,
677
                         ::v1::EchoResponse*,
678
0
                         ::google::protobuf::Closure* done) {
679
0
  controller->SetFailed("Method Echo3() not implemented.");
680
0
  done->Run();
681
0
}
682
683
void EchoService::Echo4(::google::protobuf::RpcController* controller,
684
                         const ::v1::EchoRequest*,
685
                         ::v1::EchoResponse*,
686
0
                         ::google::protobuf::Closure* done) {
687
0
  controller->SetFailed("Method Echo4() not implemented.");
688
0
  done->Run();
689
0
}
690
691
void EchoService::Echo5(::google::protobuf::RpcController* controller,
692
                         const ::v1::EchoRequest*,
693
                         ::v1::EchoResponse*,
694
0
                         ::google::protobuf::Closure* done) {
695
0
  controller->SetFailed("Method Echo5() not implemented.");
696
0
  done->Run();
697
0
}
698
699
void EchoService::CallMethod(const ::google::protobuf::MethodDescriptor* method,
700
                             ::google::protobuf::RpcController* controller,
701
                             const ::google::protobuf::Message* request,
702
                             ::google::protobuf::Message* response,
703
0
                             ::google::protobuf::Closure* done) {
704
0
  GOOGLE_DCHECK_EQ(method->service(), protobuf_v1_2eproto::file_level_service_descriptors[0]);
705
0
  switch(method->index()) {
706
0
    case 0:
707
0
      Echo(controller,
708
0
             ::google::protobuf::down_cast<const ::v1::EchoRequest*>(request),
709
0
             ::google::protobuf::down_cast< ::v1::EchoResponse*>(response),
710
0
             done);
711
0
      break;
712
0
    case 1:
713
0
      Echo2(controller,
714
0
             ::google::protobuf::down_cast<const ::v1::EchoRequest*>(request),
715
0
             ::google::protobuf::down_cast< ::v1::EchoResponse*>(response),
716
0
             done);
717
0
      break;
718
0
    case 2:
719
0
      Echo3(controller,
720
0
             ::google::protobuf::down_cast<const ::v1::EchoRequest*>(request),
721
0
             ::google::protobuf::down_cast< ::v1::EchoResponse*>(response),
722
0
             done);
723
0
      break;
724
0
    case 3:
725
0
      Echo4(controller,
726
0
             ::google::protobuf::down_cast<const ::v1::EchoRequest*>(request),
727
0
             ::google::protobuf::down_cast< ::v1::EchoResponse*>(response),
728
0
             done);
729
0
      break;
730
0
    case 4:
731
0
      Echo5(controller,
732
0
             ::google::protobuf::down_cast<const ::v1::EchoRequest*>(request),
733
0
             ::google::protobuf::down_cast< ::v1::EchoResponse*>(response),
734
0
             done);
735
0
      break;
736
0
    default:
737
0
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
738
0
      break;
739
0
  }
740
0
}
741
742
const ::google::protobuf::Message& EchoService::GetRequestPrototype(
743
0
    const ::google::protobuf::MethodDescriptor* method) const {
744
0
  GOOGLE_DCHECK_EQ(method->service(), descriptor());
745
0
  switch(method->index()) {
746
0
    case 0:
747
0
      return ::v1::EchoRequest::default_instance();
748
0
    case 1:
749
0
      return ::v1::EchoRequest::default_instance();
750
0
    case 2:
751
0
      return ::v1::EchoRequest::default_instance();
752
0
    case 3:
753
0
      return ::v1::EchoRequest::default_instance();
754
0
    case 4:
755
0
      return ::v1::EchoRequest::default_instance();
756
0
    default:
757
0
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
758
0
      return *::google::protobuf::MessageFactory::generated_factory()
759
0
          ->GetPrototype(method->input_type());
760
0
  }
761
0
}
762
763
const ::google::protobuf::Message& EchoService::GetResponsePrototype(
764
0
    const ::google::protobuf::MethodDescriptor* method) const {
765
0
  GOOGLE_DCHECK_EQ(method->service(), descriptor());
766
0
  switch(method->index()) {
767
0
    case 0:
768
0
      return ::v1::EchoResponse::default_instance();
769
0
    case 1:
770
0
      return ::v1::EchoResponse::default_instance();
771
0
    case 2:
772
0
      return ::v1::EchoResponse::default_instance();
773
0
    case 3:
774
0
      return ::v1::EchoResponse::default_instance();
775
0
    case 4:
776
0
      return ::v1::EchoResponse::default_instance();
777
0
    default:
778
0
      GOOGLE_LOG(FATAL) << "Bad method index; this should never happen.";
779
0
      return *::google::protobuf::MessageFactory::generated_factory()
780
0
          ->GetPrototype(method->output_type());
781
0
  }
782
0
}
783
784
EchoService_Stub::EchoService_Stub(::google::protobuf::RpcChannel* channel)
785
0
  : channel_(channel), owns_channel_(false) {}
786
EchoService_Stub::EchoService_Stub(
787
    ::google::protobuf::RpcChannel* channel,
788
    ::google::protobuf::Service::ChannelOwnership ownership)
789
0
  : channel_(channel),
790
0
    owns_channel_(ownership == ::google::protobuf::Service::STUB_OWNS_CHANNEL) {}
791
0
EchoService_Stub::~EchoService_Stub() {
792
0
  if (owns_channel_) delete channel_;
793
0
}
794
795
void EchoService_Stub::Echo(::google::protobuf::RpcController* controller,
796
                              const ::v1::EchoRequest* request,
797
                              ::v1::EchoResponse* response,
798
0
                              ::google::protobuf::Closure* done) {
799
0
  channel_->CallMethod(descriptor()->method(0),
800
0
                       controller, request, response, done);
801
0
}
802
void EchoService_Stub::Echo2(::google::protobuf::RpcController* controller,
803
                              const ::v1::EchoRequest* request,
804
                              ::v1::EchoResponse* response,
805
0
                              ::google::protobuf::Closure* done) {
806
0
  channel_->CallMethod(descriptor()->method(1),
807
0
                       controller, request, response, done);
808
0
}
809
void EchoService_Stub::Echo3(::google::protobuf::RpcController* controller,
810
                              const ::v1::EchoRequest* request,
811
                              ::v1::EchoResponse* response,
812
0
                              ::google::protobuf::Closure* done) {
813
0
  channel_->CallMethod(descriptor()->method(2),
814
0
                       controller, request, response, done);
815
0
}
816
void EchoService_Stub::Echo4(::google::protobuf::RpcController* controller,
817
                              const ::v1::EchoRequest* request,
818
                              ::v1::EchoResponse* response,
819
0
                              ::google::protobuf::Closure* done) {
820
0
  channel_->CallMethod(descriptor()->method(3),
821
0
                       controller, request, response, done);
822
0
}
823
void EchoService_Stub::Echo5(::google::protobuf::RpcController* controller,
824
                              const ::v1::EchoRequest* request,
825
                              ::v1::EchoResponse* response,
826
0
                              ::google::protobuf::Closure* done) {
827
0
  channel_->CallMethod(descriptor()->method(4),
828
0
                       controller, request, response, done);
829
0
}
830
831
// @@protoc_insertion_point(namespace_scope)
832
}  // namespace v1
833
namespace google {
834
namespace protobuf {
835
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::v1::EchoRequest* Arena::CreateMaybeMessage< ::v1::EchoRequest >(Arena* arena) {
836
0
  return Arena::CreateInternal< ::v1::EchoRequest >(arena);
837
0
}
838
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::v1::EchoResponse* Arena::CreateMaybeMessage< ::v1::EchoResponse >(Arena* arena) {
839
0
  return Arena::CreateInternal< ::v1::EchoResponse >(arena);
840
0
}
841
}  // namespace protobuf
842
}  // namespace google
843
844
// @@protoc_insertion_point(global_scope)