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/util/jsonwriter_test.pb.cc
Line
Count
Source (jump to first uncovered line)
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: yb/util/jsonwriter_test.proto
3
4
#include "yb/util/jsonwriter_test.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/stubs/once.h>
11
#include <google/protobuf/io/coded_stream.h>
12
#include <google/protobuf/wire_format_lite_inl.h>
13
#include <google/protobuf/descriptor.h>
14
#include <google/protobuf/generated_message_reflection.h>
15
#include <google/protobuf/reflection_ops.h>
16
#include <google/protobuf/wire_format.h>
17
// This is a temporary google only hack
18
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
19
#include "third_party/protobuf/version.h"
20
#endif
21
#include "yb/util/protobuf-annotations.h"
22
// @@protoc_insertion_point(includes)
23
namespace jsonwriter_test {
24
class TestAllTypes_NestedMessageDefaultTypeInternal {
25
 public:
26
  ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes_NestedMessage>
27
      _instance;
28
} _TestAllTypes_NestedMessage_default_instance_;
29
class TestAllTypesDefaultTypeInternal {
30
 public:
31
  ::google::protobuf::internal::ExplicitlyConstructed<TestAllTypes>
32
      _instance;
33
} _TestAllTypes_default_instance_;
34
}  // namespace jsonwriter_test
35
namespace protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto {
36
4
void InitDefaultsTestAllTypes_NestedMessageImpl() {
37
4
  GOOGLE_PROTOBUF_VERIFY_VERSION;
38
39
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
40
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
41
#else
42
4
  ::google::protobuf::internal::InitProtobufDefaults();
43
4
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
44
4
  {
45
4
    void* ptr = &::jsonwriter_test::_TestAllTypes_NestedMessage_default_instance_;
46
4
    new (ptr) ::jsonwriter_test::TestAllTypes_NestedMessage();
47
4
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
48
4
  }
49
4
  ::jsonwriter_test::TestAllTypes_NestedMessage::InitAsDefaultInstance();
50
4
}
51
52
10
void InitDefaultsTestAllTypes_NestedMessage() {
53
10
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
54
10
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTestAllTypes_NestedMessageImpl);
55
10
}
56
57
4
void InitDefaultsTestAllTypesImpl() {
58
4
  GOOGLE_PROTOBUF_VERIFY_VERSION;
59
60
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
61
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
62
#else
63
4
  ::google::protobuf::internal::InitProtobufDefaults();
64
4
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
65
4
  protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::InitDefaultsTestAllTypes_NestedMessage();
66
4
  {
67
4
    void* ptr = &::jsonwriter_test::_TestAllTypes_default_instance_;
68
4
    new (ptr) ::jsonwriter_test::TestAllTypes();
69
4
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
70
4
  }
71
4
  ::jsonwriter_test::TestAllTypes::InitAsDefaultInstance();
72
4
}
73
74
8
void InitDefaultsTestAllTypes() {
75
8
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
76
8
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTestAllTypesImpl);
77
8
}
78
79
::google::protobuf::Metadata file_level_metadata[2];
80
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
81
82
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
83
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes_NestedMessage, _has_bits_),
84
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes_NestedMessage, _internal_metadata_),
85
  ~0u,  // no _extensions_
86
  ~0u,  // no _oneof_case_
87
  ~0u,  // no _weak_field_map_
88
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes_NestedMessage, int_field_),
89
  0,
90
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, _has_bits_),
91
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, _internal_metadata_),
92
  ~0u,  // no _extensions_
93
  ~0u,  // no _oneof_case_
94
  ~0u,  // no _weak_field_map_
95
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_int32_),
96
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_int64_),
97
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_uint32_),
98
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_uint64_),
99
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_sint32_),
100
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_sint64_),
101
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_fixed32_),
102
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_fixed64_),
103
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_sfixed32_),
104
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_sfixed64_),
105
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_float_),
106
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_double_),
107
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_bool_),
108
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_string_),
109
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_bytes_),
110
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_nested_message_),
111
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, optional_nested_enum_),
112
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_int32_),
113
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_int64_),
114
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_uint32_),
115
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_uint64_),
116
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_sint32_),
117
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_sint64_),
118
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_fixed32_),
119
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_fixed64_),
120
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_sfixed32_),
121
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_sfixed64_),
122
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_float_),
123
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_double_),
124
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_bool_),
125
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_string_),
126
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_bytes_),
127
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_nested_message_),
128
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::jsonwriter_test::TestAllTypes, repeated_nested_enum_),
129
  4,
130
  3,
131
  5,
132
  6,
133
  8,
134
  7,
135
  9,
136
  10,
137
  12,
138
  11,
139
  13,
140
  14,
141
  15,
142
  0,
143
  1,
144
  2,
145
  16,
146
  ~0u,
147
  ~0u,
148
  ~0u,
149
  ~0u,
150
  ~0u,
151
  ~0u,
152
  ~0u,
153
  ~0u,
154
  ~0u,
155
  ~0u,
156
  ~0u,
157
  ~0u,
158
  ~0u,
159
  ~0u,
160
  ~0u,
161
  ~0u,
162
  ~0u,
163
};
164
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
165
  { 0, 6, sizeof(::jsonwriter_test::TestAllTypes_NestedMessage)},
166
  { 7, 46, sizeof(::jsonwriter_test::TestAllTypes)},
167
};
168
169
static ::google::protobuf::Message const * const file_default_instances[] = {
170
  reinterpret_cast<const ::google::protobuf::Message*>(&::jsonwriter_test::_TestAllTypes_NestedMessage_default_instance_),
171
  reinterpret_cast<const ::google::protobuf::Message*>(&::jsonwriter_test::_TestAllTypes_default_instance_),
172
};
173
174
4
void protobuf_AssignDescriptors() {
175
4
  AddDescriptors();
176
4
  ::google::protobuf::MessageFactory* factory = NULL;
177
4
  AssignDescriptors(
178
4
      "yb/util/jsonwriter_test.proto", schemas, file_default_instances, TableStruct::offsets, factory,
179
4
      file_level_metadata, file_level_enum_descriptors, NULL);
180
4
}
181
182
57
void protobuf_AssignDescriptorsOnce() {
183
57
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
184
57
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
185
57
}
186
187
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
188
0
void protobuf_RegisterTypes(const ::std::string&) {
189
0
  protobuf_AssignDescriptorsOnce();
190
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
191
0
}
192
193
4
void AddDescriptorsImpl() {
194
4
  InitDefaults();
195
4
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
196
4
      "\n\035yb/util/jsonwriter_test.proto\022\017jsonwri"
197
4
      "ter_test\"\365\010\n\014TestAllTypes\022\026\n\016optional_in"
198
4
      "t32\030\001 \001(\005\022\026\n\016optional_int64\030\002 \001(\003\022\027\n\017opt"
199
4
      "ional_uint32\030\003 \001(\r\022\027\n\017optional_uint64\030\004 "
200
4
      "\001(\004\022\027\n\017optional_sint32\030\005 \001(\021\022\027\n\017optional"
201
4
      "_sint64\030\006 \001(\022\022\030\n\020optional_fixed32\030\007 \001(\007\022"
202
4
      "\030\n\020optional_fixed64\030\010 \001(\006\022\031\n\021optional_sf"
203
4
      "ixed32\030\t \001(\017\022\031\n\021optional_sfixed64\030\n \001(\020\022"
204
4
      "\026\n\016optional_float\030\013 \001(\002\022\027\n\017optional_doub"
205
4
      "le\030\014 \001(\001\022\025\n\roptional_bool\030\r \001(\010\022\027\n\017optio"
206
4
      "nal_string\030\016 \001(\t\022\026\n\016optional_bytes\030\017 \001(\014"
207
4
      "\022L\n\027optional_nested_message\030\022 \001(\0132+.json"
208
4
      "writer_test.TestAllTypes.NestedMessage\022F"
209
4
      "\n\024optional_nested_enum\030\025 \001(\0162(.jsonwrite"
210
4
      "r_test.TestAllTypes.NestedEnum\022\026\n\016repeat"
211
4
      "ed_int32\030\037 \003(\005\022\026\n\016repeated_int64\030  \003(\003\022\027"
212
4
      "\n\017repeated_uint32\030! \003(\r\022\027\n\017repeated_uint"
213
4
      "64\030\" \003(\004\022\027\n\017repeated_sint32\030# \003(\021\022\027\n\017rep"
214
4
      "eated_sint64\030$ \003(\022\022\030\n\020repeated_fixed32\030%"
215
4
      " \003(\007\022\030\n\020repeated_fixed64\030& \003(\006\022\031\n\021repeat"
216
4
      "ed_sfixed32\030\' \003(\017\022\031\n\021repeated_sfixed64\030("
217
4
      " \003(\020\022\026\n\016repeated_float\030) \003(\002\022\027\n\017repeated"
218
4
      "_double\030* \003(\001\022\025\n\rrepeated_bool\030+ \003(\010\022\027\n\017"
219
4
      "repeated_string\030, \003(\t\022\026\n\016repeated_bytes\030"
220
4
      "- \003(\014\022L\n\027repeated_nested_message\0300 \003(\0132+"
221
4
      ".jsonwriter_test.TestAllTypes.NestedMess"
222
4
      "age\022F\n\024repeated_nested_enum\0303 \003(\0162(.json"
223
4
      "writer_test.TestAllTypes.NestedEnum\032\"\n\rN"
224
4
      "estedMessage\022\021\n\tint_field\030\001 \001(\005\"\'\n\nNeste"
225
4
      "dEnum\022\007\n\003FOO\020\001\022\007\n\003BAR\020\002\022\007\n\003BAZ\020\003"
226
4
  };
227
4
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
228
4
      descriptor, 1192);
229
4
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
230
4
    "yb/util/jsonwriter_test.proto", &protobuf_RegisterTypes);
231
4
}
232
233
8
void AddDescriptors() {
234
8
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
235
8
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
236
8
}
237
// Force AddDescriptors() to be called at dynamic initialization time.
238
struct StaticDescriptorInitializer {
239
4
  StaticDescriptorInitializer() {
240
4
    AddDescriptors();
241
4
  }
242
} static_descriptor_initializer;
243
}  // namespace protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto
244
namespace jsonwriter_test {
245
0
const ::google::protobuf::EnumDescriptor* TestAllTypes_NestedEnum_descriptor() {
246
0
  protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::protobuf_AssignDescriptorsOnce();
247
0
  return protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::file_level_enum_descriptors[0];
248
0
}
249
1
bool TestAllTypes_NestedEnum_IsValid(int value) {
250
1
  switch (value) {
251
1
    case 1:
252
1
    case 2:
253
1
    case 3:
254
1
      return true;
255
0
    default:
256
0
      return false;
257
1
  }
258
1
}
259
260
#if !defined(_MSC_VER) || _MSC_VER >= 1900
261
const TestAllTypes_NestedEnum TestAllTypes::FOO;
262
const TestAllTypes_NestedEnum TestAllTypes::BAR;
263
const TestAllTypes_NestedEnum TestAllTypes::BAZ;
264
const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MIN;
265
const TestAllTypes_NestedEnum TestAllTypes::NestedEnum_MAX;
266
const int TestAllTypes::NestedEnum_ARRAYSIZE;
267
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
268
269
// ===================================================================
270
271
4
void TestAllTypes_NestedMessage::InitAsDefaultInstance() {
272
4
}
273
#if !defined(_MSC_VER) || _MSC_VER >= 1900
274
const int TestAllTypes_NestedMessage::kIntFieldFieldNumber;
275
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
276
277
TestAllTypes_NestedMessage::TestAllTypes_NestedMessage()
278
6
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
279
2
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
280
2
    ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::InitDefaultsTestAllTypes_NestedMessage();
281
2
  }
282
6
  SharedCtor();
283
  // @@protoc_insertion_point(constructor:jsonwriter_test.TestAllTypes.NestedMessage)
284
6
}
285
TestAllTypes_NestedMessage::TestAllTypes_NestedMessage(const TestAllTypes_NestedMessage& from)
286
  : ::google::protobuf::Message(),
287
      _internal_metadata_(NULL),
288
      _has_bits_(from._has_bits_),
289
0
      _cached_size_(0) {
290
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
291
0
  int_field_ = from.int_field_;
292
  // @@protoc_insertion_point(copy_constructor:jsonwriter_test.TestAllTypes.NestedMessage)
293
0
}
294
295
6
void TestAllTypes_NestedMessage::SharedCtor() {
296
6
  _cached_size_ = 0;
297
6
  int_field_ = 0;
298
6
}
299
300
2
TestAllTypes_NestedMessage::~TestAllTypes_NestedMessage() {
301
  // @@protoc_insertion_point(destructor:jsonwriter_test.TestAllTypes.NestedMessage)
302
2
  SharedDtor();
303
2
}
304
305
2
void TestAllTypes_NestedMessage::SharedDtor() {
306
2
}
307
308
0
void TestAllTypes_NestedMessage::SetCachedSize(int size) const {
309
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
310
0
  _cached_size_ = size;
311
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
312
0
}
313
0
const ::google::protobuf::Descriptor* TestAllTypes_NestedMessage::descriptor() {
314
0
  ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::protobuf_AssignDescriptorsOnce();
315
0
  return ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
316
0
}
317
318
0
const TestAllTypes_NestedMessage& TestAllTypes_NestedMessage::default_instance() {
319
0
  ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::InitDefaultsTestAllTypes_NestedMessage();
320
0
  return *internal_default_instance();
321
0
}
322
323
0
TestAllTypes_NestedMessage* TestAllTypes_NestedMessage::New(::google::protobuf::Arena* arena) const {
324
0
  TestAllTypes_NestedMessage* n = new TestAllTypes_NestedMessage;
325
0
  if (arena != NULL) {
326
0
    arena->Own(n);
327
0
  }
328
0
  return n;
329
0
}
330
331
0
void TestAllTypes_NestedMessage::Clear() {
332
// @@protoc_insertion_point(message_clear_start:jsonwriter_test.TestAllTypes.NestedMessage)
333
0
  ::google::protobuf::uint32 cached_has_bits = 0;
334
  // Prevent compiler warnings about cached_has_bits being unused
335
0
  (void) cached_has_bits;
336
337
0
  int_field_ = 0;
338
0
  _has_bits_.Clear();
339
0
  _internal_metadata_.Clear();
340
0
}
341
342
bool TestAllTypes_NestedMessage::MergePartialFromCodedStream(
343
0
    ::google::protobuf::io::CodedInputStream* input) {
344
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
345
0
  ::google::protobuf::uint32 tag;
346
  // @@protoc_insertion_point(parse_start:jsonwriter_test.TestAllTypes.NestedMessage)
347
0
  for (;;) {
348
0
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
349
0
    tag = p.first;
350
0
    if (!p.second) goto handle_unusual;
351
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
352
      // optional int32 int_field = 1;
353
0
      case 1: {
354
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
355
0
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
356
0
          set_has_int_field();
357
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
358
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
359
0
                 input, &int_field_)));
360
0
        } else {
361
0
          goto handle_unusual;
362
0
        }
363
0
        break;
364
0
      }
365
366
0
      default: {
367
0
      handle_unusual:
368
0
        if (tag == 0) {
369
0
          goto success;
370
0
        }
371
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
372
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
373
0
        break;
374
0
      }
375
0
    }
376
0
  }
377
0
success:
378
  // @@protoc_insertion_point(parse_success:jsonwriter_test.TestAllTypes.NestedMessage)
379
0
  return true;
380
0
failure:
381
  // @@protoc_insertion_point(parse_failure:jsonwriter_test.TestAllTypes.NestedMessage)
382
0
  return false;
383
0
#undef DO_
384
0
}
385
386
void TestAllTypes_NestedMessage::SerializeWithCachedSizes(
387
0
    ::google::protobuf::io::CodedOutputStream* output) const {
388
  // @@protoc_insertion_point(serialize_start:jsonwriter_test.TestAllTypes.NestedMessage)
389
0
  ::google::protobuf::uint32 cached_has_bits = 0;
390
0
  (void) cached_has_bits;
391
392
0
  cached_has_bits = _has_bits_[0];
393
  // optional int32 int_field = 1;
394
0
  if (cached_has_bits & 0x00000001u) {
395
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->int_field(), output);
396
0
  }
397
398
0
  if (_internal_metadata_.have_unknown_fields()) {
399
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
400
0
        _internal_metadata_.unknown_fields(), output);
401
0
  }
402
  // @@protoc_insertion_point(serialize_end:jsonwriter_test.TestAllTypes.NestedMessage)
403
0
}
404
405
::google::protobuf::uint8* TestAllTypes_NestedMessage::InternalSerializeWithCachedSizesToArray(
406
0
    bool deterministic, ::google::protobuf::uint8* target) const {
407
0
  (void)deterministic; // Unused
408
  // @@protoc_insertion_point(serialize_to_array_start:jsonwriter_test.TestAllTypes.NestedMessage)
409
0
  ::google::protobuf::uint32 cached_has_bits = 0;
410
0
  (void) cached_has_bits;
411
412
0
  cached_has_bits = _has_bits_[0];
413
  // optional int32 int_field = 1;
414
0
  if (cached_has_bits & 0x00000001u) {
415
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->int_field(), target);
416
0
  }
417
418
0
  if (_internal_metadata_.have_unknown_fields()) {
419
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
420
0
        _internal_metadata_.unknown_fields(), target);
421
0
  }
422
  // @@protoc_insertion_point(serialize_to_array_end:jsonwriter_test.TestAllTypes.NestedMessage)
423
0
  return target;
424
0
}
425
426
0
size_t TestAllTypes_NestedMessage::ByteSizeLong() const {
427
// @@protoc_insertion_point(message_byte_size_start:jsonwriter_test.TestAllTypes.NestedMessage)
428
0
  size_t total_size = 0;
429
430
0
  if (_internal_metadata_.have_unknown_fields()) {
431
0
    total_size +=
432
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
433
0
        _internal_metadata_.unknown_fields());
434
0
  }
435
  // optional int32 int_field = 1;
436
0
  if (has_int_field()) {
437
0
    total_size += 1 +
438
0
      ::google::protobuf::internal::WireFormatLite::Int32Size(
439
0
        this->int_field());
440
0
  }
441
442
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
443
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
444
0
  _cached_size_ = cached_size;
445
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
446
0
  return total_size;
447
0
}
448
449
0
void TestAllTypes_NestedMessage::MergeFrom(const ::google::protobuf::Message& from) {
450
// @@protoc_insertion_point(generalized_merge_from_start:jsonwriter_test.TestAllTypes.NestedMessage)
451
0
  GOOGLE_DCHECK_NE(&from, this);
452
0
  const TestAllTypes_NestedMessage* source =
453
0
      ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes_NestedMessage>(
454
0
          &from);
455
0
  if (source == NULL) {
456
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:jsonwriter_test.TestAllTypes.NestedMessage)
457
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
458
0
  } else {
459
  // @@protoc_insertion_point(generalized_merge_from_cast_success:jsonwriter_test.TestAllTypes.NestedMessage)
460
0
    MergeFrom(*source);
461
0
  }
462
0
}
463
464
0
void TestAllTypes_NestedMessage::MergeFrom(const TestAllTypes_NestedMessage& from) {
465
// @@protoc_insertion_point(class_specific_merge_from_start:jsonwriter_test.TestAllTypes.NestedMessage)
466
0
  GOOGLE_DCHECK_NE(&from, this);
467
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
468
0
  ::google::protobuf::uint32 cached_has_bits = 0;
469
0
  (void) cached_has_bits;
470
471
0
  if (from.has_int_field()) {
472
0
    set_int_field(from.int_field());
473
0
  }
474
0
}
475
476
0
void TestAllTypes_NestedMessage::CopyFrom(const ::google::protobuf::Message& from) {
477
// @@protoc_insertion_point(generalized_copy_from_start:jsonwriter_test.TestAllTypes.NestedMessage)
478
0
  if (&from == this) return;
479
0
  Clear();
480
0
  MergeFrom(from);
481
0
}
482
483
0
void TestAllTypes_NestedMessage::CopyFrom(const TestAllTypes_NestedMessage& from) {
484
// @@protoc_insertion_point(class_specific_copy_from_start:jsonwriter_test.TestAllTypes.NestedMessage)
485
0
  if (&from == this) return;
486
0
  Clear();
487
0
  MergeFrom(from);
488
0
}
489
490
0
bool TestAllTypes_NestedMessage::IsInitialized() const {
491
0
  return true;
492
0
}
493
494
0
void TestAllTypes_NestedMessage::Swap(TestAllTypes_NestedMessage* other) {
495
0
  if (other == this) return;
496
0
  InternalSwap(other);
497
0
}
498
0
void TestAllTypes_NestedMessage::InternalSwap(TestAllTypes_NestedMessage* other) {
499
0
  using std::swap;
500
0
  swap(int_field_, other->int_field_);
501
0
  swap(_has_bits_[0], other->_has_bits_[0]);
502
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
503
0
  swap(_cached_size_, other->_cached_size_);
504
0
}
505
506
8
::google::protobuf::Metadata TestAllTypes_NestedMessage::GetMetadata() const {
507
8
  protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::protobuf_AssignDescriptorsOnce();
508
8
  return ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::file_level_metadata[kIndexInFileMessages];
509
8
}
510
511
512
// ===================================================================
513
514
4
void TestAllTypes::InitAsDefaultInstance() {
515
4
  ::jsonwriter_test::_TestAllTypes_default_instance_._instance.get_mutable()->optional_nested_message_ = const_cast< ::jsonwriter_test::TestAllTypes_NestedMessage*>(
516
4
      ::jsonwriter_test::TestAllTypes_NestedMessage::internal_default_instance());
517
4
}
518
#if !defined(_MSC_VER) || _MSC_VER >= 1900
519
const int TestAllTypes::kOptionalInt32FieldNumber;
520
const int TestAllTypes::kOptionalInt64FieldNumber;
521
const int TestAllTypes::kOptionalUint32FieldNumber;
522
const int TestAllTypes::kOptionalUint64FieldNumber;
523
const int TestAllTypes::kOptionalSint32FieldNumber;
524
const int TestAllTypes::kOptionalSint64FieldNumber;
525
const int TestAllTypes::kOptionalFixed32FieldNumber;
526
const int TestAllTypes::kOptionalFixed64FieldNumber;
527
const int TestAllTypes::kOptionalSfixed32FieldNumber;
528
const int TestAllTypes::kOptionalSfixed64FieldNumber;
529
const int TestAllTypes::kOptionalFloatFieldNumber;
530
const int TestAllTypes::kOptionalDoubleFieldNumber;
531
const int TestAllTypes::kOptionalBoolFieldNumber;
532
const int TestAllTypes::kOptionalStringFieldNumber;
533
const int TestAllTypes::kOptionalBytesFieldNumber;
534
const int TestAllTypes::kOptionalNestedMessageFieldNumber;
535
const int TestAllTypes::kOptionalNestedEnumFieldNumber;
536
const int TestAllTypes::kRepeatedInt32FieldNumber;
537
const int TestAllTypes::kRepeatedInt64FieldNumber;
538
const int TestAllTypes::kRepeatedUint32FieldNumber;
539
const int TestAllTypes::kRepeatedUint64FieldNumber;
540
const int TestAllTypes::kRepeatedSint32FieldNumber;
541
const int TestAllTypes::kRepeatedSint64FieldNumber;
542
const int TestAllTypes::kRepeatedFixed32FieldNumber;
543
const int TestAllTypes::kRepeatedFixed64FieldNumber;
544
const int TestAllTypes::kRepeatedSfixed32FieldNumber;
545
const int TestAllTypes::kRepeatedSfixed64FieldNumber;
546
const int TestAllTypes::kRepeatedFloatFieldNumber;
547
const int TestAllTypes::kRepeatedDoubleFieldNumber;
548
const int TestAllTypes::kRepeatedBoolFieldNumber;
549
const int TestAllTypes::kRepeatedStringFieldNumber;
550
const int TestAllTypes::kRepeatedBytesFieldNumber;
551
const int TestAllTypes::kRepeatedNestedMessageFieldNumber;
552
const int TestAllTypes::kRepeatedNestedEnumFieldNumber;
553
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
554
555
TestAllTypes::TestAllTypes()
556
8
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
557
4
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
558
4
    ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::InitDefaultsTestAllTypes();
559
4
  }
560
8
  SharedCtor();
561
  // @@protoc_insertion_point(constructor:jsonwriter_test.TestAllTypes)
562
8
}
563
TestAllTypes::TestAllTypes(const TestAllTypes& from)
564
  : ::google::protobuf::Message(),
565
      _internal_metadata_(NULL),
566
      _has_bits_(from._has_bits_),
567
      _cached_size_(0),
568
      repeated_int32_(from.repeated_int32_),
569
      repeated_int64_(from.repeated_int64_),
570
      repeated_uint32_(from.repeated_uint32_),
571
      repeated_uint64_(from.repeated_uint64_),
572
      repeated_sint32_(from.repeated_sint32_),
573
      repeated_sint64_(from.repeated_sint64_),
574
      repeated_fixed32_(from.repeated_fixed32_),
575
      repeated_fixed64_(from.repeated_fixed64_),
576
      repeated_sfixed32_(from.repeated_sfixed32_),
577
      repeated_sfixed64_(from.repeated_sfixed64_),
578
      repeated_float_(from.repeated_float_),
579
      repeated_double_(from.repeated_double_),
580
      repeated_bool_(from.repeated_bool_),
581
      repeated_string_(from.repeated_string_),
582
      repeated_bytes_(from.repeated_bytes_),
583
      repeated_nested_message_(from.repeated_nested_message_),
584
0
      repeated_nested_enum_(from.repeated_nested_enum_) {
585
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
586
0
  optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
587
0
  if (from.has_optional_string()) {
588
0
    optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
589
0
  }
590
0
  optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
591
0
  if (from.has_optional_bytes()) {
592
0
    optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
593
0
  }
594
0
  if (from.has_optional_nested_message()) {
595
0
    optional_nested_message_ = new ::jsonwriter_test::TestAllTypes_NestedMessage(*from.optional_nested_message_);
596
0
  } else {
597
0
    optional_nested_message_ = NULL;
598
0
  }
599
0
  ::memcpy(&optional_int64_, &from.optional_int64_,
600
0
    static_cast<size_t>(reinterpret_cast<char*>(&optional_nested_enum_) -
601
0
    reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_nested_enum_));
602
  // @@protoc_insertion_point(copy_constructor:jsonwriter_test.TestAllTypes)
603
0
}
604
605
8
void TestAllTypes::SharedCtor() {
606
8
  _cached_size_ = 0;
607
8
  optional_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
608
8
  optional_bytes_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
609
8
  ::memset(&optional_nested_message_, 0, static_cast<size_t>(
610
8
      reinterpret_cast<char*>(&optional_bool_) -
611
8
      reinterpret_cast<char*>(&optional_nested_message_)) + sizeof(optional_bool_));
612
8
  optional_nested_enum_ = 1;
613
8
}
614
615
4
TestAllTypes::~TestAllTypes() {
616
  // @@protoc_insertion_point(destructor:jsonwriter_test.TestAllTypes)
617
4
  SharedDtor();
618
4
}
619
620
4
void TestAllTypes::SharedDtor() {
621
4
  optional_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
622
4
  optional_bytes_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
623
4
  if (this != internal_default_instance()) delete optional_nested_message_;
624
4
}
625
626
0
void TestAllTypes::SetCachedSize(int size) const {
627
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
628
0
  _cached_size_ = size;
629
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
630
0
}
631
0
const ::google::protobuf::Descriptor* TestAllTypes::descriptor() {
632
0
  ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::protobuf_AssignDescriptorsOnce();
633
0
  return ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
634
0
}
635
636
0
const TestAllTypes& TestAllTypes::default_instance() {
637
0
  ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::InitDefaultsTestAllTypes();
638
0
  return *internal_default_instance();
639
0
}
640
641
0
TestAllTypes* TestAllTypes::New(::google::protobuf::Arena* arena) const {
642
0
  TestAllTypes* n = new TestAllTypes;
643
0
  if (arena != NULL) {
644
0
    arena->Own(n);
645
0
  }
646
0
  return n;
647
0
}
648
649
0
void TestAllTypes::Clear() {
650
// @@protoc_insertion_point(message_clear_start:jsonwriter_test.TestAllTypes)
651
0
  ::google::protobuf::uint32 cached_has_bits = 0;
652
  // Prevent compiler warnings about cached_has_bits being unused
653
0
  (void) cached_has_bits;
654
655
0
  repeated_int32_.Clear();
656
0
  repeated_int64_.Clear();
657
0
  repeated_uint32_.Clear();
658
0
  repeated_uint64_.Clear();
659
0
  repeated_sint32_.Clear();
660
0
  repeated_sint64_.Clear();
661
0
  repeated_fixed32_.Clear();
662
0
  repeated_fixed64_.Clear();
663
0
  repeated_sfixed32_.Clear();
664
0
  repeated_sfixed64_.Clear();
665
0
  repeated_float_.Clear();
666
0
  repeated_double_.Clear();
667
0
  repeated_bool_.Clear();
668
0
  repeated_string_.Clear();
669
0
  repeated_bytes_.Clear();
670
0
  repeated_nested_message_.Clear();
671
0
  repeated_nested_enum_.Clear();
672
0
  cached_has_bits = _has_bits_[0];
673
0
  if (cached_has_bits & 7u) {
674
0
    if (cached_has_bits & 0x00000001u) {
675
0
      GOOGLE_DCHECK(!optional_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
676
0
      (*optional_string_.UnsafeRawStringPointer())->clear();
677
0
    }
678
0
    if (cached_has_bits & 0x00000002u) {
679
0
      GOOGLE_DCHECK(!optional_bytes_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
680
0
      (*optional_bytes_.UnsafeRawStringPointer())->clear();
681
0
    }
682
0
    if (cached_has_bits & 0x00000004u) {
683
0
      GOOGLE_DCHECK(optional_nested_message_ != NULL);
684
0
      optional_nested_message_->Clear();
685
0
    }
686
0
  }
687
0
  if (cached_has_bits & 248u) {
688
0
    ::memset(&optional_int64_, 0, static_cast<size_t>(
689
0
        reinterpret_cast<char*>(&optional_sint64_) -
690
0
        reinterpret_cast<char*>(&optional_int64_)) + sizeof(optional_sint64_));
691
0
  }
692
0
  if (cached_has_bits & 65280u) {
693
0
    ::memset(&optional_sint32_, 0, static_cast<size_t>(
694
0
        reinterpret_cast<char*>(&optional_bool_) -
695
0
        reinterpret_cast<char*>(&optional_sint32_)) + sizeof(optional_bool_));
696
0
  }
697
0
  optional_nested_enum_ = 1;
698
0
  _has_bits_.Clear();
699
0
  _internal_metadata_.Clear();
700
0
}
701
702
bool TestAllTypes::MergePartialFromCodedStream(
703
0
    ::google::protobuf::io::CodedInputStream* input) {
704
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
705
0
  ::google::protobuf::uint32 tag;
706
  // @@protoc_insertion_point(parse_start:jsonwriter_test.TestAllTypes)
707
0
  for (;;) {
708
0
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
709
0
    tag = p.first;
710
0
    if (!p.second) goto handle_unusual;
711
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
712
      // optional int32 optional_int32 = 1;
713
0
      case 1: {
714
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
715
0
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
716
0
          set_has_optional_int32();
717
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
718
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
719
0
                 input, &optional_int32_)));
720
0
        } else {
721
0
          goto handle_unusual;
722
0
        }
723
0
        break;
724
0
      }
725
726
      // optional int64 optional_int64 = 2;
727
0
      case 2: {
728
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
729
0
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
730
0
          set_has_optional_int64();
731
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
732
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
733
0
                 input, &optional_int64_)));
734
0
        } else {
735
0
          goto handle_unusual;
736
0
        }
737
0
        break;
738
0
      }
739
740
      // optional uint32 optional_uint32 = 3;
741
0
      case 3: {
742
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
743
0
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
744
0
          set_has_optional_uint32();
745
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
746
0
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
747
0
                 input, &optional_uint32_)));
748
0
        } else {
749
0
          goto handle_unusual;
750
0
        }
751
0
        break;
752
0
      }
753
754
      // optional uint64 optional_uint64 = 4;
755
0
      case 4: {
756
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
757
0
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
758
0
          set_has_optional_uint64();
759
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
760
0
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
761
0
                 input, &optional_uint64_)));
762
0
        } else {
763
0
          goto handle_unusual;
764
0
        }
765
0
        break;
766
0
      }
767
768
      // optional sint32 optional_sint32 = 5;
769
0
      case 5: {
770
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
771
0
            static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
772
0
          set_has_optional_sint32();
773
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
774
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
775
0
                 input, &optional_sint32_)));
776
0
        } else {
777
0
          goto handle_unusual;
778
0
        }
779
0
        break;
780
0
      }
781
782
      // optional sint64 optional_sint64 = 6;
783
0
      case 6: {
784
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
785
0
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
786
0
          set_has_optional_sint64();
787
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
788
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
789
0
                 input, &optional_sint64_)));
790
0
        } else {
791
0
          goto handle_unusual;
792
0
        }
793
0
        break;
794
0
      }
795
796
      // optional fixed32 optional_fixed32 = 7;
797
0
      case 7: {
798
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
799
0
            static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
800
0
          set_has_optional_fixed32();
801
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
802
0
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
803
0
                 input, &optional_fixed32_)));
804
0
        } else {
805
0
          goto handle_unusual;
806
0
        }
807
0
        break;
808
0
      }
809
810
      // optional fixed64 optional_fixed64 = 8;
811
0
      case 8: {
812
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
813
0
            static_cast< ::google::protobuf::uint8>(65u /* 65 & 0xFF */)) {
814
0
          set_has_optional_fixed64();
815
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
816
0
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
817
0
                 input, &optional_fixed64_)));
818
0
        } else {
819
0
          goto handle_unusual;
820
0
        }
821
0
        break;
822
0
      }
823
824
      // optional sfixed32 optional_sfixed32 = 9;
825
0
      case 9: {
826
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
827
0
            static_cast< ::google::protobuf::uint8>(77u /* 77 & 0xFF */)) {
828
0
          set_has_optional_sfixed32();
829
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
830
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
831
0
                 input, &optional_sfixed32_)));
832
0
        } else {
833
0
          goto handle_unusual;
834
0
        }
835
0
        break;
836
0
      }
837
838
      // optional sfixed64 optional_sfixed64 = 10;
839
0
      case 10: {
840
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
841
0
            static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
842
0
          set_has_optional_sfixed64();
843
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
844
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
845
0
                 input, &optional_sfixed64_)));
846
0
        } else {
847
0
          goto handle_unusual;
848
0
        }
849
0
        break;
850
0
      }
851
852
      // optional float optional_float = 11;
853
0
      case 11: {
854
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
855
0
            static_cast< ::google::protobuf::uint8>(93u /* 93 & 0xFF */)) {
856
0
          set_has_optional_float();
857
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
858
0
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
859
0
                 input, &optional_float_)));
860
0
        } else {
861
0
          goto handle_unusual;
862
0
        }
863
0
        break;
864
0
      }
865
866
      // optional double optional_double = 12;
867
0
      case 12: {
868
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
869
0
            static_cast< ::google::protobuf::uint8>(97u /* 97 & 0xFF */)) {
870
0
          set_has_optional_double();
871
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
872
0
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
873
0
                 input, &optional_double_)));
874
0
        } else {
875
0
          goto handle_unusual;
876
0
        }
877
0
        break;
878
0
      }
879
880
      // optional bool optional_bool = 13;
881
0
      case 13: {
882
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
883
0
            static_cast< ::google::protobuf::uint8>(104u /* 104 & 0xFF */)) {
884
0
          set_has_optional_bool();
885
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
886
0
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
887
0
                 input, &optional_bool_)));
888
0
        } else {
889
0
          goto handle_unusual;
890
0
        }
891
0
        break;
892
0
      }
893
894
      // optional string optional_string = 14;
895
0
      case 14: {
896
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
897
0
            static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
898
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
899
0
                input, this->mutable_optional_string()));
900
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
901
0
            this->optional_string().data(), static_cast<int>(this->optional_string().length()),
902
0
            ::google::protobuf::internal::WireFormat::PARSE,
903
0
            "jsonwriter_test.TestAllTypes.optional_string");
904
0
        } else {
905
0
          goto handle_unusual;
906
0
        }
907
0
        break;
908
0
      }
909
910
      // optional bytes optional_bytes = 15;
911
0
      case 15: {
912
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
913
0
            static_cast< ::google::protobuf::uint8>(122u /* 122 & 0xFF */)) {
914
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
915
0
                input, this->mutable_optional_bytes()));
916
0
        } else {
917
0
          goto handle_unusual;
918
0
        }
919
0
        break;
920
0
      }
921
922
      // optional .jsonwriter_test.TestAllTypes.NestedMessage optional_nested_message = 18;
923
0
      case 18: {
924
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
925
0
            static_cast< ::google::protobuf::uint8>(146u /* 146 & 0xFF */)) {
926
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
927
0
               input, mutable_optional_nested_message()));
928
0
        } else {
929
0
          goto handle_unusual;
930
0
        }
931
0
        break;
932
0
      }
933
934
      // optional .jsonwriter_test.TestAllTypes.NestedEnum optional_nested_enum = 21;
935
0
      case 21: {
936
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
937
0
            static_cast< ::google::protobuf::uint8>(168u /* 168 & 0xFF */)) {
938
0
          int value;
939
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
940
0
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
941
0
                 input, &value)));
942
0
          if (::jsonwriter_test::TestAllTypes_NestedEnum_IsValid(value)) {
943
0
            set_optional_nested_enum(static_cast< ::jsonwriter_test::TestAllTypes_NestedEnum >(value));
944
0
          } else {
945
0
            mutable_unknown_fields()->AddVarint(
946
0
                21, static_cast< ::google::protobuf::uint64>(value));
947
0
          }
948
0
        } else {
949
0
          goto handle_unusual;
950
0
        }
951
0
        break;
952
0
      }
953
954
      // repeated int32 repeated_int32 = 31;
955
0
      case 31: {
956
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
957
0
            static_cast< ::google::protobuf::uint8>(248u /* 248 & 0xFF */)) {
958
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
959
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
960
0
                 2, 248u, input, this->mutable_repeated_int32())));
961
0
        } else if (
962
0
            static_cast< ::google::protobuf::uint8>(tag) ==
963
0
            static_cast< ::google::protobuf::uint8>(250u /* 250 & 0xFF */)) {
964
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
965
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
966
0
                 input, this->mutable_repeated_int32())));
967
0
        } else {
968
0
          goto handle_unusual;
969
0
        }
970
0
        break;
971
0
      }
972
973
      // repeated int64 repeated_int64 = 32;
974
0
      case 32: {
975
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
976
0
            static_cast< ::google::protobuf::uint8>(0u /* 256 & 0xFF */)) {
977
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
978
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
979
0
                 2, 256u, input, this->mutable_repeated_int64())));
980
0
        } else if (
981
0
            static_cast< ::google::protobuf::uint8>(tag) ==
982
0
            static_cast< ::google::protobuf::uint8>(2u /* 258 & 0xFF */)) {
983
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
984
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
985
0
                 input, this->mutable_repeated_int64())));
986
0
        } else {
987
0
          goto handle_unusual;
988
0
        }
989
0
        break;
990
0
      }
991
992
      // repeated uint32 repeated_uint32 = 33;
993
0
      case 33: {
994
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
995
0
            static_cast< ::google::protobuf::uint8>(8u /* 264 & 0xFF */)) {
996
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
997
0
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
998
0
                 2, 264u, input, this->mutable_repeated_uint32())));
999
0
        } else if (
1000
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1001
0
            static_cast< ::google::protobuf::uint8>(10u /* 266 & 0xFF */)) {
1002
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1003
0
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
1004
0
                 input, this->mutable_repeated_uint32())));
1005
0
        } else {
1006
0
          goto handle_unusual;
1007
0
        }
1008
0
        break;
1009
0
      }
1010
1011
      // repeated uint64 repeated_uint64 = 34;
1012
0
      case 34: {
1013
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1014
0
            static_cast< ::google::protobuf::uint8>(16u /* 272 & 0xFF */)) {
1015
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1016
0
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1017
0
                 2, 272u, input, this->mutable_repeated_uint64())));
1018
0
        } else if (
1019
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1020
0
            static_cast< ::google::protobuf::uint8>(18u /* 274 & 0xFF */)) {
1021
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1022
0
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1023
0
                 input, this->mutable_repeated_uint64())));
1024
0
        } else {
1025
0
          goto handle_unusual;
1026
0
        }
1027
0
        break;
1028
0
      }
1029
1030
      // repeated sint32 repeated_sint32 = 35;
1031
0
      case 35: {
1032
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1033
0
            static_cast< ::google::protobuf::uint8>(24u /* 280 & 0xFF */)) {
1034
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1035
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
1036
0
                 2, 280u, input, this->mutable_repeated_sint32())));
1037
0
        } else if (
1038
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1039
0
            static_cast< ::google::protobuf::uint8>(26u /* 282 & 0xFF */)) {
1040
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1041
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SINT32>(
1042
0
                 input, this->mutable_repeated_sint32())));
1043
0
        } else {
1044
0
          goto handle_unusual;
1045
0
        }
1046
0
        break;
1047
0
      }
1048
1049
      // repeated sint64 repeated_sint64 = 36;
1050
0
      case 36: {
1051
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1052
0
            static_cast< ::google::protobuf::uint8>(32u /* 288 & 0xFF */)) {
1053
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1054
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
1055
0
                 2, 288u, input, this->mutable_repeated_sint64())));
1056
0
        } else if (
1057
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1058
0
            static_cast< ::google::protobuf::uint8>(34u /* 290 & 0xFF */)) {
1059
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1060
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SINT64>(
1061
0
                 input, this->mutable_repeated_sint64())));
1062
0
        } else {
1063
0
          goto handle_unusual;
1064
0
        }
1065
0
        break;
1066
0
      }
1067
1068
      // repeated fixed32 repeated_fixed32 = 37;
1069
0
      case 37: {
1070
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1071
0
            static_cast< ::google::protobuf::uint8>(45u /* 301 & 0xFF */)) {
1072
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1073
0
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
1074
0
                 2, 301u, input, this->mutable_repeated_fixed32())));
1075
0
        } else if (
1076
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1077
0
            static_cast< ::google::protobuf::uint8>(42u /* 298 & 0xFF */)) {
1078
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1079
0
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED32>(
1080
0
                 input, this->mutable_repeated_fixed32())));
1081
0
        } else {
1082
0
          goto handle_unusual;
1083
0
        }
1084
0
        break;
1085
0
      }
1086
1087
      // repeated fixed64 repeated_fixed64 = 38;
1088
0
      case 38: {
1089
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1090
0
            static_cast< ::google::protobuf::uint8>(49u /* 305 & 0xFF */)) {
1091
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1092
0
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
1093
0
                 2, 305u, input, this->mutable_repeated_fixed64())));
1094
0
        } else if (
1095
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1096
0
            static_cast< ::google::protobuf::uint8>(50u /* 306 & 0xFF */)) {
1097
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1098
0
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_FIXED64>(
1099
0
                 input, this->mutable_repeated_fixed64())));
1100
0
        } else {
1101
0
          goto handle_unusual;
1102
0
        }
1103
0
        break;
1104
0
      }
1105
1106
      // repeated sfixed32 repeated_sfixed32 = 39;
1107
0
      case 39: {
1108
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1109
0
            static_cast< ::google::protobuf::uint8>(61u /* 317 & 0xFF */)) {
1110
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1111
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
1112
0
                 2, 317u, input, this->mutable_repeated_sfixed32())));
1113
0
        } else if (
1114
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1115
0
            static_cast< ::google::protobuf::uint8>(58u /* 314 & 0xFF */)) {
1116
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1117
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED32>(
1118
0
                 input, this->mutable_repeated_sfixed32())));
1119
0
        } else {
1120
0
          goto handle_unusual;
1121
0
        }
1122
0
        break;
1123
0
      }
1124
1125
      // repeated sfixed64 repeated_sfixed64 = 40;
1126
0
      case 40: {
1127
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1128
0
            static_cast< ::google::protobuf::uint8>(65u /* 321 & 0xFF */)) {
1129
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1130
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
1131
0
                 2, 321u, input, this->mutable_repeated_sfixed64())));
1132
0
        } else if (
1133
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1134
0
            static_cast< ::google::protobuf::uint8>(66u /* 322 & 0xFF */)) {
1135
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1136
0
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_SFIXED64>(
1137
0
                 input, this->mutable_repeated_sfixed64())));
1138
0
        } else {
1139
0
          goto handle_unusual;
1140
0
        }
1141
0
        break;
1142
0
      }
1143
1144
      // repeated float repeated_float = 41;
1145
0
      case 41: {
1146
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1147
0
            static_cast< ::google::protobuf::uint8>(77u /* 333 & 0xFF */)) {
1148
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1149
0
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1150
0
                 2, 333u, input, this->mutable_repeated_float())));
1151
0
        } else if (
1152
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1153
0
            static_cast< ::google::protobuf::uint8>(74u /* 330 & 0xFF */)) {
1154
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1155
0
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1156
0
                 input, this->mutable_repeated_float())));
1157
0
        } else {
1158
0
          goto handle_unusual;
1159
0
        }
1160
0
        break;
1161
0
      }
1162
1163
      // repeated double repeated_double = 42;
1164
0
      case 42: {
1165
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1166
0
            static_cast< ::google::protobuf::uint8>(81u /* 337 & 0xFF */)) {
1167
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1168
0
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
1169
0
                 2, 337u, input, this->mutable_repeated_double())));
1170
0
        } else if (
1171
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1172
0
            static_cast< ::google::protobuf::uint8>(82u /* 338 & 0xFF */)) {
1173
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1174
0
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
1175
0
                 input, this->mutable_repeated_double())));
1176
0
        } else {
1177
0
          goto handle_unusual;
1178
0
        }
1179
0
        break;
1180
0
      }
1181
1182
      // repeated bool repeated_bool = 43;
1183
0
      case 43: {
1184
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1185
0
            static_cast< ::google::protobuf::uint8>(88u /* 344 & 0xFF */)) {
1186
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1187
0
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
1188
0
                 2, 344u, input, this->mutable_repeated_bool())));
1189
0
        } else if (
1190
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1191
0
            static_cast< ::google::protobuf::uint8>(90u /* 346 & 0xFF */)) {
1192
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1193
0
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
1194
0
                 input, this->mutable_repeated_bool())));
1195
0
        } else {
1196
0
          goto handle_unusual;
1197
0
        }
1198
0
        break;
1199
0
      }
1200
1201
      // repeated string repeated_string = 44;
1202
0
      case 44: {
1203
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1204
0
            static_cast< ::google::protobuf::uint8>(98u /* 354 & 0xFF */)) {
1205
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1206
0
                input, this->add_repeated_string()));
1207
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1208
0
            this->repeated_string(this->repeated_string_size() - 1).data(),
1209
0
            static_cast<int>(this->repeated_string(this->repeated_string_size() - 1).length()),
1210
0
            ::google::protobuf::internal::WireFormat::PARSE,
1211
0
            "jsonwriter_test.TestAllTypes.repeated_string");
1212
0
        } else {
1213
0
          goto handle_unusual;
1214
0
        }
1215
0
        break;
1216
0
      }
1217
1218
      // repeated bytes repeated_bytes = 45;
1219
0
      case 45: {
1220
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1221
0
            static_cast< ::google::protobuf::uint8>(106u /* 362 & 0xFF */)) {
1222
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1223
0
                input, this->add_repeated_bytes()));
1224
0
        } else {
1225
0
          goto handle_unusual;
1226
0
        }
1227
0
        break;
1228
0
      }
1229
1230
      // repeated .jsonwriter_test.TestAllTypes.NestedMessage repeated_nested_message = 48;
1231
0
      case 48: {
1232
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1233
0
            static_cast< ::google::protobuf::uint8>(130u /* 386 & 0xFF */)) {
1234
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_repeated_nested_message()));
1235
0
        } else {
1236
0
          goto handle_unusual;
1237
0
        }
1238
0
        break;
1239
0
      }
1240
1241
      // repeated .jsonwriter_test.TestAllTypes.NestedEnum repeated_nested_enum = 51;
1242
0
      case 51: {
1243
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1244
0
            static_cast< ::google::protobuf::uint8>(152u /* 408 & 0xFF */)) {
1245
0
          int value;
1246
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1247
0
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
1248
0
                 input, &value)));
1249
0
          if (::jsonwriter_test::TestAllTypes_NestedEnum_IsValid(value)) {
1250
0
            add_repeated_nested_enum(static_cast< ::jsonwriter_test::TestAllTypes_NestedEnum >(value));
1251
0
          } else {
1252
0
            mutable_unknown_fields()->AddVarint(
1253
0
                51, static_cast< ::google::protobuf::uint64>(value));
1254
0
          }
1255
0
        } else if (
1256
0
            static_cast< ::google::protobuf::uint8>(tag) ==
1257
0
            static_cast< ::google::protobuf::uint8>(154u /* 410 & 0xFF */)) {
1258
0
          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
1259
0
                 input,
1260
0
                 51,
1261
0
                 ::jsonwriter_test::TestAllTypes_NestedEnum_IsValid,
1262
0
                 mutable_unknown_fields(),
1263
0
                 this->mutable_repeated_nested_enum())));
1264
0
        } else {
1265
0
          goto handle_unusual;
1266
0
        }
1267
0
        break;
1268
0
      }
1269
1270
0
      default: {
1271
0
      handle_unusual:
1272
0
        if (tag == 0) {
1273
0
          goto success;
1274
0
        }
1275
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
1276
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
1277
0
        break;
1278
0
      }
1279
0
    }
1280
0
  }
1281
0
success:
1282
  // @@protoc_insertion_point(parse_success:jsonwriter_test.TestAllTypes)
1283
0
  return true;
1284
0
failure:
1285
  // @@protoc_insertion_point(parse_failure:jsonwriter_test.TestAllTypes)
1286
0
  return false;
1287
0
#undef DO_
1288
0
}
1289
1290
void TestAllTypes::SerializeWithCachedSizes(
1291
0
    ::google::protobuf::io::CodedOutputStream* output) const {
1292
  // @@protoc_insertion_point(serialize_start:jsonwriter_test.TestAllTypes)
1293
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1294
0
  (void) cached_has_bits;
1295
1296
0
  cached_has_bits = _has_bits_[0];
1297
  // optional int32 optional_int32 = 1;
1298
0
  if (cached_has_bits & 0x00000010u) {
1299
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->optional_int32(), output);
1300
0
  }
1301
1302
  // optional int64 optional_int64 = 2;
1303
0
  if (cached_has_bits & 0x00000008u) {
1304
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->optional_int64(), output);
1305
0
  }
1306
1307
  // optional uint32 optional_uint32 = 3;
1308
0
  if (cached_has_bits & 0x00000020u) {
1309
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->optional_uint32(), output);
1310
0
  }
1311
1312
  // optional uint64 optional_uint64 = 4;
1313
0
  if (cached_has_bits & 0x00000040u) {
1314
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->optional_uint64(), output);
1315
0
  }
1316
1317
  // optional sint32 optional_sint32 = 5;
1318
0
  if (cached_has_bits & 0x00000100u) {
1319
0
    ::google::protobuf::internal::WireFormatLite::WriteSInt32(5, this->optional_sint32(), output);
1320
0
  }
1321
1322
  // optional sint64 optional_sint64 = 6;
1323
0
  if (cached_has_bits & 0x00000080u) {
1324
0
    ::google::protobuf::internal::WireFormatLite::WriteSInt64(6, this->optional_sint64(), output);
1325
0
  }
1326
1327
  // optional fixed32 optional_fixed32 = 7;
1328
0
  if (cached_has_bits & 0x00000200u) {
1329
0
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(7, this->optional_fixed32(), output);
1330
0
  }
1331
1332
  // optional fixed64 optional_fixed64 = 8;
1333
0
  if (cached_has_bits & 0x00000400u) {
1334
0
    ::google::protobuf::internal::WireFormatLite::WriteFixed64(8, this->optional_fixed64(), output);
1335
0
  }
1336
1337
  // optional sfixed32 optional_sfixed32 = 9;
1338
0
  if (cached_has_bits & 0x00001000u) {
1339
0
    ::google::protobuf::internal::WireFormatLite::WriteSFixed32(9, this->optional_sfixed32(), output);
1340
0
  }
1341
1342
  // optional sfixed64 optional_sfixed64 = 10;
1343
0
  if (cached_has_bits & 0x00000800u) {
1344
0
    ::google::protobuf::internal::WireFormatLite::WriteSFixed64(10, this->optional_sfixed64(), output);
1345
0
  }
1346
1347
  // optional float optional_float = 11;
1348
0
  if (cached_has_bits & 0x00002000u) {
1349
0
    ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->optional_float(), output);
1350
0
  }
1351
1352
  // optional double optional_double = 12;
1353
0
  if (cached_has_bits & 0x00004000u) {
1354
0
    ::google::protobuf::internal::WireFormatLite::WriteDouble(12, this->optional_double(), output);
1355
0
  }
1356
1357
  // optional bool optional_bool = 13;
1358
0
  if (cached_has_bits & 0x00008000u) {
1359
0
    ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->optional_bool(), output);
1360
0
  }
1361
1362
  // optional string optional_string = 14;
1363
0
  if (cached_has_bits & 0x00000001u) {
1364
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1365
0
      this->optional_string().data(), static_cast<int>(this->optional_string().length()),
1366
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1367
0
      "jsonwriter_test.TestAllTypes.optional_string");
1368
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1369
0
      14, this->optional_string(), output);
1370
0
  }
1371
1372
  // optional bytes optional_bytes = 15;
1373
0
  if (cached_has_bits & 0x00000002u) {
1374
0
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
1375
0
      15, this->optional_bytes(), output);
1376
0
  }
1377
1378
  // optional .jsonwriter_test.TestAllTypes.NestedMessage optional_nested_message = 18;
1379
0
  if (cached_has_bits & 0x00000004u) {
1380
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1381
0
      18, *this->optional_nested_message_, output);
1382
0
  }
1383
1384
  // optional .jsonwriter_test.TestAllTypes.NestedEnum optional_nested_enum = 21;
1385
0
  if (cached_has_bits & 0x00010000u) {
1386
0
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
1387
0
      21, this->optional_nested_enum(), output);
1388
0
  }
1389
1390
  // repeated int32 repeated_int32 = 31;
1391
0
  for (int i = 0, n = this->repeated_int32_size(); i < n; i++) {
1392
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
1393
0
      31, this->repeated_int32(i), output);
1394
0
  }
1395
1396
  // repeated int64 repeated_int64 = 32;
1397
0
  for (int i = 0, n = this->repeated_int64_size(); i < n; i++) {
1398
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(
1399
0
      32, this->repeated_int64(i), output);
1400
0
  }
1401
1402
  // repeated uint32 repeated_uint32 = 33;
1403
0
  for (int i = 0, n = this->repeated_uint32_size(); i < n; i++) {
1404
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
1405
0
      33, this->repeated_uint32(i), output);
1406
0
  }
1407
1408
  // repeated uint64 repeated_uint64 = 34;
1409
0
  for (int i = 0, n = this->repeated_uint64_size(); i < n; i++) {
1410
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(
1411
0
      34, this->repeated_uint64(i), output);
1412
0
  }
1413
1414
  // repeated sint32 repeated_sint32 = 35;
1415
0
  for (int i = 0, n = this->repeated_sint32_size(); i < n; i++) {
1416
0
    ::google::protobuf::internal::WireFormatLite::WriteSInt32(
1417
0
      35, this->repeated_sint32(i), output);
1418
0
  }
1419
1420
  // repeated sint64 repeated_sint64 = 36;
1421
0
  for (int i = 0, n = this->repeated_sint64_size(); i < n; i++) {
1422
0
    ::google::protobuf::internal::WireFormatLite::WriteSInt64(
1423
0
      36, this->repeated_sint64(i), output);
1424
0
  }
1425
1426
  // repeated fixed32 repeated_fixed32 = 37;
1427
0
  for (int i = 0, n = this->repeated_fixed32_size(); i < n; i++) {
1428
0
    ::google::protobuf::internal::WireFormatLite::WriteFixed32(
1429
0
      37, this->repeated_fixed32(i), output);
1430
0
  }
1431
1432
  // repeated fixed64 repeated_fixed64 = 38;
1433
0
  for (int i = 0, n = this->repeated_fixed64_size(); i < n; i++) {
1434
0
    ::google::protobuf::internal::WireFormatLite::WriteFixed64(
1435
0
      38, this->repeated_fixed64(i), output);
1436
0
  }
1437
1438
  // repeated sfixed32 repeated_sfixed32 = 39;
1439
0
  for (int i = 0, n = this->repeated_sfixed32_size(); i < n; i++) {
1440
0
    ::google::protobuf::internal::WireFormatLite::WriteSFixed32(
1441
0
      39, this->repeated_sfixed32(i), output);
1442
0
  }
1443
1444
  // repeated sfixed64 repeated_sfixed64 = 40;
1445
0
  for (int i = 0, n = this->repeated_sfixed64_size(); i < n; i++) {
1446
0
    ::google::protobuf::internal::WireFormatLite::WriteSFixed64(
1447
0
      40, this->repeated_sfixed64(i), output);
1448
0
  }
1449
1450
  // repeated float repeated_float = 41;
1451
0
  for (int i = 0, n = this->repeated_float_size(); i < n; i++) {
1452
0
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
1453
0
      41, this->repeated_float(i), output);
1454
0
  }
1455
1456
  // repeated double repeated_double = 42;
1457
0
  for (int i = 0, n = this->repeated_double_size(); i < n; i++) {
1458
0
    ::google::protobuf::internal::WireFormatLite::WriteDouble(
1459
0
      42, this->repeated_double(i), output);
1460
0
  }
1461
1462
  // repeated bool repeated_bool = 43;
1463
0
  for (int i = 0, n = this->repeated_bool_size(); i < n; i++) {
1464
0
    ::google::protobuf::internal::WireFormatLite::WriteBool(
1465
0
      43, this->repeated_bool(i), output);
1466
0
  }
1467
1468
  // repeated string repeated_string = 44;
1469
0
  for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
1470
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1471
0
      this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
1472
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1473
0
      "jsonwriter_test.TestAllTypes.repeated_string");
1474
0
    ::google::protobuf::internal::WireFormatLite::WriteString(
1475
0
      44, this->repeated_string(i), output);
1476
0
  }
1477
1478
  // repeated bytes repeated_bytes = 45;
1479
0
  for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
1480
0
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
1481
0
      45, this->repeated_bytes(i), output);
1482
0
  }
1483
1484
  // repeated .jsonwriter_test.TestAllTypes.NestedMessage repeated_nested_message = 48;
1485
0
  for (unsigned int i = 0,
1486
0
      n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
1487
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1488
0
      48, this->repeated_nested_message(static_cast<int>(i)), output);
1489
0
  }
1490
1491
  // repeated .jsonwriter_test.TestAllTypes.NestedEnum repeated_nested_enum = 51;
1492
0
  for (int i = 0, n = this->repeated_nested_enum_size(); i < n; i++) {
1493
0
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
1494
0
      51, this->repeated_nested_enum(i), output);
1495
0
  }
1496
1497
0
  if (_internal_metadata_.have_unknown_fields()) {
1498
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1499
0
        _internal_metadata_.unknown_fields(), output);
1500
0
  }
1501
  // @@protoc_insertion_point(serialize_end:jsonwriter_test.TestAllTypes)
1502
0
}
1503
1504
::google::protobuf::uint8* TestAllTypes::InternalSerializeWithCachedSizesToArray(
1505
0
    bool deterministic, ::google::protobuf::uint8* target) const {
1506
0
  (void)deterministic; // Unused
1507
  // @@protoc_insertion_point(serialize_to_array_start:jsonwriter_test.TestAllTypes)
1508
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1509
0
  (void) cached_has_bits;
1510
1511
0
  cached_has_bits = _has_bits_[0];
1512
  // optional int32 optional_int32 = 1;
1513
0
  if (cached_has_bits & 0x00000010u) {
1514
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->optional_int32(), target);
1515
0
  }
1516
1517
  // optional int64 optional_int64 = 2;
1518
0
  if (cached_has_bits & 0x00000008u) {
1519
0
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->optional_int64(), target);
1520
0
  }
1521
1522
  // optional uint32 optional_uint32 = 3;
1523
0
  if (cached_has_bits & 0x00000020u) {
1524
0
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->optional_uint32(), target);
1525
0
  }
1526
1527
  // optional uint64 optional_uint64 = 4;
1528
0
  if (cached_has_bits & 0x00000040u) {
1529
0
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->optional_uint64(), target);
1530
0
  }
1531
1532
  // optional sint32 optional_sint32 = 5;
1533
0
  if (cached_has_bits & 0x00000100u) {
1534
0
    target = ::google::protobuf::internal::WireFormatLite::WriteSInt32ToArray(5, this->optional_sint32(), target);
1535
0
  }
1536
1537
  // optional sint64 optional_sint64 = 6;
1538
0
  if (cached_has_bits & 0x00000080u) {
1539
0
    target = ::google::protobuf::internal::WireFormatLite::WriteSInt64ToArray(6, this->optional_sint64(), target);
1540
0
  }
1541
1542
  // optional fixed32 optional_fixed32 = 7;
1543
0
  if (cached_has_bits & 0x00000200u) {
1544
0
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed32ToArray(7, this->optional_fixed32(), target);
1545
0
  }
1546
1547
  // optional fixed64 optional_fixed64 = 8;
1548
0
  if (cached_has_bits & 0x00000400u) {
1549
0
    target = ::google::protobuf::internal::WireFormatLite::WriteFixed64ToArray(8, this->optional_fixed64(), target);
1550
0
  }
1551
1552
  // optional sfixed32 optional_sfixed32 = 9;
1553
0
  if (cached_has_bits & 0x00001000u) {
1554
0
    target = ::google::protobuf::internal::WireFormatLite::WriteSFixed32ToArray(9, this->optional_sfixed32(), target);
1555
0
  }
1556
1557
  // optional sfixed64 optional_sfixed64 = 10;
1558
0
  if (cached_has_bits & 0x00000800u) {
1559
0
    target = ::google::protobuf::internal::WireFormatLite::WriteSFixed64ToArray(10, this->optional_sfixed64(), target);
1560
0
  }
1561
1562
  // optional float optional_float = 11;
1563
0
  if (cached_has_bits & 0x00002000u) {
1564
0
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->optional_float(), target);
1565
0
  }
1566
1567
  // optional double optional_double = 12;
1568
0
  if (cached_has_bits & 0x00004000u) {
1569
0
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(12, this->optional_double(), target);
1570
0
  }
1571
1572
  // optional bool optional_bool = 13;
1573
0
  if (cached_has_bits & 0x00008000u) {
1574
0
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->optional_bool(), target);
1575
0
  }
1576
1577
  // optional string optional_string = 14;
1578
0
  if (cached_has_bits & 0x00000001u) {
1579
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1580
0
      this->optional_string().data(), static_cast<int>(this->optional_string().length()),
1581
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1582
0
      "jsonwriter_test.TestAllTypes.optional_string");
1583
0
    target =
1584
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1585
0
        14, this->optional_string(), target);
1586
0
  }
1587
1588
  // optional bytes optional_bytes = 15;
1589
0
  if (cached_has_bits & 0x00000002u) {
1590
0
    target =
1591
0
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1592
0
        15, this->optional_bytes(), target);
1593
0
  }
1594
1595
  // optional .jsonwriter_test.TestAllTypes.NestedMessage optional_nested_message = 18;
1596
0
  if (cached_has_bits & 0x00000004u) {
1597
0
    target = ::google::protobuf::internal::WireFormatLite::
1598
0
      InternalWriteMessageToArray(
1599
0
        18, *this->optional_nested_message_, deterministic, target);
1600
0
  }
1601
1602
  // optional .jsonwriter_test.TestAllTypes.NestedEnum optional_nested_enum = 21;
1603
0
  if (cached_has_bits & 0x00010000u) {
1604
0
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1605
0
      21, this->optional_nested_enum(), target);
1606
0
  }
1607
1608
  // repeated int32 repeated_int32 = 31;
1609
0
  target = ::google::protobuf::internal::WireFormatLite::
1610
0
    WriteInt32ToArray(31, this->repeated_int32_, target);
1611
1612
  // repeated int64 repeated_int64 = 32;
1613
0
  target = ::google::protobuf::internal::WireFormatLite::
1614
0
    WriteInt64ToArray(32, this->repeated_int64_, target);
1615
1616
  // repeated uint32 repeated_uint32 = 33;
1617
0
  target = ::google::protobuf::internal::WireFormatLite::
1618
0
    WriteUInt32ToArray(33, this->repeated_uint32_, target);
1619
1620
  // repeated uint64 repeated_uint64 = 34;
1621
0
  target = ::google::protobuf::internal::WireFormatLite::
1622
0
    WriteUInt64ToArray(34, this->repeated_uint64_, target);
1623
1624
  // repeated sint32 repeated_sint32 = 35;
1625
0
  target = ::google::protobuf::internal::WireFormatLite::
1626
0
    WriteSInt32ToArray(35, this->repeated_sint32_, target);
1627
1628
  // repeated sint64 repeated_sint64 = 36;
1629
0
  target = ::google::protobuf::internal::WireFormatLite::
1630
0
    WriteSInt64ToArray(36, this->repeated_sint64_, target);
1631
1632
  // repeated fixed32 repeated_fixed32 = 37;
1633
0
  target = ::google::protobuf::internal::WireFormatLite::
1634
0
    WriteFixed32ToArray(37, this->repeated_fixed32_, target);
1635
1636
  // repeated fixed64 repeated_fixed64 = 38;
1637
0
  target = ::google::protobuf::internal::WireFormatLite::
1638
0
    WriteFixed64ToArray(38, this->repeated_fixed64_, target);
1639
1640
  // repeated sfixed32 repeated_sfixed32 = 39;
1641
0
  target = ::google::protobuf::internal::WireFormatLite::
1642
0
    WriteSFixed32ToArray(39, this->repeated_sfixed32_, target);
1643
1644
  // repeated sfixed64 repeated_sfixed64 = 40;
1645
0
  target = ::google::protobuf::internal::WireFormatLite::
1646
0
    WriteSFixed64ToArray(40, this->repeated_sfixed64_, target);
1647
1648
  // repeated float repeated_float = 41;
1649
0
  target = ::google::protobuf::internal::WireFormatLite::
1650
0
    WriteFloatToArray(41, this->repeated_float_, target);
1651
1652
  // repeated double repeated_double = 42;
1653
0
  target = ::google::protobuf::internal::WireFormatLite::
1654
0
    WriteDoubleToArray(42, this->repeated_double_, target);
1655
1656
  // repeated bool repeated_bool = 43;
1657
0
  target = ::google::protobuf::internal::WireFormatLite::
1658
0
    WriteBoolToArray(43, this->repeated_bool_, target);
1659
1660
  // repeated string repeated_string = 44;
1661
0
  for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
1662
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1663
0
      this->repeated_string(i).data(), static_cast<int>(this->repeated_string(i).length()),
1664
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
1665
0
      "jsonwriter_test.TestAllTypes.repeated_string");
1666
0
    target = ::google::protobuf::internal::WireFormatLite::
1667
0
      WriteStringToArray(44, this->repeated_string(i), target);
1668
0
  }
1669
1670
  // repeated bytes repeated_bytes = 45;
1671
0
  for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
1672
0
    target = ::google::protobuf::internal::WireFormatLite::
1673
0
      WriteBytesToArray(45, this->repeated_bytes(i), target);
1674
0
  }
1675
1676
  // repeated .jsonwriter_test.TestAllTypes.NestedMessage repeated_nested_message = 48;
1677
0
  for (unsigned int i = 0,
1678
0
      n = static_cast<unsigned int>(this->repeated_nested_message_size()); i < n; i++) {
1679
0
    target = ::google::protobuf::internal::WireFormatLite::
1680
0
      InternalWriteMessageToArray(
1681
0
        48, this->repeated_nested_message(static_cast<int>(i)), deterministic, target);
1682
0
  }
1683
1684
  // repeated .jsonwriter_test.TestAllTypes.NestedEnum repeated_nested_enum = 51;
1685
0
  target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1686
0
    51, this->repeated_nested_enum_, target);
1687
1688
0
  if (_internal_metadata_.have_unknown_fields()) {
1689
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1690
0
        _internal_metadata_.unknown_fields(), target);
1691
0
  }
1692
  // @@protoc_insertion_point(serialize_to_array_end:jsonwriter_test.TestAllTypes)
1693
0
  return target;
1694
0
}
1695
1696
0
size_t TestAllTypes::ByteSizeLong() const {
1697
// @@protoc_insertion_point(message_byte_size_start:jsonwriter_test.TestAllTypes)
1698
0
  size_t total_size = 0;
1699
1700
0
  if (_internal_metadata_.have_unknown_fields()) {
1701
0
    total_size +=
1702
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1703
0
        _internal_metadata_.unknown_fields());
1704
0
  }
1705
  // repeated int32 repeated_int32 = 31;
1706
0
  {
1707
0
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
1708
0
      Int32Size(this->repeated_int32_);
1709
0
    total_size += 2 *
1710
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_int32_size());
1711
0
    total_size += data_size;
1712
0
  }
1713
1714
  // repeated int64 repeated_int64 = 32;
1715
0
  {
1716
0
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
1717
0
      Int64Size(this->repeated_int64_);
1718
0
    total_size += 2 *
1719
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_int64_size());
1720
0
    total_size += data_size;
1721
0
  }
1722
1723
  // repeated uint32 repeated_uint32 = 33;
1724
0
  {
1725
0
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
1726
0
      UInt32Size(this->repeated_uint32_);
1727
0
    total_size += 2 *
1728
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_uint32_size());
1729
0
    total_size += data_size;
1730
0
  }
1731
1732
  // repeated uint64 repeated_uint64 = 34;
1733
0
  {
1734
0
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
1735
0
      UInt64Size(this->repeated_uint64_);
1736
0
    total_size += 2 *
1737
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_uint64_size());
1738
0
    total_size += data_size;
1739
0
  }
1740
1741
  // repeated sint32 repeated_sint32 = 35;
1742
0
  {
1743
0
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
1744
0
      SInt32Size(this->repeated_sint32_);
1745
0
    total_size += 2 *
1746
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_sint32_size());
1747
0
    total_size += data_size;
1748
0
  }
1749
1750
  // repeated sint64 repeated_sint64 = 36;
1751
0
  {
1752
0
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
1753
0
      SInt64Size(this->repeated_sint64_);
1754
0
    total_size += 2 *
1755
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_sint64_size());
1756
0
    total_size += data_size;
1757
0
  }
1758
1759
  // repeated fixed32 repeated_fixed32 = 37;
1760
0
  {
1761
0
    unsigned int count = static_cast<unsigned int>(this->repeated_fixed32_size());
1762
0
    size_t data_size = 4UL * count;
1763
0
    total_size += 2 *
1764
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_fixed32_size());
1765
0
    total_size += data_size;
1766
0
  }
1767
1768
  // repeated fixed64 repeated_fixed64 = 38;
1769
0
  {
1770
0
    unsigned int count = static_cast<unsigned int>(this->repeated_fixed64_size());
1771
0
    size_t data_size = 8UL * count;
1772
0
    total_size += 2 *
1773
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_fixed64_size());
1774
0
    total_size += data_size;
1775
0
  }
1776
1777
  // repeated sfixed32 repeated_sfixed32 = 39;
1778
0
  {
1779
0
    unsigned int count = static_cast<unsigned int>(this->repeated_sfixed32_size());
1780
0
    size_t data_size = 4UL * count;
1781
0
    total_size += 2 *
1782
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_sfixed32_size());
1783
0
    total_size += data_size;
1784
0
  }
1785
1786
  // repeated sfixed64 repeated_sfixed64 = 40;
1787
0
  {
1788
0
    unsigned int count = static_cast<unsigned int>(this->repeated_sfixed64_size());
1789
0
    size_t data_size = 8UL * count;
1790
0
    total_size += 2 *
1791
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_sfixed64_size());
1792
0
    total_size += data_size;
1793
0
  }
1794
1795
  // repeated float repeated_float = 41;
1796
0
  {
1797
0
    unsigned int count = static_cast<unsigned int>(this->repeated_float_size());
1798
0
    size_t data_size = 4UL * count;
1799
0
    total_size += 2 *
1800
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_float_size());
1801
0
    total_size += data_size;
1802
0
  }
1803
1804
  // repeated double repeated_double = 42;
1805
0
  {
1806
0
    unsigned int count = static_cast<unsigned int>(this->repeated_double_size());
1807
0
    size_t data_size = 8UL * count;
1808
0
    total_size += 2 *
1809
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_double_size());
1810
0
    total_size += data_size;
1811
0
  }
1812
1813
  // repeated bool repeated_bool = 43;
1814
0
  {
1815
0
    unsigned int count = static_cast<unsigned int>(this->repeated_bool_size());
1816
0
    size_t data_size = 1UL * count;
1817
0
    total_size += 2 *
1818
0
                  ::google::protobuf::internal::FromIntSize(this->repeated_bool_size());
1819
0
    total_size += data_size;
1820
0
  }
1821
1822
  // repeated string repeated_string = 44;
1823
0
  total_size += 2 *
1824
0
      ::google::protobuf::internal::FromIntSize(this->repeated_string_size());
1825
0
  for (int i = 0, n = this->repeated_string_size(); i < n; i++) {
1826
0
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
1827
0
      this->repeated_string(i));
1828
0
  }
1829
1830
  // repeated bytes repeated_bytes = 45;
1831
0
  total_size += 2 *
1832
0
      ::google::protobuf::internal::FromIntSize(this->repeated_bytes_size());
1833
0
  for (int i = 0, n = this->repeated_bytes_size(); i < n; i++) {
1834
0
    total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
1835
0
      this->repeated_bytes(i));
1836
0
  }
1837
1838
  // repeated .jsonwriter_test.TestAllTypes.NestedMessage repeated_nested_message = 48;
1839
0
  {
1840
0
    unsigned int count = static_cast<unsigned int>(this->repeated_nested_message_size());
1841
0
    total_size += 2UL * count;
1842
0
    for (unsigned int i = 0; i < count; i++) {
1843
0
      total_size +=
1844
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
1845
0
          this->repeated_nested_message(static_cast<int>(i)));
1846
0
    }
1847
0
  }
1848
1849
  // repeated .jsonwriter_test.TestAllTypes.NestedEnum repeated_nested_enum = 51;
1850
0
  {
1851
0
    size_t data_size = 0;
1852
0
    unsigned int count = static_cast<unsigned int>(this->repeated_nested_enum_size());for (unsigned int i = 0; i < count; i++) {
1853
0
      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
1854
0
        this->repeated_nested_enum(static_cast<int>(i)));
1855
0
    }
1856
0
    total_size += (2UL * count) + data_size;
1857
0
  }
1858
1859
0
  if (_has_bits_[0 / 32] & 255u) {
1860
    // optional string optional_string = 14;
1861
0
    if (has_optional_string()) {
1862
0
      total_size += 1 +
1863
0
        ::google::protobuf::internal::WireFormatLite::StringSize(
1864
0
          this->optional_string());
1865
0
    }
1866
1867
    // optional bytes optional_bytes = 15;
1868
0
    if (has_optional_bytes()) {
1869
0
      total_size += 1 +
1870
0
        ::google::protobuf::internal::WireFormatLite::BytesSize(
1871
0
          this->optional_bytes());
1872
0
    }
1873
1874
    // optional .jsonwriter_test.TestAllTypes.NestedMessage optional_nested_message = 18;
1875
0
    if (has_optional_nested_message()) {
1876
0
      total_size += 2 +
1877
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
1878
0
          *this->optional_nested_message_);
1879
0
    }
1880
1881
    // optional int64 optional_int64 = 2;
1882
0
    if (has_optional_int64()) {
1883
0
      total_size += 1 +
1884
0
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1885
0
          this->optional_int64());
1886
0
    }
1887
1888
    // optional int32 optional_int32 = 1;
1889
0
    if (has_optional_int32()) {
1890
0
      total_size += 1 +
1891
0
        ::google::protobuf::internal::WireFormatLite::Int32Size(
1892
0
          this->optional_int32());
1893
0
    }
1894
1895
    // optional uint32 optional_uint32 = 3;
1896
0
    if (has_optional_uint32()) {
1897
0
      total_size += 1 +
1898
0
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
1899
0
          this->optional_uint32());
1900
0
    }
1901
1902
    // optional uint64 optional_uint64 = 4;
1903
0
    if (has_optional_uint64()) {
1904
0
      total_size += 1 +
1905
0
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
1906
0
          this->optional_uint64());
1907
0
    }
1908
1909
    // optional sint64 optional_sint64 = 6;
1910
0
    if (has_optional_sint64()) {
1911
0
      total_size += 1 +
1912
0
        ::google::protobuf::internal::WireFormatLite::SInt64Size(
1913
0
          this->optional_sint64());
1914
0
    }
1915
1916
0
  }
1917
0
  if (_has_bits_[8 / 32] & 65280u) {
1918
    // optional sint32 optional_sint32 = 5;
1919
0
    if (has_optional_sint32()) {
1920
0
      total_size += 1 +
1921
0
        ::google::protobuf::internal::WireFormatLite::SInt32Size(
1922
0
          this->optional_sint32());
1923
0
    }
1924
1925
    // optional fixed32 optional_fixed32 = 7;
1926
0
    if (has_optional_fixed32()) {
1927
0
      total_size += 1 + 4;
1928
0
    }
1929
1930
    // optional fixed64 optional_fixed64 = 8;
1931
0
    if (has_optional_fixed64()) {
1932
0
      total_size += 1 + 8;
1933
0
    }
1934
1935
    // optional sfixed64 optional_sfixed64 = 10;
1936
0
    if (has_optional_sfixed64()) {
1937
0
      total_size += 1 + 8;
1938
0
    }
1939
1940
    // optional sfixed32 optional_sfixed32 = 9;
1941
0
    if (has_optional_sfixed32()) {
1942
0
      total_size += 1 + 4;
1943
0
    }
1944
1945
    // optional float optional_float = 11;
1946
0
    if (has_optional_float()) {
1947
0
      total_size += 1 + 4;
1948
0
    }
1949
1950
    // optional double optional_double = 12;
1951
0
    if (has_optional_double()) {
1952
0
      total_size += 1 + 8;
1953
0
    }
1954
1955
    // optional bool optional_bool = 13;
1956
0
    if (has_optional_bool()) {
1957
0
      total_size += 1 + 1;
1958
0
    }
1959
1960
0
  }
1961
  // optional .jsonwriter_test.TestAllTypes.NestedEnum optional_nested_enum = 21;
1962
0
  if (has_optional_nested_enum()) {
1963
0
    total_size += 2 +
1964
0
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->optional_nested_enum());
1965
0
  }
1966
1967
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1968
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1969
0
  _cached_size_ = cached_size;
1970
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1971
0
  return total_size;
1972
0
}
1973
1974
0
void TestAllTypes::MergeFrom(const ::google::protobuf::Message& from) {
1975
// @@protoc_insertion_point(generalized_merge_from_start:jsonwriter_test.TestAllTypes)
1976
0
  GOOGLE_DCHECK_NE(&from, this);
1977
0
  const TestAllTypes* source =
1978
0
      ::google::protobuf::internal::DynamicCastToGenerated<const TestAllTypes>(
1979
0
          &from);
1980
0
  if (source == NULL) {
1981
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:jsonwriter_test.TestAllTypes)
1982
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1983
0
  } else {
1984
  // @@protoc_insertion_point(generalized_merge_from_cast_success:jsonwriter_test.TestAllTypes)
1985
0
    MergeFrom(*source);
1986
0
  }
1987
0
}
1988
1989
0
void TestAllTypes::MergeFrom(const TestAllTypes& from) {
1990
// @@protoc_insertion_point(class_specific_merge_from_start:jsonwriter_test.TestAllTypes)
1991
0
  GOOGLE_DCHECK_NE(&from, this);
1992
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1993
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1994
0
  (void) cached_has_bits;
1995
1996
0
  repeated_int32_.MergeFrom(from.repeated_int32_);
1997
0
  repeated_int64_.MergeFrom(from.repeated_int64_);
1998
0
  repeated_uint32_.MergeFrom(from.repeated_uint32_);
1999
0
  repeated_uint64_.MergeFrom(from.repeated_uint64_);
2000
0
  repeated_sint32_.MergeFrom(from.repeated_sint32_);
2001
0
  repeated_sint64_.MergeFrom(from.repeated_sint64_);
2002
0
  repeated_fixed32_.MergeFrom(from.repeated_fixed32_);
2003
0
  repeated_fixed64_.MergeFrom(from.repeated_fixed64_);
2004
0
  repeated_sfixed32_.MergeFrom(from.repeated_sfixed32_);
2005
0
  repeated_sfixed64_.MergeFrom(from.repeated_sfixed64_);
2006
0
  repeated_float_.MergeFrom(from.repeated_float_);
2007
0
  repeated_double_.MergeFrom(from.repeated_double_);
2008
0
  repeated_bool_.MergeFrom(from.repeated_bool_);
2009
0
  repeated_string_.MergeFrom(from.repeated_string_);
2010
0
  repeated_bytes_.MergeFrom(from.repeated_bytes_);
2011
0
  repeated_nested_message_.MergeFrom(from.repeated_nested_message_);
2012
0
  repeated_nested_enum_.MergeFrom(from.repeated_nested_enum_);
2013
0
  cached_has_bits = from._has_bits_[0];
2014
0
  if (cached_has_bits & 255u) {
2015
0
    if (cached_has_bits & 0x00000001u) {
2016
0
      set_has_optional_string();
2017
0
      optional_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_string_);
2018
0
    }
2019
0
    if (cached_has_bits & 0x00000002u) {
2020
0
      set_has_optional_bytes();
2021
0
      optional_bytes_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.optional_bytes_);
2022
0
    }
2023
0
    if (cached_has_bits & 0x00000004u) {
2024
0
      mutable_optional_nested_message()->::jsonwriter_test::TestAllTypes_NestedMessage::MergeFrom(from.optional_nested_message());
2025
0
    }
2026
0
    if (cached_has_bits & 0x00000008u) {
2027
0
      optional_int64_ = from.optional_int64_;
2028
0
    }
2029
0
    if (cached_has_bits & 0x00000010u) {
2030
0
      optional_int32_ = from.optional_int32_;
2031
0
    }
2032
0
    if (cached_has_bits & 0x00000020u) {
2033
0
      optional_uint32_ = from.optional_uint32_;
2034
0
    }
2035
0
    if (cached_has_bits & 0x00000040u) {
2036
0
      optional_uint64_ = from.optional_uint64_;
2037
0
    }
2038
0
    if (cached_has_bits & 0x00000080u) {
2039
0
      optional_sint64_ = from.optional_sint64_;
2040
0
    }
2041
0
    _has_bits_[0] |= cached_has_bits;
2042
0
  }
2043
0
  if (cached_has_bits & 65280u) {
2044
0
    if (cached_has_bits & 0x00000100u) {
2045
0
      optional_sint32_ = from.optional_sint32_;
2046
0
    }
2047
0
    if (cached_has_bits & 0x00000200u) {
2048
0
      optional_fixed32_ = from.optional_fixed32_;
2049
0
    }
2050
0
    if (cached_has_bits & 0x00000400u) {
2051
0
      optional_fixed64_ = from.optional_fixed64_;
2052
0
    }
2053
0
    if (cached_has_bits & 0x00000800u) {
2054
0
      optional_sfixed64_ = from.optional_sfixed64_;
2055
0
    }
2056
0
    if (cached_has_bits & 0x00001000u) {
2057
0
      optional_sfixed32_ = from.optional_sfixed32_;
2058
0
    }
2059
0
    if (cached_has_bits & 0x00002000u) {
2060
0
      optional_float_ = from.optional_float_;
2061
0
    }
2062
0
    if (cached_has_bits & 0x00004000u) {
2063
0
      optional_double_ = from.optional_double_;
2064
0
    }
2065
0
    if (cached_has_bits & 0x00008000u) {
2066
0
      optional_bool_ = from.optional_bool_;
2067
0
    }
2068
0
    _has_bits_[0] |= cached_has_bits;
2069
0
  }
2070
0
  if (cached_has_bits & 0x00010000u) {
2071
0
    set_optional_nested_enum(from.optional_nested_enum());
2072
0
  }
2073
0
}
2074
2075
0
void TestAllTypes::CopyFrom(const ::google::protobuf::Message& from) {
2076
// @@protoc_insertion_point(generalized_copy_from_start:jsonwriter_test.TestAllTypes)
2077
0
  if (&from == this) return;
2078
0
  Clear();
2079
0
  MergeFrom(from);
2080
0
}
2081
2082
0
void TestAllTypes::CopyFrom(const TestAllTypes& from) {
2083
// @@protoc_insertion_point(class_specific_copy_from_start:jsonwriter_test.TestAllTypes)
2084
0
  if (&from == this) return;
2085
0
  Clear();
2086
0
  MergeFrom(from);
2087
0
}
2088
2089
0
bool TestAllTypes::IsInitialized() const {
2090
0
  return true;
2091
0
}
2092
2093
0
void TestAllTypes::Swap(TestAllTypes* other) {
2094
0
  if (other == this) return;
2095
0
  InternalSwap(other);
2096
0
}
2097
0
void TestAllTypes::InternalSwap(TestAllTypes* other) {
2098
0
  using std::swap;
2099
0
  repeated_int32_.InternalSwap(&other->repeated_int32_);
2100
0
  repeated_int64_.InternalSwap(&other->repeated_int64_);
2101
0
  repeated_uint32_.InternalSwap(&other->repeated_uint32_);
2102
0
  repeated_uint64_.InternalSwap(&other->repeated_uint64_);
2103
0
  repeated_sint32_.InternalSwap(&other->repeated_sint32_);
2104
0
  repeated_sint64_.InternalSwap(&other->repeated_sint64_);
2105
0
  repeated_fixed32_.InternalSwap(&other->repeated_fixed32_);
2106
0
  repeated_fixed64_.InternalSwap(&other->repeated_fixed64_);
2107
0
  repeated_sfixed32_.InternalSwap(&other->repeated_sfixed32_);
2108
0
  repeated_sfixed64_.InternalSwap(&other->repeated_sfixed64_);
2109
0
  repeated_float_.InternalSwap(&other->repeated_float_);
2110
0
  repeated_double_.InternalSwap(&other->repeated_double_);
2111
0
  repeated_bool_.InternalSwap(&other->repeated_bool_);
2112
0
  repeated_string_.InternalSwap(&other->repeated_string_);
2113
0
  repeated_bytes_.InternalSwap(&other->repeated_bytes_);
2114
0
  repeated_nested_message_.InternalSwap(&other->repeated_nested_message_);
2115
0
  repeated_nested_enum_.InternalSwap(&other->repeated_nested_enum_);
2116
0
  optional_string_.Swap(&other->optional_string_);
2117
0
  optional_bytes_.Swap(&other->optional_bytes_);
2118
0
  swap(optional_nested_message_, other->optional_nested_message_);
2119
0
  swap(optional_int64_, other->optional_int64_);
2120
0
  swap(optional_int32_, other->optional_int32_);
2121
0
  swap(optional_uint32_, other->optional_uint32_);
2122
0
  swap(optional_uint64_, other->optional_uint64_);
2123
0
  swap(optional_sint64_, other->optional_sint64_);
2124
0
  swap(optional_sint32_, other->optional_sint32_);
2125
0
  swap(optional_fixed32_, other->optional_fixed32_);
2126
0
  swap(optional_fixed64_, other->optional_fixed64_);
2127
0
  swap(optional_sfixed64_, other->optional_sfixed64_);
2128
0
  swap(optional_sfixed32_, other->optional_sfixed32_);
2129
0
  swap(optional_float_, other->optional_float_);
2130
0
  swap(optional_double_, other->optional_double_);
2131
0
  swap(optional_bool_, other->optional_bool_);
2132
0
  swap(optional_nested_enum_, other->optional_nested_enum_);
2133
0
  swap(_has_bits_[0], other->_has_bits_[0]);
2134
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
2135
0
  swap(_cached_size_, other->_cached_size_);
2136
0
}
2137
2138
49
::google::protobuf::Metadata TestAllTypes::GetMetadata() const {
2139
49
  protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::protobuf_AssignDescriptorsOnce();
2140
49
  return ::protobuf_yb_2futil_2fjsonwriter_5ftest_2eproto::file_level_metadata[kIndexInFileMessages];
2141
49
}
2142
2143
2144
// @@protoc_insertion_point(namespace_scope)
2145
}  // namespace jsonwriter_test
2146
2147
// @@protoc_insertion_point(global_scope)