github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/c-deps/libroach/protosccl/ccl/baseccl/encryption_options.pb.cc (about) 1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: ccl/baseccl/encryption_options.proto 3 4 #include "ccl/baseccl/encryption_options.pb.h" 5 6 #include <algorithm> 7 8 #include <google/protobuf/stubs/common.h> 9 #include <google/protobuf/stubs/port.h> 10 #include <google/protobuf/io/coded_stream.h> 11 #include <google/protobuf/wire_format_lite_inl.h> 12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h> 13 // This is a temporary google only hack 14 #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS 15 #include "third_party/protobuf/version.h" 16 #endif 17 // @@protoc_insertion_point(includes) 18 19 namespace protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto { 20 extern PROTOBUF_INTERNAL_EXPORT_protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_EncryptionKeyFiles; 21 } // namespace protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto 22 namespace cockroach { 23 namespace ccl { 24 namespace baseccl { 25 class EncryptionKeyFilesDefaultTypeInternal { 26 public: 27 ::google::protobuf::internal::ExplicitlyConstructed<EncryptionKeyFiles> 28 _instance; 29 } _EncryptionKeyFiles_default_instance_; 30 class EncryptionOptionsDefaultTypeInternal { 31 public: 32 ::google::protobuf::internal::ExplicitlyConstructed<EncryptionOptions> 33 _instance; 34 } _EncryptionOptions_default_instance_; 35 } // namespace baseccl 36 } // namespace ccl 37 } // namespace cockroach 38 namespace protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto { 39 static void InitDefaultsEncryptionKeyFiles() { 40 GOOGLE_PROTOBUF_VERIFY_VERSION; 41 42 { 43 void* ptr = &::cockroach::ccl::baseccl::_EncryptionKeyFiles_default_instance_; 44 new (ptr) ::cockroach::ccl::baseccl::EncryptionKeyFiles(); 45 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 46 } 47 ::cockroach::ccl::baseccl::EncryptionKeyFiles::InitAsDefaultInstance(); 48 } 49 50 ::google::protobuf::internal::SCCInfo<0> scc_info_EncryptionKeyFiles = 51 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEncryptionKeyFiles}, {}}; 52 53 static void InitDefaultsEncryptionOptions() { 54 GOOGLE_PROTOBUF_VERIFY_VERSION; 55 56 { 57 void* ptr = &::cockroach::ccl::baseccl::_EncryptionOptions_default_instance_; 58 new (ptr) ::cockroach::ccl::baseccl::EncryptionOptions(); 59 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 60 } 61 ::cockroach::ccl::baseccl::EncryptionOptions::InitAsDefaultInstance(); 62 } 63 64 ::google::protobuf::internal::SCCInfo<1> scc_info_EncryptionOptions = 65 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsEncryptionOptions}, { 66 &protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto::scc_info_EncryptionKeyFiles.base,}}; 67 68 void InitDefaults() { 69 ::google::protobuf::internal::InitSCC(&scc_info_EncryptionKeyFiles.base); 70 ::google::protobuf::internal::InitSCC(&scc_info_EncryptionOptions.base); 71 } 72 73 } // namespace protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto 74 namespace cockroach { 75 namespace ccl { 76 namespace baseccl { 77 bool EncryptionKeySource_IsValid(int value) { 78 switch (value) { 79 case 0: 80 return true; 81 default: 82 return false; 83 } 84 } 85 86 87 // =================================================================== 88 89 void EncryptionKeyFiles::InitAsDefaultInstance() { 90 } 91 #if !defined(_MSC_VER) || _MSC_VER >= 1900 92 const int EncryptionKeyFiles::kCurrentKeyFieldNumber; 93 const int EncryptionKeyFiles::kOldKeyFieldNumber; 94 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 95 96 EncryptionKeyFiles::EncryptionKeyFiles() 97 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 98 ::google::protobuf::internal::InitSCC( 99 &protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto::scc_info_EncryptionKeyFiles.base); 100 SharedCtor(); 101 // @@protoc_insertion_point(constructor:cockroach.ccl.baseccl.EncryptionKeyFiles) 102 } 103 EncryptionKeyFiles::EncryptionKeyFiles(const EncryptionKeyFiles& from) 104 : ::google::protobuf::MessageLite(), 105 _internal_metadata_(NULL) { 106 _internal_metadata_.MergeFrom(from._internal_metadata_); 107 current_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 108 if (from.current_key().size() > 0) { 109 current_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.current_key_); 110 } 111 old_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 112 if (from.old_key().size() > 0) { 113 old_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.old_key_); 114 } 115 // @@protoc_insertion_point(copy_constructor:cockroach.ccl.baseccl.EncryptionKeyFiles) 116 } 117 118 void EncryptionKeyFiles::SharedCtor() { 119 current_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 120 old_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 121 } 122 123 EncryptionKeyFiles::~EncryptionKeyFiles() { 124 // @@protoc_insertion_point(destructor:cockroach.ccl.baseccl.EncryptionKeyFiles) 125 SharedDtor(); 126 } 127 128 void EncryptionKeyFiles::SharedDtor() { 129 current_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 130 old_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 131 } 132 133 void EncryptionKeyFiles::SetCachedSize(int size) const { 134 _cached_size_.Set(size); 135 } 136 const EncryptionKeyFiles& EncryptionKeyFiles::default_instance() { 137 ::google::protobuf::internal::InitSCC(&protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto::scc_info_EncryptionKeyFiles.base); 138 return *internal_default_instance(); 139 } 140 141 142 void EncryptionKeyFiles::Clear() { 143 // @@protoc_insertion_point(message_clear_start:cockroach.ccl.baseccl.EncryptionKeyFiles) 144 ::google::protobuf::uint32 cached_has_bits = 0; 145 // Prevent compiler warnings about cached_has_bits being unused 146 (void) cached_has_bits; 147 148 current_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 149 old_key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 150 _internal_metadata_.Clear(); 151 } 152 153 bool EncryptionKeyFiles::MergePartialFromCodedStream( 154 ::google::protobuf::io::CodedInputStream* input) { 155 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 156 ::google::protobuf::uint32 tag; 157 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 158 &_internal_metadata_); 159 ::google::protobuf::io::StringOutputStream unknown_fields_output( 160 unknown_fields_setter.buffer()); 161 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 162 &unknown_fields_output, false); 163 // @@protoc_insertion_point(parse_start:cockroach.ccl.baseccl.EncryptionKeyFiles) 164 for (;;) { 165 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 166 tag = p.first; 167 if (!p.second) goto handle_unusual; 168 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 169 // string current_key = 1; 170 case 1: { 171 if (static_cast< ::google::protobuf::uint8>(tag) == 172 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 173 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 174 input, this->mutable_current_key())); 175 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 176 this->current_key().data(), static_cast<int>(this->current_key().length()), 177 ::google::protobuf::internal::WireFormatLite::PARSE, 178 "cockroach.ccl.baseccl.EncryptionKeyFiles.current_key")); 179 } else { 180 goto handle_unusual; 181 } 182 break; 183 } 184 185 // string old_key = 2; 186 case 2: { 187 if (static_cast< ::google::protobuf::uint8>(tag) == 188 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 189 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 190 input, this->mutable_old_key())); 191 DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 192 this->old_key().data(), static_cast<int>(this->old_key().length()), 193 ::google::protobuf::internal::WireFormatLite::PARSE, 194 "cockroach.ccl.baseccl.EncryptionKeyFiles.old_key")); 195 } else { 196 goto handle_unusual; 197 } 198 break; 199 } 200 201 default: { 202 handle_unusual: 203 if (tag == 0) { 204 goto success; 205 } 206 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 207 input, tag, &unknown_fields_stream)); 208 break; 209 } 210 } 211 } 212 success: 213 // @@protoc_insertion_point(parse_success:cockroach.ccl.baseccl.EncryptionKeyFiles) 214 return true; 215 failure: 216 // @@protoc_insertion_point(parse_failure:cockroach.ccl.baseccl.EncryptionKeyFiles) 217 return false; 218 #undef DO_ 219 } 220 221 void EncryptionKeyFiles::SerializeWithCachedSizes( 222 ::google::protobuf::io::CodedOutputStream* output) const { 223 // @@protoc_insertion_point(serialize_start:cockroach.ccl.baseccl.EncryptionKeyFiles) 224 ::google::protobuf::uint32 cached_has_bits = 0; 225 (void) cached_has_bits; 226 227 // string current_key = 1; 228 if (this->current_key().size() > 0) { 229 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 230 this->current_key().data(), static_cast<int>(this->current_key().length()), 231 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 232 "cockroach.ccl.baseccl.EncryptionKeyFiles.current_key"); 233 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 234 1, this->current_key(), output); 235 } 236 237 // string old_key = 2; 238 if (this->old_key().size() > 0) { 239 ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( 240 this->old_key().data(), static_cast<int>(this->old_key().length()), 241 ::google::protobuf::internal::WireFormatLite::SERIALIZE, 242 "cockroach.ccl.baseccl.EncryptionKeyFiles.old_key"); 243 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 244 2, this->old_key(), output); 245 } 246 247 output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(), 248 static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size())); 249 // @@protoc_insertion_point(serialize_end:cockroach.ccl.baseccl.EncryptionKeyFiles) 250 } 251 252 size_t EncryptionKeyFiles::ByteSizeLong() const { 253 // @@protoc_insertion_point(message_byte_size_start:cockroach.ccl.baseccl.EncryptionKeyFiles) 254 size_t total_size = 0; 255 256 total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size(); 257 258 // string current_key = 1; 259 if (this->current_key().size() > 0) { 260 total_size += 1 + 261 ::google::protobuf::internal::WireFormatLite::StringSize( 262 this->current_key()); 263 } 264 265 // string old_key = 2; 266 if (this->old_key().size() > 0) { 267 total_size += 1 + 268 ::google::protobuf::internal::WireFormatLite::StringSize( 269 this->old_key()); 270 } 271 272 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 273 SetCachedSize(cached_size); 274 return total_size; 275 } 276 277 void EncryptionKeyFiles::CheckTypeAndMergeFrom( 278 const ::google::protobuf::MessageLite& from) { 279 MergeFrom(*::google::protobuf::down_cast<const EncryptionKeyFiles*>(&from)); 280 } 281 282 void EncryptionKeyFiles::MergeFrom(const EncryptionKeyFiles& from) { 283 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.ccl.baseccl.EncryptionKeyFiles) 284 GOOGLE_DCHECK_NE(&from, this); 285 _internal_metadata_.MergeFrom(from._internal_metadata_); 286 ::google::protobuf::uint32 cached_has_bits = 0; 287 (void) cached_has_bits; 288 289 if (from.current_key().size() > 0) { 290 291 current_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.current_key_); 292 } 293 if (from.old_key().size() > 0) { 294 295 old_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.old_key_); 296 } 297 } 298 299 void EncryptionKeyFiles::CopyFrom(const EncryptionKeyFiles& from) { 300 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.ccl.baseccl.EncryptionKeyFiles) 301 if (&from == this) return; 302 Clear(); 303 MergeFrom(from); 304 } 305 306 bool EncryptionKeyFiles::IsInitialized() const { 307 return true; 308 } 309 310 void EncryptionKeyFiles::Swap(EncryptionKeyFiles* other) { 311 if (other == this) return; 312 InternalSwap(other); 313 } 314 void EncryptionKeyFiles::InternalSwap(EncryptionKeyFiles* other) { 315 using std::swap; 316 current_key_.Swap(&other->current_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 317 GetArenaNoVirtual()); 318 old_key_.Swap(&other->old_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 319 GetArenaNoVirtual()); 320 _internal_metadata_.Swap(&other->_internal_metadata_); 321 } 322 323 ::std::string EncryptionKeyFiles::GetTypeName() const { 324 return "cockroach.ccl.baseccl.EncryptionKeyFiles"; 325 } 326 327 328 // =================================================================== 329 330 void EncryptionOptions::InitAsDefaultInstance() { 331 ::cockroach::ccl::baseccl::_EncryptionOptions_default_instance_._instance.get_mutable()->key_files_ = const_cast< ::cockroach::ccl::baseccl::EncryptionKeyFiles*>( 332 ::cockroach::ccl::baseccl::EncryptionKeyFiles::internal_default_instance()); 333 } 334 #if !defined(_MSC_VER) || _MSC_VER >= 1900 335 const int EncryptionOptions::kKeySourceFieldNumber; 336 const int EncryptionOptions::kKeyFilesFieldNumber; 337 const int EncryptionOptions::kDataKeyRotationPeriodFieldNumber; 338 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 339 340 EncryptionOptions::EncryptionOptions() 341 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 342 ::google::protobuf::internal::InitSCC( 343 &protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto::scc_info_EncryptionOptions.base); 344 SharedCtor(); 345 // @@protoc_insertion_point(constructor:cockroach.ccl.baseccl.EncryptionOptions) 346 } 347 EncryptionOptions::EncryptionOptions(const EncryptionOptions& from) 348 : ::google::protobuf::MessageLite(), 349 _internal_metadata_(NULL) { 350 _internal_metadata_.MergeFrom(from._internal_metadata_); 351 if (from.has_key_files()) { 352 key_files_ = new ::cockroach::ccl::baseccl::EncryptionKeyFiles(*from.key_files_); 353 } else { 354 key_files_ = NULL; 355 } 356 ::memcpy(&data_key_rotation_period_, &from.data_key_rotation_period_, 357 static_cast<size_t>(reinterpret_cast<char*>(&key_source_) - 358 reinterpret_cast<char*>(&data_key_rotation_period_)) + sizeof(key_source_)); 359 // @@protoc_insertion_point(copy_constructor:cockroach.ccl.baseccl.EncryptionOptions) 360 } 361 362 void EncryptionOptions::SharedCtor() { 363 ::memset(&key_files_, 0, static_cast<size_t>( 364 reinterpret_cast<char*>(&key_source_) - 365 reinterpret_cast<char*>(&key_files_)) + sizeof(key_source_)); 366 } 367 368 EncryptionOptions::~EncryptionOptions() { 369 // @@protoc_insertion_point(destructor:cockroach.ccl.baseccl.EncryptionOptions) 370 SharedDtor(); 371 } 372 373 void EncryptionOptions::SharedDtor() { 374 if (this != internal_default_instance()) delete key_files_; 375 } 376 377 void EncryptionOptions::SetCachedSize(int size) const { 378 _cached_size_.Set(size); 379 } 380 const EncryptionOptions& EncryptionOptions::default_instance() { 381 ::google::protobuf::internal::InitSCC(&protobuf_ccl_2fbaseccl_2fencryption_5foptions_2eproto::scc_info_EncryptionOptions.base); 382 return *internal_default_instance(); 383 } 384 385 386 void EncryptionOptions::Clear() { 387 // @@protoc_insertion_point(message_clear_start:cockroach.ccl.baseccl.EncryptionOptions) 388 ::google::protobuf::uint32 cached_has_bits = 0; 389 // Prevent compiler warnings about cached_has_bits being unused 390 (void) cached_has_bits; 391 392 if (GetArenaNoVirtual() == NULL && key_files_ != NULL) { 393 delete key_files_; 394 } 395 key_files_ = NULL; 396 ::memset(&data_key_rotation_period_, 0, static_cast<size_t>( 397 reinterpret_cast<char*>(&key_source_) - 398 reinterpret_cast<char*>(&data_key_rotation_period_)) + sizeof(key_source_)); 399 _internal_metadata_.Clear(); 400 } 401 402 bool EncryptionOptions::MergePartialFromCodedStream( 403 ::google::protobuf::io::CodedInputStream* input) { 404 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 405 ::google::protobuf::uint32 tag; 406 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 407 &_internal_metadata_); 408 ::google::protobuf::io::StringOutputStream unknown_fields_output( 409 unknown_fields_setter.buffer()); 410 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 411 &unknown_fields_output, false); 412 // @@protoc_insertion_point(parse_start:cockroach.ccl.baseccl.EncryptionOptions) 413 for (;;) { 414 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 415 tag = p.first; 416 if (!p.second) goto handle_unusual; 417 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 418 // .cockroach.ccl.baseccl.EncryptionKeySource key_source = 1; 419 case 1: { 420 if (static_cast< ::google::protobuf::uint8>(tag) == 421 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 422 int value; 423 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 424 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( 425 input, &value))); 426 set_key_source(static_cast< ::cockroach::ccl::baseccl::EncryptionKeySource >(value)); 427 } else { 428 goto handle_unusual; 429 } 430 break; 431 } 432 433 // .cockroach.ccl.baseccl.EncryptionKeyFiles key_files = 2; 434 case 2: { 435 if (static_cast< ::google::protobuf::uint8>(tag) == 436 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 437 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 438 input, mutable_key_files())); 439 } else { 440 goto handle_unusual; 441 } 442 break; 443 } 444 445 // int64 data_key_rotation_period = 3; 446 case 3: { 447 if (static_cast< ::google::protobuf::uint8>(tag) == 448 static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { 449 450 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 451 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 452 input, &data_key_rotation_period_))); 453 } else { 454 goto handle_unusual; 455 } 456 break; 457 } 458 459 default: { 460 handle_unusual: 461 if (tag == 0) { 462 goto success; 463 } 464 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 465 input, tag, &unknown_fields_stream)); 466 break; 467 } 468 } 469 } 470 success: 471 // @@protoc_insertion_point(parse_success:cockroach.ccl.baseccl.EncryptionOptions) 472 return true; 473 failure: 474 // @@protoc_insertion_point(parse_failure:cockroach.ccl.baseccl.EncryptionOptions) 475 return false; 476 #undef DO_ 477 } 478 479 void EncryptionOptions::SerializeWithCachedSizes( 480 ::google::protobuf::io::CodedOutputStream* output) const { 481 // @@protoc_insertion_point(serialize_start:cockroach.ccl.baseccl.EncryptionOptions) 482 ::google::protobuf::uint32 cached_has_bits = 0; 483 (void) cached_has_bits; 484 485 // .cockroach.ccl.baseccl.EncryptionKeySource key_source = 1; 486 if (this->key_source() != 0) { 487 ::google::protobuf::internal::WireFormatLite::WriteEnum( 488 1, this->key_source(), output); 489 } 490 491 // .cockroach.ccl.baseccl.EncryptionKeyFiles key_files = 2; 492 if (this->has_key_files()) { 493 ::google::protobuf::internal::WireFormatLite::WriteMessage( 494 2, this->_internal_key_files(), output); 495 } 496 497 // int64 data_key_rotation_period = 3; 498 if (this->data_key_rotation_period() != 0) { 499 ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->data_key_rotation_period(), output); 500 } 501 502 output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).data(), 503 static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size())); 504 // @@protoc_insertion_point(serialize_end:cockroach.ccl.baseccl.EncryptionOptions) 505 } 506 507 size_t EncryptionOptions::ByteSizeLong() const { 508 // @@protoc_insertion_point(message_byte_size_start:cockroach.ccl.baseccl.EncryptionOptions) 509 size_t total_size = 0; 510 511 total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()).size(); 512 513 // .cockroach.ccl.baseccl.EncryptionKeyFiles key_files = 2; 514 if (this->has_key_files()) { 515 total_size += 1 + 516 ::google::protobuf::internal::WireFormatLite::MessageSize( 517 *key_files_); 518 } 519 520 // int64 data_key_rotation_period = 3; 521 if (this->data_key_rotation_period() != 0) { 522 total_size += 1 + 523 ::google::protobuf::internal::WireFormatLite::Int64Size( 524 this->data_key_rotation_period()); 525 } 526 527 // .cockroach.ccl.baseccl.EncryptionKeySource key_source = 1; 528 if (this->key_source() != 0) { 529 total_size += 1 + 530 ::google::protobuf::internal::WireFormatLite::EnumSize(this->key_source()); 531 } 532 533 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 534 SetCachedSize(cached_size); 535 return total_size; 536 } 537 538 void EncryptionOptions::CheckTypeAndMergeFrom( 539 const ::google::protobuf::MessageLite& from) { 540 MergeFrom(*::google::protobuf::down_cast<const EncryptionOptions*>(&from)); 541 } 542 543 void EncryptionOptions::MergeFrom(const EncryptionOptions& from) { 544 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.ccl.baseccl.EncryptionOptions) 545 GOOGLE_DCHECK_NE(&from, this); 546 _internal_metadata_.MergeFrom(from._internal_metadata_); 547 ::google::protobuf::uint32 cached_has_bits = 0; 548 (void) cached_has_bits; 549 550 if (from.has_key_files()) { 551 mutable_key_files()->::cockroach::ccl::baseccl::EncryptionKeyFiles::MergeFrom(from.key_files()); 552 } 553 if (from.data_key_rotation_period() != 0) { 554 set_data_key_rotation_period(from.data_key_rotation_period()); 555 } 556 if (from.key_source() != 0) { 557 set_key_source(from.key_source()); 558 } 559 } 560 561 void EncryptionOptions::CopyFrom(const EncryptionOptions& from) { 562 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.ccl.baseccl.EncryptionOptions) 563 if (&from == this) return; 564 Clear(); 565 MergeFrom(from); 566 } 567 568 bool EncryptionOptions::IsInitialized() const { 569 return true; 570 } 571 572 void EncryptionOptions::Swap(EncryptionOptions* other) { 573 if (other == this) return; 574 InternalSwap(other); 575 } 576 void EncryptionOptions::InternalSwap(EncryptionOptions* other) { 577 using std::swap; 578 swap(key_files_, other->key_files_); 579 swap(data_key_rotation_period_, other->data_key_rotation_period_); 580 swap(key_source_, other->key_source_); 581 _internal_metadata_.Swap(&other->_internal_metadata_); 582 } 583 584 ::std::string EncryptionOptions::GetTypeName() const { 585 return "cockroach.ccl.baseccl.EncryptionOptions"; 586 } 587 588 589 // @@protoc_insertion_point(namespace_scope) 590 } // namespace baseccl 591 } // namespace ccl 592 } // namespace cockroach 593 namespace google { 594 namespace protobuf { 595 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::ccl::baseccl::EncryptionKeyFiles* Arena::CreateMaybeMessage< ::cockroach::ccl::baseccl::EncryptionKeyFiles >(Arena* arena) { 596 return Arena::CreateInternal< ::cockroach::ccl::baseccl::EncryptionKeyFiles >(arena); 597 } 598 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::ccl::baseccl::EncryptionOptions* Arena::CreateMaybeMessage< ::cockroach::ccl::baseccl::EncryptionOptions >(Arena* arena) { 599 return Arena::CreateInternal< ::cockroach::ccl::baseccl::EncryptionOptions >(arena); 600 } 601 } // namespace protobuf 602 } // namespace google 603 604 // @@protoc_insertion_point(global_scope)