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/encryption/encryption.pb.cc
Line
Count
Source (jump to first uncovered line)
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: yb/encryption/encryption.proto
3
4
#include "yb/encryption/encryption.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 encryption {
25
class EncryptionParamsPBDefaultTypeInternal {
26
 public:
27
  ::google::protobuf::internal::ExplicitlyConstructed<EncryptionParamsPB>
28
      _instance;
29
} _EncryptionParamsPB_default_instance_;
30
class UniverseKeysPB_MapEntry_DoNotUseDefaultTypeInternal {
31
 public:
32
  ::google::protobuf::internal::ExplicitlyConstructed<UniverseKeysPB_MapEntry_DoNotUse>
33
      _instance;
34
} _UniverseKeysPB_MapEntry_DoNotUse_default_instance_;
35
class UniverseKeysPBDefaultTypeInternal {
36
 public:
37
  ::google::protobuf::internal::ExplicitlyConstructed<UniverseKeysPB>
38
      _instance;
39
} _UniverseKeysPB_default_instance_;
40
class UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUseDefaultTypeInternal {
41
 public:
42
  ::google::protobuf::internal::ExplicitlyConstructed<UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse>
43
      _instance;
44
} _UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse_default_instance_;
45
class UniverseKeyRegistryPBDefaultTypeInternal {
46
 public:
47
  ::google::protobuf::internal::ExplicitlyConstructed<UniverseKeyRegistryPB>
48
      _instance;
49
} _UniverseKeyRegistryPB_default_instance_;
50
}  // namespace encryption
51
}  // namespace yb
52
namespace protobuf_yb_2fencryption_2fencryption_2eproto {
53
28.2k
void InitDefaultsEncryptionParamsPBImpl() {
54
28.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
55
56
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
57
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
58
#else
59
28.2k
  ::google::protobuf::internal::InitProtobufDefaults();
60
28.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
61
28.2k
  {
62
28.2k
    void* ptr = &::yb::encryption::_EncryptionParamsPB_default_instance_;
63
28.2k
    new (ptr) ::yb::encryption::EncryptionParamsPB();
64
28.2k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
65
28.2k
  }
66
28.2k
  ::yb::encryption::EncryptionParamsPB::InitAsDefaultInstance();
67
28.2k
}
68
69
56.9k
void InitDefaultsEncryptionParamsPB() {
70
56.9k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
71
56.9k
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsEncryptionParamsPBImpl);
72
56.9k
}
73
74
28.2k
void InitDefaultsUniverseKeysPB_MapEntry_DoNotUseImpl() {
75
28.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
76
77
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
78
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
79
#else
80
28.2k
  ::google::protobuf::internal::InitProtobufDefaults();
81
28.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
82
28.2k
  {
83
28.2k
    void* ptr = &::yb::encryption::_UniverseKeysPB_MapEntry_DoNotUse_default_instance_;
84
28.2k
    new (ptr) ::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse();
85
28.2k
  }
86
28.2k
  ::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse::InitAsDefaultInstance();
87
28.2k
}
88
89
56.5k
void InitDefaultsUniverseKeysPB_MapEntry_DoNotUse() {
90
56.5k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
91
56.5k
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUniverseKeysPB_MapEntry_DoNotUseImpl);
92
56.5k
}
93
94
28.2k
void InitDefaultsUniverseKeysPBImpl() {
95
28.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
96
97
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
98
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
99
#else
100
28.2k
  ::google::protobuf::internal::InitProtobufDefaults();
101
28.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
102
28.2k
  protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeysPB_MapEntry_DoNotUse();
103
28.2k
  {
104
28.2k
    void* ptr = &::yb::encryption::_UniverseKeysPB_default_instance_;
105
28.2k
    new (ptr) ::yb::encryption::UniverseKeysPB();
106
28.2k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
107
28.2k
  }
108
28.2k
  ::yb::encryption::UniverseKeysPB::InitAsDefaultInstance();
109
28.2k
}
110
111
115k
void InitDefaultsUniverseKeysPB() {
112
115k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
113
115k
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUniverseKeysPBImpl);
114
115k
}
115
116
28.2k
void InitDefaultsUniverseKeyRegistryPB_UniverseKeysEntry_DoNotUseImpl() {
117
28.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
118
119
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
120
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
121
#else
122
28.2k
  ::google::protobuf::internal::InitProtobufDefaults();
123
28.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
124
28.2k
  protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsEncryptionParamsPB();
125
28.2k
  {
126
28.2k
    void* ptr = &::yb::encryption::_UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse_default_instance_;
127
28.2k
    new (ptr) ::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse();
128
28.2k
  }
129
28.2k
  ::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::InitAsDefaultInstance();
130
28.2k
}
131
132
56.5k
void InitDefaultsUniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse() {
133
56.5k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
134
56.5k
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUniverseKeyRegistryPB_UniverseKeysEntry_DoNotUseImpl);
135
56.5k
}
136
137
28.2k
void InitDefaultsUniverseKeyRegistryPBImpl() {
138
28.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
139
140
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
141
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
142
#else
143
28.2k
  ::google::protobuf::internal::InitProtobufDefaults();
144
28.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
145
28.2k
  protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse();
146
28.2k
  {
147
28.2k
    void* ptr = &::yb::encryption::_UniverseKeyRegistryPB_default_instance_;
148
28.2k
    new (ptr) ::yb::encryption::UniverseKeyRegistryPB();
149
28.2k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
150
28.2k
  }
151
28.2k
  ::yb::encryption::UniverseKeyRegistryPB::InitAsDefaultInstance();
152
28.2k
}
153
154
64.7k
void InitDefaultsUniverseKeyRegistryPB() {
155
64.7k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
156
64.7k
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUniverseKeyRegistryPBImpl);
157
64.7k
}
158
159
::google::protobuf::Metadata file_level_metadata[5];
160
161
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
162
  ~0u,  // no _has_bits_
163
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::EncryptionParamsPB, _internal_metadata_),
164
  ~0u,  // no _extensions_
165
  ~0u,  // no _oneof_case_
166
  ~0u,  // no _weak_field_map_
167
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::EncryptionParamsPB, data_key_),
168
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::EncryptionParamsPB, nonce_),
169
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::EncryptionParamsPB, counter_),
170
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::EncryptionParamsPB, openssl_compatible_counter_overflow_),
171
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse, _has_bits_),
172
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse, _internal_metadata_),
173
  ~0u,  // no _extensions_
174
  ~0u,  // no _oneof_case_
175
  ~0u,  // no _weak_field_map_
176
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse, key_),
177
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse, value_),
178
  0,
179
  1,
180
  ~0u,  // no _has_bits_
181
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeysPB, _internal_metadata_),
182
  ~0u,  // no _extensions_
183
  ~0u,  // no _oneof_case_
184
  ~0u,  // no _weak_field_map_
185
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeysPB, map_),
186
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse, _has_bits_),
187
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse, _internal_metadata_),
188
  ~0u,  // no _extensions_
189
  ~0u,  // no _oneof_case_
190
  ~0u,  // no _weak_field_map_
191
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse, key_),
192
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse, value_),
193
  0,
194
  1,
195
  ~0u,  // no _has_bits_
196
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeyRegistryPB, _internal_metadata_),
197
  ~0u,  // no _extensions_
198
  ~0u,  // no _oneof_case_
199
  ~0u,  // no _weak_field_map_
200
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeyRegistryPB, encryption_enabled_),
201
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeyRegistryPB, universe_keys_),
202
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::encryption::UniverseKeyRegistryPB, latest_version_id_),
203
};
204
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
205
  { 0, -1, sizeof(::yb::encryption::EncryptionParamsPB)},
206
  { 9, 16, sizeof(::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse)},
207
  { 18, -1, sizeof(::yb::encryption::UniverseKeysPB)},
208
  { 24, 31, sizeof(::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse)},
209
  { 33, -1, sizeof(::yb::encryption::UniverseKeyRegistryPB)},
210
};
211
212
static ::google::protobuf::Message const * const file_default_instances[] = {
213
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::encryption::_EncryptionParamsPB_default_instance_),
214
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::encryption::_UniverseKeysPB_MapEntry_DoNotUse_default_instance_),
215
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::encryption::_UniverseKeysPB_default_instance_),
216
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::encryption::_UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse_default_instance_),
217
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::encryption::_UniverseKeyRegistryPB_default_instance_),
218
};
219
220
42
void protobuf_AssignDescriptors() {
221
42
  AddDescriptors();
222
42
  ::google::protobuf::MessageFactory* factory = NULL;
223
42
  AssignDescriptors(
224
42
      "yb/encryption/encryption.proto", schemas, file_default_instances, TableStruct::offsets, factory,
225
42
      file_level_metadata, NULL, NULL);
226
42
}
227
228
51
void protobuf_AssignDescriptorsOnce() {
229
51
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
230
51
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
231
51
}
232
233
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
234
0
void protobuf_RegisterTypes(const ::std::string&) {
235
0
  protobuf_AssignDescriptorsOnce();
236
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
237
0
}
238
239
28.2k
void AddDescriptorsImpl() {
240
28.2k
  InitDefaults();
241
28.2k
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
242
28.2k
      "\n\036yb/encryption/encryption.proto\022\ryb.enc"
243
28.2k
      "ryption\"s\n\022EncryptionParamsPB\022\020\n\010data_ke"
244
28.2k
      "y\030\001 \001(\014\022\r\n\005nonce\030\002 \001(\014\022\017\n\007counter\030\003 \001(\005\022"
245
28.2k
      "+\n#openssl_compatible_counter_overflow\030\004"
246
28.2k
      " \001(\010\"q\n\016UniverseKeysPB\0223\n\003map\030\001 \003(\0132&.yb"
247
28.2k
      ".encryption.UniverseKeysPB.MapEntry\032*\n\010M"
248
28.2k
      "apEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\""
249
28.2k
      "\365\001\n\025UniverseKeyRegistryPB\022\032\n\022encryption_"
250
28.2k
      "enabled\030\001 \001(\010\022M\n\runiverse_keys\030\002 \003(\01326.y"
251
28.2k
      "b.encryption.UniverseKeyRegistryPB.Unive"
252
28.2k
      "rseKeysEntry\022\031\n\021latest_version_id\030\003 \001(\t\032"
253
28.2k
      "V\n\021UniverseKeysEntry\022\013\n\003key\030\001 \001(\t\0220\n\005val"
254
28.2k
      "ue\030\002 \001(\0132!.yb.encryption.EncryptionParam"
255
28.2k
      "sPB:\0028\001B\023\n\021org.yb.encryptionb\006proto3"
256
28.2k
  };
257
28.2k
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
258
28.2k
      descriptor, 556);
259
28.2k
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
260
28.2k
    "yb/encryption/encryption.proto", &protobuf_RegisterTypes);
261
28.2k
}
262
263
82.0k
void AddDescriptors() {
264
82.0k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
265
82.0k
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
266
82.0k
}
267
// Force AddDescriptors() to be called at dynamic initialization time.
268
struct StaticDescriptorInitializer {
269
28.2k
  StaticDescriptorInitializer() {
270
28.2k
    AddDescriptors();
271
28.2k
  }
272
} static_descriptor_initializer;
273
}  // namespace protobuf_yb_2fencryption_2fencryption_2eproto
274
namespace yb {
275
namespace encryption {
276
277
// ===================================================================
278
279
28.2k
void EncryptionParamsPB::InitAsDefaultInstance() {
280
28.2k
}
281
#if !defined(_MSC_VER) || _MSC_VER >= 1900
282
const int EncryptionParamsPB::kDataKeyFieldNumber;
283
const int EncryptionParamsPB::kNonceFieldNumber;
284
const int EncryptionParamsPB::kCounterFieldNumber;
285
const int EncryptionParamsPB::kOpensslCompatibleCounterOverflowFieldNumber;
286
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
287
288
EncryptionParamsPB::EncryptionParamsPB()
289
28.6k
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
290
28.6k
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
291
418
    ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsEncryptionParamsPB();
292
418
  }
293
28.6k
  SharedCtor();
294
  // @@protoc_insertion_point(constructor:yb.encryption.EncryptionParamsPB)
295
28.6k
}
296
EncryptionParamsPB::EncryptionParamsPB(const EncryptionParamsPB& from)
297
  : ::google::protobuf::Message(),
298
      _internal_metadata_(NULL),
299
0
      _cached_size_(0) {
300
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
301
0
  data_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
302
0
  if (from.data_key().size() > 0) {
303
0
    data_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_key_);
304
0
  }
305
0
  nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
306
0
  if (from.nonce().size() > 0) {
307
0
    nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.nonce_);
308
0
  }
309
0
  ::memcpy(&counter_, &from.counter_,
310
0
    static_cast<size_t>(reinterpret_cast<char*>(&openssl_compatible_counter_overflow_) -
311
0
    reinterpret_cast<char*>(&counter_)) + sizeof(openssl_compatible_counter_overflow_));
312
  // @@protoc_insertion_point(copy_constructor:yb.encryption.EncryptionParamsPB)
313
0
}
314
315
28.6k
void EncryptionParamsPB::SharedCtor() {
316
28.6k
  data_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
317
28.6k
  nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
318
28.6k
  ::memset(&counter_, 0, static_cast<size_t>(
319
28.6k
      reinterpret_cast<char*>(&openssl_compatible_counter_overflow_) -
320
28.6k
      reinterpret_cast<char*>(&counter_)) + sizeof(openssl_compatible_counter_overflow_));
321
28.6k
  _cached_size_ = 0;
322
28.6k
}
323
324
383
EncryptionParamsPB::~EncryptionParamsPB() {
325
  // @@protoc_insertion_point(destructor:yb.encryption.EncryptionParamsPB)
326
383
  SharedDtor();
327
383
}
328
329
383
void EncryptionParamsPB::SharedDtor() {
330
383
  data_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
331
383
  nonce_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
332
383
}
333
334
0
void EncryptionParamsPB::SetCachedSize(int size) const {
335
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
336
0
  _cached_size_ = size;
337
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
338
0
}
339
0
const ::google::protobuf::Descriptor* EncryptionParamsPB::descriptor() {
340
0
  ::protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce();
341
0
  return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
342
0
}
343
344
0
const EncryptionParamsPB& EncryptionParamsPB::default_instance() {
345
0
  ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsEncryptionParamsPB();
346
0
  return *internal_default_instance();
347
0
}
348
349
0
EncryptionParamsPB* EncryptionParamsPB::New(::google::protobuf::Arena* arena) const {
350
0
  EncryptionParamsPB* n = new EncryptionParamsPB;
351
0
  if (arena != NULL) {
352
0
    arena->Own(n);
353
0
  }
354
0
  return n;
355
0
}
356
357
166
void EncryptionParamsPB::Clear() {
358
// @@protoc_insertion_point(message_clear_start:yb.encryption.EncryptionParamsPB)
359
166
  ::google::protobuf::uint32 cached_has_bits = 0;
360
  // Prevent compiler warnings about cached_has_bits being unused
361
166
  (void) cached_has_bits;
362
363
166
  data_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
364
166
  nonce_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
365
166
  ::memset(&counter_, 0, static_cast<size_t>(
366
166
      reinterpret_cast<char*>(&openssl_compatible_counter_overflow_) -
367
166
      reinterpret_cast<char*>(&counter_)) + sizeof(openssl_compatible_counter_overflow_));
368
166
  _internal_metadata_.Clear();
369
166
}
370
371
bool EncryptionParamsPB::MergePartialFromCodedStream(
372
150
    ::google::protobuf::io::CodedInputStream* input) {
373
481
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) 
goto failure0
374
150
  ::google::protobuf::uint32 tag;
375
  // @@protoc_insertion_point(parse_start:yb.encryption.EncryptionParamsPB)
376
631
  for (;;) {
377
631
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
378
631
    tag = p.first;
379
631
    if (!p.second) 
goto handle_unusual150
;
380
481
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
381
      // bytes data_key = 1;
382
150
      case 1: {
383
150
        if (static_cast< ::google::protobuf::uint8>(tag) ==
384
150
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
385
150
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
386
150
                input, this->mutable_data_key()));
387
150
        } else {
388
0
          goto handle_unusual;
389
0
        }
390
150
        break;
391
150
      }
392
393
      // bytes nonce = 2;
394
150
      case 2: {
395
150
        if (static_cast< ::google::protobuf::uint8>(tag) ==
396
150
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
397
150
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
398
150
                input, this->mutable_nonce()));
399
150
        } else {
400
0
          goto handle_unusual;
401
0
        }
402
150
        break;
403
150
      }
404
405
      // int32 counter = 3;
406
150
      case 3: {
407
150
        if (static_cast< ::google::protobuf::uint8>(tag) ==
408
150
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
409
410
150
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
411
150
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
412
150
                 input, &counter_)));
413
150
        } else {
414
0
          goto handle_unusual;
415
0
        }
416
150
        break;
417
150
      }
418
419
      // bool openssl_compatible_counter_overflow = 4;
420
150
      case 4: {
421
31
        if (static_cast< ::google::protobuf::uint8>(tag) ==
422
31
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
423
424
31
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
425
31
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
426
31
                 input, &openssl_compatible_counter_overflow_)));
427
31
        } else {
428
0
          goto handle_unusual;
429
0
        }
430
31
        break;
431
31
      }
432
433
31
      default: {
434
150
      handle_unusual:
435
150
        if (tag == 0) {
436
150
          goto success;
437
150
        }
438
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
439
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
440
0
        break;
441
0
      }
442
481
    }
443
481
  }
444
150
success:
445
  // @@protoc_insertion_point(parse_success:yb.encryption.EncryptionParamsPB)
446
150
  return true;
447
0
failure:
448
  // @@protoc_insertion_point(parse_failure:yb.encryption.EncryptionParamsPB)
449
0
  return false;
450
150
#undef DO_
451
150
}
452
453
void EncryptionParamsPB::SerializeWithCachedSizes(
454
0
    ::google::protobuf::io::CodedOutputStream* output) const {
455
  // @@protoc_insertion_point(serialize_start:yb.encryption.EncryptionParamsPB)
456
0
  ::google::protobuf::uint32 cached_has_bits = 0;
457
0
  (void) cached_has_bits;
458
459
  // bytes data_key = 1;
460
0
  if (this->data_key().size() > 0) {
461
0
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
462
0
      1, this->data_key(), output);
463
0
  }
464
465
  // bytes nonce = 2;
466
0
  if (this->nonce().size() > 0) {
467
0
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
468
0
      2, this->nonce(), output);
469
0
  }
470
471
  // int32 counter = 3;
472
0
  if (this->counter() != 0) {
473
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->counter(), output);
474
0
  }
475
476
  // bool openssl_compatible_counter_overflow = 4;
477
0
  if (this->openssl_compatible_counter_overflow() != 0) {
478
0
    ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->openssl_compatible_counter_overflow(), output);
479
0
  }
480
481
0
  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
482
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
483
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
484
0
  }
485
  // @@protoc_insertion_point(serialize_end:yb.encryption.EncryptionParamsPB)
486
0
}
487
488
::google::protobuf::uint8* EncryptionParamsPB::InternalSerializeWithCachedSizesToArray(
489
105
    bool deterministic, ::google::protobuf::uint8* target) const {
490
105
  (void)deterministic; // Unused
491
  // @@protoc_insertion_point(serialize_to_array_start:yb.encryption.EncryptionParamsPB)
492
105
  ::google::protobuf::uint32 cached_has_bits = 0;
493
105
  (void) cached_has_bits;
494
495
  // bytes data_key = 1;
496
105
  if (this->data_key().size() > 0) {
497
105
    target =
498
105
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
499
105
        1, this->data_key(), target);
500
105
  }
501
502
  // bytes nonce = 2;
503
105
  if (this->nonce().size() > 0) {
504
105
    target =
505
105
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
506
105
        2, this->nonce(), target);
507
105
  }
508
509
  // int32 counter = 3;
510
105
  if (this->counter() != 0) {
511
105
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->counter(), target);
512
105
  }
513
514
  // bool openssl_compatible_counter_overflow = 4;
515
105
  if (this->openssl_compatible_counter_overflow() != 0) {
516
35
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->openssl_compatible_counter_overflow(), target);
517
35
  }
518
519
105
  if ((_internal_metadata_.have_unknown_fields() &&  
::google::protobuf::internal::GetProto3PreserveUnknownsDefault()0
)) {
520
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
521
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
522
0
  }
523
  // @@protoc_insertion_point(serialize_to_array_end:yb.encryption.EncryptionParamsPB)
524
105
  return target;
525
105
}
526
527
151
size_t EncryptionParamsPB::ByteSizeLong() const {
528
// @@protoc_insertion_point(message_byte_size_start:yb.encryption.EncryptionParamsPB)
529
151
  size_t total_size = 0;
530
531
151
  if ((_internal_metadata_.have_unknown_fields() &&  
::google::protobuf::internal::GetProto3PreserveUnknownsDefault()0
)) {
532
0
    total_size +=
533
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
534
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
535
0
  }
536
  // bytes data_key = 1;
537
151
  if (this->data_key().size() > 0) {
538
151
    total_size += 1 +
539
151
      ::google::protobuf::internal::WireFormatLite::BytesSize(
540
151
        this->data_key());
541
151
  }
542
543
  // bytes nonce = 2;
544
151
  if (this->nonce().size() > 0) {
545
151
    total_size += 1 +
546
151
      ::google::protobuf::internal::WireFormatLite::BytesSize(
547
151
        this->nonce());
548
151
  }
549
550
  // int32 counter = 3;
551
151
  if (this->counter() != 0) {
552
151
    total_size += 1 +
553
151
      ::google::protobuf::internal::WireFormatLite::Int32Size(
554
151
        this->counter());
555
151
  }
556
557
  // bool openssl_compatible_counter_overflow = 4;
558
151
  if (this->openssl_compatible_counter_overflow() != 0) {
559
35
    total_size += 1 + 1;
560
35
  }
561
562
151
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
563
151
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
564
151
  _cached_size_ = cached_size;
565
151
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
566
151
  return total_size;
567
151
}
568
569
0
void EncryptionParamsPB::MergeFrom(const ::google::protobuf::Message& from) {
570
// @@protoc_insertion_point(generalized_merge_from_start:yb.encryption.EncryptionParamsPB)
571
0
  GOOGLE_DCHECK_NE(&from, this);
572
0
  const EncryptionParamsPB* source =
573
0
      ::google::protobuf::internal::DynamicCastToGenerated<const EncryptionParamsPB>(
574
0
          &from);
575
0
  if (source == NULL) {
576
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.encryption.EncryptionParamsPB)
577
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
578
0
  } else {
579
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.encryption.EncryptionParamsPB)
580
0
    MergeFrom(*source);
581
0
  }
582
0
}
583
584
131
void EncryptionParamsPB::MergeFrom(const EncryptionParamsPB& from) {
585
// @@protoc_insertion_point(class_specific_merge_from_start:yb.encryption.EncryptionParamsPB)
586
131
  GOOGLE_DCHECK_NE(&from, this);
587
131
  _internal_metadata_.MergeFrom(from._internal_metadata_);
588
131
  ::google::protobuf::uint32 cached_has_bits = 0;
589
131
  (void) cached_has_bits;
590
591
131
  if (from.data_key().size() > 0) {
592
593
131
    data_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_key_);
594
131
  }
595
131
  if (from.nonce().size() > 0) {
596
597
131
    nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.nonce_);
598
131
  }
599
131
  if (from.counter() != 0) {
600
131
    set_counter(from.counter());
601
131
  }
602
131
  if (from.openssl_compatible_counter_overflow() != 0) {
603
6
    set_openssl_compatible_counter_overflow(from.openssl_compatible_counter_overflow());
604
6
  }
605
131
}
606
607
0
void EncryptionParamsPB::CopyFrom(const ::google::protobuf::Message& from) {
608
// @@protoc_insertion_point(generalized_copy_from_start:yb.encryption.EncryptionParamsPB)
609
0
  if (&from == this) return;
610
0
  Clear();
611
0
  MergeFrom(from);
612
0
}
613
614
131
void EncryptionParamsPB::CopyFrom(const EncryptionParamsPB& from) {
615
// @@protoc_insertion_point(class_specific_copy_from_start:yb.encryption.EncryptionParamsPB)
616
131
  if (&from == this) 
return0
;
617
131
  Clear();
618
131
  MergeFrom(from);
619
131
}
620
621
74
bool EncryptionParamsPB::IsInitialized() const {
622
74
  return true;
623
74
}
624
625
0
void EncryptionParamsPB::Swap(EncryptionParamsPB* other) {
626
0
  if (other == this) return;
627
0
  InternalSwap(other);
628
0
}
629
70
void EncryptionParamsPB::InternalSwap(EncryptionParamsPB* other) {
630
70
  using std::swap;
631
70
  data_key_.Swap(&other->data_key_);
632
70
  nonce_.Swap(&other->nonce_);
633
70
  swap(counter_, other->counter_);
634
70
  swap(openssl_compatible_counter_overflow_, other->openssl_compatible_counter_overflow_);
635
70
  _internal_metadata_.Swap(&other->_internal_metadata_);
636
70
  swap(_cached_size_, other->_cached_size_);
637
70
}
638
639
0
::google::protobuf::Metadata EncryptionParamsPB::GetMetadata() const {
640
0
  protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce();
641
0
  return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[kIndexInFileMessages];
642
0
}
643
644
645
// ===================================================================
646
647
28.2k
UniverseKeysPB_MapEntry_DoNotUse::UniverseKeysPB_MapEntry_DoNotUse() {}
648
99
UniverseKeysPB_MapEntry_DoNotUse::UniverseKeysPB_MapEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
649
0
void UniverseKeysPB_MapEntry_DoNotUse::MergeFrom(const UniverseKeysPB_MapEntry_DoNotUse& other) {
650
0
  MergeFromInternal(other);
651
0
}
652
0
::google::protobuf::Metadata UniverseKeysPB_MapEntry_DoNotUse::GetMetadata() const {
653
0
  ::protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce();
654
0
  return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[1];
655
0
}
656
void UniverseKeysPB_MapEntry_DoNotUse::MergeFrom(
657
0
    const ::google::protobuf::Message& other) {
658
0
  ::google::protobuf::Message::MergeFrom(other);
659
0
}
660
661
662
// ===================================================================
663
664
28.2k
void UniverseKeysPB::InitAsDefaultInstance() {
665
28.2k
}
666
#if !defined(_MSC_VER) || _MSC_VER >= 1900
667
const int UniverseKeysPB::kMapFieldNumber;
668
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
669
670
UniverseKeysPB::UniverseKeysPB()
671
61.9k
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
672
61.9k
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
673
33.6k
    ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeysPB();
674
33.6k
  }
675
61.9k
  SharedCtor();
676
  // @@protoc_insertion_point(constructor:yb.encryption.UniverseKeysPB)
677
61.9k
}
678
UniverseKeysPB::UniverseKeysPB(const UniverseKeysPB& from)
679
  : ::google::protobuf::Message(),
680
      _internal_metadata_(NULL),
681
0
      _cached_size_(0) {
682
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
683
0
  map_.MergeFrom(from.map_);
684
  // @@protoc_insertion_point(copy_constructor:yb.encryption.UniverseKeysPB)
685
0
}
686
687
61.9k
void UniverseKeysPB::SharedCtor() {
688
61.9k
  _cached_size_ = 0;
689
61.9k
}
690
691
25.7k
UniverseKeysPB::~UniverseKeysPB() {
692
  // @@protoc_insertion_point(destructor:yb.encryption.UniverseKeysPB)
693
25.7k
  SharedDtor();
694
25.7k
}
695
696
25.7k
void UniverseKeysPB::SharedDtor() {
697
25.7k
}
698
699
0
void UniverseKeysPB::SetCachedSize(int size) const {
700
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
701
0
  _cached_size_ = size;
702
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
703
0
}
704
0
const ::google::protobuf::Descriptor* UniverseKeysPB::descriptor() {
705
0
  ::protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce();
706
0
  return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
707
0
}
708
709
0
const UniverseKeysPB& UniverseKeysPB::default_instance() {
710
0
  ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeysPB();
711
0
  return *internal_default_instance();
712
0
}
713
714
0
UniverseKeysPB* UniverseKeysPB::New(::google::protobuf::Arena* arena) const {
715
0
  UniverseKeysPB* n = new UniverseKeysPB;
716
0
  if (arena != NULL) {
717
0
    arena->Own(n);
718
0
  }
719
0
  return n;
720
0
}
721
722
12.7k
void UniverseKeysPB::Clear() {
723
// @@protoc_insertion_point(message_clear_start:yb.encryption.UniverseKeysPB)
724
12.7k
  ::google::protobuf::uint32 cached_has_bits = 0;
725
  // Prevent compiler warnings about cached_has_bits being unused
726
12.7k
  (void) cached_has_bits;
727
728
12.7k
  map_.Clear();
729
12.7k
  _internal_metadata_.Clear();
730
12.7k
}
731
732
bool UniverseKeysPB::MergePartialFromCodedStream(
733
12.8k
    ::google::protobuf::io::CodedInputStream* input) {
734
12.8k
#define DO_(EXPRESSION) 
if (97
!GOOGLE_PREDICT_TRUE97
(EXPRESSION))
goto failure0
735
12.8k
  ::google::protobuf::uint32 tag;
736
  // @@protoc_insertion_point(parse_start:yb.encryption.UniverseKeysPB)
737
12.8k
  for (;;) {
738
12.8k
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
739
12.8k
    tag = p.first;
740
12.8k
    if (!p.second) 
goto handle_unusual12.6k
;
741
173
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
742
      // map<string, bytes> map = 1;
743
51
      case 1: {
744
51
        if (static_cast< ::google::protobuf::uint8>(tag) ==
745
51
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
746
51
          UniverseKeysPB_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
747
51
              UniverseKeysPB_MapEntry_DoNotUse,
748
51
              ::std::string, ::std::string,
749
51
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
750
51
              ::google::protobuf::internal::WireFormatLite::TYPE_BYTES,
751
51
              0 >,
752
51
            ::google::protobuf::Map< ::std::string, ::std::string > > parser(&map_);
753
51
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
754
51
              input, &parser));
755
51
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
756
51
            parser.key().data(), static_cast<int>(parser.key().length()),
757
51
            ::google::protobuf::internal::WireFormatLite::PARSE,
758
51
            "yb.encryption.UniverseKeysPB.MapEntry.key"));
759
51
        } else {
760
0
          goto handle_unusual;
761
0
        }
762
51
        break;
763
51
      }
764
765
51
      default: {
766
12.7k
      handle_unusual:
767
12.7k
        if (
tag == 012.7k
) {
768
12.7k
          goto success;
769
12.7k
        }
770
18.4E
        DO_(::google::protobuf::internal::WireFormat::SkipField(
771
18.4E
              input, tag, _internal_metadata_.mutable_unknown_fields()));
772
18.4E
        break;
773
18.4E
      }
774
173
    }
775
173
  }
776
18.4E
success:
777
  // @@protoc_insertion_point(parse_success:yb.encryption.UniverseKeysPB)
778
12.7k
  return true;
779
0
failure:
780
  // @@protoc_insertion_point(parse_failure:yb.encryption.UniverseKeysPB)
781
0
  return false;
782
12.8k
#undef DO_
783
12.8k
}
784
785
void UniverseKeysPB::SerializeWithCachedSizes(
786
0
    ::google::protobuf::io::CodedOutputStream* output) const {
787
  // @@protoc_insertion_point(serialize_start:yb.encryption.UniverseKeysPB)
788
0
  ::google::protobuf::uint32 cached_has_bits = 0;
789
0
  (void) cached_has_bits;
790
791
  // map<string, bytes> map = 1;
792
0
  if (!this->map().empty()) {
793
0
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
794
0
        ConstPtr;
795
0
    typedef ConstPtr SortItem;
796
0
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
797
0
    struct Utf8Check {
798
0
      static void Check(ConstPtr p) {
799
0
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
800
0
          p->first.data(), static_cast<int>(p->first.length()),
801
0
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
802
0
          "yb.encryption.UniverseKeysPB.MapEntry.key");
803
0
      }
804
0
    };
805
806
0
    if (output->IsSerializationDeterministic() &&
807
0
        this->map().size() > 1) {
808
0
      ::google::protobuf::scoped_array<SortItem> items(
809
0
          new SortItem[this->map().size()]);
810
0
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
811
0
      size_type n = 0;
812
0
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
813
0
          it = this->map().begin();
814
0
          it != this->map().end(); ++it, ++n) {
815
0
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
816
0
      }
817
0
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
818
0
      ::google::protobuf::scoped_ptr<UniverseKeysPB_MapEntry_DoNotUse> entry;
819
0
      for (size_type i = 0; i < n; i++) {
820
0
        entry.reset(map_.NewEntryWrapper(
821
0
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
822
0
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
823
0
            1, *entry, output);
824
0
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
825
0
      }
826
0
    } else {
827
0
      ::google::protobuf::scoped_ptr<UniverseKeysPB_MapEntry_DoNotUse> entry;
828
0
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
829
0
          it = this->map().begin();
830
0
          it != this->map().end(); ++it) {
831
0
        entry.reset(map_.NewEntryWrapper(
832
0
            it->first, it->second));
833
0
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
834
0
            1, *entry, output);
835
0
        Utf8Check::Check(&*it);
836
0
      }
837
0
    }
838
0
  }
839
840
0
  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
841
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
842
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
843
0
  }
844
  // @@protoc_insertion_point(serialize_end:yb.encryption.UniverseKeysPB)
845
0
}
846
847
::google::protobuf::uint8* UniverseKeysPB::InternalSerializeWithCachedSizesToArray(
848
12.8k
    bool deterministic, ::google::protobuf::uint8* target) const {
849
12.8k
  (void)deterministic; // Unused
850
  // @@protoc_insertion_point(serialize_to_array_start:yb.encryption.UniverseKeysPB)
851
12.8k
  ::google::protobuf::uint32 cached_has_bits = 0;
852
12.8k
  (void) cached_has_bits;
853
854
  // map<string, bytes> map = 1;
855
12.8k
  if (!this->map().empty()) {
856
33
    typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer
857
33
        ConstPtr;
858
33
    typedef ConstPtr SortItem;
859
33
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
860
33
    struct Utf8Check {
861
33
      static void Check(ConstPtr p) {
862
33
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
863
33
          p->first.data(), static_cast<int>(p->first.length()),
864
33
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
865
33
          "yb.encryption.UniverseKeysPB.MapEntry.key");
866
33
      }
867
33
    };
868
869
33
    if (deterministic &&
870
33
        
this->map().size() > 10
) {
871
0
      ::google::protobuf::scoped_array<SortItem> items(
872
0
          new SortItem[this->map().size()]);
873
0
      typedef ::google::protobuf::Map< ::std::string, ::std::string >::size_type size_type;
874
0
      size_type n = 0;
875
0
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
876
0
          it = this->map().begin();
877
0
          it != this->map().end(); ++it, ++n) {
878
0
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
879
0
      }
880
0
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
881
0
      ::google::protobuf::scoped_ptr<UniverseKeysPB_MapEntry_DoNotUse> entry;
882
0
      for (size_type i = 0; i < n; i++) {
883
0
        entry.reset(map_.NewEntryWrapper(
884
0
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
885
0
        target = ::google::protobuf::internal::WireFormatLite::
886
0
                   InternalWriteMessageNoVirtualToArray(
887
0
                       1, *entry, deterministic, target);
888
0
;
889
0
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
890
0
      }
891
33
    } else {
892
33
      ::google::protobuf::scoped_ptr<UniverseKeysPB_MapEntry_DoNotUse> entry;
893
33
      for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
894
33
          it = this->map().begin();
895
66
          it != this->map().end(); 
++it33
) {
896
33
        entry.reset(map_.NewEntryWrapper(
897
33
            it->first, it->second));
898
33
        target = ::google::protobuf::internal::WireFormatLite::
899
33
                   InternalWriteMessageNoVirtualToArray(
900
33
                       1, *entry, deterministic, target);
901
33
;
902
33
        Utf8Check::Check(&*it);
903
33
      }
904
33
    }
905
33
  }
906
907
12.8k
  if ((_internal_metadata_.have_unknown_fields() &&  
::google::protobuf::internal::GetProto3PreserveUnknownsDefault()0
)) {
908
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
909
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
910
0
  }
911
  // @@protoc_insertion_point(serialize_to_array_end:yb.encryption.UniverseKeysPB)
912
12.8k
  return target;
913
12.8k
}
914
915
25.6k
size_t UniverseKeysPB::ByteSizeLong() const {
916
// @@protoc_insertion_point(message_byte_size_start:yb.encryption.UniverseKeysPB)
917
25.6k
  size_t total_size = 0;
918
919
25.6k
  if ((_internal_metadata_.have_unknown_fields() &&  
::google::protobuf::internal::GetProto3PreserveUnknownsDefault()0
)) {
920
0
    total_size +=
921
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
922
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
923
0
  }
924
  // map<string, bytes> map = 1;
925
25.6k
  total_size += 1 *
926
25.6k
      ::google::protobuf::internal::FromIntSize(this->map_size());
927
25.6k
  {
928
25.6k
    ::google::protobuf::scoped_ptr<UniverseKeysPB_MapEntry_DoNotUse> entry;
929
25.6k
    for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator
930
25.6k
        it = this->map().begin();
931
25.7k
        it != this->map().end(); 
++it66
) {
932
66
      entry.reset(map_.NewEntryWrapper(it->first, it->second));
933
66
      total_size += ::google::protobuf::internal::WireFormatLite::
934
66
          MessageSizeNoVirtual(*entry);
935
66
    }
936
25.6k
  }
937
938
25.6k
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
939
25.6k
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
940
25.6k
  _cached_size_ = cached_size;
941
25.6k
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
942
25.6k
  return total_size;
943
25.6k
}
944
945
0
void UniverseKeysPB::MergeFrom(const ::google::protobuf::Message& from) {
946
// @@protoc_insertion_point(generalized_merge_from_start:yb.encryption.UniverseKeysPB)
947
0
  GOOGLE_DCHECK_NE(&from, this);
948
0
  const UniverseKeysPB* source =
949
0
      ::google::protobuf::internal::DynamicCastToGenerated<const UniverseKeysPB>(
950
0
          &from);
951
0
  if (source == NULL) {
952
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.encryption.UniverseKeysPB)
953
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
954
0
  } else {
955
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.encryption.UniverseKeysPB)
956
0
    MergeFrom(*source);
957
0
  }
958
0
}
959
960
12.7k
void UniverseKeysPB::MergeFrom(const UniverseKeysPB& from) {
961
// @@protoc_insertion_point(class_specific_merge_from_start:yb.encryption.UniverseKeysPB)
962
12.7k
  GOOGLE_DCHECK_NE(&from, this);
963
12.7k
  _internal_metadata_.MergeFrom(from._internal_metadata_);
964
12.7k
  ::google::protobuf::uint32 cached_has_bits = 0;
965
12.7k
  (void) cached_has_bits;
966
967
12.7k
  map_.MergeFrom(from.map_);
968
12.7k
}
969
970
0
void UniverseKeysPB::CopyFrom(const ::google::protobuf::Message& from) {
971
// @@protoc_insertion_point(generalized_copy_from_start:yb.encryption.UniverseKeysPB)
972
0
  if (&from == this) return;
973
0
  Clear();
974
0
  MergeFrom(from);
975
0
}
976
977
12.7k
void UniverseKeysPB::CopyFrom(const UniverseKeysPB& from) {
978
// @@protoc_insertion_point(class_specific_copy_from_start:yb.encryption.UniverseKeysPB)
979
12.7k
  if (&from == this) 
return0
;
980
12.7k
  Clear();
981
12.7k
  MergeFrom(from);
982
12.7k
}
983
984
0
bool UniverseKeysPB::IsInitialized() const {
985
0
  return true;
986
0
}
987
988
0
void UniverseKeysPB::Swap(UniverseKeysPB* other) {
989
0
  if (other == this) return;
990
0
  InternalSwap(other);
991
0
}
992
0
void UniverseKeysPB::InternalSwap(UniverseKeysPB* other) {
993
0
  using std::swap;
994
0
  map_.Swap(&other->map_);
995
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
996
0
  swap(_cached_size_, other->_cached_size_);
997
0
}
998
999
51
::google::protobuf::Metadata UniverseKeysPB::GetMetadata() const {
1000
51
  protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce();
1001
51
  return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[kIndexInFileMessages];
1002
51
}
1003
1004
1005
// ===================================================================
1006
1007
28.2k
UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse() {}
1008
178
UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
1009
0
void UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::MergeFrom(const UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse& other) {
1010
0
  MergeFromInternal(other);
1011
0
}
1012
0
::google::protobuf::Metadata UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::GetMetadata() const {
1013
0
  ::protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce();
1014
0
  return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[3];
1015
0
}
1016
void UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::MergeFrom(
1017
0
    const ::google::protobuf::Message& other) {
1018
0
  ::google::protobuf::Message::MergeFrom(other);
1019
0
}
1020
1021
1022
// ===================================================================
1023
1024
28.2k
void UniverseKeyRegistryPB::InitAsDefaultInstance() {
1025
28.2k
}
1026
#if !defined(_MSC_VER) || _MSC_VER >= 1900
1027
const int UniverseKeyRegistryPB::kEncryptionEnabledFieldNumber;
1028
const int UniverseKeyRegistryPB::kUniverseKeysFieldNumber;
1029
const int UniverseKeyRegistryPB::kLatestVersionIdFieldNumber;
1030
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
1031
1032
UniverseKeyRegistryPB::UniverseKeyRegistryPB()
1033
37.8k
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
1034
37.8k
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
1035
9.63k
    ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeyRegistryPB();
1036
9.63k
  }
1037
37.8k
  SharedCtor();
1038
  // @@protoc_insertion_point(constructor:yb.encryption.UniverseKeyRegistryPB)
1039
37.8k
}
1040
UniverseKeyRegistryPB::UniverseKeyRegistryPB(const UniverseKeyRegistryPB& from)
1041
  : ::google::protobuf::Message(),
1042
      _internal_metadata_(NULL),
1043
0
      _cached_size_(0) {
1044
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1045
0
  universe_keys_.MergeFrom(from.universe_keys_);
1046
0
  latest_version_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1047
0
  if (from.latest_version_id().size() > 0) {
1048
0
    latest_version_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.latest_version_id_);
1049
0
  }
1050
0
  encryption_enabled_ = from.encryption_enabled_;
1051
  // @@protoc_insertion_point(copy_constructor:yb.encryption.UniverseKeyRegistryPB)
1052
0
}
1053
1054
37.8k
void UniverseKeyRegistryPB::SharedCtor() {
1055
37.8k
  latest_version_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1056
37.8k
  encryption_enabled_ = false;
1057
37.8k
  _cached_size_ = 0;
1058
37.8k
}
1059
1060
507
UniverseKeyRegistryPB::~UniverseKeyRegistryPB() {
1061
  // @@protoc_insertion_point(destructor:yb.encryption.UniverseKeyRegistryPB)
1062
507
  SharedDtor();
1063
507
}
1064
1065
507
void UniverseKeyRegistryPB::SharedDtor() {
1066
507
  latest_version_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1067
507
}
1068
1069
0
void UniverseKeyRegistryPB::SetCachedSize(int size) const {
1070
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1071
0
  _cached_size_ = size;
1072
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1073
0
}
1074
0
const ::google::protobuf::Descriptor* UniverseKeyRegistryPB::descriptor() {
1075
0
  ::protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce();
1076
0
  return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1077
0
}
1078
1079
0
const UniverseKeyRegistryPB& UniverseKeyRegistryPB::default_instance() {
1080
0
  ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeyRegistryPB();
1081
0
  return *internal_default_instance();
1082
0
}
1083
1084
0
UniverseKeyRegistryPB* UniverseKeyRegistryPB::New(::google::protobuf::Arena* arena) const {
1085
0
  UniverseKeyRegistryPB* n = new UniverseKeyRegistryPB;
1086
0
  if (arena != NULL) {
1087
0
    arena->Own(n);
1088
0
  }
1089
0
  return n;
1090
0
}
1091
1092
183
void UniverseKeyRegistryPB::Clear() {
1093
// @@protoc_insertion_point(message_clear_start:yb.encryption.UniverseKeyRegistryPB)
1094
183
  ::google::protobuf::uint32 cached_has_bits = 0;
1095
  // Prevent compiler warnings about cached_has_bits being unused
1096
183
  (void) cached_has_bits;
1097
1098
183
  universe_keys_.Clear();
1099
183
  latest_version_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1100
183
  encryption_enabled_ = false;
1101
183
  _internal_metadata_.Clear();
1102
183
}
1103
1104
bool UniverseKeyRegistryPB::MergePartialFromCodedStream(
1105
126
    ::google::protobuf::io::CodedInputStream* input) {
1106
566
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) 
goto failure0
1107
126
  ::google::protobuf::uint32 tag;
1108
  // @@protoc_insertion_point(parse_start:yb.encryption.UniverseKeyRegistryPB)
1109
465
  for (;;) {
1110
465
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1111
465
    tag = p.first;
1112
465
    if (!p.second) 
goto handle_unusual126
;
1113
339
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1114
      // bool encryption_enabled = 1;
1115
112
      case 1: {
1116
112
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1117
112
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
1118
1119
112
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1120
112
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
1121
112
                 input, &encryption_enabled_)));
1122
112
        } else {
1123
0
          goto handle_unusual;
1124
0
        }
1125
112
        break;
1126
112
      }
1127
1128
      // map<string, .yb.encryption.EncryptionParamsPB> universe_keys = 2;
1129
115
      case 2: {
1130
115
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1131
115
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
1132
115
          UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
1133
115
              UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse,
1134
115
              ::std::string, ::yb::encryption::EncryptionParamsPB,
1135
115
              ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
1136
115
              ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
1137
115
              0 >,
1138
115
            ::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB > > parser(&universe_keys_);
1139
115
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
1140
115
              input, &parser));
1141
115
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1142
115
            parser.key().data(), static_cast<int>(parser.key().length()),
1143
115
            ::google::protobuf::internal::WireFormatLite::PARSE,
1144
115
            "yb.encryption.UniverseKeyRegistryPB.UniverseKeysEntry.key"));
1145
115
        } else {
1146
0
          goto handle_unusual;
1147
0
        }
1148
115
        break;
1149
115
      }
1150
1151
      // string latest_version_id = 3;
1152
115
      case 3: {
1153
112
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1154
112
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
1155
112
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1156
112
                input, this->mutable_latest_version_id()));
1157
112
          DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1158
112
            this->latest_version_id().data(), static_cast<int>(this->latest_version_id().length()),
1159
112
            ::google::protobuf::internal::WireFormatLite::PARSE,
1160
112
            "yb.encryption.UniverseKeyRegistryPB.latest_version_id"));
1161
112
        } else {
1162
0
          goto handle_unusual;
1163
0
        }
1164
112
        break;
1165
112
      }
1166
1167
112
      default: {
1168
126
      handle_unusual:
1169
126
        if (tag == 0) {
1170
126
          goto success;
1171
126
        }
1172
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
1173
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
1174
0
        break;
1175
0
      }
1176
339
    }
1177
339
  }
1178
126
success:
1179
  // @@protoc_insertion_point(parse_success:yb.encryption.UniverseKeyRegistryPB)
1180
126
  return true;
1181
0
failure:
1182
  // @@protoc_insertion_point(parse_failure:yb.encryption.UniverseKeyRegistryPB)
1183
0
  return false;
1184
126
#undef DO_
1185
126
}
1186
1187
void UniverseKeyRegistryPB::SerializeWithCachedSizes(
1188
0
    ::google::protobuf::io::CodedOutputStream* output) const {
1189
  // @@protoc_insertion_point(serialize_start:yb.encryption.UniverseKeyRegistryPB)
1190
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1191
0
  (void) cached_has_bits;
1192
1193
  // bool encryption_enabled = 1;
1194
0
  if (this->encryption_enabled() != 0) {
1195
0
    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->encryption_enabled(), output);
1196
0
  }
1197
1198
  // map<string, .yb.encryption.EncryptionParamsPB> universe_keys = 2;
1199
0
  if (!this->universe_keys().empty()) {
1200
0
    typedef ::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_pointer
1201
0
        ConstPtr;
1202
0
    typedef ConstPtr SortItem;
1203
0
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
1204
0
    struct Utf8Check {
1205
0
      static void Check(ConstPtr p) {
1206
0
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1207
0
          p->first.data(), static_cast<int>(p->first.length()),
1208
0
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1209
0
          "yb.encryption.UniverseKeyRegistryPB.UniverseKeysEntry.key");
1210
0
      }
1211
0
    };
1212
1213
0
    if (output->IsSerializationDeterministic() &&
1214
0
        this->universe_keys().size() > 1) {
1215
0
      ::google::protobuf::scoped_array<SortItem> items(
1216
0
          new SortItem[this->universe_keys().size()]);
1217
0
      typedef ::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::size_type size_type;
1218
0
      size_type n = 0;
1219
0
      for (::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_iterator
1220
0
          it = this->universe_keys().begin();
1221
0
          it != this->universe_keys().end(); ++it, ++n) {
1222
0
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
1223
0
      }
1224
0
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
1225
0
      ::google::protobuf::scoped_ptr<UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse> entry;
1226
0
      for (size_type i = 0; i < n; i++) {
1227
0
        entry.reset(universe_keys_.NewEntryWrapper(
1228
0
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
1229
0
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1230
0
            2, *entry, output);
1231
0
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
1232
0
      }
1233
0
    } else {
1234
0
      ::google::protobuf::scoped_ptr<UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse> entry;
1235
0
      for (::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_iterator
1236
0
          it = this->universe_keys().begin();
1237
0
          it != this->universe_keys().end(); ++it) {
1238
0
        entry.reset(universe_keys_.NewEntryWrapper(
1239
0
            it->first, it->second));
1240
0
        ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1241
0
            2, *entry, output);
1242
0
        Utf8Check::Check(&*it);
1243
0
      }
1244
0
    }
1245
0
  }
1246
1247
  // string latest_version_id = 3;
1248
0
  if (this->latest_version_id().size() > 0) {
1249
0
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1250
0
      this->latest_version_id().data(), static_cast<int>(this->latest_version_id().length()),
1251
0
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1252
0
      "yb.encryption.UniverseKeyRegistryPB.latest_version_id");
1253
0
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1254
0
      3, this->latest_version_id(), output);
1255
0
  }
1256
1257
0
  if ((_internal_metadata_.have_unknown_fields() &&  ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1258
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1259
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), output);
1260
0
  }
1261
  // @@protoc_insertion_point(serialize_end:yb.encryption.UniverseKeyRegistryPB)
1262
0
}
1263
1264
::google::protobuf::uint8* UniverseKeyRegistryPB::InternalSerializeWithCachedSizesToArray(
1265
63
    bool deterministic, ::google::protobuf::uint8* target) const {
1266
63
  (void)deterministic; // Unused
1267
  // @@protoc_insertion_point(serialize_to_array_start:yb.encryption.UniverseKeyRegistryPB)
1268
63
  ::google::protobuf::uint32 cached_has_bits = 0;
1269
63
  (void) cached_has_bits;
1270
1271
  // bool encryption_enabled = 1;
1272
63
  if (this->encryption_enabled() != 0) {
1273
63
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->encryption_enabled(), target);
1274
63
  }
1275
1276
  // map<string, .yb.encryption.EncryptionParamsPB> universe_keys = 2;
1277
63
  if (!this->universe_keys().empty()) {
1278
63
    typedef ::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_pointer
1279
63
        ConstPtr;
1280
63
    typedef ConstPtr SortItem;
1281
63
    typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
1282
63
    struct Utf8Check {
1283
66
      static void Check(ConstPtr p) {
1284
66
        ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1285
66
          p->first.data(), static_cast<int>(p->first.length()),
1286
66
          ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1287
66
          "yb.encryption.UniverseKeyRegistryPB.UniverseKeysEntry.key");
1288
66
      }
1289
63
    };
1290
1291
63
    if (deterministic &&
1292
63
        
this->universe_keys().size() > 10
) {
1293
0
      ::google::protobuf::scoped_array<SortItem> items(
1294
0
          new SortItem[this->universe_keys().size()]);
1295
0
      typedef ::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::size_type size_type;
1296
0
      size_type n = 0;
1297
0
      for (::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_iterator
1298
0
          it = this->universe_keys().begin();
1299
0
          it != this->universe_keys().end(); ++it, ++n) {
1300
0
        items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
1301
0
      }
1302
0
      ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
1303
0
      ::google::protobuf::scoped_ptr<UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse> entry;
1304
0
      for (size_type i = 0; i < n; i++) {
1305
0
        entry.reset(universe_keys_.NewEntryWrapper(
1306
0
            items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
1307
0
        target = ::google::protobuf::internal::WireFormatLite::
1308
0
                   InternalWriteMessageNoVirtualToArray(
1309
0
                       2, *entry, deterministic, target);
1310
0
;
1311
0
        Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
1312
0
      }
1313
63
    } else {
1314
63
      ::google::protobuf::scoped_ptr<UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse> entry;
1315
63
      for (::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_iterator
1316
63
          it = this->universe_keys().begin();
1317
129
          it != this->universe_keys().end(); 
++it66
) {
1318
66
        entry.reset(universe_keys_.NewEntryWrapper(
1319
66
            it->first, it->second));
1320
66
        target = ::google::protobuf::internal::WireFormatLite::
1321
66
                   InternalWriteMessageNoVirtualToArray(
1322
66
                       2, *entry, deterministic, target);
1323
66
;
1324
66
        Utf8Check::Check(&*it);
1325
66
      }
1326
63
    }
1327
63
  }
1328
1329
  // string latest_version_id = 3;
1330
63
  if (this->latest_version_id().size() > 0) {
1331
63
    ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1332
63
      this->latest_version_id().data(), static_cast<int>(this->latest_version_id().length()),
1333
63
      ::google::protobuf::internal::WireFormatLite::SERIALIZE,
1334
63
      "yb.encryption.UniverseKeyRegistryPB.latest_version_id");
1335
63
    target =
1336
63
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1337
63
        3, this->latest_version_id(), target);
1338
63
  }
1339
1340
63
  if ((_internal_metadata_.have_unknown_fields() &&  
::google::protobuf::internal::GetProto3PreserveUnknownsDefault()0
)) {
1341
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1342
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()), target);
1343
0
  }
1344
  // @@protoc_insertion_point(serialize_to_array_end:yb.encryption.UniverseKeyRegistryPB)
1345
63
  return target;
1346
63
}
1347
1348
109
size_t UniverseKeyRegistryPB::ByteSizeLong() const {
1349
// @@protoc_insertion_point(message_byte_size_start:yb.encryption.UniverseKeyRegistryPB)
1350
109
  size_t total_size = 0;
1351
1352
109
  if ((_internal_metadata_.have_unknown_fields() &&  
::google::protobuf::internal::GetProto3PreserveUnknownsDefault()0
)) {
1353
0
    total_size +=
1354
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1355
0
        (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()));
1356
0
  }
1357
  // map<string, .yb.encryption.EncryptionParamsPB> universe_keys = 2;
1358
109
  total_size += 1 *
1359
109
      ::google::protobuf::internal::FromIntSize(this->universe_keys_size());
1360
109
  {
1361
109
    ::google::protobuf::scoped_ptr<UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse> entry;
1362
109
    for (::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_iterator
1363
109
        it = this->universe_keys().begin();
1364
221
        it != this->universe_keys().end(); 
++it112
) {
1365
112
      entry.reset(universe_keys_.NewEntryWrapper(it->first, it->second));
1366
112
      total_size += ::google::protobuf::internal::WireFormatLite::
1367
112
          MessageSizeNoVirtual(*entry);
1368
112
    }
1369
109
  }
1370
1371
  // string latest_version_id = 3;
1372
109
  if (this->latest_version_id().size() > 0) {
1373
109
    total_size += 1 +
1374
109
      ::google::protobuf::internal::WireFormatLite::StringSize(
1375
109
        this->latest_version_id());
1376
109
  }
1377
1378
  // bool encryption_enabled = 1;
1379
109
  if (this->encryption_enabled() != 0) {
1380
109
    total_size += 1 + 1;
1381
109
  }
1382
1383
109
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1384
109
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1385
109
  _cached_size_ = cached_size;
1386
109
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1387
109
  return total_size;
1388
109
}
1389
1390
0
void UniverseKeyRegistryPB::MergeFrom(const ::google::protobuf::Message& from) {
1391
// @@protoc_insertion_point(generalized_merge_from_start:yb.encryption.UniverseKeyRegistryPB)
1392
0
  GOOGLE_DCHECK_NE(&from, this);
1393
0
  const UniverseKeyRegistryPB* source =
1394
0
      ::google::protobuf::internal::DynamicCastToGenerated<const UniverseKeyRegistryPB>(
1395
0
          &from);
1396
0
  if (source == NULL) {
1397
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.encryption.UniverseKeyRegistryPB)
1398
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1399
0
  } else {
1400
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.encryption.UniverseKeyRegistryPB)
1401
0
    MergeFrom(*source);
1402
0
  }
1403
0
}
1404
1405
103
void UniverseKeyRegistryPB::MergeFrom(const UniverseKeyRegistryPB& from) {
1406
// @@protoc_insertion_point(class_specific_merge_from_start:yb.encryption.UniverseKeyRegistryPB)
1407
103
  GOOGLE_DCHECK_NE(&from, this);
1408
103
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1409
103
  ::google::protobuf::uint32 cached_has_bits = 0;
1410
103
  (void) cached_has_bits;
1411
1412
103
  universe_keys_.MergeFrom(from.universe_keys_);
1413
103
  if (from.latest_version_id().size() > 0) {
1414
1415
103
    latest_version_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.latest_version_id_);
1416
103
  }
1417
103
  if (from.encryption_enabled() != 0) {
1418
103
    set_encryption_enabled(from.encryption_enabled());
1419
103
  }
1420
103
}
1421
1422
0
void UniverseKeyRegistryPB::CopyFrom(const ::google::protobuf::Message& from) {
1423
// @@protoc_insertion_point(generalized_copy_from_start:yb.encryption.UniverseKeyRegistryPB)
1424
0
  if (&from == this) return;
1425
0
  Clear();
1426
0
  MergeFrom(from);
1427
0
}
1428
1429
103
void UniverseKeyRegistryPB::CopyFrom(const UniverseKeyRegistryPB& from) {
1430
// @@protoc_insertion_point(class_specific_copy_from_start:yb.encryption.UniverseKeyRegistryPB)
1431
103
  if (&from == this) 
return0
;
1432
103
  Clear();
1433
103
  MergeFrom(from);
1434
103
}
1435
1436
97
bool UniverseKeyRegistryPB::IsInitialized() const {
1437
97
  return true;
1438
97
}
1439
1440
0
void UniverseKeyRegistryPB::Swap(UniverseKeyRegistryPB* other) {
1441
0
  if (other == this) return;
1442
0
  InternalSwap(other);
1443
0
}
1444
160
void UniverseKeyRegistryPB::InternalSwap(UniverseKeyRegistryPB* other) {
1445
160
  using std::swap;
1446
160
  universe_keys_.Swap(&other->universe_keys_);
1447
160
  latest_version_id_.Swap(&other->latest_version_id_);
1448
160
  swap(encryption_enabled_, other->encryption_enabled_);
1449
160
  _internal_metadata_.Swap(&other->_internal_metadata_);
1450
160
  swap(_cached_size_, other->_cached_size_);
1451
160
}
1452
1453
0
::google::protobuf::Metadata UniverseKeyRegistryPB::GetMetadata() const {
1454
0
  protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce();
1455
0
  return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[kIndexInFileMessages];
1456
0
}
1457
1458
1459
// @@protoc_insertion_point(namespace_scope)
1460
}  // namespace encryption
1461
}  // namespace yb
1462
1463
// @@protoc_insertion_point(global_scope)