github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/c-deps/libroach/protosccl/ccl/storageccl/engineccl/enginepbccl/key_registry.pb.cc (about)

     1  // Generated by the protocol buffer compiler.  DO NOT EDIT!
     2  // source: ccl/storageccl/engineccl/enginepbccl/key_registry.proto
     3  
     4  #include "ccl/storageccl/engineccl/enginepbccl/key_registry.pb.h"
     5  
     6  #include <algorithm>
     7  
     8  #include <google/protobuf/stubs/common.h>
     9  #include <google/protobuf/stubs/port.h>
    10  #include <google/protobuf/io/coded_stream.h>
    11  #include <google/protobuf/wire_format_lite_inl.h>
    12  #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
    13  // This is a temporary google only hack
    14  #ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
    15  #include "third_party/protobuf/version.h"
    16  #endif
    17  // @@protoc_insertion_point(includes)
    18  
    19  namespace protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto {
    20  extern PROTOBUF_INTERNAL_EXPORT_protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_KeyInfo;
    21  extern PROTOBUF_INTERNAL_EXPORT_protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DataKeysRegistry_DataKeysEntry_DoNotUse;
    22  extern PROTOBUF_INTERNAL_EXPORT_protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_DataKeysRegistry_StoreKeysEntry_DoNotUse;
    23  extern PROTOBUF_INTERNAL_EXPORT_protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_SecretKey;
    24  }  // namespace protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto
    25  namespace cockroach {
    26  namespace ccl {
    27  namespace storageccl {
    28  namespace engineccl {
    29  namespace enginepbccl {
    30  class DataKeysRegistry_StoreKeysEntry_DoNotUseDefaultTypeInternal {
    31   public:
    32    ::google::protobuf::internal::ExplicitlyConstructed<DataKeysRegistry_StoreKeysEntry_DoNotUse>
    33        _instance;
    34  } _DataKeysRegistry_StoreKeysEntry_DoNotUse_default_instance_;
    35  class DataKeysRegistry_DataKeysEntry_DoNotUseDefaultTypeInternal {
    36   public:
    37    ::google::protobuf::internal::ExplicitlyConstructed<DataKeysRegistry_DataKeysEntry_DoNotUse>
    38        _instance;
    39  } _DataKeysRegistry_DataKeysEntry_DoNotUse_default_instance_;
    40  class DataKeysRegistryDefaultTypeInternal {
    41   public:
    42    ::google::protobuf::internal::ExplicitlyConstructed<DataKeysRegistry>
    43        _instance;
    44  } _DataKeysRegistry_default_instance_;
    45  class KeyInfoDefaultTypeInternal {
    46   public:
    47    ::google::protobuf::internal::ExplicitlyConstructed<KeyInfo>
    48        _instance;
    49  } _KeyInfo_default_instance_;
    50  class SecretKeyDefaultTypeInternal {
    51   public:
    52    ::google::protobuf::internal::ExplicitlyConstructed<SecretKey>
    53        _instance;
    54  } _SecretKey_default_instance_;
    55  class EncryptionSettingsDefaultTypeInternal {
    56   public:
    57    ::google::protobuf::internal::ExplicitlyConstructed<EncryptionSettings>
    58        _instance;
    59  } _EncryptionSettings_default_instance_;
    60  }  // namespace enginepbccl
    61  }  // namespace engineccl
    62  }  // namespace storageccl
    63  }  // namespace ccl
    64  }  // namespace cockroach
    65  namespace protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto {
    66  static void InitDefaultsDataKeysRegistry_StoreKeysEntry_DoNotUse() {
    67    GOOGLE_PROTOBUF_VERIFY_VERSION;
    68  
    69    {
    70      void* ptr = &::cockroach::ccl::storageccl::engineccl::enginepbccl::_DataKeysRegistry_StoreKeysEntry_DoNotUse_default_instance_;
    71      new (ptr) ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_StoreKeysEntry_DoNotUse();
    72    }
    73    ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_StoreKeysEntry_DoNotUse::InitAsDefaultInstance();
    74  }
    75  
    76  ::google::protobuf::internal::SCCInfo<1> scc_info_DataKeysRegistry_StoreKeysEntry_DoNotUse =
    77      {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDataKeysRegistry_StoreKeysEntry_DoNotUse}, {
    78        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_KeyInfo.base,}};
    79  
    80  static void InitDefaultsDataKeysRegistry_DataKeysEntry_DoNotUse() {
    81    GOOGLE_PROTOBUF_VERIFY_VERSION;
    82  
    83    {
    84      void* ptr = &::cockroach::ccl::storageccl::engineccl::enginepbccl::_DataKeysRegistry_DataKeysEntry_DoNotUse_default_instance_;
    85      new (ptr) ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_DataKeysEntry_DoNotUse();
    86    }
    87    ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_DataKeysEntry_DoNotUse::InitAsDefaultInstance();
    88  }
    89  
    90  ::google::protobuf::internal::SCCInfo<1> scc_info_DataKeysRegistry_DataKeysEntry_DoNotUse =
    91      {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsDataKeysRegistry_DataKeysEntry_DoNotUse}, {
    92        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_SecretKey.base,}};
    93  
    94  static void InitDefaultsDataKeysRegistry() {
    95    GOOGLE_PROTOBUF_VERIFY_VERSION;
    96  
    97    {
    98      void* ptr = &::cockroach::ccl::storageccl::engineccl::enginepbccl::_DataKeysRegistry_default_instance_;
    99      new (ptr) ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry();
   100      ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
   101    }
   102    ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry::InitAsDefaultInstance();
   103  }
   104  
   105  ::google::protobuf::internal::SCCInfo<2> scc_info_DataKeysRegistry =
   106      {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsDataKeysRegistry}, {
   107        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_DataKeysRegistry_StoreKeysEntry_DoNotUse.base,
   108        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_DataKeysRegistry_DataKeysEntry_DoNotUse.base,}};
   109  
   110  static void InitDefaultsKeyInfo() {
   111    GOOGLE_PROTOBUF_VERIFY_VERSION;
   112  
   113    {
   114      void* ptr = &::cockroach::ccl::storageccl::engineccl::enginepbccl::_KeyInfo_default_instance_;
   115      new (ptr) ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo();
   116      ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
   117    }
   118    ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo::InitAsDefaultInstance();
   119  }
   120  
   121  ::google::protobuf::internal::SCCInfo<0> scc_info_KeyInfo =
   122      {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsKeyInfo}, {}};
   123  
   124  static void InitDefaultsSecretKey() {
   125    GOOGLE_PROTOBUF_VERIFY_VERSION;
   126  
   127    {
   128      void* ptr = &::cockroach::ccl::storageccl::engineccl::enginepbccl::_SecretKey_default_instance_;
   129      new (ptr) ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey();
   130      ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
   131    }
   132    ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey::InitAsDefaultInstance();
   133  }
   134  
   135  ::google::protobuf::internal::SCCInfo<1> scc_info_SecretKey =
   136      {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSecretKey}, {
   137        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_KeyInfo.base,}};
   138  
   139  static void InitDefaultsEncryptionSettings() {
   140    GOOGLE_PROTOBUF_VERIFY_VERSION;
   141  
   142    {
   143      void* ptr = &::cockroach::ccl::storageccl::engineccl::enginepbccl::_EncryptionSettings_default_instance_;
   144      new (ptr) ::cockroach::ccl::storageccl::engineccl::enginepbccl::EncryptionSettings();
   145      ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
   146    }
   147    ::cockroach::ccl::storageccl::engineccl::enginepbccl::EncryptionSettings::InitAsDefaultInstance();
   148  }
   149  
   150  ::google::protobuf::internal::SCCInfo<0> scc_info_EncryptionSettings =
   151      {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsEncryptionSettings}, {}};
   152  
   153  void InitDefaults() {
   154    ::google::protobuf::internal::InitSCC(&scc_info_DataKeysRegistry_StoreKeysEntry_DoNotUse.base);
   155    ::google::protobuf::internal::InitSCC(&scc_info_DataKeysRegistry_DataKeysEntry_DoNotUse.base);
   156    ::google::protobuf::internal::InitSCC(&scc_info_DataKeysRegistry.base);
   157    ::google::protobuf::internal::InitSCC(&scc_info_KeyInfo.base);
   158    ::google::protobuf::internal::InitSCC(&scc_info_SecretKey.base);
   159    ::google::protobuf::internal::InitSCC(&scc_info_EncryptionSettings.base);
   160  }
   161  
   162  }  // namespace protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto
   163  namespace cockroach {
   164  namespace ccl {
   165  namespace storageccl {
   166  namespace engineccl {
   167  namespace enginepbccl {
   168  bool EncryptionType_IsValid(int value) {
   169    switch (value) {
   170      case 0:
   171      case 1:
   172      case 2:
   173      case 3:
   174        return true;
   175      default:
   176        return false;
   177    }
   178  }
   179  
   180  
   181  // ===================================================================
   182  
   183  DataKeysRegistry_StoreKeysEntry_DoNotUse::DataKeysRegistry_StoreKeysEntry_DoNotUse() {}
   184  DataKeysRegistry_StoreKeysEntry_DoNotUse::DataKeysRegistry_StoreKeysEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
   185  void DataKeysRegistry_StoreKeysEntry_DoNotUse::MergeFrom(const DataKeysRegistry_StoreKeysEntry_DoNotUse& other) {
   186    MergeFromInternal(other);
   187  }
   188  
   189  // ===================================================================
   190  
   191  DataKeysRegistry_DataKeysEntry_DoNotUse::DataKeysRegistry_DataKeysEntry_DoNotUse() {}
   192  DataKeysRegistry_DataKeysEntry_DoNotUse::DataKeysRegistry_DataKeysEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
   193  void DataKeysRegistry_DataKeysEntry_DoNotUse::MergeFrom(const DataKeysRegistry_DataKeysEntry_DoNotUse& other) {
   194    MergeFromInternal(other);
   195  }
   196  
   197  // ===================================================================
   198  
   199  void DataKeysRegistry::InitAsDefaultInstance() {
   200  }
   201  #if !defined(_MSC_VER) || _MSC_VER >= 1900
   202  const int DataKeysRegistry::kStoreKeysFieldNumber;
   203  const int DataKeysRegistry::kDataKeysFieldNumber;
   204  const int DataKeysRegistry::kActiveStoreKeyIdFieldNumber;
   205  const int DataKeysRegistry::kActiveDataKeyIdFieldNumber;
   206  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
   207  
   208  DataKeysRegistry::DataKeysRegistry()
   209    : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
   210    ::google::protobuf::internal::InitSCC(
   211        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_DataKeysRegistry.base);
   212    SharedCtor();
   213    // @@protoc_insertion_point(constructor:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   214  }
   215  DataKeysRegistry::DataKeysRegistry(const DataKeysRegistry& from)
   216    : ::google::protobuf::MessageLite(),
   217        _internal_metadata_(NULL) {
   218    _internal_metadata_.MergeFrom(from._internal_metadata_);
   219    store_keys_.MergeFrom(from.store_keys_);
   220    data_keys_.MergeFrom(from.data_keys_);
   221    active_store_key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   222    if (from.active_store_key_id().size() > 0) {
   223      active_store_key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.active_store_key_id_);
   224    }
   225    active_data_key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   226    if (from.active_data_key_id().size() > 0) {
   227      active_data_key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.active_data_key_id_);
   228    }
   229    // @@protoc_insertion_point(copy_constructor:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   230  }
   231  
   232  void DataKeysRegistry::SharedCtor() {
   233    active_store_key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   234    active_data_key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   235  }
   236  
   237  DataKeysRegistry::~DataKeysRegistry() {
   238    // @@protoc_insertion_point(destructor:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   239    SharedDtor();
   240  }
   241  
   242  void DataKeysRegistry::SharedDtor() {
   243    active_store_key_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   244    active_data_key_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   245  }
   246  
   247  void DataKeysRegistry::SetCachedSize(int size) const {
   248    _cached_size_.Set(size);
   249  }
   250  const DataKeysRegistry& DataKeysRegistry::default_instance() {
   251    ::google::protobuf::internal::InitSCC(&protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_DataKeysRegistry.base);
   252    return *internal_default_instance();
   253  }
   254  
   255  
   256  void DataKeysRegistry::Clear() {
   257  // @@protoc_insertion_point(message_clear_start:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   258    ::google::protobuf::uint32 cached_has_bits = 0;
   259    // Prevent compiler warnings about cached_has_bits being unused
   260    (void) cached_has_bits;
   261  
   262    store_keys_.Clear();
   263    data_keys_.Clear();
   264    active_store_key_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   265    active_data_key_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   266    _internal_metadata_.Clear();
   267  }
   268  
   269  bool DataKeysRegistry::MergePartialFromCodedStream(
   270      ::google::protobuf::io::CodedInputStream* input) {
   271  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
   272    ::google::protobuf::uint32 tag;
   273    ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
   274        &_internal_metadata_);
   275    ::google::protobuf::io::StringOutputStream unknown_fields_output(
   276        unknown_fields_setter.buffer());
   277    ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
   278        &unknown_fields_output, false);
   279    // @@protoc_insertion_point(parse_start:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   280    for (;;) {
   281      ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
   282      tag = p.first;
   283      if (!p.second) goto handle_unusual;
   284      switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
   285        // map<string, .cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo> store_keys = 1;
   286        case 1: {
   287          if (static_cast< ::google::protobuf::uint8>(tag) ==
   288              static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
   289            DataKeysRegistry_StoreKeysEntry_DoNotUse::Parser< ::google::protobuf::internal::MapFieldLite<
   290                DataKeysRegistry_StoreKeysEntry_DoNotUse,
   291                ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo,
   292                ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
   293                ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
   294                0 >,
   295              ::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo > > parser(&store_keys_);
   296            DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
   297                input, &parser));
   298            DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   299              parser.key().data(), static_cast<int>(parser.key().length()),
   300              ::google::protobuf::internal::WireFormatLite::PARSE,
   301              "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.StoreKeysEntry.key"));
   302          } else {
   303            goto handle_unusual;
   304          }
   305          break;
   306        }
   307  
   308        // map<string, .cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey> data_keys = 2;
   309        case 2: {
   310          if (static_cast< ::google::protobuf::uint8>(tag) ==
   311              static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
   312            DataKeysRegistry_DataKeysEntry_DoNotUse::Parser< ::google::protobuf::internal::MapFieldLite<
   313                DataKeysRegistry_DataKeysEntry_DoNotUse,
   314                ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey,
   315                ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
   316                ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
   317                0 >,
   318              ::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey > > parser(&data_keys_);
   319            DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
   320                input, &parser));
   321            DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   322              parser.key().data(), static_cast<int>(parser.key().length()),
   323              ::google::protobuf::internal::WireFormatLite::PARSE,
   324              "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.DataKeysEntry.key"));
   325          } else {
   326            goto handle_unusual;
   327          }
   328          break;
   329        }
   330  
   331        // string active_store_key_id = 3;
   332        case 3: {
   333          if (static_cast< ::google::protobuf::uint8>(tag) ==
   334              static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
   335            DO_(::google::protobuf::internal::WireFormatLite::ReadString(
   336                  input, this->mutable_active_store_key_id()));
   337            DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   338              this->active_store_key_id().data(), static_cast<int>(this->active_store_key_id().length()),
   339              ::google::protobuf::internal::WireFormatLite::PARSE,
   340              "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.active_store_key_id"));
   341          } else {
   342            goto handle_unusual;
   343          }
   344          break;
   345        }
   346  
   347        // string active_data_key_id = 4;
   348        case 4: {
   349          if (static_cast< ::google::protobuf::uint8>(tag) ==
   350              static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
   351            DO_(::google::protobuf::internal::WireFormatLite::ReadString(
   352                  input, this->mutable_active_data_key_id()));
   353            DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   354              this->active_data_key_id().data(), static_cast<int>(this->active_data_key_id().length()),
   355              ::google::protobuf::internal::WireFormatLite::PARSE,
   356              "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.active_data_key_id"));
   357          } else {
   358            goto handle_unusual;
   359          }
   360          break;
   361        }
   362  
   363        default: {
   364        handle_unusual:
   365          if (tag == 0) {
   366            goto success;
   367          }
   368          DO_(::google::protobuf::internal::WireFormatLite::SkipField(
   369              input, tag, &unknown_fields_stream));
   370          break;
   371        }
   372      }
   373    }
   374  success:
   375    // @@protoc_insertion_point(parse_success:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   376    return true;
   377  failure:
   378    // @@protoc_insertion_point(parse_failure:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   379    return false;
   380  #undef DO_
   381  }
   382  
   383  void DataKeysRegistry::SerializeWithCachedSizes(
   384      ::google::protobuf::io::CodedOutputStream* output) const {
   385    // @@protoc_insertion_point(serialize_start:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   386    ::google::protobuf::uint32 cached_has_bits = 0;
   387    (void) cached_has_bits;
   388  
   389    // map<string, .cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo> store_keys = 1;
   390    if (!this->store_keys().empty()) {
   391      typedef ::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo >::const_pointer
   392          ConstPtr;
   393      typedef ConstPtr SortItem;
   394      typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
   395      struct Utf8Check {
   396        static void Check(ConstPtr p) {
   397          ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   398            p->first.data(), static_cast<int>(p->first.length()),
   399            ::google::protobuf::internal::WireFormatLite::SERIALIZE,
   400            "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.StoreKeysEntry.key");
   401        }
   402      };
   403  
   404      if (output->IsSerializationDeterministic() &&
   405          this->store_keys().size() > 1) {
   406        ::std::unique_ptr<SortItem[]> items(
   407            new SortItem[this->store_keys().size()]);
   408        typedef ::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo >::size_type size_type;
   409        size_type n = 0;
   410        for (::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo >::const_iterator
   411            it = this->store_keys().begin();
   412            it != this->store_keys().end(); ++it, ++n) {
   413          items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
   414        }
   415        ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
   416        ::std::unique_ptr<DataKeysRegistry_StoreKeysEntry_DoNotUse> entry;
   417        for (size_type i = 0; i < n; i++) {
   418          entry.reset(store_keys_.NewEntryWrapper(
   419              items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
   420          ::google::protobuf::internal::WireFormatLite::WriteMessage(
   421              1, *entry, output);
   422          Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
   423        }
   424      } else {
   425        ::std::unique_ptr<DataKeysRegistry_StoreKeysEntry_DoNotUse> entry;
   426        for (::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo >::const_iterator
   427            it = this->store_keys().begin();
   428            it != this->store_keys().end(); ++it) {
   429          entry.reset(store_keys_.NewEntryWrapper(
   430              it->first, it->second));
   431          ::google::protobuf::internal::WireFormatLite::WriteMessage(
   432              1, *entry, output);
   433          Utf8Check::Check(&*it);
   434        }
   435      }
   436    }
   437  
   438    // map<string, .cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey> data_keys = 2;
   439    if (!this->data_keys().empty()) {
   440      typedef ::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey >::const_pointer
   441          ConstPtr;
   442      typedef ConstPtr SortItem;
   443      typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
   444      struct Utf8Check {
   445        static void Check(ConstPtr p) {
   446          ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   447            p->first.data(), static_cast<int>(p->first.length()),
   448            ::google::protobuf::internal::WireFormatLite::SERIALIZE,
   449            "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.DataKeysEntry.key");
   450        }
   451      };
   452  
   453      if (output->IsSerializationDeterministic() &&
   454          this->data_keys().size() > 1) {
   455        ::std::unique_ptr<SortItem[]> items(
   456            new SortItem[this->data_keys().size()]);
   457        typedef ::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey >::size_type size_type;
   458        size_type n = 0;
   459        for (::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey >::const_iterator
   460            it = this->data_keys().begin();
   461            it != this->data_keys().end(); ++it, ++n) {
   462          items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
   463        }
   464        ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
   465        ::std::unique_ptr<DataKeysRegistry_DataKeysEntry_DoNotUse> entry;
   466        for (size_type i = 0; i < n; i++) {
   467          entry.reset(data_keys_.NewEntryWrapper(
   468              items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
   469          ::google::protobuf::internal::WireFormatLite::WriteMessage(
   470              2, *entry, output);
   471          Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
   472        }
   473      } else {
   474        ::std::unique_ptr<DataKeysRegistry_DataKeysEntry_DoNotUse> entry;
   475        for (::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey >::const_iterator
   476            it = this->data_keys().begin();
   477            it != this->data_keys().end(); ++it) {
   478          entry.reset(data_keys_.NewEntryWrapper(
   479              it->first, it->second));
   480          ::google::protobuf::internal::WireFormatLite::WriteMessage(
   481              2, *entry, output);
   482          Utf8Check::Check(&*it);
   483        }
   484      }
   485    }
   486  
   487    // string active_store_key_id = 3;
   488    if (this->active_store_key_id().size() > 0) {
   489      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   490        this->active_store_key_id().data(), static_cast<int>(this->active_store_key_id().length()),
   491        ::google::protobuf::internal::WireFormatLite::SERIALIZE,
   492        "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.active_store_key_id");
   493      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
   494        3, this->active_store_key_id(), output);
   495    }
   496  
   497    // string active_data_key_id = 4;
   498    if (this->active_data_key_id().size() > 0) {
   499      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   500        this->active_data_key_id().data(), static_cast<int>(this->active_data_key_id().length()),
   501        ::google::protobuf::internal::WireFormatLite::SERIALIZE,
   502        "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry.active_data_key_id");
   503      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
   504        4, this->active_data_key_id(), output);
   505    }
   506  
   507    output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).data(),
   508                     static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).size()));
   509    // @@protoc_insertion_point(serialize_end:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   510  }
   511  
   512  size_t DataKeysRegistry::ByteSizeLong() const {
   513  // @@protoc_insertion_point(message_byte_size_start:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   514    size_t total_size = 0;
   515  
   516    total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).size();
   517  
   518    // map<string, .cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo> store_keys = 1;
   519    total_size += 1 *
   520        ::google::protobuf::internal::FromIntSize(this->store_keys_size());
   521    {
   522      ::std::unique_ptr<DataKeysRegistry_StoreKeysEntry_DoNotUse> entry;
   523      for (::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo >::const_iterator
   524          it = this->store_keys().begin();
   525          it != this->store_keys().end(); ++it) {
   526        entry.reset(store_keys_.NewEntryWrapper(it->first, it->second));
   527        total_size += ::google::protobuf::internal::WireFormatLite::
   528            MessageSizeNoVirtual(*entry);
   529      }
   530    }
   531  
   532    // map<string, .cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey> data_keys = 2;
   533    total_size += 1 *
   534        ::google::protobuf::internal::FromIntSize(this->data_keys_size());
   535    {
   536      ::std::unique_ptr<DataKeysRegistry_DataKeysEntry_DoNotUse> entry;
   537      for (::google::protobuf::Map< ::std::string, ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey >::const_iterator
   538          it = this->data_keys().begin();
   539          it != this->data_keys().end(); ++it) {
   540        entry.reset(data_keys_.NewEntryWrapper(it->first, it->second));
   541        total_size += ::google::protobuf::internal::WireFormatLite::
   542            MessageSizeNoVirtual(*entry);
   543      }
   544    }
   545  
   546    // string active_store_key_id = 3;
   547    if (this->active_store_key_id().size() > 0) {
   548      total_size += 1 +
   549        ::google::protobuf::internal::WireFormatLite::StringSize(
   550          this->active_store_key_id());
   551    }
   552  
   553    // string active_data_key_id = 4;
   554    if (this->active_data_key_id().size() > 0) {
   555      total_size += 1 +
   556        ::google::protobuf::internal::WireFormatLite::StringSize(
   557          this->active_data_key_id());
   558    }
   559  
   560    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   561    SetCachedSize(cached_size);
   562    return total_size;
   563  }
   564  
   565  void DataKeysRegistry::CheckTypeAndMergeFrom(
   566      const ::google::protobuf::MessageLite& from) {
   567    MergeFrom(*::google::protobuf::down_cast<const DataKeysRegistry*>(&from));
   568  }
   569  
   570  void DataKeysRegistry::MergeFrom(const DataKeysRegistry& from) {
   571  // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   572    GOOGLE_DCHECK_NE(&from, this);
   573    _internal_metadata_.MergeFrom(from._internal_metadata_);
   574    ::google::protobuf::uint32 cached_has_bits = 0;
   575    (void) cached_has_bits;
   576  
   577    store_keys_.MergeFrom(from.store_keys_);
   578    data_keys_.MergeFrom(from.data_keys_);
   579    if (from.active_store_key_id().size() > 0) {
   580  
   581      active_store_key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.active_store_key_id_);
   582    }
   583    if (from.active_data_key_id().size() > 0) {
   584  
   585      active_data_key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.active_data_key_id_);
   586    }
   587  }
   588  
   589  void DataKeysRegistry::CopyFrom(const DataKeysRegistry& from) {
   590  // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry)
   591    if (&from == this) return;
   592    Clear();
   593    MergeFrom(from);
   594  }
   595  
   596  bool DataKeysRegistry::IsInitialized() const {
   597    return true;
   598  }
   599  
   600  void DataKeysRegistry::Swap(DataKeysRegistry* other) {
   601    if (other == this) return;
   602    InternalSwap(other);
   603  }
   604  void DataKeysRegistry::InternalSwap(DataKeysRegistry* other) {
   605    using std::swap;
   606    store_keys_.Swap(&other->store_keys_);
   607    data_keys_.Swap(&other->data_keys_);
   608    active_store_key_id_.Swap(&other->active_store_key_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   609      GetArenaNoVirtual());
   610    active_data_key_id_.Swap(&other->active_data_key_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   611      GetArenaNoVirtual());
   612    _internal_metadata_.Swap(&other->_internal_metadata_);
   613  }
   614  
   615  ::std::string DataKeysRegistry::GetTypeName() const {
   616    return "cockroach.ccl.storageccl.engineccl.enginepbccl.DataKeysRegistry";
   617  }
   618  
   619  
   620  // ===================================================================
   621  
   622  void KeyInfo::InitAsDefaultInstance() {
   623  }
   624  #if !defined(_MSC_VER) || _MSC_VER >= 1900
   625  const int KeyInfo::kEncryptionTypeFieldNumber;
   626  const int KeyInfo::kKeyIdFieldNumber;
   627  const int KeyInfo::kCreationTimeFieldNumber;
   628  const int KeyInfo::kSourceFieldNumber;
   629  const int KeyInfo::kWasExposedFieldNumber;
   630  const int KeyInfo::kParentKeyIdFieldNumber;
   631  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
   632  
   633  KeyInfo::KeyInfo()
   634    : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
   635    ::google::protobuf::internal::InitSCC(
   636        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_KeyInfo.base);
   637    SharedCtor();
   638    // @@protoc_insertion_point(constructor:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   639  }
   640  KeyInfo::KeyInfo(const KeyInfo& from)
   641    : ::google::protobuf::MessageLite(),
   642        _internal_metadata_(NULL) {
   643    _internal_metadata_.MergeFrom(from._internal_metadata_);
   644    key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   645    if (from.key_id().size() > 0) {
   646      key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_id_);
   647    }
   648    source_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   649    if (from.source().size() > 0) {
   650      source_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_);
   651    }
   652    parent_key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   653    if (from.parent_key_id().size() > 0) {
   654      parent_key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_key_id_);
   655    }
   656    ::memcpy(&creation_time_, &from.creation_time_,
   657      static_cast<size_t>(reinterpret_cast<char*>(&was_exposed_) -
   658      reinterpret_cast<char*>(&creation_time_)) + sizeof(was_exposed_));
   659    // @@protoc_insertion_point(copy_constructor:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   660  }
   661  
   662  void KeyInfo::SharedCtor() {
   663    key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   664    source_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   665    parent_key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   666    ::memset(&creation_time_, 0, static_cast<size_t>(
   667        reinterpret_cast<char*>(&was_exposed_) -
   668        reinterpret_cast<char*>(&creation_time_)) + sizeof(was_exposed_));
   669  }
   670  
   671  KeyInfo::~KeyInfo() {
   672    // @@protoc_insertion_point(destructor:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   673    SharedDtor();
   674  }
   675  
   676  void KeyInfo::SharedDtor() {
   677    key_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   678    source_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   679    parent_key_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   680  }
   681  
   682  void KeyInfo::SetCachedSize(int size) const {
   683    _cached_size_.Set(size);
   684  }
   685  const KeyInfo& KeyInfo::default_instance() {
   686    ::google::protobuf::internal::InitSCC(&protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_KeyInfo.base);
   687    return *internal_default_instance();
   688  }
   689  
   690  
   691  void KeyInfo::Clear() {
   692  // @@protoc_insertion_point(message_clear_start:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   693    ::google::protobuf::uint32 cached_has_bits = 0;
   694    // Prevent compiler warnings about cached_has_bits being unused
   695    (void) cached_has_bits;
   696  
   697    key_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   698    source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   699    parent_key_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   700    ::memset(&creation_time_, 0, static_cast<size_t>(
   701        reinterpret_cast<char*>(&was_exposed_) -
   702        reinterpret_cast<char*>(&creation_time_)) + sizeof(was_exposed_));
   703    _internal_metadata_.Clear();
   704  }
   705  
   706  bool KeyInfo::MergePartialFromCodedStream(
   707      ::google::protobuf::io::CodedInputStream* input) {
   708  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
   709    ::google::protobuf::uint32 tag;
   710    ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
   711        &_internal_metadata_);
   712    ::google::protobuf::io::StringOutputStream unknown_fields_output(
   713        unknown_fields_setter.buffer());
   714    ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
   715        &unknown_fields_output, false);
   716    // @@protoc_insertion_point(parse_start:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   717    for (;;) {
   718      ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
   719      tag = p.first;
   720      if (!p.second) goto handle_unusual;
   721      switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
   722        // .cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType encryption_type = 1;
   723        case 1: {
   724          if (static_cast< ::google::protobuf::uint8>(tag) ==
   725              static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
   726            int value;
   727            DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
   728                     int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
   729                   input, &value)));
   730            set_encryption_type(static_cast< ::cockroach::ccl::storageccl::engineccl::enginepbccl::EncryptionType >(value));
   731          } else {
   732            goto handle_unusual;
   733          }
   734          break;
   735        }
   736  
   737        // string key_id = 2;
   738        case 2: {
   739          if (static_cast< ::google::protobuf::uint8>(tag) ==
   740              static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
   741            DO_(::google::protobuf::internal::WireFormatLite::ReadString(
   742                  input, this->mutable_key_id()));
   743            DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   744              this->key_id().data(), static_cast<int>(this->key_id().length()),
   745              ::google::protobuf::internal::WireFormatLite::PARSE,
   746              "cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo.key_id"));
   747          } else {
   748            goto handle_unusual;
   749          }
   750          break;
   751        }
   752  
   753        // int64 creation_time = 3;
   754        case 3: {
   755          if (static_cast< ::google::protobuf::uint8>(tag) ==
   756              static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
   757  
   758            DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
   759                     ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
   760                   input, &creation_time_)));
   761          } else {
   762            goto handle_unusual;
   763          }
   764          break;
   765        }
   766  
   767        // string source = 4;
   768        case 4: {
   769          if (static_cast< ::google::protobuf::uint8>(tag) ==
   770              static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
   771            DO_(::google::protobuf::internal::WireFormatLite::ReadString(
   772                  input, this->mutable_source()));
   773            DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   774              this->source().data(), static_cast<int>(this->source().length()),
   775              ::google::protobuf::internal::WireFormatLite::PARSE,
   776              "cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo.source"));
   777          } else {
   778            goto handle_unusual;
   779          }
   780          break;
   781        }
   782  
   783        // bool was_exposed = 5;
   784        case 5: {
   785          if (static_cast< ::google::protobuf::uint8>(tag) ==
   786              static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
   787  
   788            DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
   789                     bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
   790                   input, &was_exposed_)));
   791          } else {
   792            goto handle_unusual;
   793          }
   794          break;
   795        }
   796  
   797        // string parent_key_id = 6;
   798        case 6: {
   799          if (static_cast< ::google::protobuf::uint8>(tag) ==
   800              static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
   801            DO_(::google::protobuf::internal::WireFormatLite::ReadString(
   802                  input, this->mutable_parent_key_id()));
   803            DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   804              this->parent_key_id().data(), static_cast<int>(this->parent_key_id().length()),
   805              ::google::protobuf::internal::WireFormatLite::PARSE,
   806              "cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo.parent_key_id"));
   807          } else {
   808            goto handle_unusual;
   809          }
   810          break;
   811        }
   812  
   813        default: {
   814        handle_unusual:
   815          if (tag == 0) {
   816            goto success;
   817          }
   818          DO_(::google::protobuf::internal::WireFormatLite::SkipField(
   819              input, tag, &unknown_fields_stream));
   820          break;
   821        }
   822      }
   823    }
   824  success:
   825    // @@protoc_insertion_point(parse_success:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   826    return true;
   827  failure:
   828    // @@protoc_insertion_point(parse_failure:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   829    return false;
   830  #undef DO_
   831  }
   832  
   833  void KeyInfo::SerializeWithCachedSizes(
   834      ::google::protobuf::io::CodedOutputStream* output) const {
   835    // @@protoc_insertion_point(serialize_start:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   836    ::google::protobuf::uint32 cached_has_bits = 0;
   837    (void) cached_has_bits;
   838  
   839    // .cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType encryption_type = 1;
   840    if (this->encryption_type() != 0) {
   841      ::google::protobuf::internal::WireFormatLite::WriteEnum(
   842        1, this->encryption_type(), output);
   843    }
   844  
   845    // string key_id = 2;
   846    if (this->key_id().size() > 0) {
   847      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   848        this->key_id().data(), static_cast<int>(this->key_id().length()),
   849        ::google::protobuf::internal::WireFormatLite::SERIALIZE,
   850        "cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo.key_id");
   851      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
   852        2, this->key_id(), output);
   853    }
   854  
   855    // int64 creation_time = 3;
   856    if (this->creation_time() != 0) {
   857      ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->creation_time(), output);
   858    }
   859  
   860    // string source = 4;
   861    if (this->source().size() > 0) {
   862      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   863        this->source().data(), static_cast<int>(this->source().length()),
   864        ::google::protobuf::internal::WireFormatLite::SERIALIZE,
   865        "cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo.source");
   866      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
   867        4, this->source(), output);
   868    }
   869  
   870    // bool was_exposed = 5;
   871    if (this->was_exposed() != 0) {
   872      ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->was_exposed(), output);
   873    }
   874  
   875    // string parent_key_id = 6;
   876    if (this->parent_key_id().size() > 0) {
   877      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
   878        this->parent_key_id().data(), static_cast<int>(this->parent_key_id().length()),
   879        ::google::protobuf::internal::WireFormatLite::SERIALIZE,
   880        "cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo.parent_key_id");
   881      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
   882        6, this->parent_key_id(), output);
   883    }
   884  
   885    output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).data(),
   886                     static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).size()));
   887    // @@protoc_insertion_point(serialize_end:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   888  }
   889  
   890  size_t KeyInfo::ByteSizeLong() const {
   891  // @@protoc_insertion_point(message_byte_size_start:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   892    size_t total_size = 0;
   893  
   894    total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).size();
   895  
   896    // string key_id = 2;
   897    if (this->key_id().size() > 0) {
   898      total_size += 1 +
   899        ::google::protobuf::internal::WireFormatLite::StringSize(
   900          this->key_id());
   901    }
   902  
   903    // string source = 4;
   904    if (this->source().size() > 0) {
   905      total_size += 1 +
   906        ::google::protobuf::internal::WireFormatLite::StringSize(
   907          this->source());
   908    }
   909  
   910    // string parent_key_id = 6;
   911    if (this->parent_key_id().size() > 0) {
   912      total_size += 1 +
   913        ::google::protobuf::internal::WireFormatLite::StringSize(
   914          this->parent_key_id());
   915    }
   916  
   917    // int64 creation_time = 3;
   918    if (this->creation_time() != 0) {
   919      total_size += 1 +
   920        ::google::protobuf::internal::WireFormatLite::Int64Size(
   921          this->creation_time());
   922    }
   923  
   924    // .cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType encryption_type = 1;
   925    if (this->encryption_type() != 0) {
   926      total_size += 1 +
   927        ::google::protobuf::internal::WireFormatLite::EnumSize(this->encryption_type());
   928    }
   929  
   930    // bool was_exposed = 5;
   931    if (this->was_exposed() != 0) {
   932      total_size += 1 + 1;
   933    }
   934  
   935    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
   936    SetCachedSize(cached_size);
   937    return total_size;
   938  }
   939  
   940  void KeyInfo::CheckTypeAndMergeFrom(
   941      const ::google::protobuf::MessageLite& from) {
   942    MergeFrom(*::google::protobuf::down_cast<const KeyInfo*>(&from));
   943  }
   944  
   945  void KeyInfo::MergeFrom(const KeyInfo& from) {
   946  // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   947    GOOGLE_DCHECK_NE(&from, this);
   948    _internal_metadata_.MergeFrom(from._internal_metadata_);
   949    ::google::protobuf::uint32 cached_has_bits = 0;
   950    (void) cached_has_bits;
   951  
   952    if (from.key_id().size() > 0) {
   953  
   954      key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_id_);
   955    }
   956    if (from.source().size() > 0) {
   957  
   958      source_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_);
   959    }
   960    if (from.parent_key_id().size() > 0) {
   961  
   962      parent_key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.parent_key_id_);
   963    }
   964    if (from.creation_time() != 0) {
   965      set_creation_time(from.creation_time());
   966    }
   967    if (from.encryption_type() != 0) {
   968      set_encryption_type(from.encryption_type());
   969    }
   970    if (from.was_exposed() != 0) {
   971      set_was_exposed(from.was_exposed());
   972    }
   973  }
   974  
   975  void KeyInfo::CopyFrom(const KeyInfo& from) {
   976  // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo)
   977    if (&from == this) return;
   978    Clear();
   979    MergeFrom(from);
   980  }
   981  
   982  bool KeyInfo::IsInitialized() const {
   983    return true;
   984  }
   985  
   986  void KeyInfo::Swap(KeyInfo* other) {
   987    if (other == this) return;
   988    InternalSwap(other);
   989  }
   990  void KeyInfo::InternalSwap(KeyInfo* other) {
   991    using std::swap;
   992    key_id_.Swap(&other->key_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   993      GetArenaNoVirtual());
   994    source_.Swap(&other->source_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   995      GetArenaNoVirtual());
   996    parent_key_id_.Swap(&other->parent_key_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
   997      GetArenaNoVirtual());
   998    swap(creation_time_, other->creation_time_);
   999    swap(encryption_type_, other->encryption_type_);
  1000    swap(was_exposed_, other->was_exposed_);
  1001    _internal_metadata_.Swap(&other->_internal_metadata_);
  1002  }
  1003  
  1004  ::std::string KeyInfo::GetTypeName() const {
  1005    return "cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo";
  1006  }
  1007  
  1008  
  1009  // ===================================================================
  1010  
  1011  void SecretKey::InitAsDefaultInstance() {
  1012    ::cockroach::ccl::storageccl::engineccl::enginepbccl::_SecretKey_default_instance_._instance.get_mutable()->info_ = const_cast< ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo*>(
  1013        ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo::internal_default_instance());
  1014  }
  1015  #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1016  const int SecretKey::kInfoFieldNumber;
  1017  const int SecretKey::kKeyFieldNumber;
  1018  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
  1019  
  1020  SecretKey::SecretKey()
  1021    : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  1022    ::google::protobuf::internal::InitSCC(
  1023        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_SecretKey.base);
  1024    SharedCtor();
  1025    // @@protoc_insertion_point(constructor:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1026  }
  1027  SecretKey::SecretKey(const SecretKey& from)
  1028    : ::google::protobuf::MessageLite(),
  1029        _internal_metadata_(NULL) {
  1030    _internal_metadata_.MergeFrom(from._internal_metadata_);
  1031    key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1032    if (from.key().size() > 0) {
  1033      key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  1034    }
  1035    if (from.has_info()) {
  1036      info_ = new ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo(*from.info_);
  1037    } else {
  1038      info_ = NULL;
  1039    }
  1040    // @@protoc_insertion_point(copy_constructor:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1041  }
  1042  
  1043  void SecretKey::SharedCtor() {
  1044    key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1045    info_ = NULL;
  1046  }
  1047  
  1048  SecretKey::~SecretKey() {
  1049    // @@protoc_insertion_point(destructor:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1050    SharedDtor();
  1051  }
  1052  
  1053  void SecretKey::SharedDtor() {
  1054    key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1055    if (this != internal_default_instance()) delete info_;
  1056  }
  1057  
  1058  void SecretKey::SetCachedSize(int size) const {
  1059    _cached_size_.Set(size);
  1060  }
  1061  const SecretKey& SecretKey::default_instance() {
  1062    ::google::protobuf::internal::InitSCC(&protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_SecretKey.base);
  1063    return *internal_default_instance();
  1064  }
  1065  
  1066  
  1067  void SecretKey::Clear() {
  1068  // @@protoc_insertion_point(message_clear_start:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1069    ::google::protobuf::uint32 cached_has_bits = 0;
  1070    // Prevent compiler warnings about cached_has_bits being unused
  1071    (void) cached_has_bits;
  1072  
  1073    key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1074    if (GetArenaNoVirtual() == NULL && info_ != NULL) {
  1075      delete info_;
  1076    }
  1077    info_ = NULL;
  1078    _internal_metadata_.Clear();
  1079  }
  1080  
  1081  bool SecretKey::MergePartialFromCodedStream(
  1082      ::google::protobuf::io::CodedInputStream* input) {
  1083  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1084    ::google::protobuf::uint32 tag;
  1085    ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  1086        &_internal_metadata_);
  1087    ::google::protobuf::io::StringOutputStream unknown_fields_output(
  1088        unknown_fields_setter.buffer());
  1089    ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  1090        &unknown_fields_output, false);
  1091    // @@protoc_insertion_point(parse_start:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1092    for (;;) {
  1093      ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1094      tag = p.first;
  1095      if (!p.second) goto handle_unusual;
  1096      switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1097        // .cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo info = 1;
  1098        case 1: {
  1099          if (static_cast< ::google::protobuf::uint8>(tag) ==
  1100              static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
  1101            DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
  1102                 input, mutable_info()));
  1103          } else {
  1104            goto handle_unusual;
  1105          }
  1106          break;
  1107        }
  1108  
  1109        // bytes key = 2;
  1110        case 2: {
  1111          if (static_cast< ::google::protobuf::uint8>(tag) ==
  1112              static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1113            DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  1114                  input, this->mutable_key()));
  1115          } else {
  1116            goto handle_unusual;
  1117          }
  1118          break;
  1119        }
  1120  
  1121        default: {
  1122        handle_unusual:
  1123          if (tag == 0) {
  1124            goto success;
  1125          }
  1126          DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  1127              input, tag, &unknown_fields_stream));
  1128          break;
  1129        }
  1130      }
  1131    }
  1132  success:
  1133    // @@protoc_insertion_point(parse_success:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1134    return true;
  1135  failure:
  1136    // @@protoc_insertion_point(parse_failure:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1137    return false;
  1138  #undef DO_
  1139  }
  1140  
  1141  void SecretKey::SerializeWithCachedSizes(
  1142      ::google::protobuf::io::CodedOutputStream* output) const {
  1143    // @@protoc_insertion_point(serialize_start:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1144    ::google::protobuf::uint32 cached_has_bits = 0;
  1145    (void) cached_has_bits;
  1146  
  1147    // .cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo info = 1;
  1148    if (this->has_info()) {
  1149      ::google::protobuf::internal::WireFormatLite::WriteMessage(
  1150        1, this->_internal_info(), output);
  1151    }
  1152  
  1153    // bytes key = 2;
  1154    if (this->key().size() > 0) {
  1155      ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  1156        2, this->key(), output);
  1157    }
  1158  
  1159    output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).data(),
  1160                     static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).size()));
  1161    // @@protoc_insertion_point(serialize_end:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1162  }
  1163  
  1164  size_t SecretKey::ByteSizeLong() const {
  1165  // @@protoc_insertion_point(message_byte_size_start:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1166    size_t total_size = 0;
  1167  
  1168    total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).size();
  1169  
  1170    // bytes key = 2;
  1171    if (this->key().size() > 0) {
  1172      total_size += 1 +
  1173        ::google::protobuf::internal::WireFormatLite::BytesSize(
  1174          this->key());
  1175    }
  1176  
  1177    // .cockroach.ccl.storageccl.engineccl.enginepbccl.KeyInfo info = 1;
  1178    if (this->has_info()) {
  1179      total_size += 1 +
  1180        ::google::protobuf::internal::WireFormatLite::MessageSize(
  1181          *info_);
  1182    }
  1183  
  1184    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1185    SetCachedSize(cached_size);
  1186    return total_size;
  1187  }
  1188  
  1189  void SecretKey::CheckTypeAndMergeFrom(
  1190      const ::google::protobuf::MessageLite& from) {
  1191    MergeFrom(*::google::protobuf::down_cast<const SecretKey*>(&from));
  1192  }
  1193  
  1194  void SecretKey::MergeFrom(const SecretKey& from) {
  1195  // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1196    GOOGLE_DCHECK_NE(&from, this);
  1197    _internal_metadata_.MergeFrom(from._internal_metadata_);
  1198    ::google::protobuf::uint32 cached_has_bits = 0;
  1199    (void) cached_has_bits;
  1200  
  1201    if (from.key().size() > 0) {
  1202  
  1203      key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  1204    }
  1205    if (from.has_info()) {
  1206      mutable_info()->::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo::MergeFrom(from.info());
  1207    }
  1208  }
  1209  
  1210  void SecretKey::CopyFrom(const SecretKey& from) {
  1211  // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey)
  1212    if (&from == this) return;
  1213    Clear();
  1214    MergeFrom(from);
  1215  }
  1216  
  1217  bool SecretKey::IsInitialized() const {
  1218    return true;
  1219  }
  1220  
  1221  void SecretKey::Swap(SecretKey* other) {
  1222    if (other == this) return;
  1223    InternalSwap(other);
  1224  }
  1225  void SecretKey::InternalSwap(SecretKey* other) {
  1226    using std::swap;
  1227    key_.Swap(&other->key_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1228      GetArenaNoVirtual());
  1229    swap(info_, other->info_);
  1230    _internal_metadata_.Swap(&other->_internal_metadata_);
  1231  }
  1232  
  1233  ::std::string SecretKey::GetTypeName() const {
  1234    return "cockroach.ccl.storageccl.engineccl.enginepbccl.SecretKey";
  1235  }
  1236  
  1237  
  1238  // ===================================================================
  1239  
  1240  void EncryptionSettings::InitAsDefaultInstance() {
  1241  }
  1242  #if !defined(_MSC_VER) || _MSC_VER >= 1900
  1243  const int EncryptionSettings::kEncryptionTypeFieldNumber;
  1244  const int EncryptionSettings::kKeyIdFieldNumber;
  1245  const int EncryptionSettings::kNonceFieldNumber;
  1246  const int EncryptionSettings::kCounterFieldNumber;
  1247  #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
  1248  
  1249  EncryptionSettings::EncryptionSettings()
  1250    : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  1251    ::google::protobuf::internal::InitSCC(
  1252        &protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_EncryptionSettings.base);
  1253    SharedCtor();
  1254    // @@protoc_insertion_point(constructor:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1255  }
  1256  EncryptionSettings::EncryptionSettings(const EncryptionSettings& from)
  1257    : ::google::protobuf::MessageLite(),
  1258        _internal_metadata_(NULL) {
  1259    _internal_metadata_.MergeFrom(from._internal_metadata_);
  1260    key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1261    if (from.key_id().size() > 0) {
  1262      key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_id_);
  1263    }
  1264    nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1265    if (from.nonce().size() > 0) {
  1266      nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.nonce_);
  1267    }
  1268    ::memcpy(&encryption_type_, &from.encryption_type_,
  1269      static_cast<size_t>(reinterpret_cast<char*>(&counter_) -
  1270      reinterpret_cast<char*>(&encryption_type_)) + sizeof(counter_));
  1271    // @@protoc_insertion_point(copy_constructor:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1272  }
  1273  
  1274  void EncryptionSettings::SharedCtor() {
  1275    key_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1276    nonce_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1277    ::memset(&encryption_type_, 0, static_cast<size_t>(
  1278        reinterpret_cast<char*>(&counter_) -
  1279        reinterpret_cast<char*>(&encryption_type_)) + sizeof(counter_));
  1280  }
  1281  
  1282  EncryptionSettings::~EncryptionSettings() {
  1283    // @@protoc_insertion_point(destructor:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1284    SharedDtor();
  1285  }
  1286  
  1287  void EncryptionSettings::SharedDtor() {
  1288    key_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1289    nonce_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1290  }
  1291  
  1292  void EncryptionSettings::SetCachedSize(int size) const {
  1293    _cached_size_.Set(size);
  1294  }
  1295  const EncryptionSettings& EncryptionSettings::default_instance() {
  1296    ::google::protobuf::internal::InitSCC(&protobuf_ccl_2fstorageccl_2fengineccl_2fenginepbccl_2fkey_5fregistry_2eproto::scc_info_EncryptionSettings.base);
  1297    return *internal_default_instance();
  1298  }
  1299  
  1300  
  1301  void EncryptionSettings::Clear() {
  1302  // @@protoc_insertion_point(message_clear_start:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1303    ::google::protobuf::uint32 cached_has_bits = 0;
  1304    // Prevent compiler warnings about cached_has_bits being unused
  1305    (void) cached_has_bits;
  1306  
  1307    key_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1308    nonce_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  1309    ::memset(&encryption_type_, 0, static_cast<size_t>(
  1310        reinterpret_cast<char*>(&counter_) -
  1311        reinterpret_cast<char*>(&encryption_type_)) + sizeof(counter_));
  1312    _internal_metadata_.Clear();
  1313  }
  1314  
  1315  bool EncryptionSettings::MergePartialFromCodedStream(
  1316      ::google::protobuf::io::CodedInputStream* input) {
  1317  #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  1318    ::google::protobuf::uint32 tag;
  1319    ::google::protobuf::internal::LiteUnknownFieldSetter unknown_fields_setter(
  1320        &_internal_metadata_);
  1321    ::google::protobuf::io::StringOutputStream unknown_fields_output(
  1322        unknown_fields_setter.buffer());
  1323    ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
  1324        &unknown_fields_output, false);
  1325    // @@protoc_insertion_point(parse_start:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1326    for (;;) {
  1327      ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  1328      tag = p.first;
  1329      if (!p.second) goto handle_unusual;
  1330      switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  1331        // .cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType encryption_type = 1;
  1332        case 1: {
  1333          if (static_cast< ::google::protobuf::uint8>(tag) ==
  1334              static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
  1335            int value;
  1336            DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1337                     int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  1338                   input, &value)));
  1339            set_encryption_type(static_cast< ::cockroach::ccl::storageccl::engineccl::enginepbccl::EncryptionType >(value));
  1340          } else {
  1341            goto handle_unusual;
  1342          }
  1343          break;
  1344        }
  1345  
  1346        // string key_id = 2;
  1347        case 2: {
  1348          if (static_cast< ::google::protobuf::uint8>(tag) ==
  1349              static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
  1350            DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  1351                  input, this->mutable_key_id()));
  1352            DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1353              this->key_id().data(), static_cast<int>(this->key_id().length()),
  1354              ::google::protobuf::internal::WireFormatLite::PARSE,
  1355              "cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings.key_id"));
  1356          } else {
  1357            goto handle_unusual;
  1358          }
  1359          break;
  1360        }
  1361  
  1362        // bytes nonce = 3;
  1363        case 3: {
  1364          if (static_cast< ::google::protobuf::uint8>(tag) ==
  1365              static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
  1366            DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
  1367                  input, this->mutable_nonce()));
  1368          } else {
  1369            goto handle_unusual;
  1370          }
  1371          break;
  1372        }
  1373  
  1374        // uint32 counter = 4;
  1375        case 4: {
  1376          if (static_cast< ::google::protobuf::uint8>(tag) ==
  1377              static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
  1378  
  1379            DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  1380                     ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
  1381                   input, &counter_)));
  1382          } else {
  1383            goto handle_unusual;
  1384          }
  1385          break;
  1386        }
  1387  
  1388        default: {
  1389        handle_unusual:
  1390          if (tag == 0) {
  1391            goto success;
  1392          }
  1393          DO_(::google::protobuf::internal::WireFormatLite::SkipField(
  1394              input, tag, &unknown_fields_stream));
  1395          break;
  1396        }
  1397      }
  1398    }
  1399  success:
  1400    // @@protoc_insertion_point(parse_success:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1401    return true;
  1402  failure:
  1403    // @@protoc_insertion_point(parse_failure:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1404    return false;
  1405  #undef DO_
  1406  }
  1407  
  1408  void EncryptionSettings::SerializeWithCachedSizes(
  1409      ::google::protobuf::io::CodedOutputStream* output) const {
  1410    // @@protoc_insertion_point(serialize_start:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1411    ::google::protobuf::uint32 cached_has_bits = 0;
  1412    (void) cached_has_bits;
  1413  
  1414    // .cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType encryption_type = 1;
  1415    if (this->encryption_type() != 0) {
  1416      ::google::protobuf::internal::WireFormatLite::WriteEnum(
  1417        1, this->encryption_type(), output);
  1418    }
  1419  
  1420    // string key_id = 2;
  1421    if (this->key_id().size() > 0) {
  1422      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  1423        this->key_id().data(), static_cast<int>(this->key_id().length()),
  1424        ::google::protobuf::internal::WireFormatLite::SERIALIZE,
  1425        "cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings.key_id");
  1426      ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
  1427        2, this->key_id(), output);
  1428    }
  1429  
  1430    // bytes nonce = 3;
  1431    if (this->nonce().size() > 0) {
  1432      ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
  1433        3, this->nonce(), output);
  1434    }
  1435  
  1436    // uint32 counter = 4;
  1437    if (this->counter() != 0) {
  1438      ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->counter(), output);
  1439    }
  1440  
  1441    output->WriteRaw((::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).data(),
  1442                     static_cast<int>((::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).size()));
  1443    // @@protoc_insertion_point(serialize_end:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1444  }
  1445  
  1446  size_t EncryptionSettings::ByteSizeLong() const {
  1447  // @@protoc_insertion_point(message_byte_size_start:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1448    size_t total_size = 0;
  1449  
  1450    total_size += (::google::protobuf::internal::GetProto3PreserveUnknownsDefault()   ? _internal_metadata_.unknown_fields()   : _internal_metadata_.default_instance()).size();
  1451  
  1452    // string key_id = 2;
  1453    if (this->key_id().size() > 0) {
  1454      total_size += 1 +
  1455        ::google::protobuf::internal::WireFormatLite::StringSize(
  1456          this->key_id());
  1457    }
  1458  
  1459    // bytes nonce = 3;
  1460    if (this->nonce().size() > 0) {
  1461      total_size += 1 +
  1462        ::google::protobuf::internal::WireFormatLite::BytesSize(
  1463          this->nonce());
  1464    }
  1465  
  1466    // .cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionType encryption_type = 1;
  1467    if (this->encryption_type() != 0) {
  1468      total_size += 1 +
  1469        ::google::protobuf::internal::WireFormatLite::EnumSize(this->encryption_type());
  1470    }
  1471  
  1472    // uint32 counter = 4;
  1473    if (this->counter() != 0) {
  1474      total_size += 1 +
  1475        ::google::protobuf::internal::WireFormatLite::UInt32Size(
  1476          this->counter());
  1477    }
  1478  
  1479    int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  1480    SetCachedSize(cached_size);
  1481    return total_size;
  1482  }
  1483  
  1484  void EncryptionSettings::CheckTypeAndMergeFrom(
  1485      const ::google::protobuf::MessageLite& from) {
  1486    MergeFrom(*::google::protobuf::down_cast<const EncryptionSettings*>(&from));
  1487  }
  1488  
  1489  void EncryptionSettings::MergeFrom(const EncryptionSettings& from) {
  1490  // @@protoc_insertion_point(class_specific_merge_from_start:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1491    GOOGLE_DCHECK_NE(&from, this);
  1492    _internal_metadata_.MergeFrom(from._internal_metadata_);
  1493    ::google::protobuf::uint32 cached_has_bits = 0;
  1494    (void) cached_has_bits;
  1495  
  1496    if (from.key_id().size() > 0) {
  1497  
  1498      key_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_id_);
  1499    }
  1500    if (from.nonce().size() > 0) {
  1501  
  1502      nonce_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.nonce_);
  1503    }
  1504    if (from.encryption_type() != 0) {
  1505      set_encryption_type(from.encryption_type());
  1506    }
  1507    if (from.counter() != 0) {
  1508      set_counter(from.counter());
  1509    }
  1510  }
  1511  
  1512  void EncryptionSettings::CopyFrom(const EncryptionSettings& from) {
  1513  // @@protoc_insertion_point(class_specific_copy_from_start:cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings)
  1514    if (&from == this) return;
  1515    Clear();
  1516    MergeFrom(from);
  1517  }
  1518  
  1519  bool EncryptionSettings::IsInitialized() const {
  1520    return true;
  1521  }
  1522  
  1523  void EncryptionSettings::Swap(EncryptionSettings* other) {
  1524    if (other == this) return;
  1525    InternalSwap(other);
  1526  }
  1527  void EncryptionSettings::InternalSwap(EncryptionSettings* other) {
  1528    using std::swap;
  1529    key_id_.Swap(&other->key_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1530      GetArenaNoVirtual());
  1531    nonce_.Swap(&other->nonce_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
  1532      GetArenaNoVirtual());
  1533    swap(encryption_type_, other->encryption_type_);
  1534    swap(counter_, other->counter_);
  1535    _internal_metadata_.Swap(&other->_internal_metadata_);
  1536  }
  1537  
  1538  ::std::string EncryptionSettings::GetTypeName() const {
  1539    return "cockroach.ccl.storageccl.engineccl.enginepbccl.EncryptionSettings";
  1540  }
  1541  
  1542  
  1543  // @@protoc_insertion_point(namespace_scope)
  1544  }  // namespace enginepbccl
  1545  }  // namespace engineccl
  1546  }  // namespace storageccl
  1547  }  // namespace ccl
  1548  }  // namespace cockroach
  1549  namespace google {
  1550  namespace protobuf {
  1551  template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_StoreKeysEntry_DoNotUse* Arena::CreateMaybeMessage< ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_StoreKeysEntry_DoNotUse >(Arena* arena) {
  1552    return Arena::CreateInternal< ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_StoreKeysEntry_DoNotUse >(arena);
  1553  }
  1554  template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_DataKeysEntry_DoNotUse* Arena::CreateMaybeMessage< ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_DataKeysEntry_DoNotUse >(Arena* arena) {
  1555    return Arena::CreateInternal< ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry_DataKeysEntry_DoNotUse >(arena);
  1556  }
  1557  template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry* Arena::CreateMaybeMessage< ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry >(Arena* arena) {
  1558    return Arena::CreateInternal< ::cockroach::ccl::storageccl::engineccl::enginepbccl::DataKeysRegistry >(arena);
  1559  }
  1560  template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo* Arena::CreateMaybeMessage< ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo >(Arena* arena) {
  1561    return Arena::CreateInternal< ::cockroach::ccl::storageccl::engineccl::enginepbccl::KeyInfo >(arena);
  1562  }
  1563  template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey* Arena::CreateMaybeMessage< ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey >(Arena* arena) {
  1564    return Arena::CreateInternal< ::cockroach::ccl::storageccl::engineccl::enginepbccl::SecretKey >(arena);
  1565  }
  1566  template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::cockroach::ccl::storageccl::engineccl::enginepbccl::EncryptionSettings* Arena::CreateMaybeMessage< ::cockroach::ccl::storageccl::engineccl::enginepbccl::EncryptionSettings >(Arena* arena) {
  1567    return Arena::CreateInternal< ::cockroach::ccl::storageccl::engineccl::enginepbccl::EncryptionSettings >(arena);
  1568  }
  1569  }  // namespace protobuf
  1570  }  // namespace google
  1571  
  1572  // @@protoc_insertion_point(global_scope)