/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 | 17.2k | void InitDefaultsEncryptionParamsPBImpl() { |
54 | 17.2k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
55 | | |
56 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
57 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
58 | | #else |
59 | 17.2k | ::google::protobuf::internal::InitProtobufDefaults(); |
60 | 17.2k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
61 | 17.2k | { |
62 | 17.2k | void* ptr = &::yb::encryption::_EncryptionParamsPB_default_instance_; |
63 | 17.2k | new (ptr) ::yb::encryption::EncryptionParamsPB(); |
64 | 17.2k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
65 | 17.2k | } |
66 | 17.2k | ::yb::encryption::EncryptionParamsPB::InitAsDefaultInstance(); |
67 | 17.2k | } |
68 | | |
69 | 34.6k | void InitDefaultsEncryptionParamsPB() { |
70 | 34.6k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
71 | 34.6k | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsEncryptionParamsPBImpl); |
72 | 34.6k | } |
73 | | |
74 | 17.2k | void InitDefaultsUniverseKeysPB_MapEntry_DoNotUseImpl() { |
75 | 17.2k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
76 | | |
77 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
78 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
79 | | #else |
80 | 17.2k | ::google::protobuf::internal::InitProtobufDefaults(); |
81 | 17.2k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
82 | 17.2k | { |
83 | 17.2k | void* ptr = &::yb::encryption::_UniverseKeysPB_MapEntry_DoNotUse_default_instance_; |
84 | 17.2k | new (ptr) ::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse(); |
85 | 17.2k | } |
86 | 17.2k | ::yb::encryption::UniverseKeysPB_MapEntry_DoNotUse::InitAsDefaultInstance(); |
87 | 17.2k | } |
88 | | |
89 | 34.4k | void InitDefaultsUniverseKeysPB_MapEntry_DoNotUse() { |
90 | 34.4k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
91 | 34.4k | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUniverseKeysPB_MapEntry_DoNotUseImpl); |
92 | 34.4k | } |
93 | | |
94 | 17.2k | void InitDefaultsUniverseKeysPBImpl() { |
95 | 17.2k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
96 | | |
97 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
98 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
99 | | #else |
100 | 17.2k | ::google::protobuf::internal::InitProtobufDefaults(); |
101 | 17.2k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
102 | 17.2k | protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeysPB_MapEntry_DoNotUse(); |
103 | 17.2k | { |
104 | 17.2k | void* ptr = &::yb::encryption::_UniverseKeysPB_default_instance_; |
105 | 17.2k | new (ptr) ::yb::encryption::UniverseKeysPB(); |
106 | 17.2k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
107 | 17.2k | } |
108 | 17.2k | ::yb::encryption::UniverseKeysPB::InitAsDefaultInstance(); |
109 | 17.2k | } |
110 | | |
111 | 72.6k | void InitDefaultsUniverseKeysPB() { |
112 | 72.6k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
113 | 72.6k | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUniverseKeysPBImpl); |
114 | 72.6k | } |
115 | | |
116 | 17.2k | void InitDefaultsUniverseKeyRegistryPB_UniverseKeysEntry_DoNotUseImpl() { |
117 | 17.2k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
118 | | |
119 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
120 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
121 | | #else |
122 | 17.2k | ::google::protobuf::internal::InitProtobufDefaults(); |
123 | 17.2k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
124 | 17.2k | protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsEncryptionParamsPB(); |
125 | 17.2k | { |
126 | 17.2k | void* ptr = &::yb::encryption::_UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse_default_instance_; |
127 | 17.2k | new (ptr) ::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse(); |
128 | 17.2k | } |
129 | 17.2k | ::yb::encryption::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::InitAsDefaultInstance(); |
130 | 17.2k | } |
131 | | |
132 | 34.4k | void InitDefaultsUniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse() { |
133 | 34.4k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
134 | 34.4k | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUniverseKeyRegistryPB_UniverseKeysEntry_DoNotUseImpl); |
135 | 34.4k | } |
136 | | |
137 | 17.2k | void InitDefaultsUniverseKeyRegistryPBImpl() { |
138 | 17.2k | GOOGLE_PROTOBUF_VERIFY_VERSION; |
139 | | |
140 | | #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
141 | | ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); |
142 | | #else |
143 | 17.2k | ::google::protobuf::internal::InitProtobufDefaults(); |
144 | 17.2k | #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS |
145 | 17.2k | protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse(); |
146 | 17.2k | { |
147 | 17.2k | void* ptr = &::yb::encryption::_UniverseKeyRegistryPB_default_instance_; |
148 | 17.2k | new (ptr) ::yb::encryption::UniverseKeyRegistryPB(); |
149 | 17.2k | ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); |
150 | 17.2k | } |
151 | 17.2k | ::yb::encryption::UniverseKeyRegistryPB::InitAsDefaultInstance(); |
152 | 17.2k | } |
153 | | |
154 | 39.2k | void InitDefaultsUniverseKeyRegistryPB() { |
155 | 39.2k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
156 | 39.2k | ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUniverseKeyRegistryPBImpl); |
157 | 39.2k | } |
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 | 9 | void protobuf_AssignDescriptors() { |
221 | 9 | AddDescriptors(); |
222 | 9 | ::google::protobuf::MessageFactory* factory = NULL; |
223 | 9 | AssignDescriptors( |
224 | 9 | "yb/encryption/encryption.proto", schemas, file_default_instances, TableStruct::offsets, factory, |
225 | 9 | file_level_metadata, NULL, NULL); |
226 | 9 | } |
227 | | |
228 | 18 | void protobuf_AssignDescriptorsOnce() { |
229 | 18 | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
230 | 18 | ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); |
231 | 18 | } |
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 | 17.2k | void AddDescriptorsImpl() { |
240 | 17.2k | InitDefaults(); |
241 | 17.2k | static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { |
242 | 17.2k | "\n\036yb/encryption/encryption.proto\022\ryb.enc" |
243 | 17.2k | "ryption\"s\n\022EncryptionParamsPB\022\020\n\010data_ke" |
244 | 17.2k | "y\030\001 \001(\014\022\r\n\005nonce\030\002 \001(\014\022\017\n\007counter\030\003 \001(\005\022" |
245 | 17.2k | "+\n#openssl_compatible_counter_overflow\030\004" |
246 | 17.2k | " \001(\010\"q\n\016UniverseKeysPB\0223\n\003map\030\001 \003(\0132&.yb" |
247 | 17.2k | ".encryption.UniverseKeysPB.MapEntry\032*\n\010M" |
248 | 17.2k | "apEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\014:\0028\001\"" |
249 | 17.2k | "\365\001\n\025UniverseKeyRegistryPB\022\032\n\022encryption_" |
250 | 17.2k | "enabled\030\001 \001(\010\022M\n\runiverse_keys\030\002 \003(\01326.y" |
251 | 17.2k | "b.encryption.UniverseKeyRegistryPB.Unive" |
252 | 17.2k | "rseKeysEntry\022\031\n\021latest_version_id\030\003 \001(\t\032" |
253 | 17.2k | "V\n\021UniverseKeysEntry\022\013\n\003key\030\001 \001(\t\0220\n\005val" |
254 | 17.2k | "ue\030\002 \001(\0132!.yb.encryption.EncryptionParam" |
255 | 17.2k | "sPB:\0028\001B\023\n\021org.yb.encryptionb\006proto3" |
256 | 17.2k | }; |
257 | 17.2k | ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( |
258 | 17.2k | descriptor, 556); |
259 | 17.2k | ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( |
260 | 17.2k | "yb/encryption/encryption.proto", &protobuf_RegisterTypes); |
261 | 17.2k | } |
262 | | |
263 | 48.9k | void AddDescriptors() { |
264 | 48.9k | static GOOGLE_PROTOBUF_DECLARE_ONCE(once); |
265 | 48.9k | ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); |
266 | 48.9k | } |
267 | | // Force AddDescriptors() to be called at dynamic initialization time. |
268 | | struct StaticDescriptorInitializer { |
269 | 17.2k | StaticDescriptorInitializer() { |
270 | 17.2k | AddDescriptors(); |
271 | 17.2k | } |
272 | | } static_descriptor_initializer; |
273 | | } // namespace protobuf_yb_2fencryption_2fencryption_2eproto |
274 | | namespace yb { |
275 | | namespace encryption { |
276 | | |
277 | | // =================================================================== |
278 | | |
279 | 17.2k | void EncryptionParamsPB::InitAsDefaultInstance() { |
280 | 17.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 | 17.4k | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
290 | 217 | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
291 | 217 | ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsEncryptionParamsPB(); |
292 | 217 | } |
293 | 17.4k | SharedCtor(); |
294 | | // @@protoc_insertion_point(constructor:yb.encryption.EncryptionParamsPB) |
295 | 17.4k | } |
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 | 17.4k | void EncryptionParamsPB::SharedCtor() { |
316 | 17.4k | data_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
317 | 17.4k | nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
318 | 17.4k | ::memset(&counter_, 0, static_cast<size_t>( |
319 | 17.4k | reinterpret_cast<char*>(&openssl_compatible_counter_overflow_) - |
320 | 17.4k | reinterpret_cast<char*>(&counter_)) + sizeof(openssl_compatible_counter_overflow_)); |
321 | 17.4k | _cached_size_ = 0; |
322 | 17.4k | } |
323 | | |
324 | 209 | EncryptionParamsPB::~EncryptionParamsPB() { |
325 | | // @@protoc_insertion_point(destructor:yb.encryption.EncryptionParamsPB) |
326 | 209 | SharedDtor(); |
327 | 209 | } |
328 | | |
329 | 209 | void EncryptionParamsPB::SharedDtor() { |
330 | 209 | data_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
331 | 209 | nonce_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
332 | 209 | } |
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 | 71 | void EncryptionParamsPB::Clear() { |
358 | | // @@protoc_insertion_point(message_clear_start:yb.encryption.EncryptionParamsPB) |
359 | 71 | ::google::protobuf::uint32 cached_has_bits = 0; |
360 | | // Prevent compiler warnings about cached_has_bits being unused |
361 | 71 | (void) cached_has_bits; |
362 | | |
363 | 71 | data_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
364 | 71 | nonce_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
365 | 71 | ::memset(&counter_, 0, static_cast<size_t>( |
366 | 71 | reinterpret_cast<char*>(&openssl_compatible_counter_overflow_) - |
367 | 71 | reinterpret_cast<char*>(&counter_)) + sizeof(openssl_compatible_counter_overflow_)); |
368 | 71 | _internal_metadata_.Clear(); |
369 | 71 | } |
370 | | |
371 | | bool EncryptionParamsPB::MergePartialFromCodedStream( |
372 | 55 | ::google::protobuf::io::CodedInputStream* input) { |
373 | 196 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
374 | 55 | ::google::protobuf::uint32 tag; |
375 | | // @@protoc_insertion_point(parse_start:yb.encryption.EncryptionParamsPB) |
376 | 251 | for (;;) { |
377 | 251 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
378 | 251 | tag = p.first; |
379 | 251 | if (!p.second) goto handle_unusual; |
380 | 196 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
381 | | // bytes data_key = 1; |
382 | 55 | case 1: { |
383 | 55 | if (static_cast< ::google::protobuf::uint8>(tag) == |
384 | 55 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
385 | 55 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
386 | 55 | input, this->mutable_data_key())); |
387 | 0 | } else { |
388 | 0 | goto handle_unusual; |
389 | 0 | } |
390 | 55 | break; |
391 | 55 | } |
392 | | |
393 | | // bytes nonce = 2; |
394 | 55 | case 2: { |
395 | 55 | if (static_cast< ::google::protobuf::uint8>(tag) == |
396 | 55 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
397 | 55 | DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( |
398 | 55 | input, this->mutable_nonce())); |
399 | 0 | } else { |
400 | 0 | goto handle_unusual; |
401 | 0 | } |
402 | 55 | break; |
403 | 55 | } |
404 | | |
405 | | // int32 counter = 3; |
406 | 55 | case 3: { |
407 | 55 | if (static_cast< ::google::protobuf::uint8>(tag) == |
408 | 55 | static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { |
409 | | |
410 | 55 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
411 | 55 | ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( |
412 | 55 | input, &counter_))); |
413 | 0 | } else { |
414 | 0 | goto handle_unusual; |
415 | 0 | } |
416 | 55 | break; |
417 | 55 | } |
418 | | |
419 | | // bool openssl_compatible_counter_overflow = 4; |
420 | 31 | 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 | 0 | } else { |
428 | 0 | goto handle_unusual; |
429 | 0 | } |
430 | 31 | break; |
431 | 55 | } |
432 | | |
433 | 0 | default: { |
434 | 55 | handle_unusual: |
435 | 55 | if (tag == 0) { |
436 | 55 | goto success; |
437 | 55 | } |
438 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
439 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
440 | 0 | break; |
441 | 0 | } |
442 | 196 | } |
443 | 196 | } |
444 | 55 | success: |
445 | | // @@protoc_insertion_point(parse_success:yb.encryption.EncryptionParamsPB) |
446 | 55 | return true; |
447 | 0 | failure: |
448 | | // @@protoc_insertion_point(parse_failure:yb.encryption.EncryptionParamsPB) |
449 | 0 | return false; |
450 | 55 | #undef DO_ |
451 | 55 | } |
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 | 52 | bool deterministic, ::google::protobuf::uint8* target) const { |
490 | 52 | (void)deterministic; // Unused |
491 | | // @@protoc_insertion_point(serialize_to_array_start:yb.encryption.EncryptionParamsPB) |
492 | 52 | ::google::protobuf::uint32 cached_has_bits = 0; |
493 | 52 | (void) cached_has_bits; |
494 | | |
495 | | // bytes data_key = 1; |
496 | 52 | if (this->data_key().size() > 0) { |
497 | 52 | target = |
498 | 52 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
499 | 52 | 1, this->data_key(), target); |
500 | 52 | } |
501 | | |
502 | | // bytes nonce = 2; |
503 | 52 | if (this->nonce().size() > 0) { |
504 | 52 | target = |
505 | 52 | ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( |
506 | 52 | 2, this->nonce(), target); |
507 | 52 | } |
508 | | |
509 | | // int32 counter = 3; |
510 | 52 | if (this->counter() != 0) { |
511 | 52 | target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->counter(), target); |
512 | 52 | } |
513 | | |
514 | | // bool openssl_compatible_counter_overflow = 4; |
515 | 52 | 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 | 52 | if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { |
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 | 52 | return target; |
525 | 52 | } |
526 | | |
527 | 56 | size_t EncryptionParamsPB::ByteSizeLong() const { |
528 | | // @@protoc_insertion_point(message_byte_size_start:yb.encryption.EncryptionParamsPB) |
529 | 56 | size_t total_size = 0; |
530 | | |
531 | 56 | if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { |
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 | 56 | if (this->data_key().size() > 0) { |
538 | 56 | total_size += 1 + |
539 | 56 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
540 | 56 | this->data_key()); |
541 | 56 | } |
542 | | |
543 | | // bytes nonce = 2; |
544 | 56 | if (this->nonce().size() > 0) { |
545 | 56 | total_size += 1 + |
546 | 56 | ::google::protobuf::internal::WireFormatLite::BytesSize( |
547 | 56 | this->nonce()); |
548 | 56 | } |
549 | | |
550 | | // int32 counter = 3; |
551 | 56 | if (this->counter() != 0) { |
552 | 56 | total_size += 1 + |
553 | 56 | ::google::protobuf::internal::WireFormatLite::Int32Size( |
554 | 56 | this->counter()); |
555 | 56 | } |
556 | | |
557 | | // bool openssl_compatible_counter_overflow = 4; |
558 | 56 | if (this->openssl_compatible_counter_overflow() != 0) { |
559 | 35 | total_size += 1 + 1; |
560 | 35 | } |
561 | | |
562 | 56 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
563 | 56 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
564 | 56 | _cached_size_ = cached_size; |
565 | 56 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
566 | 56 | return total_size; |
567 | 56 | } |
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 | 36 | void EncryptionParamsPB::MergeFrom(const EncryptionParamsPB& from) { |
585 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.encryption.EncryptionParamsPB) |
586 | 36 | GOOGLE_DCHECK_NE(&from, this); |
587 | 36 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
588 | 36 | ::google::protobuf::uint32 cached_has_bits = 0; |
589 | 36 | (void) cached_has_bits; |
590 | | |
591 | 36 | if (from.data_key().size() > 0) { |
592 | | |
593 | 36 | data_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_key_); |
594 | 36 | } |
595 | 36 | if (from.nonce().size() > 0) { |
596 | | |
597 | 36 | nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.nonce_); |
598 | 36 | } |
599 | 36 | if (from.counter() != 0) { |
600 | 36 | set_counter(from.counter()); |
601 | 36 | } |
602 | 36 | if (from.openssl_compatible_counter_overflow() != 0) { |
603 | 6 | set_openssl_compatible_counter_overflow(from.openssl_compatible_counter_overflow()); |
604 | 6 | } |
605 | 36 | } |
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 | 36 | void EncryptionParamsPB::CopyFrom(const EncryptionParamsPB& from) { |
615 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.encryption.EncryptionParamsPB) |
616 | 36 | if (&from == this) return; |
617 | 36 | Clear(); |
618 | 36 | MergeFrom(from); |
619 | 36 | } |
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 | 17.2k | UniverseKeysPB_MapEntry_DoNotUse::UniverseKeysPB_MapEntry_DoNotUse() {} |
648 | 0 | 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 | 17.2k | void UniverseKeysPB::InitAsDefaultInstance() { |
665 | 17.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 | 41.0k | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
672 | 23.6k | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
673 | 23.6k | ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeysPB(); |
674 | 23.6k | } |
675 | 41.0k | SharedCtor(); |
676 | | // @@protoc_insertion_point(constructor:yb.encryption.UniverseKeysPB) |
677 | 41.0k | } |
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 | 41.0k | void UniverseKeysPB::SharedCtor() { |
688 | 41.0k | _cached_size_ = 0; |
689 | 41.0k | } |
690 | | |
691 | 18.4k | UniverseKeysPB::~UniverseKeysPB() { |
692 | | // @@protoc_insertion_point(destructor:yb.encryption.UniverseKeysPB) |
693 | 18.4k | SharedDtor(); |
694 | 18.4k | } |
695 | | |
696 | 18.4k | void UniverseKeysPB::SharedDtor() { |
697 | 18.4k | } |
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 | 9.16k | void UniverseKeysPB::Clear() { |
723 | | // @@protoc_insertion_point(message_clear_start:yb.encryption.UniverseKeysPB) |
724 | 9.16k | ::google::protobuf::uint32 cached_has_bits = 0; |
725 | | // Prevent compiler warnings about cached_has_bits being unused |
726 | 9.16k | (void) cached_has_bits; |
727 | | |
728 | 9.16k | map_.Clear(); |
729 | 9.16k | _internal_metadata_.Clear(); |
730 | 9.16k | } |
731 | | |
732 | | bool UniverseKeysPB::MergePartialFromCodedStream( |
733 | 9.17k | ::google::protobuf::io::CodedInputStream* input) { |
734 | 102 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
735 | 9.17k | ::google::protobuf::uint32 tag; |
736 | | // @@protoc_insertion_point(parse_start:yb.encryption.UniverseKeysPB) |
737 | 9.19k | for (;;) { |
738 | 9.19k | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
739 | 9.19k | tag = p.first; |
740 | 9.19k | if (!p.second) goto handle_unusual; |
741 | 73 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
742 | | // map<string, bytes> map = 1; |
743 | 18 | case 1: { |
744 | 18 | if (static_cast< ::google::protobuf::uint8>(tag) == |
745 | 18 | static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { |
746 | 18 | UniverseKeysPB_MapEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< |
747 | 18 | UniverseKeysPB_MapEntry_DoNotUse, |
748 | 18 | ::std::string, ::std::string, |
749 | 18 | ::google::protobuf::internal::WireFormatLite::TYPE_STRING, |
750 | 18 | ::google::protobuf::internal::WireFormatLite::TYPE_BYTES, |
751 | 18 | 0 >, |
752 | 18 | ::google::protobuf::Map< ::std::string, ::std::string > > parser(&map_); |
753 | 18 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
754 | 18 | input, &parser)); |
755 | 18 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
756 | 18 | parser.key().data(), static_cast<int>(parser.key().length()), |
757 | 18 | ::google::protobuf::internal::WireFormatLite::PARSE, |
758 | 18 | "yb.encryption.UniverseKeysPB.MapEntry.key")); |
759 | 0 | } else { |
760 | 0 | goto handle_unusual; |
761 | 0 | } |
762 | 18 | break; |
763 | 9.16k | } |
764 | | |
765 | 0 | default: { |
766 | 9.16k | handle_unusual: |
767 | 9.16k | if (tag == 0) { |
768 | 9.13k | goto success; |
769 | 9.13k | } |
770 | 33 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
771 | 33 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
772 | 33 | break; |
773 | 33 | } |
774 | 73 | } |
775 | 73 | } |
776 | 9.13k | success: |
777 | | // @@protoc_insertion_point(parse_success:yb.encryption.UniverseKeysPB) |
778 | 9.13k | return true; |
779 | 0 | failure: |
780 | | // @@protoc_insertion_point(parse_failure:yb.encryption.UniverseKeysPB) |
781 | 0 | return false; |
782 | 9.17k | #undef DO_ |
783 | 9.17k | } |
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 | 9.16k | bool deterministic, ::google::protobuf::uint8* target) const { |
849 | 9.16k | (void)deterministic; // Unused |
850 | | // @@protoc_insertion_point(serialize_to_array_start:yb.encryption.UniverseKeysPB) |
851 | 9.16k | ::google::protobuf::uint32 cached_has_bits = 0; |
852 | 9.16k | (void) cached_has_bits; |
853 | | |
854 | | // map<string, bytes> map = 1; |
855 | 9.16k | if (!this->map().empty()) { |
856 | 0 | typedef ::google::protobuf::Map< ::std::string, ::std::string >::const_pointer |
857 | 0 | ConstPtr; |
858 | 0 | typedef ConstPtr SortItem; |
859 | 0 | typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; |
860 | 0 | struct Utf8Check { |
861 | 0 | static void Check(ConstPtr p) { |
862 | 0 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
863 | 0 | p->first.data(), static_cast<int>(p->first.length()), |
864 | 0 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
865 | 0 | "yb.encryption.UniverseKeysPB.MapEntry.key"); |
866 | 0 | } |
867 | 0 | }; |
868 | |
|
869 | 0 | if (deterministic && |
870 | 0 | this->map().size() > 1) { |
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 | 0 | } else { |
892 | 0 | ::google::protobuf::scoped_ptr<UniverseKeysPB_MapEntry_DoNotUse> entry; |
893 | 0 | for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator |
894 | 0 | it = this->map().begin(); |
895 | 0 | it != this->map().end(); ++it) { |
896 | 0 | entry.reset(map_.NewEntryWrapper( |
897 | 0 | it->first, it->second)); |
898 | 0 | target = ::google::protobuf::internal::WireFormatLite:: |
899 | 0 | InternalWriteMessageNoVirtualToArray( |
900 | 0 | 1, *entry, deterministic, target); |
901 | 0 | ; |
902 | 0 | Utf8Check::Check(&*it); |
903 | 0 | } |
904 | 0 | } |
905 | 0 | } |
906 | | |
907 | 9.16k | if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { |
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 | 9.16k | return target; |
913 | 9.16k | } |
914 | | |
915 | 18.3k | size_t UniverseKeysPB::ByteSizeLong() const { |
916 | | // @@protoc_insertion_point(message_byte_size_start:yb.encryption.UniverseKeysPB) |
917 | 18.3k | size_t total_size = 0; |
918 | | |
919 | 18.3k | if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { |
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 | 18.3k | total_size += 1 * |
926 | 18.3k | ::google::protobuf::internal::FromIntSize(this->map_size()); |
927 | 18.3k | { |
928 | 18.3k | ::google::protobuf::scoped_ptr<UniverseKeysPB_MapEntry_DoNotUse> entry; |
929 | 18.3k | for (::google::protobuf::Map< ::std::string, ::std::string >::const_iterator |
930 | 18.3k | it = this->map().begin(); |
931 | 18.3k | it != this->map().end(); ++it) { |
932 | 0 | entry.reset(map_.NewEntryWrapper(it->first, it->second)); |
933 | 0 | total_size += ::google::protobuf::internal::WireFormatLite:: |
934 | 0 | MessageSizeNoVirtual(*entry); |
935 | 0 | } |
936 | 18.3k | } |
937 | | |
938 | 18.3k | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
939 | 18.3k | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
940 | 18.3k | _cached_size_ = cached_size; |
941 | 18.3k | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
942 | 18.3k | return total_size; |
943 | 18.3k | } |
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 | 9.16k | void UniverseKeysPB::MergeFrom(const UniverseKeysPB& from) { |
961 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.encryption.UniverseKeysPB) |
962 | 9.16k | GOOGLE_DCHECK_NE(&from, this); |
963 | 9.16k | _internal_metadata_.MergeFrom(from._internal_metadata_); |
964 | 9.16k | ::google::protobuf::uint32 cached_has_bits = 0; |
965 | 9.16k | (void) cached_has_bits; |
966 | | |
967 | 9.16k | map_.MergeFrom(from.map_); |
968 | 9.16k | } |
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 | 9.16k | void UniverseKeysPB::CopyFrom(const UniverseKeysPB& from) { |
978 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.encryption.UniverseKeysPB) |
979 | 9.16k | if (&from == this) return; |
980 | 9.16k | Clear(); |
981 | 9.16k | MergeFrom(from); |
982 | 9.16k | } |
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 | 18 | ::google::protobuf::Metadata UniverseKeysPB::GetMetadata() const { |
1000 | 18 | protobuf_yb_2fencryption_2fencryption_2eproto::protobuf_AssignDescriptorsOnce(); |
1001 | 18 | return ::protobuf_yb_2fencryption_2fencryption_2eproto::file_level_metadata[kIndexInFileMessages]; |
1002 | 18 | } |
1003 | | |
1004 | | |
1005 | | // =================================================================== |
1006 | | |
1007 | 17.2k | UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse() {} |
1008 | 30 | 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 | 17.2k | void UniverseKeyRegistryPB::InitAsDefaultInstance() { |
1025 | 17.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 | 23.4k | : ::google::protobuf::Message(), _internal_metadata_(NULL) { |
1034 | 6.17k | if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { |
1035 | 6.17k | ::protobuf_yb_2fencryption_2fencryption_2eproto::InitDefaultsUniverseKeyRegistryPB(); |
1036 | 6.17k | } |
1037 | 23.4k | SharedCtor(); |
1038 | | // @@protoc_insertion_point(constructor:yb.encryption.UniverseKeyRegistryPB) |
1039 | 23.4k | } |
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 | 23.4k | void UniverseKeyRegistryPB::SharedCtor() { |
1055 | 23.4k | latest_version_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1056 | 23.4k | encryption_enabled_ = false; |
1057 | 23.4k | _cached_size_ = 0; |
1058 | 23.4k | } |
1059 | | |
1060 | 181 | UniverseKeyRegistryPB::~UniverseKeyRegistryPB() { |
1061 | | // @@protoc_insertion_point(destructor:yb.encryption.UniverseKeyRegistryPB) |
1062 | 181 | SharedDtor(); |
1063 | 181 | } |
1064 | | |
1065 | 181 | void UniverseKeyRegistryPB::SharedDtor() { |
1066 | 181 | latest_version_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1067 | 181 | } |
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 | 32 | void UniverseKeyRegistryPB::Clear() { |
1093 | | // @@protoc_insertion_point(message_clear_start:yb.encryption.UniverseKeyRegistryPB) |
1094 | 32 | ::google::protobuf::uint32 cached_has_bits = 0; |
1095 | | // Prevent compiler warnings about cached_has_bits being unused |
1096 | 32 | (void) cached_has_bits; |
1097 | | |
1098 | 32 | universe_keys_.Clear(); |
1099 | 32 | latest_version_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); |
1100 | 32 | encryption_enabled_ = false; |
1101 | 32 | _internal_metadata_.Clear(); |
1102 | 32 | } |
1103 | | |
1104 | | bool UniverseKeyRegistryPB::MergePartialFromCodedStream( |
1105 | 18 | ::google::protobuf::io::CodedInputStream* input) { |
1106 | 85 | #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure |
1107 | 18 | ::google::protobuf::uint32 tag; |
1108 | | // @@protoc_insertion_point(parse_start:yb.encryption.UniverseKeyRegistryPB) |
1109 | 68 | for (;;) { |
1110 | 68 | ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1111 | 68 | tag = p.first; |
1112 | 68 | if (!p.second) goto handle_unusual; |
1113 | 50 | switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1114 | | // bool encryption_enabled = 1; |
1115 | 15 | case 1: { |
1116 | 15 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1117 | 15 | static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { |
1118 | | |
1119 | 15 | DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< |
1120 | 15 | bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( |
1121 | 15 | input, &encryption_enabled_))); |
1122 | 0 | } else { |
1123 | 0 | goto handle_unusual; |
1124 | 0 | } |
1125 | 15 | break; |
1126 | 15 | } |
1127 | | |
1128 | | // map<string, .yb.encryption.EncryptionParamsPB> universe_keys = 2; |
1129 | 20 | case 2: { |
1130 | 20 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1131 | 20 | static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { |
1132 | 20 | UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< |
1133 | 20 | UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse, |
1134 | 20 | ::std::string, ::yb::encryption::EncryptionParamsPB, |
1135 | 20 | ::google::protobuf::internal::WireFormatLite::TYPE_STRING, |
1136 | 20 | ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, |
1137 | 20 | 0 >, |
1138 | 20 | ::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB > > parser(&universe_keys_); |
1139 | 20 | DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( |
1140 | 20 | input, &parser)); |
1141 | 20 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
1142 | 20 | parser.key().data(), static_cast<int>(parser.key().length()), |
1143 | 20 | ::google::protobuf::internal::WireFormatLite::PARSE, |
1144 | 20 | "yb.encryption.UniverseKeyRegistryPB.UniverseKeysEntry.key")); |
1145 | 0 | } else { |
1146 | 0 | goto handle_unusual; |
1147 | 0 | } |
1148 | 20 | break; |
1149 | 20 | } |
1150 | | |
1151 | | // string latest_version_id = 3; |
1152 | 15 | case 3: { |
1153 | 15 | if (static_cast< ::google::protobuf::uint8>(tag) == |
1154 | 15 | static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { |
1155 | 15 | DO_(::google::protobuf::internal::WireFormatLite::ReadString( |
1156 | 15 | input, this->mutable_latest_version_id())); |
1157 | 15 | DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
1158 | 15 | this->latest_version_id().data(), static_cast<int>(this->latest_version_id().length()), |
1159 | 15 | ::google::protobuf::internal::WireFormatLite::PARSE, |
1160 | 15 | "yb.encryption.UniverseKeyRegistryPB.latest_version_id")); |
1161 | 0 | } else { |
1162 | 0 | goto handle_unusual; |
1163 | 0 | } |
1164 | 15 | break; |
1165 | 18 | } |
1166 | | |
1167 | 0 | default: { |
1168 | 18 | handle_unusual: |
1169 | 18 | if (tag == 0) { |
1170 | 18 | goto success; |
1171 | 18 | } |
1172 | 0 | DO_(::google::protobuf::internal::WireFormat::SkipField( |
1173 | 0 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1174 | 0 | break; |
1175 | 0 | } |
1176 | 50 | } |
1177 | 50 | } |
1178 | 18 | success: |
1179 | | // @@protoc_insertion_point(parse_success:yb.encryption.UniverseKeyRegistryPB) |
1180 | 18 | return true; |
1181 | 0 | failure: |
1182 | | // @@protoc_insertion_point(parse_failure:yb.encryption.UniverseKeyRegistryPB) |
1183 | 0 | return false; |
1184 | 18 | #undef DO_ |
1185 | 18 | } |
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 | 9 | bool deterministic, ::google::protobuf::uint8* target) const { |
1266 | 9 | (void)deterministic; // Unused |
1267 | | // @@protoc_insertion_point(serialize_to_array_start:yb.encryption.UniverseKeyRegistryPB) |
1268 | 9 | ::google::protobuf::uint32 cached_has_bits = 0; |
1269 | 9 | (void) cached_has_bits; |
1270 | | |
1271 | | // bool encryption_enabled = 1; |
1272 | 9 | if (this->encryption_enabled() != 0) { |
1273 | 9 | target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->encryption_enabled(), target); |
1274 | 9 | } |
1275 | | |
1276 | | // map<string, .yb.encryption.EncryptionParamsPB> universe_keys = 2; |
1277 | 9 | if (!this->universe_keys().empty()) { |
1278 | 9 | typedef ::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_pointer |
1279 | 9 | ConstPtr; |
1280 | 9 | typedef ConstPtr SortItem; |
1281 | 9 | typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less; |
1282 | 9 | struct Utf8Check { |
1283 | 13 | static void Check(ConstPtr p) { |
1284 | 13 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
1285 | 13 | p->first.data(), static_cast<int>(p->first.length()), |
1286 | 13 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
1287 | 13 | "yb.encryption.UniverseKeyRegistryPB.UniverseKeysEntry.key"); |
1288 | 13 | } |
1289 | 9 | }; |
1290 | | |
1291 | 9 | if (deterministic && |
1292 | 0 | this->universe_keys().size() > 1) { |
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 | 9 | } else { |
1314 | 9 | ::google::protobuf::scoped_ptr<UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse> entry; |
1315 | 9 | for (::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_iterator |
1316 | 9 | it = this->universe_keys().begin(); |
1317 | 22 | it != this->universe_keys().end(); ++it) { |
1318 | 13 | entry.reset(universe_keys_.NewEntryWrapper( |
1319 | 13 | it->first, it->second)); |
1320 | 13 | target = ::google::protobuf::internal::WireFormatLite:: |
1321 | 13 | InternalWriteMessageNoVirtualToArray( |
1322 | 13 | 2, *entry, deterministic, target); |
1323 | 13 | ; |
1324 | 13 | Utf8Check::Check(&*it); |
1325 | 13 | } |
1326 | 9 | } |
1327 | 9 | } |
1328 | | |
1329 | | // string latest_version_id = 3; |
1330 | 9 | if (this->latest_version_id().size() > 0) { |
1331 | 9 | ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( |
1332 | 9 | this->latest_version_id().data(), static_cast<int>(this->latest_version_id().length()), |
1333 | 9 | ::google::protobuf::internal::WireFormatLite::SERIALIZE, |
1334 | 9 | "yb.encryption.UniverseKeyRegistryPB.latest_version_id"); |
1335 | 9 | target = |
1336 | 9 | ::google::protobuf::internal::WireFormatLite::WriteStringToArray( |
1337 | 9 | 3, this->latest_version_id(), target); |
1338 | 9 | } |
1339 | | |
1340 | 9 | if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { |
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 | 9 | return target; |
1346 | 9 | } |
1347 | | |
1348 | 12 | size_t UniverseKeyRegistryPB::ByteSizeLong() const { |
1349 | | // @@protoc_insertion_point(message_byte_size_start:yb.encryption.UniverseKeyRegistryPB) |
1350 | 12 | size_t total_size = 0; |
1351 | | |
1352 | 12 | if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { |
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 | 12 | total_size += 1 * |
1359 | 12 | ::google::protobuf::internal::FromIntSize(this->universe_keys_size()); |
1360 | 12 | { |
1361 | 12 | ::google::protobuf::scoped_ptr<UniverseKeyRegistryPB_UniverseKeysEntry_DoNotUse> entry; |
1362 | 12 | for (::google::protobuf::Map< ::std::string, ::yb::encryption::EncryptionParamsPB >::const_iterator |
1363 | 12 | it = this->universe_keys().begin(); |
1364 | 29 | it != this->universe_keys().end(); ++it) { |
1365 | 17 | entry.reset(universe_keys_.NewEntryWrapper(it->first, it->second)); |
1366 | 17 | total_size += ::google::protobuf::internal::WireFormatLite:: |
1367 | 17 | MessageSizeNoVirtual(*entry); |
1368 | 17 | } |
1369 | 12 | } |
1370 | | |
1371 | | // string latest_version_id = 3; |
1372 | 12 | if (this->latest_version_id().size() > 0) { |
1373 | 12 | total_size += 1 + |
1374 | 12 | ::google::protobuf::internal::WireFormatLite::StringSize( |
1375 | 12 | this->latest_version_id()); |
1376 | 12 | } |
1377 | | |
1378 | | // bool encryption_enabled = 1; |
1379 | 12 | if (this->encryption_enabled() != 0) { |
1380 | 12 | total_size += 1 + 1; |
1381 | 12 | } |
1382 | | |
1383 | 12 | int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); |
1384 | 12 | GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); |
1385 | 12 | _cached_size_ = cached_size; |
1386 | 12 | GOOGLE_SAFE_CONCURRENT_WRITES_END(); |
1387 | 12 | return total_size; |
1388 | 12 | } |
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 | 17 | void UniverseKeyRegistryPB::MergeFrom(const UniverseKeyRegistryPB& from) { |
1406 | | // @@protoc_insertion_point(class_specific_merge_from_start:yb.encryption.UniverseKeyRegistryPB) |
1407 | 17 | GOOGLE_DCHECK_NE(&from, this); |
1408 | 17 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1409 | 17 | ::google::protobuf::uint32 cached_has_bits = 0; |
1410 | 17 | (void) cached_has_bits; |
1411 | | |
1412 | 17 | universe_keys_.MergeFrom(from.universe_keys_); |
1413 | 17 | if (from.latest_version_id().size() > 0) { |
1414 | | |
1415 | 17 | latest_version_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.latest_version_id_); |
1416 | 17 | } |
1417 | 17 | if (from.encryption_enabled() != 0) { |
1418 | 17 | set_encryption_enabled(from.encryption_enabled()); |
1419 | 17 | } |
1420 | 17 | } |
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 | 17 | void UniverseKeyRegistryPB::CopyFrom(const UniverseKeyRegistryPB& from) { |
1430 | | // @@protoc_insertion_point(class_specific_copy_from_start:yb.encryption.UniverseKeyRegistryPB) |
1431 | 17 | if (&from == this) return; |
1432 | 17 | Clear(); |
1433 | 17 | MergeFrom(from); |
1434 | 17 | } |
1435 | | |
1436 | 21 | bool UniverseKeyRegistryPB::IsInitialized() const { |
1437 | 21 | return true; |
1438 | 21 | } |
1439 | | |
1440 | 0 | void UniverseKeyRegistryPB::Swap(UniverseKeyRegistryPB* other) { |
1441 | 0 | if (other == this) return; |
1442 | 0 | InternalSwap(other); |
1443 | 0 | } |
1444 | 30 | void UniverseKeyRegistryPB::InternalSwap(UniverseKeyRegistryPB* other) { |
1445 | 30 | using std::swap; |
1446 | 30 | universe_keys_.Swap(&other->universe_keys_); |
1447 | 30 | latest_version_id_.Swap(&other->latest_version_id_); |
1448 | 30 | swap(encryption_enabled_, other->encryption_enabled_); |
1449 | 30 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1450 | 30 | swap(_cached_size_, other->_cached_size_); |
1451 | 30 | } |
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) |