// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: artm/messages.proto

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "artm/messages.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)

namespace artm {

namespace {

const ::google::protobuf::Descriptor* DoubleArray_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DoubleArray_reflection_ = NULL;
const ::google::protobuf::Descriptor* FloatArray_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  FloatArray_reflection_ = NULL;
const ::google::protobuf::Descriptor* BoolArray_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  BoolArray_reflection_ = NULL;
const ::google::protobuf::Descriptor* StringArray_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  StringArray_reflection_ = NULL;
const ::google::protobuf::Descriptor* Item_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Item_reflection_ = NULL;
const ::google::protobuf::Descriptor* Field_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Field_reflection_ = NULL;
const ::google::protobuf::Descriptor* Batch_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Batch_reflection_ = NULL;
const ::google::protobuf::Descriptor* Stream_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Stream_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Stream_Type_descriptor_ = NULL;
const ::google::protobuf::Descriptor* MasterComponentConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  MasterComponentConfig_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* MasterComponentConfig_ModusOperandi_descriptor_ = NULL;
const ::google::protobuf::Descriptor* NodeControllerConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  NodeControllerConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* MasterProxyConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  MasterProxyConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* ModelConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ModelConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* RegularizerConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  RegularizerConfig_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* RegularizerConfig_Type_descriptor_ = NULL;
const ::google::protobuf::Descriptor* SmoothSparseThetaConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SmoothSparseThetaConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* SmoothSparsePhiConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SmoothSparsePhiConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* DecorrelatorPhiConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DecorrelatorPhiConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* MultiLanguagePhiConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  MultiLanguagePhiConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* RegularizerInternalState_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  RegularizerInternalState_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* RegularizerInternalState_Type_descriptor_ = NULL;
const ::google::protobuf::Descriptor* MultiLanguagePhiInternalState_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  MultiLanguagePhiInternalState_reflection_ = NULL;
const ::google::protobuf::Descriptor* DictionaryConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DictionaryConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* DictionaryEntry_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DictionaryEntry_reflection_ = NULL;
const ::google::protobuf::Descriptor* ScoreConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ScoreConfig_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* ScoreConfig_Type_descriptor_ = NULL;
const ::google::protobuf::Descriptor* ScoreData_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ScoreData_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* ScoreData_Type_descriptor_ = NULL;
const ::google::protobuf::Descriptor* PerplexityScoreConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PerplexityScoreConfig_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* PerplexityScoreConfig_Type_descriptor_ = NULL;
const ::google::protobuf::Descriptor* PerplexityScore_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PerplexityScore_reflection_ = NULL;
const ::google::protobuf::Descriptor* SparsityThetaScoreConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SparsityThetaScoreConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* SparsityThetaScore_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SparsityThetaScore_reflection_ = NULL;
const ::google::protobuf::Descriptor* SparsityPhiScoreConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SparsityPhiScoreConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* SparsityPhiScore_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SparsityPhiScore_reflection_ = NULL;
const ::google::protobuf::Descriptor* ItemsProcessedScoreConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ItemsProcessedScoreConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* ItemsProcessedScore_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ItemsProcessedScore_reflection_ = NULL;
const ::google::protobuf::Descriptor* TopTokensScoreConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TopTokensScoreConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* TopTokensScore_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TopTokensScore_reflection_ = NULL;
const ::google::protobuf::Descriptor* ThetaSnippetScoreConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ThetaSnippetScoreConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* ThetaSnippetScore_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ThetaSnippetScore_reflection_ = NULL;
const ::google::protobuf::Descriptor* TopicKernelScoreConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TopicKernelScoreConfig_reflection_ = NULL;
const ::google::protobuf::Descriptor* TopicKernelScore_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TopicKernelScore_reflection_ = NULL;
const ::google::protobuf::Descriptor* TopicModel_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TopicModel_reflection_ = NULL;
const ::google::protobuf::Descriptor* TopicModel_TopicModelInternals_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TopicModel_TopicModelInternals_reflection_ = NULL;
const ::google::protobuf::Descriptor* ThetaMatrix_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ThetaMatrix_reflection_ = NULL;
const ::google::protobuf::Descriptor* CollectionParserConfig_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  CollectionParserConfig_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* CollectionParserConfig_Format_descriptor_ = NULL;
const ::google::protobuf::Descriptor* SynchronizeModelArgs_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SynchronizeModelArgs_reflection_ = NULL;
const ::google::protobuf::Descriptor* InitializeModelArgs_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  InitializeModelArgs_reflection_ = NULL;
const ::google::protobuf::Descriptor* GetTopicModelArgs_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  GetTopicModelArgs_reflection_ = NULL;
const ::google::protobuf::Descriptor* GetThetaMatrixArgs_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  GetThetaMatrixArgs_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_artm_2fmessages_2eproto() {
  protobuf_AddDesc_artm_2fmessages_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "artm/messages.proto");
  GOOGLE_CHECK(file != NULL);
  DoubleArray_descriptor_ = file->message_type(0);
  static const int DoubleArray_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DoubleArray, value_),
  };
  DoubleArray_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      DoubleArray_descriptor_,
      DoubleArray::default_instance_,
      DoubleArray_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DoubleArray, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DoubleArray, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(DoubleArray));
  FloatArray_descriptor_ = file->message_type(1);
  static const int FloatArray_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FloatArray, value_),
  };
  FloatArray_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      FloatArray_descriptor_,
      FloatArray::default_instance_,
      FloatArray_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FloatArray, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FloatArray, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(FloatArray));
  BoolArray_descriptor_ = file->message_type(2);
  static const int BoolArray_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BoolArray, value_),
  };
  BoolArray_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      BoolArray_descriptor_,
      BoolArray::default_instance_,
      BoolArray_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BoolArray, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BoolArray, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(BoolArray));
  StringArray_descriptor_ = file->message_type(3);
  static const int StringArray_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StringArray, value_),
  };
  StringArray_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      StringArray_descriptor_,
      StringArray::default_instance_,
      StringArray_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StringArray, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(StringArray, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(StringArray));
  Item_descriptor_ = file->message_type(4);
  static const int Item_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Item, id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Item, field_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Item, title_),
  };
  Item_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      Item_descriptor_,
      Item::default_instance_,
      Item_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Item, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Item, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(Item));
  Field_descriptor_ = file->message_type(5);
  static const int Field_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, token_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, token_count_),
  };
  Field_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      Field_descriptor_,
      Field::default_instance_,
      Field_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Field, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(Field));
  Batch_descriptor_ = file->message_type(6);
  static const int Batch_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Batch, token_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Batch, class_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Batch, item_),
  };
  Batch_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      Batch_descriptor_,
      Batch::default_instance_,
      Batch_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Batch, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Batch, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(Batch));
  Stream_descriptor_ = file->message_type(7);
  static const int Stream_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Stream, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Stream, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Stream, modulus_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Stream, residuals_),
  };
  Stream_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      Stream_descriptor_,
      Stream::default_instance_,
      Stream_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Stream, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Stream, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(Stream));
  Stream_Type_descriptor_ = Stream_descriptor_->enum_type(0);
  MasterComponentConfig_descriptor_ = file->message_type(8);
  static const int MasterComponentConfig_offsets_[15] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, modus_operandi_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, disk_path_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, stream_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, compact_batches_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, cache_theta_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, processors_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, processor_queue_max_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, merger_queue_max_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, score_config_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, create_endpoint_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, connect_endpoint_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, node_connect_endpoint_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, online_batch_processing_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, communication_timeout_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, disk_cache_path_),
  };
  MasterComponentConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      MasterComponentConfig_descriptor_,
      MasterComponentConfig::default_instance_,
      MasterComponentConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterComponentConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(MasterComponentConfig));
  MasterComponentConfig_ModusOperandi_descriptor_ = MasterComponentConfig_descriptor_->enum_type(0);
  NodeControllerConfig_descriptor_ = file->message_type(9);
  static const int NodeControllerConfig_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeControllerConfig, create_endpoint_),
  };
  NodeControllerConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      NodeControllerConfig_descriptor_,
      NodeControllerConfig::default_instance_,
      NodeControllerConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeControllerConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NodeControllerConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(NodeControllerConfig));
  MasterProxyConfig_descriptor_ = file->message_type(10);
  static const int MasterProxyConfig_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterProxyConfig, node_connect_endpoint_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterProxyConfig, config_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterProxyConfig, communication_timeout_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterProxyConfig, polling_frequency_),
  };
  MasterProxyConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      MasterProxyConfig_descriptor_,
      MasterProxyConfig::default_instance_,
      MasterProxyConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterProxyConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MasterProxyConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(MasterProxyConfig));
  ModelConfig_descriptor_ = file->message_type(11);
  static const int ModelConfig_offsets_[15] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, topics_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, enabled_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, inner_iterations_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, field_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, stream_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, score_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, reuse_theta_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, regularizer_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, regularizer_tau_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, class_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, class_weight_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, use_sparse_bow_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, use_random_theta_),
  };
  ModelConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ModelConfig_descriptor_,
      ModelConfig::default_instance_,
      ModelConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ModelConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ModelConfig));
  RegularizerConfig_descriptor_ = file->message_type(12);
  static const int RegularizerConfig_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerConfig, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerConfig, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerConfig, config_),
  };
  RegularizerConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      RegularizerConfig_descriptor_,
      RegularizerConfig::default_instance_,
      RegularizerConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(RegularizerConfig));
  RegularizerConfig_Type_descriptor_ = RegularizerConfig_descriptor_->enum_type(0);
  SmoothSparseThetaConfig_descriptor_ = file->message_type(13);
  static const int SmoothSparseThetaConfig_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparseThetaConfig, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparseThetaConfig, alpha_iter_),
  };
  SmoothSparseThetaConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      SmoothSparseThetaConfig_descriptor_,
      SmoothSparseThetaConfig::default_instance_,
      SmoothSparseThetaConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparseThetaConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparseThetaConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(SmoothSparseThetaConfig));
  SmoothSparsePhiConfig_descriptor_ = file->message_type(14);
  static const int SmoothSparsePhiConfig_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparsePhiConfig, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparsePhiConfig, class_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparsePhiConfig, dictionary_name_),
  };
  SmoothSparsePhiConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      SmoothSparsePhiConfig_descriptor_,
      SmoothSparsePhiConfig::default_instance_,
      SmoothSparsePhiConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparsePhiConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SmoothSparsePhiConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(SmoothSparsePhiConfig));
  DecorrelatorPhiConfig_descriptor_ = file->message_type(15);
  static const int DecorrelatorPhiConfig_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DecorrelatorPhiConfig, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DecorrelatorPhiConfig, class_id_),
  };
  DecorrelatorPhiConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      DecorrelatorPhiConfig_descriptor_,
      DecorrelatorPhiConfig::default_instance_,
      DecorrelatorPhiConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DecorrelatorPhiConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DecorrelatorPhiConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(DecorrelatorPhiConfig));
  MultiLanguagePhiConfig_descriptor_ = file->message_type(16);
  static const int MultiLanguagePhiConfig_offsets_[1] = {
  };
  MultiLanguagePhiConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      MultiLanguagePhiConfig_descriptor_,
      MultiLanguagePhiConfig::default_instance_,
      MultiLanguagePhiConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiLanguagePhiConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiLanguagePhiConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(MultiLanguagePhiConfig));
  RegularizerInternalState_descriptor_ = file->message_type(17);
  static const int RegularizerInternalState_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerInternalState, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerInternalState, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerInternalState, data_),
  };
  RegularizerInternalState_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      RegularizerInternalState_descriptor_,
      RegularizerInternalState::default_instance_,
      RegularizerInternalState_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerInternalState, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(RegularizerInternalState, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(RegularizerInternalState));
  RegularizerInternalState_Type_descriptor_ = RegularizerInternalState_descriptor_->enum_type(0);
  MultiLanguagePhiInternalState_descriptor_ = file->message_type(18);
  static const int MultiLanguagePhiInternalState_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiLanguagePhiInternalState, no_regularization_calls_),
  };
  MultiLanguagePhiInternalState_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      MultiLanguagePhiInternalState_descriptor_,
      MultiLanguagePhiInternalState::default_instance_,
      MultiLanguagePhiInternalState_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiLanguagePhiInternalState, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiLanguagePhiInternalState, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(MultiLanguagePhiInternalState));
  DictionaryConfig_descriptor_ = file->message_type(19);
  static const int DictionaryConfig_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryConfig, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryConfig, entry_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryConfig, total_token_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryConfig, total_items_count_),
  };
  DictionaryConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      DictionaryConfig_descriptor_,
      DictionaryConfig::default_instance_,
      DictionaryConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(DictionaryConfig));
  DictionaryEntry_descriptor_ = file->message_type(20);
  static const int DictionaryEntry_offsets_[7] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, key_token_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, class_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, value_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, value_tokens_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, values_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, token_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, items_count_),
  };
  DictionaryEntry_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      DictionaryEntry_descriptor_,
      DictionaryEntry::default_instance_,
      DictionaryEntry_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DictionaryEntry, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(DictionaryEntry));
  ScoreConfig_descriptor_ = file->message_type(21);
  static const int ScoreConfig_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreConfig, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreConfig, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreConfig, config_),
  };
  ScoreConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ScoreConfig_descriptor_,
      ScoreConfig::default_instance_,
      ScoreConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ScoreConfig));
  ScoreConfig_Type_descriptor_ = ScoreConfig_descriptor_->enum_type(0);
  ScoreData_descriptor_ = file->message_type(22);
  static const int ScoreData_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreData, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreData, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreData, data_),
  };
  ScoreData_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ScoreData_descriptor_,
      ScoreData::default_instance_,
      ScoreData_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreData, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ScoreData, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ScoreData));
  ScoreData_Type_descriptor_ = ScoreData_descriptor_->enum_type(0);
  PerplexityScoreConfig_descriptor_ = file->message_type(23);
  static const int PerplexityScoreConfig_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScoreConfig, field_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScoreConfig, stream_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScoreConfig, model_type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScoreConfig, dictionary_name_),
  };
  PerplexityScoreConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      PerplexityScoreConfig_descriptor_,
      PerplexityScoreConfig::default_instance_,
      PerplexityScoreConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScoreConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScoreConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(PerplexityScoreConfig));
  PerplexityScoreConfig_Type_descriptor_ = PerplexityScoreConfig_descriptor_->enum_type(0);
  PerplexityScore_descriptor_ = file->message_type(24);
  static const int PerplexityScore_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScore, value_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScore, raw_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScore, normalizer_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScore, zero_words_),
  };
  PerplexityScore_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      PerplexityScore_descriptor_,
      PerplexityScore::default_instance_,
      PerplexityScore_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScore, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PerplexityScore, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(PerplexityScore));
  SparsityThetaScoreConfig_descriptor_ = file->message_type(25);
  static const int SparsityThetaScoreConfig_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScoreConfig, field_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScoreConfig, stream_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScoreConfig, eps_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScoreConfig, topic_name_),
  };
  SparsityThetaScoreConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      SparsityThetaScoreConfig_descriptor_,
      SparsityThetaScoreConfig::default_instance_,
      SparsityThetaScoreConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScoreConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScoreConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(SparsityThetaScoreConfig));
  SparsityThetaScore_descriptor_ = file->message_type(26);
  static const int SparsityThetaScore_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScore, value_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScore, zero_topics_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScore, total_topics_),
  };
  SparsityThetaScore_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      SparsityThetaScore_descriptor_,
      SparsityThetaScore::default_instance_,
      SparsityThetaScore_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScore, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityThetaScore, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(SparsityThetaScore));
  SparsityPhiScoreConfig_descriptor_ = file->message_type(27);
  static const int SparsityPhiScoreConfig_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScoreConfig, eps_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScoreConfig, class_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScoreConfig, topic_name_),
  };
  SparsityPhiScoreConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      SparsityPhiScoreConfig_descriptor_,
      SparsityPhiScoreConfig::default_instance_,
      SparsityPhiScoreConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScoreConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScoreConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(SparsityPhiScoreConfig));
  SparsityPhiScore_descriptor_ = file->message_type(28);
  static const int SparsityPhiScore_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScore, value_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScore, zero_tokens_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScore, total_tokens_),
  };
  SparsityPhiScore_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      SparsityPhiScore_descriptor_,
      SparsityPhiScore::default_instance_,
      SparsityPhiScore_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScore, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SparsityPhiScore, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(SparsityPhiScore));
  ItemsProcessedScoreConfig_descriptor_ = file->message_type(29);
  static const int ItemsProcessedScoreConfig_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ItemsProcessedScoreConfig, field_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ItemsProcessedScoreConfig, stream_name_),
  };
  ItemsProcessedScoreConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ItemsProcessedScoreConfig_descriptor_,
      ItemsProcessedScoreConfig::default_instance_,
      ItemsProcessedScoreConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ItemsProcessedScoreConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ItemsProcessedScoreConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ItemsProcessedScoreConfig));
  ItemsProcessedScore_descriptor_ = file->message_type(30);
  static const int ItemsProcessedScore_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ItemsProcessedScore, value_),
  };
  ItemsProcessedScore_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ItemsProcessedScore_descriptor_,
      ItemsProcessedScore::default_instance_,
      ItemsProcessedScore_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ItemsProcessedScore, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ItemsProcessedScore, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ItemsProcessedScore));
  TopTokensScoreConfig_descriptor_ = file->message_type(31);
  static const int TopTokensScoreConfig_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScoreConfig, num_tokens_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScoreConfig, class_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScoreConfig, topic_name_),
  };
  TopTokensScoreConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TopTokensScoreConfig_descriptor_,
      TopTokensScoreConfig::default_instance_,
      TopTokensScoreConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScoreConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScoreConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TopTokensScoreConfig));
  TopTokensScore_descriptor_ = file->message_type(32);
  static const int TopTokensScore_offsets_[5] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScore, num_entries_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScore, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScore, topic_index_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScore, token_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScore, weight_),
  };
  TopTokensScore_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TopTokensScore_descriptor_,
      TopTokensScore::default_instance_,
      TopTokensScore_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScore, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopTokensScore, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TopTokensScore));
  ThetaSnippetScoreConfig_descriptor_ = file->message_type(33);
  static const int ThetaSnippetScoreConfig_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScoreConfig, field_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScoreConfig, stream_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScoreConfig, item_id_),
  };
  ThetaSnippetScoreConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ThetaSnippetScoreConfig_descriptor_,
      ThetaSnippetScoreConfig::default_instance_,
      ThetaSnippetScoreConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScoreConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScoreConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ThetaSnippetScoreConfig));
  ThetaSnippetScore_descriptor_ = file->message_type(34);
  static const int ThetaSnippetScore_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScore, item_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScore, values_),
  };
  ThetaSnippetScore_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ThetaSnippetScore_descriptor_,
      ThetaSnippetScore::default_instance_,
      ThetaSnippetScore_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScore, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaSnippetScore, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ThetaSnippetScore));
  TopicKernelScoreConfig_descriptor_ = file->message_type(35);
  static const int TopicKernelScoreConfig_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScoreConfig, eps_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScoreConfig, class_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScoreConfig, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScoreConfig, probability_mass_threshold_),
  };
  TopicKernelScoreConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TopicKernelScoreConfig_descriptor_,
      TopicKernelScoreConfig::default_instance_,
      TopicKernelScoreConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScoreConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScoreConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TopicKernelScoreConfig));
  TopicKernelScore_descriptor_ = file->message_type(36);
  static const int TopicKernelScore_offsets_[6] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScore, kernel_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScore, kernel_purity_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScore, kernel_contrast_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScore, average_kernel_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScore, average_kernel_purity_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScore, average_kernel_contrast_),
  };
  TopicKernelScore_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TopicKernelScore_descriptor_,
      TopicKernelScore::default_instance_,
      TopicKernelScore_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScore, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicKernelScore, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TopicKernelScore));
  TopicModel_descriptor_ = file->message_type(37);
  static const int TopicModel_offsets_[7] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, topics_count_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, token_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, token_weights_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, class_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, internals_),
  };
  TopicModel_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TopicModel_descriptor_,
      TopicModel::default_instance_,
      TopicModel_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TopicModel));
  TopicModel_TopicModelInternals_descriptor_ = TopicModel_descriptor_->nested_type(0);
  static const int TopicModel_TopicModelInternals_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel_TopicModelInternals, n_wt_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel_TopicModelInternals, r_wt_),
  };
  TopicModel_TopicModelInternals_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      TopicModel_TopicModelInternals_descriptor_,
      TopicModel_TopicModelInternals::default_instance_,
      TopicModel_TopicModelInternals_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel_TopicModelInternals, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TopicModel_TopicModelInternals, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(TopicModel_TopicModelInternals));
  ThetaMatrix_descriptor_ = file->message_type(38);
  static const int ThetaMatrix_offsets_[5] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaMatrix, model_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaMatrix, item_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaMatrix, item_weights_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaMatrix, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaMatrix, topics_count_),
  };
  ThetaMatrix_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      ThetaMatrix_descriptor_,
      ThetaMatrix::default_instance_,
      ThetaMatrix_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaMatrix, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThetaMatrix, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(ThetaMatrix));
  CollectionParserConfig_descriptor_ = file->message_type(39);
  static const int CollectionParserConfig_offsets_[8] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, format_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, docword_file_path_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, vocab_file_path_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, target_folder_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, dictionary_file_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, num_items_per_batch_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, cooccurrence_file_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, cooccurrence_token_),
  };
  CollectionParserConfig_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      CollectionParserConfig_descriptor_,
      CollectionParserConfig::default_instance_,
      CollectionParserConfig_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CollectionParserConfig, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(CollectionParserConfig));
  CollectionParserConfig_Format_descriptor_ = CollectionParserConfig_descriptor_->enum_type(0);
  SynchronizeModelArgs_descriptor_ = file->message_type(40);
  static const int SynchronizeModelArgs_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SynchronizeModelArgs, model_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SynchronizeModelArgs, decay_weight_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SynchronizeModelArgs, invoke_regularizers_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SynchronizeModelArgs, apply_weight_),
  };
  SynchronizeModelArgs_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      SynchronizeModelArgs_descriptor_,
      SynchronizeModelArgs::default_instance_,
      SynchronizeModelArgs_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SynchronizeModelArgs, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SynchronizeModelArgs, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(SynchronizeModelArgs));
  InitializeModelArgs_descriptor_ = file->message_type(41);
  static const int InitializeModelArgs_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InitializeModelArgs, model_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InitializeModelArgs, dictionary_name_),
  };
  InitializeModelArgs_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      InitializeModelArgs_descriptor_,
      InitializeModelArgs::default_instance_,
      InitializeModelArgs_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InitializeModelArgs, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InitializeModelArgs, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(InitializeModelArgs));
  GetTopicModelArgs_descriptor_ = file->message_type(42);
  static const int GetTopicModelArgs_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetTopicModelArgs, model_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetTopicModelArgs, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetTopicModelArgs, token_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetTopicModelArgs, class_id_),
  };
  GetTopicModelArgs_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      GetTopicModelArgs_descriptor_,
      GetTopicModelArgs::default_instance_,
      GetTopicModelArgs_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetTopicModelArgs, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetTopicModelArgs, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(GetTopicModelArgs));
  GetThetaMatrixArgs_descriptor_ = file->message_type(43);
  static const int GetThetaMatrixArgs_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetThetaMatrixArgs, model_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetThetaMatrixArgs, batch_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetThetaMatrixArgs, topic_name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetThetaMatrixArgs, topic_index_),
  };
  GetThetaMatrixArgs_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      GetThetaMatrixArgs_descriptor_,
      GetThetaMatrixArgs::default_instance_,
      GetThetaMatrixArgs_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetThetaMatrixArgs, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(GetThetaMatrixArgs, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(GetThetaMatrixArgs));
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_artm_2fmessages_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    DoubleArray_descriptor_, &DoubleArray::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    FloatArray_descriptor_, &FloatArray::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    BoolArray_descriptor_, &BoolArray::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    StringArray_descriptor_, &StringArray::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    Item_descriptor_, &Item::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    Field_descriptor_, &Field::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    Batch_descriptor_, &Batch::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    Stream_descriptor_, &Stream::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    MasterComponentConfig_descriptor_, &MasterComponentConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    NodeControllerConfig_descriptor_, &NodeControllerConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    MasterProxyConfig_descriptor_, &MasterProxyConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ModelConfig_descriptor_, &ModelConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    RegularizerConfig_descriptor_, &RegularizerConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    SmoothSparseThetaConfig_descriptor_, &SmoothSparseThetaConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    SmoothSparsePhiConfig_descriptor_, &SmoothSparsePhiConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    DecorrelatorPhiConfig_descriptor_, &DecorrelatorPhiConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    MultiLanguagePhiConfig_descriptor_, &MultiLanguagePhiConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    RegularizerInternalState_descriptor_, &RegularizerInternalState::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    MultiLanguagePhiInternalState_descriptor_, &MultiLanguagePhiInternalState::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    DictionaryConfig_descriptor_, &DictionaryConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    DictionaryEntry_descriptor_, &DictionaryEntry::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ScoreConfig_descriptor_, &ScoreConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ScoreData_descriptor_, &ScoreData::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    PerplexityScoreConfig_descriptor_, &PerplexityScoreConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    PerplexityScore_descriptor_, &PerplexityScore::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    SparsityThetaScoreConfig_descriptor_, &SparsityThetaScoreConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    SparsityThetaScore_descriptor_, &SparsityThetaScore::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    SparsityPhiScoreConfig_descriptor_, &SparsityPhiScoreConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    SparsityPhiScore_descriptor_, &SparsityPhiScore::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ItemsProcessedScoreConfig_descriptor_, &ItemsProcessedScoreConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ItemsProcessedScore_descriptor_, &ItemsProcessedScore::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TopTokensScoreConfig_descriptor_, &TopTokensScoreConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TopTokensScore_descriptor_, &TopTokensScore::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ThetaSnippetScoreConfig_descriptor_, &ThetaSnippetScoreConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ThetaSnippetScore_descriptor_, &ThetaSnippetScore::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TopicKernelScoreConfig_descriptor_, &TopicKernelScoreConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TopicKernelScore_descriptor_, &TopicKernelScore::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TopicModel_descriptor_, &TopicModel::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    TopicModel_TopicModelInternals_descriptor_, &TopicModel_TopicModelInternals::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    ThetaMatrix_descriptor_, &ThetaMatrix::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    CollectionParserConfig_descriptor_, &CollectionParserConfig::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    SynchronizeModelArgs_descriptor_, &SynchronizeModelArgs::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    InitializeModelArgs_descriptor_, &InitializeModelArgs::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    GetTopicModelArgs_descriptor_, &GetTopicModelArgs::default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    GetThetaMatrixArgs_descriptor_, &GetThetaMatrixArgs::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_artm_2fmessages_2eproto() {
  delete DoubleArray::default_instance_;
  delete DoubleArray_reflection_;
  delete FloatArray::default_instance_;
  delete FloatArray_reflection_;
  delete BoolArray::default_instance_;
  delete BoolArray_reflection_;
  delete StringArray::default_instance_;
  delete StringArray_reflection_;
  delete Item::default_instance_;
  delete Item_reflection_;
  delete Field::default_instance_;
  delete Field_reflection_;
  delete Field::_default_name_;
  delete Batch::default_instance_;
  delete Batch_reflection_;
  delete Stream::default_instance_;
  delete Stream_reflection_;
  delete Stream::_default_name_;
  delete MasterComponentConfig::default_instance_;
  delete MasterComponentConfig_reflection_;
  delete NodeControllerConfig::default_instance_;
  delete NodeControllerConfig_reflection_;
  delete MasterProxyConfig::default_instance_;
  delete MasterProxyConfig_reflection_;
  delete ModelConfig::default_instance_;
  delete ModelConfig_reflection_;
  delete ModelConfig::_default_name_;
  delete ModelConfig::_default_field_name_;
  delete ModelConfig::_default_stream_name_;
  delete RegularizerConfig::default_instance_;
  delete RegularizerConfig_reflection_;
  delete SmoothSparseThetaConfig::default_instance_;
  delete SmoothSparseThetaConfig_reflection_;
  delete SmoothSparsePhiConfig::default_instance_;
  delete SmoothSparsePhiConfig_reflection_;
  delete DecorrelatorPhiConfig::default_instance_;
  delete DecorrelatorPhiConfig_reflection_;
  delete MultiLanguagePhiConfig::default_instance_;
  delete MultiLanguagePhiConfig_reflection_;
  delete RegularizerInternalState::default_instance_;
  delete RegularizerInternalState_reflection_;
  delete MultiLanguagePhiInternalState::default_instance_;
  delete MultiLanguagePhiInternalState_reflection_;
  delete DictionaryConfig::default_instance_;
  delete DictionaryConfig_reflection_;
  delete DictionaryEntry::default_instance_;
  delete DictionaryEntry_reflection_;
  delete ScoreConfig::default_instance_;
  delete ScoreConfig_reflection_;
  delete ScoreData::default_instance_;
  delete ScoreData_reflection_;
  delete PerplexityScoreConfig::default_instance_;
  delete PerplexityScoreConfig_reflection_;
  delete PerplexityScoreConfig::_default_field_name_;
  delete PerplexityScoreConfig::_default_stream_name_;
  delete PerplexityScore::default_instance_;
  delete PerplexityScore_reflection_;
  delete SparsityThetaScoreConfig::default_instance_;
  delete SparsityThetaScoreConfig_reflection_;
  delete SparsityThetaScoreConfig::_default_field_name_;
  delete SparsityThetaScoreConfig::_default_stream_name_;
  delete SparsityThetaScore::default_instance_;
  delete SparsityThetaScore_reflection_;
  delete SparsityPhiScoreConfig::default_instance_;
  delete SparsityPhiScoreConfig_reflection_;
  delete SparsityPhiScore::default_instance_;
  delete SparsityPhiScore_reflection_;
  delete ItemsProcessedScoreConfig::default_instance_;
  delete ItemsProcessedScoreConfig_reflection_;
  delete ItemsProcessedScoreConfig::_default_field_name_;
  delete ItemsProcessedScoreConfig::_default_stream_name_;
  delete ItemsProcessedScore::default_instance_;
  delete ItemsProcessedScore_reflection_;
  delete TopTokensScoreConfig::default_instance_;
  delete TopTokensScoreConfig_reflection_;
  delete TopTokensScore::default_instance_;
  delete TopTokensScore_reflection_;
  delete ThetaSnippetScoreConfig::default_instance_;
  delete ThetaSnippetScoreConfig_reflection_;
  delete ThetaSnippetScoreConfig::_default_field_name_;
  delete ThetaSnippetScoreConfig::_default_stream_name_;
  delete ThetaSnippetScore::default_instance_;
  delete ThetaSnippetScore_reflection_;
  delete TopicKernelScoreConfig::default_instance_;
  delete TopicKernelScoreConfig_reflection_;
  delete TopicKernelScore::default_instance_;
  delete TopicKernelScore_reflection_;
  delete TopicModel::default_instance_;
  delete TopicModel_reflection_;
  delete TopicModel::_default_name_;
  delete TopicModel_TopicModelInternals::default_instance_;
  delete TopicModel_TopicModelInternals_reflection_;
  delete ThetaMatrix::default_instance_;
  delete ThetaMatrix_reflection_;
  delete ThetaMatrix::_default_model_name_;
  delete CollectionParserConfig::default_instance_;
  delete CollectionParserConfig_reflection_;
  delete SynchronizeModelArgs::default_instance_;
  delete SynchronizeModelArgs_reflection_;
  delete InitializeModelArgs::default_instance_;
  delete InitializeModelArgs_reflection_;
  delete GetTopicModelArgs::default_instance_;
  delete GetTopicModelArgs_reflection_;
  delete GetThetaMatrixArgs::default_instance_;
  delete GetThetaMatrixArgs_reflection_;
}

void protobuf_AddDesc_artm_2fmessages_2eproto() {
  static bool already_here = false;
  if (already_here) return;
  already_here = true;
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\023artm/messages.proto\022\004artm\" \n\013DoubleArr"
    "ay\022\021\n\005value\030\001 \003(\001B\002\020\001\"\037\n\nFloatArray\022\021\n\005v"
    "alue\030\001 \003(\002B\002\020\001\"\036\n\tBoolArray\022\021\n\005value\030\001 \003"
    "(\010B\002\020\001\"\034\n\013StringArray\022\r\n\005value\030\001 \003(\t\"=\n\004"
    "Item\022\n\n\002id\030\001 \001(\005\022\032\n\005field\030\002 \003(\0132\013.artm.F"
    "ield\022\r\n\005title\030\003 \001(\t\"C\n\005Field\022\023\n\004name\030\001 \001"
    "(\t:\005@body\022\020\n\010token_id\030\002 \003(\005\022\023\n\013token_cou"
    "nt\030\003 \003(\005\"B\n\005Batch\022\r\n\005token\030\001 \003(\t\022\020\n\010clas"
    "s_id\030\002 \003(\t\022\030\n\004item\030\003 \003(\0132\n.artm.Item\"\223\001\n"
    "\006Stream\022\'\n\004type\030\001 \001(\0162\021.artm.Stream.Type"
    ":\006Global\022\025\n\004name\030\002 \001(\t:\007@global\022\017\n\007modul"
    "us\030\003 \001(\005\022\021\n\tresiduals\030\004 \003(\005\"%\n\004Type\022\n\n\006G"
    "lobal\020\000\022\021\n\rItemIdModulus\020\001\"\275\004\n\025MasterCom"
    "ponentConfig\022H\n\016modus_operandi\030\001 \001(\0162).a"
    "rtm.MasterComponentConfig.ModusOperandi:"
    "\005Local\022\021\n\tdisk_path\030\002 \001(\t\022\034\n\006stream\030\003 \003("
    "\0132\014.artm.Stream\022\035\n\017compact_batches\030\004 \001(\010"
    ":\004true\022\032\n\013cache_theta\030\005 \001(\010:\005false\022\033\n\020pr"
    "ocessors_count\030\006 \001(\005:\0011\022$\n\030processor_que"
    "ue_max_size\030\007 \001(\005:\00210\022!\n\025merger_queue_ma"
    "x_size\030\010 \001(\005:\00210\022\'\n\014score_config\030\t \003(\0132\021"
    ".artm.ScoreConfig\022\027\n\017create_endpoint\030\n \001"
    "(\t\022\030\n\020connect_endpoint\030\013 \001(\t\022\035\n\025node_con"
    "nect_endpoint\030\014 \003(\t\022&\n\027online_batch_proc"
    "essing\030\r \001(\010:\005false\022#\n\025communication_tim"
    "eout\030\016 \001(\005:\0041000\022\027\n\017disk_cache_path\030\017 \001("
    "\t\"\'\n\rModusOperandi\022\t\n\005Local\020\000\022\013\n\007Network"
    "\020\001\"/\n\024NodeControllerConfig\022\027\n\017create_end"
    "point\030\001 \001(\t\"\243\001\n\021MasterProxyConfig\022\035\n\025nod"
    "e_connect_endpoint\030\001 \001(\t\022+\n\006config\030\002 \001(\013"
    "2\033.artm.MasterComponentConfig\022#\n\025communi"
    "cation_timeout\030\003 \001(\005:\0041000\022\035\n\021polling_fr"
    "equency\030\004 \001(\005:\00250\"\217\003\n\013ModelConfig\022\024\n\004nam"
    "e\030\001 \001(\t:\006@model\022\030\n\014topics_count\030\002 \001(\005:\0023"
    "2\022\022\n\ntopic_name\030\003 \003(\t\022\025\n\007enabled\030\004 \001(\010:\004"
    "true\022\"\n\026inner_iterations_count\030\005 \001(\005:\00210"
    "\022\031\n\nfield_name\030\006 \001(\t:\005@body\022\034\n\013stream_na"
    "me\030\007 \001(\t:\007@global\022\022\n\nscore_name\030\010 \003(\t\022\032\n"
    "\013reuse_theta\030\t \001(\010:\005false\022\030\n\020regularizer"
    "_name\030\n \003(\t\022\027\n\017regularizer_tau\030\013 \003(\001\022\020\n\010"
    "class_id\030\014 \003(\t\022\024\n\014class_weight\030\r \003(\002\022\034\n\016"
    "use_sparse_bow\030\016 \001(\010:\004true\022\037\n\020use_random"
    "_theta\030\017 \001(\010:\005false\"\274\001\n\021RegularizerConfi"
    "g\022\014\n\004name\030\001 \001(\t\022*\n\004type\030\002 \001(\0162\034.artm.Reg"
    "ularizerConfig.Type\022\016\n\006config\030\003 \001(\014\"]\n\004T"
    "ype\022\025\n\021SmoothSparseTheta\020\000\022\023\n\017SmoothSpar"
    "sePhi\020\001\022\023\n\017DecorrelatorPhi\020\002\022\024\n\020MultiLan"
    "guagePhi\020\003\"A\n\027SmoothSparseThetaConfig\022\022\n"
    "\ntopic_name\030\001 \003(\t\022\022\n\nalpha_iter\030\002 \003(\002\"V\n"
    "\025SmoothSparsePhiConfig\022\022\n\ntopic_name\030\001 \003"
    "(\t\022\020\n\010class_id\030\002 \003(\t\022\027\n\017dictionary_name\030"
    "\003 \001(\t\"=\n\025DecorrelatorPhiConfig\022\022\n\ntopic_"
    "name\030\001 \003(\t\022\020\n\010class_id\030\002 \003(\t\"\030\n\026MultiLan"
    "guagePhiConfig\"\207\001\n\030RegularizerInternalSt"
    "ate\022\014\n\004name\030\001 \001(\t\0221\n\004type\030\002 \001(\0162#.artm.R"
    "egularizerInternalState.Type\022\014\n\004data\030\003 \001"
    "(\014\"\034\n\004Type\022\024\n\020MultiLanguagePhi\020\003\"C\n\035Mult"
    "iLanguagePhiInternalState\022\"\n\027no_regulari"
    "zation_calls\030\001 \001(\005:\0010\"|\n\020DictionaryConfi"
    "g\022\014\n\004name\030\001 \001(\t\022$\n\005entry\030\002 \003(\0132\025.artm.Di"
    "ctionaryEntry\022\031\n\021total_token_count\030\003 \001(\005"
    "\022\031\n\021total_items_count\030\004 \001(\005\"\247\001\n\017Dictiona"
    "ryEntry\022\021\n\tkey_token\030\001 \001(\t\022\020\n\010class_id\030\002"
    " \001(\t\022\r\n\005value\030\003 \001(\002\022\024\n\014value_tokens\030\004 \003("
    "\t\022 \n\006values\030\005 \001(\0132\020.artm.FloatArray\022\023\n\013t"
    "oken_count\030\006 \001(\005\022\023\n\013items_count\030\007 \001(\005\"\324\001"
    "\n\013ScoreConfig\022\014\n\004name\030\001 \001(\t\022$\n\004type\030\002 \001("
    "\0162\026.artm.ScoreConfig.Type\022\016\n\006config\030\003 \001("
    "\014\"\200\001\n\004Type\022\016\n\nPerplexity\020\000\022\021\n\rSparsityTh"
    "eta\020\001\022\017\n\013SparsityPhi\020\002\022\022\n\016ItemsProcessed"
    "\020\003\022\r\n\tTopTokens\020\004\022\020\n\014ThetaSnippet\020\005\022\017\n\013T"
    "opicKernel\020\006\"\316\001\n\tScoreData\022\014\n\004name\030\001 \001(\t"
    "\022\"\n\004type\030\002 \001(\0162\024.artm.ScoreData.Type\022\014\n\004"
    "data\030\003 \001(\014\"\200\001\n\004Type\022\016\n\nPerplexity\020\000\022\021\n\rS"
    "parsityTheta\020\001\022\017\n\013SparsityPhi\020\002\022\022\n\016Items"
    "Processed\020\003\022\r\n\tTopTokens\020\004\022\020\n\014ThetaSnipp"
    "et\020\005\022\017\n\013TopicKernel\020\006\"\363\001\n\025PerplexityScor"
    "eConfig\022\031\n\nfield_name\030\001 \001(\t:\005@body\022\034\n\013st"
    "ream_name\030\002 \001(\t:\007@global\022J\n\nmodel_type\030\003"
    " \001(\0162 .artm.PerplexityScoreConfig.Type:\024"
    "UnigramDocumentModel\022\027\n\017dictionary_name\030"
    "\004 \001(\t\"<\n\004Type\022\030\n\024UnigramDocumentModel\020\000\022"
    "\032\n\026UnigramCollectionModel\020\001\"U\n\017Perplexit"
    "yScore\022\r\n\005value\030\001 \001(\001\022\013\n\003raw\030\002 \001(\001\022\022\n\nno"
    "rmalizer\030\003 \001(\001\022\022\n\nzero_words\030\004 \001(\005\"|\n\030Sp"
    "arsityThetaScoreConfig\022\031\n\nfield_name\030\001 \001"
    "(\t:\005@body\022\034\n\013stream_name\030\002 \001(\t:\007@global\022"
    "\023\n\003eps\030\003 \001(\002:\0061e-037\022\022\n\ntopic_name\030\004 \003(\t"
    "\"N\n\022SparsityThetaScore\022\r\n\005value\030\001 \001(\001\022\023\n"
    "\013zero_topics\030\002 \001(\005\022\024\n\014total_topics\030\003 \001(\005"
    "\"S\n\026SparsityPhiScoreConfig\022\023\n\003eps\030\001 \001(\002:"
    "\0061e-037\022\020\n\010class_id\030\002 \001(\t\022\022\n\ntopic_name\030"
    "\003 \003(\t\"L\n\020SparsityPhiScore\022\r\n\005value\030\001 \001(\001"
    "\022\023\n\013zero_tokens\030\002 \001(\005\022\024\n\014total_tokens\030\003 "
    "\001(\005\"T\n\031ItemsProcessedScoreConfig\022\031\n\nfiel"
    "d_name\030\001 \001(\t:\005@body\022\034\n\013stream_name\030\002 \001(\t"
    ":\007@global\"$\n\023ItemsProcessedScore\022\r\n\005valu"
    "e\030\001 \001(\005\"T\n\024TopTokensScoreConfig\022\026\n\nnum_t"
    "okens\030\001 \001(\005:\00210\022\020\n\010class_id\030\002 \001(\t\022\022\n\ntop"
    "ic_name\030\003 \003(\t\"m\n\016TopTokensScore\022\023\n\013num_e"
    "ntries\030\001 \001(\005\022\022\n\ntopic_name\030\002 \003(\t\022\023\n\013topi"
    "c_index\030\003 \003(\005\022\r\n\005token\030\004 \003(\t\022\016\n\006weight\030\005"
    " \003(\002\"g\n\027ThetaSnippetScoreConfig\022\031\n\nfield"
    "_name\030\001 \001(\t:\005@body\022\034\n\013stream_name\030\002 \001(\t:"
    "\007@global\022\023\n\007item_id\030\003 \003(\005B\002\020\001\"F\n\021ThetaSn"
    "ippetScore\022\017\n\007item_id\030\001 \003(\005\022 \n\006values\030\002 "
    "\003(\0132\020.artm.FloatArray\"|\n\026TopicKernelScor"
    "eConfig\022\023\n\003eps\030\001 \001(\002:\0061e-037\022\020\n\010class_id"
    "\030\002 \001(\t\022\022\n\ntopic_name\030\003 \003(\t\022\'\n\032probabilit"
    "y_mass_threshold\030\004 \001(\001:\0030.1\"\355\001\n\020TopicKer"
    "nelScore\022&\n\013kernel_size\030\001 \001(\0132\021.artm.Dou"
    "bleArray\022(\n\rkernel_purity\030\002 \001(\0132\021.artm.D"
    "oubleArray\022*\n\017kernel_contrast\030\003 \001(\0132\021.ar"
    "tm.DoubleArray\022\033\n\023average_kernel_size\030\004 "
    "\001(\001\022\035\n\025average_kernel_purity\030\005 \001(\001\022\037\n\027av"
    "erage_kernel_contrast\030\006 \001(\001\"\200\002\n\nTopicMod"
    "el\022\024\n\004name\030\001 \001(\t:\006@model\022\024\n\014topics_count"
    "\030\002 \001(\005\022\022\n\ntopic_name\030\003 \003(\t\022\r\n\005token\030\004 \003("
    "\t\022\'\n\rtoken_weights\030\005 \003(\0132\020.artm.FloatArr"
    "ay\022\020\n\010class_id\030\006 \003(\t\022\021\n\tinternals\030\007 \001(\014\032"
    "U\n\023TopicModelInternals\022\036\n\004n_wt\030\001 \003(\0132\020.a"
    "rtm.FloatArray\022\036\n\004r_wt\030\002 \003(\0132\020.artm.Floa"
    "tArray\"\214\001\n\013ThetaMatrix\022\032\n\nmodel_name\030\001 \001"
    "(\t:\006@model\022\017\n\007item_id\030\002 \003(\005\022&\n\014item_weig"
    "hts\030\003 \003(\0132\020.artm.FloatArray\022\022\n\ntopic_nam"
    "e\030\004 \003(\t\022\024\n\014topics_count\030\005 \001(\005\"\323\002\n\026Collec"
    "tionParserConfig\022B\n\006format\030\001 \001(\0162#.artm."
    "CollectionParserConfig.Format:\rBagOfWord"
    "sUci\022\031\n\021docword_file_path\030\002 \001(\t\022\027\n\017vocab"
    "_file_path\030\003 \001(\t\022\025\n\rtarget_folder\030\004 \001(\t\022"
    "\034\n\024dictionary_file_name\030\005 \001(\t\022!\n\023num_ite"
    "ms_per_batch\030\006 \001(\005:\0041000\022\036\n\026cooccurrence"
    "_file_name\030\007 \001(\t\022\032\n\022cooccurrence_token\030\010"
    " \003(\t\"-\n\006Format\022\021\n\rBagOfWordsUci\020\000\022\020\n\014Mat"
    "rixMarket\020\001\"\177\n\024SynchronizeModelArgs\022\022\n\nm"
    "odel_name\030\001 \001(\t\022\027\n\014decay_weight\030\002 \001(\002:\0011"
    "\022!\n\023invoke_regularizers\030\003 \001(\010:\004true\022\027\n\014a"
    "pply_weight\030\004 \001(\002:\0011\"B\n\023InitializeModelA"
    "rgs\022\022\n\nmodel_name\030\001 \001(\t\022\027\n\017dictionary_na"
    "me\030\002 \001(\t\"\\\n\021GetTopicModelArgs\022\022\n\nmodel_n"
    "ame\030\001 \001(\t\022\022\n\ntopic_name\030\002 \003(\t\022\r\n\005token\030\003"
    " \003(\t\022\020\n\010class_id\030\004 \003(\t\"m\n\022GetThetaMatrix"
    "Args\022\022\n\nmodel_name\030\001 \001(\t\022\032\n\005batch\030\002 \001(\0132"
    "\013.artm.Batch\022\022\n\ntopic_name\030\003 \003(\t\022\023\n\013topi"
    "c_index\030\004 \003(\005", 5773);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "artm/messages.proto", &protobuf_RegisterTypes);
  DoubleArray::default_instance_ = new DoubleArray();
  FloatArray::default_instance_ = new FloatArray();
  BoolArray::default_instance_ = new BoolArray();
  StringArray::default_instance_ = new StringArray();
  Item::default_instance_ = new Item();
  Field::_default_name_ =
      new ::std::string("@body", 5);
  Field::default_instance_ = new Field();
  Batch::default_instance_ = new Batch();
  Stream::_default_name_ =
      new ::std::string("@global", 7);
  Stream::default_instance_ = new Stream();
  MasterComponentConfig::default_instance_ = new MasterComponentConfig();
  NodeControllerConfig::default_instance_ = new NodeControllerConfig();
  MasterProxyConfig::default_instance_ = new MasterProxyConfig();
  ModelConfig::_default_name_ =
      new ::std::string("@model", 6);
  ModelConfig::_default_field_name_ =
      new ::std::string("@body", 5);
  ModelConfig::_default_stream_name_ =
      new ::std::string("@global", 7);
  ModelConfig::default_instance_ = new ModelConfig();
  RegularizerConfig::default_instance_ = new RegularizerConfig();
  SmoothSparseThetaConfig::default_instance_ = new SmoothSparseThetaConfig();
  SmoothSparsePhiConfig::default_instance_ = new SmoothSparsePhiConfig();
  DecorrelatorPhiConfig::default_instance_ = new DecorrelatorPhiConfig();
  MultiLanguagePhiConfig::default_instance_ = new MultiLanguagePhiConfig();
  RegularizerInternalState::default_instance_ = new RegularizerInternalState();
  MultiLanguagePhiInternalState::default_instance_ = new MultiLanguagePhiInternalState();
  DictionaryConfig::default_instance_ = new DictionaryConfig();
  DictionaryEntry::default_instance_ = new DictionaryEntry();
  ScoreConfig::default_instance_ = new ScoreConfig();
  ScoreData::default_instance_ = new ScoreData();
  PerplexityScoreConfig::_default_field_name_ =
      new ::std::string("@body", 5);
  PerplexityScoreConfig::_default_stream_name_ =
      new ::std::string("@global", 7);
  PerplexityScoreConfig::default_instance_ = new PerplexityScoreConfig();
  PerplexityScore::default_instance_ = new PerplexityScore();
  SparsityThetaScoreConfig::_default_field_name_ =
      new ::std::string("@body", 5);
  SparsityThetaScoreConfig::_default_stream_name_ =
      new ::std::string("@global", 7);
  SparsityThetaScoreConfig::default_instance_ = new SparsityThetaScoreConfig();
  SparsityThetaScore::default_instance_ = new SparsityThetaScore();
  SparsityPhiScoreConfig::default_instance_ = new SparsityPhiScoreConfig();
  SparsityPhiScore::default_instance_ = new SparsityPhiScore();
  ItemsProcessedScoreConfig::_default_field_name_ =
      new ::std::string("@body", 5);
  ItemsProcessedScoreConfig::_default_stream_name_ =
      new ::std::string("@global", 7);
  ItemsProcessedScoreConfig::default_instance_ = new ItemsProcessedScoreConfig();
  ItemsProcessedScore::default_instance_ = new ItemsProcessedScore();
  TopTokensScoreConfig::default_instance_ = new TopTokensScoreConfig();
  TopTokensScore::default_instance_ = new TopTokensScore();
  ThetaSnippetScoreConfig::_default_field_name_ =
      new ::std::string("@body", 5);
  ThetaSnippetScoreConfig::_default_stream_name_ =
      new ::std::string("@global", 7);
  ThetaSnippetScoreConfig::default_instance_ = new ThetaSnippetScoreConfig();
  ThetaSnippetScore::default_instance_ = new ThetaSnippetScore();
  TopicKernelScoreConfig::default_instance_ = new TopicKernelScoreConfig();
  TopicKernelScore::default_instance_ = new TopicKernelScore();
  TopicModel::_default_name_ =
      new ::std::string("@model", 6);
  TopicModel::default_instance_ = new TopicModel();
  TopicModel_TopicModelInternals::default_instance_ = new TopicModel_TopicModelInternals();
  ThetaMatrix::_default_model_name_ =
      new ::std::string("@model", 6);
  ThetaMatrix::default_instance_ = new ThetaMatrix();
  CollectionParserConfig::default_instance_ = new CollectionParserConfig();
  SynchronizeModelArgs::default_instance_ = new SynchronizeModelArgs();
  InitializeModelArgs::default_instance_ = new InitializeModelArgs();
  GetTopicModelArgs::default_instance_ = new GetTopicModelArgs();
  GetThetaMatrixArgs::default_instance_ = new GetThetaMatrixArgs();
  DoubleArray::default_instance_->InitAsDefaultInstance();
  FloatArray::default_instance_->InitAsDefaultInstance();
  BoolArray::default_instance_->InitAsDefaultInstance();
  StringArray::default_instance_->InitAsDefaultInstance();
  Item::default_instance_->InitAsDefaultInstance();
  Field::default_instance_->InitAsDefaultInstance();
  Batch::default_instance_->InitAsDefaultInstance();
  Stream::default_instance_->InitAsDefaultInstance();
  MasterComponentConfig::default_instance_->InitAsDefaultInstance();
  NodeControllerConfig::default_instance_->InitAsDefaultInstance();
  MasterProxyConfig::default_instance_->InitAsDefaultInstance();
  ModelConfig::default_instance_->InitAsDefaultInstance();
  RegularizerConfig::default_instance_->InitAsDefaultInstance();
  SmoothSparseThetaConfig::default_instance_->InitAsDefaultInstance();
  SmoothSparsePhiConfig::default_instance_->InitAsDefaultInstance();
  DecorrelatorPhiConfig::default_instance_->InitAsDefaultInstance();
  MultiLanguagePhiConfig::default_instance_->InitAsDefaultInstance();
  RegularizerInternalState::default_instance_->InitAsDefaultInstance();
  MultiLanguagePhiInternalState::default_instance_->InitAsDefaultInstance();
  DictionaryConfig::default_instance_->InitAsDefaultInstance();
  DictionaryEntry::default_instance_->InitAsDefaultInstance();
  ScoreConfig::default_instance_->InitAsDefaultInstance();
  ScoreData::default_instance_->InitAsDefaultInstance();
  PerplexityScoreConfig::default_instance_->InitAsDefaultInstance();
  PerplexityScore::default_instance_->InitAsDefaultInstance();
  SparsityThetaScoreConfig::default_instance_->InitAsDefaultInstance();
  SparsityThetaScore::default_instance_->InitAsDefaultInstance();
  SparsityPhiScoreConfig::default_instance_->InitAsDefaultInstance();
  SparsityPhiScore::default_instance_->InitAsDefaultInstance();
  ItemsProcessedScoreConfig::default_instance_->InitAsDefaultInstance();
  ItemsProcessedScore::default_instance_->InitAsDefaultInstance();
  TopTokensScoreConfig::default_instance_->InitAsDefaultInstance();
  TopTokensScore::default_instance_->InitAsDefaultInstance();
  ThetaSnippetScoreConfig::default_instance_->InitAsDefaultInstance();
  ThetaSnippetScore::default_instance_->InitAsDefaultInstance();
  TopicKernelScoreConfig::default_instance_->InitAsDefaultInstance();
  TopicKernelScore::default_instance_->InitAsDefaultInstance();
  TopicModel::default_instance_->InitAsDefaultInstance();
  TopicModel_TopicModelInternals::default_instance_->InitAsDefaultInstance();
  ThetaMatrix::default_instance_->InitAsDefaultInstance();
  CollectionParserConfig::default_instance_->InitAsDefaultInstance();
  SynchronizeModelArgs::default_instance_->InitAsDefaultInstance();
  InitializeModelArgs::default_instance_->InitAsDefaultInstance();
  GetTopicModelArgs::default_instance_->InitAsDefaultInstance();
  GetThetaMatrixArgs::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_artm_2fmessages_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_artm_2fmessages_2eproto {
  StaticDescriptorInitializer_artm_2fmessages_2eproto() {
    protobuf_AddDesc_artm_2fmessages_2eproto();
  }
} static_descriptor_initializer_artm_2fmessages_2eproto_;

// ===================================================================

#ifndef _MSC_VER
const int DoubleArray::kValueFieldNumber;
#endif  // !_MSC_VER

DoubleArray::DoubleArray()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void DoubleArray::InitAsDefaultInstance() {
}

DoubleArray::DoubleArray(const DoubleArray& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void DoubleArray::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

DoubleArray::~DoubleArray() {
  SharedDtor();
}

void DoubleArray::SharedDtor() {
  if (this != default_instance_) {
  }
}

void DoubleArray::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DoubleArray::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DoubleArray_descriptor_;
}

const DoubleArray& DoubleArray::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

DoubleArray* DoubleArray::default_instance_ = NULL;

DoubleArray* DoubleArray::New() const {
  return new DoubleArray;
}

void DoubleArray::Clear() {
  value_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool DoubleArray::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated double value = 1 [packed = true];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, this->mutable_value())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_FIXED64) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 1, 10, input, this->mutable_value())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void DoubleArray::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated double value = 1 [packed = true];
  if (this->value_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_value_cached_byte_size_);
  }
  for (int i = 0; i < this->value_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteDoubleNoTag(
      this->value(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* DoubleArray::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated double value = 1 [packed = true];
  if (this->value_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      1,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _value_cached_byte_size_, target);
  }
  for (int i = 0; i < this->value_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteDoubleNoTagToArray(this->value(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int DoubleArray::ByteSize() const {
  int total_size = 0;

  // repeated double value = 1 [packed = true];
  {
    int data_size = 0;
    data_size = 8 * this->value_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _value_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DoubleArray::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const DoubleArray* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const DoubleArray*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void DoubleArray::MergeFrom(const DoubleArray& from) {
  GOOGLE_CHECK_NE(&from, this);
  value_.MergeFrom(from.value_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void DoubleArray::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DoubleArray::CopyFrom(const DoubleArray& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DoubleArray::IsInitialized() const {

  return true;
}

void DoubleArray::Swap(DoubleArray* other) {
  if (other != this) {
    value_.Swap(&other->value_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata DoubleArray::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DoubleArray_descriptor_;
  metadata.reflection = DoubleArray_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int FloatArray::kValueFieldNumber;
#endif  // !_MSC_VER

FloatArray::FloatArray()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void FloatArray::InitAsDefaultInstance() {
}

FloatArray::FloatArray(const FloatArray& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void FloatArray::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

FloatArray::~FloatArray() {
  SharedDtor();
}

void FloatArray::SharedDtor() {
  if (this != default_instance_) {
  }
}

void FloatArray::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* FloatArray::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return FloatArray_descriptor_;
}

const FloatArray& FloatArray::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

FloatArray* FloatArray::default_instance_ = NULL;

FloatArray* FloatArray::New() const {
  return new FloatArray;
}

void FloatArray::Clear() {
  value_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool FloatArray::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated float value = 1 [packed = true];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_value())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_FIXED32) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 10, input, this->mutable_value())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void FloatArray::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated float value = 1 [packed = true];
  if (this->value_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_value_cached_byte_size_);
  }
  for (int i = 0; i < this->value_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->value(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* FloatArray::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated float value = 1 [packed = true];
  if (this->value_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      1,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _value_cached_byte_size_, target);
  }
  for (int i = 0; i < this->value_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->value(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int FloatArray::ByteSize() const {
  int total_size = 0;

  // repeated float value = 1 [packed = true];
  {
    int data_size = 0;
    data_size = 4 * this->value_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _value_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void FloatArray::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const FloatArray* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const FloatArray*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void FloatArray::MergeFrom(const FloatArray& from) {
  GOOGLE_CHECK_NE(&from, this);
  value_.MergeFrom(from.value_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void FloatArray::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FloatArray::CopyFrom(const FloatArray& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool FloatArray::IsInitialized() const {

  return true;
}

void FloatArray::Swap(FloatArray* other) {
  if (other != this) {
    value_.Swap(&other->value_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata FloatArray::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = FloatArray_descriptor_;
  metadata.reflection = FloatArray_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int BoolArray::kValueFieldNumber;
#endif  // !_MSC_VER

BoolArray::BoolArray()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void BoolArray::InitAsDefaultInstance() {
}

BoolArray::BoolArray(const BoolArray& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void BoolArray::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

BoolArray::~BoolArray() {
  SharedDtor();
}

void BoolArray::SharedDtor() {
  if (this != default_instance_) {
  }
}

void BoolArray::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* BoolArray::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return BoolArray_descriptor_;
}

const BoolArray& BoolArray::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

BoolArray* BoolArray::default_instance_ = NULL;

BoolArray* BoolArray::New() const {
  return new BoolArray;
}

void BoolArray::Clear() {
  value_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool BoolArray::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated bool value = 1 [packed = true];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, this->mutable_value())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 1, 10, input, this->mutable_value())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void BoolArray::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated bool value = 1 [packed = true];
  if (this->value_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_value_cached_byte_size_);
  }
  for (int i = 0; i < this->value_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBoolNoTag(
      this->value(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* BoolArray::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated bool value = 1 [packed = true];
  if (this->value_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      1,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _value_cached_byte_size_, target);
  }
  for (int i = 0; i < this->value_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBoolNoTagToArray(this->value(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int BoolArray::ByteSize() const {
  int total_size = 0;

  // repeated bool value = 1 [packed = true];
  {
    int data_size = 0;
    data_size = 1 * this->value_size();
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _value_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void BoolArray::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const BoolArray* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const BoolArray*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void BoolArray::MergeFrom(const BoolArray& from) {
  GOOGLE_CHECK_NE(&from, this);
  value_.MergeFrom(from.value_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void BoolArray::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BoolArray::CopyFrom(const BoolArray& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BoolArray::IsInitialized() const {

  return true;
}

void BoolArray::Swap(BoolArray* other) {
  if (other != this) {
    value_.Swap(&other->value_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata BoolArray::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = BoolArray_descriptor_;
  metadata.reflection = BoolArray_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int StringArray::kValueFieldNumber;
#endif  // !_MSC_VER

StringArray::StringArray()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void StringArray::InitAsDefaultInstance() {
}

StringArray::StringArray(const StringArray& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void StringArray::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

StringArray::~StringArray() {
  SharedDtor();
}

void StringArray::SharedDtor() {
  if (this != default_instance_) {
  }
}

void StringArray::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* StringArray::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return StringArray_descriptor_;
}

const StringArray& StringArray::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

StringArray* StringArray::default_instance_ = NULL;

StringArray* StringArray::New() const {
  return new StringArray;
}

void StringArray::Clear() {
  value_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool StringArray::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string value = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_value:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_value()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->value(this->value_size() - 1).data(),
            this->value(this->value_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_value;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void StringArray::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated string value = 1;
  for (int i = 0; i < this->value_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->value(i).data(), this->value(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->value(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* StringArray::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated string value = 1;
  for (int i = 0; i < this->value_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->value(i).data(), this->value(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1, this->value(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int StringArray::ByteSize() const {
  int total_size = 0;

  // repeated string value = 1;
  total_size += 1 * this->value_size();
  for (int i = 0; i < this->value_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->value(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void StringArray::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const StringArray* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const StringArray*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void StringArray::MergeFrom(const StringArray& from) {
  GOOGLE_CHECK_NE(&from, this);
  value_.MergeFrom(from.value_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void StringArray::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void StringArray::CopyFrom(const StringArray& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool StringArray::IsInitialized() const {

  return true;
}

void StringArray::Swap(StringArray* other) {
  if (other != this) {
    value_.Swap(&other->value_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata StringArray::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = StringArray_descriptor_;
  metadata.reflection = StringArray_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int Item::kIdFieldNumber;
const int Item::kFieldFieldNumber;
const int Item::kTitleFieldNumber;
#endif  // !_MSC_VER

Item::Item()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void Item::InitAsDefaultInstance() {
}

Item::Item(const Item& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void Item::SharedCtor() {
  _cached_size_ = 0;
  id_ = 0;
  title_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Item::~Item() {
  SharedDtor();
}

void Item::SharedDtor() {
  if (title_ != &::google::protobuf::internal::GetEmptyString()) {
    delete title_;
  }
  if (this != default_instance_) {
  }
}

void Item::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Item::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Item_descriptor_;
}

const Item& Item::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

Item* Item::default_instance_ = NULL;

Item* Item::New() const {
  return new Item;
}

void Item::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    id_ = 0;
    if (has_title()) {
      if (title_ != &::google::protobuf::internal::GetEmptyString()) {
        title_->clear();
      }
    }
  }
  field_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool Item::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 id = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &id_)));
          set_has_id();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_field;
        break;
      }

      // repeated .artm.Field field = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_field:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_field()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_field;
        if (input->ExpectTag(26)) goto parse_title;
        break;
      }

      // optional string title = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_title:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_title()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->title().data(), this->title().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void Item::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional int32 id = 1;
  if (has_id()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->id(), output);
  }

  // repeated .artm.Field field = 2;
  for (int i = 0; i < this->field_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->field(i), output);
  }

  // optional string title = 3;
  if (has_title()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->title().data(), this->title().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->title(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* Item::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 id = 1;
  if (has_id()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->id(), target);
  }

  // repeated .artm.Field field = 2;
  for (int i = 0; i < this->field_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        2, this->field(i), target);
  }

  // optional string title = 3;
  if (has_title()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->title().data(), this->title().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->title(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int Item::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 id = 1;
    if (has_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->id());
    }

    // optional string title = 3;
    if (has_title()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->title());
    }

  }
  // repeated .artm.Field field = 2;
  total_size += 1 * this->field_size();
  for (int i = 0; i < this->field_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->field(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Item::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const Item* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const Item*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void Item::MergeFrom(const Item& from) {
  GOOGLE_CHECK_NE(&from, this);
  field_.MergeFrom(from.field_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_id()) {
      set_id(from.id());
    }
    if (from.has_title()) {
      set_title(from.title());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void Item::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Item::CopyFrom(const Item& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Item::IsInitialized() const {

  return true;
}

void Item::Swap(Item* other) {
  if (other != this) {
    std::swap(id_, other->id_);
    field_.Swap(&other->field_);
    std::swap(title_, other->title_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata Item::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Item_descriptor_;
  metadata.reflection = Item_reflection_;
  return metadata;
}


// ===================================================================

::std::string* Field::_default_name_ = NULL;
#ifndef _MSC_VER
const int Field::kNameFieldNumber;
const int Field::kTokenIdFieldNumber;
const int Field::kTokenCountFieldNumber;
#endif  // !_MSC_VER

Field::Field()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void Field::InitAsDefaultInstance() {
}

Field::Field(const Field& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void Field::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(_default_name_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Field::~Field() {
  SharedDtor();
}

void Field::SharedDtor() {
  if (name_ != _default_name_) {
    delete name_;
  }
  if (this != default_instance_) {
  }
}

void Field::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Field::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Field_descriptor_;
}

const Field& Field::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

Field* Field::default_instance_ = NULL;

Field* Field::New() const {
  return new Field;
}

void Field::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != _default_name_) {
        name_->assign(*_default_name_);
      }
    }
  }
  token_id_.Clear();
  token_count_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool Field::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1 [default = "@body"];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_token_id;
        break;
      }

      // repeated int32 token_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_token_id:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 16, input, this->mutable_token_id())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_token_id())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_token_id;
        if (input->ExpectTag(24)) goto parse_token_count;
        break;
      }

      // repeated int32 token_count = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_token_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 24, input, this->mutable_token_count())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_token_count())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_token_count;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void Field::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1 [default = "@body"];
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }

  // repeated int32 token_id = 2;
  for (int i = 0; i < this->token_id_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      2, this->token_id(i), output);
  }

  // repeated int32 token_count = 3;
  for (int i = 0; i < this->token_count_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      3, this->token_count(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* Field::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1 [default = "@body"];
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // repeated int32 token_id = 2;
  for (int i = 0; i < this->token_id_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(2, this->token_id(i), target);
  }

  // repeated int32 token_count = 3;
  for (int i = 0; i < this->token_count_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(3, this->token_count(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int Field::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1 [default = "@body"];
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

  }
  // repeated int32 token_id = 2;
  {
    int data_size = 0;
    for (int i = 0; i < this->token_id_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->token_id(i));
    }
    total_size += 1 * this->token_id_size() + data_size;
  }

  // repeated int32 token_count = 3;
  {
    int data_size = 0;
    for (int i = 0; i < this->token_count_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->token_count(i));
    }
    total_size += 1 * this->token_count_size() + data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Field::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const Field* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const Field*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void Field::MergeFrom(const Field& from) {
  GOOGLE_CHECK_NE(&from, this);
  token_id_.MergeFrom(from.token_id_);
  token_count_.MergeFrom(from.token_count_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void Field::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Field::CopyFrom(const Field& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Field::IsInitialized() const {

  return true;
}

void Field::Swap(Field* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    token_id_.Swap(&other->token_id_);
    token_count_.Swap(&other->token_count_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata Field::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Field_descriptor_;
  metadata.reflection = Field_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int Batch::kTokenFieldNumber;
const int Batch::kClassIdFieldNumber;
const int Batch::kItemFieldNumber;
#endif  // !_MSC_VER

Batch::Batch()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void Batch::InitAsDefaultInstance() {
}

Batch::Batch(const Batch& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void Batch::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Batch::~Batch() {
  SharedDtor();
}

void Batch::SharedDtor() {
  if (this != default_instance_) {
  }
}

void Batch::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Batch::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Batch_descriptor_;
}

const Batch& Batch::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

Batch* Batch::default_instance_ = NULL;

Batch* Batch::New() const {
  return new Batch;
}

void Batch::Clear() {
  token_.Clear();
  class_id_.Clear();
  item_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool Batch::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string token = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_token:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_token()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->token(this->token_size() - 1).data(),
            this->token(this->token_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_token;
        if (input->ExpectTag(18)) goto parse_class_id;
        break;
      }

      // repeated string class_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id(this->class_id_size() - 1).data(),
            this->class_id(this->class_id_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_class_id;
        if (input->ExpectTag(26)) goto parse_item;
        break;
      }

      // repeated .artm.Item item = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_item:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_item()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_item;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void Batch::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated string token = 1;
  for (int i = 0; i < this->token_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->token(i).data(), this->token(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->token(i), output);
  }

  // repeated string class_id = 2;
  for (int i = 0; i < this->class_id_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->class_id(i).data(), this->class_id(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->class_id(i), output);
  }

  // repeated .artm.Item item = 3;
  for (int i = 0; i < this->item_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->item(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* Batch::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated string token = 1;
  for (int i = 0; i < this->token_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->token(i).data(), this->token(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1, this->token(i), target);
  }

  // repeated string class_id = 2;
  for (int i = 0; i < this->class_id_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id(i).data(), this->class_id(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->class_id(i), target);
  }

  // repeated .artm.Item item = 3;
  for (int i = 0; i < this->item_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        3, this->item(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int Batch::ByteSize() const {
  int total_size = 0;

  // repeated string token = 1;
  total_size += 1 * this->token_size();
  for (int i = 0; i < this->token_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->token(i));
  }

  // repeated string class_id = 2;
  total_size += 1 * this->class_id_size();
  for (int i = 0; i < this->class_id_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->class_id(i));
  }

  // repeated .artm.Item item = 3;
  total_size += 1 * this->item_size();
  for (int i = 0; i < this->item_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->item(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Batch::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const Batch* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const Batch*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void Batch::MergeFrom(const Batch& from) {
  GOOGLE_CHECK_NE(&from, this);
  token_.MergeFrom(from.token_);
  class_id_.MergeFrom(from.class_id_);
  item_.MergeFrom(from.item_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void Batch::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Batch::CopyFrom(const Batch& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Batch::IsInitialized() const {

  return true;
}

void Batch::Swap(Batch* other) {
  if (other != this) {
    token_.Swap(&other->token_);
    class_id_.Swap(&other->class_id_);
    item_.Swap(&other->item_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata Batch::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Batch_descriptor_;
  metadata.reflection = Batch_reflection_;
  return metadata;
}


// ===================================================================

const ::google::protobuf::EnumDescriptor* Stream_Type_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Stream_Type_descriptor_;
}
bool Stream_Type_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const Stream_Type Stream::Global;
const Stream_Type Stream::ItemIdModulus;
const Stream_Type Stream::Type_MIN;
const Stream_Type Stream::Type_MAX;
const int Stream::Type_ARRAYSIZE;
#endif  // _MSC_VER
::std::string* Stream::_default_name_ = NULL;
#ifndef _MSC_VER
const int Stream::kTypeFieldNumber;
const int Stream::kNameFieldNumber;
const int Stream::kModulusFieldNumber;
const int Stream::kResidualsFieldNumber;
#endif  // !_MSC_VER

Stream::Stream()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void Stream::InitAsDefaultInstance() {
}

Stream::Stream(const Stream& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void Stream::SharedCtor() {
  _cached_size_ = 0;
  type_ = 0;
  name_ = const_cast< ::std::string*>(_default_name_);
  modulus_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

Stream::~Stream() {
  SharedDtor();
}

void Stream::SharedDtor() {
  if (name_ != _default_name_) {
    delete name_;
  }
  if (this != default_instance_) {
  }
}

void Stream::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Stream::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Stream_descriptor_;
}

const Stream& Stream::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

Stream* Stream::default_instance_ = NULL;

Stream* Stream::New() const {
  return new Stream;
}

void Stream::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    type_ = 0;
    if (has_name()) {
      if (name_ != _default_name_) {
        name_->assign(*_default_name_);
      }
    }
    modulus_ = 0;
  }
  residuals_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool Stream::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .artm.Stream.Type type = 1 [default = Global];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::artm::Stream_Type_IsValid(value)) {
            set_type(static_cast< ::artm::Stream_Type >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_name;
        break;
      }

      // optional string name = 2 [default = "@global"];
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_modulus;
        break;
      }

      // optional int32 modulus = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_modulus:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &modulus_)));
          set_has_modulus();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(32)) goto parse_residuals;
        break;
      }

      // repeated int32 residuals = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_residuals:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 32, input, this->mutable_residuals())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_residuals())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(32)) goto parse_residuals;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void Stream::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional .artm.Stream.Type type = 1 [default = Global];
  if (has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->type(), output);
  }

  // optional string name = 2 [default = "@global"];
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->name(), output);
  }

  // optional int32 modulus = 3;
  if (has_modulus()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->modulus(), output);
  }

  // repeated int32 residuals = 4;
  for (int i = 0; i < this->residuals_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      4, this->residuals(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* Stream::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .artm.Stream.Type type = 1 [default = Global];
  if (has_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->type(), target);
  }

  // optional string name = 2 [default = "@global"];
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->name(), target);
  }

  // optional int32 modulus = 3;
  if (has_modulus()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->modulus(), target);
  }

  // repeated int32 residuals = 4;
  for (int i = 0; i < this->residuals_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(4, this->residuals(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int Stream::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .artm.Stream.Type type = 1 [default = Global];
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
    }

    // optional string name = 2 [default = "@global"];
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional int32 modulus = 3;
    if (has_modulus()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->modulus());
    }

  }
  // repeated int32 residuals = 4;
  {
    int data_size = 0;
    for (int i = 0; i < this->residuals_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->residuals(i));
    }
    total_size += 1 * this->residuals_size() + data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Stream::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const Stream* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const Stream*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void Stream::MergeFrom(const Stream& from) {
  GOOGLE_CHECK_NE(&from, this);
  residuals_.MergeFrom(from.residuals_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_type()) {
      set_type(from.type());
    }
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_modulus()) {
      set_modulus(from.modulus());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void Stream::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Stream::CopyFrom(const Stream& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Stream::IsInitialized() const {

  return true;
}

void Stream::Swap(Stream* other) {
  if (other != this) {
    std::swap(type_, other->type_);
    std::swap(name_, other->name_);
    std::swap(modulus_, other->modulus_);
    residuals_.Swap(&other->residuals_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata Stream::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Stream_descriptor_;
  metadata.reflection = Stream_reflection_;
  return metadata;
}


// ===================================================================

const ::google::protobuf::EnumDescriptor* MasterComponentConfig_ModusOperandi_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return MasterComponentConfig_ModusOperandi_descriptor_;
}
bool MasterComponentConfig_ModusOperandi_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const MasterComponentConfig_ModusOperandi MasterComponentConfig::Local;
const MasterComponentConfig_ModusOperandi MasterComponentConfig::Network;
const MasterComponentConfig_ModusOperandi MasterComponentConfig::ModusOperandi_MIN;
const MasterComponentConfig_ModusOperandi MasterComponentConfig::ModusOperandi_MAX;
const int MasterComponentConfig::ModusOperandi_ARRAYSIZE;
#endif  // _MSC_VER
#ifndef _MSC_VER
const int MasterComponentConfig::kModusOperandiFieldNumber;
const int MasterComponentConfig::kDiskPathFieldNumber;
const int MasterComponentConfig::kStreamFieldNumber;
const int MasterComponentConfig::kCompactBatchesFieldNumber;
const int MasterComponentConfig::kCacheThetaFieldNumber;
const int MasterComponentConfig::kProcessorsCountFieldNumber;
const int MasterComponentConfig::kProcessorQueueMaxSizeFieldNumber;
const int MasterComponentConfig::kMergerQueueMaxSizeFieldNumber;
const int MasterComponentConfig::kScoreConfigFieldNumber;
const int MasterComponentConfig::kCreateEndpointFieldNumber;
const int MasterComponentConfig::kConnectEndpointFieldNumber;
const int MasterComponentConfig::kNodeConnectEndpointFieldNumber;
const int MasterComponentConfig::kOnlineBatchProcessingFieldNumber;
const int MasterComponentConfig::kCommunicationTimeoutFieldNumber;
const int MasterComponentConfig::kDiskCachePathFieldNumber;
#endif  // !_MSC_VER

MasterComponentConfig::MasterComponentConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void MasterComponentConfig::InitAsDefaultInstance() {
}

MasterComponentConfig::MasterComponentConfig(const MasterComponentConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void MasterComponentConfig::SharedCtor() {
  _cached_size_ = 0;
  modus_operandi_ = 0;
  disk_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  compact_batches_ = true;
  cache_theta_ = false;
  processors_count_ = 1;
  processor_queue_max_size_ = 10;
  merger_queue_max_size_ = 10;
  create_endpoint_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  connect_endpoint_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  online_batch_processing_ = false;
  communication_timeout_ = 1000;
  disk_cache_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

MasterComponentConfig::~MasterComponentConfig() {
  SharedDtor();
}

void MasterComponentConfig::SharedDtor() {
  if (disk_path_ != &::google::protobuf::internal::GetEmptyString()) {
    delete disk_path_;
  }
  if (create_endpoint_ != &::google::protobuf::internal::GetEmptyString()) {
    delete create_endpoint_;
  }
  if (connect_endpoint_ != &::google::protobuf::internal::GetEmptyString()) {
    delete connect_endpoint_;
  }
  if (disk_cache_path_ != &::google::protobuf::internal::GetEmptyString()) {
    delete disk_cache_path_;
  }
  if (this != default_instance_) {
  }
}

void MasterComponentConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* MasterComponentConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return MasterComponentConfig_descriptor_;
}

const MasterComponentConfig& MasterComponentConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

MasterComponentConfig* MasterComponentConfig::default_instance_ = NULL;

MasterComponentConfig* MasterComponentConfig::New() const {
  return new MasterComponentConfig;
}

void MasterComponentConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    modus_operandi_ = 0;
    if (has_disk_path()) {
      if (disk_path_ != &::google::protobuf::internal::GetEmptyString()) {
        disk_path_->clear();
      }
    }
    compact_batches_ = true;
    cache_theta_ = false;
    processors_count_ = 1;
    processor_queue_max_size_ = 10;
    merger_queue_max_size_ = 10;
  }
  if (_has_bits_[9 / 32] & (0xffu << (9 % 32))) {
    if (has_create_endpoint()) {
      if (create_endpoint_ != &::google::protobuf::internal::GetEmptyString()) {
        create_endpoint_->clear();
      }
    }
    if (has_connect_endpoint()) {
      if (connect_endpoint_ != &::google::protobuf::internal::GetEmptyString()) {
        connect_endpoint_->clear();
      }
    }
    online_batch_processing_ = false;
    communication_timeout_ = 1000;
    if (has_disk_cache_path()) {
      if (disk_cache_path_ != &::google::protobuf::internal::GetEmptyString()) {
        disk_cache_path_->clear();
      }
    }
  }
  stream_.Clear();
  score_config_.Clear();
  node_connect_endpoint_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool MasterComponentConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .artm.MasterComponentConfig.ModusOperandi modus_operandi = 1 [default = Local];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::artm::MasterComponentConfig_ModusOperandi_IsValid(value)) {
            set_modus_operandi(static_cast< ::artm::MasterComponentConfig_ModusOperandi >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_disk_path;
        break;
      }

      // optional string disk_path = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_disk_path:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_disk_path()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->disk_path().data(), this->disk_path().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_stream;
        break;
      }

      // repeated .artm.Stream stream = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_stream:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_stream()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_stream;
        if (input->ExpectTag(32)) goto parse_compact_batches;
        break;
      }

      // optional bool compact_batches = 4 [default = true];
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_compact_batches:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &compact_batches_)));
          set_has_compact_batches();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(40)) goto parse_cache_theta;
        break;
      }

      // optional bool cache_theta = 5 [default = false];
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_cache_theta:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &cache_theta_)));
          set_has_cache_theta();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(48)) goto parse_processors_count;
        break;
      }

      // optional int32 processors_count = 6 [default = 1];
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_processors_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &processors_count_)));
          set_has_processors_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(56)) goto parse_processor_queue_max_size;
        break;
      }

      // optional int32 processor_queue_max_size = 7 [default = 10];
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_processor_queue_max_size:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &processor_queue_max_size_)));
          set_has_processor_queue_max_size();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(64)) goto parse_merger_queue_max_size;
        break;
      }

      // optional int32 merger_queue_max_size = 8 [default = 10];
      case 8: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_merger_queue_max_size:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &merger_queue_max_size_)));
          set_has_merger_queue_max_size();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(74)) goto parse_score_config;
        break;
      }

      // repeated .artm.ScoreConfig score_config = 9;
      case 9: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_score_config:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_score_config()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(74)) goto parse_score_config;
        if (input->ExpectTag(82)) goto parse_create_endpoint;
        break;
      }

      // optional string create_endpoint = 10;
      case 10: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_create_endpoint:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_create_endpoint()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->create_endpoint().data(), this->create_endpoint().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(90)) goto parse_connect_endpoint;
        break;
      }

      // optional string connect_endpoint = 11;
      case 11: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_connect_endpoint:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_connect_endpoint()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->connect_endpoint().data(), this->connect_endpoint().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(98)) goto parse_node_connect_endpoint;
        break;
      }

      // repeated string node_connect_endpoint = 12;
      case 12: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_node_connect_endpoint:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_node_connect_endpoint()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->node_connect_endpoint(this->node_connect_endpoint_size() - 1).data(),
            this->node_connect_endpoint(this->node_connect_endpoint_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(98)) goto parse_node_connect_endpoint;
        if (input->ExpectTag(104)) goto parse_online_batch_processing;
        break;
      }

      // optional bool online_batch_processing = 13 [default = false];
      case 13: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_online_batch_processing:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &online_batch_processing_)));
          set_has_online_batch_processing();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(112)) goto parse_communication_timeout;
        break;
      }

      // optional int32 communication_timeout = 14 [default = 1000];
      case 14: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_communication_timeout:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &communication_timeout_)));
          set_has_communication_timeout();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(122)) goto parse_disk_cache_path;
        break;
      }

      // optional string disk_cache_path = 15;
      case 15: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_disk_cache_path:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_disk_cache_path()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->disk_cache_path().data(), this->disk_cache_path().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void MasterComponentConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional .artm.MasterComponentConfig.ModusOperandi modus_operandi = 1 [default = Local];
  if (has_modus_operandi()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->modus_operandi(), output);
  }

  // optional string disk_path = 2;
  if (has_disk_path()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->disk_path().data(), this->disk_path().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->disk_path(), output);
  }

  // repeated .artm.Stream stream = 3;
  for (int i = 0; i < this->stream_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->stream(i), output);
  }

  // optional bool compact_batches = 4 [default = true];
  if (has_compact_batches()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->compact_batches(), output);
  }

  // optional bool cache_theta = 5 [default = false];
  if (has_cache_theta()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->cache_theta(), output);
  }

  // optional int32 processors_count = 6 [default = 1];
  if (has_processors_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->processors_count(), output);
  }

  // optional int32 processor_queue_max_size = 7 [default = 10];
  if (has_processor_queue_max_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->processor_queue_max_size(), output);
  }

  // optional int32 merger_queue_max_size = 8 [default = 10];
  if (has_merger_queue_max_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->merger_queue_max_size(), output);
  }

  // repeated .artm.ScoreConfig score_config = 9;
  for (int i = 0; i < this->score_config_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      9, this->score_config(i), output);
  }

  // optional string create_endpoint = 10;
  if (has_create_endpoint()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->create_endpoint().data(), this->create_endpoint().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      10, this->create_endpoint(), output);
  }

  // optional string connect_endpoint = 11;
  if (has_connect_endpoint()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->connect_endpoint().data(), this->connect_endpoint().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      11, this->connect_endpoint(), output);
  }

  // repeated string node_connect_endpoint = 12;
  for (int i = 0; i < this->node_connect_endpoint_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->node_connect_endpoint(i).data(), this->node_connect_endpoint(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      12, this->node_connect_endpoint(i), output);
  }

  // optional bool online_batch_processing = 13 [default = false];
  if (has_online_batch_processing()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(13, this->online_batch_processing(), output);
  }

  // optional int32 communication_timeout = 14 [default = 1000];
  if (has_communication_timeout()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(14, this->communication_timeout(), output);
  }

  // optional string disk_cache_path = 15;
  if (has_disk_cache_path()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->disk_cache_path().data(), this->disk_cache_path().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      15, this->disk_cache_path(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* MasterComponentConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .artm.MasterComponentConfig.ModusOperandi modus_operandi = 1 [default = Local];
  if (has_modus_operandi()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->modus_operandi(), target);
  }

  // optional string disk_path = 2;
  if (has_disk_path()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->disk_path().data(), this->disk_path().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->disk_path(), target);
  }

  // repeated .artm.Stream stream = 3;
  for (int i = 0; i < this->stream_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        3, this->stream(i), target);
  }

  // optional bool compact_batches = 4 [default = true];
  if (has_compact_batches()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->compact_batches(), target);
  }

  // optional bool cache_theta = 5 [default = false];
  if (has_cache_theta()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->cache_theta(), target);
  }

  // optional int32 processors_count = 6 [default = 1];
  if (has_processors_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->processors_count(), target);
  }

  // optional int32 processor_queue_max_size = 7 [default = 10];
  if (has_processor_queue_max_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->processor_queue_max_size(), target);
  }

  // optional int32 merger_queue_max_size = 8 [default = 10];
  if (has_merger_queue_max_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(8, this->merger_queue_max_size(), target);
  }

  // repeated .artm.ScoreConfig score_config = 9;
  for (int i = 0; i < this->score_config_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        9, this->score_config(i), target);
  }

  // optional string create_endpoint = 10;
  if (has_create_endpoint()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->create_endpoint().data(), this->create_endpoint().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        10, this->create_endpoint(), target);
  }

  // optional string connect_endpoint = 11;
  if (has_connect_endpoint()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->connect_endpoint().data(), this->connect_endpoint().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        11, this->connect_endpoint(), target);
  }

  // repeated string node_connect_endpoint = 12;
  for (int i = 0; i < this->node_connect_endpoint_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->node_connect_endpoint(i).data(), this->node_connect_endpoint(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(12, this->node_connect_endpoint(i), target);
  }

  // optional bool online_batch_processing = 13 [default = false];
  if (has_online_batch_processing()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(13, this->online_batch_processing(), target);
  }

  // optional int32 communication_timeout = 14 [default = 1000];
  if (has_communication_timeout()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(14, this->communication_timeout(), target);
  }

  // optional string disk_cache_path = 15;
  if (has_disk_cache_path()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->disk_cache_path().data(), this->disk_cache_path().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        15, this->disk_cache_path(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int MasterComponentConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .artm.MasterComponentConfig.ModusOperandi modus_operandi = 1 [default = Local];
    if (has_modus_operandi()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->modus_operandi());
    }

    // optional string disk_path = 2;
    if (has_disk_path()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->disk_path());
    }

    // optional bool compact_batches = 4 [default = true];
    if (has_compact_batches()) {
      total_size += 1 + 1;
    }

    // optional bool cache_theta = 5 [default = false];
    if (has_cache_theta()) {
      total_size += 1 + 1;
    }

    // optional int32 processors_count = 6 [default = 1];
    if (has_processors_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->processors_count());
    }

    // optional int32 processor_queue_max_size = 7 [default = 10];
    if (has_processor_queue_max_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->processor_queue_max_size());
    }

    // optional int32 merger_queue_max_size = 8 [default = 10];
    if (has_merger_queue_max_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->merger_queue_max_size());
    }

  }
  if (_has_bits_[9 / 32] & (0xffu << (9 % 32))) {
    // optional string create_endpoint = 10;
    if (has_create_endpoint()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->create_endpoint());
    }

    // optional string connect_endpoint = 11;
    if (has_connect_endpoint()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->connect_endpoint());
    }

    // optional bool online_batch_processing = 13 [default = false];
    if (has_online_batch_processing()) {
      total_size += 1 + 1;
    }

    // optional int32 communication_timeout = 14 [default = 1000];
    if (has_communication_timeout()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->communication_timeout());
    }

    // optional string disk_cache_path = 15;
    if (has_disk_cache_path()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->disk_cache_path());
    }

  }
  // repeated .artm.Stream stream = 3;
  total_size += 1 * this->stream_size();
  for (int i = 0; i < this->stream_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->stream(i));
  }

  // repeated .artm.ScoreConfig score_config = 9;
  total_size += 1 * this->score_config_size();
  for (int i = 0; i < this->score_config_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->score_config(i));
  }

  // repeated string node_connect_endpoint = 12;
  total_size += 1 * this->node_connect_endpoint_size();
  for (int i = 0; i < this->node_connect_endpoint_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->node_connect_endpoint(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void MasterComponentConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const MasterComponentConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const MasterComponentConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void MasterComponentConfig::MergeFrom(const MasterComponentConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  stream_.MergeFrom(from.stream_);
  score_config_.MergeFrom(from.score_config_);
  node_connect_endpoint_.MergeFrom(from.node_connect_endpoint_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_modus_operandi()) {
      set_modus_operandi(from.modus_operandi());
    }
    if (from.has_disk_path()) {
      set_disk_path(from.disk_path());
    }
    if (from.has_compact_batches()) {
      set_compact_batches(from.compact_batches());
    }
    if (from.has_cache_theta()) {
      set_cache_theta(from.cache_theta());
    }
    if (from.has_processors_count()) {
      set_processors_count(from.processors_count());
    }
    if (from.has_processor_queue_max_size()) {
      set_processor_queue_max_size(from.processor_queue_max_size());
    }
    if (from.has_merger_queue_max_size()) {
      set_merger_queue_max_size(from.merger_queue_max_size());
    }
  }
  if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) {
    if (from.has_create_endpoint()) {
      set_create_endpoint(from.create_endpoint());
    }
    if (from.has_connect_endpoint()) {
      set_connect_endpoint(from.connect_endpoint());
    }
    if (from.has_online_batch_processing()) {
      set_online_batch_processing(from.online_batch_processing());
    }
    if (from.has_communication_timeout()) {
      set_communication_timeout(from.communication_timeout());
    }
    if (from.has_disk_cache_path()) {
      set_disk_cache_path(from.disk_cache_path());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void MasterComponentConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void MasterComponentConfig::CopyFrom(const MasterComponentConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool MasterComponentConfig::IsInitialized() const {

  return true;
}

void MasterComponentConfig::Swap(MasterComponentConfig* other) {
  if (other != this) {
    std::swap(modus_operandi_, other->modus_operandi_);
    std::swap(disk_path_, other->disk_path_);
    stream_.Swap(&other->stream_);
    std::swap(compact_batches_, other->compact_batches_);
    std::swap(cache_theta_, other->cache_theta_);
    std::swap(processors_count_, other->processors_count_);
    std::swap(processor_queue_max_size_, other->processor_queue_max_size_);
    std::swap(merger_queue_max_size_, other->merger_queue_max_size_);
    score_config_.Swap(&other->score_config_);
    std::swap(create_endpoint_, other->create_endpoint_);
    std::swap(connect_endpoint_, other->connect_endpoint_);
    node_connect_endpoint_.Swap(&other->node_connect_endpoint_);
    std::swap(online_batch_processing_, other->online_batch_processing_);
    std::swap(communication_timeout_, other->communication_timeout_);
    std::swap(disk_cache_path_, other->disk_cache_path_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata MasterComponentConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = MasterComponentConfig_descriptor_;
  metadata.reflection = MasterComponentConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int NodeControllerConfig::kCreateEndpointFieldNumber;
#endif  // !_MSC_VER

NodeControllerConfig::NodeControllerConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void NodeControllerConfig::InitAsDefaultInstance() {
}

NodeControllerConfig::NodeControllerConfig(const NodeControllerConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void NodeControllerConfig::SharedCtor() {
  _cached_size_ = 0;
  create_endpoint_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

NodeControllerConfig::~NodeControllerConfig() {
  SharedDtor();
}

void NodeControllerConfig::SharedDtor() {
  if (create_endpoint_ != &::google::protobuf::internal::GetEmptyString()) {
    delete create_endpoint_;
  }
  if (this != default_instance_) {
  }
}

void NodeControllerConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NodeControllerConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return NodeControllerConfig_descriptor_;
}

const NodeControllerConfig& NodeControllerConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

NodeControllerConfig* NodeControllerConfig::default_instance_ = NULL;

NodeControllerConfig* NodeControllerConfig::New() const {
  return new NodeControllerConfig;
}

void NodeControllerConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_create_endpoint()) {
      if (create_endpoint_ != &::google::protobuf::internal::GetEmptyString()) {
        create_endpoint_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool NodeControllerConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string create_endpoint = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_create_endpoint()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->create_endpoint().data(), this->create_endpoint().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void NodeControllerConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string create_endpoint = 1;
  if (has_create_endpoint()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->create_endpoint().data(), this->create_endpoint().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->create_endpoint(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* NodeControllerConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string create_endpoint = 1;
  if (has_create_endpoint()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->create_endpoint().data(), this->create_endpoint().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->create_endpoint(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int NodeControllerConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string create_endpoint = 1;
    if (has_create_endpoint()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->create_endpoint());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void NodeControllerConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const NodeControllerConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const NodeControllerConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void NodeControllerConfig::MergeFrom(const NodeControllerConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_create_endpoint()) {
      set_create_endpoint(from.create_endpoint());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void NodeControllerConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void NodeControllerConfig::CopyFrom(const NodeControllerConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool NodeControllerConfig::IsInitialized() const {

  return true;
}

void NodeControllerConfig::Swap(NodeControllerConfig* other) {
  if (other != this) {
    std::swap(create_endpoint_, other->create_endpoint_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata NodeControllerConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = NodeControllerConfig_descriptor_;
  metadata.reflection = NodeControllerConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int MasterProxyConfig::kNodeConnectEndpointFieldNumber;
const int MasterProxyConfig::kConfigFieldNumber;
const int MasterProxyConfig::kCommunicationTimeoutFieldNumber;
const int MasterProxyConfig::kPollingFrequencyFieldNumber;
#endif  // !_MSC_VER

MasterProxyConfig::MasterProxyConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void MasterProxyConfig::InitAsDefaultInstance() {
  config_ = const_cast< ::artm::MasterComponentConfig*>(&::artm::MasterComponentConfig::default_instance());
}

MasterProxyConfig::MasterProxyConfig(const MasterProxyConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void MasterProxyConfig::SharedCtor() {
  _cached_size_ = 0;
  node_connect_endpoint_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  config_ = NULL;
  communication_timeout_ = 1000;
  polling_frequency_ = 50;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

MasterProxyConfig::~MasterProxyConfig() {
  SharedDtor();
}

void MasterProxyConfig::SharedDtor() {
  if (node_connect_endpoint_ != &::google::protobuf::internal::GetEmptyString()) {
    delete node_connect_endpoint_;
  }
  if (this != default_instance_) {
    delete config_;
  }
}

void MasterProxyConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* MasterProxyConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return MasterProxyConfig_descriptor_;
}

const MasterProxyConfig& MasterProxyConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

MasterProxyConfig* MasterProxyConfig::default_instance_ = NULL;

MasterProxyConfig* MasterProxyConfig::New() const {
  return new MasterProxyConfig;
}

void MasterProxyConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_node_connect_endpoint()) {
      if (node_connect_endpoint_ != &::google::protobuf::internal::GetEmptyString()) {
        node_connect_endpoint_->clear();
      }
    }
    if (has_config()) {
      if (config_ != NULL) config_->::artm::MasterComponentConfig::Clear();
    }
    communication_timeout_ = 1000;
    polling_frequency_ = 50;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool MasterProxyConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string node_connect_endpoint = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_node_connect_endpoint()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->node_connect_endpoint().data(), this->node_connect_endpoint().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_config;
        break;
      }

      // optional .artm.MasterComponentConfig config = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_config:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_config()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_communication_timeout;
        break;
      }

      // optional int32 communication_timeout = 3 [default = 1000];
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_communication_timeout:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &communication_timeout_)));
          set_has_communication_timeout();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(32)) goto parse_polling_frequency;
        break;
      }

      // optional int32 polling_frequency = 4 [default = 50];
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_polling_frequency:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &polling_frequency_)));
          set_has_polling_frequency();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void MasterProxyConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string node_connect_endpoint = 1;
  if (has_node_connect_endpoint()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->node_connect_endpoint().data(), this->node_connect_endpoint().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->node_connect_endpoint(), output);
  }

  // optional .artm.MasterComponentConfig config = 2;
  if (has_config()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->config(), output);
  }

  // optional int32 communication_timeout = 3 [default = 1000];
  if (has_communication_timeout()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->communication_timeout(), output);
  }

  // optional int32 polling_frequency = 4 [default = 50];
  if (has_polling_frequency()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->polling_frequency(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* MasterProxyConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string node_connect_endpoint = 1;
  if (has_node_connect_endpoint()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->node_connect_endpoint().data(), this->node_connect_endpoint().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->node_connect_endpoint(), target);
  }

  // optional .artm.MasterComponentConfig config = 2;
  if (has_config()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        2, this->config(), target);
  }

  // optional int32 communication_timeout = 3 [default = 1000];
  if (has_communication_timeout()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->communication_timeout(), target);
  }

  // optional int32 polling_frequency = 4 [default = 50];
  if (has_polling_frequency()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->polling_frequency(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int MasterProxyConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string node_connect_endpoint = 1;
    if (has_node_connect_endpoint()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->node_connect_endpoint());
    }

    // optional .artm.MasterComponentConfig config = 2;
    if (has_config()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->config());
    }

    // optional int32 communication_timeout = 3 [default = 1000];
    if (has_communication_timeout()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->communication_timeout());
    }

    // optional int32 polling_frequency = 4 [default = 50];
    if (has_polling_frequency()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->polling_frequency());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void MasterProxyConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const MasterProxyConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const MasterProxyConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void MasterProxyConfig::MergeFrom(const MasterProxyConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_node_connect_endpoint()) {
      set_node_connect_endpoint(from.node_connect_endpoint());
    }
    if (from.has_config()) {
      mutable_config()->::artm::MasterComponentConfig::MergeFrom(from.config());
    }
    if (from.has_communication_timeout()) {
      set_communication_timeout(from.communication_timeout());
    }
    if (from.has_polling_frequency()) {
      set_polling_frequency(from.polling_frequency());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void MasterProxyConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void MasterProxyConfig::CopyFrom(const MasterProxyConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool MasterProxyConfig::IsInitialized() const {

  return true;
}

void MasterProxyConfig::Swap(MasterProxyConfig* other) {
  if (other != this) {
    std::swap(node_connect_endpoint_, other->node_connect_endpoint_);
    std::swap(config_, other->config_);
    std::swap(communication_timeout_, other->communication_timeout_);
    std::swap(polling_frequency_, other->polling_frequency_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata MasterProxyConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = MasterProxyConfig_descriptor_;
  metadata.reflection = MasterProxyConfig_reflection_;
  return metadata;
}


// ===================================================================

::std::string* ModelConfig::_default_name_ = NULL;
::std::string* ModelConfig::_default_field_name_ = NULL;
::std::string* ModelConfig::_default_stream_name_ = NULL;
#ifndef _MSC_VER
const int ModelConfig::kNameFieldNumber;
const int ModelConfig::kTopicsCountFieldNumber;
const int ModelConfig::kTopicNameFieldNumber;
const int ModelConfig::kEnabledFieldNumber;
const int ModelConfig::kInnerIterationsCountFieldNumber;
const int ModelConfig::kFieldNameFieldNumber;
const int ModelConfig::kStreamNameFieldNumber;
const int ModelConfig::kScoreNameFieldNumber;
const int ModelConfig::kReuseThetaFieldNumber;
const int ModelConfig::kRegularizerNameFieldNumber;
const int ModelConfig::kRegularizerTauFieldNumber;
const int ModelConfig::kClassIdFieldNumber;
const int ModelConfig::kClassWeightFieldNumber;
const int ModelConfig::kUseSparseBowFieldNumber;
const int ModelConfig::kUseRandomThetaFieldNumber;
#endif  // !_MSC_VER

ModelConfig::ModelConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ModelConfig::InitAsDefaultInstance() {
}

ModelConfig::ModelConfig(const ModelConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ModelConfig::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(_default_name_);
  topics_count_ = 32;
  enabled_ = true;
  inner_iterations_count_ = 10;
  field_name_ = const_cast< ::std::string*>(_default_field_name_);
  stream_name_ = const_cast< ::std::string*>(_default_stream_name_);
  reuse_theta_ = false;
  use_sparse_bow_ = true;
  use_random_theta_ = false;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ModelConfig::~ModelConfig() {
  SharedDtor();
}

void ModelConfig::SharedDtor() {
  if (name_ != _default_name_) {
    delete name_;
  }
  if (field_name_ != _default_field_name_) {
    delete field_name_;
  }
  if (stream_name_ != _default_stream_name_) {
    delete stream_name_;
  }
  if (this != default_instance_) {
  }
}

void ModelConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ModelConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ModelConfig_descriptor_;
}

const ModelConfig& ModelConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

ModelConfig* ModelConfig::default_instance_ = NULL;

ModelConfig* ModelConfig::New() const {
  return new ModelConfig;
}

void ModelConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != _default_name_) {
        name_->assign(*_default_name_);
      }
    }
    topics_count_ = 32;
    enabled_ = true;
    inner_iterations_count_ = 10;
    if (has_field_name()) {
      if (field_name_ != _default_field_name_) {
        field_name_->assign(*_default_field_name_);
      }
    }
    if (has_stream_name()) {
      if (stream_name_ != _default_stream_name_) {
        stream_name_->assign(*_default_stream_name_);
      }
    }
  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    reuse_theta_ = false;
    use_sparse_bow_ = true;
    use_random_theta_ = false;
  }
  topic_name_.Clear();
  score_name_.Clear();
  regularizer_name_.Clear();
  regularizer_tau_.Clear();
  class_id_.Clear();
  class_weight_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ModelConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1 [default = "@model"];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_topics_count;
        break;
      }

      // optional int32 topics_count = 2 [default = 32];
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_topics_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &topics_count_)));
          set_has_topics_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        if (input->ExpectTag(32)) goto parse_enabled;
        break;
      }

      // optional bool enabled = 4 [default = true];
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_enabled:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &enabled_)));
          set_has_enabled();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(40)) goto parse_inner_iterations_count;
        break;
      }

      // optional int32 inner_iterations_count = 5 [default = 10];
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_inner_iterations_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &inner_iterations_count_)));
          set_has_inner_iterations_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(50)) goto parse_field_name;
        break;
      }

      // optional string field_name = 6 [default = "@body"];
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_field_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_field_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->field_name().data(), this->field_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(58)) goto parse_stream_name;
        break;
      }

      // optional string stream_name = 7 [default = "@global"];
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_stream_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_stream_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->stream_name().data(), this->stream_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(66)) goto parse_score_name;
        break;
      }

      // repeated string score_name = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_score_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_score_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->score_name(this->score_name_size() - 1).data(),
            this->score_name(this->score_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(66)) goto parse_score_name;
        if (input->ExpectTag(72)) goto parse_reuse_theta;
        break;
      }

      // optional bool reuse_theta = 9 [default = false];
      case 9: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_reuse_theta:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &reuse_theta_)));
          set_has_reuse_theta();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(82)) goto parse_regularizer_name;
        break;
      }

      // repeated string regularizer_name = 10;
      case 10: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_regularizer_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_regularizer_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->regularizer_name(this->regularizer_name_size() - 1).data(),
            this->regularizer_name(this->regularizer_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(82)) goto parse_regularizer_name;
        if (input->ExpectTag(89)) goto parse_regularizer_tau;
        break;
      }

      // repeated double regularizer_tau = 11;
      case 11: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
         parse_regularizer_tau:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 1, 89, input, this->mutable_regularizer_tau())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, this->mutable_regularizer_tau())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(89)) goto parse_regularizer_tau;
        if (input->ExpectTag(98)) goto parse_class_id;
        break;
      }

      // repeated string class_id = 12;
      case 12: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id(this->class_id_size() - 1).data(),
            this->class_id(this->class_id_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(98)) goto parse_class_id;
        if (input->ExpectTag(109)) goto parse_class_weight;
        break;
      }

      // repeated float class_weight = 13;
      case 13: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_class_weight:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 109, input, this->mutable_class_weight())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_class_weight())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(109)) goto parse_class_weight;
        if (input->ExpectTag(112)) goto parse_use_sparse_bow;
        break;
      }

      // optional bool use_sparse_bow = 14 [default = true];
      case 14: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_use_sparse_bow:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &use_sparse_bow_)));
          set_has_use_sparse_bow();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(120)) goto parse_use_random_theta;
        break;
      }

      // optional bool use_random_theta = 15 [default = false];
      case 15: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_use_random_theta:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &use_random_theta_)));
          set_has_use_random_theta();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ModelConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1 [default = "@model"];
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }

  // optional int32 topics_count = 2 [default = 32];
  if (has_topics_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->topics_count(), output);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->topic_name(i), output);
  }

  // optional bool enabled = 4 [default = true];
  if (has_enabled()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->enabled(), output);
  }

  // optional int32 inner_iterations_count = 5 [default = 10];
  if (has_inner_iterations_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->inner_iterations_count(), output);
  }

  // optional string field_name = 6 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      6, this->field_name(), output);
  }

  // optional string stream_name = 7 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      7, this->stream_name(), output);
  }

  // repeated string score_name = 8;
  for (int i = 0; i < this->score_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->score_name(i).data(), this->score_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      8, this->score_name(i), output);
  }

  // optional bool reuse_theta = 9 [default = false];
  if (has_reuse_theta()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(9, this->reuse_theta(), output);
  }

  // repeated string regularizer_name = 10;
  for (int i = 0; i < this->regularizer_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->regularizer_name(i).data(), this->regularizer_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      10, this->regularizer_name(i), output);
  }

  // repeated double regularizer_tau = 11;
  for (int i = 0; i < this->regularizer_tau_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(
      11, this->regularizer_tau(i), output);
  }

  // repeated string class_id = 12;
  for (int i = 0; i < this->class_id_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->class_id(i).data(), this->class_id(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      12, this->class_id(i), output);
  }

  // repeated float class_weight = 13;
  for (int i = 0; i < this->class_weight_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      13, this->class_weight(i), output);
  }

  // optional bool use_sparse_bow = 14 [default = true];
  if (has_use_sparse_bow()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(14, this->use_sparse_bow(), output);
  }

  // optional bool use_random_theta = 15 [default = false];
  if (has_use_random_theta()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(15, this->use_random_theta(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ModelConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1 [default = "@model"];
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional int32 topics_count = 2 [default = 32];
  if (has_topics_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->topics_count(), target);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->topic_name(i), target);
  }

  // optional bool enabled = 4 [default = true];
  if (has_enabled()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->enabled(), target);
  }

  // optional int32 inner_iterations_count = 5 [default = 10];
  if (has_inner_iterations_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->inner_iterations_count(), target);
  }

  // optional string field_name = 6 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        6, this->field_name(), target);
  }

  // optional string stream_name = 7 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        7, this->stream_name(), target);
  }

  // repeated string score_name = 8;
  for (int i = 0; i < this->score_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->score_name(i).data(), this->score_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(8, this->score_name(i), target);
  }

  // optional bool reuse_theta = 9 [default = false];
  if (has_reuse_theta()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(9, this->reuse_theta(), target);
  }

  // repeated string regularizer_name = 10;
  for (int i = 0; i < this->regularizer_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->regularizer_name(i).data(), this->regularizer_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(10, this->regularizer_name(i), target);
  }

  // repeated double regularizer_tau = 11;
  for (int i = 0; i < this->regularizer_tau_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteDoubleToArray(11, this->regularizer_tau(i), target);
  }

  // repeated string class_id = 12;
  for (int i = 0; i < this->class_id_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id(i).data(), this->class_id(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(12, this->class_id(i), target);
  }

  // repeated float class_weight = 13;
  for (int i = 0; i < this->class_weight_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(13, this->class_weight(i), target);
  }

  // optional bool use_sparse_bow = 14 [default = true];
  if (has_use_sparse_bow()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(14, this->use_sparse_bow(), target);
  }

  // optional bool use_random_theta = 15 [default = false];
  if (has_use_random_theta()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(15, this->use_random_theta(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ModelConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1 [default = "@model"];
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional int32 topics_count = 2 [default = 32];
    if (has_topics_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->topics_count());
    }

    // optional bool enabled = 4 [default = true];
    if (has_enabled()) {
      total_size += 1 + 1;
    }

    // optional int32 inner_iterations_count = 5 [default = 10];
    if (has_inner_iterations_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->inner_iterations_count());
    }

    // optional string field_name = 6 [default = "@body"];
    if (has_field_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->field_name());
    }

    // optional string stream_name = 7 [default = "@global"];
    if (has_stream_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->stream_name());
    }

  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    // optional bool reuse_theta = 9 [default = false];
    if (has_reuse_theta()) {
      total_size += 1 + 1;
    }

    // optional bool use_sparse_bow = 14 [default = true];
    if (has_use_sparse_bow()) {
      total_size += 1 + 1;
    }

    // optional bool use_random_theta = 15 [default = false];
    if (has_use_random_theta()) {
      total_size += 1 + 1;
    }

  }
  // repeated string topic_name = 3;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  // repeated string score_name = 8;
  total_size += 1 * this->score_name_size();
  for (int i = 0; i < this->score_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->score_name(i));
  }

  // repeated string regularizer_name = 10;
  total_size += 1 * this->regularizer_name_size();
  for (int i = 0; i < this->regularizer_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->regularizer_name(i));
  }

  // repeated double regularizer_tau = 11;
  {
    int data_size = 0;
    data_size = 8 * this->regularizer_tau_size();
    total_size += 1 * this->regularizer_tau_size() + data_size;
  }

  // repeated string class_id = 12;
  total_size += 1 * this->class_id_size();
  for (int i = 0; i < this->class_id_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->class_id(i));
  }

  // repeated float class_weight = 13;
  {
    int data_size = 0;
    data_size = 4 * this->class_weight_size();
    total_size += 1 * this->class_weight_size() + data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ModelConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ModelConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ModelConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ModelConfig::MergeFrom(const ModelConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  score_name_.MergeFrom(from.score_name_);
  regularizer_name_.MergeFrom(from.regularizer_name_);
  regularizer_tau_.MergeFrom(from.regularizer_tau_);
  class_id_.MergeFrom(from.class_id_);
  class_weight_.MergeFrom(from.class_weight_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_topics_count()) {
      set_topics_count(from.topics_count());
    }
    if (from.has_enabled()) {
      set_enabled(from.enabled());
    }
    if (from.has_inner_iterations_count()) {
      set_inner_iterations_count(from.inner_iterations_count());
    }
    if (from.has_field_name()) {
      set_field_name(from.field_name());
    }
    if (from.has_stream_name()) {
      set_stream_name(from.stream_name());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_reuse_theta()) {
      set_reuse_theta(from.reuse_theta());
    }
    if (from.has_use_sparse_bow()) {
      set_use_sparse_bow(from.use_sparse_bow());
    }
    if (from.has_use_random_theta()) {
      set_use_random_theta(from.use_random_theta());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ModelConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ModelConfig::CopyFrom(const ModelConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ModelConfig::IsInitialized() const {

  return true;
}

void ModelConfig::Swap(ModelConfig* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    std::swap(topics_count_, other->topics_count_);
    topic_name_.Swap(&other->topic_name_);
    std::swap(enabled_, other->enabled_);
    std::swap(inner_iterations_count_, other->inner_iterations_count_);
    std::swap(field_name_, other->field_name_);
    std::swap(stream_name_, other->stream_name_);
    score_name_.Swap(&other->score_name_);
    std::swap(reuse_theta_, other->reuse_theta_);
    regularizer_name_.Swap(&other->regularizer_name_);
    regularizer_tau_.Swap(&other->regularizer_tau_);
    class_id_.Swap(&other->class_id_);
    class_weight_.Swap(&other->class_weight_);
    std::swap(use_sparse_bow_, other->use_sparse_bow_);
    std::swap(use_random_theta_, other->use_random_theta_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata ModelConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ModelConfig_descriptor_;
  metadata.reflection = ModelConfig_reflection_;
  return metadata;
}


// ===================================================================

const ::google::protobuf::EnumDescriptor* RegularizerConfig_Type_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return RegularizerConfig_Type_descriptor_;
}
bool RegularizerConfig_Type_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const RegularizerConfig_Type RegularizerConfig::SmoothSparseTheta;
const RegularizerConfig_Type RegularizerConfig::SmoothSparsePhi;
const RegularizerConfig_Type RegularizerConfig::DecorrelatorPhi;
const RegularizerConfig_Type RegularizerConfig::MultiLanguagePhi;
const RegularizerConfig_Type RegularizerConfig::Type_MIN;
const RegularizerConfig_Type RegularizerConfig::Type_MAX;
const int RegularizerConfig::Type_ARRAYSIZE;
#endif  // _MSC_VER
#ifndef _MSC_VER
const int RegularizerConfig::kNameFieldNumber;
const int RegularizerConfig::kTypeFieldNumber;
const int RegularizerConfig::kConfigFieldNumber;
#endif  // !_MSC_VER

RegularizerConfig::RegularizerConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void RegularizerConfig::InitAsDefaultInstance() {
}

RegularizerConfig::RegularizerConfig(const RegularizerConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void RegularizerConfig::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  type_ = 0;
  config_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

RegularizerConfig::~RegularizerConfig() {
  SharedDtor();
}

void RegularizerConfig::SharedDtor() {
  if (name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete name_;
  }
  if (config_ != &::google::protobuf::internal::GetEmptyString()) {
    delete config_;
  }
  if (this != default_instance_) {
  }
}

void RegularizerConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* RegularizerConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return RegularizerConfig_descriptor_;
}

const RegularizerConfig& RegularizerConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

RegularizerConfig* RegularizerConfig::default_instance_ = NULL;

RegularizerConfig* RegularizerConfig::New() const {
  return new RegularizerConfig;
}

void RegularizerConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != &::google::protobuf::internal::GetEmptyString()) {
        name_->clear();
      }
    }
    type_ = 0;
    if (has_config()) {
      if (config_ != &::google::protobuf::internal::GetEmptyString()) {
        config_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool RegularizerConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_type;
        break;
      }

      // optional .artm.RegularizerConfig.Type type = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::artm::RegularizerConfig_Type_IsValid(value)) {
            set_type(static_cast< ::artm::RegularizerConfig_Type >(value));
          } else {
            mutable_unknown_fields()->AddVarint(2, value);
          }
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_config;
        break;
      }

      // optional bytes config = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_config:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_config()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void RegularizerConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }

  // optional .artm.RegularizerConfig.Type type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->type(), output);
  }

  // optional bytes config = 3;
  if (has_config()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      3, this->config(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* RegularizerConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional .artm.RegularizerConfig.Type type = 2;
  if (has_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->type(), target);
  }

  // optional bytes config = 3;
  if (has_config()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        3, this->config(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int RegularizerConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional .artm.RegularizerConfig.Type type = 2;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
    }

    // optional bytes config = 3;
    if (has_config()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->config());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void RegularizerConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const RegularizerConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const RegularizerConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void RegularizerConfig::MergeFrom(const RegularizerConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_type()) {
      set_type(from.type());
    }
    if (from.has_config()) {
      set_config(from.config());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void RegularizerConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RegularizerConfig::CopyFrom(const RegularizerConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RegularizerConfig::IsInitialized() const {

  return true;
}

void RegularizerConfig::Swap(RegularizerConfig* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    std::swap(type_, other->type_);
    std::swap(config_, other->config_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata RegularizerConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = RegularizerConfig_descriptor_;
  metadata.reflection = RegularizerConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int SmoothSparseThetaConfig::kTopicNameFieldNumber;
const int SmoothSparseThetaConfig::kAlphaIterFieldNumber;
#endif  // !_MSC_VER

SmoothSparseThetaConfig::SmoothSparseThetaConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void SmoothSparseThetaConfig::InitAsDefaultInstance() {
}

SmoothSparseThetaConfig::SmoothSparseThetaConfig(const SmoothSparseThetaConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void SmoothSparseThetaConfig::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

SmoothSparseThetaConfig::~SmoothSparseThetaConfig() {
  SharedDtor();
}

void SmoothSparseThetaConfig::SharedDtor() {
  if (this != default_instance_) {
  }
}

void SmoothSparseThetaConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SmoothSparseThetaConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SmoothSparseThetaConfig_descriptor_;
}

const SmoothSparseThetaConfig& SmoothSparseThetaConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

SmoothSparseThetaConfig* SmoothSparseThetaConfig::default_instance_ = NULL;

SmoothSparseThetaConfig* SmoothSparseThetaConfig::New() const {
  return new SmoothSparseThetaConfig;
}

void SmoothSparseThetaConfig::Clear() {
  topic_name_.Clear();
  alpha_iter_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool SmoothSparseThetaConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string topic_name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_topic_name;
        if (input->ExpectTag(21)) goto parse_alpha_iter;
        break;
      }

      // repeated float alpha_iter = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_alpha_iter:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 21, input, this->mutable_alpha_iter())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_alpha_iter())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(21)) goto parse_alpha_iter;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void SmoothSparseThetaConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated string topic_name = 1;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->topic_name(i), output);
  }

  // repeated float alpha_iter = 2;
  for (int i = 0; i < this->alpha_iter_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      2, this->alpha_iter(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* SmoothSparseThetaConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated string topic_name = 1;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1, this->topic_name(i), target);
  }

  // repeated float alpha_iter = 2;
  for (int i = 0; i < this->alpha_iter_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(2, this->alpha_iter(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int SmoothSparseThetaConfig::ByteSize() const {
  int total_size = 0;

  // repeated string topic_name = 1;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  // repeated float alpha_iter = 2;
  {
    int data_size = 0;
    data_size = 4 * this->alpha_iter_size();
    total_size += 1 * this->alpha_iter_size() + data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SmoothSparseThetaConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const SmoothSparseThetaConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const SmoothSparseThetaConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void SmoothSparseThetaConfig::MergeFrom(const SmoothSparseThetaConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  alpha_iter_.MergeFrom(from.alpha_iter_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void SmoothSparseThetaConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void SmoothSparseThetaConfig::CopyFrom(const SmoothSparseThetaConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SmoothSparseThetaConfig::IsInitialized() const {

  return true;
}

void SmoothSparseThetaConfig::Swap(SmoothSparseThetaConfig* other) {
  if (other != this) {
    topic_name_.Swap(&other->topic_name_);
    alpha_iter_.Swap(&other->alpha_iter_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata SmoothSparseThetaConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SmoothSparseThetaConfig_descriptor_;
  metadata.reflection = SmoothSparseThetaConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int SmoothSparsePhiConfig::kTopicNameFieldNumber;
const int SmoothSparsePhiConfig::kClassIdFieldNumber;
const int SmoothSparsePhiConfig::kDictionaryNameFieldNumber;
#endif  // !_MSC_VER

SmoothSparsePhiConfig::SmoothSparsePhiConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void SmoothSparsePhiConfig::InitAsDefaultInstance() {
}

SmoothSparsePhiConfig::SmoothSparsePhiConfig(const SmoothSparsePhiConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void SmoothSparsePhiConfig::SharedCtor() {
  _cached_size_ = 0;
  dictionary_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

SmoothSparsePhiConfig::~SmoothSparsePhiConfig() {
  SharedDtor();
}

void SmoothSparsePhiConfig::SharedDtor() {
  if (dictionary_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete dictionary_name_;
  }
  if (this != default_instance_) {
  }
}

void SmoothSparsePhiConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SmoothSparsePhiConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SmoothSparsePhiConfig_descriptor_;
}

const SmoothSparsePhiConfig& SmoothSparsePhiConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

SmoothSparsePhiConfig* SmoothSparsePhiConfig::default_instance_ = NULL;

SmoothSparsePhiConfig* SmoothSparsePhiConfig::New() const {
  return new SmoothSparsePhiConfig;
}

void SmoothSparsePhiConfig::Clear() {
  if (_has_bits_[2 / 32] & (0xffu << (2 % 32))) {
    if (has_dictionary_name()) {
      if (dictionary_name_ != &::google::protobuf::internal::GetEmptyString()) {
        dictionary_name_->clear();
      }
    }
  }
  topic_name_.Clear();
  class_id_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool SmoothSparsePhiConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string topic_name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_topic_name;
        if (input->ExpectTag(18)) goto parse_class_id;
        break;
      }

      // repeated string class_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id(this->class_id_size() - 1).data(),
            this->class_id(this->class_id_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_class_id;
        if (input->ExpectTag(26)) goto parse_dictionary_name;
        break;
      }

      // optional string dictionary_name = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_dictionary_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_dictionary_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->dictionary_name().data(), this->dictionary_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void SmoothSparsePhiConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated string topic_name = 1;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->topic_name(i), output);
  }

  // repeated string class_id = 2;
  for (int i = 0; i < this->class_id_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->class_id(i).data(), this->class_id(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->class_id(i), output);
  }

  // optional string dictionary_name = 3;
  if (has_dictionary_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->dictionary_name().data(), this->dictionary_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->dictionary_name(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* SmoothSparsePhiConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated string topic_name = 1;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1, this->topic_name(i), target);
  }

  // repeated string class_id = 2;
  for (int i = 0; i < this->class_id_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id(i).data(), this->class_id(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->class_id(i), target);
  }

  // optional string dictionary_name = 3;
  if (has_dictionary_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->dictionary_name().data(), this->dictionary_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->dictionary_name(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int SmoothSparsePhiConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[2 / 32] & (0xffu << (2 % 32))) {
    // optional string dictionary_name = 3;
    if (has_dictionary_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->dictionary_name());
    }

  }
  // repeated string topic_name = 1;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  // repeated string class_id = 2;
  total_size += 1 * this->class_id_size();
  for (int i = 0; i < this->class_id_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->class_id(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SmoothSparsePhiConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const SmoothSparsePhiConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const SmoothSparsePhiConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void SmoothSparsePhiConfig::MergeFrom(const SmoothSparsePhiConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  class_id_.MergeFrom(from.class_id_);
  if (from._has_bits_[2 / 32] & (0xffu << (2 % 32))) {
    if (from.has_dictionary_name()) {
      set_dictionary_name(from.dictionary_name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void SmoothSparsePhiConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void SmoothSparsePhiConfig::CopyFrom(const SmoothSparsePhiConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SmoothSparsePhiConfig::IsInitialized() const {

  return true;
}

void SmoothSparsePhiConfig::Swap(SmoothSparsePhiConfig* other) {
  if (other != this) {
    topic_name_.Swap(&other->topic_name_);
    class_id_.Swap(&other->class_id_);
    std::swap(dictionary_name_, other->dictionary_name_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata SmoothSparsePhiConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SmoothSparsePhiConfig_descriptor_;
  metadata.reflection = SmoothSparsePhiConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int DecorrelatorPhiConfig::kTopicNameFieldNumber;
const int DecorrelatorPhiConfig::kClassIdFieldNumber;
#endif  // !_MSC_VER

DecorrelatorPhiConfig::DecorrelatorPhiConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void DecorrelatorPhiConfig::InitAsDefaultInstance() {
}

DecorrelatorPhiConfig::DecorrelatorPhiConfig(const DecorrelatorPhiConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void DecorrelatorPhiConfig::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

DecorrelatorPhiConfig::~DecorrelatorPhiConfig() {
  SharedDtor();
}

void DecorrelatorPhiConfig::SharedDtor() {
  if (this != default_instance_) {
  }
}

void DecorrelatorPhiConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DecorrelatorPhiConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DecorrelatorPhiConfig_descriptor_;
}

const DecorrelatorPhiConfig& DecorrelatorPhiConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

DecorrelatorPhiConfig* DecorrelatorPhiConfig::default_instance_ = NULL;

DecorrelatorPhiConfig* DecorrelatorPhiConfig::New() const {
  return new DecorrelatorPhiConfig;
}

void DecorrelatorPhiConfig::Clear() {
  topic_name_.Clear();
  class_id_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool DecorrelatorPhiConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string topic_name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_topic_name;
        if (input->ExpectTag(18)) goto parse_class_id;
        break;
      }

      // repeated string class_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id(this->class_id_size() - 1).data(),
            this->class_id(this->class_id_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_class_id;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void DecorrelatorPhiConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated string topic_name = 1;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->topic_name(i), output);
  }

  // repeated string class_id = 2;
  for (int i = 0; i < this->class_id_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->class_id(i).data(), this->class_id(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->class_id(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* DecorrelatorPhiConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated string topic_name = 1;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1, this->topic_name(i), target);
  }

  // repeated string class_id = 2;
  for (int i = 0; i < this->class_id_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id(i).data(), this->class_id(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->class_id(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int DecorrelatorPhiConfig::ByteSize() const {
  int total_size = 0;

  // repeated string topic_name = 1;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  // repeated string class_id = 2;
  total_size += 1 * this->class_id_size();
  for (int i = 0; i < this->class_id_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->class_id(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DecorrelatorPhiConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const DecorrelatorPhiConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const DecorrelatorPhiConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void DecorrelatorPhiConfig::MergeFrom(const DecorrelatorPhiConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  class_id_.MergeFrom(from.class_id_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void DecorrelatorPhiConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DecorrelatorPhiConfig::CopyFrom(const DecorrelatorPhiConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DecorrelatorPhiConfig::IsInitialized() const {

  return true;
}

void DecorrelatorPhiConfig::Swap(DecorrelatorPhiConfig* other) {
  if (other != this) {
    topic_name_.Swap(&other->topic_name_);
    class_id_.Swap(&other->class_id_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata DecorrelatorPhiConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DecorrelatorPhiConfig_descriptor_;
  metadata.reflection = DecorrelatorPhiConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
#endif  // !_MSC_VER

MultiLanguagePhiConfig::MultiLanguagePhiConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void MultiLanguagePhiConfig::InitAsDefaultInstance() {
}

MultiLanguagePhiConfig::MultiLanguagePhiConfig(const MultiLanguagePhiConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void MultiLanguagePhiConfig::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

MultiLanguagePhiConfig::~MultiLanguagePhiConfig() {
  SharedDtor();
}

void MultiLanguagePhiConfig::SharedDtor() {
  if (this != default_instance_) {
  }
}

void MultiLanguagePhiConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* MultiLanguagePhiConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return MultiLanguagePhiConfig_descriptor_;
}

const MultiLanguagePhiConfig& MultiLanguagePhiConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

MultiLanguagePhiConfig* MultiLanguagePhiConfig::default_instance_ = NULL;

MultiLanguagePhiConfig* MultiLanguagePhiConfig::New() const {
  return new MultiLanguagePhiConfig;
}

void MultiLanguagePhiConfig::Clear() {
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool MultiLanguagePhiConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
        ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
      return true;
    }
    DO_(::google::protobuf::internal::WireFormat::SkipField(
          input, tag, mutable_unknown_fields()));
  }
  return true;
#undef DO_
}

void MultiLanguagePhiConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* MultiLanguagePhiConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int MultiLanguagePhiConfig::ByteSize() const {
  int total_size = 0;

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void MultiLanguagePhiConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const MultiLanguagePhiConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const MultiLanguagePhiConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void MultiLanguagePhiConfig::MergeFrom(const MultiLanguagePhiConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void MultiLanguagePhiConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void MultiLanguagePhiConfig::CopyFrom(const MultiLanguagePhiConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool MultiLanguagePhiConfig::IsInitialized() const {

  return true;
}

void MultiLanguagePhiConfig::Swap(MultiLanguagePhiConfig* other) {
  if (other != this) {
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata MultiLanguagePhiConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = MultiLanguagePhiConfig_descriptor_;
  metadata.reflection = MultiLanguagePhiConfig_reflection_;
  return metadata;
}


// ===================================================================

const ::google::protobuf::EnumDescriptor* RegularizerInternalState_Type_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return RegularizerInternalState_Type_descriptor_;
}
bool RegularizerInternalState_Type_IsValid(int value) {
  switch(value) {
    case 3:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const RegularizerInternalState_Type RegularizerInternalState::MultiLanguagePhi;
const RegularizerInternalState_Type RegularizerInternalState::Type_MIN;
const RegularizerInternalState_Type RegularizerInternalState::Type_MAX;
const int RegularizerInternalState::Type_ARRAYSIZE;
#endif  // _MSC_VER
#ifndef _MSC_VER
const int RegularizerInternalState::kNameFieldNumber;
const int RegularizerInternalState::kTypeFieldNumber;
const int RegularizerInternalState::kDataFieldNumber;
#endif  // !_MSC_VER

RegularizerInternalState::RegularizerInternalState()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void RegularizerInternalState::InitAsDefaultInstance() {
}

RegularizerInternalState::RegularizerInternalState(const RegularizerInternalState& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void RegularizerInternalState::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  type_ = 3;
  data_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

RegularizerInternalState::~RegularizerInternalState() {
  SharedDtor();
}

void RegularizerInternalState::SharedDtor() {
  if (name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete name_;
  }
  if (data_ != &::google::protobuf::internal::GetEmptyString()) {
    delete data_;
  }
  if (this != default_instance_) {
  }
}

void RegularizerInternalState::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* RegularizerInternalState::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return RegularizerInternalState_descriptor_;
}

const RegularizerInternalState& RegularizerInternalState::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

RegularizerInternalState* RegularizerInternalState::default_instance_ = NULL;

RegularizerInternalState* RegularizerInternalState::New() const {
  return new RegularizerInternalState;
}

void RegularizerInternalState::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != &::google::protobuf::internal::GetEmptyString()) {
        name_->clear();
      }
    }
    type_ = 3;
    if (has_data()) {
      if (data_ != &::google::protobuf::internal::GetEmptyString()) {
        data_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool RegularizerInternalState::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_type;
        break;
      }

      // optional .artm.RegularizerInternalState.Type type = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::artm::RegularizerInternalState_Type_IsValid(value)) {
            set_type(static_cast< ::artm::RegularizerInternalState_Type >(value));
          } else {
            mutable_unknown_fields()->AddVarint(2, value);
          }
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_data;
        break;
      }

      // optional bytes data = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_data:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_data()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void RegularizerInternalState::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }

  // optional .artm.RegularizerInternalState.Type type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->type(), output);
  }

  // optional bytes data = 3;
  if (has_data()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      3, this->data(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* RegularizerInternalState::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional .artm.RegularizerInternalState.Type type = 2;
  if (has_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->type(), target);
  }

  // optional bytes data = 3;
  if (has_data()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        3, this->data(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int RegularizerInternalState::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional .artm.RegularizerInternalState.Type type = 2;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
    }

    // optional bytes data = 3;
    if (has_data()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->data());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void RegularizerInternalState::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const RegularizerInternalState* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const RegularizerInternalState*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void RegularizerInternalState::MergeFrom(const RegularizerInternalState& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_type()) {
      set_type(from.type());
    }
    if (from.has_data()) {
      set_data(from.data());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void RegularizerInternalState::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RegularizerInternalState::CopyFrom(const RegularizerInternalState& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RegularizerInternalState::IsInitialized() const {

  return true;
}

void RegularizerInternalState::Swap(RegularizerInternalState* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    std::swap(type_, other->type_);
    std::swap(data_, other->data_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata RegularizerInternalState::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = RegularizerInternalState_descriptor_;
  metadata.reflection = RegularizerInternalState_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int MultiLanguagePhiInternalState::kNoRegularizationCallsFieldNumber;
#endif  // !_MSC_VER

MultiLanguagePhiInternalState::MultiLanguagePhiInternalState()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void MultiLanguagePhiInternalState::InitAsDefaultInstance() {
}

MultiLanguagePhiInternalState::MultiLanguagePhiInternalState(const MultiLanguagePhiInternalState& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void MultiLanguagePhiInternalState::SharedCtor() {
  _cached_size_ = 0;
  no_regularization_calls_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

MultiLanguagePhiInternalState::~MultiLanguagePhiInternalState() {
  SharedDtor();
}

void MultiLanguagePhiInternalState::SharedDtor() {
  if (this != default_instance_) {
  }
}

void MultiLanguagePhiInternalState::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* MultiLanguagePhiInternalState::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return MultiLanguagePhiInternalState_descriptor_;
}

const MultiLanguagePhiInternalState& MultiLanguagePhiInternalState::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

MultiLanguagePhiInternalState* MultiLanguagePhiInternalState::default_instance_ = NULL;

MultiLanguagePhiInternalState* MultiLanguagePhiInternalState::New() const {
  return new MultiLanguagePhiInternalState;
}

void MultiLanguagePhiInternalState::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    no_regularization_calls_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool MultiLanguagePhiInternalState::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 no_regularization_calls = 1 [default = 0];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &no_regularization_calls_)));
          set_has_no_regularization_calls();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void MultiLanguagePhiInternalState::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional int32 no_regularization_calls = 1 [default = 0];
  if (has_no_regularization_calls()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->no_regularization_calls(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* MultiLanguagePhiInternalState::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 no_regularization_calls = 1 [default = 0];
  if (has_no_regularization_calls()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->no_regularization_calls(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int MultiLanguagePhiInternalState::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 no_regularization_calls = 1 [default = 0];
    if (has_no_regularization_calls()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->no_regularization_calls());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void MultiLanguagePhiInternalState::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const MultiLanguagePhiInternalState* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const MultiLanguagePhiInternalState*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void MultiLanguagePhiInternalState::MergeFrom(const MultiLanguagePhiInternalState& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_no_regularization_calls()) {
      set_no_regularization_calls(from.no_regularization_calls());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void MultiLanguagePhiInternalState::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void MultiLanguagePhiInternalState::CopyFrom(const MultiLanguagePhiInternalState& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool MultiLanguagePhiInternalState::IsInitialized() const {

  return true;
}

void MultiLanguagePhiInternalState::Swap(MultiLanguagePhiInternalState* other) {
  if (other != this) {
    std::swap(no_regularization_calls_, other->no_regularization_calls_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata MultiLanguagePhiInternalState::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = MultiLanguagePhiInternalState_descriptor_;
  metadata.reflection = MultiLanguagePhiInternalState_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int DictionaryConfig::kNameFieldNumber;
const int DictionaryConfig::kEntryFieldNumber;
const int DictionaryConfig::kTotalTokenCountFieldNumber;
const int DictionaryConfig::kTotalItemsCountFieldNumber;
#endif  // !_MSC_VER

DictionaryConfig::DictionaryConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void DictionaryConfig::InitAsDefaultInstance() {
}

DictionaryConfig::DictionaryConfig(const DictionaryConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void DictionaryConfig::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  total_token_count_ = 0;
  total_items_count_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

DictionaryConfig::~DictionaryConfig() {
  SharedDtor();
}

void DictionaryConfig::SharedDtor() {
  if (name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete name_;
  }
  if (this != default_instance_) {
  }
}

void DictionaryConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DictionaryConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DictionaryConfig_descriptor_;
}

const DictionaryConfig& DictionaryConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

DictionaryConfig* DictionaryConfig::default_instance_ = NULL;

DictionaryConfig* DictionaryConfig::New() const {
  return new DictionaryConfig;
}

void DictionaryConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != &::google::protobuf::internal::GetEmptyString()) {
        name_->clear();
      }
    }
    total_token_count_ = 0;
    total_items_count_ = 0;
  }
  entry_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool DictionaryConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_entry;
        break;
      }

      // repeated .artm.DictionaryEntry entry = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_entry:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_entry()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_entry;
        if (input->ExpectTag(24)) goto parse_total_token_count;
        break;
      }

      // optional int32 total_token_count = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_total_token_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &total_token_count_)));
          set_has_total_token_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(32)) goto parse_total_items_count;
        break;
      }

      // optional int32 total_items_count = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_total_items_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &total_items_count_)));
          set_has_total_items_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void DictionaryConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }

  // repeated .artm.DictionaryEntry entry = 2;
  for (int i = 0; i < this->entry_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->entry(i), output);
  }

  // optional int32 total_token_count = 3;
  if (has_total_token_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->total_token_count(), output);
  }

  // optional int32 total_items_count = 4;
  if (has_total_items_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->total_items_count(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* DictionaryConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // repeated .artm.DictionaryEntry entry = 2;
  for (int i = 0; i < this->entry_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        2, this->entry(i), target);
  }

  // optional int32 total_token_count = 3;
  if (has_total_token_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->total_token_count(), target);
  }

  // optional int32 total_items_count = 4;
  if (has_total_items_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->total_items_count(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int DictionaryConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional int32 total_token_count = 3;
    if (has_total_token_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->total_token_count());
    }

    // optional int32 total_items_count = 4;
    if (has_total_items_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->total_items_count());
    }

  }
  // repeated .artm.DictionaryEntry entry = 2;
  total_size += 1 * this->entry_size();
  for (int i = 0; i < this->entry_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->entry(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DictionaryConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const DictionaryConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const DictionaryConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void DictionaryConfig::MergeFrom(const DictionaryConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  entry_.MergeFrom(from.entry_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_total_token_count()) {
      set_total_token_count(from.total_token_count());
    }
    if (from.has_total_items_count()) {
      set_total_items_count(from.total_items_count());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void DictionaryConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DictionaryConfig::CopyFrom(const DictionaryConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DictionaryConfig::IsInitialized() const {

  return true;
}

void DictionaryConfig::Swap(DictionaryConfig* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    entry_.Swap(&other->entry_);
    std::swap(total_token_count_, other->total_token_count_);
    std::swap(total_items_count_, other->total_items_count_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata DictionaryConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DictionaryConfig_descriptor_;
  metadata.reflection = DictionaryConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int DictionaryEntry::kKeyTokenFieldNumber;
const int DictionaryEntry::kClassIdFieldNumber;
const int DictionaryEntry::kValueFieldNumber;
const int DictionaryEntry::kValueTokensFieldNumber;
const int DictionaryEntry::kValuesFieldNumber;
const int DictionaryEntry::kTokenCountFieldNumber;
const int DictionaryEntry::kItemsCountFieldNumber;
#endif  // !_MSC_VER

DictionaryEntry::DictionaryEntry()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void DictionaryEntry::InitAsDefaultInstance() {
  values_ = const_cast< ::artm::FloatArray*>(&::artm::FloatArray::default_instance());
}

DictionaryEntry::DictionaryEntry(const DictionaryEntry& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void DictionaryEntry::SharedCtor() {
  _cached_size_ = 0;
  key_token_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  class_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  value_ = 0;
  values_ = NULL;
  token_count_ = 0;
  items_count_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

DictionaryEntry::~DictionaryEntry() {
  SharedDtor();
}

void DictionaryEntry::SharedDtor() {
  if (key_token_ != &::google::protobuf::internal::GetEmptyString()) {
    delete key_token_;
  }
  if (class_id_ != &::google::protobuf::internal::GetEmptyString()) {
    delete class_id_;
  }
  if (this != default_instance_) {
    delete values_;
  }
}

void DictionaryEntry::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DictionaryEntry::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DictionaryEntry_descriptor_;
}

const DictionaryEntry& DictionaryEntry::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

DictionaryEntry* DictionaryEntry::default_instance_ = NULL;

DictionaryEntry* DictionaryEntry::New() const {
  return new DictionaryEntry;
}

void DictionaryEntry::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_key_token()) {
      if (key_token_ != &::google::protobuf::internal::GetEmptyString()) {
        key_token_->clear();
      }
    }
    if (has_class_id()) {
      if (class_id_ != &::google::protobuf::internal::GetEmptyString()) {
        class_id_->clear();
      }
    }
    value_ = 0;
    if (has_values()) {
      if (values_ != NULL) values_->::artm::FloatArray::Clear();
    }
    token_count_ = 0;
    items_count_ = 0;
  }
  value_tokens_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool DictionaryEntry::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string key_token = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_key_token()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->key_token().data(), this->key_token().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_class_id;
        break;
      }

      // optional string class_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id().data(), this->class_id().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(29)) goto parse_value;
        break;
      }

      // optional float value = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_value:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &value_)));
          set_has_value();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_value_tokens;
        break;
      }

      // repeated string value_tokens = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_value_tokens:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_value_tokens()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->value_tokens(this->value_tokens_size() - 1).data(),
            this->value_tokens(this->value_tokens_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_value_tokens;
        if (input->ExpectTag(42)) goto parse_values;
        break;
      }

      // optional .artm.FloatArray values = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_values:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_values()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(48)) goto parse_token_count;
        break;
      }

      // optional int32 token_count = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_token_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &token_count_)));
          set_has_token_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(56)) goto parse_items_count;
        break;
      }

      // optional int32 items_count = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_items_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &items_count_)));
          set_has_items_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void DictionaryEntry::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string key_token = 1;
  if (has_key_token()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->key_token().data(), this->key_token().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->key_token(), output);
  }

  // optional string class_id = 2;
  if (has_class_id()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id().data(), this->class_id().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->class_id(), output);
  }

  // optional float value = 3;
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->value(), output);
  }

  // repeated string value_tokens = 4;
  for (int i = 0; i < this->value_tokens_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->value_tokens(i).data(), this->value_tokens(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->value_tokens(i), output);
  }

  // optional .artm.FloatArray values = 5;
  if (has_values()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->values(), output);
  }

  // optional int32 token_count = 6;
  if (has_token_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->token_count(), output);
  }

  // optional int32 items_count = 7;
  if (has_items_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->items_count(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* DictionaryEntry::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string key_token = 1;
  if (has_key_token()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->key_token().data(), this->key_token().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->key_token(), target);
  }

  // optional string class_id = 2;
  if (has_class_id()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id().data(), this->class_id().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->class_id(), target);
  }

  // optional float value = 3;
  if (has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->value(), target);
  }

  // repeated string value_tokens = 4;
  for (int i = 0; i < this->value_tokens_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->value_tokens(i).data(), this->value_tokens(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->value_tokens(i), target);
  }

  // optional .artm.FloatArray values = 5;
  if (has_values()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        5, this->values(), target);
  }

  // optional int32 token_count = 6;
  if (has_token_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->token_count(), target);
  }

  // optional int32 items_count = 7;
  if (has_items_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->items_count(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int DictionaryEntry::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string key_token = 1;
    if (has_key_token()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->key_token());
    }

    // optional string class_id = 2;
    if (has_class_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->class_id());
    }

    // optional float value = 3;
    if (has_value()) {
      total_size += 1 + 4;
    }

    // optional .artm.FloatArray values = 5;
    if (has_values()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->values());
    }

    // optional int32 token_count = 6;
    if (has_token_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->token_count());
    }

    // optional int32 items_count = 7;
    if (has_items_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->items_count());
    }

  }
  // repeated string value_tokens = 4;
  total_size += 1 * this->value_tokens_size();
  for (int i = 0; i < this->value_tokens_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->value_tokens(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DictionaryEntry::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const DictionaryEntry* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const DictionaryEntry*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void DictionaryEntry::MergeFrom(const DictionaryEntry& from) {
  GOOGLE_CHECK_NE(&from, this);
  value_tokens_.MergeFrom(from.value_tokens_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_key_token()) {
      set_key_token(from.key_token());
    }
    if (from.has_class_id()) {
      set_class_id(from.class_id());
    }
    if (from.has_value()) {
      set_value(from.value());
    }
    if (from.has_values()) {
      mutable_values()->::artm::FloatArray::MergeFrom(from.values());
    }
    if (from.has_token_count()) {
      set_token_count(from.token_count());
    }
    if (from.has_items_count()) {
      set_items_count(from.items_count());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void DictionaryEntry::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DictionaryEntry::CopyFrom(const DictionaryEntry& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DictionaryEntry::IsInitialized() const {

  return true;
}

void DictionaryEntry::Swap(DictionaryEntry* other) {
  if (other != this) {
    std::swap(key_token_, other->key_token_);
    std::swap(class_id_, other->class_id_);
    std::swap(value_, other->value_);
    value_tokens_.Swap(&other->value_tokens_);
    std::swap(values_, other->values_);
    std::swap(token_count_, other->token_count_);
    std::swap(items_count_, other->items_count_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata DictionaryEntry::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DictionaryEntry_descriptor_;
  metadata.reflection = DictionaryEntry_reflection_;
  return metadata;
}


// ===================================================================

const ::google::protobuf::EnumDescriptor* ScoreConfig_Type_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ScoreConfig_Type_descriptor_;
}
bool ScoreConfig_Type_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const ScoreConfig_Type ScoreConfig::Perplexity;
const ScoreConfig_Type ScoreConfig::SparsityTheta;
const ScoreConfig_Type ScoreConfig::SparsityPhi;
const ScoreConfig_Type ScoreConfig::ItemsProcessed;
const ScoreConfig_Type ScoreConfig::TopTokens;
const ScoreConfig_Type ScoreConfig::ThetaSnippet;
const ScoreConfig_Type ScoreConfig::TopicKernel;
const ScoreConfig_Type ScoreConfig::Type_MIN;
const ScoreConfig_Type ScoreConfig::Type_MAX;
const int ScoreConfig::Type_ARRAYSIZE;
#endif  // _MSC_VER
#ifndef _MSC_VER
const int ScoreConfig::kNameFieldNumber;
const int ScoreConfig::kTypeFieldNumber;
const int ScoreConfig::kConfigFieldNumber;
#endif  // !_MSC_VER

ScoreConfig::ScoreConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ScoreConfig::InitAsDefaultInstance() {
}

ScoreConfig::ScoreConfig(const ScoreConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ScoreConfig::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  type_ = 0;
  config_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ScoreConfig::~ScoreConfig() {
  SharedDtor();
}

void ScoreConfig::SharedDtor() {
  if (name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete name_;
  }
  if (config_ != &::google::protobuf::internal::GetEmptyString()) {
    delete config_;
  }
  if (this != default_instance_) {
  }
}

void ScoreConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ScoreConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ScoreConfig_descriptor_;
}

const ScoreConfig& ScoreConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

ScoreConfig* ScoreConfig::default_instance_ = NULL;

ScoreConfig* ScoreConfig::New() const {
  return new ScoreConfig;
}

void ScoreConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != &::google::protobuf::internal::GetEmptyString()) {
        name_->clear();
      }
    }
    type_ = 0;
    if (has_config()) {
      if (config_ != &::google::protobuf::internal::GetEmptyString()) {
        config_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ScoreConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_type;
        break;
      }

      // optional .artm.ScoreConfig.Type type = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::artm::ScoreConfig_Type_IsValid(value)) {
            set_type(static_cast< ::artm::ScoreConfig_Type >(value));
          } else {
            mutable_unknown_fields()->AddVarint(2, value);
          }
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_config;
        break;
      }

      // optional bytes config = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_config:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_config()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ScoreConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }

  // optional .artm.ScoreConfig.Type type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->type(), output);
  }

  // optional bytes config = 3;
  if (has_config()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      3, this->config(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ScoreConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional .artm.ScoreConfig.Type type = 2;
  if (has_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->type(), target);
  }

  // optional bytes config = 3;
  if (has_config()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        3, this->config(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ScoreConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional .artm.ScoreConfig.Type type = 2;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
    }

    // optional bytes config = 3;
    if (has_config()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->config());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ScoreConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ScoreConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ScoreConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ScoreConfig::MergeFrom(const ScoreConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_type()) {
      set_type(from.type());
    }
    if (from.has_config()) {
      set_config(from.config());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ScoreConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ScoreConfig::CopyFrom(const ScoreConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ScoreConfig::IsInitialized() const {

  return true;
}

void ScoreConfig::Swap(ScoreConfig* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    std::swap(type_, other->type_);
    std::swap(config_, other->config_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata ScoreConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ScoreConfig_descriptor_;
  metadata.reflection = ScoreConfig_reflection_;
  return metadata;
}


// ===================================================================

const ::google::protobuf::EnumDescriptor* ScoreData_Type_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ScoreData_Type_descriptor_;
}
bool ScoreData_Type_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const ScoreData_Type ScoreData::Perplexity;
const ScoreData_Type ScoreData::SparsityTheta;
const ScoreData_Type ScoreData::SparsityPhi;
const ScoreData_Type ScoreData::ItemsProcessed;
const ScoreData_Type ScoreData::TopTokens;
const ScoreData_Type ScoreData::ThetaSnippet;
const ScoreData_Type ScoreData::TopicKernel;
const ScoreData_Type ScoreData::Type_MIN;
const ScoreData_Type ScoreData::Type_MAX;
const int ScoreData::Type_ARRAYSIZE;
#endif  // _MSC_VER
#ifndef _MSC_VER
const int ScoreData::kNameFieldNumber;
const int ScoreData::kTypeFieldNumber;
const int ScoreData::kDataFieldNumber;
#endif  // !_MSC_VER

ScoreData::ScoreData()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ScoreData::InitAsDefaultInstance() {
}

ScoreData::ScoreData(const ScoreData& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ScoreData::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  type_ = 0;
  data_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ScoreData::~ScoreData() {
  SharedDtor();
}

void ScoreData::SharedDtor() {
  if (name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete name_;
  }
  if (data_ != &::google::protobuf::internal::GetEmptyString()) {
    delete data_;
  }
  if (this != default_instance_) {
  }
}

void ScoreData::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ScoreData::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ScoreData_descriptor_;
}

const ScoreData& ScoreData::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

ScoreData* ScoreData::default_instance_ = NULL;

ScoreData* ScoreData::New() const {
  return new ScoreData;
}

void ScoreData::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != &::google::protobuf::internal::GetEmptyString()) {
        name_->clear();
      }
    }
    type_ = 0;
    if (has_data()) {
      if (data_ != &::google::protobuf::internal::GetEmptyString()) {
        data_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ScoreData::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_type;
        break;
      }

      // optional .artm.ScoreData.Type type = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::artm::ScoreData_Type_IsValid(value)) {
            set_type(static_cast< ::artm::ScoreData_Type >(value));
          } else {
            mutable_unknown_fields()->AddVarint(2, value);
          }
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_data;
        break;
      }

      // optional bytes data = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_data:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_data()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ScoreData::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }

  // optional .artm.ScoreData.Type type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->type(), output);
  }

  // optional bytes data = 3;
  if (has_data()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      3, this->data(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ScoreData::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional .artm.ScoreData.Type type = 2;
  if (has_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->type(), target);
  }

  // optional bytes data = 3;
  if (has_data()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        3, this->data(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ScoreData::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional .artm.ScoreData.Type type = 2;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
    }

    // optional bytes data = 3;
    if (has_data()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->data());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ScoreData::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ScoreData* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ScoreData*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ScoreData::MergeFrom(const ScoreData& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_type()) {
      set_type(from.type());
    }
    if (from.has_data()) {
      set_data(from.data());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ScoreData::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ScoreData::CopyFrom(const ScoreData& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ScoreData::IsInitialized() const {

  return true;
}

void ScoreData::Swap(ScoreData* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    std::swap(type_, other->type_);
    std::swap(data_, other->data_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata ScoreData::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ScoreData_descriptor_;
  metadata.reflection = ScoreData_reflection_;
  return metadata;
}


// ===================================================================

const ::google::protobuf::EnumDescriptor* PerplexityScoreConfig_Type_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PerplexityScoreConfig_Type_descriptor_;
}
bool PerplexityScoreConfig_Type_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const PerplexityScoreConfig_Type PerplexityScoreConfig::UnigramDocumentModel;
const PerplexityScoreConfig_Type PerplexityScoreConfig::UnigramCollectionModel;
const PerplexityScoreConfig_Type PerplexityScoreConfig::Type_MIN;
const PerplexityScoreConfig_Type PerplexityScoreConfig::Type_MAX;
const int PerplexityScoreConfig::Type_ARRAYSIZE;
#endif  // _MSC_VER
::std::string* PerplexityScoreConfig::_default_field_name_ = NULL;
::std::string* PerplexityScoreConfig::_default_stream_name_ = NULL;
#ifndef _MSC_VER
const int PerplexityScoreConfig::kFieldNameFieldNumber;
const int PerplexityScoreConfig::kStreamNameFieldNumber;
const int PerplexityScoreConfig::kModelTypeFieldNumber;
const int PerplexityScoreConfig::kDictionaryNameFieldNumber;
#endif  // !_MSC_VER

PerplexityScoreConfig::PerplexityScoreConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void PerplexityScoreConfig::InitAsDefaultInstance() {
}

PerplexityScoreConfig::PerplexityScoreConfig(const PerplexityScoreConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void PerplexityScoreConfig::SharedCtor() {
  _cached_size_ = 0;
  field_name_ = const_cast< ::std::string*>(_default_field_name_);
  stream_name_ = const_cast< ::std::string*>(_default_stream_name_);
  model_type_ = 0;
  dictionary_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

PerplexityScoreConfig::~PerplexityScoreConfig() {
  SharedDtor();
}

void PerplexityScoreConfig::SharedDtor() {
  if (field_name_ != _default_field_name_) {
    delete field_name_;
  }
  if (stream_name_ != _default_stream_name_) {
    delete stream_name_;
  }
  if (dictionary_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete dictionary_name_;
  }
  if (this != default_instance_) {
  }
}

void PerplexityScoreConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PerplexityScoreConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PerplexityScoreConfig_descriptor_;
}

const PerplexityScoreConfig& PerplexityScoreConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

PerplexityScoreConfig* PerplexityScoreConfig::default_instance_ = NULL;

PerplexityScoreConfig* PerplexityScoreConfig::New() const {
  return new PerplexityScoreConfig;
}

void PerplexityScoreConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_field_name()) {
      if (field_name_ != _default_field_name_) {
        field_name_->assign(*_default_field_name_);
      }
    }
    if (has_stream_name()) {
      if (stream_name_ != _default_stream_name_) {
        stream_name_->assign(*_default_stream_name_);
      }
    }
    model_type_ = 0;
    if (has_dictionary_name()) {
      if (dictionary_name_ != &::google::protobuf::internal::GetEmptyString()) {
        dictionary_name_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool PerplexityScoreConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string field_name = 1 [default = "@body"];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_field_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->field_name().data(), this->field_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_stream_name;
        break;
      }

      // optional string stream_name = 2 [default = "@global"];
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_stream_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_stream_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->stream_name().data(), this->stream_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_model_type;
        break;
      }

      // optional .artm.PerplexityScoreConfig.Type model_type = 3 [default = UnigramDocumentModel];
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_model_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::artm::PerplexityScoreConfig_Type_IsValid(value)) {
            set_model_type(static_cast< ::artm::PerplexityScoreConfig_Type >(value));
          } else {
            mutable_unknown_fields()->AddVarint(3, value);
          }
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_dictionary_name;
        break;
      }

      // optional string dictionary_name = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_dictionary_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_dictionary_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->dictionary_name().data(), this->dictionary_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void PerplexityScoreConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string field_name = 1 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->field_name(), output);
  }

  // optional string stream_name = 2 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->stream_name(), output);
  }

  // optional .artm.PerplexityScoreConfig.Type model_type = 3 [default = UnigramDocumentModel];
  if (has_model_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      3, this->model_type(), output);
  }

  // optional string dictionary_name = 4;
  if (has_dictionary_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->dictionary_name().data(), this->dictionary_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->dictionary_name(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* PerplexityScoreConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string field_name = 1 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->field_name(), target);
  }

  // optional string stream_name = 2 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->stream_name(), target);
  }

  // optional .artm.PerplexityScoreConfig.Type model_type = 3 [default = UnigramDocumentModel];
  if (has_model_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      3, this->model_type(), target);
  }

  // optional string dictionary_name = 4;
  if (has_dictionary_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->dictionary_name().data(), this->dictionary_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->dictionary_name(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int PerplexityScoreConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string field_name = 1 [default = "@body"];
    if (has_field_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->field_name());
    }

    // optional string stream_name = 2 [default = "@global"];
    if (has_stream_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->stream_name());
    }

    // optional .artm.PerplexityScoreConfig.Type model_type = 3 [default = UnigramDocumentModel];
    if (has_model_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->model_type());
    }

    // optional string dictionary_name = 4;
    if (has_dictionary_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->dictionary_name());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PerplexityScoreConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const PerplexityScoreConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const PerplexityScoreConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void PerplexityScoreConfig::MergeFrom(const PerplexityScoreConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_field_name()) {
      set_field_name(from.field_name());
    }
    if (from.has_stream_name()) {
      set_stream_name(from.stream_name());
    }
    if (from.has_model_type()) {
      set_model_type(from.model_type());
    }
    if (from.has_dictionary_name()) {
      set_dictionary_name(from.dictionary_name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void PerplexityScoreConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void PerplexityScoreConfig::CopyFrom(const PerplexityScoreConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PerplexityScoreConfig::IsInitialized() const {

  return true;
}

void PerplexityScoreConfig::Swap(PerplexityScoreConfig* other) {
  if (other != this) {
    std::swap(field_name_, other->field_name_);
    std::swap(stream_name_, other->stream_name_);
    std::swap(model_type_, other->model_type_);
    std::swap(dictionary_name_, other->dictionary_name_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata PerplexityScoreConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PerplexityScoreConfig_descriptor_;
  metadata.reflection = PerplexityScoreConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int PerplexityScore::kValueFieldNumber;
const int PerplexityScore::kRawFieldNumber;
const int PerplexityScore::kNormalizerFieldNumber;
const int PerplexityScore::kZeroWordsFieldNumber;
#endif  // !_MSC_VER

PerplexityScore::PerplexityScore()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void PerplexityScore::InitAsDefaultInstance() {
}

PerplexityScore::PerplexityScore(const PerplexityScore& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void PerplexityScore::SharedCtor() {
  _cached_size_ = 0;
  value_ = 0;
  raw_ = 0;
  normalizer_ = 0;
  zero_words_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

PerplexityScore::~PerplexityScore() {
  SharedDtor();
}

void PerplexityScore::SharedDtor() {
  if (this != default_instance_) {
  }
}

void PerplexityScore::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PerplexityScore::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PerplexityScore_descriptor_;
}

const PerplexityScore& PerplexityScore::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

PerplexityScore* PerplexityScore::default_instance_ = NULL;

PerplexityScore* PerplexityScore::New() const {
  return new PerplexityScore;
}

void PerplexityScore::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    value_ = 0;
    raw_ = 0;
    normalizer_ = 0;
    zero_words_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool PerplexityScore::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional double value = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &value_)));
          set_has_value();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(17)) goto parse_raw;
        break;
      }

      // optional double raw = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
         parse_raw:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &raw_)));
          set_has_raw();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(25)) goto parse_normalizer;
        break;
      }

      // optional double normalizer = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
         parse_normalizer:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &normalizer_)));
          set_has_normalizer();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(32)) goto parse_zero_words;
        break;
      }

      // optional int32 zero_words = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_zero_words:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &zero_words_)));
          set_has_zero_words();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void PerplexityScore::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional double value = 1;
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
  }

  // optional double raw = 2;
  if (has_raw()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->raw(), output);
  }

  // optional double normalizer = 3;
  if (has_normalizer()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(3, this->normalizer(), output);
  }

  // optional int32 zero_words = 4;
  if (has_zero_words()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->zero_words(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* PerplexityScore::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional double value = 1;
  if (has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
  }

  // optional double raw = 2;
  if (has_raw()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->raw(), target);
  }

  // optional double normalizer = 3;
  if (has_normalizer()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(3, this->normalizer(), target);
  }

  // optional int32 zero_words = 4;
  if (has_zero_words()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->zero_words(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int PerplexityScore::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional double value = 1;
    if (has_value()) {
      total_size += 1 + 8;
    }

    // optional double raw = 2;
    if (has_raw()) {
      total_size += 1 + 8;
    }

    // optional double normalizer = 3;
    if (has_normalizer()) {
      total_size += 1 + 8;
    }

    // optional int32 zero_words = 4;
    if (has_zero_words()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->zero_words());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PerplexityScore::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const PerplexityScore* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const PerplexityScore*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void PerplexityScore::MergeFrom(const PerplexityScore& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_value()) {
      set_value(from.value());
    }
    if (from.has_raw()) {
      set_raw(from.raw());
    }
    if (from.has_normalizer()) {
      set_normalizer(from.normalizer());
    }
    if (from.has_zero_words()) {
      set_zero_words(from.zero_words());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void PerplexityScore::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void PerplexityScore::CopyFrom(const PerplexityScore& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PerplexityScore::IsInitialized() const {

  return true;
}

void PerplexityScore::Swap(PerplexityScore* other) {
  if (other != this) {
    std::swap(value_, other->value_);
    std::swap(raw_, other->raw_);
    std::swap(normalizer_, other->normalizer_);
    std::swap(zero_words_, other->zero_words_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata PerplexityScore::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PerplexityScore_descriptor_;
  metadata.reflection = PerplexityScore_reflection_;
  return metadata;
}


// ===================================================================

::std::string* SparsityThetaScoreConfig::_default_field_name_ = NULL;
::std::string* SparsityThetaScoreConfig::_default_stream_name_ = NULL;
#ifndef _MSC_VER
const int SparsityThetaScoreConfig::kFieldNameFieldNumber;
const int SparsityThetaScoreConfig::kStreamNameFieldNumber;
const int SparsityThetaScoreConfig::kEpsFieldNumber;
const int SparsityThetaScoreConfig::kTopicNameFieldNumber;
#endif  // !_MSC_VER

SparsityThetaScoreConfig::SparsityThetaScoreConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void SparsityThetaScoreConfig::InitAsDefaultInstance() {
}

SparsityThetaScoreConfig::SparsityThetaScoreConfig(const SparsityThetaScoreConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void SparsityThetaScoreConfig::SharedCtor() {
  _cached_size_ = 0;
  field_name_ = const_cast< ::std::string*>(_default_field_name_);
  stream_name_ = const_cast< ::std::string*>(_default_stream_name_);
  eps_ = 1e-037f;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

SparsityThetaScoreConfig::~SparsityThetaScoreConfig() {
  SharedDtor();
}

void SparsityThetaScoreConfig::SharedDtor() {
  if (field_name_ != _default_field_name_) {
    delete field_name_;
  }
  if (stream_name_ != _default_stream_name_) {
    delete stream_name_;
  }
  if (this != default_instance_) {
  }
}

void SparsityThetaScoreConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SparsityThetaScoreConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SparsityThetaScoreConfig_descriptor_;
}

const SparsityThetaScoreConfig& SparsityThetaScoreConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

SparsityThetaScoreConfig* SparsityThetaScoreConfig::default_instance_ = NULL;

SparsityThetaScoreConfig* SparsityThetaScoreConfig::New() const {
  return new SparsityThetaScoreConfig;
}

void SparsityThetaScoreConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_field_name()) {
      if (field_name_ != _default_field_name_) {
        field_name_->assign(*_default_field_name_);
      }
    }
    if (has_stream_name()) {
      if (stream_name_ != _default_stream_name_) {
        stream_name_->assign(*_default_stream_name_);
      }
    }
    eps_ = 1e-037f;
  }
  topic_name_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool SparsityThetaScoreConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string field_name = 1 [default = "@body"];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_field_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->field_name().data(), this->field_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_stream_name;
        break;
      }

      // optional string stream_name = 2 [default = "@global"];
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_stream_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_stream_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->stream_name().data(), this->stream_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(29)) goto parse_eps;
        break;
      }

      // optional float eps = 3 [default = 1e-037];
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_eps:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &eps_)));
          set_has_eps();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_topic_name;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void SparsityThetaScoreConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string field_name = 1 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->field_name(), output);
  }

  // optional string stream_name = 2 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->stream_name(), output);
  }

  // optional float eps = 3 [default = 1e-037];
  if (has_eps()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->eps(), output);
  }

  // repeated string topic_name = 4;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->topic_name(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* SparsityThetaScoreConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string field_name = 1 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->field_name(), target);
  }

  // optional string stream_name = 2 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->stream_name(), target);
  }

  // optional float eps = 3 [default = 1e-037];
  if (has_eps()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->eps(), target);
  }

  // repeated string topic_name = 4;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->topic_name(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int SparsityThetaScoreConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string field_name = 1 [default = "@body"];
    if (has_field_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->field_name());
    }

    // optional string stream_name = 2 [default = "@global"];
    if (has_stream_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->stream_name());
    }

    // optional float eps = 3 [default = 1e-037];
    if (has_eps()) {
      total_size += 1 + 4;
    }

  }
  // repeated string topic_name = 4;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SparsityThetaScoreConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const SparsityThetaScoreConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const SparsityThetaScoreConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void SparsityThetaScoreConfig::MergeFrom(const SparsityThetaScoreConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_field_name()) {
      set_field_name(from.field_name());
    }
    if (from.has_stream_name()) {
      set_stream_name(from.stream_name());
    }
    if (from.has_eps()) {
      set_eps(from.eps());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void SparsityThetaScoreConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void SparsityThetaScoreConfig::CopyFrom(const SparsityThetaScoreConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SparsityThetaScoreConfig::IsInitialized() const {

  return true;
}

void SparsityThetaScoreConfig::Swap(SparsityThetaScoreConfig* other) {
  if (other != this) {
    std::swap(field_name_, other->field_name_);
    std::swap(stream_name_, other->stream_name_);
    std::swap(eps_, other->eps_);
    topic_name_.Swap(&other->topic_name_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata SparsityThetaScoreConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SparsityThetaScoreConfig_descriptor_;
  metadata.reflection = SparsityThetaScoreConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int SparsityThetaScore::kValueFieldNumber;
const int SparsityThetaScore::kZeroTopicsFieldNumber;
const int SparsityThetaScore::kTotalTopicsFieldNumber;
#endif  // !_MSC_VER

SparsityThetaScore::SparsityThetaScore()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void SparsityThetaScore::InitAsDefaultInstance() {
}

SparsityThetaScore::SparsityThetaScore(const SparsityThetaScore& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void SparsityThetaScore::SharedCtor() {
  _cached_size_ = 0;
  value_ = 0;
  zero_topics_ = 0;
  total_topics_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

SparsityThetaScore::~SparsityThetaScore() {
  SharedDtor();
}

void SparsityThetaScore::SharedDtor() {
  if (this != default_instance_) {
  }
}

void SparsityThetaScore::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SparsityThetaScore::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SparsityThetaScore_descriptor_;
}

const SparsityThetaScore& SparsityThetaScore::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

SparsityThetaScore* SparsityThetaScore::default_instance_ = NULL;

SparsityThetaScore* SparsityThetaScore::New() const {
  return new SparsityThetaScore;
}

void SparsityThetaScore::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    value_ = 0;
    zero_topics_ = 0;
    total_topics_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool SparsityThetaScore::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional double value = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &value_)));
          set_has_value();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_zero_topics;
        break;
      }

      // optional int32 zero_topics = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_zero_topics:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &zero_topics_)));
          set_has_zero_topics();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_total_topics;
        break;
      }

      // optional int32 total_topics = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_total_topics:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &total_topics_)));
          set_has_total_topics();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void SparsityThetaScore::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional double value = 1;
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
  }

  // optional int32 zero_topics = 2;
  if (has_zero_topics()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->zero_topics(), output);
  }

  // optional int32 total_topics = 3;
  if (has_total_topics()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->total_topics(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* SparsityThetaScore::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional double value = 1;
  if (has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
  }

  // optional int32 zero_topics = 2;
  if (has_zero_topics()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->zero_topics(), target);
  }

  // optional int32 total_topics = 3;
  if (has_total_topics()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->total_topics(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int SparsityThetaScore::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional double value = 1;
    if (has_value()) {
      total_size += 1 + 8;
    }

    // optional int32 zero_topics = 2;
    if (has_zero_topics()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->zero_topics());
    }

    // optional int32 total_topics = 3;
    if (has_total_topics()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->total_topics());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SparsityThetaScore::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const SparsityThetaScore* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const SparsityThetaScore*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void SparsityThetaScore::MergeFrom(const SparsityThetaScore& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_value()) {
      set_value(from.value());
    }
    if (from.has_zero_topics()) {
      set_zero_topics(from.zero_topics());
    }
    if (from.has_total_topics()) {
      set_total_topics(from.total_topics());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void SparsityThetaScore::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void SparsityThetaScore::CopyFrom(const SparsityThetaScore& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SparsityThetaScore::IsInitialized() const {

  return true;
}

void SparsityThetaScore::Swap(SparsityThetaScore* other) {
  if (other != this) {
    std::swap(value_, other->value_);
    std::swap(zero_topics_, other->zero_topics_);
    std::swap(total_topics_, other->total_topics_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata SparsityThetaScore::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SparsityThetaScore_descriptor_;
  metadata.reflection = SparsityThetaScore_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int SparsityPhiScoreConfig::kEpsFieldNumber;
const int SparsityPhiScoreConfig::kClassIdFieldNumber;
const int SparsityPhiScoreConfig::kTopicNameFieldNumber;
#endif  // !_MSC_VER

SparsityPhiScoreConfig::SparsityPhiScoreConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void SparsityPhiScoreConfig::InitAsDefaultInstance() {
}

SparsityPhiScoreConfig::SparsityPhiScoreConfig(const SparsityPhiScoreConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void SparsityPhiScoreConfig::SharedCtor() {
  _cached_size_ = 0;
  eps_ = 1e-037f;
  class_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

SparsityPhiScoreConfig::~SparsityPhiScoreConfig() {
  SharedDtor();
}

void SparsityPhiScoreConfig::SharedDtor() {
  if (class_id_ != &::google::protobuf::internal::GetEmptyString()) {
    delete class_id_;
  }
  if (this != default_instance_) {
  }
}

void SparsityPhiScoreConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SparsityPhiScoreConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SparsityPhiScoreConfig_descriptor_;
}

const SparsityPhiScoreConfig& SparsityPhiScoreConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

SparsityPhiScoreConfig* SparsityPhiScoreConfig::default_instance_ = NULL;

SparsityPhiScoreConfig* SparsityPhiScoreConfig::New() const {
  return new SparsityPhiScoreConfig;
}

void SparsityPhiScoreConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    eps_ = 1e-037f;
    if (has_class_id()) {
      if (class_id_ != &::google::protobuf::internal::GetEmptyString()) {
        class_id_->clear();
      }
    }
  }
  topic_name_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool SparsityPhiScoreConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float eps = 1 [default = 1e-037];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &eps_)));
          set_has_eps();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_class_id;
        break;
      }

      // optional string class_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id().data(), this->class_id().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void SparsityPhiScoreConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional float eps = 1 [default = 1e-037];
  if (has_eps()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->eps(), output);
  }

  // optional string class_id = 2;
  if (has_class_id()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id().data(), this->class_id().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->class_id(), output);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->topic_name(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* SparsityPhiScoreConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional float eps = 1 [default = 1e-037];
  if (has_eps()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->eps(), target);
  }

  // optional string class_id = 2;
  if (has_class_id()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id().data(), this->class_id().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->class_id(), target);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->topic_name(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int SparsityPhiScoreConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional float eps = 1 [default = 1e-037];
    if (has_eps()) {
      total_size += 1 + 4;
    }

    // optional string class_id = 2;
    if (has_class_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->class_id());
    }

  }
  // repeated string topic_name = 3;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SparsityPhiScoreConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const SparsityPhiScoreConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const SparsityPhiScoreConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void SparsityPhiScoreConfig::MergeFrom(const SparsityPhiScoreConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_eps()) {
      set_eps(from.eps());
    }
    if (from.has_class_id()) {
      set_class_id(from.class_id());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void SparsityPhiScoreConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void SparsityPhiScoreConfig::CopyFrom(const SparsityPhiScoreConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SparsityPhiScoreConfig::IsInitialized() const {

  return true;
}

void SparsityPhiScoreConfig::Swap(SparsityPhiScoreConfig* other) {
  if (other != this) {
    std::swap(eps_, other->eps_);
    std::swap(class_id_, other->class_id_);
    topic_name_.Swap(&other->topic_name_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata SparsityPhiScoreConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SparsityPhiScoreConfig_descriptor_;
  metadata.reflection = SparsityPhiScoreConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int SparsityPhiScore::kValueFieldNumber;
const int SparsityPhiScore::kZeroTokensFieldNumber;
const int SparsityPhiScore::kTotalTokensFieldNumber;
#endif  // !_MSC_VER

SparsityPhiScore::SparsityPhiScore()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void SparsityPhiScore::InitAsDefaultInstance() {
}

SparsityPhiScore::SparsityPhiScore(const SparsityPhiScore& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void SparsityPhiScore::SharedCtor() {
  _cached_size_ = 0;
  value_ = 0;
  zero_tokens_ = 0;
  total_tokens_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

SparsityPhiScore::~SparsityPhiScore() {
  SharedDtor();
}

void SparsityPhiScore::SharedDtor() {
  if (this != default_instance_) {
  }
}

void SparsityPhiScore::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SparsityPhiScore::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SparsityPhiScore_descriptor_;
}

const SparsityPhiScore& SparsityPhiScore::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

SparsityPhiScore* SparsityPhiScore::default_instance_ = NULL;

SparsityPhiScore* SparsityPhiScore::New() const {
  return new SparsityPhiScore;
}

void SparsityPhiScore::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    value_ = 0;
    zero_tokens_ = 0;
    total_tokens_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool SparsityPhiScore::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional double value = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &value_)));
          set_has_value();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_zero_tokens;
        break;
      }

      // optional int32 zero_tokens = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_zero_tokens:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &zero_tokens_)));
          set_has_zero_tokens();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_total_tokens;
        break;
      }

      // optional int32 total_tokens = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_total_tokens:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &total_tokens_)));
          set_has_total_tokens();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void SparsityPhiScore::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional double value = 1;
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
  }

  // optional int32 zero_tokens = 2;
  if (has_zero_tokens()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->zero_tokens(), output);
  }

  // optional int32 total_tokens = 3;
  if (has_total_tokens()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->total_tokens(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* SparsityPhiScore::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional double value = 1;
  if (has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
  }

  // optional int32 zero_tokens = 2;
  if (has_zero_tokens()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->zero_tokens(), target);
  }

  // optional int32 total_tokens = 3;
  if (has_total_tokens()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->total_tokens(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int SparsityPhiScore::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional double value = 1;
    if (has_value()) {
      total_size += 1 + 8;
    }

    // optional int32 zero_tokens = 2;
    if (has_zero_tokens()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->zero_tokens());
    }

    // optional int32 total_tokens = 3;
    if (has_total_tokens()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->total_tokens());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SparsityPhiScore::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const SparsityPhiScore* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const SparsityPhiScore*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void SparsityPhiScore::MergeFrom(const SparsityPhiScore& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_value()) {
      set_value(from.value());
    }
    if (from.has_zero_tokens()) {
      set_zero_tokens(from.zero_tokens());
    }
    if (from.has_total_tokens()) {
      set_total_tokens(from.total_tokens());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void SparsityPhiScore::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void SparsityPhiScore::CopyFrom(const SparsityPhiScore& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SparsityPhiScore::IsInitialized() const {

  return true;
}

void SparsityPhiScore::Swap(SparsityPhiScore* other) {
  if (other != this) {
    std::swap(value_, other->value_);
    std::swap(zero_tokens_, other->zero_tokens_);
    std::swap(total_tokens_, other->total_tokens_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata SparsityPhiScore::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SparsityPhiScore_descriptor_;
  metadata.reflection = SparsityPhiScore_reflection_;
  return metadata;
}


// ===================================================================

::std::string* ItemsProcessedScoreConfig::_default_field_name_ = NULL;
::std::string* ItemsProcessedScoreConfig::_default_stream_name_ = NULL;
#ifndef _MSC_VER
const int ItemsProcessedScoreConfig::kFieldNameFieldNumber;
const int ItemsProcessedScoreConfig::kStreamNameFieldNumber;
#endif  // !_MSC_VER

ItemsProcessedScoreConfig::ItemsProcessedScoreConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ItemsProcessedScoreConfig::InitAsDefaultInstance() {
}

ItemsProcessedScoreConfig::ItemsProcessedScoreConfig(const ItemsProcessedScoreConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ItemsProcessedScoreConfig::SharedCtor() {
  _cached_size_ = 0;
  field_name_ = const_cast< ::std::string*>(_default_field_name_);
  stream_name_ = const_cast< ::std::string*>(_default_stream_name_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ItemsProcessedScoreConfig::~ItemsProcessedScoreConfig() {
  SharedDtor();
}

void ItemsProcessedScoreConfig::SharedDtor() {
  if (field_name_ != _default_field_name_) {
    delete field_name_;
  }
  if (stream_name_ != _default_stream_name_) {
    delete stream_name_;
  }
  if (this != default_instance_) {
  }
}

void ItemsProcessedScoreConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ItemsProcessedScoreConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ItemsProcessedScoreConfig_descriptor_;
}

const ItemsProcessedScoreConfig& ItemsProcessedScoreConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

ItemsProcessedScoreConfig* ItemsProcessedScoreConfig::default_instance_ = NULL;

ItemsProcessedScoreConfig* ItemsProcessedScoreConfig::New() const {
  return new ItemsProcessedScoreConfig;
}

void ItemsProcessedScoreConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_field_name()) {
      if (field_name_ != _default_field_name_) {
        field_name_->assign(*_default_field_name_);
      }
    }
    if (has_stream_name()) {
      if (stream_name_ != _default_stream_name_) {
        stream_name_->assign(*_default_stream_name_);
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ItemsProcessedScoreConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string field_name = 1 [default = "@body"];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_field_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->field_name().data(), this->field_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_stream_name;
        break;
      }

      // optional string stream_name = 2 [default = "@global"];
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_stream_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_stream_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->stream_name().data(), this->stream_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ItemsProcessedScoreConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string field_name = 1 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->field_name(), output);
  }

  // optional string stream_name = 2 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->stream_name(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ItemsProcessedScoreConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string field_name = 1 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->field_name(), target);
  }

  // optional string stream_name = 2 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->stream_name(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ItemsProcessedScoreConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string field_name = 1 [default = "@body"];
    if (has_field_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->field_name());
    }

    // optional string stream_name = 2 [default = "@global"];
    if (has_stream_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->stream_name());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ItemsProcessedScoreConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ItemsProcessedScoreConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ItemsProcessedScoreConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ItemsProcessedScoreConfig::MergeFrom(const ItemsProcessedScoreConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_field_name()) {
      set_field_name(from.field_name());
    }
    if (from.has_stream_name()) {
      set_stream_name(from.stream_name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ItemsProcessedScoreConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ItemsProcessedScoreConfig::CopyFrom(const ItemsProcessedScoreConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ItemsProcessedScoreConfig::IsInitialized() const {

  return true;
}

void ItemsProcessedScoreConfig::Swap(ItemsProcessedScoreConfig* other) {
  if (other != this) {
    std::swap(field_name_, other->field_name_);
    std::swap(stream_name_, other->stream_name_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata ItemsProcessedScoreConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ItemsProcessedScoreConfig_descriptor_;
  metadata.reflection = ItemsProcessedScoreConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int ItemsProcessedScore::kValueFieldNumber;
#endif  // !_MSC_VER

ItemsProcessedScore::ItemsProcessedScore()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ItemsProcessedScore::InitAsDefaultInstance() {
}

ItemsProcessedScore::ItemsProcessedScore(const ItemsProcessedScore& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ItemsProcessedScore::SharedCtor() {
  _cached_size_ = 0;
  value_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ItemsProcessedScore::~ItemsProcessedScore() {
  SharedDtor();
}

void ItemsProcessedScore::SharedDtor() {
  if (this != default_instance_) {
  }
}

void ItemsProcessedScore::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ItemsProcessedScore::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ItemsProcessedScore_descriptor_;
}

const ItemsProcessedScore& ItemsProcessedScore::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

ItemsProcessedScore* ItemsProcessedScore::default_instance_ = NULL;

ItemsProcessedScore* ItemsProcessedScore::New() const {
  return new ItemsProcessedScore;
}

void ItemsProcessedScore::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    value_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ItemsProcessedScore::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 value = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &value_)));
          set_has_value();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ItemsProcessedScore::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional int32 value = 1;
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->value(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ItemsProcessedScore::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 value = 1;
  if (has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->value(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ItemsProcessedScore::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 value = 1;
    if (has_value()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->value());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ItemsProcessedScore::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ItemsProcessedScore* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ItemsProcessedScore*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ItemsProcessedScore::MergeFrom(const ItemsProcessedScore& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_value()) {
      set_value(from.value());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ItemsProcessedScore::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ItemsProcessedScore::CopyFrom(const ItemsProcessedScore& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ItemsProcessedScore::IsInitialized() const {

  return true;
}

void ItemsProcessedScore::Swap(ItemsProcessedScore* other) {
  if (other != this) {
    std::swap(value_, other->value_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata ItemsProcessedScore::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ItemsProcessedScore_descriptor_;
  metadata.reflection = ItemsProcessedScore_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int TopTokensScoreConfig::kNumTokensFieldNumber;
const int TopTokensScoreConfig::kClassIdFieldNumber;
const int TopTokensScoreConfig::kTopicNameFieldNumber;
#endif  // !_MSC_VER

TopTokensScoreConfig::TopTokensScoreConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TopTokensScoreConfig::InitAsDefaultInstance() {
}

TopTokensScoreConfig::TopTokensScoreConfig(const TopTokensScoreConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TopTokensScoreConfig::SharedCtor() {
  _cached_size_ = 0;
  num_tokens_ = 10;
  class_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TopTokensScoreConfig::~TopTokensScoreConfig() {
  SharedDtor();
}

void TopTokensScoreConfig::SharedDtor() {
  if (class_id_ != &::google::protobuf::internal::GetEmptyString()) {
    delete class_id_;
  }
  if (this != default_instance_) {
  }
}

void TopTokensScoreConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TopTokensScoreConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TopTokensScoreConfig_descriptor_;
}

const TopTokensScoreConfig& TopTokensScoreConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

TopTokensScoreConfig* TopTokensScoreConfig::default_instance_ = NULL;

TopTokensScoreConfig* TopTokensScoreConfig::New() const {
  return new TopTokensScoreConfig;
}

void TopTokensScoreConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    num_tokens_ = 10;
    if (has_class_id()) {
      if (class_id_ != &::google::protobuf::internal::GetEmptyString()) {
        class_id_->clear();
      }
    }
  }
  topic_name_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TopTokensScoreConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 num_tokens = 1 [default = 10];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &num_tokens_)));
          set_has_num_tokens();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_class_id;
        break;
      }

      // optional string class_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id().data(), this->class_id().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TopTokensScoreConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional int32 num_tokens = 1 [default = 10];
  if (has_num_tokens()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->num_tokens(), output);
  }

  // optional string class_id = 2;
  if (has_class_id()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id().data(), this->class_id().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->class_id(), output);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->topic_name(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TopTokensScoreConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 num_tokens = 1 [default = 10];
  if (has_num_tokens()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->num_tokens(), target);
  }

  // optional string class_id = 2;
  if (has_class_id()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id().data(), this->class_id().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->class_id(), target);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->topic_name(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TopTokensScoreConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 num_tokens = 1 [default = 10];
    if (has_num_tokens()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->num_tokens());
    }

    // optional string class_id = 2;
    if (has_class_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->class_id());
    }

  }
  // repeated string topic_name = 3;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TopTokensScoreConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TopTokensScoreConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TopTokensScoreConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TopTokensScoreConfig::MergeFrom(const TopTokensScoreConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_num_tokens()) {
      set_num_tokens(from.num_tokens());
    }
    if (from.has_class_id()) {
      set_class_id(from.class_id());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TopTokensScoreConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TopTokensScoreConfig::CopyFrom(const TopTokensScoreConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TopTokensScoreConfig::IsInitialized() const {

  return true;
}

void TopTokensScoreConfig::Swap(TopTokensScoreConfig* other) {
  if (other != this) {
    std::swap(num_tokens_, other->num_tokens_);
    std::swap(class_id_, other->class_id_);
    topic_name_.Swap(&other->topic_name_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata TopTokensScoreConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TopTokensScoreConfig_descriptor_;
  metadata.reflection = TopTokensScoreConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int TopTokensScore::kNumEntriesFieldNumber;
const int TopTokensScore::kTopicNameFieldNumber;
const int TopTokensScore::kTopicIndexFieldNumber;
const int TopTokensScore::kTokenFieldNumber;
const int TopTokensScore::kWeightFieldNumber;
#endif  // !_MSC_VER

TopTokensScore::TopTokensScore()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TopTokensScore::InitAsDefaultInstance() {
}

TopTokensScore::TopTokensScore(const TopTokensScore& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TopTokensScore::SharedCtor() {
  _cached_size_ = 0;
  num_entries_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TopTokensScore::~TopTokensScore() {
  SharedDtor();
}

void TopTokensScore::SharedDtor() {
  if (this != default_instance_) {
  }
}

void TopTokensScore::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TopTokensScore::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TopTokensScore_descriptor_;
}

const TopTokensScore& TopTokensScore::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

TopTokensScore* TopTokensScore::default_instance_ = NULL;

TopTokensScore* TopTokensScore::New() const {
  return new TopTokensScore;
}

void TopTokensScore::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    num_entries_ = 0;
  }
  topic_name_.Clear();
  topic_index_.Clear();
  token_.Clear();
  weight_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TopTokensScore::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 num_entries = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &num_entries_)));
          set_has_num_entries();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_topic_name;
        if (input->ExpectTag(24)) goto parse_topic_index;
        break;
      }

      // repeated int32 topic_index = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_topic_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 24, input, this->mutable_topic_index())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_topic_index())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_topic_index;
        if (input->ExpectTag(34)) goto parse_token;
        break;
      }

      // repeated string token = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_token:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_token()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->token(this->token_size() - 1).data(),
            this->token(this->token_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_token;
        if (input->ExpectTag(45)) goto parse_weight;
        break;
      }

      // repeated float weight = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_weight:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 45, input, this->mutable_weight())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_weight())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(45)) goto parse_weight;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TopTokensScore::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional int32 num_entries = 1;
  if (has_num_entries()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->num_entries(), output);
  }

  // repeated string topic_name = 2;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->topic_name(i), output);
  }

  // repeated int32 topic_index = 3;
  for (int i = 0; i < this->topic_index_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      3, this->topic_index(i), output);
  }

  // repeated string token = 4;
  for (int i = 0; i < this->token_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->token(i).data(), this->token(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->token(i), output);
  }

  // repeated float weight = 5;
  for (int i = 0; i < this->weight_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      5, this->weight(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TopTokensScore::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional int32 num_entries = 1;
  if (has_num_entries()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->num_entries(), target);
  }

  // repeated string topic_name = 2;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->topic_name(i), target);
  }

  // repeated int32 topic_index = 3;
  for (int i = 0; i < this->topic_index_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(3, this->topic_index(i), target);
  }

  // repeated string token = 4;
  for (int i = 0; i < this->token_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->token(i).data(), this->token(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->token(i), target);
  }

  // repeated float weight = 5;
  for (int i = 0; i < this->weight_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(5, this->weight(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TopTokensScore::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 num_entries = 1;
    if (has_num_entries()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->num_entries());
    }

  }
  // repeated string topic_name = 2;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  // repeated int32 topic_index = 3;
  {
    int data_size = 0;
    for (int i = 0; i < this->topic_index_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->topic_index(i));
    }
    total_size += 1 * this->topic_index_size() + data_size;
  }

  // repeated string token = 4;
  total_size += 1 * this->token_size();
  for (int i = 0; i < this->token_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->token(i));
  }

  // repeated float weight = 5;
  {
    int data_size = 0;
    data_size = 4 * this->weight_size();
    total_size += 1 * this->weight_size() + data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TopTokensScore::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TopTokensScore* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TopTokensScore*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TopTokensScore::MergeFrom(const TopTokensScore& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  topic_index_.MergeFrom(from.topic_index_);
  token_.MergeFrom(from.token_);
  weight_.MergeFrom(from.weight_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_num_entries()) {
      set_num_entries(from.num_entries());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TopTokensScore::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TopTokensScore::CopyFrom(const TopTokensScore& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TopTokensScore::IsInitialized() const {

  return true;
}

void TopTokensScore::Swap(TopTokensScore* other) {
  if (other != this) {
    std::swap(num_entries_, other->num_entries_);
    topic_name_.Swap(&other->topic_name_);
    topic_index_.Swap(&other->topic_index_);
    token_.Swap(&other->token_);
    weight_.Swap(&other->weight_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata TopTokensScore::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TopTokensScore_descriptor_;
  metadata.reflection = TopTokensScore_reflection_;
  return metadata;
}


// ===================================================================

::std::string* ThetaSnippetScoreConfig::_default_field_name_ = NULL;
::std::string* ThetaSnippetScoreConfig::_default_stream_name_ = NULL;
#ifndef _MSC_VER
const int ThetaSnippetScoreConfig::kFieldNameFieldNumber;
const int ThetaSnippetScoreConfig::kStreamNameFieldNumber;
const int ThetaSnippetScoreConfig::kItemIdFieldNumber;
#endif  // !_MSC_VER

ThetaSnippetScoreConfig::ThetaSnippetScoreConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ThetaSnippetScoreConfig::InitAsDefaultInstance() {
}

ThetaSnippetScoreConfig::ThetaSnippetScoreConfig(const ThetaSnippetScoreConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ThetaSnippetScoreConfig::SharedCtor() {
  _cached_size_ = 0;
  field_name_ = const_cast< ::std::string*>(_default_field_name_);
  stream_name_ = const_cast< ::std::string*>(_default_stream_name_);
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ThetaSnippetScoreConfig::~ThetaSnippetScoreConfig() {
  SharedDtor();
}

void ThetaSnippetScoreConfig::SharedDtor() {
  if (field_name_ != _default_field_name_) {
    delete field_name_;
  }
  if (stream_name_ != _default_stream_name_) {
    delete stream_name_;
  }
  if (this != default_instance_) {
  }
}

void ThetaSnippetScoreConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ThetaSnippetScoreConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ThetaSnippetScoreConfig_descriptor_;
}

const ThetaSnippetScoreConfig& ThetaSnippetScoreConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

ThetaSnippetScoreConfig* ThetaSnippetScoreConfig::default_instance_ = NULL;

ThetaSnippetScoreConfig* ThetaSnippetScoreConfig::New() const {
  return new ThetaSnippetScoreConfig;
}

void ThetaSnippetScoreConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_field_name()) {
      if (field_name_ != _default_field_name_) {
        field_name_->assign(*_default_field_name_);
      }
    }
    if (has_stream_name()) {
      if (stream_name_ != _default_stream_name_) {
        stream_name_->assign(*_default_stream_name_);
      }
    }
  }
  item_id_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ThetaSnippetScoreConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string field_name = 1 [default = "@body"];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_field_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->field_name().data(), this->field_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_stream_name;
        break;
      }

      // optional string stream_name = 2 [default = "@global"];
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_stream_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_stream_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->stream_name().data(), this->stream_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_item_id;
        break;
      }

      // repeated int32 item_id = 3 [packed = true];
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_item_id:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_item_id())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_VARINT) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 26, input, this->mutable_item_id())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ThetaSnippetScoreConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string field_name = 1 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->field_name(), output);
  }

  // optional string stream_name = 2 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->stream_name(), output);
  }

  // repeated int32 item_id = 3 [packed = true];
  if (this->item_id_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_item_id_cached_byte_size_);
  }
  for (int i = 0; i < this->item_id_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
      this->item_id(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ThetaSnippetScoreConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string field_name = 1 [default = "@body"];
  if (has_field_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->field_name().data(), this->field_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->field_name(), target);
  }

  // optional string stream_name = 2 [default = "@global"];
  if (has_stream_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->stream_name().data(), this->stream_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->stream_name(), target);
  }

  // repeated int32 item_id = 3 [packed = true];
  if (this->item_id_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      3,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _item_id_cached_byte_size_, target);
  }
  for (int i = 0; i < this->item_id_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32NoTagToArray(this->item_id(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ThetaSnippetScoreConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string field_name = 1 [default = "@body"];
    if (has_field_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->field_name());
    }

    // optional string stream_name = 2 [default = "@global"];
    if (has_stream_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->stream_name());
    }

  }
  // repeated int32 item_id = 3 [packed = true];
  {
    int data_size = 0;
    for (int i = 0; i < this->item_id_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->item_id(i));
    }
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _item_id_cached_byte_size_ = data_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ThetaSnippetScoreConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ThetaSnippetScoreConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ThetaSnippetScoreConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ThetaSnippetScoreConfig::MergeFrom(const ThetaSnippetScoreConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  item_id_.MergeFrom(from.item_id_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_field_name()) {
      set_field_name(from.field_name());
    }
    if (from.has_stream_name()) {
      set_stream_name(from.stream_name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ThetaSnippetScoreConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ThetaSnippetScoreConfig::CopyFrom(const ThetaSnippetScoreConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ThetaSnippetScoreConfig::IsInitialized() const {

  return true;
}

void ThetaSnippetScoreConfig::Swap(ThetaSnippetScoreConfig* other) {
  if (other != this) {
    std::swap(field_name_, other->field_name_);
    std::swap(stream_name_, other->stream_name_);
    item_id_.Swap(&other->item_id_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata ThetaSnippetScoreConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ThetaSnippetScoreConfig_descriptor_;
  metadata.reflection = ThetaSnippetScoreConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int ThetaSnippetScore::kItemIdFieldNumber;
const int ThetaSnippetScore::kValuesFieldNumber;
#endif  // !_MSC_VER

ThetaSnippetScore::ThetaSnippetScore()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ThetaSnippetScore::InitAsDefaultInstance() {
}

ThetaSnippetScore::ThetaSnippetScore(const ThetaSnippetScore& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ThetaSnippetScore::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ThetaSnippetScore::~ThetaSnippetScore() {
  SharedDtor();
}

void ThetaSnippetScore::SharedDtor() {
  if (this != default_instance_) {
  }
}

void ThetaSnippetScore::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ThetaSnippetScore::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ThetaSnippetScore_descriptor_;
}

const ThetaSnippetScore& ThetaSnippetScore::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

ThetaSnippetScore* ThetaSnippetScore::default_instance_ = NULL;

ThetaSnippetScore* ThetaSnippetScore::New() const {
  return new ThetaSnippetScore;
}

void ThetaSnippetScore::Clear() {
  item_id_.Clear();
  values_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ThetaSnippetScore::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated int32 item_id = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_item_id:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 8, input, this->mutable_item_id())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_item_id())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(8)) goto parse_item_id;
        if (input->ExpectTag(18)) goto parse_values;
        break;
      }

      // repeated .artm.FloatArray values = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_values:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_values()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_values;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ThetaSnippetScore::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated int32 item_id = 1;
  for (int i = 0; i < this->item_id_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      1, this->item_id(i), output);
  }

  // repeated .artm.FloatArray values = 2;
  for (int i = 0; i < this->values_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->values(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ThetaSnippetScore::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated int32 item_id = 1;
  for (int i = 0; i < this->item_id_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(1, this->item_id(i), target);
  }

  // repeated .artm.FloatArray values = 2;
  for (int i = 0; i < this->values_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        2, this->values(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ThetaSnippetScore::ByteSize() const {
  int total_size = 0;

  // repeated int32 item_id = 1;
  {
    int data_size = 0;
    for (int i = 0; i < this->item_id_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->item_id(i));
    }
    total_size += 1 * this->item_id_size() + data_size;
  }

  // repeated .artm.FloatArray values = 2;
  total_size += 1 * this->values_size();
  for (int i = 0; i < this->values_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->values(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ThetaSnippetScore::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ThetaSnippetScore* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ThetaSnippetScore*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ThetaSnippetScore::MergeFrom(const ThetaSnippetScore& from) {
  GOOGLE_CHECK_NE(&from, this);
  item_id_.MergeFrom(from.item_id_);
  values_.MergeFrom(from.values_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ThetaSnippetScore::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ThetaSnippetScore::CopyFrom(const ThetaSnippetScore& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ThetaSnippetScore::IsInitialized() const {

  return true;
}

void ThetaSnippetScore::Swap(ThetaSnippetScore* other) {
  if (other != this) {
    item_id_.Swap(&other->item_id_);
    values_.Swap(&other->values_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata ThetaSnippetScore::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ThetaSnippetScore_descriptor_;
  metadata.reflection = ThetaSnippetScore_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int TopicKernelScoreConfig::kEpsFieldNumber;
const int TopicKernelScoreConfig::kClassIdFieldNumber;
const int TopicKernelScoreConfig::kTopicNameFieldNumber;
const int TopicKernelScoreConfig::kProbabilityMassThresholdFieldNumber;
#endif  // !_MSC_VER

TopicKernelScoreConfig::TopicKernelScoreConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TopicKernelScoreConfig::InitAsDefaultInstance() {
}

TopicKernelScoreConfig::TopicKernelScoreConfig(const TopicKernelScoreConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TopicKernelScoreConfig::SharedCtor() {
  _cached_size_ = 0;
  eps_ = 1e-037f;
  class_id_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  probability_mass_threshold_ = 0.1;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TopicKernelScoreConfig::~TopicKernelScoreConfig() {
  SharedDtor();
}

void TopicKernelScoreConfig::SharedDtor() {
  if (class_id_ != &::google::protobuf::internal::GetEmptyString()) {
    delete class_id_;
  }
  if (this != default_instance_) {
  }
}

void TopicKernelScoreConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TopicKernelScoreConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TopicKernelScoreConfig_descriptor_;
}

const TopicKernelScoreConfig& TopicKernelScoreConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

TopicKernelScoreConfig* TopicKernelScoreConfig::default_instance_ = NULL;

TopicKernelScoreConfig* TopicKernelScoreConfig::New() const {
  return new TopicKernelScoreConfig;
}

void TopicKernelScoreConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    eps_ = 1e-037f;
    if (has_class_id()) {
      if (class_id_ != &::google::protobuf::internal::GetEmptyString()) {
        class_id_->clear();
      }
    }
    probability_mass_threshold_ = 0.1;
  }
  topic_name_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TopicKernelScoreConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float eps = 1 [default = 1e-037];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &eps_)));
          set_has_eps();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_class_id;
        break;
      }

      // optional string class_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id().data(), this->class_id().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        if (input->ExpectTag(33)) goto parse_probability_mass_threshold;
        break;
      }

      // optional double probability_mass_threshold = 4 [default = 0.1];
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
         parse_probability_mass_threshold:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &probability_mass_threshold_)));
          set_has_probability_mass_threshold();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TopicKernelScoreConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional float eps = 1 [default = 1e-037];
  if (has_eps()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->eps(), output);
  }

  // optional string class_id = 2;
  if (has_class_id()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id().data(), this->class_id().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->class_id(), output);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->topic_name(i), output);
  }

  // optional double probability_mass_threshold = 4 [default = 0.1];
  if (has_probability_mass_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->probability_mass_threshold(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TopicKernelScoreConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional float eps = 1 [default = 1e-037];
  if (has_eps()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->eps(), target);
  }

  // optional string class_id = 2;
  if (has_class_id()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id().data(), this->class_id().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->class_id(), target);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->topic_name(i), target);
  }

  // optional double probability_mass_threshold = 4 [default = 0.1];
  if (has_probability_mass_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->probability_mass_threshold(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TopicKernelScoreConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional float eps = 1 [default = 1e-037];
    if (has_eps()) {
      total_size += 1 + 4;
    }

    // optional string class_id = 2;
    if (has_class_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->class_id());
    }

    // optional double probability_mass_threshold = 4 [default = 0.1];
    if (has_probability_mass_threshold()) {
      total_size += 1 + 8;
    }

  }
  // repeated string topic_name = 3;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TopicKernelScoreConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TopicKernelScoreConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TopicKernelScoreConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TopicKernelScoreConfig::MergeFrom(const TopicKernelScoreConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_eps()) {
      set_eps(from.eps());
    }
    if (from.has_class_id()) {
      set_class_id(from.class_id());
    }
    if (from.has_probability_mass_threshold()) {
      set_probability_mass_threshold(from.probability_mass_threshold());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TopicKernelScoreConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TopicKernelScoreConfig::CopyFrom(const TopicKernelScoreConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TopicKernelScoreConfig::IsInitialized() const {

  return true;
}

void TopicKernelScoreConfig::Swap(TopicKernelScoreConfig* other) {
  if (other != this) {
    std::swap(eps_, other->eps_);
    std::swap(class_id_, other->class_id_);
    topic_name_.Swap(&other->topic_name_);
    std::swap(probability_mass_threshold_, other->probability_mass_threshold_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata TopicKernelScoreConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TopicKernelScoreConfig_descriptor_;
  metadata.reflection = TopicKernelScoreConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int TopicKernelScore::kKernelSizeFieldNumber;
const int TopicKernelScore::kKernelPurityFieldNumber;
const int TopicKernelScore::kKernelContrastFieldNumber;
const int TopicKernelScore::kAverageKernelSizeFieldNumber;
const int TopicKernelScore::kAverageKernelPurityFieldNumber;
const int TopicKernelScore::kAverageKernelContrastFieldNumber;
#endif  // !_MSC_VER

TopicKernelScore::TopicKernelScore()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TopicKernelScore::InitAsDefaultInstance() {
  kernel_size_ = const_cast< ::artm::DoubleArray*>(&::artm::DoubleArray::default_instance());
  kernel_purity_ = const_cast< ::artm::DoubleArray*>(&::artm::DoubleArray::default_instance());
  kernel_contrast_ = const_cast< ::artm::DoubleArray*>(&::artm::DoubleArray::default_instance());
}

TopicKernelScore::TopicKernelScore(const TopicKernelScore& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TopicKernelScore::SharedCtor() {
  _cached_size_ = 0;
  kernel_size_ = NULL;
  kernel_purity_ = NULL;
  kernel_contrast_ = NULL;
  average_kernel_size_ = 0;
  average_kernel_purity_ = 0;
  average_kernel_contrast_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TopicKernelScore::~TopicKernelScore() {
  SharedDtor();
}

void TopicKernelScore::SharedDtor() {
  if (this != default_instance_) {
    delete kernel_size_;
    delete kernel_purity_;
    delete kernel_contrast_;
  }
}

void TopicKernelScore::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TopicKernelScore::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TopicKernelScore_descriptor_;
}

const TopicKernelScore& TopicKernelScore::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

TopicKernelScore* TopicKernelScore::default_instance_ = NULL;

TopicKernelScore* TopicKernelScore::New() const {
  return new TopicKernelScore;
}

void TopicKernelScore::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_kernel_size()) {
      if (kernel_size_ != NULL) kernel_size_->::artm::DoubleArray::Clear();
    }
    if (has_kernel_purity()) {
      if (kernel_purity_ != NULL) kernel_purity_->::artm::DoubleArray::Clear();
    }
    if (has_kernel_contrast()) {
      if (kernel_contrast_ != NULL) kernel_contrast_->::artm::DoubleArray::Clear();
    }
    average_kernel_size_ = 0;
    average_kernel_purity_ = 0;
    average_kernel_contrast_ = 0;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TopicKernelScore::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .artm.DoubleArray kernel_size = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_kernel_size()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_kernel_purity;
        break;
      }

      // optional .artm.DoubleArray kernel_purity = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_kernel_purity:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_kernel_purity()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_kernel_contrast;
        break;
      }

      // optional .artm.DoubleArray kernel_contrast = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_kernel_contrast:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_kernel_contrast()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(33)) goto parse_average_kernel_size;
        break;
      }

      // optional double average_kernel_size = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
         parse_average_kernel_size:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &average_kernel_size_)));
          set_has_average_kernel_size();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(41)) goto parse_average_kernel_purity;
        break;
      }

      // optional double average_kernel_purity = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
         parse_average_kernel_purity:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &average_kernel_purity_)));
          set_has_average_kernel_purity();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(49)) goto parse_average_kernel_contrast;
        break;
      }

      // optional double average_kernel_contrast = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
         parse_average_kernel_contrast:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
                 input, &average_kernel_contrast_)));
          set_has_average_kernel_contrast();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TopicKernelScore::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional .artm.DoubleArray kernel_size = 1;
  if (has_kernel_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->kernel_size(), output);
  }

  // optional .artm.DoubleArray kernel_purity = 2;
  if (has_kernel_purity()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->kernel_purity(), output);
  }

  // optional .artm.DoubleArray kernel_contrast = 3;
  if (has_kernel_contrast()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->kernel_contrast(), output);
  }

  // optional double average_kernel_size = 4;
  if (has_average_kernel_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(4, this->average_kernel_size(), output);
  }

  // optional double average_kernel_purity = 5;
  if (has_average_kernel_purity()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->average_kernel_purity(), output);
  }

  // optional double average_kernel_contrast = 6;
  if (has_average_kernel_contrast()) {
    ::google::protobuf::internal::WireFormatLite::WriteDouble(6, this->average_kernel_contrast(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TopicKernelScore::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .artm.DoubleArray kernel_size = 1;
  if (has_kernel_size()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        1, this->kernel_size(), target);
  }

  // optional .artm.DoubleArray kernel_purity = 2;
  if (has_kernel_purity()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        2, this->kernel_purity(), target);
  }

  // optional .artm.DoubleArray kernel_contrast = 3;
  if (has_kernel_contrast()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        3, this->kernel_contrast(), target);
  }

  // optional double average_kernel_size = 4;
  if (has_average_kernel_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(4, this->average_kernel_size(), target);
  }

  // optional double average_kernel_purity = 5;
  if (has_average_kernel_purity()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->average_kernel_purity(), target);
  }

  // optional double average_kernel_contrast = 6;
  if (has_average_kernel_contrast()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(6, this->average_kernel_contrast(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TopicKernelScore::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .artm.DoubleArray kernel_size = 1;
    if (has_kernel_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->kernel_size());
    }

    // optional .artm.DoubleArray kernel_purity = 2;
    if (has_kernel_purity()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->kernel_purity());
    }

    // optional .artm.DoubleArray kernel_contrast = 3;
    if (has_kernel_contrast()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->kernel_contrast());
    }

    // optional double average_kernel_size = 4;
    if (has_average_kernel_size()) {
      total_size += 1 + 8;
    }

    // optional double average_kernel_purity = 5;
    if (has_average_kernel_purity()) {
      total_size += 1 + 8;
    }

    // optional double average_kernel_contrast = 6;
    if (has_average_kernel_contrast()) {
      total_size += 1 + 8;
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TopicKernelScore::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TopicKernelScore* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TopicKernelScore*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TopicKernelScore::MergeFrom(const TopicKernelScore& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_kernel_size()) {
      mutable_kernel_size()->::artm::DoubleArray::MergeFrom(from.kernel_size());
    }
    if (from.has_kernel_purity()) {
      mutable_kernel_purity()->::artm::DoubleArray::MergeFrom(from.kernel_purity());
    }
    if (from.has_kernel_contrast()) {
      mutable_kernel_contrast()->::artm::DoubleArray::MergeFrom(from.kernel_contrast());
    }
    if (from.has_average_kernel_size()) {
      set_average_kernel_size(from.average_kernel_size());
    }
    if (from.has_average_kernel_purity()) {
      set_average_kernel_purity(from.average_kernel_purity());
    }
    if (from.has_average_kernel_contrast()) {
      set_average_kernel_contrast(from.average_kernel_contrast());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TopicKernelScore::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TopicKernelScore::CopyFrom(const TopicKernelScore& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TopicKernelScore::IsInitialized() const {

  return true;
}

void TopicKernelScore::Swap(TopicKernelScore* other) {
  if (other != this) {
    std::swap(kernel_size_, other->kernel_size_);
    std::swap(kernel_purity_, other->kernel_purity_);
    std::swap(kernel_contrast_, other->kernel_contrast_);
    std::swap(average_kernel_size_, other->average_kernel_size_);
    std::swap(average_kernel_purity_, other->average_kernel_purity_);
    std::swap(average_kernel_contrast_, other->average_kernel_contrast_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata TopicKernelScore::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TopicKernelScore_descriptor_;
  metadata.reflection = TopicKernelScore_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int TopicModel_TopicModelInternals::kNWtFieldNumber;
const int TopicModel_TopicModelInternals::kRWtFieldNumber;
#endif  // !_MSC_VER

TopicModel_TopicModelInternals::TopicModel_TopicModelInternals()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TopicModel_TopicModelInternals::InitAsDefaultInstance() {
}

TopicModel_TopicModelInternals::TopicModel_TopicModelInternals(const TopicModel_TopicModelInternals& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TopicModel_TopicModelInternals::SharedCtor() {
  _cached_size_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TopicModel_TopicModelInternals::~TopicModel_TopicModelInternals() {
  SharedDtor();
}

void TopicModel_TopicModelInternals::SharedDtor() {
  if (this != default_instance_) {
  }
}

void TopicModel_TopicModelInternals::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TopicModel_TopicModelInternals::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TopicModel_TopicModelInternals_descriptor_;
}

const TopicModel_TopicModelInternals& TopicModel_TopicModelInternals::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

TopicModel_TopicModelInternals* TopicModel_TopicModelInternals::default_instance_ = NULL;

TopicModel_TopicModelInternals* TopicModel_TopicModelInternals::New() const {
  return new TopicModel_TopicModelInternals;
}

void TopicModel_TopicModelInternals::Clear() {
  n_wt_.Clear();
  r_wt_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TopicModel_TopicModelInternals::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .artm.FloatArray n_wt = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_n_wt:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_n_wt()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(10)) goto parse_n_wt;
        if (input->ExpectTag(18)) goto parse_r_wt;
        break;
      }

      // repeated .artm.FloatArray r_wt = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_r_wt:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_r_wt()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_r_wt;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TopicModel_TopicModelInternals::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // repeated .artm.FloatArray n_wt = 1;
  for (int i = 0; i < this->n_wt_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->n_wt(i), output);
  }

  // repeated .artm.FloatArray r_wt = 2;
  for (int i = 0; i < this->r_wt_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->r_wt(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TopicModel_TopicModelInternals::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // repeated .artm.FloatArray n_wt = 1;
  for (int i = 0; i < this->n_wt_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        1, this->n_wt(i), target);
  }

  // repeated .artm.FloatArray r_wt = 2;
  for (int i = 0; i < this->r_wt_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        2, this->r_wt(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TopicModel_TopicModelInternals::ByteSize() const {
  int total_size = 0;

  // repeated .artm.FloatArray n_wt = 1;
  total_size += 1 * this->n_wt_size();
  for (int i = 0; i < this->n_wt_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->n_wt(i));
  }

  // repeated .artm.FloatArray r_wt = 2;
  total_size += 1 * this->r_wt_size();
  for (int i = 0; i < this->r_wt_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->r_wt(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TopicModel_TopicModelInternals::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TopicModel_TopicModelInternals* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TopicModel_TopicModelInternals*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TopicModel_TopicModelInternals::MergeFrom(const TopicModel_TopicModelInternals& from) {
  GOOGLE_CHECK_NE(&from, this);
  n_wt_.MergeFrom(from.n_wt_);
  r_wt_.MergeFrom(from.r_wt_);
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TopicModel_TopicModelInternals::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TopicModel_TopicModelInternals::CopyFrom(const TopicModel_TopicModelInternals& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TopicModel_TopicModelInternals::IsInitialized() const {

  return true;
}

void TopicModel_TopicModelInternals::Swap(TopicModel_TopicModelInternals* other) {
  if (other != this) {
    n_wt_.Swap(&other->n_wt_);
    r_wt_.Swap(&other->r_wt_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata TopicModel_TopicModelInternals::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TopicModel_TopicModelInternals_descriptor_;
  metadata.reflection = TopicModel_TopicModelInternals_reflection_;
  return metadata;
}


// -------------------------------------------------------------------

::std::string* TopicModel::_default_name_ = NULL;
#ifndef _MSC_VER
const int TopicModel::kNameFieldNumber;
const int TopicModel::kTopicsCountFieldNumber;
const int TopicModel::kTopicNameFieldNumber;
const int TopicModel::kTokenFieldNumber;
const int TopicModel::kTokenWeightsFieldNumber;
const int TopicModel::kClassIdFieldNumber;
const int TopicModel::kInternalsFieldNumber;
#endif  // !_MSC_VER

TopicModel::TopicModel()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void TopicModel::InitAsDefaultInstance() {
}

TopicModel::TopicModel(const TopicModel& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void TopicModel::SharedCtor() {
  _cached_size_ = 0;
  name_ = const_cast< ::std::string*>(_default_name_);
  topics_count_ = 0;
  internals_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

TopicModel::~TopicModel() {
  SharedDtor();
}

void TopicModel::SharedDtor() {
  if (name_ != _default_name_) {
    delete name_;
  }
  if (internals_ != &::google::protobuf::internal::GetEmptyString()) {
    delete internals_;
  }
  if (this != default_instance_) {
  }
}

void TopicModel::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TopicModel::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TopicModel_descriptor_;
}

const TopicModel& TopicModel::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

TopicModel* TopicModel::default_instance_ = NULL;

TopicModel* TopicModel::New() const {
  return new TopicModel;
}

void TopicModel::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_name()) {
      if (name_ != _default_name_) {
        name_->assign(*_default_name_);
      }
    }
    topics_count_ = 0;
    if (has_internals()) {
      if (internals_ != &::google::protobuf::internal::GetEmptyString()) {
        internals_->clear();
      }
    }
  }
  topic_name_.Clear();
  token_.Clear();
  token_weights_.Clear();
  class_id_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool TopicModel::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1 [default = "@model"];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_topics_count;
        break;
      }

      // optional int32 topics_count = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_topics_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &topics_count_)));
          set_has_topics_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        if (input->ExpectTag(34)) goto parse_token;
        break;
      }

      // repeated string token = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_token:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_token()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->token(this->token_size() - 1).data(),
            this->token(this->token_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_token;
        if (input->ExpectTag(42)) goto parse_token_weights;
        break;
      }

      // repeated .artm.FloatArray token_weights = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_token_weights:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_token_weights()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(42)) goto parse_token_weights;
        if (input->ExpectTag(50)) goto parse_class_id;
        break;
      }

      // repeated string class_id = 6;
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id(this->class_id_size() - 1).data(),
            this->class_id(this->class_id_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(50)) goto parse_class_id;
        if (input->ExpectTag(58)) goto parse_internals;
        break;
      }

      // optional bytes internals = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_internals:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_internals()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void TopicModel::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string name = 1 [default = "@model"];
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->name(), output);
  }

  // optional int32 topics_count = 2;
  if (has_topics_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->topics_count(), output);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->topic_name(i), output);
  }

  // repeated string token = 4;
  for (int i = 0; i < this->token_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->token(i).data(), this->token(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->token(i), output);
  }

  // repeated .artm.FloatArray token_weights = 5;
  for (int i = 0; i < this->token_weights_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, this->token_weights(i), output);
  }

  // repeated string class_id = 6;
  for (int i = 0; i < this->class_id_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->class_id(i).data(), this->class_id(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      6, this->class_id(i), output);
  }

  // optional bytes internals = 7;
  if (has_internals()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytes(
      7, this->internals(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* TopicModel::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string name = 1 [default = "@model"];
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional int32 topics_count = 2;
  if (has_topics_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->topics_count(), target);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->topic_name(i), target);
  }

  // repeated string token = 4;
  for (int i = 0; i < this->token_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->token(i).data(), this->token(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->token(i), target);
  }

  // repeated .artm.FloatArray token_weights = 5;
  for (int i = 0; i < this->token_weights_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        5, this->token_weights(i), target);
  }

  // repeated string class_id = 6;
  for (int i = 0; i < this->class_id_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id(i).data(), this->class_id(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(6, this->class_id(i), target);
  }

  // optional bytes internals = 7;
  if (has_internals()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        7, this->internals(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int TopicModel::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string name = 1 [default = "@model"];
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional int32 topics_count = 2;
    if (has_topics_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->topics_count());
    }

    // optional bytes internals = 7;
    if (has_internals()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->internals());
    }

  }
  // repeated string topic_name = 3;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  // repeated string token = 4;
  total_size += 1 * this->token_size();
  for (int i = 0; i < this->token_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->token(i));
  }

  // repeated .artm.FloatArray token_weights = 5;
  total_size += 1 * this->token_weights_size();
  for (int i = 0; i < this->token_weights_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->token_weights(i));
  }

  // repeated string class_id = 6;
  total_size += 1 * this->class_id_size();
  for (int i = 0; i < this->class_id_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->class_id(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TopicModel::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const TopicModel* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const TopicModel*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void TopicModel::MergeFrom(const TopicModel& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  token_.MergeFrom(from.token_);
  token_weights_.MergeFrom(from.token_weights_);
  class_id_.MergeFrom(from.class_id_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_name(from.name());
    }
    if (from.has_topics_count()) {
      set_topics_count(from.topics_count());
    }
    if (from.has_internals()) {
      set_internals(from.internals());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void TopicModel::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void TopicModel::CopyFrom(const TopicModel& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TopicModel::IsInitialized() const {

  return true;
}

void TopicModel::Swap(TopicModel* other) {
  if (other != this) {
    std::swap(name_, other->name_);
    std::swap(topics_count_, other->topics_count_);
    topic_name_.Swap(&other->topic_name_);
    token_.Swap(&other->token_);
    token_weights_.Swap(&other->token_weights_);
    class_id_.Swap(&other->class_id_);
    std::swap(internals_, other->internals_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata TopicModel::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TopicModel_descriptor_;
  metadata.reflection = TopicModel_reflection_;
  return metadata;
}


// ===================================================================

::std::string* ThetaMatrix::_default_model_name_ = NULL;
#ifndef _MSC_VER
const int ThetaMatrix::kModelNameFieldNumber;
const int ThetaMatrix::kItemIdFieldNumber;
const int ThetaMatrix::kItemWeightsFieldNumber;
const int ThetaMatrix::kTopicNameFieldNumber;
const int ThetaMatrix::kTopicsCountFieldNumber;
#endif  // !_MSC_VER

ThetaMatrix::ThetaMatrix()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void ThetaMatrix::InitAsDefaultInstance() {
}

ThetaMatrix::ThetaMatrix(const ThetaMatrix& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void ThetaMatrix::SharedCtor() {
  _cached_size_ = 0;
  model_name_ = const_cast< ::std::string*>(_default_model_name_);
  topics_count_ = 0;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

ThetaMatrix::~ThetaMatrix() {
  SharedDtor();
}

void ThetaMatrix::SharedDtor() {
  if (model_name_ != _default_model_name_) {
    delete model_name_;
  }
  if (this != default_instance_) {
  }
}

void ThetaMatrix::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ThetaMatrix::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ThetaMatrix_descriptor_;
}

const ThetaMatrix& ThetaMatrix::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

ThetaMatrix* ThetaMatrix::default_instance_ = NULL;

ThetaMatrix* ThetaMatrix::New() const {
  return new ThetaMatrix;
}

void ThetaMatrix::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_model_name()) {
      if (model_name_ != _default_model_name_) {
        model_name_->assign(*_default_model_name_);
      }
    }
    topics_count_ = 0;
  }
  item_id_.Clear();
  item_weights_.Clear();
  topic_name_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool ThetaMatrix::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string model_name = 1 [default = "@model"];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_model_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->model_name().data(), this->model_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_item_id;
        break;
      }

      // repeated int32 item_id = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_item_id:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 16, input, this->mutable_item_id())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_item_id())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(16)) goto parse_item_id;
        if (input->ExpectTag(26)) goto parse_item_weights;
        break;
      }

      // repeated .artm.FloatArray item_weights = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_item_weights:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_item_weights()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_item_weights;
        if (input->ExpectTag(34)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_topic_name;
        if (input->ExpectTag(40)) goto parse_topics_count;
        break;
      }

      // optional int32 topics_count = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_topics_count:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &topics_count_)));
          set_has_topics_count();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void ThetaMatrix::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string model_name = 1 [default = "@model"];
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->model_name(), output);
  }

  // repeated int32 item_id = 2;
  for (int i = 0; i < this->item_id_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      2, this->item_id(i), output);
  }

  // repeated .artm.FloatArray item_weights = 3;
  for (int i = 0; i < this->item_weights_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->item_weights(i), output);
  }

  // repeated string topic_name = 4;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->topic_name(i), output);
  }

  // optional int32 topics_count = 5;
  if (has_topics_count()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->topics_count(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* ThetaMatrix::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string model_name = 1 [default = "@model"];
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->model_name(), target);
  }

  // repeated int32 item_id = 2;
  for (int i = 0; i < this->item_id_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(2, this->item_id(i), target);
  }

  // repeated .artm.FloatArray item_weights = 3;
  for (int i = 0; i < this->item_weights_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        3, this->item_weights(i), target);
  }

  // repeated string topic_name = 4;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->topic_name(i), target);
  }

  // optional int32 topics_count = 5;
  if (has_topics_count()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->topics_count(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int ThetaMatrix::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string model_name = 1 [default = "@model"];
    if (has_model_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->model_name());
    }

    // optional int32 topics_count = 5;
    if (has_topics_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->topics_count());
    }

  }
  // repeated int32 item_id = 2;
  {
    int data_size = 0;
    for (int i = 0; i < this->item_id_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->item_id(i));
    }
    total_size += 1 * this->item_id_size() + data_size;
  }

  // repeated .artm.FloatArray item_weights = 3;
  total_size += 1 * this->item_weights_size();
  for (int i = 0; i < this->item_weights_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->item_weights(i));
  }

  // repeated string topic_name = 4;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ThetaMatrix::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const ThetaMatrix* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const ThetaMatrix*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void ThetaMatrix::MergeFrom(const ThetaMatrix& from) {
  GOOGLE_CHECK_NE(&from, this);
  item_id_.MergeFrom(from.item_id_);
  item_weights_.MergeFrom(from.item_weights_);
  topic_name_.MergeFrom(from.topic_name_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_model_name()) {
      set_model_name(from.model_name());
    }
    if (from.has_topics_count()) {
      set_topics_count(from.topics_count());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void ThetaMatrix::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ThetaMatrix::CopyFrom(const ThetaMatrix& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ThetaMatrix::IsInitialized() const {

  return true;
}

void ThetaMatrix::Swap(ThetaMatrix* other) {
  if (other != this) {
    std::swap(model_name_, other->model_name_);
    item_id_.Swap(&other->item_id_);
    item_weights_.Swap(&other->item_weights_);
    topic_name_.Swap(&other->topic_name_);
    std::swap(topics_count_, other->topics_count_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata ThetaMatrix::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ThetaMatrix_descriptor_;
  metadata.reflection = ThetaMatrix_reflection_;
  return metadata;
}


// ===================================================================

const ::google::protobuf::EnumDescriptor* CollectionParserConfig_Format_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return CollectionParserConfig_Format_descriptor_;
}
bool CollectionParserConfig_Format_IsValid(int value) {
  switch(value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#ifndef _MSC_VER
const CollectionParserConfig_Format CollectionParserConfig::BagOfWordsUci;
const CollectionParserConfig_Format CollectionParserConfig::MatrixMarket;
const CollectionParserConfig_Format CollectionParserConfig::Format_MIN;
const CollectionParserConfig_Format CollectionParserConfig::Format_MAX;
const int CollectionParserConfig::Format_ARRAYSIZE;
#endif  // _MSC_VER
#ifndef _MSC_VER
const int CollectionParserConfig::kFormatFieldNumber;
const int CollectionParserConfig::kDocwordFilePathFieldNumber;
const int CollectionParserConfig::kVocabFilePathFieldNumber;
const int CollectionParserConfig::kTargetFolderFieldNumber;
const int CollectionParserConfig::kDictionaryFileNameFieldNumber;
const int CollectionParserConfig::kNumItemsPerBatchFieldNumber;
const int CollectionParserConfig::kCooccurrenceFileNameFieldNumber;
const int CollectionParserConfig::kCooccurrenceTokenFieldNumber;
#endif  // !_MSC_VER

CollectionParserConfig::CollectionParserConfig()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void CollectionParserConfig::InitAsDefaultInstance() {
}

CollectionParserConfig::CollectionParserConfig(const CollectionParserConfig& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void CollectionParserConfig::SharedCtor() {
  _cached_size_ = 0;
  format_ = 0;
  docword_file_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  vocab_file_path_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  target_folder_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  dictionary_file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  num_items_per_batch_ = 1000;
  cooccurrence_file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

CollectionParserConfig::~CollectionParserConfig() {
  SharedDtor();
}

void CollectionParserConfig::SharedDtor() {
  if (docword_file_path_ != &::google::protobuf::internal::GetEmptyString()) {
    delete docword_file_path_;
  }
  if (vocab_file_path_ != &::google::protobuf::internal::GetEmptyString()) {
    delete vocab_file_path_;
  }
  if (target_folder_ != &::google::protobuf::internal::GetEmptyString()) {
    delete target_folder_;
  }
  if (dictionary_file_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete dictionary_file_name_;
  }
  if (cooccurrence_file_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete cooccurrence_file_name_;
  }
  if (this != default_instance_) {
  }
}

void CollectionParserConfig::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CollectionParserConfig::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return CollectionParserConfig_descriptor_;
}

const CollectionParserConfig& CollectionParserConfig::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

CollectionParserConfig* CollectionParserConfig::default_instance_ = NULL;

CollectionParserConfig* CollectionParserConfig::New() const {
  return new CollectionParserConfig;
}

void CollectionParserConfig::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    format_ = 0;
    if (has_docword_file_path()) {
      if (docword_file_path_ != &::google::protobuf::internal::GetEmptyString()) {
        docword_file_path_->clear();
      }
    }
    if (has_vocab_file_path()) {
      if (vocab_file_path_ != &::google::protobuf::internal::GetEmptyString()) {
        vocab_file_path_->clear();
      }
    }
    if (has_target_folder()) {
      if (target_folder_ != &::google::protobuf::internal::GetEmptyString()) {
        target_folder_->clear();
      }
    }
    if (has_dictionary_file_name()) {
      if (dictionary_file_name_ != &::google::protobuf::internal::GetEmptyString()) {
        dictionary_file_name_->clear();
      }
    }
    num_items_per_batch_ = 1000;
    if (has_cooccurrence_file_name()) {
      if (cooccurrence_file_name_ != &::google::protobuf::internal::GetEmptyString()) {
        cooccurrence_file_name_->clear();
      }
    }
  }
  cooccurrence_token_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool CollectionParserConfig::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .artm.CollectionParserConfig.Format format = 1 [default = BagOfWordsUci];
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::artm::CollectionParserConfig_Format_IsValid(value)) {
            set_format(static_cast< ::artm::CollectionParserConfig_Format >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_docword_file_path;
        break;
      }

      // optional string docword_file_path = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_docword_file_path:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_docword_file_path()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->docword_file_path().data(), this->docword_file_path().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_vocab_file_path;
        break;
      }

      // optional string vocab_file_path = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_vocab_file_path:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_vocab_file_path()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->vocab_file_path().data(), this->vocab_file_path().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_target_folder;
        break;
      }

      // optional string target_folder = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_target_folder:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_target_folder()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->target_folder().data(), this->target_folder().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(42)) goto parse_dictionary_file_name;
        break;
      }

      // optional string dictionary_file_name = 5;
      case 5: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_dictionary_file_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_dictionary_file_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->dictionary_file_name().data(), this->dictionary_file_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(48)) goto parse_num_items_per_batch;
        break;
      }

      // optional int32 num_items_per_batch = 6 [default = 1000];
      case 6: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_num_items_per_batch:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &num_items_per_batch_)));
          set_has_num_items_per_batch();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(58)) goto parse_cooccurrence_file_name;
        break;
      }

      // optional string cooccurrence_file_name = 7;
      case 7: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_cooccurrence_file_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_cooccurrence_file_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->cooccurrence_file_name().data(), this->cooccurrence_file_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(66)) goto parse_cooccurrence_token;
        break;
      }

      // repeated string cooccurrence_token = 8;
      case 8: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_cooccurrence_token:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_cooccurrence_token()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->cooccurrence_token(this->cooccurrence_token_size() - 1).data(),
            this->cooccurrence_token(this->cooccurrence_token_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(66)) goto parse_cooccurrence_token;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void CollectionParserConfig::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional .artm.CollectionParserConfig.Format format = 1 [default = BagOfWordsUci];
  if (has_format()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->format(), output);
  }

  // optional string docword_file_path = 2;
  if (has_docword_file_path()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->docword_file_path().data(), this->docword_file_path().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->docword_file_path(), output);
  }

  // optional string vocab_file_path = 3;
  if (has_vocab_file_path()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->vocab_file_path().data(), this->vocab_file_path().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->vocab_file_path(), output);
  }

  // optional string target_folder = 4;
  if (has_target_folder()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->target_folder().data(), this->target_folder().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->target_folder(), output);
  }

  // optional string dictionary_file_name = 5;
  if (has_dictionary_file_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->dictionary_file_name().data(), this->dictionary_file_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      5, this->dictionary_file_name(), output);
  }

  // optional int32 num_items_per_batch = 6 [default = 1000];
  if (has_num_items_per_batch()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->num_items_per_batch(), output);
  }

  // optional string cooccurrence_file_name = 7;
  if (has_cooccurrence_file_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->cooccurrence_file_name().data(), this->cooccurrence_file_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      7, this->cooccurrence_file_name(), output);
  }

  // repeated string cooccurrence_token = 8;
  for (int i = 0; i < this->cooccurrence_token_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->cooccurrence_token(i).data(), this->cooccurrence_token(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      8, this->cooccurrence_token(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* CollectionParserConfig::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional .artm.CollectionParserConfig.Format format = 1 [default = BagOfWordsUci];
  if (has_format()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->format(), target);
  }

  // optional string docword_file_path = 2;
  if (has_docword_file_path()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->docword_file_path().data(), this->docword_file_path().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->docword_file_path(), target);
  }

  // optional string vocab_file_path = 3;
  if (has_vocab_file_path()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->vocab_file_path().data(), this->vocab_file_path().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->vocab_file_path(), target);
  }

  // optional string target_folder = 4;
  if (has_target_folder()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->target_folder().data(), this->target_folder().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->target_folder(), target);
  }

  // optional string dictionary_file_name = 5;
  if (has_dictionary_file_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->dictionary_file_name().data(), this->dictionary_file_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        5, this->dictionary_file_name(), target);
  }

  // optional int32 num_items_per_batch = 6 [default = 1000];
  if (has_num_items_per_batch()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->num_items_per_batch(), target);
  }

  // optional string cooccurrence_file_name = 7;
  if (has_cooccurrence_file_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->cooccurrence_file_name().data(), this->cooccurrence_file_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        7, this->cooccurrence_file_name(), target);
  }

  // repeated string cooccurrence_token = 8;
  for (int i = 0; i < this->cooccurrence_token_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->cooccurrence_token(i).data(), this->cooccurrence_token(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(8, this->cooccurrence_token(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int CollectionParserConfig::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional .artm.CollectionParserConfig.Format format = 1 [default = BagOfWordsUci];
    if (has_format()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->format());
    }

    // optional string docword_file_path = 2;
    if (has_docword_file_path()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->docword_file_path());
    }

    // optional string vocab_file_path = 3;
    if (has_vocab_file_path()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->vocab_file_path());
    }

    // optional string target_folder = 4;
    if (has_target_folder()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->target_folder());
    }

    // optional string dictionary_file_name = 5;
    if (has_dictionary_file_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->dictionary_file_name());
    }

    // optional int32 num_items_per_batch = 6 [default = 1000];
    if (has_num_items_per_batch()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->num_items_per_batch());
    }

    // optional string cooccurrence_file_name = 7;
    if (has_cooccurrence_file_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->cooccurrence_file_name());
    }

  }
  // repeated string cooccurrence_token = 8;
  total_size += 1 * this->cooccurrence_token_size();
  for (int i = 0; i < this->cooccurrence_token_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->cooccurrence_token(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void CollectionParserConfig::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const CollectionParserConfig* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const CollectionParserConfig*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void CollectionParserConfig::MergeFrom(const CollectionParserConfig& from) {
  GOOGLE_CHECK_NE(&from, this);
  cooccurrence_token_.MergeFrom(from.cooccurrence_token_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_format()) {
      set_format(from.format());
    }
    if (from.has_docword_file_path()) {
      set_docword_file_path(from.docword_file_path());
    }
    if (from.has_vocab_file_path()) {
      set_vocab_file_path(from.vocab_file_path());
    }
    if (from.has_target_folder()) {
      set_target_folder(from.target_folder());
    }
    if (from.has_dictionary_file_name()) {
      set_dictionary_file_name(from.dictionary_file_name());
    }
    if (from.has_num_items_per_batch()) {
      set_num_items_per_batch(from.num_items_per_batch());
    }
    if (from.has_cooccurrence_file_name()) {
      set_cooccurrence_file_name(from.cooccurrence_file_name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void CollectionParserConfig::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void CollectionParserConfig::CopyFrom(const CollectionParserConfig& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool CollectionParserConfig::IsInitialized() const {

  return true;
}

void CollectionParserConfig::Swap(CollectionParserConfig* other) {
  if (other != this) {
    std::swap(format_, other->format_);
    std::swap(docword_file_path_, other->docword_file_path_);
    std::swap(vocab_file_path_, other->vocab_file_path_);
    std::swap(target_folder_, other->target_folder_);
    std::swap(dictionary_file_name_, other->dictionary_file_name_);
    std::swap(num_items_per_batch_, other->num_items_per_batch_);
    std::swap(cooccurrence_file_name_, other->cooccurrence_file_name_);
    cooccurrence_token_.Swap(&other->cooccurrence_token_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata CollectionParserConfig::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = CollectionParserConfig_descriptor_;
  metadata.reflection = CollectionParserConfig_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int SynchronizeModelArgs::kModelNameFieldNumber;
const int SynchronizeModelArgs::kDecayWeightFieldNumber;
const int SynchronizeModelArgs::kInvokeRegularizersFieldNumber;
const int SynchronizeModelArgs::kApplyWeightFieldNumber;
#endif  // !_MSC_VER

SynchronizeModelArgs::SynchronizeModelArgs()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void SynchronizeModelArgs::InitAsDefaultInstance() {
}

SynchronizeModelArgs::SynchronizeModelArgs(const SynchronizeModelArgs& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void SynchronizeModelArgs::SharedCtor() {
  _cached_size_ = 0;
  model_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  decay_weight_ = 1;
  invoke_regularizers_ = true;
  apply_weight_ = 1;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

SynchronizeModelArgs::~SynchronizeModelArgs() {
  SharedDtor();
}

void SynchronizeModelArgs::SharedDtor() {
  if (model_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete model_name_;
  }
  if (this != default_instance_) {
  }
}

void SynchronizeModelArgs::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SynchronizeModelArgs::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SynchronizeModelArgs_descriptor_;
}

const SynchronizeModelArgs& SynchronizeModelArgs::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

SynchronizeModelArgs* SynchronizeModelArgs::default_instance_ = NULL;

SynchronizeModelArgs* SynchronizeModelArgs::New() const {
  return new SynchronizeModelArgs;
}

void SynchronizeModelArgs::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_model_name()) {
      if (model_name_ != &::google::protobuf::internal::GetEmptyString()) {
        model_name_->clear();
      }
    }
    decay_weight_ = 1;
    invoke_regularizers_ = true;
    apply_weight_ = 1;
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool SynchronizeModelArgs::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string model_name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_model_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->model_name().data(), this->model_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(21)) goto parse_decay_weight;
        break;
      }

      // optional float decay_weight = 2 [default = 1];
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_decay_weight:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &decay_weight_)));
          set_has_decay_weight();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(24)) goto parse_invoke_regularizers;
        break;
      }

      // optional bool invoke_regularizers = 3 [default = true];
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_invoke_regularizers:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &invoke_regularizers_)));
          set_has_invoke_regularizers();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(37)) goto parse_apply_weight;
        break;
      }

      // optional float apply_weight = 4 [default = 1];
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
         parse_apply_weight:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &apply_weight_)));
          set_has_apply_weight();
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void SynchronizeModelArgs::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string model_name = 1;
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->model_name(), output);
  }

  // optional float decay_weight = 2 [default = 1];
  if (has_decay_weight()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->decay_weight(), output);
  }

  // optional bool invoke_regularizers = 3 [default = true];
  if (has_invoke_regularizers()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->invoke_regularizers(), output);
  }

  // optional float apply_weight = 4 [default = 1];
  if (has_apply_weight()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->apply_weight(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* SynchronizeModelArgs::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string model_name = 1;
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->model_name(), target);
  }

  // optional float decay_weight = 2 [default = 1];
  if (has_decay_weight()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->decay_weight(), target);
  }

  // optional bool invoke_regularizers = 3 [default = true];
  if (has_invoke_regularizers()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->invoke_regularizers(), target);
  }

  // optional float apply_weight = 4 [default = 1];
  if (has_apply_weight()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->apply_weight(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int SynchronizeModelArgs::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string model_name = 1;
    if (has_model_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->model_name());
    }

    // optional float decay_weight = 2 [default = 1];
    if (has_decay_weight()) {
      total_size += 1 + 4;
    }

    // optional bool invoke_regularizers = 3 [default = true];
    if (has_invoke_regularizers()) {
      total_size += 1 + 1;
    }

    // optional float apply_weight = 4 [default = 1];
    if (has_apply_weight()) {
      total_size += 1 + 4;
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SynchronizeModelArgs::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const SynchronizeModelArgs* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const SynchronizeModelArgs*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void SynchronizeModelArgs::MergeFrom(const SynchronizeModelArgs& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_model_name()) {
      set_model_name(from.model_name());
    }
    if (from.has_decay_weight()) {
      set_decay_weight(from.decay_weight());
    }
    if (from.has_invoke_regularizers()) {
      set_invoke_regularizers(from.invoke_regularizers());
    }
    if (from.has_apply_weight()) {
      set_apply_weight(from.apply_weight());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void SynchronizeModelArgs::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void SynchronizeModelArgs::CopyFrom(const SynchronizeModelArgs& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SynchronizeModelArgs::IsInitialized() const {

  return true;
}

void SynchronizeModelArgs::Swap(SynchronizeModelArgs* other) {
  if (other != this) {
    std::swap(model_name_, other->model_name_);
    std::swap(decay_weight_, other->decay_weight_);
    std::swap(invoke_regularizers_, other->invoke_regularizers_);
    std::swap(apply_weight_, other->apply_weight_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata SynchronizeModelArgs::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SynchronizeModelArgs_descriptor_;
  metadata.reflection = SynchronizeModelArgs_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int InitializeModelArgs::kModelNameFieldNumber;
const int InitializeModelArgs::kDictionaryNameFieldNumber;
#endif  // !_MSC_VER

InitializeModelArgs::InitializeModelArgs()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void InitializeModelArgs::InitAsDefaultInstance() {
}

InitializeModelArgs::InitializeModelArgs(const InitializeModelArgs& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void InitializeModelArgs::SharedCtor() {
  _cached_size_ = 0;
  model_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  dictionary_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

InitializeModelArgs::~InitializeModelArgs() {
  SharedDtor();
}

void InitializeModelArgs::SharedDtor() {
  if (model_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete model_name_;
  }
  if (dictionary_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete dictionary_name_;
  }
  if (this != default_instance_) {
  }
}

void InitializeModelArgs::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* InitializeModelArgs::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return InitializeModelArgs_descriptor_;
}

const InitializeModelArgs& InitializeModelArgs::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

InitializeModelArgs* InitializeModelArgs::default_instance_ = NULL;

InitializeModelArgs* InitializeModelArgs::New() const {
  return new InitializeModelArgs;
}

void InitializeModelArgs::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_model_name()) {
      if (model_name_ != &::google::protobuf::internal::GetEmptyString()) {
        model_name_->clear();
      }
    }
    if (has_dictionary_name()) {
      if (dictionary_name_ != &::google::protobuf::internal::GetEmptyString()) {
        dictionary_name_->clear();
      }
    }
  }
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool InitializeModelArgs::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string model_name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_model_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->model_name().data(), this->model_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_dictionary_name;
        break;
      }

      // optional string dictionary_name = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_dictionary_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_dictionary_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->dictionary_name().data(), this->dictionary_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void InitializeModelArgs::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string model_name = 1;
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->model_name(), output);
  }

  // optional string dictionary_name = 2;
  if (has_dictionary_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->dictionary_name().data(), this->dictionary_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->dictionary_name(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* InitializeModelArgs::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string model_name = 1;
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->model_name(), target);
  }

  // optional string dictionary_name = 2;
  if (has_dictionary_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->dictionary_name().data(), this->dictionary_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->dictionary_name(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int InitializeModelArgs::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string model_name = 1;
    if (has_model_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->model_name());
    }

    // optional string dictionary_name = 2;
    if (has_dictionary_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->dictionary_name());
    }

  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void InitializeModelArgs::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const InitializeModelArgs* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const InitializeModelArgs*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void InitializeModelArgs::MergeFrom(const InitializeModelArgs& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_model_name()) {
      set_model_name(from.model_name());
    }
    if (from.has_dictionary_name()) {
      set_dictionary_name(from.dictionary_name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void InitializeModelArgs::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void InitializeModelArgs::CopyFrom(const InitializeModelArgs& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool InitializeModelArgs::IsInitialized() const {

  return true;
}

void InitializeModelArgs::Swap(InitializeModelArgs* other) {
  if (other != this) {
    std::swap(model_name_, other->model_name_);
    std::swap(dictionary_name_, other->dictionary_name_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata InitializeModelArgs::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = InitializeModelArgs_descriptor_;
  metadata.reflection = InitializeModelArgs_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int GetTopicModelArgs::kModelNameFieldNumber;
const int GetTopicModelArgs::kTopicNameFieldNumber;
const int GetTopicModelArgs::kTokenFieldNumber;
const int GetTopicModelArgs::kClassIdFieldNumber;
#endif  // !_MSC_VER

GetTopicModelArgs::GetTopicModelArgs()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void GetTopicModelArgs::InitAsDefaultInstance() {
}

GetTopicModelArgs::GetTopicModelArgs(const GetTopicModelArgs& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void GetTopicModelArgs::SharedCtor() {
  _cached_size_ = 0;
  model_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

GetTopicModelArgs::~GetTopicModelArgs() {
  SharedDtor();
}

void GetTopicModelArgs::SharedDtor() {
  if (model_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete model_name_;
  }
  if (this != default_instance_) {
  }
}

void GetTopicModelArgs::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* GetTopicModelArgs::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return GetTopicModelArgs_descriptor_;
}

const GetTopicModelArgs& GetTopicModelArgs::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

GetTopicModelArgs* GetTopicModelArgs::default_instance_ = NULL;

GetTopicModelArgs* GetTopicModelArgs::New() const {
  return new GetTopicModelArgs;
}

void GetTopicModelArgs::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_model_name()) {
      if (model_name_ != &::google::protobuf::internal::GetEmptyString()) {
        model_name_->clear();
      }
    }
  }
  topic_name_.Clear();
  token_.Clear();
  class_id_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool GetTopicModelArgs::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string model_name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_model_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->model_name().data(), this->model_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_topic_name;
        if (input->ExpectTag(26)) goto parse_token;
        break;
      }

      // repeated string token = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_token:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_token()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->token(this->token_size() - 1).data(),
            this->token(this->token_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_token;
        if (input->ExpectTag(34)) goto parse_class_id;
        break;
      }

      // repeated string class_id = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_class_id:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_class_id()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->class_id(this->class_id_size() - 1).data(),
            this->class_id(this->class_id_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(34)) goto parse_class_id;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void GetTopicModelArgs::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string model_name = 1;
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->model_name(), output);
  }

  // repeated string topic_name = 2;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->topic_name(i), output);
  }

  // repeated string token = 3;
  for (int i = 0; i < this->token_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->token(i).data(), this->token(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->token(i), output);
  }

  // repeated string class_id = 4;
  for (int i = 0; i < this->class_id_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->class_id(i).data(), this->class_id(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->class_id(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* GetTopicModelArgs::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string model_name = 1;
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->model_name(), target);
  }

  // repeated string topic_name = 2;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->topic_name(i), target);
  }

  // repeated string token = 3;
  for (int i = 0; i < this->token_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->token(i).data(), this->token(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->token(i), target);
  }

  // repeated string class_id = 4;
  for (int i = 0; i < this->class_id_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->class_id(i).data(), this->class_id(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->class_id(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int GetTopicModelArgs::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string model_name = 1;
    if (has_model_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->model_name());
    }

  }
  // repeated string topic_name = 2;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  // repeated string token = 3;
  total_size += 1 * this->token_size();
  for (int i = 0; i < this->token_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->token(i));
  }

  // repeated string class_id = 4;
  total_size += 1 * this->class_id_size();
  for (int i = 0; i < this->class_id_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->class_id(i));
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void GetTopicModelArgs::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const GetTopicModelArgs* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const GetTopicModelArgs*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void GetTopicModelArgs::MergeFrom(const GetTopicModelArgs& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  token_.MergeFrom(from.token_);
  class_id_.MergeFrom(from.class_id_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_model_name()) {
      set_model_name(from.model_name());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void GetTopicModelArgs::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void GetTopicModelArgs::CopyFrom(const GetTopicModelArgs& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetTopicModelArgs::IsInitialized() const {

  return true;
}

void GetTopicModelArgs::Swap(GetTopicModelArgs* other) {
  if (other != this) {
    std::swap(model_name_, other->model_name_);
    topic_name_.Swap(&other->topic_name_);
    token_.Swap(&other->token_);
    class_id_.Swap(&other->class_id_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata GetTopicModelArgs::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = GetTopicModelArgs_descriptor_;
  metadata.reflection = GetTopicModelArgs_reflection_;
  return metadata;
}


// ===================================================================

#ifndef _MSC_VER
const int GetThetaMatrixArgs::kModelNameFieldNumber;
const int GetThetaMatrixArgs::kBatchFieldNumber;
const int GetThetaMatrixArgs::kTopicNameFieldNumber;
const int GetThetaMatrixArgs::kTopicIndexFieldNumber;
#endif  // !_MSC_VER

GetThetaMatrixArgs::GetThetaMatrixArgs()
  : ::google::protobuf::Message() {
  SharedCtor();
}

void GetThetaMatrixArgs::InitAsDefaultInstance() {
  batch_ = const_cast< ::artm::Batch*>(&::artm::Batch::default_instance());
}

GetThetaMatrixArgs::GetThetaMatrixArgs(const GetThetaMatrixArgs& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
}

void GetThetaMatrixArgs::SharedCtor() {
  _cached_size_ = 0;
  model_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyString());
  batch_ = NULL;
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

GetThetaMatrixArgs::~GetThetaMatrixArgs() {
  SharedDtor();
}

void GetThetaMatrixArgs::SharedDtor() {
  if (model_name_ != &::google::protobuf::internal::GetEmptyString()) {
    delete model_name_;
  }
  if (this != default_instance_) {
    delete batch_;
  }
}

void GetThetaMatrixArgs::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* GetThetaMatrixArgs::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return GetThetaMatrixArgs_descriptor_;
}

const GetThetaMatrixArgs& GetThetaMatrixArgs::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_artm_2fmessages_2eproto();
  return *default_instance_;
}

GetThetaMatrixArgs* GetThetaMatrixArgs::default_instance_ = NULL;

GetThetaMatrixArgs* GetThetaMatrixArgs::New() const {
  return new GetThetaMatrixArgs;
}

void GetThetaMatrixArgs::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_model_name()) {
      if (model_name_ != &::google::protobuf::internal::GetEmptyString()) {
        model_name_->clear();
      }
    }
    if (has_batch()) {
      if (batch_ != NULL) batch_->::artm::Batch::Clear();
    }
  }
  topic_name_.Clear();
  topic_index_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
  mutable_unknown_fields()->Clear();
}

bool GetThetaMatrixArgs::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  ::google::protobuf::uint32 tag;
  while ((tag = input->ReadTag()) != 0) {
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string model_name = 1;
      case 1: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_model_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->model_name().data(), this->model_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(18)) goto parse_batch;
        break;
      }

      // optional .artm.Batch batch = 2;
      case 2: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_batch:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_batch()));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        break;
      }

      // repeated string topic_name = 3;
      case 3: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
         parse_topic_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_topic_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8String(
            this->topic_name(this->topic_name_size() - 1).data(),
            this->topic_name(this->topic_name_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE);
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(26)) goto parse_topic_name;
        if (input->ExpectTag(32)) goto parse_topic_index;
        break;
      }

      // repeated int32 topic_index = 4;
      case 4: {
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
         parse_topic_index:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 32, input, this->mutable_topic_index())));
        } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
                   == ::google::protobuf::internal::WireFormatLite::
                      WIRETYPE_LENGTH_DELIMITED) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_topic_index())));
        } else {
          goto handle_uninterpreted;
        }
        if (input->ExpectTag(32)) goto parse_topic_index;
        if (input->ExpectAtEnd()) return true;
        break;
      }

      default: {
      handle_uninterpreted:
        if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          return true;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
  return true;
#undef DO_
}

void GetThetaMatrixArgs::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string model_name = 1;
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->model_name(), output);
  }

  // optional .artm.Batch batch = 2;
  if (has_batch()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->batch(), output);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
  ::google::protobuf::internal::WireFormat::VerifyUTF8String(
    this->topic_name(i).data(), this->topic_name(i).length(),
    ::google::protobuf::internal::WireFormat::SERIALIZE);
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->topic_name(i), output);
  }

  // repeated int32 topic_index = 4;
  for (int i = 0; i < this->topic_index_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      4, this->topic_index(i), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
}

::google::protobuf::uint8* GetThetaMatrixArgs::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // optional string model_name = 1;
  if (has_model_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->model_name().data(), this->model_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->model_name(), target);
  }

  // optional .artm.Batch batch = 2;
  if (has_batch()) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteMessageNoVirtualToArray(
        2, this->batch(), target);
  }

  // repeated string topic_name = 3;
  for (int i = 0; i < this->topic_name_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8String(
      this->topic_name(i).data(), this->topic_name(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE);
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->topic_name(i), target);
  }

  // repeated int32 topic_index = 4;
  for (int i = 0; i < this->topic_index_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(4, this->topic_index(i), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  return target;
}

int GetThetaMatrixArgs::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string model_name = 1;
    if (has_model_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->model_name());
    }

    // optional .artm.Batch batch = 2;
    if (has_batch()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->batch());
    }

  }
  // repeated string topic_name = 3;
  total_size += 1 * this->topic_name_size();
  for (int i = 0; i < this->topic_name_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->topic_name(i));
  }

  // repeated int32 topic_index = 4;
  {
    int data_size = 0;
    for (int i = 0; i < this->topic_index_size(); i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->topic_index(i));
    }
    total_size += 1 * this->topic_index_size() + data_size;
  }

  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void GetThetaMatrixArgs::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const GetThetaMatrixArgs* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const GetThetaMatrixArgs*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void GetThetaMatrixArgs::MergeFrom(const GetThetaMatrixArgs& from) {
  GOOGLE_CHECK_NE(&from, this);
  topic_name_.MergeFrom(from.topic_name_);
  topic_index_.MergeFrom(from.topic_index_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_model_name()) {
      set_model_name(from.model_name());
    }
    if (from.has_batch()) {
      mutable_batch()->::artm::Batch::MergeFrom(from.batch());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

void GetThetaMatrixArgs::CopyFrom(const ::google::protobuf::Message& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void GetThetaMatrixArgs::CopyFrom(const GetThetaMatrixArgs& from) {
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool GetThetaMatrixArgs::IsInitialized() const {

  return true;
}

void GetThetaMatrixArgs::Swap(GetThetaMatrixArgs* other) {
  if (other != this) {
    std::swap(model_name_, other->model_name_);
    std::swap(batch_, other->batch_);
    topic_name_.Swap(&other->topic_name_);
    topic_index_.Swap(&other->topic_index_);
    std::swap(_has_bits_[0], other->_has_bits_[0]);
    _unknown_fields_.Swap(&other->_unknown_fields_);
    std::swap(_cached_size_, other->_cached_size_);
  }
}

::google::protobuf::Metadata GetThetaMatrixArgs::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = GetThetaMatrixArgs_descriptor_;
  metadata.reflection = GetThetaMatrixArgs_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace artm

// @@protoc_insertion_point(global_scope)
