// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: api/logtracer/client/v1/tracer.proto

#include "tracer.pb.h"

#include <algorithm>

#include <herogoogle/protobuf/io/coded_stream.h>
#include <herogoogle/protobuf/extension_set.h>
#include <herogoogle/protobuf/wire_format_lite.h>
#include <herogoogle/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)


PROTOBUF_PRAGMA_INIT_SEG
namespace logtracer {
namespace client {
namespace v1 {
constexpr LogReportRequest::LogReportRequest(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : items_()
  , device_id_(&::herogoogle::protobuf::internal::fixed_address_empty_string){}
struct LogReportRequestDefaultTypeInternal {
  constexpr LogReportRequestDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~LogReportRequestDefaultTypeInternal() {}
  union {
    LogReportRequest _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LogReportRequestDefaultTypeInternal _LogReportRequest_default_instance_;
constexpr LogReportItem::LogReportItem(
  ::herogoogle::protobuf::internal::ConstantInitialized)
  : account_id_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , log_type_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , content_(&::herogoogle::protobuf::internal::fixed_address_empty_string)
  , timestamp_(int64_t{0})
  , level_(0)
{}
struct LogReportItemDefaultTypeInternal {
  constexpr LogReportItemDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~LogReportItemDefaultTypeInternal() {}
  union {
    LogReportItem _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LogReportItemDefaultTypeInternal _LogReportItem_default_instance_;
constexpr LogReportResponse::LogReportResponse(
  ::herogoogle::protobuf::internal::ConstantInitialized){}
struct LogReportResponseDefaultTypeInternal {
  constexpr LogReportResponseDefaultTypeInternal()
    : _instance(::herogoogle::protobuf::internal::ConstantInitialized{}) {}
  ~LogReportResponseDefaultTypeInternal() {}
  union {
    LogReportResponse _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LogReportResponseDefaultTypeInternal _LogReportResponse_default_instance_;
}  // namespace v1
}  // namespace client
}  // namespace logtracer
namespace logtracer {
namespace client {
namespace v1 {
bool LogLevel_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}

static ::herogoogle::protobuf::internal::ExplicitlyConstructed<std::string> LogLevel_strings[5] = {};

static const char LogLevel_names[] =
  "LEVEL_DEBUG"
  "LEVEL_ERROR"
  "LEVEL_FATAL"
  "LEVEL_INFO"
  "LEVEL_WARN";

static const ::herogoogle::protobuf::internal::EnumEntry LogLevel_entries[] = {
  { {LogLevel_names + 0, 11}, 1 },
  { {LogLevel_names + 11, 11}, 3 },
  { {LogLevel_names + 22, 11}, 4 },
  { {LogLevel_names + 33, 10}, 0 },
  { {LogLevel_names + 43, 10}, 2 },
};

static const int LogLevel_entries_by_number[] = {
  3, // 0 -> LEVEL_INFO
  0, // 1 -> LEVEL_DEBUG
  4, // 2 -> LEVEL_WARN
  1, // 3 -> LEVEL_ERROR
  2, // 4 -> LEVEL_FATAL
};

const std::string& LogLevel_Name(
    LogLevel value) {
  static const bool dummy =
      ::herogoogle::protobuf::internal::InitializeEnumStrings(
          LogLevel_entries,
          LogLevel_entries_by_number,
          5, LogLevel_strings);
  (void) dummy;
  int idx = ::herogoogle::protobuf::internal::LookUpEnumName(
      LogLevel_entries,
      LogLevel_entries_by_number,
      5, value);
  return idx == -1 ? ::herogoogle::protobuf::internal::GetEmptyString() :
                     LogLevel_strings[idx].get();
}
bool LogLevel_Parse(
    ::herogoogle::protobuf::ConstStringParam name, LogLevel* value) {
  int int_value;
  bool success = ::herogoogle::protobuf::internal::LookUpEnumValue(
      LogLevel_entries, 5, name, &int_value);
  if (success) {
    *value = static_cast<LogLevel>(int_value);
  }
  return success;
}

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

class LogReportRequest::_Internal {
 public:
};

LogReportRequest::LogReportRequest(::herogoogle::protobuf::Arena* arena,
                         bool is_message_owned)
  : ::herogoogle::protobuf::MessageLite(arena, is_message_owned),
  items_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:logtracer.client.v1.LogReportRequest)
}
LogReportRequest::LogReportRequest(const LogReportRequest& from)
  : ::herogoogle::protobuf::MessageLite(),
      items_(from.items_) {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  device_id_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_device_id().empty()) {
    device_id_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device_id(), 
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:logtracer.client.v1.LogReportRequest)
}

void LogReportRequest::SharedCtor() {
device_id_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
}

LogReportRequest::~LogReportRequest() {
  // @@protoc_insertion_point(destructor:logtracer.client.v1.LogReportRequest)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void LogReportRequest::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  device_id_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
}

void LogReportRequest::ArenaDtor(void* object) {
  LogReportRequest* _this = reinterpret_cast< LogReportRequest* >(object);
  (void)_this;
}
void LogReportRequest::RegisterArenaDtor(::herogoogle::protobuf::Arena*) {
}
void LogReportRequest::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void LogReportRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:logtracer.client.v1.LogReportRequest)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  items_.Clear();
  device_id_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* LogReportRequest::_InternalParse(const char* ptr, ::herogoogle::protobuf::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::herogoogle::protobuf::uint32 tag;
    ptr = ::herogoogle::protobuf::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // string device_id = 1 [(.validate.rules) = {
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 10)) {
          auto str = _internal_mutable_device_id();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .logtracer.client.v1.LogReportItem items = 2 [(.validate.rules) = {
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_items(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::herogoogle::protobuf::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::herogoogle::protobuf::uint8* LogReportRequest::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:logtracer.client.v1.LogReportRequest)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string device_id = 1 [(.validate.rules) = {
  if (!this->_internal_device_id().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_device_id().data(), static_cast<int>(this->_internal_device_id().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "logtracer.client.v1.LogReportRequest.device_id");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_device_id(), target);
  }

  // repeated .logtracer.client.v1.LogReportItem items = 2 [(.validate.rules) = {
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_items_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_items(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:logtracer.client.v1.LogReportRequest)
  return target;
}

size_t LogReportRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:logtracer.client.v1.LogReportRequest)
  size_t total_size = 0;

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

  // repeated .logtracer.client.v1.LogReportItem items = 2 [(.validate.rules) = {
  total_size += 1UL * this->_internal_items_size();
  for (const auto& msg : this->items_) {
    total_size +=
      ::herogoogle::protobuf::internal::WireFormatLite::MessageSize(msg);
  }

  // string device_id = 1 [(.validate.rules) = {
  if (!this->_internal_device_id().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_device_id());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).size();
  }
  int cached_size = ::herogoogle::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void LogReportRequest::CheckTypeAndMergeFrom(
    const ::herogoogle::protobuf::MessageLite& from) {
  MergeFrom(*::herogoogle::protobuf::internal::DownCast<const LogReportRequest*>(
      &from));
}

void LogReportRequest::MergeFrom(const LogReportRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:logtracer.client.v1.LogReportRequest)
  GOOGLE_DCHECK_NE(&from, this);
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  items_.MergeFrom(from.items_);
  if (!from._internal_device_id().empty()) {
    _internal_set_device_id(from._internal_device_id());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void LogReportRequest::CopyFrom(const LogReportRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:logtracer.client.v1.LogReportRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void LogReportRequest::InternalSwap(LogReportRequest* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  items_.InternalSwap(&other->items_);
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &device_id_, lhs_arena,
      &other->device_id_, rhs_arena
  );
}

std::string LogReportRequest::GetTypeName() const {
  return "logtracer.client.v1.LogReportRequest";
}


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

class LogReportItem::_Internal {
 public:
};

LogReportItem::LogReportItem(::herogoogle::protobuf::Arena* arena,
                         bool is_message_owned)
  : ::herogoogle::protobuf::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:logtracer.client.v1.LogReportItem)
}
LogReportItem::LogReportItem(const LogReportItem& from)
  : ::herogoogle::protobuf::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  account_id_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_account_id().empty()) {
    account_id_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_account_id(), 
      GetArenaForAllocation());
  }
  log_type_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_log_type().empty()) {
    log_type_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_log_type(), 
      GetArenaForAllocation());
  }
  content_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_content().empty()) {
    content_.Set(::herogoogle::protobuf::internal::ArenaStringPtr::EmptyDefault{}, from._internal_content(), 
      GetArenaForAllocation());
  }
  ::memcpy(&timestamp_, &from.timestamp_,
    static_cast<size_t>(reinterpret_cast<char*>(&level_) -
    reinterpret_cast<char*>(&timestamp_)) + sizeof(level_));
  // @@protoc_insertion_point(copy_constructor:logtracer.client.v1.LogReportItem)
}

void LogReportItem::SharedCtor() {
account_id_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
log_type_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
content_.UnsafeSetDefault(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&timestamp_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&level_) -
    reinterpret_cast<char*>(&timestamp_)) + sizeof(level_));
}

LogReportItem::~LogReportItem() {
  // @@protoc_insertion_point(destructor:logtracer.client.v1.LogReportItem)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void LogReportItem::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  account_id_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  log_type_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
  content_.DestroyNoArena(&::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited());
}

void LogReportItem::ArenaDtor(void* object) {
  LogReportItem* _this = reinterpret_cast< LogReportItem* >(object);
  (void)_this;
}
void LogReportItem::RegisterArenaDtor(::herogoogle::protobuf::Arena*) {
}
void LogReportItem::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void LogReportItem::Clear() {
// @@protoc_insertion_point(message_clear_start:logtracer.client.v1.LogReportItem)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  account_id_.ClearToEmpty();
  log_type_.ClearToEmpty();
  content_.ClearToEmpty();
  ::memset(&timestamp_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&level_) -
      reinterpret_cast<char*>(&timestamp_)) + sizeof(level_));
  _internal_metadata_.Clear<std::string>();
}

const char* LogReportItem::_InternalParse(const char* ptr, ::herogoogle::protobuf::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::herogoogle::protobuf::uint32 tag;
    ptr = ::herogoogle::protobuf::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int64 timestamp = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 8)) {
          timestamp_ = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string account_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 18)) {
          auto str = _internal_mutable_account_id();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .logtracer.client.v1.LogLevel level = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 24)) {
          ::herogoogle::protobuf::uint64 val = ::herogoogle::protobuf::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          _internal_set_level(static_cast<::logtracer::client::v1::LogLevel>(val));
        } else
          goto handle_unusual;
        continue;
      // string log_type = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 34)) {
          auto str = _internal_mutable_log_type();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string content = 5 [(.validate.rules) = {
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::herogoogle::protobuf::uint8>(tag) == 42)) {
          auto str = _internal_mutable_content();
          ptr = ::herogoogle::protobuf::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::herogoogle::protobuf::internal::VerifyUTF8(str, nullptr));
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::herogoogle::protobuf::uint8* LogReportItem::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:logtracer.client.v1.LogReportItem)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 timestamp = 1;
  if (this->_internal_timestamp() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_timestamp(), target);
  }

  // string account_id = 2;
  if (!this->_internal_account_id().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_account_id().data(), static_cast<int>(this->_internal_account_id().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "logtracer.client.v1.LogReportItem.account_id");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_account_id(), target);
  }

  // .logtracer.client.v1.LogLevel level = 3;
  if (this->_internal_level() != 0) {
    target = stream->EnsureSpace(target);
    target = ::herogoogle::protobuf::internal::WireFormatLite::WriteEnumToArray(
      3, this->_internal_level(), target);
  }

  // string log_type = 4;
  if (!this->_internal_log_type().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_log_type().data(), static_cast<int>(this->_internal_log_type().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "logtracer.client.v1.LogReportItem.log_type");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_log_type(), target);
  }

  // string content = 5 [(.validate.rules) = {
  if (!this->_internal_content().empty()) {
    ::herogoogle::protobuf::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_content().data(), static_cast<int>(this->_internal_content().length()),
      ::herogoogle::protobuf::internal::WireFormatLite::SERIALIZE,
      "logtracer.client.v1.LogReportItem.content");
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_content(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:logtracer.client.v1.LogReportItem)
  return target;
}

size_t LogReportItem::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:logtracer.client.v1.LogReportItem)
  size_t total_size = 0;

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

  // string account_id = 2;
  if (!this->_internal_account_id().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_account_id());
  }

  // string log_type = 4;
  if (!this->_internal_log_type().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_log_type());
  }

  // string content = 5 [(.validate.rules) = {
  if (!this->_internal_content().empty()) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::StringSize(
        this->_internal_content());
  }

  // int64 timestamp = 1;
  if (this->_internal_timestamp() != 0) {
    total_size += ::herogoogle::protobuf::internal::WireFormatLite::Int64SizePlusOne(this->_internal_timestamp());
  }

  // .logtracer.client.v1.LogLevel level = 3;
  if (this->_internal_level() != 0) {
    total_size += 1 +
      ::herogoogle::protobuf::internal::WireFormatLite::EnumSize(this->_internal_level());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).size();
  }
  int cached_size = ::herogoogle::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void LogReportItem::CheckTypeAndMergeFrom(
    const ::herogoogle::protobuf::MessageLite& from) {
  MergeFrom(*::herogoogle::protobuf::internal::DownCast<const LogReportItem*>(
      &from));
}

void LogReportItem::MergeFrom(const LogReportItem& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:logtracer.client.v1.LogReportItem)
  GOOGLE_DCHECK_NE(&from, this);
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_account_id().empty()) {
    _internal_set_account_id(from._internal_account_id());
  }
  if (!from._internal_log_type().empty()) {
    _internal_set_log_type(from._internal_log_type());
  }
  if (!from._internal_content().empty()) {
    _internal_set_content(from._internal_content());
  }
  if (from._internal_timestamp() != 0) {
    _internal_set_timestamp(from._internal_timestamp());
  }
  if (from._internal_level() != 0) {
    _internal_set_level(from._internal_level());
  }
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void LogReportItem::CopyFrom(const LogReportItem& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:logtracer.client.v1.LogReportItem)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void LogReportItem::InternalSwap(LogReportItem* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &account_id_, lhs_arena,
      &other->account_id_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &log_type_, lhs_arena,
      &other->log_type_, rhs_arena
  );
  ::herogoogle::protobuf::internal::ArenaStringPtr::InternalSwap(
      &::herogoogle::protobuf::internal::GetEmptyStringAlreadyInited(),
      &content_, lhs_arena,
      &other->content_, rhs_arena
  );
  ::herogoogle::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LogReportItem, level_)
      + sizeof(LogReportItem::level_)
      - PROTOBUF_FIELD_OFFSET(LogReportItem, timestamp_)>(
          reinterpret_cast<char*>(&timestamp_),
          reinterpret_cast<char*>(&other->timestamp_));
}

std::string LogReportItem::GetTypeName() const {
  return "logtracer.client.v1.LogReportItem";
}


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

class LogReportResponse::_Internal {
 public:
};

LogReportResponse::LogReportResponse(::herogoogle::protobuf::Arena* arena,
                         bool is_message_owned)
  : ::herogoogle::protobuf::MessageLite(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:logtracer.client.v1.LogReportResponse)
}
LogReportResponse::LogReportResponse(const LogReportResponse& from)
  : ::herogoogle::protobuf::MessageLite() {
  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:logtracer.client.v1.LogReportResponse)
}

void LogReportResponse::SharedCtor() {
}

LogReportResponse::~LogReportResponse() {
  // @@protoc_insertion_point(destructor:logtracer.client.v1.LogReportResponse)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<std::string>();
}

inline void LogReportResponse::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void LogReportResponse::ArenaDtor(void* object) {
  LogReportResponse* _this = reinterpret_cast< LogReportResponse* >(object);
  (void)_this;
}
void LogReportResponse::RegisterArenaDtor(::herogoogle::protobuf::Arena*) {
}
void LogReportResponse::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void LogReportResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:logtracer.client.v1.LogReportResponse)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _internal_metadata_.Clear<std::string>();
}

const char* LogReportResponse::_InternalParse(const char* ptr, ::herogoogle::protobuf::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::herogoogle::protobuf::uint32 tag;
    ptr = ::herogoogle::protobuf::internal::ReadTag(ptr, &tag);
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::herogoogle::protobuf::uint8* LogReportResponse::_InternalSerialize(
    ::herogoogle::protobuf::uint8* target, ::herogoogle::protobuf::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:logtracer.client.v1.LogReportResponse)
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:logtracer.client.v1.LogReportResponse)
  return target;
}

size_t LogReportResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:logtracer.client.v1.LogReportResponse)
  size_t total_size = 0;

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    total_size += _internal_metadata_.unknown_fields<std::string>(::herogoogle::protobuf::internal::GetEmptyString).size();
  }
  int cached_size = ::herogoogle::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void LogReportResponse::CheckTypeAndMergeFrom(
    const ::herogoogle::protobuf::MessageLite& from) {
  MergeFrom(*::herogoogle::protobuf::internal::DownCast<const LogReportResponse*>(
      &from));
}

void LogReportResponse::MergeFrom(const LogReportResponse& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:logtracer.client.v1.LogReportResponse)
  GOOGLE_DCHECK_NE(&from, this);
  ::herogoogle::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void LogReportResponse::CopyFrom(const LogReportResponse& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:logtracer.client.v1.LogReportResponse)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void LogReportResponse::InternalSwap(LogReportResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
}

std::string LogReportResponse::GetTypeName() const {
  return "logtracer.client.v1.LogReportResponse";
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace client
}  // namespace logtracer
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::logtracer::client::v1::LogReportRequest* Arena::CreateMaybeMessage< ::logtracer::client::v1::LogReportRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::logtracer::client::v1::LogReportRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::logtracer::client::v1::LogReportItem* Arena::CreateMaybeMessage< ::logtracer::client::v1::LogReportItem >(Arena* arena) {
  return Arena::CreateMessageInternal< ::logtracer::client::v1::LogReportItem >(arena);
}
template<> PROTOBUF_NOINLINE ::logtracer::client::v1::LogReportResponse* Arena::CreateMaybeMessage< ::logtracer::client::v1::LogReportResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::logtracer::client::v1::LogReportResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)

