github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/c-deps/libroach/protos/roachpb/metadata.pb.cc (about) 1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: roachpb/metadata.proto 3 4 #include "roachpb/metadata.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_roachpb_2fmetadata_2eproto { 20 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Attributes; 21 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Percentiles; 22 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ReplicaDescriptor; 23 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Tier; 24 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Version; 25 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_Locality; 26 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ReplicaIdent; 27 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_StoreCapacity; 28 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_LocalityAddress; 29 extern PROTOBUF_INTERNAL_EXPORT_protobuf_roachpb_2fmetadata_2eproto ::google::protobuf::internal::SCCInfo<5> scc_info_NodeDescriptor; 30 } // namespace protobuf_roachpb_2fmetadata_2eproto 31 namespace protobuf_util_2fhlc_2ftimestamp_2eproto { 32 extern PROTOBUF_INTERNAL_EXPORT_protobuf_util_2fhlc_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp; 33 } // namespace protobuf_util_2fhlc_2ftimestamp_2eproto 34 namespace protobuf_util_2funresolved_5faddr_2eproto { 35 extern PROTOBUF_INTERNAL_EXPORT_protobuf_util_2funresolved_5faddr_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_UnresolvedAddr; 36 } // namespace protobuf_util_2funresolved_5faddr_2eproto 37 namespace cockroach { 38 namespace roachpb { 39 class AttributesDefaultTypeInternal { 40 public: 41 ::google::protobuf::internal::ExplicitlyConstructed<Attributes> 42 _instance; 43 } _Attributes_default_instance_; 44 class ReplicationTargetDefaultTypeInternal { 45 public: 46 ::google::protobuf::internal::ExplicitlyConstructed<ReplicationTarget> 47 _instance; 48 } _ReplicationTarget_default_instance_; 49 class ReplicaDescriptorDefaultTypeInternal { 50 public: 51 ::google::protobuf::internal::ExplicitlyConstructed<ReplicaDescriptor> 52 _instance; 53 } _ReplicaDescriptor_default_instance_; 54 class ReplicaIdentDefaultTypeInternal { 55 public: 56 ::google::protobuf::internal::ExplicitlyConstructed<ReplicaIdent> 57 _instance; 58 } _ReplicaIdent_default_instance_; 59 class RangeDescriptorDefaultTypeInternal { 60 public: 61 ::google::protobuf::internal::ExplicitlyConstructed<RangeDescriptor> 62 _instance; 63 } _RangeDescriptor_default_instance_; 64 class PercentilesDefaultTypeInternal { 65 public: 66 ::google::protobuf::internal::ExplicitlyConstructed<Percentiles> 67 _instance; 68 } _Percentiles_default_instance_; 69 class StoreCapacityDefaultTypeInternal { 70 public: 71 ::google::protobuf::internal::ExplicitlyConstructed<StoreCapacity> 72 _instance; 73 } _StoreCapacity_default_instance_; 74 class NodeDescriptorDefaultTypeInternal { 75 public: 76 ::google::protobuf::internal::ExplicitlyConstructed<NodeDescriptor> 77 _instance; 78 } _NodeDescriptor_default_instance_; 79 class LocalityAddressDefaultTypeInternal { 80 public: 81 ::google::protobuf::internal::ExplicitlyConstructed<LocalityAddress> 82 _instance; 83 } _LocalityAddress_default_instance_; 84 class StoreDescriptorDefaultTypeInternal { 85 public: 86 ::google::protobuf::internal::ExplicitlyConstructed<StoreDescriptor> 87 _instance; 88 } _StoreDescriptor_default_instance_; 89 class StoreDeadReplicasDefaultTypeInternal { 90 public: 91 ::google::protobuf::internal::ExplicitlyConstructed<StoreDeadReplicas> 92 _instance; 93 } _StoreDeadReplicas_default_instance_; 94 class LocalityDefaultTypeInternal { 95 public: 96 ::google::protobuf::internal::ExplicitlyConstructed<Locality> 97 _instance; 98 } _Locality_default_instance_; 99 class TierDefaultTypeInternal { 100 public: 101 ::google::protobuf::internal::ExplicitlyConstructed<Tier> 102 _instance; 103 } _Tier_default_instance_; 104 class VersionDefaultTypeInternal { 105 public: 106 ::google::protobuf::internal::ExplicitlyConstructed<Version> 107 _instance; 108 } _Version_default_instance_; 109 } // namespace roachpb 110 } // namespace cockroach 111 namespace protobuf_roachpb_2fmetadata_2eproto { 112 static void InitDefaultsAttributes() { 113 GOOGLE_PROTOBUF_VERIFY_VERSION; 114 115 { 116 void* ptr = &::cockroach::roachpb::_Attributes_default_instance_; 117 new (ptr) ::cockroach::roachpb::Attributes(); 118 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 119 } 120 ::cockroach::roachpb::Attributes::InitAsDefaultInstance(); 121 } 122 123 ::google::protobuf::internal::SCCInfo<0> scc_info_Attributes = 124 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsAttributes}, {}}; 125 126 static void InitDefaultsReplicationTarget() { 127 GOOGLE_PROTOBUF_VERIFY_VERSION; 128 129 { 130 void* ptr = &::cockroach::roachpb::_ReplicationTarget_default_instance_; 131 new (ptr) ::cockroach::roachpb::ReplicationTarget(); 132 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 133 } 134 ::cockroach::roachpb::ReplicationTarget::InitAsDefaultInstance(); 135 } 136 137 ::google::protobuf::internal::SCCInfo<0> scc_info_ReplicationTarget = 138 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsReplicationTarget}, {}}; 139 140 static void InitDefaultsReplicaDescriptor() { 141 GOOGLE_PROTOBUF_VERIFY_VERSION; 142 143 { 144 void* ptr = &::cockroach::roachpb::_ReplicaDescriptor_default_instance_; 145 new (ptr) ::cockroach::roachpb::ReplicaDescriptor(); 146 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 147 } 148 ::cockroach::roachpb::ReplicaDescriptor::InitAsDefaultInstance(); 149 } 150 151 ::google::protobuf::internal::SCCInfo<0> scc_info_ReplicaDescriptor = 152 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsReplicaDescriptor}, {}}; 153 154 static void InitDefaultsReplicaIdent() { 155 GOOGLE_PROTOBUF_VERIFY_VERSION; 156 157 { 158 void* ptr = &::cockroach::roachpb::_ReplicaIdent_default_instance_; 159 new (ptr) ::cockroach::roachpb::ReplicaIdent(); 160 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 161 } 162 ::cockroach::roachpb::ReplicaIdent::InitAsDefaultInstance(); 163 } 164 165 ::google::protobuf::internal::SCCInfo<1> scc_info_ReplicaIdent = 166 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsReplicaIdent}, { 167 &protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicaDescriptor.base,}}; 168 169 static void InitDefaultsRangeDescriptor() { 170 GOOGLE_PROTOBUF_VERIFY_VERSION; 171 172 { 173 void* ptr = &::cockroach::roachpb::_RangeDescriptor_default_instance_; 174 new (ptr) ::cockroach::roachpb::RangeDescriptor(); 175 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 176 } 177 ::cockroach::roachpb::RangeDescriptor::InitAsDefaultInstance(); 178 } 179 180 ::google::protobuf::internal::SCCInfo<2> scc_info_RangeDescriptor = 181 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsRangeDescriptor}, { 182 &protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicaDescriptor.base, 183 &protobuf_util_2fhlc_2ftimestamp_2eproto::scc_info_Timestamp.base,}}; 184 185 static void InitDefaultsPercentiles() { 186 GOOGLE_PROTOBUF_VERIFY_VERSION; 187 188 { 189 void* ptr = &::cockroach::roachpb::_Percentiles_default_instance_; 190 new (ptr) ::cockroach::roachpb::Percentiles(); 191 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 192 } 193 ::cockroach::roachpb::Percentiles::InitAsDefaultInstance(); 194 } 195 196 ::google::protobuf::internal::SCCInfo<0> scc_info_Percentiles = 197 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPercentiles}, {}}; 198 199 static void InitDefaultsStoreCapacity() { 200 GOOGLE_PROTOBUF_VERIFY_VERSION; 201 202 { 203 void* ptr = &::cockroach::roachpb::_StoreCapacity_default_instance_; 204 new (ptr) ::cockroach::roachpb::StoreCapacity(); 205 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 206 } 207 ::cockroach::roachpb::StoreCapacity::InitAsDefaultInstance(); 208 } 209 210 ::google::protobuf::internal::SCCInfo<1> scc_info_StoreCapacity = 211 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStoreCapacity}, { 212 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Percentiles.base,}}; 213 214 static void InitDefaultsNodeDescriptor() { 215 GOOGLE_PROTOBUF_VERIFY_VERSION; 216 217 { 218 void* ptr = &::cockroach::roachpb::_NodeDescriptor_default_instance_; 219 new (ptr) ::cockroach::roachpb::NodeDescriptor(); 220 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 221 } 222 ::cockroach::roachpb::NodeDescriptor::InitAsDefaultInstance(); 223 } 224 225 ::google::protobuf::internal::SCCInfo<5> scc_info_NodeDescriptor = 226 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 5, InitDefaultsNodeDescriptor}, { 227 &protobuf_util_2funresolved_5faddr_2eproto::scc_info_UnresolvedAddr.base, 228 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Attributes.base, 229 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Locality.base, 230 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Version.base, 231 &protobuf_roachpb_2fmetadata_2eproto::scc_info_LocalityAddress.base,}}; 232 233 static void InitDefaultsLocalityAddress() { 234 GOOGLE_PROTOBUF_VERIFY_VERSION; 235 236 { 237 void* ptr = &::cockroach::roachpb::_LocalityAddress_default_instance_; 238 new (ptr) ::cockroach::roachpb::LocalityAddress(); 239 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 240 } 241 ::cockroach::roachpb::LocalityAddress::InitAsDefaultInstance(); 242 } 243 244 ::google::protobuf::internal::SCCInfo<2> scc_info_LocalityAddress = 245 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsLocalityAddress}, { 246 &protobuf_util_2funresolved_5faddr_2eproto::scc_info_UnresolvedAddr.base, 247 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Tier.base,}}; 248 249 static void InitDefaultsStoreDescriptor() { 250 GOOGLE_PROTOBUF_VERIFY_VERSION; 251 252 { 253 void* ptr = &::cockroach::roachpb::_StoreDescriptor_default_instance_; 254 new (ptr) ::cockroach::roachpb::StoreDescriptor(); 255 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 256 } 257 ::cockroach::roachpb::StoreDescriptor::InitAsDefaultInstance(); 258 } 259 260 ::google::protobuf::internal::SCCInfo<3> scc_info_StoreDescriptor = 261 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsStoreDescriptor}, { 262 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Attributes.base, 263 &protobuf_roachpb_2fmetadata_2eproto::scc_info_NodeDescriptor.base, 264 &protobuf_roachpb_2fmetadata_2eproto::scc_info_StoreCapacity.base,}}; 265 266 static void InitDefaultsStoreDeadReplicas() { 267 GOOGLE_PROTOBUF_VERIFY_VERSION; 268 269 { 270 void* ptr = &::cockroach::roachpb::_StoreDeadReplicas_default_instance_; 271 new (ptr) ::cockroach::roachpb::StoreDeadReplicas(); 272 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 273 } 274 ::cockroach::roachpb::StoreDeadReplicas::InitAsDefaultInstance(); 275 } 276 277 ::google::protobuf::internal::SCCInfo<1> scc_info_StoreDeadReplicas = 278 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsStoreDeadReplicas}, { 279 &protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicaIdent.base,}}; 280 281 static void InitDefaultsLocality() { 282 GOOGLE_PROTOBUF_VERIFY_VERSION; 283 284 { 285 void* ptr = &::cockroach::roachpb::_Locality_default_instance_; 286 new (ptr) ::cockroach::roachpb::Locality(); 287 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 288 } 289 ::cockroach::roachpb::Locality::InitAsDefaultInstance(); 290 } 291 292 ::google::protobuf::internal::SCCInfo<1> scc_info_Locality = 293 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsLocality}, { 294 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Tier.base,}}; 295 296 static void InitDefaultsTier() { 297 GOOGLE_PROTOBUF_VERIFY_VERSION; 298 299 { 300 void* ptr = &::cockroach::roachpb::_Tier_default_instance_; 301 new (ptr) ::cockroach::roachpb::Tier(); 302 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 303 } 304 ::cockroach::roachpb::Tier::InitAsDefaultInstance(); 305 } 306 307 ::google::protobuf::internal::SCCInfo<0> scc_info_Tier = 308 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTier}, {}}; 309 310 static void InitDefaultsVersion() { 311 GOOGLE_PROTOBUF_VERIFY_VERSION; 312 313 { 314 void* ptr = &::cockroach::roachpb::_Version_default_instance_; 315 new (ptr) ::cockroach::roachpb::Version(); 316 ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); 317 } 318 ::cockroach::roachpb::Version::InitAsDefaultInstance(); 319 } 320 321 ::google::protobuf::internal::SCCInfo<0> scc_info_Version = 322 {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsVersion}, {}}; 323 324 void InitDefaults() { 325 ::google::protobuf::internal::InitSCC(&scc_info_Attributes.base); 326 ::google::protobuf::internal::InitSCC(&scc_info_ReplicationTarget.base); 327 ::google::protobuf::internal::InitSCC(&scc_info_ReplicaDescriptor.base); 328 ::google::protobuf::internal::InitSCC(&scc_info_ReplicaIdent.base); 329 ::google::protobuf::internal::InitSCC(&scc_info_RangeDescriptor.base); 330 ::google::protobuf::internal::InitSCC(&scc_info_Percentiles.base); 331 ::google::protobuf::internal::InitSCC(&scc_info_StoreCapacity.base); 332 ::google::protobuf::internal::InitSCC(&scc_info_NodeDescriptor.base); 333 ::google::protobuf::internal::InitSCC(&scc_info_LocalityAddress.base); 334 ::google::protobuf::internal::InitSCC(&scc_info_StoreDescriptor.base); 335 ::google::protobuf::internal::InitSCC(&scc_info_StoreDeadReplicas.base); 336 ::google::protobuf::internal::InitSCC(&scc_info_Locality.base); 337 ::google::protobuf::internal::InitSCC(&scc_info_Tier.base); 338 ::google::protobuf::internal::InitSCC(&scc_info_Version.base); 339 } 340 341 } // namespace protobuf_roachpb_2fmetadata_2eproto 342 namespace cockroach { 343 namespace roachpb { 344 bool ReplicaType_IsValid(int value) { 345 switch (value) { 346 case 0: 347 case 1: 348 case 2: 349 case 3: 350 case 4: 351 return true; 352 default: 353 return false; 354 } 355 } 356 357 358 // =================================================================== 359 360 void Attributes::InitAsDefaultInstance() { 361 } 362 #if !defined(_MSC_VER) || _MSC_VER >= 1900 363 const int Attributes::kAttrsFieldNumber; 364 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 365 366 Attributes::Attributes() 367 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 368 ::google::protobuf::internal::InitSCC( 369 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Attributes.base); 370 SharedCtor(); 371 // @@protoc_insertion_point(constructor:cockroach.roachpb.Attributes) 372 } 373 Attributes::Attributes(const Attributes& from) 374 : ::google::protobuf::MessageLite(), 375 _internal_metadata_(NULL), 376 _has_bits_(from._has_bits_), 377 attrs_(from.attrs_) { 378 _internal_metadata_.MergeFrom(from._internal_metadata_); 379 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.Attributes) 380 } 381 382 void Attributes::SharedCtor() { 383 } 384 385 Attributes::~Attributes() { 386 // @@protoc_insertion_point(destructor:cockroach.roachpb.Attributes) 387 SharedDtor(); 388 } 389 390 void Attributes::SharedDtor() { 391 } 392 393 void Attributes::SetCachedSize(int size) const { 394 _cached_size_.Set(size); 395 } 396 const Attributes& Attributes::default_instance() { 397 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_Attributes.base); 398 return *internal_default_instance(); 399 } 400 401 402 void Attributes::Clear() { 403 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.Attributes) 404 ::google::protobuf::uint32 cached_has_bits = 0; 405 // Prevent compiler warnings about cached_has_bits being unused 406 (void) cached_has_bits; 407 408 attrs_.Clear(); 409 _has_bits_.Clear(); 410 _internal_metadata_.Clear(); 411 } 412 413 bool Attributes::MergePartialFromCodedStream( 414 ::google::protobuf::io::CodedInputStream* input) { 415 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 416 ::google::protobuf::uint32 tag; 417 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 418 &_internal_metadata_); 419 ::google::protobuf::io::StringOutputStream unknown_fields_output( 420 unknown_fields_setter.buffer()); 421 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 422 &unknown_fields_output, false); 423 // @@protoc_insertion_point(parse_start:cockroach.roachpb.Attributes) 424 for (;;) { 425 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 426 tag = p.first; 427 if (!p.second) goto handle_unusual; 428 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 429 case 1: { 430 if (static_cast< ::google::protobuf::uint8>(tag) == 431 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 432 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 433 input, this->add_attrs())); 434 } else { 435 goto handle_unusual; 436 } 437 break; 438 } 439 440 default: { 441 handle_unusual: 442 if (tag == 0) { 443 goto success; 444 } 445 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 446 input, tag, &unknown_fields_stream)); 447 break; 448 } 449 } 450 } 451 success: 452 // @@protoc_insertion_point(parse_success:cockroach.roachpb.Attributes) 453 return true; 454 failure: 455 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.Attributes) 456 return false; 457 #undef DO_ 458 } 459 460 void Attributes::SerializeWithCachedSizes( 461 ::google::protobuf::io::CodedOutputStream* output) const { 462 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.Attributes) 463 ::google::protobuf::uint32 cached_has_bits = 0; 464 (void) cached_has_bits; 465 466 for (int i = 0, n = this->attrs_size(); i < n; i++) { 467 ::google::protobuf::internal::WireFormatLite::WriteString( 468 1, this->attrs(i), output); 469 } 470 471 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 472 static_cast<int>(_internal_metadata_.unknown_fields().size())); 473 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.Attributes) 474 } 475 476 size_t Attributes::ByteSizeLong() const { 477 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.Attributes) 478 size_t total_size = 0; 479 480 total_size += _internal_metadata_.unknown_fields().size(); 481 482 total_size += 1 * 483 ::google::protobuf::internal::FromIntSize(this->attrs_size()); 484 for (int i = 0, n = this->attrs_size(); i < n; i++) { 485 total_size += ::google::protobuf::internal::WireFormatLite::StringSize( 486 this->attrs(i)); 487 } 488 489 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 490 SetCachedSize(cached_size); 491 return total_size; 492 } 493 494 void Attributes::CheckTypeAndMergeFrom( 495 const ::google::protobuf::MessageLite& from) { 496 MergeFrom(*::google::protobuf::down_cast<const Attributes*>(&from)); 497 } 498 499 void Attributes::MergeFrom(const Attributes& from) { 500 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.Attributes) 501 GOOGLE_DCHECK_NE(&from, this); 502 _internal_metadata_.MergeFrom(from._internal_metadata_); 503 ::google::protobuf::uint32 cached_has_bits = 0; 504 (void) cached_has_bits; 505 506 attrs_.MergeFrom(from.attrs_); 507 } 508 509 void Attributes::CopyFrom(const Attributes& from) { 510 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.Attributes) 511 if (&from == this) return; 512 Clear(); 513 MergeFrom(from); 514 } 515 516 bool Attributes::IsInitialized() const { 517 return true; 518 } 519 520 void Attributes::Swap(Attributes* other) { 521 if (other == this) return; 522 InternalSwap(other); 523 } 524 void Attributes::InternalSwap(Attributes* other) { 525 using std::swap; 526 attrs_.InternalSwap(CastToBase(&other->attrs_)); 527 swap(_has_bits_[0], other->_has_bits_[0]); 528 _internal_metadata_.Swap(&other->_internal_metadata_); 529 } 530 531 ::std::string Attributes::GetTypeName() const { 532 return "cockroach.roachpb.Attributes"; 533 } 534 535 536 // =================================================================== 537 538 void ReplicationTarget::InitAsDefaultInstance() { 539 } 540 #if !defined(_MSC_VER) || _MSC_VER >= 1900 541 const int ReplicationTarget::kNodeIdFieldNumber; 542 const int ReplicationTarget::kStoreIdFieldNumber; 543 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 544 545 ReplicationTarget::ReplicationTarget() 546 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 547 ::google::protobuf::internal::InitSCC( 548 &protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicationTarget.base); 549 SharedCtor(); 550 // @@protoc_insertion_point(constructor:cockroach.roachpb.ReplicationTarget) 551 } 552 ReplicationTarget::ReplicationTarget(const ReplicationTarget& from) 553 : ::google::protobuf::MessageLite(), 554 _internal_metadata_(NULL), 555 _has_bits_(from._has_bits_) { 556 _internal_metadata_.MergeFrom(from._internal_metadata_); 557 ::memcpy(&node_id_, &from.node_id_, 558 static_cast<size_t>(reinterpret_cast<char*>(&store_id_) - 559 reinterpret_cast<char*>(&node_id_)) + sizeof(store_id_)); 560 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.ReplicationTarget) 561 } 562 563 void ReplicationTarget::SharedCtor() { 564 ::memset(&node_id_, 0, static_cast<size_t>( 565 reinterpret_cast<char*>(&store_id_) - 566 reinterpret_cast<char*>(&node_id_)) + sizeof(store_id_)); 567 } 568 569 ReplicationTarget::~ReplicationTarget() { 570 // @@protoc_insertion_point(destructor:cockroach.roachpb.ReplicationTarget) 571 SharedDtor(); 572 } 573 574 void ReplicationTarget::SharedDtor() { 575 } 576 577 void ReplicationTarget::SetCachedSize(int size) const { 578 _cached_size_.Set(size); 579 } 580 const ReplicationTarget& ReplicationTarget::default_instance() { 581 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicationTarget.base); 582 return *internal_default_instance(); 583 } 584 585 586 void ReplicationTarget::Clear() { 587 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.ReplicationTarget) 588 ::google::protobuf::uint32 cached_has_bits = 0; 589 // Prevent compiler warnings about cached_has_bits being unused 590 (void) cached_has_bits; 591 592 cached_has_bits = _has_bits_[0]; 593 if (cached_has_bits & 3u) { 594 ::memset(&node_id_, 0, static_cast<size_t>( 595 reinterpret_cast<char*>(&store_id_) - 596 reinterpret_cast<char*>(&node_id_)) + sizeof(store_id_)); 597 } 598 _has_bits_.Clear(); 599 _internal_metadata_.Clear(); 600 } 601 602 bool ReplicationTarget::MergePartialFromCodedStream( 603 ::google::protobuf::io::CodedInputStream* input) { 604 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 605 ::google::protobuf::uint32 tag; 606 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 607 &_internal_metadata_); 608 ::google::protobuf::io::StringOutputStream unknown_fields_output( 609 unknown_fields_setter.buffer()); 610 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 611 &unknown_fields_output, false); 612 // @@protoc_insertion_point(parse_start:cockroach.roachpb.ReplicationTarget) 613 for (;;) { 614 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 615 tag = p.first; 616 if (!p.second) goto handle_unusual; 617 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 618 case 1: { 619 if (static_cast< ::google::protobuf::uint8>(tag) == 620 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 621 set_has_node_id(); 622 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 623 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 624 input, &node_id_))); 625 } else { 626 goto handle_unusual; 627 } 628 break; 629 } 630 631 case 2: { 632 if (static_cast< ::google::protobuf::uint8>(tag) == 633 static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { 634 set_has_store_id(); 635 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 636 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 637 input, &store_id_))); 638 } else { 639 goto handle_unusual; 640 } 641 break; 642 } 643 644 default: { 645 handle_unusual: 646 if (tag == 0) { 647 goto success; 648 } 649 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 650 input, tag, &unknown_fields_stream)); 651 break; 652 } 653 } 654 } 655 success: 656 // @@protoc_insertion_point(parse_success:cockroach.roachpb.ReplicationTarget) 657 return true; 658 failure: 659 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.ReplicationTarget) 660 return false; 661 #undef DO_ 662 } 663 664 void ReplicationTarget::SerializeWithCachedSizes( 665 ::google::protobuf::io::CodedOutputStream* output) const { 666 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.ReplicationTarget) 667 ::google::protobuf::uint32 cached_has_bits = 0; 668 (void) cached_has_bits; 669 670 cached_has_bits = _has_bits_[0]; 671 if (cached_has_bits & 0x00000001u) { 672 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->node_id(), output); 673 } 674 675 if (cached_has_bits & 0x00000002u) { 676 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->store_id(), output); 677 } 678 679 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 680 static_cast<int>(_internal_metadata_.unknown_fields().size())); 681 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.ReplicationTarget) 682 } 683 684 size_t ReplicationTarget::ByteSizeLong() const { 685 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.ReplicationTarget) 686 size_t total_size = 0; 687 688 total_size += _internal_metadata_.unknown_fields().size(); 689 690 if (_has_bits_[0 / 32] & 3u) { 691 if (has_node_id()) { 692 total_size += 1 + 693 ::google::protobuf::internal::WireFormatLite::Int32Size( 694 this->node_id()); 695 } 696 697 if (has_store_id()) { 698 total_size += 1 + 699 ::google::protobuf::internal::WireFormatLite::Int32Size( 700 this->store_id()); 701 } 702 703 } 704 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 705 SetCachedSize(cached_size); 706 return total_size; 707 } 708 709 void ReplicationTarget::CheckTypeAndMergeFrom( 710 const ::google::protobuf::MessageLite& from) { 711 MergeFrom(*::google::protobuf::down_cast<const ReplicationTarget*>(&from)); 712 } 713 714 void ReplicationTarget::MergeFrom(const ReplicationTarget& from) { 715 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.ReplicationTarget) 716 GOOGLE_DCHECK_NE(&from, this); 717 _internal_metadata_.MergeFrom(from._internal_metadata_); 718 ::google::protobuf::uint32 cached_has_bits = 0; 719 (void) cached_has_bits; 720 721 cached_has_bits = from._has_bits_[0]; 722 if (cached_has_bits & 3u) { 723 if (cached_has_bits & 0x00000001u) { 724 node_id_ = from.node_id_; 725 } 726 if (cached_has_bits & 0x00000002u) { 727 store_id_ = from.store_id_; 728 } 729 _has_bits_[0] |= cached_has_bits; 730 } 731 } 732 733 void ReplicationTarget::CopyFrom(const ReplicationTarget& from) { 734 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.ReplicationTarget) 735 if (&from == this) return; 736 Clear(); 737 MergeFrom(from); 738 } 739 740 bool ReplicationTarget::IsInitialized() const { 741 return true; 742 } 743 744 void ReplicationTarget::Swap(ReplicationTarget* other) { 745 if (other == this) return; 746 InternalSwap(other); 747 } 748 void ReplicationTarget::InternalSwap(ReplicationTarget* other) { 749 using std::swap; 750 swap(node_id_, other->node_id_); 751 swap(store_id_, other->store_id_); 752 swap(_has_bits_[0], other->_has_bits_[0]); 753 _internal_metadata_.Swap(&other->_internal_metadata_); 754 } 755 756 ::std::string ReplicationTarget::GetTypeName() const { 757 return "cockroach.roachpb.ReplicationTarget"; 758 } 759 760 761 // =================================================================== 762 763 void ReplicaDescriptor::InitAsDefaultInstance() { 764 } 765 #if !defined(_MSC_VER) || _MSC_VER >= 1900 766 const int ReplicaDescriptor::kNodeIdFieldNumber; 767 const int ReplicaDescriptor::kStoreIdFieldNumber; 768 const int ReplicaDescriptor::kReplicaIdFieldNumber; 769 const int ReplicaDescriptor::kTypeFieldNumber; 770 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 771 772 ReplicaDescriptor::ReplicaDescriptor() 773 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 774 ::google::protobuf::internal::InitSCC( 775 &protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicaDescriptor.base); 776 SharedCtor(); 777 // @@protoc_insertion_point(constructor:cockroach.roachpb.ReplicaDescriptor) 778 } 779 ReplicaDescriptor::ReplicaDescriptor(const ReplicaDescriptor& from) 780 : ::google::protobuf::MessageLite(), 781 _internal_metadata_(NULL), 782 _has_bits_(from._has_bits_) { 783 _internal_metadata_.MergeFrom(from._internal_metadata_); 784 ::memcpy(&node_id_, &from.node_id_, 785 static_cast<size_t>(reinterpret_cast<char*>(&type_) - 786 reinterpret_cast<char*>(&node_id_)) + sizeof(type_)); 787 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.ReplicaDescriptor) 788 } 789 790 void ReplicaDescriptor::SharedCtor() { 791 ::memset(&node_id_, 0, static_cast<size_t>( 792 reinterpret_cast<char*>(&type_) - 793 reinterpret_cast<char*>(&node_id_)) + sizeof(type_)); 794 } 795 796 ReplicaDescriptor::~ReplicaDescriptor() { 797 // @@protoc_insertion_point(destructor:cockroach.roachpb.ReplicaDescriptor) 798 SharedDtor(); 799 } 800 801 void ReplicaDescriptor::SharedDtor() { 802 } 803 804 void ReplicaDescriptor::SetCachedSize(int size) const { 805 _cached_size_.Set(size); 806 } 807 const ReplicaDescriptor& ReplicaDescriptor::default_instance() { 808 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicaDescriptor.base); 809 return *internal_default_instance(); 810 } 811 812 813 void ReplicaDescriptor::Clear() { 814 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.ReplicaDescriptor) 815 ::google::protobuf::uint32 cached_has_bits = 0; 816 // Prevent compiler warnings about cached_has_bits being unused 817 (void) cached_has_bits; 818 819 cached_has_bits = _has_bits_[0]; 820 if (cached_has_bits & 15u) { 821 ::memset(&node_id_, 0, static_cast<size_t>( 822 reinterpret_cast<char*>(&type_) - 823 reinterpret_cast<char*>(&node_id_)) + sizeof(type_)); 824 } 825 _has_bits_.Clear(); 826 _internal_metadata_.Clear(); 827 } 828 829 bool ReplicaDescriptor::MergePartialFromCodedStream( 830 ::google::protobuf::io::CodedInputStream* input) { 831 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 832 ::google::protobuf::uint32 tag; 833 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 834 &_internal_metadata_); 835 ::google::protobuf::io::StringOutputStream unknown_fields_output( 836 unknown_fields_setter.buffer()); 837 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 838 &unknown_fields_output, false); 839 // @@protoc_insertion_point(parse_start:cockroach.roachpb.ReplicaDescriptor) 840 for (;;) { 841 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 842 tag = p.first; 843 if (!p.second) goto handle_unusual; 844 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 845 case 1: { 846 if (static_cast< ::google::protobuf::uint8>(tag) == 847 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 848 set_has_node_id(); 849 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 850 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 851 input, &node_id_))); 852 } else { 853 goto handle_unusual; 854 } 855 break; 856 } 857 858 case 2: { 859 if (static_cast< ::google::protobuf::uint8>(tag) == 860 static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { 861 set_has_store_id(); 862 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 863 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 864 input, &store_id_))); 865 } else { 866 goto handle_unusual; 867 } 868 break; 869 } 870 871 case 3: { 872 if (static_cast< ::google::protobuf::uint8>(tag) == 873 static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { 874 set_has_replica_id(); 875 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 876 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 877 input, &replica_id_))); 878 } else { 879 goto handle_unusual; 880 } 881 break; 882 } 883 884 // optional .cockroach.roachpb.ReplicaType type = 4; 885 case 4: { 886 if (static_cast< ::google::protobuf::uint8>(tag) == 887 static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { 888 int value; 889 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 890 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( 891 input, &value))); 892 if (::cockroach::roachpb::ReplicaType_IsValid(value)) { 893 set_type(static_cast< ::cockroach::roachpb::ReplicaType >(value)); 894 } else { 895 unknown_fields_stream.WriteVarint32(32u); 896 unknown_fields_stream.WriteVarint32( 897 static_cast< ::google::protobuf::uint32>(value)); 898 } 899 } else { 900 goto handle_unusual; 901 } 902 break; 903 } 904 905 default: { 906 handle_unusual: 907 if (tag == 0) { 908 goto success; 909 } 910 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 911 input, tag, &unknown_fields_stream)); 912 break; 913 } 914 } 915 } 916 success: 917 // @@protoc_insertion_point(parse_success:cockroach.roachpb.ReplicaDescriptor) 918 return true; 919 failure: 920 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.ReplicaDescriptor) 921 return false; 922 #undef DO_ 923 } 924 925 void ReplicaDescriptor::SerializeWithCachedSizes( 926 ::google::protobuf::io::CodedOutputStream* output) const { 927 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.ReplicaDescriptor) 928 ::google::protobuf::uint32 cached_has_bits = 0; 929 (void) cached_has_bits; 930 931 cached_has_bits = _has_bits_[0]; 932 if (cached_has_bits & 0x00000001u) { 933 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->node_id(), output); 934 } 935 936 if (cached_has_bits & 0x00000002u) { 937 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->store_id(), output); 938 } 939 940 if (cached_has_bits & 0x00000004u) { 941 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->replica_id(), output); 942 } 943 944 // optional .cockroach.roachpb.ReplicaType type = 4; 945 if (cached_has_bits & 0x00000008u) { 946 ::google::protobuf::internal::WireFormatLite::WriteEnum( 947 4, this->type(), output); 948 } 949 950 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 951 static_cast<int>(_internal_metadata_.unknown_fields().size())); 952 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.ReplicaDescriptor) 953 } 954 955 size_t ReplicaDescriptor::ByteSizeLong() const { 956 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.ReplicaDescriptor) 957 size_t total_size = 0; 958 959 total_size += _internal_metadata_.unknown_fields().size(); 960 961 if (_has_bits_[0 / 32] & 15u) { 962 if (has_node_id()) { 963 total_size += 1 + 964 ::google::protobuf::internal::WireFormatLite::Int32Size( 965 this->node_id()); 966 } 967 968 if (has_store_id()) { 969 total_size += 1 + 970 ::google::protobuf::internal::WireFormatLite::Int32Size( 971 this->store_id()); 972 } 973 974 if (has_replica_id()) { 975 total_size += 1 + 976 ::google::protobuf::internal::WireFormatLite::Int32Size( 977 this->replica_id()); 978 } 979 980 // optional .cockroach.roachpb.ReplicaType type = 4; 981 if (has_type()) { 982 total_size += 1 + 983 ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); 984 } 985 986 } 987 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 988 SetCachedSize(cached_size); 989 return total_size; 990 } 991 992 void ReplicaDescriptor::CheckTypeAndMergeFrom( 993 const ::google::protobuf::MessageLite& from) { 994 MergeFrom(*::google::protobuf::down_cast<const ReplicaDescriptor*>(&from)); 995 } 996 997 void ReplicaDescriptor::MergeFrom(const ReplicaDescriptor& from) { 998 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.ReplicaDescriptor) 999 GOOGLE_DCHECK_NE(&from, this); 1000 _internal_metadata_.MergeFrom(from._internal_metadata_); 1001 ::google::protobuf::uint32 cached_has_bits = 0; 1002 (void) cached_has_bits; 1003 1004 cached_has_bits = from._has_bits_[0]; 1005 if (cached_has_bits & 15u) { 1006 if (cached_has_bits & 0x00000001u) { 1007 node_id_ = from.node_id_; 1008 } 1009 if (cached_has_bits & 0x00000002u) { 1010 store_id_ = from.store_id_; 1011 } 1012 if (cached_has_bits & 0x00000004u) { 1013 replica_id_ = from.replica_id_; 1014 } 1015 if (cached_has_bits & 0x00000008u) { 1016 type_ = from.type_; 1017 } 1018 _has_bits_[0] |= cached_has_bits; 1019 } 1020 } 1021 1022 void ReplicaDescriptor::CopyFrom(const ReplicaDescriptor& from) { 1023 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.ReplicaDescriptor) 1024 if (&from == this) return; 1025 Clear(); 1026 MergeFrom(from); 1027 } 1028 1029 bool ReplicaDescriptor::IsInitialized() const { 1030 return true; 1031 } 1032 1033 void ReplicaDescriptor::Swap(ReplicaDescriptor* other) { 1034 if (other == this) return; 1035 InternalSwap(other); 1036 } 1037 void ReplicaDescriptor::InternalSwap(ReplicaDescriptor* other) { 1038 using std::swap; 1039 swap(node_id_, other->node_id_); 1040 swap(store_id_, other->store_id_); 1041 swap(replica_id_, other->replica_id_); 1042 swap(type_, other->type_); 1043 swap(_has_bits_[0], other->_has_bits_[0]); 1044 _internal_metadata_.Swap(&other->_internal_metadata_); 1045 } 1046 1047 ::std::string ReplicaDescriptor::GetTypeName() const { 1048 return "cockroach.roachpb.ReplicaDescriptor"; 1049 } 1050 1051 1052 // =================================================================== 1053 1054 void ReplicaIdent::InitAsDefaultInstance() { 1055 ::cockroach::roachpb::_ReplicaIdent_default_instance_._instance.get_mutable()->replica_ = const_cast< ::cockroach::roachpb::ReplicaDescriptor*>( 1056 ::cockroach::roachpb::ReplicaDescriptor::internal_default_instance()); 1057 } 1058 #if !defined(_MSC_VER) || _MSC_VER >= 1900 1059 const int ReplicaIdent::kRangeIdFieldNumber; 1060 const int ReplicaIdent::kReplicaFieldNumber; 1061 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 1062 1063 ReplicaIdent::ReplicaIdent() 1064 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 1065 ::google::protobuf::internal::InitSCC( 1066 &protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicaIdent.base); 1067 SharedCtor(); 1068 // @@protoc_insertion_point(constructor:cockroach.roachpb.ReplicaIdent) 1069 } 1070 ReplicaIdent::ReplicaIdent(const ReplicaIdent& from) 1071 : ::google::protobuf::MessageLite(), 1072 _internal_metadata_(NULL), 1073 _has_bits_(from._has_bits_) { 1074 _internal_metadata_.MergeFrom(from._internal_metadata_); 1075 if (from.has_replica()) { 1076 replica_ = new ::cockroach::roachpb::ReplicaDescriptor(*from.replica_); 1077 } else { 1078 replica_ = NULL; 1079 } 1080 range_id_ = from.range_id_; 1081 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.ReplicaIdent) 1082 } 1083 1084 void ReplicaIdent::SharedCtor() { 1085 ::memset(&replica_, 0, static_cast<size_t>( 1086 reinterpret_cast<char*>(&range_id_) - 1087 reinterpret_cast<char*>(&replica_)) + sizeof(range_id_)); 1088 } 1089 1090 ReplicaIdent::~ReplicaIdent() { 1091 // @@protoc_insertion_point(destructor:cockroach.roachpb.ReplicaIdent) 1092 SharedDtor(); 1093 } 1094 1095 void ReplicaIdent::SharedDtor() { 1096 if (this != internal_default_instance()) delete replica_; 1097 } 1098 1099 void ReplicaIdent::SetCachedSize(int size) const { 1100 _cached_size_.Set(size); 1101 } 1102 const ReplicaIdent& ReplicaIdent::default_instance() { 1103 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_ReplicaIdent.base); 1104 return *internal_default_instance(); 1105 } 1106 1107 1108 void ReplicaIdent::Clear() { 1109 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.ReplicaIdent) 1110 ::google::protobuf::uint32 cached_has_bits = 0; 1111 // Prevent compiler warnings about cached_has_bits being unused 1112 (void) cached_has_bits; 1113 1114 cached_has_bits = _has_bits_[0]; 1115 if (cached_has_bits & 0x00000001u) { 1116 GOOGLE_DCHECK(replica_ != NULL); 1117 replica_->Clear(); 1118 } 1119 range_id_ = GOOGLE_LONGLONG(0); 1120 _has_bits_.Clear(); 1121 _internal_metadata_.Clear(); 1122 } 1123 1124 bool ReplicaIdent::MergePartialFromCodedStream( 1125 ::google::protobuf::io::CodedInputStream* input) { 1126 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 1127 ::google::protobuf::uint32 tag; 1128 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 1129 &_internal_metadata_); 1130 ::google::protobuf::io::StringOutputStream unknown_fields_output( 1131 unknown_fields_setter.buffer()); 1132 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 1133 &unknown_fields_output, false); 1134 // @@protoc_insertion_point(parse_start:cockroach.roachpb.ReplicaIdent) 1135 for (;;) { 1136 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 1137 tag = p.first; 1138 if (!p.second) goto handle_unusual; 1139 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 1140 case 1: { 1141 if (static_cast< ::google::protobuf::uint8>(tag) == 1142 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 1143 set_has_range_id(); 1144 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1145 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 1146 input, &range_id_))); 1147 } else { 1148 goto handle_unusual; 1149 } 1150 break; 1151 } 1152 1153 case 2: { 1154 if (static_cast< ::google::protobuf::uint8>(tag) == 1155 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 1156 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 1157 input, mutable_replica())); 1158 } else { 1159 goto handle_unusual; 1160 } 1161 break; 1162 } 1163 1164 default: { 1165 handle_unusual: 1166 if (tag == 0) { 1167 goto success; 1168 } 1169 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 1170 input, tag, &unknown_fields_stream)); 1171 break; 1172 } 1173 } 1174 } 1175 success: 1176 // @@protoc_insertion_point(parse_success:cockroach.roachpb.ReplicaIdent) 1177 return true; 1178 failure: 1179 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.ReplicaIdent) 1180 return false; 1181 #undef DO_ 1182 } 1183 1184 void ReplicaIdent::SerializeWithCachedSizes( 1185 ::google::protobuf::io::CodedOutputStream* output) const { 1186 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.ReplicaIdent) 1187 ::google::protobuf::uint32 cached_has_bits = 0; 1188 (void) cached_has_bits; 1189 1190 cached_has_bits = _has_bits_[0]; 1191 if (cached_has_bits & 0x00000002u) { 1192 ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->range_id(), output); 1193 } 1194 1195 if (cached_has_bits & 0x00000001u) { 1196 ::google::protobuf::internal::WireFormatLite::WriteMessage( 1197 2, this->_internal_replica(), output); 1198 } 1199 1200 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 1201 static_cast<int>(_internal_metadata_.unknown_fields().size())); 1202 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.ReplicaIdent) 1203 } 1204 1205 size_t ReplicaIdent::ByteSizeLong() const { 1206 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.ReplicaIdent) 1207 size_t total_size = 0; 1208 1209 total_size += _internal_metadata_.unknown_fields().size(); 1210 1211 if (_has_bits_[0 / 32] & 3u) { 1212 if (has_replica()) { 1213 total_size += 1 + 1214 ::google::protobuf::internal::WireFormatLite::MessageSize( 1215 *replica_); 1216 } 1217 1218 if (has_range_id()) { 1219 total_size += 1 + 1220 ::google::protobuf::internal::WireFormatLite::Int64Size( 1221 this->range_id()); 1222 } 1223 1224 } 1225 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 1226 SetCachedSize(cached_size); 1227 return total_size; 1228 } 1229 1230 void ReplicaIdent::CheckTypeAndMergeFrom( 1231 const ::google::protobuf::MessageLite& from) { 1232 MergeFrom(*::google::protobuf::down_cast<const ReplicaIdent*>(&from)); 1233 } 1234 1235 void ReplicaIdent::MergeFrom(const ReplicaIdent& from) { 1236 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.ReplicaIdent) 1237 GOOGLE_DCHECK_NE(&from, this); 1238 _internal_metadata_.MergeFrom(from._internal_metadata_); 1239 ::google::protobuf::uint32 cached_has_bits = 0; 1240 (void) cached_has_bits; 1241 1242 cached_has_bits = from._has_bits_[0]; 1243 if (cached_has_bits & 3u) { 1244 if (cached_has_bits & 0x00000001u) { 1245 mutable_replica()->::cockroach::roachpb::ReplicaDescriptor::MergeFrom(from.replica()); 1246 } 1247 if (cached_has_bits & 0x00000002u) { 1248 range_id_ = from.range_id_; 1249 } 1250 _has_bits_[0] |= cached_has_bits; 1251 } 1252 } 1253 1254 void ReplicaIdent::CopyFrom(const ReplicaIdent& from) { 1255 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.ReplicaIdent) 1256 if (&from == this) return; 1257 Clear(); 1258 MergeFrom(from); 1259 } 1260 1261 bool ReplicaIdent::IsInitialized() const { 1262 return true; 1263 } 1264 1265 void ReplicaIdent::Swap(ReplicaIdent* other) { 1266 if (other == this) return; 1267 InternalSwap(other); 1268 } 1269 void ReplicaIdent::InternalSwap(ReplicaIdent* other) { 1270 using std::swap; 1271 swap(replica_, other->replica_); 1272 swap(range_id_, other->range_id_); 1273 swap(_has_bits_[0], other->_has_bits_[0]); 1274 _internal_metadata_.Swap(&other->_internal_metadata_); 1275 } 1276 1277 ::std::string ReplicaIdent::GetTypeName() const { 1278 return "cockroach.roachpb.ReplicaIdent"; 1279 } 1280 1281 1282 // =================================================================== 1283 1284 void RangeDescriptor::InitAsDefaultInstance() { 1285 ::cockroach::roachpb::_RangeDescriptor_default_instance_._instance.get_mutable()->sticky_bit_ = const_cast< ::cockroach::util::hlc::Timestamp*>( 1286 ::cockroach::util::hlc::Timestamp::internal_default_instance()); 1287 } 1288 void RangeDescriptor::clear_sticky_bit() { 1289 if (sticky_bit_ != NULL) sticky_bit_->Clear(); 1290 clear_has_sticky_bit(); 1291 } 1292 #if !defined(_MSC_VER) || _MSC_VER >= 1900 1293 const int RangeDescriptor::kRangeIdFieldNumber; 1294 const int RangeDescriptor::kStartKeyFieldNumber; 1295 const int RangeDescriptor::kEndKeyFieldNumber; 1296 const int RangeDescriptor::kInternalReplicasFieldNumber; 1297 const int RangeDescriptor::kNextReplicaIdFieldNumber; 1298 const int RangeDescriptor::kGenerationFieldNumber; 1299 const int RangeDescriptor::kStickyBitFieldNumber; 1300 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 1301 1302 RangeDescriptor::RangeDescriptor() 1303 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 1304 ::google::protobuf::internal::InitSCC( 1305 &protobuf_roachpb_2fmetadata_2eproto::scc_info_RangeDescriptor.base); 1306 SharedCtor(); 1307 // @@protoc_insertion_point(constructor:cockroach.roachpb.RangeDescriptor) 1308 } 1309 RangeDescriptor::RangeDescriptor(const RangeDescriptor& from) 1310 : ::google::protobuf::MessageLite(), 1311 _internal_metadata_(NULL), 1312 _has_bits_(from._has_bits_), 1313 internal_replicas_(from.internal_replicas_) { 1314 _internal_metadata_.MergeFrom(from._internal_metadata_); 1315 start_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1316 if (from.has_start_key()) { 1317 start_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_key_); 1318 } 1319 end_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1320 if (from.has_end_key()) { 1321 end_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.end_key_); 1322 } 1323 if (from.has_sticky_bit()) { 1324 sticky_bit_ = new ::cockroach::util::hlc::Timestamp(*from.sticky_bit_); 1325 } else { 1326 sticky_bit_ = NULL; 1327 } 1328 ::memcpy(&range_id_, &from.range_id_, 1329 static_cast<size_t>(reinterpret_cast<char*>(&next_replica_id_) - 1330 reinterpret_cast<char*>(&range_id_)) + sizeof(next_replica_id_)); 1331 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.RangeDescriptor) 1332 } 1333 1334 void RangeDescriptor::SharedCtor() { 1335 start_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1336 end_key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1337 ::memset(&sticky_bit_, 0, static_cast<size_t>( 1338 reinterpret_cast<char*>(&next_replica_id_) - 1339 reinterpret_cast<char*>(&sticky_bit_)) + sizeof(next_replica_id_)); 1340 } 1341 1342 RangeDescriptor::~RangeDescriptor() { 1343 // @@protoc_insertion_point(destructor:cockroach.roachpb.RangeDescriptor) 1344 SharedDtor(); 1345 } 1346 1347 void RangeDescriptor::SharedDtor() { 1348 start_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1349 end_key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 1350 if (this != internal_default_instance()) delete sticky_bit_; 1351 } 1352 1353 void RangeDescriptor::SetCachedSize(int size) const { 1354 _cached_size_.Set(size); 1355 } 1356 const RangeDescriptor& RangeDescriptor::default_instance() { 1357 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_RangeDescriptor.base); 1358 return *internal_default_instance(); 1359 } 1360 1361 1362 void RangeDescriptor::Clear() { 1363 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.RangeDescriptor) 1364 ::google::protobuf::uint32 cached_has_bits = 0; 1365 // Prevent compiler warnings about cached_has_bits being unused 1366 (void) cached_has_bits; 1367 1368 internal_replicas_.Clear(); 1369 cached_has_bits = _has_bits_[0]; 1370 if (cached_has_bits & 7u) { 1371 if (cached_has_bits & 0x00000001u) { 1372 start_key_.ClearNonDefaultToEmptyNoArena(); 1373 } 1374 if (cached_has_bits & 0x00000002u) { 1375 end_key_.ClearNonDefaultToEmptyNoArena(); 1376 } 1377 if (cached_has_bits & 0x00000004u) { 1378 GOOGLE_DCHECK(sticky_bit_ != NULL); 1379 sticky_bit_->Clear(); 1380 } 1381 } 1382 if (cached_has_bits & 56u) { 1383 ::memset(&range_id_, 0, static_cast<size_t>( 1384 reinterpret_cast<char*>(&next_replica_id_) - 1385 reinterpret_cast<char*>(&range_id_)) + sizeof(next_replica_id_)); 1386 } 1387 _has_bits_.Clear(); 1388 _internal_metadata_.Clear(); 1389 } 1390 1391 bool RangeDescriptor::MergePartialFromCodedStream( 1392 ::google::protobuf::io::CodedInputStream* input) { 1393 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 1394 ::google::protobuf::uint32 tag; 1395 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 1396 &_internal_metadata_); 1397 ::google::protobuf::io::StringOutputStream unknown_fields_output( 1398 unknown_fields_setter.buffer()); 1399 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 1400 &unknown_fields_output, false); 1401 // @@protoc_insertion_point(parse_start:cockroach.roachpb.RangeDescriptor) 1402 for (;;) { 1403 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 1404 tag = p.first; 1405 if (!p.second) goto handle_unusual; 1406 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 1407 case 1: { 1408 if (static_cast< ::google::protobuf::uint8>(tag) == 1409 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 1410 set_has_range_id(); 1411 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1412 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 1413 input, &range_id_))); 1414 } else { 1415 goto handle_unusual; 1416 } 1417 break; 1418 } 1419 1420 case 2: { 1421 if (static_cast< ::google::protobuf::uint8>(tag) == 1422 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 1423 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( 1424 input, this->mutable_start_key())); 1425 } else { 1426 goto handle_unusual; 1427 } 1428 break; 1429 } 1430 1431 case 3: { 1432 if (static_cast< ::google::protobuf::uint8>(tag) == 1433 static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { 1434 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( 1435 input, this->mutable_end_key())); 1436 } else { 1437 goto handle_unusual; 1438 } 1439 break; 1440 } 1441 1442 case 4: { 1443 if (static_cast< ::google::protobuf::uint8>(tag) == 1444 static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { 1445 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 1446 input, add_internal_replicas())); 1447 } else { 1448 goto handle_unusual; 1449 } 1450 break; 1451 } 1452 1453 case 5: { 1454 if (static_cast< ::google::protobuf::uint8>(tag) == 1455 static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { 1456 set_has_next_replica_id(); 1457 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1458 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 1459 input, &next_replica_id_))); 1460 } else { 1461 goto handle_unusual; 1462 } 1463 break; 1464 } 1465 1466 case 6: { 1467 if (static_cast< ::google::protobuf::uint8>(tag) == 1468 static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { 1469 set_has_generation(); 1470 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1471 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 1472 input, &generation_))); 1473 } else { 1474 goto handle_unusual; 1475 } 1476 break; 1477 } 1478 1479 // optional .cockroach.util.hlc.Timestamp sticky_bit = 7; 1480 case 7: { 1481 if (static_cast< ::google::protobuf::uint8>(tag) == 1482 static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { 1483 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 1484 input, mutable_sticky_bit())); 1485 } else { 1486 goto handle_unusual; 1487 } 1488 break; 1489 } 1490 1491 default: { 1492 handle_unusual: 1493 if (tag == 0) { 1494 goto success; 1495 } 1496 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 1497 input, tag, &unknown_fields_stream)); 1498 break; 1499 } 1500 } 1501 } 1502 success: 1503 // @@protoc_insertion_point(parse_success:cockroach.roachpb.RangeDescriptor) 1504 return true; 1505 failure: 1506 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.RangeDescriptor) 1507 return false; 1508 #undef DO_ 1509 } 1510 1511 void RangeDescriptor::SerializeWithCachedSizes( 1512 ::google::protobuf::io::CodedOutputStream* output) const { 1513 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.RangeDescriptor) 1514 ::google::protobuf::uint32 cached_has_bits = 0; 1515 (void) cached_has_bits; 1516 1517 cached_has_bits = _has_bits_[0]; 1518 if (cached_has_bits & 0x00000008u) { 1519 ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->range_id(), output); 1520 } 1521 1522 if (cached_has_bits & 0x00000001u) { 1523 ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( 1524 2, this->start_key(), output); 1525 } 1526 1527 if (cached_has_bits & 0x00000002u) { 1528 ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( 1529 3, this->end_key(), output); 1530 } 1531 1532 for (unsigned int i = 0, 1533 n = static_cast<unsigned int>(this->internal_replicas_size()); i < n; i++) { 1534 ::google::protobuf::internal::WireFormatLite::WriteMessage( 1535 4, 1536 this->internal_replicas(static_cast<int>(i)), 1537 output); 1538 } 1539 1540 if (cached_has_bits & 0x00000020u) { 1541 ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->next_replica_id(), output); 1542 } 1543 1544 if (cached_has_bits & 0x00000010u) { 1545 ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->generation(), output); 1546 } 1547 1548 // optional .cockroach.util.hlc.Timestamp sticky_bit = 7; 1549 if (cached_has_bits & 0x00000004u) { 1550 ::google::protobuf::internal::WireFormatLite::WriteMessage( 1551 7, this->_internal_sticky_bit(), output); 1552 } 1553 1554 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 1555 static_cast<int>(_internal_metadata_.unknown_fields().size())); 1556 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.RangeDescriptor) 1557 } 1558 1559 size_t RangeDescriptor::ByteSizeLong() const { 1560 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.RangeDescriptor) 1561 size_t total_size = 0; 1562 1563 total_size += _internal_metadata_.unknown_fields().size(); 1564 1565 { 1566 unsigned int count = static_cast<unsigned int>(this->internal_replicas_size()); 1567 total_size += 1UL * count; 1568 for (unsigned int i = 0; i < count; i++) { 1569 total_size += 1570 ::google::protobuf::internal::WireFormatLite::MessageSize( 1571 this->internal_replicas(static_cast<int>(i))); 1572 } 1573 } 1574 1575 if (_has_bits_[0 / 32] & 63u) { 1576 if (has_start_key()) { 1577 total_size += 1 + 1578 ::google::protobuf::internal::WireFormatLite::BytesSize( 1579 this->start_key()); 1580 } 1581 1582 if (has_end_key()) { 1583 total_size += 1 + 1584 ::google::protobuf::internal::WireFormatLite::BytesSize( 1585 this->end_key()); 1586 } 1587 1588 // optional .cockroach.util.hlc.Timestamp sticky_bit = 7; 1589 if (has_sticky_bit()) { 1590 total_size += 1 + 1591 ::google::protobuf::internal::WireFormatLite::MessageSize( 1592 *sticky_bit_); 1593 } 1594 1595 if (has_range_id()) { 1596 total_size += 1 + 1597 ::google::protobuf::internal::WireFormatLite::Int64Size( 1598 this->range_id()); 1599 } 1600 1601 if (has_generation()) { 1602 total_size += 1 + 1603 ::google::protobuf::internal::WireFormatLite::Int64Size( 1604 this->generation()); 1605 } 1606 1607 if (has_next_replica_id()) { 1608 total_size += 1 + 1609 ::google::protobuf::internal::WireFormatLite::Int32Size( 1610 this->next_replica_id()); 1611 } 1612 1613 } 1614 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 1615 SetCachedSize(cached_size); 1616 return total_size; 1617 } 1618 1619 void RangeDescriptor::CheckTypeAndMergeFrom( 1620 const ::google::protobuf::MessageLite& from) { 1621 MergeFrom(*::google::protobuf::down_cast<const RangeDescriptor*>(&from)); 1622 } 1623 1624 void RangeDescriptor::MergeFrom(const RangeDescriptor& from) { 1625 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.RangeDescriptor) 1626 GOOGLE_DCHECK_NE(&from, this); 1627 _internal_metadata_.MergeFrom(from._internal_metadata_); 1628 ::google::protobuf::uint32 cached_has_bits = 0; 1629 (void) cached_has_bits; 1630 1631 internal_replicas_.MergeFrom(from.internal_replicas_); 1632 cached_has_bits = from._has_bits_[0]; 1633 if (cached_has_bits & 63u) { 1634 if (cached_has_bits & 0x00000001u) { 1635 set_has_start_key(); 1636 start_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.start_key_); 1637 } 1638 if (cached_has_bits & 0x00000002u) { 1639 set_has_end_key(); 1640 end_key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.end_key_); 1641 } 1642 if (cached_has_bits & 0x00000004u) { 1643 mutable_sticky_bit()->::cockroach::util::hlc::Timestamp::MergeFrom(from.sticky_bit()); 1644 } 1645 if (cached_has_bits & 0x00000008u) { 1646 range_id_ = from.range_id_; 1647 } 1648 if (cached_has_bits & 0x00000010u) { 1649 generation_ = from.generation_; 1650 } 1651 if (cached_has_bits & 0x00000020u) { 1652 next_replica_id_ = from.next_replica_id_; 1653 } 1654 _has_bits_[0] |= cached_has_bits; 1655 } 1656 } 1657 1658 void RangeDescriptor::CopyFrom(const RangeDescriptor& from) { 1659 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.RangeDescriptor) 1660 if (&from == this) return; 1661 Clear(); 1662 MergeFrom(from); 1663 } 1664 1665 bool RangeDescriptor::IsInitialized() const { 1666 return true; 1667 } 1668 1669 void RangeDescriptor::Swap(RangeDescriptor* other) { 1670 if (other == this) return; 1671 InternalSwap(other); 1672 } 1673 void RangeDescriptor::InternalSwap(RangeDescriptor* other) { 1674 using std::swap; 1675 CastToBase(&internal_replicas_)->InternalSwap(CastToBase(&other->internal_replicas_)); 1676 start_key_.Swap(&other->start_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 1677 GetArenaNoVirtual()); 1678 end_key_.Swap(&other->end_key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 1679 GetArenaNoVirtual()); 1680 swap(sticky_bit_, other->sticky_bit_); 1681 swap(range_id_, other->range_id_); 1682 swap(generation_, other->generation_); 1683 swap(next_replica_id_, other->next_replica_id_); 1684 swap(_has_bits_[0], other->_has_bits_[0]); 1685 _internal_metadata_.Swap(&other->_internal_metadata_); 1686 } 1687 1688 ::std::string RangeDescriptor::GetTypeName() const { 1689 return "cockroach.roachpb.RangeDescriptor"; 1690 } 1691 1692 1693 // =================================================================== 1694 1695 void Percentiles::InitAsDefaultInstance() { 1696 } 1697 #if !defined(_MSC_VER) || _MSC_VER >= 1900 1698 const int Percentiles::kP10FieldNumber; 1699 const int Percentiles::kP25FieldNumber; 1700 const int Percentiles::kP50FieldNumber; 1701 const int Percentiles::kP75FieldNumber; 1702 const int Percentiles::kP90FieldNumber; 1703 const int Percentiles::kPMaxFieldNumber; 1704 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 1705 1706 Percentiles::Percentiles() 1707 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 1708 ::google::protobuf::internal::InitSCC( 1709 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Percentiles.base); 1710 SharedCtor(); 1711 // @@protoc_insertion_point(constructor:cockroach.roachpb.Percentiles) 1712 } 1713 Percentiles::Percentiles(const Percentiles& from) 1714 : ::google::protobuf::MessageLite(), 1715 _internal_metadata_(NULL), 1716 _has_bits_(from._has_bits_) { 1717 _internal_metadata_.MergeFrom(from._internal_metadata_); 1718 ::memcpy(&p10_, &from.p10_, 1719 static_cast<size_t>(reinterpret_cast<char*>(&pmax_) - 1720 reinterpret_cast<char*>(&p10_)) + sizeof(pmax_)); 1721 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.Percentiles) 1722 } 1723 1724 void Percentiles::SharedCtor() { 1725 ::memset(&p10_, 0, static_cast<size_t>( 1726 reinterpret_cast<char*>(&pmax_) - 1727 reinterpret_cast<char*>(&p10_)) + sizeof(pmax_)); 1728 } 1729 1730 Percentiles::~Percentiles() { 1731 // @@protoc_insertion_point(destructor:cockroach.roachpb.Percentiles) 1732 SharedDtor(); 1733 } 1734 1735 void Percentiles::SharedDtor() { 1736 } 1737 1738 void Percentiles::SetCachedSize(int size) const { 1739 _cached_size_.Set(size); 1740 } 1741 const Percentiles& Percentiles::default_instance() { 1742 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_Percentiles.base); 1743 return *internal_default_instance(); 1744 } 1745 1746 1747 void Percentiles::Clear() { 1748 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.Percentiles) 1749 ::google::protobuf::uint32 cached_has_bits = 0; 1750 // Prevent compiler warnings about cached_has_bits being unused 1751 (void) cached_has_bits; 1752 1753 cached_has_bits = _has_bits_[0]; 1754 if (cached_has_bits & 63u) { 1755 ::memset(&p10_, 0, static_cast<size_t>( 1756 reinterpret_cast<char*>(&pmax_) - 1757 reinterpret_cast<char*>(&p10_)) + sizeof(pmax_)); 1758 } 1759 _has_bits_.Clear(); 1760 _internal_metadata_.Clear(); 1761 } 1762 1763 bool Percentiles::MergePartialFromCodedStream( 1764 ::google::protobuf::io::CodedInputStream* input) { 1765 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 1766 ::google::protobuf::uint32 tag; 1767 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 1768 &_internal_metadata_); 1769 ::google::protobuf::io::StringOutputStream unknown_fields_output( 1770 unknown_fields_setter.buffer()); 1771 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 1772 &unknown_fields_output, false); 1773 // @@protoc_insertion_point(parse_start:cockroach.roachpb.Percentiles) 1774 for (;;) { 1775 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 1776 tag = p.first; 1777 if (!p.second) goto handle_unusual; 1778 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 1779 case 1: { 1780 if (static_cast< ::google::protobuf::uint8>(tag) == 1781 static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) { 1782 set_has_p10(); 1783 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1784 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 1785 input, &p10_))); 1786 } else { 1787 goto handle_unusual; 1788 } 1789 break; 1790 } 1791 1792 case 2: { 1793 if (static_cast< ::google::protobuf::uint8>(tag) == 1794 static_cast< ::google::protobuf::uint8>(17u /* 17 & 0xFF */)) { 1795 set_has_p25(); 1796 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1797 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 1798 input, &p25_))); 1799 } else { 1800 goto handle_unusual; 1801 } 1802 break; 1803 } 1804 1805 case 3: { 1806 if (static_cast< ::google::protobuf::uint8>(tag) == 1807 static_cast< ::google::protobuf::uint8>(25u /* 25 & 0xFF */)) { 1808 set_has_p50(); 1809 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1810 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 1811 input, &p50_))); 1812 } else { 1813 goto handle_unusual; 1814 } 1815 break; 1816 } 1817 1818 case 4: { 1819 if (static_cast< ::google::protobuf::uint8>(tag) == 1820 static_cast< ::google::protobuf::uint8>(33u /* 33 & 0xFF */)) { 1821 set_has_p75(); 1822 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1823 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 1824 input, &p75_))); 1825 } else { 1826 goto handle_unusual; 1827 } 1828 break; 1829 } 1830 1831 case 5: { 1832 if (static_cast< ::google::protobuf::uint8>(tag) == 1833 static_cast< ::google::protobuf::uint8>(41u /* 41 & 0xFF */)) { 1834 set_has_p90(); 1835 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1836 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 1837 input, &p90_))); 1838 } else { 1839 goto handle_unusual; 1840 } 1841 break; 1842 } 1843 1844 case 6: { 1845 if (static_cast< ::google::protobuf::uint8>(tag) == 1846 static_cast< ::google::protobuf::uint8>(49u /* 49 & 0xFF */)) { 1847 set_has_pmax(); 1848 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 1849 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 1850 input, &pmax_))); 1851 } else { 1852 goto handle_unusual; 1853 } 1854 break; 1855 } 1856 1857 default: { 1858 handle_unusual: 1859 if (tag == 0) { 1860 goto success; 1861 } 1862 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 1863 input, tag, &unknown_fields_stream)); 1864 break; 1865 } 1866 } 1867 } 1868 success: 1869 // @@protoc_insertion_point(parse_success:cockroach.roachpb.Percentiles) 1870 return true; 1871 failure: 1872 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.Percentiles) 1873 return false; 1874 #undef DO_ 1875 } 1876 1877 void Percentiles::SerializeWithCachedSizes( 1878 ::google::protobuf::io::CodedOutputStream* output) const { 1879 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.Percentiles) 1880 ::google::protobuf::uint32 cached_has_bits = 0; 1881 (void) cached_has_bits; 1882 1883 cached_has_bits = _has_bits_[0]; 1884 if (cached_has_bits & 0x00000001u) { 1885 ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->p10(), output); 1886 } 1887 1888 if (cached_has_bits & 0x00000002u) { 1889 ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->p25(), output); 1890 } 1891 1892 if (cached_has_bits & 0x00000004u) { 1893 ::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->p50(), output); 1894 } 1895 1896 if (cached_has_bits & 0x00000008u) { 1897 ::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->p75(), output); 1898 } 1899 1900 if (cached_has_bits & 0x00000010u) { 1901 ::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->p90(), output); 1902 } 1903 1904 if (cached_has_bits & 0x00000020u) { 1905 ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->pmax(), output); 1906 } 1907 1908 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 1909 static_cast<int>(_internal_metadata_.unknown_fields().size())); 1910 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.Percentiles) 1911 } 1912 1913 size_t Percentiles::ByteSizeLong() const { 1914 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.Percentiles) 1915 size_t total_size = 0; 1916 1917 total_size += _internal_metadata_.unknown_fields().size(); 1918 1919 if (_has_bits_[0 / 32] & 63u) { 1920 if (has_p10()) { 1921 total_size += 1 + 8; 1922 } 1923 1924 if (has_p25()) { 1925 total_size += 1 + 8; 1926 } 1927 1928 if (has_p50()) { 1929 total_size += 1 + 8; 1930 } 1931 1932 if (has_p75()) { 1933 total_size += 1 + 8; 1934 } 1935 1936 if (has_p90()) { 1937 total_size += 1 + 8; 1938 } 1939 1940 if (has_pmax()) { 1941 total_size += 1 + 8; 1942 } 1943 1944 } 1945 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 1946 SetCachedSize(cached_size); 1947 return total_size; 1948 } 1949 1950 void Percentiles::CheckTypeAndMergeFrom( 1951 const ::google::protobuf::MessageLite& from) { 1952 MergeFrom(*::google::protobuf::down_cast<const Percentiles*>(&from)); 1953 } 1954 1955 void Percentiles::MergeFrom(const Percentiles& from) { 1956 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.Percentiles) 1957 GOOGLE_DCHECK_NE(&from, this); 1958 _internal_metadata_.MergeFrom(from._internal_metadata_); 1959 ::google::protobuf::uint32 cached_has_bits = 0; 1960 (void) cached_has_bits; 1961 1962 cached_has_bits = from._has_bits_[0]; 1963 if (cached_has_bits & 63u) { 1964 if (cached_has_bits & 0x00000001u) { 1965 p10_ = from.p10_; 1966 } 1967 if (cached_has_bits & 0x00000002u) { 1968 p25_ = from.p25_; 1969 } 1970 if (cached_has_bits & 0x00000004u) { 1971 p50_ = from.p50_; 1972 } 1973 if (cached_has_bits & 0x00000008u) { 1974 p75_ = from.p75_; 1975 } 1976 if (cached_has_bits & 0x00000010u) { 1977 p90_ = from.p90_; 1978 } 1979 if (cached_has_bits & 0x00000020u) { 1980 pmax_ = from.pmax_; 1981 } 1982 _has_bits_[0] |= cached_has_bits; 1983 } 1984 } 1985 1986 void Percentiles::CopyFrom(const Percentiles& from) { 1987 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.Percentiles) 1988 if (&from == this) return; 1989 Clear(); 1990 MergeFrom(from); 1991 } 1992 1993 bool Percentiles::IsInitialized() const { 1994 return true; 1995 } 1996 1997 void Percentiles::Swap(Percentiles* other) { 1998 if (other == this) return; 1999 InternalSwap(other); 2000 } 2001 void Percentiles::InternalSwap(Percentiles* other) { 2002 using std::swap; 2003 swap(p10_, other->p10_); 2004 swap(p25_, other->p25_); 2005 swap(p50_, other->p50_); 2006 swap(p75_, other->p75_); 2007 swap(p90_, other->p90_); 2008 swap(pmax_, other->pmax_); 2009 swap(_has_bits_[0], other->_has_bits_[0]); 2010 _internal_metadata_.Swap(&other->_internal_metadata_); 2011 } 2012 2013 ::std::string Percentiles::GetTypeName() const { 2014 return "cockroach.roachpb.Percentiles"; 2015 } 2016 2017 2018 // =================================================================== 2019 2020 void StoreCapacity::InitAsDefaultInstance() { 2021 ::cockroach::roachpb::_StoreCapacity_default_instance_._instance.get_mutable()->bytes_per_replica_ = const_cast< ::cockroach::roachpb::Percentiles*>( 2022 ::cockroach::roachpb::Percentiles::internal_default_instance()); 2023 ::cockroach::roachpb::_StoreCapacity_default_instance_._instance.get_mutable()->writes_per_replica_ = const_cast< ::cockroach::roachpb::Percentiles*>( 2024 ::cockroach::roachpb::Percentiles::internal_default_instance()); 2025 } 2026 #if !defined(_MSC_VER) || _MSC_VER >= 1900 2027 const int StoreCapacity::kCapacityFieldNumber; 2028 const int StoreCapacity::kAvailableFieldNumber; 2029 const int StoreCapacity::kUsedFieldNumber; 2030 const int StoreCapacity::kLogicalBytesFieldNumber; 2031 const int StoreCapacity::kRangeCountFieldNumber; 2032 const int StoreCapacity::kLeaseCountFieldNumber; 2033 const int StoreCapacity::kQueriesPerSecondFieldNumber; 2034 const int StoreCapacity::kWritesPerSecondFieldNumber; 2035 const int StoreCapacity::kBytesPerReplicaFieldNumber; 2036 const int StoreCapacity::kWritesPerReplicaFieldNumber; 2037 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 2038 2039 StoreCapacity::StoreCapacity() 2040 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 2041 ::google::protobuf::internal::InitSCC( 2042 &protobuf_roachpb_2fmetadata_2eproto::scc_info_StoreCapacity.base); 2043 SharedCtor(); 2044 // @@protoc_insertion_point(constructor:cockroach.roachpb.StoreCapacity) 2045 } 2046 StoreCapacity::StoreCapacity(const StoreCapacity& from) 2047 : ::google::protobuf::MessageLite(), 2048 _internal_metadata_(NULL), 2049 _has_bits_(from._has_bits_) { 2050 _internal_metadata_.MergeFrom(from._internal_metadata_); 2051 if (from.has_bytes_per_replica()) { 2052 bytes_per_replica_ = new ::cockroach::roachpb::Percentiles(*from.bytes_per_replica_); 2053 } else { 2054 bytes_per_replica_ = NULL; 2055 } 2056 if (from.has_writes_per_replica()) { 2057 writes_per_replica_ = new ::cockroach::roachpb::Percentiles(*from.writes_per_replica_); 2058 } else { 2059 writes_per_replica_ = NULL; 2060 } 2061 ::memcpy(&capacity_, &from.capacity_, 2062 static_cast<size_t>(reinterpret_cast<char*>(&queries_per_second_) - 2063 reinterpret_cast<char*>(&capacity_)) + sizeof(queries_per_second_)); 2064 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.StoreCapacity) 2065 } 2066 2067 void StoreCapacity::SharedCtor() { 2068 ::memset(&bytes_per_replica_, 0, static_cast<size_t>( 2069 reinterpret_cast<char*>(&queries_per_second_) - 2070 reinterpret_cast<char*>(&bytes_per_replica_)) + sizeof(queries_per_second_)); 2071 } 2072 2073 StoreCapacity::~StoreCapacity() { 2074 // @@protoc_insertion_point(destructor:cockroach.roachpb.StoreCapacity) 2075 SharedDtor(); 2076 } 2077 2078 void StoreCapacity::SharedDtor() { 2079 if (this != internal_default_instance()) delete bytes_per_replica_; 2080 if (this != internal_default_instance()) delete writes_per_replica_; 2081 } 2082 2083 void StoreCapacity::SetCachedSize(int size) const { 2084 _cached_size_.Set(size); 2085 } 2086 const StoreCapacity& StoreCapacity::default_instance() { 2087 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_StoreCapacity.base); 2088 return *internal_default_instance(); 2089 } 2090 2091 2092 void StoreCapacity::Clear() { 2093 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.StoreCapacity) 2094 ::google::protobuf::uint32 cached_has_bits = 0; 2095 // Prevent compiler warnings about cached_has_bits being unused 2096 (void) cached_has_bits; 2097 2098 cached_has_bits = _has_bits_[0]; 2099 if (cached_has_bits & 3u) { 2100 if (cached_has_bits & 0x00000001u) { 2101 GOOGLE_DCHECK(bytes_per_replica_ != NULL); 2102 bytes_per_replica_->Clear(); 2103 } 2104 if (cached_has_bits & 0x00000002u) { 2105 GOOGLE_DCHECK(writes_per_replica_ != NULL); 2106 writes_per_replica_->Clear(); 2107 } 2108 } 2109 if (cached_has_bits & 252u) { 2110 ::memset(&capacity_, 0, static_cast<size_t>( 2111 reinterpret_cast<char*>(&used_) - 2112 reinterpret_cast<char*>(&capacity_)) + sizeof(used_)); 2113 } 2114 if (cached_has_bits & 768u) { 2115 ::memset(&logical_bytes_, 0, static_cast<size_t>( 2116 reinterpret_cast<char*>(&queries_per_second_) - 2117 reinterpret_cast<char*>(&logical_bytes_)) + sizeof(queries_per_second_)); 2118 } 2119 _has_bits_.Clear(); 2120 _internal_metadata_.Clear(); 2121 } 2122 2123 bool StoreCapacity::MergePartialFromCodedStream( 2124 ::google::protobuf::io::CodedInputStream* input) { 2125 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 2126 ::google::protobuf::uint32 tag; 2127 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 2128 &_internal_metadata_); 2129 ::google::protobuf::io::StringOutputStream unknown_fields_output( 2130 unknown_fields_setter.buffer()); 2131 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 2132 &unknown_fields_output, false); 2133 // @@protoc_insertion_point(parse_start:cockroach.roachpb.StoreCapacity) 2134 for (;;) { 2135 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 2136 tag = p.first; 2137 if (!p.second) goto handle_unusual; 2138 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 2139 case 1: { 2140 if (static_cast< ::google::protobuf::uint8>(tag) == 2141 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 2142 set_has_capacity(); 2143 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2144 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 2145 input, &capacity_))); 2146 } else { 2147 goto handle_unusual; 2148 } 2149 break; 2150 } 2151 2152 case 2: { 2153 if (static_cast< ::google::protobuf::uint8>(tag) == 2154 static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { 2155 set_has_available(); 2156 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2157 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 2158 input, &available_))); 2159 } else { 2160 goto handle_unusual; 2161 } 2162 break; 2163 } 2164 2165 case 3: { 2166 if (static_cast< ::google::protobuf::uint8>(tag) == 2167 static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { 2168 set_has_range_count(); 2169 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2170 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 2171 input, &range_count_))); 2172 } else { 2173 goto handle_unusual; 2174 } 2175 break; 2176 } 2177 2178 case 4: { 2179 if (static_cast< ::google::protobuf::uint8>(tag) == 2180 static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { 2181 set_has_lease_count(); 2182 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2183 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 2184 input, &lease_count_))); 2185 } else { 2186 goto handle_unusual; 2187 } 2188 break; 2189 } 2190 2191 case 5: { 2192 if (static_cast< ::google::protobuf::uint8>(tag) == 2193 static_cast< ::google::protobuf::uint8>(41u /* 41 & 0xFF */)) { 2194 set_has_writes_per_second(); 2195 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2196 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 2197 input, &writes_per_second_))); 2198 } else { 2199 goto handle_unusual; 2200 } 2201 break; 2202 } 2203 2204 case 6: { 2205 if (static_cast< ::google::protobuf::uint8>(tag) == 2206 static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { 2207 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 2208 input, mutable_bytes_per_replica())); 2209 } else { 2210 goto handle_unusual; 2211 } 2212 break; 2213 } 2214 2215 case 7: { 2216 if (static_cast< ::google::protobuf::uint8>(tag) == 2217 static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { 2218 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 2219 input, mutable_writes_per_replica())); 2220 } else { 2221 goto handle_unusual; 2222 } 2223 break; 2224 } 2225 2226 case 8: { 2227 if (static_cast< ::google::protobuf::uint8>(tag) == 2228 static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) { 2229 set_has_used(); 2230 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2231 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 2232 input, &used_))); 2233 } else { 2234 goto handle_unusual; 2235 } 2236 break; 2237 } 2238 2239 case 9: { 2240 if (static_cast< ::google::protobuf::uint8>(tag) == 2241 static_cast< ::google::protobuf::uint8>(72u /* 72 & 0xFF */)) { 2242 set_has_logical_bytes(); 2243 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2244 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 2245 input, &logical_bytes_))); 2246 } else { 2247 goto handle_unusual; 2248 } 2249 break; 2250 } 2251 2252 case 10: { 2253 if (static_cast< ::google::protobuf::uint8>(tag) == 2254 static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) { 2255 set_has_queries_per_second(); 2256 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2257 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( 2258 input, &queries_per_second_))); 2259 } else { 2260 goto handle_unusual; 2261 } 2262 break; 2263 } 2264 2265 default: { 2266 handle_unusual: 2267 if (tag == 0) { 2268 goto success; 2269 } 2270 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 2271 input, tag, &unknown_fields_stream)); 2272 break; 2273 } 2274 } 2275 } 2276 success: 2277 // @@protoc_insertion_point(parse_success:cockroach.roachpb.StoreCapacity) 2278 return true; 2279 failure: 2280 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.StoreCapacity) 2281 return false; 2282 #undef DO_ 2283 } 2284 2285 void StoreCapacity::SerializeWithCachedSizes( 2286 ::google::protobuf::io::CodedOutputStream* output) const { 2287 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.StoreCapacity) 2288 ::google::protobuf::uint32 cached_has_bits = 0; 2289 (void) cached_has_bits; 2290 2291 cached_has_bits = _has_bits_[0]; 2292 if (cached_has_bits & 0x00000004u) { 2293 ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->capacity(), output); 2294 } 2295 2296 if (cached_has_bits & 0x00000008u) { 2297 ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->available(), output); 2298 } 2299 2300 if (cached_has_bits & 0x00000010u) { 2301 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->range_count(), output); 2302 } 2303 2304 if (cached_has_bits & 0x00000020u) { 2305 ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->lease_count(), output); 2306 } 2307 2308 if (cached_has_bits & 0x00000040u) { 2309 ::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->writes_per_second(), output); 2310 } 2311 2312 if (cached_has_bits & 0x00000001u) { 2313 ::google::protobuf::internal::WireFormatLite::WriteMessage( 2314 6, this->_internal_bytes_per_replica(), output); 2315 } 2316 2317 if (cached_has_bits & 0x00000002u) { 2318 ::google::protobuf::internal::WireFormatLite::WriteMessage( 2319 7, this->_internal_writes_per_replica(), output); 2320 } 2321 2322 if (cached_has_bits & 0x00000080u) { 2323 ::google::protobuf::internal::WireFormatLite::WriteInt64(8, this->used(), output); 2324 } 2325 2326 if (cached_has_bits & 0x00000100u) { 2327 ::google::protobuf::internal::WireFormatLite::WriteInt64(9, this->logical_bytes(), output); 2328 } 2329 2330 if (cached_has_bits & 0x00000200u) { 2331 ::google::protobuf::internal::WireFormatLite::WriteDouble(10, this->queries_per_second(), output); 2332 } 2333 2334 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 2335 static_cast<int>(_internal_metadata_.unknown_fields().size())); 2336 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.StoreCapacity) 2337 } 2338 2339 size_t StoreCapacity::ByteSizeLong() const { 2340 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.StoreCapacity) 2341 size_t total_size = 0; 2342 2343 total_size += _internal_metadata_.unknown_fields().size(); 2344 2345 if (_has_bits_[0 / 32] & 255u) { 2346 if (has_bytes_per_replica()) { 2347 total_size += 1 + 2348 ::google::protobuf::internal::WireFormatLite::MessageSize( 2349 *bytes_per_replica_); 2350 } 2351 2352 if (has_writes_per_replica()) { 2353 total_size += 1 + 2354 ::google::protobuf::internal::WireFormatLite::MessageSize( 2355 *writes_per_replica_); 2356 } 2357 2358 if (has_capacity()) { 2359 total_size += 1 + 2360 ::google::protobuf::internal::WireFormatLite::Int64Size( 2361 this->capacity()); 2362 } 2363 2364 if (has_available()) { 2365 total_size += 1 + 2366 ::google::protobuf::internal::WireFormatLite::Int64Size( 2367 this->available()); 2368 } 2369 2370 if (has_range_count()) { 2371 total_size += 1 + 2372 ::google::protobuf::internal::WireFormatLite::Int32Size( 2373 this->range_count()); 2374 } 2375 2376 if (has_lease_count()) { 2377 total_size += 1 + 2378 ::google::protobuf::internal::WireFormatLite::Int32Size( 2379 this->lease_count()); 2380 } 2381 2382 if (has_writes_per_second()) { 2383 total_size += 1 + 8; 2384 } 2385 2386 if (has_used()) { 2387 total_size += 1 + 2388 ::google::protobuf::internal::WireFormatLite::Int64Size( 2389 this->used()); 2390 } 2391 2392 } 2393 if (_has_bits_[8 / 32] & 768u) { 2394 if (has_logical_bytes()) { 2395 total_size += 1 + 2396 ::google::protobuf::internal::WireFormatLite::Int64Size( 2397 this->logical_bytes()); 2398 } 2399 2400 if (has_queries_per_second()) { 2401 total_size += 1 + 8; 2402 } 2403 2404 } 2405 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 2406 SetCachedSize(cached_size); 2407 return total_size; 2408 } 2409 2410 void StoreCapacity::CheckTypeAndMergeFrom( 2411 const ::google::protobuf::MessageLite& from) { 2412 MergeFrom(*::google::protobuf::down_cast<const StoreCapacity*>(&from)); 2413 } 2414 2415 void StoreCapacity::MergeFrom(const StoreCapacity& from) { 2416 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.StoreCapacity) 2417 GOOGLE_DCHECK_NE(&from, this); 2418 _internal_metadata_.MergeFrom(from._internal_metadata_); 2419 ::google::protobuf::uint32 cached_has_bits = 0; 2420 (void) cached_has_bits; 2421 2422 cached_has_bits = from._has_bits_[0]; 2423 if (cached_has_bits & 255u) { 2424 if (cached_has_bits & 0x00000001u) { 2425 mutable_bytes_per_replica()->::cockroach::roachpb::Percentiles::MergeFrom(from.bytes_per_replica()); 2426 } 2427 if (cached_has_bits & 0x00000002u) { 2428 mutable_writes_per_replica()->::cockroach::roachpb::Percentiles::MergeFrom(from.writes_per_replica()); 2429 } 2430 if (cached_has_bits & 0x00000004u) { 2431 capacity_ = from.capacity_; 2432 } 2433 if (cached_has_bits & 0x00000008u) { 2434 available_ = from.available_; 2435 } 2436 if (cached_has_bits & 0x00000010u) { 2437 range_count_ = from.range_count_; 2438 } 2439 if (cached_has_bits & 0x00000020u) { 2440 lease_count_ = from.lease_count_; 2441 } 2442 if (cached_has_bits & 0x00000040u) { 2443 writes_per_second_ = from.writes_per_second_; 2444 } 2445 if (cached_has_bits & 0x00000080u) { 2446 used_ = from.used_; 2447 } 2448 _has_bits_[0] |= cached_has_bits; 2449 } 2450 if (cached_has_bits & 768u) { 2451 if (cached_has_bits & 0x00000100u) { 2452 logical_bytes_ = from.logical_bytes_; 2453 } 2454 if (cached_has_bits & 0x00000200u) { 2455 queries_per_second_ = from.queries_per_second_; 2456 } 2457 _has_bits_[0] |= cached_has_bits; 2458 } 2459 } 2460 2461 void StoreCapacity::CopyFrom(const StoreCapacity& from) { 2462 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.StoreCapacity) 2463 if (&from == this) return; 2464 Clear(); 2465 MergeFrom(from); 2466 } 2467 2468 bool StoreCapacity::IsInitialized() const { 2469 return true; 2470 } 2471 2472 void StoreCapacity::Swap(StoreCapacity* other) { 2473 if (other == this) return; 2474 InternalSwap(other); 2475 } 2476 void StoreCapacity::InternalSwap(StoreCapacity* other) { 2477 using std::swap; 2478 swap(bytes_per_replica_, other->bytes_per_replica_); 2479 swap(writes_per_replica_, other->writes_per_replica_); 2480 swap(capacity_, other->capacity_); 2481 swap(available_, other->available_); 2482 swap(range_count_, other->range_count_); 2483 swap(lease_count_, other->lease_count_); 2484 swap(writes_per_second_, other->writes_per_second_); 2485 swap(used_, other->used_); 2486 swap(logical_bytes_, other->logical_bytes_); 2487 swap(queries_per_second_, other->queries_per_second_); 2488 swap(_has_bits_[0], other->_has_bits_[0]); 2489 _internal_metadata_.Swap(&other->_internal_metadata_); 2490 } 2491 2492 ::std::string StoreCapacity::GetTypeName() const { 2493 return "cockroach.roachpb.StoreCapacity"; 2494 } 2495 2496 2497 // =================================================================== 2498 2499 void NodeDescriptor::InitAsDefaultInstance() { 2500 ::cockroach::roachpb::_NodeDescriptor_default_instance_._instance.get_mutable()->address_ = const_cast< ::cockroach::util::UnresolvedAddr*>( 2501 ::cockroach::util::UnresolvedAddr::internal_default_instance()); 2502 ::cockroach::roachpb::_NodeDescriptor_default_instance_._instance.get_mutable()->attrs_ = const_cast< ::cockroach::roachpb::Attributes*>( 2503 ::cockroach::roachpb::Attributes::internal_default_instance()); 2504 ::cockroach::roachpb::_NodeDescriptor_default_instance_._instance.get_mutable()->locality_ = const_cast< ::cockroach::roachpb::Locality*>( 2505 ::cockroach::roachpb::Locality::internal_default_instance()); 2506 ::cockroach::roachpb::_NodeDescriptor_default_instance_._instance.get_mutable()->serverversion_ = const_cast< ::cockroach::roachpb::Version*>( 2507 ::cockroach::roachpb::Version::internal_default_instance()); 2508 ::cockroach::roachpb::_NodeDescriptor_default_instance_._instance.get_mutable()->sql_address_ = const_cast< ::cockroach::util::UnresolvedAddr*>( 2509 ::cockroach::util::UnresolvedAddr::internal_default_instance()); 2510 } 2511 void NodeDescriptor::clear_address() { 2512 if (address_ != NULL) address_->Clear(); 2513 clear_has_address(); 2514 } 2515 void NodeDescriptor::clear_sql_address() { 2516 if (sql_address_ != NULL) sql_address_->Clear(); 2517 clear_has_sql_address(); 2518 } 2519 #if !defined(_MSC_VER) || _MSC_VER >= 1900 2520 const int NodeDescriptor::kNodeIdFieldNumber; 2521 const int NodeDescriptor::kAddressFieldNumber; 2522 const int NodeDescriptor::kAttrsFieldNumber; 2523 const int NodeDescriptor::kLocalityFieldNumber; 2524 const int NodeDescriptor::kServerVersionFieldNumber; 2525 const int NodeDescriptor::kBuildTagFieldNumber; 2526 const int NodeDescriptor::kStartedAtFieldNumber; 2527 const int NodeDescriptor::kLocalityAddressFieldNumber; 2528 const int NodeDescriptor::kClusterNameFieldNumber; 2529 const int NodeDescriptor::kSqlAddressFieldNumber; 2530 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 2531 2532 NodeDescriptor::NodeDescriptor() 2533 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 2534 ::google::protobuf::internal::InitSCC( 2535 &protobuf_roachpb_2fmetadata_2eproto::scc_info_NodeDescriptor.base); 2536 SharedCtor(); 2537 // @@protoc_insertion_point(constructor:cockroach.roachpb.NodeDescriptor) 2538 } 2539 NodeDescriptor::NodeDescriptor(const NodeDescriptor& from) 2540 : ::google::protobuf::MessageLite(), 2541 _internal_metadata_(NULL), 2542 _has_bits_(from._has_bits_), 2543 locality_address_(from.locality_address_) { 2544 _internal_metadata_.MergeFrom(from._internal_metadata_); 2545 build_tag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 2546 if (from.has_build_tag()) { 2547 build_tag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.build_tag_); 2548 } 2549 cluster_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 2550 if (from.has_cluster_name()) { 2551 cluster_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_name_); 2552 } 2553 if (from.has_address()) { 2554 address_ = new ::cockroach::util::UnresolvedAddr(*from.address_); 2555 } else { 2556 address_ = NULL; 2557 } 2558 if (from.has_attrs()) { 2559 attrs_ = new ::cockroach::roachpb::Attributes(*from.attrs_); 2560 } else { 2561 attrs_ = NULL; 2562 } 2563 if (from.has_locality()) { 2564 locality_ = new ::cockroach::roachpb::Locality(*from.locality_); 2565 } else { 2566 locality_ = NULL; 2567 } 2568 if (from.has_serverversion()) { 2569 serverversion_ = new ::cockroach::roachpb::Version(*from.serverversion_); 2570 } else { 2571 serverversion_ = NULL; 2572 } 2573 if (from.has_sql_address()) { 2574 sql_address_ = new ::cockroach::util::UnresolvedAddr(*from.sql_address_); 2575 } else { 2576 sql_address_ = NULL; 2577 } 2578 ::memcpy(&started_at_, &from.started_at_, 2579 static_cast<size_t>(reinterpret_cast<char*>(&node_id_) - 2580 reinterpret_cast<char*>(&started_at_)) + sizeof(node_id_)); 2581 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.NodeDescriptor) 2582 } 2583 2584 void NodeDescriptor::SharedCtor() { 2585 build_tag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 2586 cluster_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 2587 ::memset(&address_, 0, static_cast<size_t>( 2588 reinterpret_cast<char*>(&node_id_) - 2589 reinterpret_cast<char*>(&address_)) + sizeof(node_id_)); 2590 } 2591 2592 NodeDescriptor::~NodeDescriptor() { 2593 // @@protoc_insertion_point(destructor:cockroach.roachpb.NodeDescriptor) 2594 SharedDtor(); 2595 } 2596 2597 void NodeDescriptor::SharedDtor() { 2598 build_tag_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 2599 cluster_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 2600 if (this != internal_default_instance()) delete address_; 2601 if (this != internal_default_instance()) delete attrs_; 2602 if (this != internal_default_instance()) delete locality_; 2603 if (this != internal_default_instance()) delete serverversion_; 2604 if (this != internal_default_instance()) delete sql_address_; 2605 } 2606 2607 void NodeDescriptor::SetCachedSize(int size) const { 2608 _cached_size_.Set(size); 2609 } 2610 const NodeDescriptor& NodeDescriptor::default_instance() { 2611 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_NodeDescriptor.base); 2612 return *internal_default_instance(); 2613 } 2614 2615 2616 void NodeDescriptor::Clear() { 2617 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.NodeDescriptor) 2618 ::google::protobuf::uint32 cached_has_bits = 0; 2619 // Prevent compiler warnings about cached_has_bits being unused 2620 (void) cached_has_bits; 2621 2622 locality_address_.Clear(); 2623 cached_has_bits = _has_bits_[0]; 2624 if (cached_has_bits & 127u) { 2625 if (cached_has_bits & 0x00000001u) { 2626 build_tag_.ClearNonDefaultToEmptyNoArena(); 2627 } 2628 if (cached_has_bits & 0x00000002u) { 2629 cluster_name_.ClearNonDefaultToEmptyNoArena(); 2630 } 2631 if (cached_has_bits & 0x00000004u) { 2632 GOOGLE_DCHECK(address_ != NULL); 2633 address_->Clear(); 2634 } 2635 if (cached_has_bits & 0x00000008u) { 2636 GOOGLE_DCHECK(attrs_ != NULL); 2637 attrs_->Clear(); 2638 } 2639 if (cached_has_bits & 0x00000010u) { 2640 GOOGLE_DCHECK(locality_ != NULL); 2641 locality_->Clear(); 2642 } 2643 if (cached_has_bits & 0x00000020u) { 2644 GOOGLE_DCHECK(serverversion_ != NULL); 2645 serverversion_->Clear(); 2646 } 2647 if (cached_has_bits & 0x00000040u) { 2648 GOOGLE_DCHECK(sql_address_ != NULL); 2649 sql_address_->Clear(); 2650 } 2651 } 2652 started_at_ = GOOGLE_LONGLONG(0); 2653 node_id_ = 0; 2654 _has_bits_.Clear(); 2655 _internal_metadata_.Clear(); 2656 } 2657 2658 bool NodeDescriptor::MergePartialFromCodedStream( 2659 ::google::protobuf::io::CodedInputStream* input) { 2660 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 2661 ::google::protobuf::uint32 tag; 2662 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 2663 &_internal_metadata_); 2664 ::google::protobuf::io::StringOutputStream unknown_fields_output( 2665 unknown_fields_setter.buffer()); 2666 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 2667 &unknown_fields_output, false); 2668 // @@protoc_insertion_point(parse_start:cockroach.roachpb.NodeDescriptor) 2669 for (;;) { 2670 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 2671 tag = p.first; 2672 if (!p.second) goto handle_unusual; 2673 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 2674 case 1: { 2675 if (static_cast< ::google::protobuf::uint8>(tag) == 2676 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 2677 set_has_node_id(); 2678 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2679 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 2680 input, &node_id_))); 2681 } else { 2682 goto handle_unusual; 2683 } 2684 break; 2685 } 2686 2687 case 2: { 2688 if (static_cast< ::google::protobuf::uint8>(tag) == 2689 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 2690 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 2691 input, mutable_address())); 2692 } else { 2693 goto handle_unusual; 2694 } 2695 break; 2696 } 2697 2698 case 3: { 2699 if (static_cast< ::google::protobuf::uint8>(tag) == 2700 static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { 2701 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 2702 input, mutable_attrs())); 2703 } else { 2704 goto handle_unusual; 2705 } 2706 break; 2707 } 2708 2709 case 4: { 2710 if (static_cast< ::google::protobuf::uint8>(tag) == 2711 static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { 2712 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 2713 input, mutable_locality())); 2714 } else { 2715 goto handle_unusual; 2716 } 2717 break; 2718 } 2719 2720 case 5: { 2721 if (static_cast< ::google::protobuf::uint8>(tag) == 2722 static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { 2723 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 2724 input, mutable_serverversion())); 2725 } else { 2726 goto handle_unusual; 2727 } 2728 break; 2729 } 2730 2731 case 6: { 2732 if (static_cast< ::google::protobuf::uint8>(tag) == 2733 static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { 2734 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 2735 input, this->mutable_build_tag())); 2736 } else { 2737 goto handle_unusual; 2738 } 2739 break; 2740 } 2741 2742 case 7: { 2743 if (static_cast< ::google::protobuf::uint8>(tag) == 2744 static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { 2745 set_has_started_at(); 2746 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 2747 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( 2748 input, &started_at_))); 2749 } else { 2750 goto handle_unusual; 2751 } 2752 break; 2753 } 2754 2755 case 8: { 2756 if (static_cast< ::google::protobuf::uint8>(tag) == 2757 static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { 2758 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 2759 input, add_locality_address())); 2760 } else { 2761 goto handle_unusual; 2762 } 2763 break; 2764 } 2765 2766 case 9: { 2767 if (static_cast< ::google::protobuf::uint8>(tag) == 2768 static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { 2769 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 2770 input, this->mutable_cluster_name())); 2771 } else { 2772 goto handle_unusual; 2773 } 2774 break; 2775 } 2776 2777 case 10: { 2778 if (static_cast< ::google::protobuf::uint8>(tag) == 2779 static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { 2780 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 2781 input, mutable_sql_address())); 2782 } else { 2783 goto handle_unusual; 2784 } 2785 break; 2786 } 2787 2788 default: { 2789 handle_unusual: 2790 if (tag == 0) { 2791 goto success; 2792 } 2793 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 2794 input, tag, &unknown_fields_stream)); 2795 break; 2796 } 2797 } 2798 } 2799 success: 2800 // @@protoc_insertion_point(parse_success:cockroach.roachpb.NodeDescriptor) 2801 return true; 2802 failure: 2803 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.NodeDescriptor) 2804 return false; 2805 #undef DO_ 2806 } 2807 2808 void NodeDescriptor::SerializeWithCachedSizes( 2809 ::google::protobuf::io::CodedOutputStream* output) const { 2810 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.NodeDescriptor) 2811 ::google::protobuf::uint32 cached_has_bits = 0; 2812 (void) cached_has_bits; 2813 2814 cached_has_bits = _has_bits_[0]; 2815 if (cached_has_bits & 0x00000100u) { 2816 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->node_id(), output); 2817 } 2818 2819 if (cached_has_bits & 0x00000004u) { 2820 ::google::protobuf::internal::WireFormatLite::WriteMessage( 2821 2, this->_internal_address(), output); 2822 } 2823 2824 if (cached_has_bits & 0x00000008u) { 2825 ::google::protobuf::internal::WireFormatLite::WriteMessage( 2826 3, this->_internal_attrs(), output); 2827 } 2828 2829 if (cached_has_bits & 0x00000010u) { 2830 ::google::protobuf::internal::WireFormatLite::WriteMessage( 2831 4, this->_internal_locality(), output); 2832 } 2833 2834 if (cached_has_bits & 0x00000020u) { 2835 ::google::protobuf::internal::WireFormatLite::WriteMessage( 2836 5, this->_internal_serverversion(), output); 2837 } 2838 2839 if (cached_has_bits & 0x00000001u) { 2840 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2841 6, this->build_tag(), output); 2842 } 2843 2844 if (cached_has_bits & 0x00000080u) { 2845 ::google::protobuf::internal::WireFormatLite::WriteInt64(7, this->started_at(), output); 2846 } 2847 2848 for (unsigned int i = 0, 2849 n = static_cast<unsigned int>(this->locality_address_size()); i < n; i++) { 2850 ::google::protobuf::internal::WireFormatLite::WriteMessage( 2851 8, 2852 this->locality_address(static_cast<int>(i)), 2853 output); 2854 } 2855 2856 if (cached_has_bits & 0x00000002u) { 2857 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2858 9, this->cluster_name(), output); 2859 } 2860 2861 if (cached_has_bits & 0x00000040u) { 2862 ::google::protobuf::internal::WireFormatLite::WriteMessage( 2863 10, this->_internal_sql_address(), output); 2864 } 2865 2866 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 2867 static_cast<int>(_internal_metadata_.unknown_fields().size())); 2868 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.NodeDescriptor) 2869 } 2870 2871 size_t NodeDescriptor::ByteSizeLong() const { 2872 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.NodeDescriptor) 2873 size_t total_size = 0; 2874 2875 total_size += _internal_metadata_.unknown_fields().size(); 2876 2877 { 2878 unsigned int count = static_cast<unsigned int>(this->locality_address_size()); 2879 total_size += 1UL * count; 2880 for (unsigned int i = 0; i < count; i++) { 2881 total_size += 2882 ::google::protobuf::internal::WireFormatLite::MessageSize( 2883 this->locality_address(static_cast<int>(i))); 2884 } 2885 } 2886 2887 if (_has_bits_[0 / 32] & 255u) { 2888 if (has_build_tag()) { 2889 total_size += 1 + 2890 ::google::protobuf::internal::WireFormatLite::StringSize( 2891 this->build_tag()); 2892 } 2893 2894 if (has_cluster_name()) { 2895 total_size += 1 + 2896 ::google::protobuf::internal::WireFormatLite::StringSize( 2897 this->cluster_name()); 2898 } 2899 2900 if (has_address()) { 2901 total_size += 1 + 2902 ::google::protobuf::internal::WireFormatLite::MessageSize( 2903 *address_); 2904 } 2905 2906 if (has_attrs()) { 2907 total_size += 1 + 2908 ::google::protobuf::internal::WireFormatLite::MessageSize( 2909 *attrs_); 2910 } 2911 2912 if (has_locality()) { 2913 total_size += 1 + 2914 ::google::protobuf::internal::WireFormatLite::MessageSize( 2915 *locality_); 2916 } 2917 2918 if (has_serverversion()) { 2919 total_size += 1 + 2920 ::google::protobuf::internal::WireFormatLite::MessageSize( 2921 *serverversion_); 2922 } 2923 2924 if (has_sql_address()) { 2925 total_size += 1 + 2926 ::google::protobuf::internal::WireFormatLite::MessageSize( 2927 *sql_address_); 2928 } 2929 2930 if (has_started_at()) { 2931 total_size += 1 + 2932 ::google::protobuf::internal::WireFormatLite::Int64Size( 2933 this->started_at()); 2934 } 2935 2936 } 2937 if (has_node_id()) { 2938 total_size += 1 + 2939 ::google::protobuf::internal::WireFormatLite::Int32Size( 2940 this->node_id()); 2941 } 2942 2943 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 2944 SetCachedSize(cached_size); 2945 return total_size; 2946 } 2947 2948 void NodeDescriptor::CheckTypeAndMergeFrom( 2949 const ::google::protobuf::MessageLite& from) { 2950 MergeFrom(*::google::protobuf::down_cast<const NodeDescriptor*>(&from)); 2951 } 2952 2953 void NodeDescriptor::MergeFrom(const NodeDescriptor& from) { 2954 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.NodeDescriptor) 2955 GOOGLE_DCHECK_NE(&from, this); 2956 _internal_metadata_.MergeFrom(from._internal_metadata_); 2957 ::google::protobuf::uint32 cached_has_bits = 0; 2958 (void) cached_has_bits; 2959 2960 locality_address_.MergeFrom(from.locality_address_); 2961 cached_has_bits = from._has_bits_[0]; 2962 if (cached_has_bits & 255u) { 2963 if (cached_has_bits & 0x00000001u) { 2964 set_has_build_tag(); 2965 build_tag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.build_tag_); 2966 } 2967 if (cached_has_bits & 0x00000002u) { 2968 set_has_cluster_name(); 2969 cluster_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.cluster_name_); 2970 } 2971 if (cached_has_bits & 0x00000004u) { 2972 mutable_address()->::cockroach::util::UnresolvedAddr::MergeFrom(from.address()); 2973 } 2974 if (cached_has_bits & 0x00000008u) { 2975 mutable_attrs()->::cockroach::roachpb::Attributes::MergeFrom(from.attrs()); 2976 } 2977 if (cached_has_bits & 0x00000010u) { 2978 mutable_locality()->::cockroach::roachpb::Locality::MergeFrom(from.locality()); 2979 } 2980 if (cached_has_bits & 0x00000020u) { 2981 mutable_serverversion()->::cockroach::roachpb::Version::MergeFrom(from.serverversion()); 2982 } 2983 if (cached_has_bits & 0x00000040u) { 2984 mutable_sql_address()->::cockroach::util::UnresolvedAddr::MergeFrom(from.sql_address()); 2985 } 2986 if (cached_has_bits & 0x00000080u) { 2987 started_at_ = from.started_at_; 2988 } 2989 _has_bits_[0] |= cached_has_bits; 2990 } 2991 if (cached_has_bits & 0x00000100u) { 2992 set_node_id(from.node_id()); 2993 } 2994 } 2995 2996 void NodeDescriptor::CopyFrom(const NodeDescriptor& from) { 2997 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.NodeDescriptor) 2998 if (&from == this) return; 2999 Clear(); 3000 MergeFrom(from); 3001 } 3002 3003 bool NodeDescriptor::IsInitialized() const { 3004 return true; 3005 } 3006 3007 void NodeDescriptor::Swap(NodeDescriptor* other) { 3008 if (other == this) return; 3009 InternalSwap(other); 3010 } 3011 void NodeDescriptor::InternalSwap(NodeDescriptor* other) { 3012 using std::swap; 3013 CastToBase(&locality_address_)->InternalSwap(CastToBase(&other->locality_address_)); 3014 build_tag_.Swap(&other->build_tag_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 3015 GetArenaNoVirtual()); 3016 cluster_name_.Swap(&other->cluster_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 3017 GetArenaNoVirtual()); 3018 swap(address_, other->address_); 3019 swap(attrs_, other->attrs_); 3020 swap(locality_, other->locality_); 3021 swap(serverversion_, other->serverversion_); 3022 swap(sql_address_, other->sql_address_); 3023 swap(started_at_, other->started_at_); 3024 swap(node_id_, other->node_id_); 3025 swap(_has_bits_[0], other->_has_bits_[0]); 3026 _internal_metadata_.Swap(&other->_internal_metadata_); 3027 } 3028 3029 ::std::string NodeDescriptor::GetTypeName() const { 3030 return "cockroach.roachpb.NodeDescriptor"; 3031 } 3032 3033 3034 // =================================================================== 3035 3036 void LocalityAddress::InitAsDefaultInstance() { 3037 ::cockroach::roachpb::_LocalityAddress_default_instance_._instance.get_mutable()->address_ = const_cast< ::cockroach::util::UnresolvedAddr*>( 3038 ::cockroach::util::UnresolvedAddr::internal_default_instance()); 3039 ::cockroach::roachpb::_LocalityAddress_default_instance_._instance.get_mutable()->locality_tier_ = const_cast< ::cockroach::roachpb::Tier*>( 3040 ::cockroach::roachpb::Tier::internal_default_instance()); 3041 } 3042 void LocalityAddress::clear_address() { 3043 if (address_ != NULL) address_->Clear(); 3044 clear_has_address(); 3045 } 3046 #if !defined(_MSC_VER) || _MSC_VER >= 1900 3047 const int LocalityAddress::kAddressFieldNumber; 3048 const int LocalityAddress::kLocalityTierFieldNumber; 3049 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 3050 3051 LocalityAddress::LocalityAddress() 3052 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 3053 ::google::protobuf::internal::InitSCC( 3054 &protobuf_roachpb_2fmetadata_2eproto::scc_info_LocalityAddress.base); 3055 SharedCtor(); 3056 // @@protoc_insertion_point(constructor:cockroach.roachpb.LocalityAddress) 3057 } 3058 LocalityAddress::LocalityAddress(const LocalityAddress& from) 3059 : ::google::protobuf::MessageLite(), 3060 _internal_metadata_(NULL), 3061 _has_bits_(from._has_bits_) { 3062 _internal_metadata_.MergeFrom(from._internal_metadata_); 3063 if (from.has_address()) { 3064 address_ = new ::cockroach::util::UnresolvedAddr(*from.address_); 3065 } else { 3066 address_ = NULL; 3067 } 3068 if (from.has_locality_tier()) { 3069 locality_tier_ = new ::cockroach::roachpb::Tier(*from.locality_tier_); 3070 } else { 3071 locality_tier_ = NULL; 3072 } 3073 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.LocalityAddress) 3074 } 3075 3076 void LocalityAddress::SharedCtor() { 3077 ::memset(&address_, 0, static_cast<size_t>( 3078 reinterpret_cast<char*>(&locality_tier_) - 3079 reinterpret_cast<char*>(&address_)) + sizeof(locality_tier_)); 3080 } 3081 3082 LocalityAddress::~LocalityAddress() { 3083 // @@protoc_insertion_point(destructor:cockroach.roachpb.LocalityAddress) 3084 SharedDtor(); 3085 } 3086 3087 void LocalityAddress::SharedDtor() { 3088 if (this != internal_default_instance()) delete address_; 3089 if (this != internal_default_instance()) delete locality_tier_; 3090 } 3091 3092 void LocalityAddress::SetCachedSize(int size) const { 3093 _cached_size_.Set(size); 3094 } 3095 const LocalityAddress& LocalityAddress::default_instance() { 3096 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_LocalityAddress.base); 3097 return *internal_default_instance(); 3098 } 3099 3100 3101 void LocalityAddress::Clear() { 3102 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.LocalityAddress) 3103 ::google::protobuf::uint32 cached_has_bits = 0; 3104 // Prevent compiler warnings about cached_has_bits being unused 3105 (void) cached_has_bits; 3106 3107 cached_has_bits = _has_bits_[0]; 3108 if (cached_has_bits & 3u) { 3109 if (cached_has_bits & 0x00000001u) { 3110 GOOGLE_DCHECK(address_ != NULL); 3111 address_->Clear(); 3112 } 3113 if (cached_has_bits & 0x00000002u) { 3114 GOOGLE_DCHECK(locality_tier_ != NULL); 3115 locality_tier_->Clear(); 3116 } 3117 } 3118 _has_bits_.Clear(); 3119 _internal_metadata_.Clear(); 3120 } 3121 3122 bool LocalityAddress::MergePartialFromCodedStream( 3123 ::google::protobuf::io::CodedInputStream* input) { 3124 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 3125 ::google::protobuf::uint32 tag; 3126 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 3127 &_internal_metadata_); 3128 ::google::protobuf::io::StringOutputStream unknown_fields_output( 3129 unknown_fields_setter.buffer()); 3130 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 3131 &unknown_fields_output, false); 3132 // @@protoc_insertion_point(parse_start:cockroach.roachpb.LocalityAddress) 3133 for (;;) { 3134 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 3135 tag = p.first; 3136 if (!p.second) goto handle_unusual; 3137 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 3138 case 1: { 3139 if (static_cast< ::google::protobuf::uint8>(tag) == 3140 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 3141 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 3142 input, mutable_address())); 3143 } else { 3144 goto handle_unusual; 3145 } 3146 break; 3147 } 3148 3149 case 2: { 3150 if (static_cast< ::google::protobuf::uint8>(tag) == 3151 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 3152 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 3153 input, mutable_locality_tier())); 3154 } else { 3155 goto handle_unusual; 3156 } 3157 break; 3158 } 3159 3160 default: { 3161 handle_unusual: 3162 if (tag == 0) { 3163 goto success; 3164 } 3165 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 3166 input, tag, &unknown_fields_stream)); 3167 break; 3168 } 3169 } 3170 } 3171 success: 3172 // @@protoc_insertion_point(parse_success:cockroach.roachpb.LocalityAddress) 3173 return true; 3174 failure: 3175 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.LocalityAddress) 3176 return false; 3177 #undef DO_ 3178 } 3179 3180 void LocalityAddress::SerializeWithCachedSizes( 3181 ::google::protobuf::io::CodedOutputStream* output) const { 3182 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.LocalityAddress) 3183 ::google::protobuf::uint32 cached_has_bits = 0; 3184 (void) cached_has_bits; 3185 3186 cached_has_bits = _has_bits_[0]; 3187 if (cached_has_bits & 0x00000001u) { 3188 ::google::protobuf::internal::WireFormatLite::WriteMessage( 3189 1, this->_internal_address(), output); 3190 } 3191 3192 if (cached_has_bits & 0x00000002u) { 3193 ::google::protobuf::internal::WireFormatLite::WriteMessage( 3194 2, this->_internal_locality_tier(), output); 3195 } 3196 3197 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 3198 static_cast<int>(_internal_metadata_.unknown_fields().size())); 3199 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.LocalityAddress) 3200 } 3201 3202 size_t LocalityAddress::ByteSizeLong() const { 3203 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.LocalityAddress) 3204 size_t total_size = 0; 3205 3206 total_size += _internal_metadata_.unknown_fields().size(); 3207 3208 if (_has_bits_[0 / 32] & 3u) { 3209 if (has_address()) { 3210 total_size += 1 + 3211 ::google::protobuf::internal::WireFormatLite::MessageSize( 3212 *address_); 3213 } 3214 3215 if (has_locality_tier()) { 3216 total_size += 1 + 3217 ::google::protobuf::internal::WireFormatLite::MessageSize( 3218 *locality_tier_); 3219 } 3220 3221 } 3222 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 3223 SetCachedSize(cached_size); 3224 return total_size; 3225 } 3226 3227 void LocalityAddress::CheckTypeAndMergeFrom( 3228 const ::google::protobuf::MessageLite& from) { 3229 MergeFrom(*::google::protobuf::down_cast<const LocalityAddress*>(&from)); 3230 } 3231 3232 void LocalityAddress::MergeFrom(const LocalityAddress& from) { 3233 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.LocalityAddress) 3234 GOOGLE_DCHECK_NE(&from, this); 3235 _internal_metadata_.MergeFrom(from._internal_metadata_); 3236 ::google::protobuf::uint32 cached_has_bits = 0; 3237 (void) cached_has_bits; 3238 3239 cached_has_bits = from._has_bits_[0]; 3240 if (cached_has_bits & 3u) { 3241 if (cached_has_bits & 0x00000001u) { 3242 mutable_address()->::cockroach::util::UnresolvedAddr::MergeFrom(from.address()); 3243 } 3244 if (cached_has_bits & 0x00000002u) { 3245 mutable_locality_tier()->::cockroach::roachpb::Tier::MergeFrom(from.locality_tier()); 3246 } 3247 } 3248 } 3249 3250 void LocalityAddress::CopyFrom(const LocalityAddress& from) { 3251 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.LocalityAddress) 3252 if (&from == this) return; 3253 Clear(); 3254 MergeFrom(from); 3255 } 3256 3257 bool LocalityAddress::IsInitialized() const { 3258 return true; 3259 } 3260 3261 void LocalityAddress::Swap(LocalityAddress* other) { 3262 if (other == this) return; 3263 InternalSwap(other); 3264 } 3265 void LocalityAddress::InternalSwap(LocalityAddress* other) { 3266 using std::swap; 3267 swap(address_, other->address_); 3268 swap(locality_tier_, other->locality_tier_); 3269 swap(_has_bits_[0], other->_has_bits_[0]); 3270 _internal_metadata_.Swap(&other->_internal_metadata_); 3271 } 3272 3273 ::std::string LocalityAddress::GetTypeName() const { 3274 return "cockroach.roachpb.LocalityAddress"; 3275 } 3276 3277 3278 // =================================================================== 3279 3280 void StoreDescriptor::InitAsDefaultInstance() { 3281 ::cockroach::roachpb::_StoreDescriptor_default_instance_._instance.get_mutable()->attrs_ = const_cast< ::cockroach::roachpb::Attributes*>( 3282 ::cockroach::roachpb::Attributes::internal_default_instance()); 3283 ::cockroach::roachpb::_StoreDescriptor_default_instance_._instance.get_mutable()->node_ = const_cast< ::cockroach::roachpb::NodeDescriptor*>( 3284 ::cockroach::roachpb::NodeDescriptor::internal_default_instance()); 3285 ::cockroach::roachpb::_StoreDescriptor_default_instance_._instance.get_mutable()->capacity_ = const_cast< ::cockroach::roachpb::StoreCapacity*>( 3286 ::cockroach::roachpb::StoreCapacity::internal_default_instance()); 3287 } 3288 #if !defined(_MSC_VER) || _MSC_VER >= 1900 3289 const int StoreDescriptor::kStoreIdFieldNumber; 3290 const int StoreDescriptor::kAttrsFieldNumber; 3291 const int StoreDescriptor::kNodeFieldNumber; 3292 const int StoreDescriptor::kCapacityFieldNumber; 3293 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 3294 3295 StoreDescriptor::StoreDescriptor() 3296 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 3297 ::google::protobuf::internal::InitSCC( 3298 &protobuf_roachpb_2fmetadata_2eproto::scc_info_StoreDescriptor.base); 3299 SharedCtor(); 3300 // @@protoc_insertion_point(constructor:cockroach.roachpb.StoreDescriptor) 3301 } 3302 StoreDescriptor::StoreDescriptor(const StoreDescriptor& from) 3303 : ::google::protobuf::MessageLite(), 3304 _internal_metadata_(NULL), 3305 _has_bits_(from._has_bits_) { 3306 _internal_metadata_.MergeFrom(from._internal_metadata_); 3307 if (from.has_attrs()) { 3308 attrs_ = new ::cockroach::roachpb::Attributes(*from.attrs_); 3309 } else { 3310 attrs_ = NULL; 3311 } 3312 if (from.has_node()) { 3313 node_ = new ::cockroach::roachpb::NodeDescriptor(*from.node_); 3314 } else { 3315 node_ = NULL; 3316 } 3317 if (from.has_capacity()) { 3318 capacity_ = new ::cockroach::roachpb::StoreCapacity(*from.capacity_); 3319 } else { 3320 capacity_ = NULL; 3321 } 3322 store_id_ = from.store_id_; 3323 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.StoreDescriptor) 3324 } 3325 3326 void StoreDescriptor::SharedCtor() { 3327 ::memset(&attrs_, 0, static_cast<size_t>( 3328 reinterpret_cast<char*>(&store_id_) - 3329 reinterpret_cast<char*>(&attrs_)) + sizeof(store_id_)); 3330 } 3331 3332 StoreDescriptor::~StoreDescriptor() { 3333 // @@protoc_insertion_point(destructor:cockroach.roachpb.StoreDescriptor) 3334 SharedDtor(); 3335 } 3336 3337 void StoreDescriptor::SharedDtor() { 3338 if (this != internal_default_instance()) delete attrs_; 3339 if (this != internal_default_instance()) delete node_; 3340 if (this != internal_default_instance()) delete capacity_; 3341 } 3342 3343 void StoreDescriptor::SetCachedSize(int size) const { 3344 _cached_size_.Set(size); 3345 } 3346 const StoreDescriptor& StoreDescriptor::default_instance() { 3347 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_StoreDescriptor.base); 3348 return *internal_default_instance(); 3349 } 3350 3351 3352 void StoreDescriptor::Clear() { 3353 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.StoreDescriptor) 3354 ::google::protobuf::uint32 cached_has_bits = 0; 3355 // Prevent compiler warnings about cached_has_bits being unused 3356 (void) cached_has_bits; 3357 3358 cached_has_bits = _has_bits_[0]; 3359 if (cached_has_bits & 7u) { 3360 if (cached_has_bits & 0x00000001u) { 3361 GOOGLE_DCHECK(attrs_ != NULL); 3362 attrs_->Clear(); 3363 } 3364 if (cached_has_bits & 0x00000002u) { 3365 GOOGLE_DCHECK(node_ != NULL); 3366 node_->Clear(); 3367 } 3368 if (cached_has_bits & 0x00000004u) { 3369 GOOGLE_DCHECK(capacity_ != NULL); 3370 capacity_->Clear(); 3371 } 3372 } 3373 store_id_ = 0; 3374 _has_bits_.Clear(); 3375 _internal_metadata_.Clear(); 3376 } 3377 3378 bool StoreDescriptor::MergePartialFromCodedStream( 3379 ::google::protobuf::io::CodedInputStream* input) { 3380 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 3381 ::google::protobuf::uint32 tag; 3382 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 3383 &_internal_metadata_); 3384 ::google::protobuf::io::StringOutputStream unknown_fields_output( 3385 unknown_fields_setter.buffer()); 3386 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 3387 &unknown_fields_output, false); 3388 // @@protoc_insertion_point(parse_start:cockroach.roachpb.StoreDescriptor) 3389 for (;;) { 3390 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 3391 tag = p.first; 3392 if (!p.second) goto handle_unusual; 3393 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 3394 case 1: { 3395 if (static_cast< ::google::protobuf::uint8>(tag) == 3396 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 3397 set_has_store_id(); 3398 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 3399 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 3400 input, &store_id_))); 3401 } else { 3402 goto handle_unusual; 3403 } 3404 break; 3405 } 3406 3407 case 2: { 3408 if (static_cast< ::google::protobuf::uint8>(tag) == 3409 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 3410 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 3411 input, mutable_attrs())); 3412 } else { 3413 goto handle_unusual; 3414 } 3415 break; 3416 } 3417 3418 case 3: { 3419 if (static_cast< ::google::protobuf::uint8>(tag) == 3420 static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { 3421 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 3422 input, mutable_node())); 3423 } else { 3424 goto handle_unusual; 3425 } 3426 break; 3427 } 3428 3429 case 4: { 3430 if (static_cast< ::google::protobuf::uint8>(tag) == 3431 static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { 3432 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 3433 input, mutable_capacity())); 3434 } else { 3435 goto handle_unusual; 3436 } 3437 break; 3438 } 3439 3440 default: { 3441 handle_unusual: 3442 if (tag == 0) { 3443 goto success; 3444 } 3445 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 3446 input, tag, &unknown_fields_stream)); 3447 break; 3448 } 3449 } 3450 } 3451 success: 3452 // @@protoc_insertion_point(parse_success:cockroach.roachpb.StoreDescriptor) 3453 return true; 3454 failure: 3455 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.StoreDescriptor) 3456 return false; 3457 #undef DO_ 3458 } 3459 3460 void StoreDescriptor::SerializeWithCachedSizes( 3461 ::google::protobuf::io::CodedOutputStream* output) const { 3462 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.StoreDescriptor) 3463 ::google::protobuf::uint32 cached_has_bits = 0; 3464 (void) cached_has_bits; 3465 3466 cached_has_bits = _has_bits_[0]; 3467 if (cached_has_bits & 0x00000008u) { 3468 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->store_id(), output); 3469 } 3470 3471 if (cached_has_bits & 0x00000001u) { 3472 ::google::protobuf::internal::WireFormatLite::WriteMessage( 3473 2, this->_internal_attrs(), output); 3474 } 3475 3476 if (cached_has_bits & 0x00000002u) { 3477 ::google::protobuf::internal::WireFormatLite::WriteMessage( 3478 3, this->_internal_node(), output); 3479 } 3480 3481 if (cached_has_bits & 0x00000004u) { 3482 ::google::protobuf::internal::WireFormatLite::WriteMessage( 3483 4, this->_internal_capacity(), output); 3484 } 3485 3486 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 3487 static_cast<int>(_internal_metadata_.unknown_fields().size())); 3488 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.StoreDescriptor) 3489 } 3490 3491 size_t StoreDescriptor::ByteSizeLong() const { 3492 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.StoreDescriptor) 3493 size_t total_size = 0; 3494 3495 total_size += _internal_metadata_.unknown_fields().size(); 3496 3497 if (_has_bits_[0 / 32] & 15u) { 3498 if (has_attrs()) { 3499 total_size += 1 + 3500 ::google::protobuf::internal::WireFormatLite::MessageSize( 3501 *attrs_); 3502 } 3503 3504 if (has_node()) { 3505 total_size += 1 + 3506 ::google::protobuf::internal::WireFormatLite::MessageSize( 3507 *node_); 3508 } 3509 3510 if (has_capacity()) { 3511 total_size += 1 + 3512 ::google::protobuf::internal::WireFormatLite::MessageSize( 3513 *capacity_); 3514 } 3515 3516 if (has_store_id()) { 3517 total_size += 1 + 3518 ::google::protobuf::internal::WireFormatLite::Int32Size( 3519 this->store_id()); 3520 } 3521 3522 } 3523 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 3524 SetCachedSize(cached_size); 3525 return total_size; 3526 } 3527 3528 void StoreDescriptor::CheckTypeAndMergeFrom( 3529 const ::google::protobuf::MessageLite& from) { 3530 MergeFrom(*::google::protobuf::down_cast<const StoreDescriptor*>(&from)); 3531 } 3532 3533 void StoreDescriptor::MergeFrom(const StoreDescriptor& from) { 3534 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.StoreDescriptor) 3535 GOOGLE_DCHECK_NE(&from, this); 3536 _internal_metadata_.MergeFrom(from._internal_metadata_); 3537 ::google::protobuf::uint32 cached_has_bits = 0; 3538 (void) cached_has_bits; 3539 3540 cached_has_bits = from._has_bits_[0]; 3541 if (cached_has_bits & 15u) { 3542 if (cached_has_bits & 0x00000001u) { 3543 mutable_attrs()->::cockroach::roachpb::Attributes::MergeFrom(from.attrs()); 3544 } 3545 if (cached_has_bits & 0x00000002u) { 3546 mutable_node()->::cockroach::roachpb::NodeDescriptor::MergeFrom(from.node()); 3547 } 3548 if (cached_has_bits & 0x00000004u) { 3549 mutable_capacity()->::cockroach::roachpb::StoreCapacity::MergeFrom(from.capacity()); 3550 } 3551 if (cached_has_bits & 0x00000008u) { 3552 store_id_ = from.store_id_; 3553 } 3554 _has_bits_[0] |= cached_has_bits; 3555 } 3556 } 3557 3558 void StoreDescriptor::CopyFrom(const StoreDescriptor& from) { 3559 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.StoreDescriptor) 3560 if (&from == this) return; 3561 Clear(); 3562 MergeFrom(from); 3563 } 3564 3565 bool StoreDescriptor::IsInitialized() const { 3566 return true; 3567 } 3568 3569 void StoreDescriptor::Swap(StoreDescriptor* other) { 3570 if (other == this) return; 3571 InternalSwap(other); 3572 } 3573 void StoreDescriptor::InternalSwap(StoreDescriptor* other) { 3574 using std::swap; 3575 swap(attrs_, other->attrs_); 3576 swap(node_, other->node_); 3577 swap(capacity_, other->capacity_); 3578 swap(store_id_, other->store_id_); 3579 swap(_has_bits_[0], other->_has_bits_[0]); 3580 _internal_metadata_.Swap(&other->_internal_metadata_); 3581 } 3582 3583 ::std::string StoreDescriptor::GetTypeName() const { 3584 return "cockroach.roachpb.StoreDescriptor"; 3585 } 3586 3587 3588 // =================================================================== 3589 3590 void StoreDeadReplicas::InitAsDefaultInstance() { 3591 } 3592 #if !defined(_MSC_VER) || _MSC_VER >= 1900 3593 const int StoreDeadReplicas::kStoreIdFieldNumber; 3594 const int StoreDeadReplicas::kReplicasFieldNumber; 3595 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 3596 3597 StoreDeadReplicas::StoreDeadReplicas() 3598 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 3599 ::google::protobuf::internal::InitSCC( 3600 &protobuf_roachpb_2fmetadata_2eproto::scc_info_StoreDeadReplicas.base); 3601 SharedCtor(); 3602 // @@protoc_insertion_point(constructor:cockroach.roachpb.StoreDeadReplicas) 3603 } 3604 StoreDeadReplicas::StoreDeadReplicas(const StoreDeadReplicas& from) 3605 : ::google::protobuf::MessageLite(), 3606 _internal_metadata_(NULL), 3607 _has_bits_(from._has_bits_), 3608 replicas_(from.replicas_) { 3609 _internal_metadata_.MergeFrom(from._internal_metadata_); 3610 store_id_ = from.store_id_; 3611 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.StoreDeadReplicas) 3612 } 3613 3614 void StoreDeadReplicas::SharedCtor() { 3615 store_id_ = 0; 3616 } 3617 3618 StoreDeadReplicas::~StoreDeadReplicas() { 3619 // @@protoc_insertion_point(destructor:cockroach.roachpb.StoreDeadReplicas) 3620 SharedDtor(); 3621 } 3622 3623 void StoreDeadReplicas::SharedDtor() { 3624 } 3625 3626 void StoreDeadReplicas::SetCachedSize(int size) const { 3627 _cached_size_.Set(size); 3628 } 3629 const StoreDeadReplicas& StoreDeadReplicas::default_instance() { 3630 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_StoreDeadReplicas.base); 3631 return *internal_default_instance(); 3632 } 3633 3634 3635 void StoreDeadReplicas::Clear() { 3636 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.StoreDeadReplicas) 3637 ::google::protobuf::uint32 cached_has_bits = 0; 3638 // Prevent compiler warnings about cached_has_bits being unused 3639 (void) cached_has_bits; 3640 3641 replicas_.Clear(); 3642 store_id_ = 0; 3643 _has_bits_.Clear(); 3644 _internal_metadata_.Clear(); 3645 } 3646 3647 bool StoreDeadReplicas::MergePartialFromCodedStream( 3648 ::google::protobuf::io::CodedInputStream* input) { 3649 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 3650 ::google::protobuf::uint32 tag; 3651 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 3652 &_internal_metadata_); 3653 ::google::protobuf::io::StringOutputStream unknown_fields_output( 3654 unknown_fields_setter.buffer()); 3655 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 3656 &unknown_fields_output, false); 3657 // @@protoc_insertion_point(parse_start:cockroach.roachpb.StoreDeadReplicas) 3658 for (;;) { 3659 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 3660 tag = p.first; 3661 if (!p.second) goto handle_unusual; 3662 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 3663 case 1: { 3664 if (static_cast< ::google::protobuf::uint8>(tag) == 3665 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 3666 set_has_store_id(); 3667 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 3668 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 3669 input, &store_id_))); 3670 } else { 3671 goto handle_unusual; 3672 } 3673 break; 3674 } 3675 3676 case 2: { 3677 if (static_cast< ::google::protobuf::uint8>(tag) == 3678 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 3679 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 3680 input, add_replicas())); 3681 } else { 3682 goto handle_unusual; 3683 } 3684 break; 3685 } 3686 3687 default: { 3688 handle_unusual: 3689 if (tag == 0) { 3690 goto success; 3691 } 3692 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 3693 input, tag, &unknown_fields_stream)); 3694 break; 3695 } 3696 } 3697 } 3698 success: 3699 // @@protoc_insertion_point(parse_success:cockroach.roachpb.StoreDeadReplicas) 3700 return true; 3701 failure: 3702 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.StoreDeadReplicas) 3703 return false; 3704 #undef DO_ 3705 } 3706 3707 void StoreDeadReplicas::SerializeWithCachedSizes( 3708 ::google::protobuf::io::CodedOutputStream* output) const { 3709 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.StoreDeadReplicas) 3710 ::google::protobuf::uint32 cached_has_bits = 0; 3711 (void) cached_has_bits; 3712 3713 cached_has_bits = _has_bits_[0]; 3714 if (cached_has_bits & 0x00000001u) { 3715 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->store_id(), output); 3716 } 3717 3718 for (unsigned int i = 0, 3719 n = static_cast<unsigned int>(this->replicas_size()); i < n; i++) { 3720 ::google::protobuf::internal::WireFormatLite::WriteMessage( 3721 2, 3722 this->replicas(static_cast<int>(i)), 3723 output); 3724 } 3725 3726 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 3727 static_cast<int>(_internal_metadata_.unknown_fields().size())); 3728 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.StoreDeadReplicas) 3729 } 3730 3731 size_t StoreDeadReplicas::ByteSizeLong() const { 3732 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.StoreDeadReplicas) 3733 size_t total_size = 0; 3734 3735 total_size += _internal_metadata_.unknown_fields().size(); 3736 3737 { 3738 unsigned int count = static_cast<unsigned int>(this->replicas_size()); 3739 total_size += 1UL * count; 3740 for (unsigned int i = 0; i < count; i++) { 3741 total_size += 3742 ::google::protobuf::internal::WireFormatLite::MessageSize( 3743 this->replicas(static_cast<int>(i))); 3744 } 3745 } 3746 3747 if (has_store_id()) { 3748 total_size += 1 + 3749 ::google::protobuf::internal::WireFormatLite::Int32Size( 3750 this->store_id()); 3751 } 3752 3753 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 3754 SetCachedSize(cached_size); 3755 return total_size; 3756 } 3757 3758 void StoreDeadReplicas::CheckTypeAndMergeFrom( 3759 const ::google::protobuf::MessageLite& from) { 3760 MergeFrom(*::google::protobuf::down_cast<const StoreDeadReplicas*>(&from)); 3761 } 3762 3763 void StoreDeadReplicas::MergeFrom(const StoreDeadReplicas& from) { 3764 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.StoreDeadReplicas) 3765 GOOGLE_DCHECK_NE(&from, this); 3766 _internal_metadata_.MergeFrom(from._internal_metadata_); 3767 ::google::protobuf::uint32 cached_has_bits = 0; 3768 (void) cached_has_bits; 3769 3770 replicas_.MergeFrom(from.replicas_); 3771 if (from.has_store_id()) { 3772 set_store_id(from.store_id()); 3773 } 3774 } 3775 3776 void StoreDeadReplicas::CopyFrom(const StoreDeadReplicas& from) { 3777 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.StoreDeadReplicas) 3778 if (&from == this) return; 3779 Clear(); 3780 MergeFrom(from); 3781 } 3782 3783 bool StoreDeadReplicas::IsInitialized() const { 3784 return true; 3785 } 3786 3787 void StoreDeadReplicas::Swap(StoreDeadReplicas* other) { 3788 if (other == this) return; 3789 InternalSwap(other); 3790 } 3791 void StoreDeadReplicas::InternalSwap(StoreDeadReplicas* other) { 3792 using std::swap; 3793 CastToBase(&replicas_)->InternalSwap(CastToBase(&other->replicas_)); 3794 swap(store_id_, other->store_id_); 3795 swap(_has_bits_[0], other->_has_bits_[0]); 3796 _internal_metadata_.Swap(&other->_internal_metadata_); 3797 } 3798 3799 ::std::string StoreDeadReplicas::GetTypeName() const { 3800 return "cockroach.roachpb.StoreDeadReplicas"; 3801 } 3802 3803 3804 // =================================================================== 3805 3806 void Locality::InitAsDefaultInstance() { 3807 } 3808 #if !defined(_MSC_VER) || _MSC_VER >= 1900 3809 const int Locality::kTiersFieldNumber; 3810 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 3811 3812 Locality::Locality() 3813 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 3814 ::google::protobuf::internal::InitSCC( 3815 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Locality.base); 3816 SharedCtor(); 3817 // @@protoc_insertion_point(constructor:cockroach.roachpb.Locality) 3818 } 3819 Locality::Locality(const Locality& from) 3820 : ::google::protobuf::MessageLite(), 3821 _internal_metadata_(NULL), 3822 _has_bits_(from._has_bits_), 3823 tiers_(from.tiers_) { 3824 _internal_metadata_.MergeFrom(from._internal_metadata_); 3825 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.Locality) 3826 } 3827 3828 void Locality::SharedCtor() { 3829 } 3830 3831 Locality::~Locality() { 3832 // @@protoc_insertion_point(destructor:cockroach.roachpb.Locality) 3833 SharedDtor(); 3834 } 3835 3836 void Locality::SharedDtor() { 3837 } 3838 3839 void Locality::SetCachedSize(int size) const { 3840 _cached_size_.Set(size); 3841 } 3842 const Locality& Locality::default_instance() { 3843 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_Locality.base); 3844 return *internal_default_instance(); 3845 } 3846 3847 3848 void Locality::Clear() { 3849 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.Locality) 3850 ::google::protobuf::uint32 cached_has_bits = 0; 3851 // Prevent compiler warnings about cached_has_bits being unused 3852 (void) cached_has_bits; 3853 3854 tiers_.Clear(); 3855 _has_bits_.Clear(); 3856 _internal_metadata_.Clear(); 3857 } 3858 3859 bool Locality::MergePartialFromCodedStream( 3860 ::google::protobuf::io::CodedInputStream* input) { 3861 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 3862 ::google::protobuf::uint32 tag; 3863 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 3864 &_internal_metadata_); 3865 ::google::protobuf::io::StringOutputStream unknown_fields_output( 3866 unknown_fields_setter.buffer()); 3867 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 3868 &unknown_fields_output, false); 3869 // @@protoc_insertion_point(parse_start:cockroach.roachpb.Locality) 3870 for (;;) { 3871 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 3872 tag = p.first; 3873 if (!p.second) goto handle_unusual; 3874 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 3875 case 1: { 3876 if (static_cast< ::google::protobuf::uint8>(tag) == 3877 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 3878 DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( 3879 input, add_tiers())); 3880 } else { 3881 goto handle_unusual; 3882 } 3883 break; 3884 } 3885 3886 default: { 3887 handle_unusual: 3888 if (tag == 0) { 3889 goto success; 3890 } 3891 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 3892 input, tag, &unknown_fields_stream)); 3893 break; 3894 } 3895 } 3896 } 3897 success: 3898 // @@protoc_insertion_point(parse_success:cockroach.roachpb.Locality) 3899 return true; 3900 failure: 3901 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.Locality) 3902 return false; 3903 #undef DO_ 3904 } 3905 3906 void Locality::SerializeWithCachedSizes( 3907 ::google::protobuf::io::CodedOutputStream* output) const { 3908 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.Locality) 3909 ::google::protobuf::uint32 cached_has_bits = 0; 3910 (void) cached_has_bits; 3911 3912 for (unsigned int i = 0, 3913 n = static_cast<unsigned int>(this->tiers_size()); i < n; i++) { 3914 ::google::protobuf::internal::WireFormatLite::WriteMessage( 3915 1, 3916 this->tiers(static_cast<int>(i)), 3917 output); 3918 } 3919 3920 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 3921 static_cast<int>(_internal_metadata_.unknown_fields().size())); 3922 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.Locality) 3923 } 3924 3925 size_t Locality::ByteSizeLong() const { 3926 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.Locality) 3927 size_t total_size = 0; 3928 3929 total_size += _internal_metadata_.unknown_fields().size(); 3930 3931 { 3932 unsigned int count = static_cast<unsigned int>(this->tiers_size()); 3933 total_size += 1UL * count; 3934 for (unsigned int i = 0; i < count; i++) { 3935 total_size += 3936 ::google::protobuf::internal::WireFormatLite::MessageSize( 3937 this->tiers(static_cast<int>(i))); 3938 } 3939 } 3940 3941 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 3942 SetCachedSize(cached_size); 3943 return total_size; 3944 } 3945 3946 void Locality::CheckTypeAndMergeFrom( 3947 const ::google::protobuf::MessageLite& from) { 3948 MergeFrom(*::google::protobuf::down_cast<const Locality*>(&from)); 3949 } 3950 3951 void Locality::MergeFrom(const Locality& from) { 3952 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.Locality) 3953 GOOGLE_DCHECK_NE(&from, this); 3954 _internal_metadata_.MergeFrom(from._internal_metadata_); 3955 ::google::protobuf::uint32 cached_has_bits = 0; 3956 (void) cached_has_bits; 3957 3958 tiers_.MergeFrom(from.tiers_); 3959 } 3960 3961 void Locality::CopyFrom(const Locality& from) { 3962 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.Locality) 3963 if (&from == this) return; 3964 Clear(); 3965 MergeFrom(from); 3966 } 3967 3968 bool Locality::IsInitialized() const { 3969 return true; 3970 } 3971 3972 void Locality::Swap(Locality* other) { 3973 if (other == this) return; 3974 InternalSwap(other); 3975 } 3976 void Locality::InternalSwap(Locality* other) { 3977 using std::swap; 3978 CastToBase(&tiers_)->InternalSwap(CastToBase(&other->tiers_)); 3979 swap(_has_bits_[0], other->_has_bits_[0]); 3980 _internal_metadata_.Swap(&other->_internal_metadata_); 3981 } 3982 3983 ::std::string Locality::GetTypeName() const { 3984 return "cockroach.roachpb.Locality"; 3985 } 3986 3987 3988 // =================================================================== 3989 3990 void Tier::InitAsDefaultInstance() { 3991 } 3992 #if !defined(_MSC_VER) || _MSC_VER >= 1900 3993 const int Tier::kKeyFieldNumber; 3994 const int Tier::kValueFieldNumber; 3995 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 3996 3997 Tier::Tier() 3998 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 3999 ::google::protobuf::internal::InitSCC( 4000 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Tier.base); 4001 SharedCtor(); 4002 // @@protoc_insertion_point(constructor:cockroach.roachpb.Tier) 4003 } 4004 Tier::Tier(const Tier& from) 4005 : ::google::protobuf::MessageLite(), 4006 _internal_metadata_(NULL), 4007 _has_bits_(from._has_bits_) { 4008 _internal_metadata_.MergeFrom(from._internal_metadata_); 4009 key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 4010 if (from.has_key()) { 4011 key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_); 4012 } 4013 value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 4014 if (from.has_value()) { 4015 value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); 4016 } 4017 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.Tier) 4018 } 4019 4020 void Tier::SharedCtor() { 4021 key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 4022 value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 4023 } 4024 4025 Tier::~Tier() { 4026 // @@protoc_insertion_point(destructor:cockroach.roachpb.Tier) 4027 SharedDtor(); 4028 } 4029 4030 void Tier::SharedDtor() { 4031 key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 4032 value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); 4033 } 4034 4035 void Tier::SetCachedSize(int size) const { 4036 _cached_size_.Set(size); 4037 } 4038 const Tier& Tier::default_instance() { 4039 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_Tier.base); 4040 return *internal_default_instance(); 4041 } 4042 4043 4044 void Tier::Clear() { 4045 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.Tier) 4046 ::google::protobuf::uint32 cached_has_bits = 0; 4047 // Prevent compiler warnings about cached_has_bits being unused 4048 (void) cached_has_bits; 4049 4050 cached_has_bits = _has_bits_[0]; 4051 if (cached_has_bits & 3u) { 4052 if (cached_has_bits & 0x00000001u) { 4053 key_.ClearNonDefaultToEmptyNoArena(); 4054 } 4055 if (cached_has_bits & 0x00000002u) { 4056 value_.ClearNonDefaultToEmptyNoArena(); 4057 } 4058 } 4059 _has_bits_.Clear(); 4060 _internal_metadata_.Clear(); 4061 } 4062 4063 bool Tier::MergePartialFromCodedStream( 4064 ::google::protobuf::io::CodedInputStream* input) { 4065 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 4066 ::google::protobuf::uint32 tag; 4067 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 4068 &_internal_metadata_); 4069 ::google::protobuf::io::StringOutputStream unknown_fields_output( 4070 unknown_fields_setter.buffer()); 4071 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 4072 &unknown_fields_output, false); 4073 // @@protoc_insertion_point(parse_start:cockroach.roachpb.Tier) 4074 for (;;) { 4075 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 4076 tag = p.first; 4077 if (!p.second) goto handle_unusual; 4078 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 4079 case 1: { 4080 if (static_cast< ::google::protobuf::uint8>(tag) == 4081 static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { 4082 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 4083 input, this->mutable_key())); 4084 } else { 4085 goto handle_unusual; 4086 } 4087 break; 4088 } 4089 4090 case 2: { 4091 if (static_cast< ::google::protobuf::uint8>(tag) == 4092 static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { 4093 DO_(::google::protobuf::internal::WireFormatLite::ReadString( 4094 input, this->mutable_value())); 4095 } else { 4096 goto handle_unusual; 4097 } 4098 break; 4099 } 4100 4101 default: { 4102 handle_unusual: 4103 if (tag == 0) { 4104 goto success; 4105 } 4106 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 4107 input, tag, &unknown_fields_stream)); 4108 break; 4109 } 4110 } 4111 } 4112 success: 4113 // @@protoc_insertion_point(parse_success:cockroach.roachpb.Tier) 4114 return true; 4115 failure: 4116 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.Tier) 4117 return false; 4118 #undef DO_ 4119 } 4120 4121 void Tier::SerializeWithCachedSizes( 4122 ::google::protobuf::io::CodedOutputStream* output) const { 4123 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.Tier) 4124 ::google::protobuf::uint32 cached_has_bits = 0; 4125 (void) cached_has_bits; 4126 4127 cached_has_bits = _has_bits_[0]; 4128 if (cached_has_bits & 0x00000001u) { 4129 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4130 1, this->key(), output); 4131 } 4132 4133 if (cached_has_bits & 0x00000002u) { 4134 ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4135 2, this->value(), output); 4136 } 4137 4138 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 4139 static_cast<int>(_internal_metadata_.unknown_fields().size())); 4140 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.Tier) 4141 } 4142 4143 size_t Tier::ByteSizeLong() const { 4144 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.Tier) 4145 size_t total_size = 0; 4146 4147 total_size += _internal_metadata_.unknown_fields().size(); 4148 4149 if (_has_bits_[0 / 32] & 3u) { 4150 if (has_key()) { 4151 total_size += 1 + 4152 ::google::protobuf::internal::WireFormatLite::StringSize( 4153 this->key()); 4154 } 4155 4156 if (has_value()) { 4157 total_size += 1 + 4158 ::google::protobuf::internal::WireFormatLite::StringSize( 4159 this->value()); 4160 } 4161 4162 } 4163 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 4164 SetCachedSize(cached_size); 4165 return total_size; 4166 } 4167 4168 void Tier::CheckTypeAndMergeFrom( 4169 const ::google::protobuf::MessageLite& from) { 4170 MergeFrom(*::google::protobuf::down_cast<const Tier*>(&from)); 4171 } 4172 4173 void Tier::MergeFrom(const Tier& from) { 4174 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.Tier) 4175 GOOGLE_DCHECK_NE(&from, this); 4176 _internal_metadata_.MergeFrom(from._internal_metadata_); 4177 ::google::protobuf::uint32 cached_has_bits = 0; 4178 (void) cached_has_bits; 4179 4180 cached_has_bits = from._has_bits_[0]; 4181 if (cached_has_bits & 3u) { 4182 if (cached_has_bits & 0x00000001u) { 4183 set_has_key(); 4184 key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_); 4185 } 4186 if (cached_has_bits & 0x00000002u) { 4187 set_has_value(); 4188 value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); 4189 } 4190 } 4191 } 4192 4193 void Tier::CopyFrom(const Tier& from) { 4194 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.Tier) 4195 if (&from == this) return; 4196 Clear(); 4197 MergeFrom(from); 4198 } 4199 4200 bool Tier::IsInitialized() const { 4201 return true; 4202 } 4203 4204 void Tier::Swap(Tier* other) { 4205 if (other == this) return; 4206 InternalSwap(other); 4207 } 4208 void Tier::InternalSwap(Tier* other) { 4209 using std::swap; 4210 key_.Swap(&other->key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 4211 GetArenaNoVirtual()); 4212 value_.Swap(&other->value_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), 4213 GetArenaNoVirtual()); 4214 swap(_has_bits_[0], other->_has_bits_[0]); 4215 _internal_metadata_.Swap(&other->_internal_metadata_); 4216 } 4217 4218 ::std::string Tier::GetTypeName() const { 4219 return "cockroach.roachpb.Tier"; 4220 } 4221 4222 4223 // =================================================================== 4224 4225 void Version::InitAsDefaultInstance() { 4226 } 4227 #if !defined(_MSC_VER) || _MSC_VER >= 1900 4228 const int Version::kMajorValFieldNumber; 4229 const int Version::kMinorValFieldNumber; 4230 const int Version::kPatchFieldNumber; 4231 const int Version::kUnstableFieldNumber; 4232 #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 4233 4234 Version::Version() 4235 : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) { 4236 ::google::protobuf::internal::InitSCC( 4237 &protobuf_roachpb_2fmetadata_2eproto::scc_info_Version.base); 4238 SharedCtor(); 4239 // @@protoc_insertion_point(constructor:cockroach.roachpb.Version) 4240 } 4241 Version::Version(const Version& from) 4242 : ::google::protobuf::MessageLite(), 4243 _internal_metadata_(NULL), 4244 _has_bits_(from._has_bits_) { 4245 _internal_metadata_.MergeFrom(from._internal_metadata_); 4246 ::memcpy(&major_val_, &from.major_val_, 4247 static_cast<size_t>(reinterpret_cast<char*>(&unstable_) - 4248 reinterpret_cast<char*>(&major_val_)) + sizeof(unstable_)); 4249 // @@protoc_insertion_point(copy_constructor:cockroach.roachpb.Version) 4250 } 4251 4252 void Version::SharedCtor() { 4253 ::memset(&major_val_, 0, static_cast<size_t>( 4254 reinterpret_cast<char*>(&unstable_) - 4255 reinterpret_cast<char*>(&major_val_)) + sizeof(unstable_)); 4256 } 4257 4258 Version::~Version() { 4259 // @@protoc_insertion_point(destructor:cockroach.roachpb.Version) 4260 SharedDtor(); 4261 } 4262 4263 void Version::SharedDtor() { 4264 } 4265 4266 void Version::SetCachedSize(int size) const { 4267 _cached_size_.Set(size); 4268 } 4269 const Version& Version::default_instance() { 4270 ::google::protobuf::internal::InitSCC(&protobuf_roachpb_2fmetadata_2eproto::scc_info_Version.base); 4271 return *internal_default_instance(); 4272 } 4273 4274 4275 void Version::Clear() { 4276 // @@protoc_insertion_point(message_clear_start:cockroach.roachpb.Version) 4277 ::google::protobuf::uint32 cached_has_bits = 0; 4278 // Prevent compiler warnings about cached_has_bits being unused 4279 (void) cached_has_bits; 4280 4281 cached_has_bits = _has_bits_[0]; 4282 if (cached_has_bits & 15u) { 4283 ::memset(&major_val_, 0, static_cast<size_t>( 4284 reinterpret_cast<char*>(&unstable_) - 4285 reinterpret_cast<char*>(&major_val_)) + sizeof(unstable_)); 4286 } 4287 _has_bits_.Clear(); 4288 _internal_metadata_.Clear(); 4289 } 4290 4291 bool Version::MergePartialFromCodedStream( 4292 ::google::protobuf::io::CodedInputStream* input) { 4293 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure 4294 ::google::protobuf::uint32 tag; 4295 ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter( 4296 &_internal_metadata_); 4297 ::google::protobuf::io::StringOutputStream unknown_fields_output( 4298 unknown_fields_setter.buffer()); 4299 ::google::protobuf::io::CodedOutputStream unknown_fields_stream( 4300 &unknown_fields_output, false); 4301 // @@protoc_insertion_point(parse_start:cockroach.roachpb.Version) 4302 for (;;) { 4303 ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); 4304 tag = p.first; 4305 if (!p.second) goto handle_unusual; 4306 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { 4307 case 1: { 4308 if (static_cast< ::google::protobuf::uint8>(tag) == 4309 static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { 4310 set_has_major_val(); 4311 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 4312 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 4313 input, &major_val_))); 4314 } else { 4315 goto handle_unusual; 4316 } 4317 break; 4318 } 4319 4320 case 2: { 4321 if (static_cast< ::google::protobuf::uint8>(tag) == 4322 static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { 4323 set_has_minor_val(); 4324 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 4325 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 4326 input, &minor_val_))); 4327 } else { 4328 goto handle_unusual; 4329 } 4330 break; 4331 } 4332 4333 case 3: { 4334 if (static_cast< ::google::protobuf::uint8>(tag) == 4335 static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { 4336 set_has_patch(); 4337 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 4338 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 4339 input, &patch_))); 4340 } else { 4341 goto handle_unusual; 4342 } 4343 break; 4344 } 4345 4346 case 4: { 4347 if (static_cast< ::google::protobuf::uint8>(tag) == 4348 static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) { 4349 set_has_unstable(); 4350 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< 4351 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( 4352 input, &unstable_))); 4353 } else { 4354 goto handle_unusual; 4355 } 4356 break; 4357 } 4358 4359 default: { 4360 handle_unusual: 4361 if (tag == 0) { 4362 goto success; 4363 } 4364 DO_(::google::protobuf::internal::WireFormatLite::SkipField( 4365 input, tag, &unknown_fields_stream)); 4366 break; 4367 } 4368 } 4369 } 4370 success: 4371 // @@protoc_insertion_point(parse_success:cockroach.roachpb.Version) 4372 return true; 4373 failure: 4374 // @@protoc_insertion_point(parse_failure:cockroach.roachpb.Version) 4375 return false; 4376 #undef DO_ 4377 } 4378 4379 void Version::SerializeWithCachedSizes( 4380 ::google::protobuf::io::CodedOutputStream* output) const { 4381 // @@protoc_insertion_point(serialize_start:cockroach.roachpb.Version) 4382 ::google::protobuf::uint32 cached_has_bits = 0; 4383 (void) cached_has_bits; 4384 4385 cached_has_bits = _has_bits_[0]; 4386 if (cached_has_bits & 0x00000001u) { 4387 ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->major_val(), output); 4388 } 4389 4390 if (cached_has_bits & 0x00000002u) { 4391 ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->minor_val(), output); 4392 } 4393 4394 if (cached_has_bits & 0x00000004u) { 4395 ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->patch(), output); 4396 } 4397 4398 if (cached_has_bits & 0x00000008u) { 4399 ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->unstable(), output); 4400 } 4401 4402 output->WriteRaw(_internal_metadata_.unknown_fields().data(), 4403 static_cast<int>(_internal_metadata_.unknown_fields().size())); 4404 // @@protoc_insertion_point(serialize_end:cockroach.roachpb.Version) 4405 } 4406 4407 size_t Version::ByteSizeLong() const { 4408 // @@protoc_insertion_point(message_byte_size_start:cockroach.roachpb.Version) 4409 size_t total_size = 0; 4410 4411 total_size += _internal_metadata_.unknown_fields().size(); 4412 4413 if (_has_bits_[0 / 32] & 15u) { 4414 if (has_major_val()) { 4415 total_size += 1 + 4416 ::google::protobuf::internal::WireFormatLite::Int32Size( 4417 this->major_val()); 4418 } 4419 4420 if (has_minor_val()) { 4421 total_size += 1 + 4422 ::google::protobuf::internal::WireFormatLite::Int32Size( 4423 this->minor_val()); 4424 } 4425 4426 if (has_patch()) { 4427 total_size += 1 + 4428 ::google::protobuf::internal::WireFormatLite::Int32Size( 4429 this->patch()); 4430 } 4431 4432 if (has_unstable()) { 4433 total_size += 1 + 4434 ::google::protobuf::internal::WireFormatLite::Int32Size( 4435 this->unstable()); 4436 } 4437 4438 } 4439 int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); 4440 SetCachedSize(cached_size); 4441 return total_size; 4442 } 4443 4444 void Version::CheckTypeAndMergeFrom( 4445 const ::google::protobuf::MessageLite& from) { 4446 MergeFrom(*::google::protobuf::down_cast<const Version*>(&from)); 4447 } 4448 4449 void Version::MergeFrom(const Version& from) { 4450 // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.roachpb.Version) 4451 GOOGLE_DCHECK_NE(&from, this); 4452 _internal_metadata_.MergeFrom(from._internal_metadata_); 4453 ::google::protobuf::uint32 cached_has_bits = 0; 4454 (void) cached_has_bits; 4455 4456 cached_has_bits = from._has_bits_[0]; 4457 if (cached_has_bits & 15u) { 4458 if (cached_has_bits & 0x00000001u) { 4459 major_val_ = from.major_val_; 4460 } 4461 if (cached_has_bits & 0x00000002u) { 4462 minor_val_ = from.minor_val_; 4463 } 4464 if (cached_has_bits & 0x00000004u) { 4465 patch_ = from.patch_; 4466 } 4467 if (cached_has_bits & 0x00000008u) { 4468 unstable_ = from.unstable_; 4469 } 4470 _has_bits_[0] |= cached_has_bits; 4471 } 4472 } 4473 4474 void Version::CopyFrom(const Version& from) { 4475 // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.roachpb.Version) 4476 if (&from == this) return; 4477 Clear(); 4478 MergeFrom(from); 4479 } 4480 4481 bool Version::IsInitialized() const { 4482 return true; 4483 } 4484 4485 void Version::Swap(Version* other) { 4486 if (other == this) return; 4487 InternalSwap(other); 4488 } 4489 void Version::InternalSwap(Version* other) { 4490 using std::swap; 4491 swap(major_val_, other->major_val_); 4492 swap(minor_val_, other->minor_val_); 4493 swap(patch_, other->patch_); 4494 swap(unstable_, other->unstable_); 4495 swap(_has_bits_[0], other->_has_bits_[0]); 4496 _internal_metadata_.Swap(&other->_internal_metadata_); 4497 } 4498 4499 ::std::string Version::GetTypeName() const { 4500 return "cockroach.roachpb.Version"; 4501 } 4502 4503 4504 // @@protoc_insertion_point(namespace_scope) 4505 } // namespace roachpb 4506 } // namespace cockroach 4507 namespace google { 4508 namespace protobuf { 4509 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::Attributes* Arena::CreateMaybeMessage< ::cockroach::roachpb::Attributes >(Arena* arena) { 4510 return Arena::CreateInternal< ::cockroach::roachpb::Attributes >(arena); 4511 } 4512 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::ReplicationTarget* Arena::CreateMaybeMessage< ::cockroach::roachpb::ReplicationTarget >(Arena* arena) { 4513 return Arena::CreateInternal< ::cockroach::roachpb::ReplicationTarget >(arena); 4514 } 4515 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::ReplicaDescriptor* Arena::CreateMaybeMessage< ::cockroach::roachpb::ReplicaDescriptor >(Arena* arena) { 4516 return Arena::CreateInternal< ::cockroach::roachpb::ReplicaDescriptor >(arena); 4517 } 4518 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::ReplicaIdent* Arena::CreateMaybeMessage< ::cockroach::roachpb::ReplicaIdent >(Arena* arena) { 4519 return Arena::CreateInternal< ::cockroach::roachpb::ReplicaIdent >(arena); 4520 } 4521 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::RangeDescriptor* Arena::CreateMaybeMessage< ::cockroach::roachpb::RangeDescriptor >(Arena* arena) { 4522 return Arena::CreateInternal< ::cockroach::roachpb::RangeDescriptor >(arena); 4523 } 4524 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::Percentiles* Arena::CreateMaybeMessage< ::cockroach::roachpb::Percentiles >(Arena* arena) { 4525 return Arena::CreateInternal< ::cockroach::roachpb::Percentiles >(arena); 4526 } 4527 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::StoreCapacity* Arena::CreateMaybeMessage< ::cockroach::roachpb::StoreCapacity >(Arena* arena) { 4528 return Arena::CreateInternal< ::cockroach::roachpb::StoreCapacity >(arena); 4529 } 4530 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::NodeDescriptor* Arena::CreateMaybeMessage< ::cockroach::roachpb::NodeDescriptor >(Arena* arena) { 4531 return Arena::CreateInternal< ::cockroach::roachpb::NodeDescriptor >(arena); 4532 } 4533 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::LocalityAddress* Arena::CreateMaybeMessage< ::cockroach::roachpb::LocalityAddress >(Arena* arena) { 4534 return Arena::CreateInternal< ::cockroach::roachpb::LocalityAddress >(arena); 4535 } 4536 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::StoreDescriptor* Arena::CreateMaybeMessage< ::cockroach::roachpb::StoreDescriptor >(Arena* arena) { 4537 return Arena::CreateInternal< ::cockroach::roachpb::StoreDescriptor >(arena); 4538 } 4539 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::StoreDeadReplicas* Arena::CreateMaybeMessage< ::cockroach::roachpb::StoreDeadReplicas >(Arena* arena) { 4540 return Arena::CreateInternal< ::cockroach::roachpb::StoreDeadReplicas >(arena); 4541 } 4542 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::Locality* Arena::CreateMaybeMessage< ::cockroach::roachpb::Locality >(Arena* arena) { 4543 return Arena::CreateInternal< ::cockroach::roachpb::Locality >(arena); 4544 } 4545 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::Tier* Arena::CreateMaybeMessage< ::cockroach::roachpb::Tier >(Arena* arena) { 4546 return Arena::CreateInternal< ::cockroach::roachpb::Tier >(arena); 4547 } 4548 template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::roachpb::Version* Arena::CreateMaybeMessage< ::cockroach::roachpb::Version >(Arena* arena) { 4549 return Arena::CreateInternal< ::cockroach::roachpb::Version >(arena); 4550 } 4551 } // namespace protobuf 4552 } // namespace google 4553 4554 // @@protoc_insertion_point(global_scope)