YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/rpc/any.pb.cc
Line
Count
Source (jump to first uncovered line)
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: yb/rpc/any.proto
3
4
#include "yb/rpc/any.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 yb {
24
namespace rpc {
25
class AnyDefaultTypeInternal {
26
 public:
27
  ::google::protobuf::internal::ExplicitlyConstructed<Any>
28
      _instance;
29
} _Any_default_instance_;
30
}  // namespace rpc
31
}  // namespace yb
32
namespace protobuf_yb_2frpc_2fany_2eproto {
33
123
void InitDefaultsAnyImpl() {
34
123
  GOOGLE_PROTOBUF_VERIFY_VERSION;
35
36
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
37
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
38
#else
39
123
  ::google::protobuf::internal::InitProtobufDefaults();
40
123
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
41
123
  {
42
123
    void* ptr = &::yb::rpc::_Any_default_instance_;
43
123
    new (ptr) ::yb::rpc::Any();
44
123
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
45
123
  }
46
123
  ::yb::rpc::Any::InitAsDefaultInstance();
47
123
}
48
49
123
void InitDefaultsAny() {
50
123
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
51
123
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsAnyImpl);
52
123
}
53
54
::google::protobuf::Metadata file_level_metadata[1];
55
56
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
57
  ~0u,  // no _has_bits_
58
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::rpc::Any, _internal_metadata_),
59
  ~0u,  // no _extensions_
60
  ~0u,  // no _oneof_case_
61
  ~0u,  // no _weak_field_map_
62
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::rpc::Any, type_url_),
63
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::rpc::Any, value_),
64
};
65
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
66
  { 0, -1, sizeof(::yb::rpc::Any)},
67
};
68
69
static ::google::protobuf::Message const * const file_default_instances[] = {
70
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::rpc::_Any_default_instance_),
71
};
72
73
0
void protobuf_AssignDescriptors() {
74
0
  AddDescriptors();
75
0
  ::google::protobuf::MessageFactory* factory = NULL;
76
0
  AssignDescriptors(
77
0
      "yb/rpc/any.proto", schemas, file_default_instances, TableStruct::offsets, factory,
78
0
      file_level_metadata, NULL, NULL);
79
0
}
80
81
0
void protobuf_AssignDescriptorsOnce() {
82
0
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
83
0
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
84
0
}
85
86
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
87
0
void protobuf_RegisterTypes(const ::std::string&) {
88
0
  protobuf_AssignDescriptorsOnce();
89
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
90
0
}
91
92
123
void AddDescriptorsImpl() {
93
123
  InitDefaults();
94
123
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
95
123
      "\n\020yb/rpc/any.proto\022\006yb.rpc\"&\n\003Any\022\020\n\010typ"
96
123
      "e_url\030\001 \001(\t\022\r\n\005value\030\002 \001(\014b\006proto3"
97
123
  };
98
123
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
99
123
      descriptor, 74);
100
123
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
101
123
    "yb/rpc/any.proto", &protobuf_RegisterTypes);
102
123
}
103
104
123
void AddDescriptors() {
105
123
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
106
123
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
107
123
}
108
// Force AddDescriptors() to be called at dynamic initialization time.
109
struct StaticDescriptorInitializer {
110
123
  StaticDescriptorInitializer() {
111
123
    AddDescriptors();
112
123
  }
113
} static_descriptor_initializer;
114
}  // namespace protobuf_yb_2frpc_2fany_2eproto
115
namespace yb {
116
namespace rpc {
117
118
// ===================================================================
119
120
123
void Any::InitAsDefaultInstance() {
121
123
}
122
#if !defined(_MSC_VER) || _MSC_VER >= 1900
123
const int Any::kTypeUrlFieldNumber;
124
const int Any::kValueFieldNumber;
125
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
126
127
Any::Any()
128
123
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
129
123
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
130
0
    ::protobuf_yb_2frpc_2fany_2eproto::InitDefaultsAny();
131
0
  }
132
123
  SharedCtor();
133
  // @@protoc_insertion_point(constructor:yb.rpc.Any)
134
123
}
135
Any::Any(const Any& from)
136
  : ::google::protobuf::Message(),
137
      _internal_metadata_(NULL),
138
0
      _cached_size_(0) {
139
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
140
0
  type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
141
0
  if (from.type_url().size() > 0) {
142
0
    type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
143
0
  }
144
0
  value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
145
0
  if (from.value().size() > 0) {
146
0
    value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
147
0
  }
148
  // @@protoc_insertion_point(copy_constructor:yb.rpc.Any)
149
0
}
150
151
123
void Any::SharedCtor() {
152
123
  type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
153
123
  value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
154
123
  _cached_size_ = 0;
155
123
}
156
157
0
Any::~Any() {
158
  // @@protoc_insertion_point(destructor:yb.rpc.Any)
159
0
  SharedDtor();
160
0
}
161
162
0
void Any::SharedDtor() {
163
0
  type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
164
0
  value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
165
0
}
166
167
0
void Any::SetCachedSize(int size) const {
168
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
169
0
  _cached_size_ = size;
170
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
171
0
}
172
0
const ::google::protobuf::Descriptor* Any::descriptor() {
173
0
  ::protobuf_yb_2frpc_2fany_2eproto::protobuf_AssignDescriptorsOnce();
174
0
  return ::protobuf_yb_2frpc_2fany_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
175
0
}
176
177
0
const Any& Any::default_instance() {
178
0
  ::protobuf_yb_2frpc_2fany_2eproto::InitDefaultsAny();
179
0
  return *internal_default_instance();
180
0
}
181
182
0
Any* Any::New(::google::protobuf::Arena* arena) const {
183
0
  Any* n = new Any;
184
0
  if (arena != NULL) {
185
0
    arena->Own(n);
186
0
  }
187
0
  return n;
188
0
}
189
190
0
void Any::Clear() {
191
// @@protoc_insertion_point(message_clear_start:yb.rpc.Any)
192
0
  ::google::protobuf::uint32 cached_has_bits = 0;
193
  // Prevent compiler warnings about cached_has_bits being unused
194
0
  (void) cached_has_bits;
195
196
0
  type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
197
0
  value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
198
0
  _internal_metadata_.Clear();
199
0
}
200
201
bool Any::MergePartialFromCodedStream(
202
0
    ::google::protobuf::io::CodedInputStream* input) {
203
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
204
0
  ::google::protobuf::uint32 tag;
205
  // @@protoc_insertion_point(parse_start:yb.rpc.Any)
206
0
  for (;;) {
207
0
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
208
0
    tag = p.first;
209
0
    if (!p.second) goto handle_unusual;
210
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
211
      // string type_url = 1;
212
0
      case 1: {
213
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
214
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
215
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
216
0
                input, this->mutable_type_url()));
217
0
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
218
0
            this->type_url().data(), static_cast<int>(this->type_url().length()),
219
0
            ::google::protobuf::internal::WireFormatLite::PARSE,
220
0
            "yb.rpc.Any.type_url"));
221
0
        } else {
222
0
          goto handle_unusual;
223
0
        }
224
0
        break;
225
0
      }
226
227
      // bytes value = 2;
228
0
      case 2: {
229
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
230
0
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
231
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
232
0
                input, this->mutable_value()));
233
0
        } else {
234
0
          goto handle_unusual;
235
0
        }
236
0
        break;
237
0
      }
238
239
0
      default: {
240
0
      handle_unusual:
241
0
        if (tag == 0) {
242
0
          goto success;
243
0
        }
244
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
245
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
246
0
        break;
247
0
      }
248
0
    }
249
0
  }
250
0
success:
251
  // @@protoc_insertion_point(parse_success:yb.rpc.Any)
252
0
  return true;
253
0
failure:
254
  // @@protoc_insertion_point(parse_failure:yb.rpc.Any)
255
0
  return false;
256
0
#undef DO_
257
0
}
258
259
void Any::SerializeWithCachedSizes(
260
0
    ::google::protobuf::io::CodedOutputStream* output) const {
261
  // @@protoc_insertion_point(serialize_start:yb.rpc.Any)
262
0
  ::google::protobuf::uint32 cached_has_bits = 0;
263
0
  (void) cached_has_bits;
264
265
  // string type_url = 1;
266
0
  if (this->type_url().size() > 0) {
267
0
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
268
0
      this->type_url().data(), static_cast<int>(this->type_url().length()),
269
0
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
270
0
      "yb.rpc.Any.type_url");
271
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
272
0
      1, this->type_url(), output);
273
0
  }
274
275
  // bytes value = 2;
276
0
  if (this->value().size() > 0) {
277
0
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
278
0
      2, this->value(), output);
279
0
  }
280
281
0
  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
282
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
283
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
284
0
  }
285
  // @@protoc_insertion_point(serialize_end:yb.rpc.Any)
286
0
}
287
288
::google::protobuf::uint8* Any::InternalSerializeWithCachedSizesToArray(
289
0
    bool deterministic, ::google::protobuf::uint8* target) const {
290
0
  (void)deterministic; // Unused
291
  // @@protoc_insertion_point(serialize_to_array_start:yb.rpc.Any)
292
0
  ::google::protobuf::uint32 cached_has_bits = 0;
293
0
  (void) cached_has_bits;
294
295
  // string type_url = 1;
296
0
  if (this->type_url().size() > 0) {
297
0
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
298
0
      this->type_url().data(), static_cast<int>(this->type_url().length()),
299
0
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
300
0
      "yb.rpc.Any.type_url");
301
0
    target =
302
0
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
303
0
        1, this->type_url(), target);
304
0
  }
305
306
  // bytes value = 2;
307
0
  if (this->value().size() > 0) {
308
0
    target =
309
0
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
310
0
        2, this->value(), target);
311
0
  }
312
313
0
  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
314
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
315
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
316
0
  }
317
  // @@protoc_insertion_point(serialize_to_array_end:yb.rpc.Any)
318
0
  return target;
319
0
}
320
321
0
size_t Any::ByteSizeLong() const {
322
// @@protoc_insertion_point(message_byte_size_start:yb.rpc.Any)
323
0
  size_t total_size = 0;
324
325
0
  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
326
0
    total_size +=
327
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
328
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
329
0
  }
330
  // string type_url = 1;
331
0
  if (this->type_url().size() > 0) {
332
0
    total_size += 1 +
333
0
      ::google::protobuf::internal::WireFormatLite::StringSize(
334
0
        this->type_url());
335
0
  }
336
337
  // bytes value = 2;
338
0
  if (this->value().size() > 0) {
339
0
    total_size += 1 +
340
0
      ::google::protobuf::internal::WireFormatLite::BytesSize(
341
0
        this->value());
342
0
  }
343
344
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
345
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
346
0
  _cached_size_ = cached_size;
347
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
348
0
  return total_size;
349
0
}
350
351
0
void Any::MergeFrom(const ::google::protobuf::Message& from) {
352
// @@protoc_insertion_point(generalized_merge_from_start:yb.rpc.Any)
353
0
  GOOGLE_DCHECK_NE(&from, this);
354
0
  const Any* source =
355
0
      ::google::protobuf::internal::DynamicCastToGenerated<const Any>(
356
0
          &from);
357
0
  if (source == NULL) {
358
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.rpc.Any)
359
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
360
0
  } else {
361
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.rpc.Any)
362
0
    MergeFrom(*source);
363
0
  }
364
0
}
365
366
0
void Any::MergeFrom(const Any& from) {
367
// @@protoc_insertion_point(class_specific_merge_from_start:yb.rpc.Any)
368
0
  GOOGLE_DCHECK_NE(&from, this);
369
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
370
0
  ::google::protobuf::uint32 cached_has_bits = 0;
371
0
  (void) cached_has_bits;
372
373
0
  if (from.type_url().size() > 0) {
374
375
0
    type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
376
0
  }
377
0
  if (from.value().size() > 0) {
378
379
0
    value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
380
0
  }
381
0
}
382
383
0
void Any::CopyFrom(const ::google::protobuf::Message& from) {
384
// @@protoc_insertion_point(generalized_copy_from_start:yb.rpc.Any)
385
0
  if (&from == this) return;
386
0
  Clear();
387
0
  MergeFrom(from);
388
0
}
389
390
0
void Any::CopyFrom(const Any& from) {
391
// @@protoc_insertion_point(class_specific_copy_from_start:yb.rpc.Any)
392
0
  if (&from == this) return;
393
0
  Clear();
394
0
  MergeFrom(from);
395
0
}
396
397
0
bool Any::IsInitialized() const {
398
0
  return true;
399
0
}
400
401
0
void Any::Swap(Any* other) {
402
0
  if (other == this) return;
403
0
  InternalSwap(other);
404
0
}
405
0
void Any::InternalSwap(Any* other) {
406
0
  using std::swap;
407
0
  type_url_.Swap(&other->type_url_);
408
0
  value_.Swap(&other->value_);
409
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
410
0
  swap(_cached_size_, other->_cached_size_);
411
0
}
412
413
0
::google::protobuf::Metadata Any::GetMetadata() const {
414
0
  protobuf_yb_2frpc_2fany_2eproto::protobuf_AssignDescriptorsOnce();
415
0
  return ::protobuf_yb_2frpc_2fany_2eproto::file_level_metadata[kIndexInFileMessages];
416
0
}
417
418
419
// @@protoc_insertion_point(namespace_scope)
420
}  // namespace rpc
421
}  // namespace yb
422
423
// @@protoc_insertion_point(global_scope)