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

#include "translate_event.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
namespace metrics {
class TranslateEventProtoDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TranslateEventProto> _instance;
} _TranslateEventProto_default_instance_;
}  // namespace metrics
static void InitDefaultsscc_info_TranslateEventProto_translate_5fevent_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::metrics::_TranslateEventProto_default_instance_;
    new (ptr) ::metrics::TranslateEventProto();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::metrics::TranslateEventProto::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TranslateEventProto_translate_5fevent_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_TranslateEventProto_translate_5fevent_2eproto}, {}};

namespace metrics {
bool TranslateEventProto_RankerResponse_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> TranslateEventProto_RankerResponse_strings[3] = {};

static const char TranslateEventProto_RankerResponse_names[] =
  "DONT_SHOW"
  "NOT_QUERIED"
  "SHOW";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TranslateEventProto_RankerResponse_entries[] = {
  { {TranslateEventProto_RankerResponse_names + 0, 9}, 1 },
  { {TranslateEventProto_RankerResponse_names + 9, 11}, 2 },
  { {TranslateEventProto_RankerResponse_names + 20, 4}, 0 },
};

static const int TranslateEventProto_RankerResponse_entries_by_number[] = {
  2, // 0 -> SHOW
  0, // 1 -> DONT_SHOW
  1, // 2 -> NOT_QUERIED
};

const std::string& TranslateEventProto_RankerResponse_Name(
    TranslateEventProto_RankerResponse value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          TranslateEventProto_RankerResponse_entries,
          TranslateEventProto_RankerResponse_entries_by_number,
          3, TranslateEventProto_RankerResponse_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      TranslateEventProto_RankerResponse_entries,
      TranslateEventProto_RankerResponse_entries_by_number,
      3, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     TranslateEventProto_RankerResponse_strings[idx].get();
}
bool TranslateEventProto_RankerResponse_Parse(
    const std::string& name, TranslateEventProto_RankerResponse* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      TranslateEventProto_RankerResponse_entries, 3, name, &int_value);
  if (success) {
    *value = static_cast<TranslateEventProto_RankerResponse>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr TranslateEventProto_RankerResponse TranslateEventProto::SHOW;
constexpr TranslateEventProto_RankerResponse TranslateEventProto::DONT_SHOW;
constexpr TranslateEventProto_RankerResponse TranslateEventProto::NOT_QUERIED;
constexpr TranslateEventProto_RankerResponse TranslateEventProto::RankerResponse_MIN;
constexpr TranslateEventProto_RankerResponse TranslateEventProto::RankerResponse_MAX;
constexpr int TranslateEventProto::RankerResponse_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
bool TranslateEventProto_EventType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
    case 17:
    case 18:
    case 19:
    case 20:
    case 21:
    case 22:
    case 23:
    case 24:
    case 25:
    case 26:
    case 27:
      return true;
    default:
      return false;
  }
}

static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> TranslateEventProto_EventType_strings[28] = {};

static const char TranslateEventProto_EventType_names[] =
  "AUTOMATICALLY_TRANSLATED"
  "AUTO_TRANSLATION_BY_LINK"
  "AUTO_TRANSLATION_BY_PREF"
  "BROWSER_WINDOW_IS_INVALID"
  "BROWSER_WINDOW_IS_MINIMIZED"
  "BROWSER_WINDOW_NOT_ACTIVE"
  "DISABLED_BY_PREF"
  "DISABLED_BY_RANKER"
  "EDITABLE_FIELD_IS_ACTIVE"
  "INITIALIZATION_ERROR"
  "LANGUAGE_DISABLED_BY_AUTO_BLACKLIST"
  "LANGUAGE_DISABLED_BY_USER_CONFIG"
  "LANGUAGE_IN_ULP"
  "MATCHES_PREVIOUS_LANGUAGE"
  "UNKNOWN"
  "UNSUPPORTED_LANGUAGE"
  "UNSUPPORTED_URL"
  "URL_DISABLED_BY_USER_CONFIG"
  "USER_ACCEPT"
  "USER_ALWAYS_TRANSLATE_LANGUAGE"
  "USER_CONTEXT_MENU_TRANSLATE"
  "USER_DECLINE"
  "USER_DISMISS"
  "USER_IGNORE"
  "USER_NEVER_TRANSLATE_LANGUAGE"
  "USER_NEVER_TRANSLATE_SITE"
  "USER_REVERT"
  "WEB_CONTENTS_NOT_ACTIVE";

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TranslateEventProto_EventType_entries[] = {
  { {TranslateEventProto_EventType_names + 0, 24}, 10 },
  { {TranslateEventProto_EventType_names + 24, 24}, 26 },
  { {TranslateEventProto_EventType_names + 48, 24}, 25 },
  { {TranslateEventProto_EventType_names + 72, 25}, 19 },
  { {TranslateEventProto_EventType_names + 97, 27}, 21 },
  { {TranslateEventProto_EventType_names + 124, 25}, 20 },
  { {TranslateEventProto_EventType_names + 149, 16}, 11 },
  { {TranslateEventProto_EventType_names + 165, 18}, 15 },
  { {TranslateEventProto_EventType_names + 183, 24}, 23 },
  { {TranslateEventProto_EventType_names + 207, 20}, 27 },
  { {TranslateEventProto_EventType_names + 227, 35}, 14 },
  { {TranslateEventProto_EventType_names + 262, 32}, 12 },
  { {TranslateEventProto_EventType_names + 294, 15}, 24 },
  { {TranslateEventProto_EventType_names + 309, 25}, 18 },
  { {TranslateEventProto_EventType_names + 334, 7}, 0 },
  { {TranslateEventProto_EventType_names + 341, 20}, 16 },
  { {TranslateEventProto_EventType_names + 361, 15}, 17 },
  { {TranslateEventProto_EventType_names + 376, 27}, 13 },
  { {TranslateEventProto_EventType_names + 403, 11}, 2 },
  { {TranslateEventProto_EventType_names + 414, 30}, 7 },
  { {TranslateEventProto_EventType_names + 444, 27}, 8 },
  { {TranslateEventProto_EventType_names + 471, 12}, 1 },
  { {TranslateEventProto_EventType_names + 483, 12}, 3 },
  { {TranslateEventProto_EventType_names + 495, 11}, 4 },
  { {TranslateEventProto_EventType_names + 506, 29}, 5 },
  { {TranslateEventProto_EventType_names + 535, 25}, 6 },
  { {TranslateEventProto_EventType_names + 560, 11}, 9 },
  { {TranslateEventProto_EventType_names + 571, 23}, 22 },
};

static const int TranslateEventProto_EventType_entries_by_number[] = {
  14, // 0 -> UNKNOWN
  21, // 1 -> USER_DECLINE
  18, // 2 -> USER_ACCEPT
  22, // 3 -> USER_DISMISS
  23, // 4 -> USER_IGNORE
  24, // 5 -> USER_NEVER_TRANSLATE_LANGUAGE
  25, // 6 -> USER_NEVER_TRANSLATE_SITE
  19, // 7 -> USER_ALWAYS_TRANSLATE_LANGUAGE
  20, // 8 -> USER_CONTEXT_MENU_TRANSLATE
  26, // 9 -> USER_REVERT
  0, // 10 -> AUTOMATICALLY_TRANSLATED
  6, // 11 -> DISABLED_BY_PREF
  11, // 12 -> LANGUAGE_DISABLED_BY_USER_CONFIG
  17, // 13 -> URL_DISABLED_BY_USER_CONFIG
  10, // 14 -> LANGUAGE_DISABLED_BY_AUTO_BLACKLIST
  7, // 15 -> DISABLED_BY_RANKER
  15, // 16 -> UNSUPPORTED_LANGUAGE
  16, // 17 -> UNSUPPORTED_URL
  13, // 18 -> MATCHES_PREVIOUS_LANGUAGE
  3, // 19 -> BROWSER_WINDOW_IS_INVALID
  5, // 20 -> BROWSER_WINDOW_NOT_ACTIVE
  4, // 21 -> BROWSER_WINDOW_IS_MINIMIZED
  27, // 22 -> WEB_CONTENTS_NOT_ACTIVE
  8, // 23 -> EDITABLE_FIELD_IS_ACTIVE
  12, // 24 -> LANGUAGE_IN_ULP
  2, // 25 -> AUTO_TRANSLATION_BY_PREF
  1, // 26 -> AUTO_TRANSLATION_BY_LINK
  9, // 27 -> INITIALIZATION_ERROR
};

const std::string& TranslateEventProto_EventType_Name(
    TranslateEventProto_EventType value) {
  static const bool dummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          TranslateEventProto_EventType_entries,
          TranslateEventProto_EventType_entries_by_number,
          28, TranslateEventProto_EventType_strings);
  (void) dummy;
  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      TranslateEventProto_EventType_entries,
      TranslateEventProto_EventType_entries_by_number,
      28, value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
                     TranslateEventProto_EventType_strings[idx].get();
}
bool TranslateEventProto_EventType_Parse(
    const std::string& name, TranslateEventProto_EventType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      TranslateEventProto_EventType_entries, 28, name, &int_value);
  if (success) {
    *value = static_cast<TranslateEventProto_EventType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr TranslateEventProto_EventType TranslateEventProto::UNKNOWN;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_DECLINE;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_ACCEPT;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_DISMISS;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_IGNORE;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_NEVER_TRANSLATE_LANGUAGE;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_NEVER_TRANSLATE_SITE;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_ALWAYS_TRANSLATE_LANGUAGE;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_CONTEXT_MENU_TRANSLATE;
constexpr TranslateEventProto_EventType TranslateEventProto::USER_REVERT;
constexpr TranslateEventProto_EventType TranslateEventProto::AUTOMATICALLY_TRANSLATED;
constexpr TranslateEventProto_EventType TranslateEventProto::AUTO_TRANSLATION_BY_PREF;
constexpr TranslateEventProto_EventType TranslateEventProto::AUTO_TRANSLATION_BY_LINK;
constexpr TranslateEventProto_EventType TranslateEventProto::DISABLED_BY_PREF;
constexpr TranslateEventProto_EventType TranslateEventProto::LANGUAGE_DISABLED_BY_USER_CONFIG;
constexpr TranslateEventProto_EventType TranslateEventProto::URL_DISABLED_BY_USER_CONFIG;
constexpr TranslateEventProto_EventType TranslateEventProto::LANGUAGE_DISABLED_BY_AUTO_BLACKLIST;
constexpr TranslateEventProto_EventType TranslateEventProto::DISABLED_BY_RANKER;
constexpr TranslateEventProto_EventType TranslateEventProto::UNSUPPORTED_LANGUAGE;
constexpr TranslateEventProto_EventType TranslateEventProto::UNSUPPORTED_URL;
constexpr TranslateEventProto_EventType TranslateEventProto::MATCHES_PREVIOUS_LANGUAGE;
constexpr TranslateEventProto_EventType TranslateEventProto::BROWSER_WINDOW_IS_INVALID;
constexpr TranslateEventProto_EventType TranslateEventProto::BROWSER_WINDOW_NOT_ACTIVE;
constexpr TranslateEventProto_EventType TranslateEventProto::BROWSER_WINDOW_IS_MINIMIZED;
constexpr TranslateEventProto_EventType TranslateEventProto::WEB_CONTENTS_NOT_ACTIVE;
constexpr TranslateEventProto_EventType TranslateEventProto::EDITABLE_FIELD_IS_ACTIVE;
constexpr TranslateEventProto_EventType TranslateEventProto::LANGUAGE_IN_ULP;
constexpr TranslateEventProto_EventType TranslateEventProto::INITIALIZATION_ERROR;
constexpr TranslateEventProto_EventType TranslateEventProto::EventType_MIN;
constexpr TranslateEventProto_EventType TranslateEventProto::EventType_MAX;
constexpr int TranslateEventProto::EventType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)

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

void TranslateEventProto::InitAsDefaultInstance() {
}
class TranslateEventProto::_Internal {
 public:
  using HasBits = decltype(std::declval<TranslateEventProto>()._has_bits_);
  static void set_has_source_language(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_target_language(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_country(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_accept_count(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_decline_count(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_ignore_count(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_ranker_version(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_ranker_request_timestamp_sec(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_ranker_response(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_event_type(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_event_timestamp_sec(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_modified_source_language(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_modified_target_language(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

TranslateEventProto::TranslateEventProto()
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:metrics.TranslateEventProto)
}
TranslateEventProto::TranslateEventProto(const TranslateEventProto& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
      _internal_metadata_(nullptr),
      _has_bits_(from._has_bits_),
      language_list_(from.language_list_),
      decision_overrides_(from.decision_overrides_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  source_language_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from.has_source_language()) {
    source_language_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.source_language_);
  }
  target_language_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from.has_target_language()) {
    target_language_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.target_language_);
  }
  modified_source_language_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from.has_modified_source_language()) {
    modified_source_language_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.modified_source_language_);
  }
  modified_target_language_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from.has_modified_target_language()) {
    modified_target_language_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.modified_target_language_);
  }
  country_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (from.has_country()) {
    country_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.country_);
  }
  ::memcpy(&accept_count_, &from.accept_count_,
    static_cast<size_t>(reinterpret_cast<char*>(&ranker_response_) -
    reinterpret_cast<char*>(&accept_count_)) + sizeof(ranker_response_));
  // @@protoc_insertion_point(copy_constructor:metrics.TranslateEventProto)
}

void TranslateEventProto::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TranslateEventProto_translate_5fevent_2eproto.base);
  source_language_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  target_language_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  modified_source_language_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  modified_target_language_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  country_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::memset(&accept_count_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&event_type_) -
      reinterpret_cast<char*>(&accept_count_)) + sizeof(event_type_));
  ranker_response_ = 2;
}

TranslateEventProto::~TranslateEventProto() {
  // @@protoc_insertion_point(destructor:metrics.TranslateEventProto)
  SharedDtor();
}

void TranslateEventProto::SharedDtor() {
  source_language_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  target_language_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  modified_source_language_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  modified_target_language_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  country_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void TranslateEventProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const TranslateEventProto& TranslateEventProto::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TranslateEventProto_translate_5fevent_2eproto.base);
  return *internal_default_instance();
}


void TranslateEventProto::Clear() {
// @@protoc_insertion_point(message_clear_start:metrics.TranslateEventProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  language_list_.Clear();
  decision_overrides_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      source_language_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000002u) {
      target_language_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000004u) {
      modified_source_language_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000008u) {
      modified_target_language_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000010u) {
      country_.ClearNonDefaultToEmptyNoArena();
    }
  }
  if (cached_has_bits & 0x000000e0u) {
    ::memset(&accept_count_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&ignore_count_) -
        reinterpret_cast<char*>(&accept_count_)) + sizeof(ignore_count_));
  }
  if (cached_has_bits & 0x00001f00u) {
    ::memset(&ranker_version_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&event_type_) -
        reinterpret_cast<char*>(&ranker_version_)) + sizeof(event_type_));
    ranker_response_ = 2;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* TranslateEventProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // optional string source_language = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_source_language(), ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional string target_language = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_target_language(), ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 accept_count = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_accept_count(&has_bits);
          accept_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 decline_count = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
          _Internal::set_has_decline_count(&has_bits);
          decline_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 ignore_count = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
          _Internal::set_has_ignore_count(&has_bits);
          ignore_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated string language_list = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(add_language_list(), ptr, ctx);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50);
        } else goto handle_unusual;
        continue;
      // optional uint32 ranker_version = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
          _Internal::set_has_ranker_version(&has_bits);
          ranker_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int64 ranker_request_timestamp_sec = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
          _Internal::set_has_ranker_request_timestamp_sec(&has_bits);
          ranker_request_timestamp_sec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional .metrics.TranslateEventProto.RankerResponse ranker_response = 9 [default = NOT_QUERIED];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::metrics::TranslateEventProto_RankerResponse_IsValid(val))) {
            set_ranker_response(static_cast<::metrics::TranslateEventProto_RankerResponse>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields());
          }
        } else goto handle_unusual;
        continue;
      // optional .metrics.TranslateEventProto.EventType event_type = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::metrics::TranslateEventProto_EventType_IsValid(val))) {
            set_event_type(static_cast<::metrics::TranslateEventProto_EventType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields());
          }
        } else goto handle_unusual;
        continue;
      // optional int64 event_timestamp_sec = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) {
          _Internal::set_has_event_timestamp_sec(&has_bits);
          event_timestamp_sec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional string modified_source_language = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_modified_source_language(), ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional string modified_target_language = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_modified_target_language(), ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional string country = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_country(), ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .metrics.TranslateEventProto.EventType decision_overrides = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) {
          ptr -= 1;
          do {
            ptr += 1;
            ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
            CHK_(ptr);
            if (PROTOBUF_PREDICT_TRUE(::metrics::TranslateEventProto_EventType_IsValid(val))) {
              add_decision_overrides(static_cast<::metrics::TranslateEventProto_EventType>(val));
            } else {
              ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(15, val, mutable_unknown_fields());
            }
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 120);
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(mutable_decision_overrides(), ptr, ctx, ::metrics::TranslateEventProto_EventType_IsValid, &_internal_metadata_, 15);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}
#else  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool TranslateEventProto::MergePartialFromCodedStream(
    ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  ::PROTOBUF_NAMESPACE_ID::internal::LiteUnknownFieldSetter unknown_fields_setter(
      &_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::io::StringOutputStream unknown_fields_output(
      unknown_fields_setter.buffer());
  ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_output, false);
  // @@protoc_insertion_point(parse_start:metrics.TranslateEventProto)
  for (;;) {
    ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string source_language = 1;
      case 1: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
                input, this->mutable_source_language()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string target_language = 2;
      case 2: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
                input, this->mutable_target_language()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 accept_count = 3;
      case 3: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
          _Internal::set_has_accept_count(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
                 input, &accept_count_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 decline_count = 4;
      case 4: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
          _Internal::set_has_decline_count(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
                 input, &decline_count_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 ignore_count = 5;
      case 5: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
          _Internal::set_has_ignore_count(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
                 input, &ignore_count_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string language_list = 6;
      case 6: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
                input, this->add_language_list()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional uint32 ranker_version = 7;
      case 7: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) {
          _Internal::set_has_ranker_version(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>(
                 input, &ranker_version_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 ranker_request_timestamp_sec = 8;
      case 8: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) {
          _Internal::set_has_ranker_request_timestamp_sec(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
                 input, &ranker_request_timestamp_sec_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .metrics.TranslateEventProto.RankerResponse ranker_response = 9 [default = NOT_QUERIED];
      case 9: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) {
          int value = 0;
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::metrics::TranslateEventProto_RankerResponse_IsValid(value)) {
            set_ranker_response(static_cast< ::metrics::TranslateEventProto_RankerResponse >(value));
          } else {
            unknown_fields_stream.WriteVarint32(72u);
            unknown_fields_stream.WriteVarint32(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint32>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .metrics.TranslateEventProto.EventType event_type = 10;
      case 10: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) {
          int value = 0;
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::metrics::TranslateEventProto_EventType_IsValid(value)) {
            set_event_type(static_cast< ::metrics::TranslateEventProto_EventType >(value));
          } else {
            unknown_fields_stream.WriteVarint32(80u);
            unknown_fields_stream.WriteVarint32(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint32>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 event_timestamp_sec = 11;
      case 11: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) {
          _Internal::set_has_event_timestamp_sec(&_has_bits_);
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
                 input, &event_timestamp_sec_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string modified_source_language = 12;
      case 12: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (98 & 0xFF)) {
          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
                input, this->mutable_modified_source_language()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string modified_target_language = 13;
      case 13: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (106 & 0xFF)) {
          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
                input, this->mutable_modified_target_language()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string country = 14;
      case 14: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (114 & 0xFF)) {
          DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
                input, this->mutable_country()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .metrics.TranslateEventProto.EventType decision_overrides = 15;
      case 15: {
        if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (120 & 0xFF)) {
          int value = 0;
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
                   int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::metrics::TranslateEventProto_EventType_IsValid(value)) {
            add_decision_overrides(static_cast< ::metrics::TranslateEventProto_EventType >(value));
          } else {
            unknown_fields_stream.WriteVarint32(tag);
            unknown_fields_stream.WriteVarint32(
                static_cast<::PROTOBUF_NAMESPACE_ID::uint32>(value));
          }
        } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) {
          DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedEnumPreserveUnknowns(
                 input,
                 15,
                 ::metrics::TranslateEventProto_EventType_IsValid,
                 &unknown_fields_stream,
                 this->mutable_decision_overrides())));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:metrics.TranslateEventProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:metrics.TranslateEventProto)
  return false;
#undef DO_
}
#endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER

void TranslateEventProto::SerializeWithCachedSizes(
    ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:metrics.TranslateEventProto)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string source_language = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->source_language(), output);
  }

  // optional string target_language = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->target_language(), output);
  }

  // optional int32 accept_count = 3;
  if (cached_has_bits & 0x00000020u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->accept_count(), output);
  }

  // optional int32 decline_count = 4;
  if (cached_has_bits & 0x00000040u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->decline_count(), output);
  }

  // optional int32 ignore_count = 5;
  if (cached_has_bits & 0x00000080u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(5, this->ignore_count(), output);
  }

  // repeated string language_list = 6;
  for (int i = 0, n = this->language_list_size(); i < n; i++) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
      6, this->language_list(i), output);
  }

  // optional uint32 ranker_version = 7;
  if (cached_has_bits & 0x00000100u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32(7, this->ranker_version(), output);
  }

  // optional int64 ranker_request_timestamp_sec = 8;
  if (cached_has_bits & 0x00000200u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(8, this->ranker_request_timestamp_sec(), output);
  }

  // optional .metrics.TranslateEventProto.RankerResponse ranker_response = 9 [default = NOT_QUERIED];
  if (cached_has_bits & 0x00001000u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
      9, this->ranker_response(), output);
  }

  // optional .metrics.TranslateEventProto.EventType event_type = 10;
  if (cached_has_bits & 0x00000800u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
      10, this->event_type(), output);
  }

  // optional int64 event_timestamp_sec = 11;
  if (cached_has_bits & 0x00000400u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(11, this->event_timestamp_sec(), output);
  }

  // optional string modified_source_language = 12;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
      12, this->modified_source_language(), output);
  }

  // optional string modified_target_language = 13;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
      13, this->modified_target_language(), output);
  }

  // optional string country = 14;
  if (cached_has_bits & 0x00000010u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
      14, this->country(), output);
  }

  // repeated .metrics.TranslateEventProto.EventType decision_overrides = 15;
  for (int i = 0, n = this->decision_overrides_size(); i < n; i++) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
      15, this->decision_overrides(i), output);
  }

  output->WriteRaw(_internal_metadata_.unknown_fields().data(),
                   static_cast<int>(_internal_metadata_.unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:metrics.TranslateEventProto)
}

size_t TranslateEventProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:metrics.TranslateEventProto)
  size_t total_size = 0;

  total_size += _internal_metadata_.unknown_fields().size();

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string language_list = 6;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->language_list_size());
  for (int i = 0, n = this->language_list_size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      this->language_list(i));
  }

  // repeated .metrics.TranslateEventProto.EventType decision_overrides = 15;
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->decision_overrides_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
        this->decision_overrides(static_cast<int>(i)));
    }
    total_size += (1UL * count) + data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string source_language = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->source_language());
    }

    // optional string target_language = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->target_language());
    }

    // optional string modified_source_language = 12;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->modified_source_language());
    }

    // optional string modified_target_language = 13;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->modified_target_language());
    }

    // optional string country = 14;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->country());
    }

    // optional int32 accept_count = 3;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->accept_count());
    }

    // optional int32 decline_count = 4;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->decline_count());
    }

    // optional int32 ignore_count = 5;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->ignore_count());
    }

  }
  if (cached_has_bits & 0x00001f00u) {
    // optional uint32 ranker_version = 7;
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->ranker_version());
    }

    // optional int64 ranker_request_timestamp_sec = 8;
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
          this->ranker_request_timestamp_sec());
    }

    // optional int64 event_timestamp_sec = 11;
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
          this->event_timestamp_sec());
    }

    // optional .metrics.TranslateEventProto.EventType event_type = 10;
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->event_type());
    }

    // optional .metrics.TranslateEventProto.RankerResponse ranker_response = 9 [default = NOT_QUERIED];
    if (cached_has_bits & 0x00001000u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->ranker_response());
    }

  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TranslateEventProto::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const TranslateEventProto*>(
      &from));
}

void TranslateEventProto::MergeFrom(const TranslateEventProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:metrics.TranslateEventProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  language_list_.MergeFrom(from.language_list_);
  decision_overrides_.MergeFrom(from.decision_overrides_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _has_bits_[0] |= 0x00000001u;
      source_language_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.source_language_);
    }
    if (cached_has_bits & 0x00000002u) {
      _has_bits_[0] |= 0x00000002u;
      target_language_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.target_language_);
    }
    if (cached_has_bits & 0x00000004u) {
      _has_bits_[0] |= 0x00000004u;
      modified_source_language_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.modified_source_language_);
    }
    if (cached_has_bits & 0x00000008u) {
      _has_bits_[0] |= 0x00000008u;
      modified_target_language_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.modified_target_language_);
    }
    if (cached_has_bits & 0x00000010u) {
      _has_bits_[0] |= 0x00000010u;
      country_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.country_);
    }
    if (cached_has_bits & 0x00000020u) {
      accept_count_ = from.accept_count_;
    }
    if (cached_has_bits & 0x00000040u) {
      decline_count_ = from.decline_count_;
    }
    if (cached_has_bits & 0x00000080u) {
      ignore_count_ = from.ignore_count_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      ranker_version_ = from.ranker_version_;
    }
    if (cached_has_bits & 0x00000200u) {
      ranker_request_timestamp_sec_ = from.ranker_request_timestamp_sec_;
    }
    if (cached_has_bits & 0x00000400u) {
      event_timestamp_sec_ = from.event_timestamp_sec_;
    }
    if (cached_has_bits & 0x00000800u) {
      event_type_ = from.event_type_;
    }
    if (cached_has_bits & 0x00001000u) {
      ranker_response_ = from.ranker_response_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void TranslateEventProto::CopyFrom(const TranslateEventProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:metrics.TranslateEventProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TranslateEventProto::IsInitialized() const {
  return true;
}

void TranslateEventProto::InternalSwap(TranslateEventProto* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  language_list_.InternalSwap(CastToBase(&other->language_list_));
  decision_overrides_.InternalSwap(&other->decision_overrides_);
  source_language_.Swap(&other->source_language_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  target_language_.Swap(&other->target_language_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  modified_source_language_.Swap(&other->modified_source_language_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  modified_target_language_.Swap(&other->modified_target_language_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  country_.Swap(&other->country_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(accept_count_, other->accept_count_);
  swap(decline_count_, other->decline_count_);
  swap(ignore_count_, other->ignore_count_);
  swap(ranker_version_, other->ranker_version_);
  swap(ranker_request_timestamp_sec_, other->ranker_request_timestamp_sec_);
  swap(event_timestamp_sec_, other->event_timestamp_sec_);
  swap(event_type_, other->event_type_);
  swap(ranker_response_, other->ranker_response_);
}

std::string TranslateEventProto::GetTypeName() const {
  return "metrics.TranslateEventProto";
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace metrics
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::metrics::TranslateEventProto* Arena::CreateMaybeMessage< ::metrics::TranslateEventProto >(Arena* arena) {
  return Arena::CreateInternal< ::metrics::TranslateEventProto >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
