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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "mysql_logger.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 mysql_logger {

namespace {

const ::google::protobuf::Descriptor* event_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  event_reflection_ = NULL;

}  // namespace


void protobuf_AssignDesc_mysql_5flogger_2eproto() {
  protobuf_AddDesc_mysql_5flogger_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "mysql_logger.proto");
  GOOGLE_CHECK(file != NULL);
  event_descriptor_ = file->message_type(0);
  static const int event_offsets_[9] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, thread_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, username_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, schemaname_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, start_time_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, end_time_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, query_digest_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, query_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, server_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, client_),
  };
  event_reflection_ =
    new ::google::protobuf::internal::GeneratedMessageReflection(
      event_descriptor_,
      event::default_instance_,
      event_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, _has_bits_[0]),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(event, _unknown_fields_),
      -1,
      ::google::protobuf::DescriptorPool::generated_pool(),
      ::google::protobuf::MessageFactory::generated_factory(),
      sizeof(event));
}

namespace {

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

void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
    event_descriptor_, &event::default_instance());
}

}  // namespace

void protobuf_ShutdownFile_mysql_5flogger_2eproto() {
  delete event::default_instance_;
  delete event_reflection_;
}

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

  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\022mysql_logger.proto\022\014mysql_logger\"\253\001\n\005e"
    "vent\022\021\n\tthread_id\030\001 \002(\r\022\020\n\010username\030\002 \002("
    "\t\022\022\n\nschemaname\030\003 \002(\t\022\022\n\nstart_time\030\004 \002("
    "\004\022\020\n\010end_time\030\005 \002(\004\022\024\n\014query_digest\030\006 \001("
    "\004\022\r\n\005query\030\007 \002(\t\022\016\n\006server\030\010 \001(\t\022\016\n\006clie"
    "nt\030\t \001(\t", 208);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "mysql_logger.proto", &protobuf_RegisterTypes);
  event::default_instance_ = new event();
  event::default_instance_->InitAsDefaultInstance();
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_mysql_5flogger_2eproto);
}

// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_mysql_5flogger_2eproto {
  StaticDescriptorInitializer_mysql_5flogger_2eproto() {
    protobuf_AddDesc_mysql_5flogger_2eproto();
  }
} static_descriptor_initializer_mysql_5flogger_2eproto_;

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

#ifndef _MSC_VER
const int event::kThreadIdFieldNumber;
const int event::kUsernameFieldNumber;
const int event::kSchemanameFieldNumber;
const int event::kStartTimeFieldNumber;
const int event::kEndTimeFieldNumber;
const int event::kQueryDigestFieldNumber;
const int event::kQueryFieldNumber;
const int event::kServerFieldNumber;
const int event::kClientFieldNumber;
#endif  // !_MSC_VER

event::event()
  : ::google::protobuf::Message() {
  SharedCtor();
  // @@protoc_insertion_point(constructor:mysql_logger.event)
}

void event::InitAsDefaultInstance() {
}

event::event(const event& from)
  : ::google::protobuf::Message() {
  SharedCtor();
  MergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:mysql_logger.event)
}

void event::SharedCtor() {
  ::google::protobuf::internal::GetEmptyString();
  _cached_size_ = 0;
  thread_id_ = 0u;
  username_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  schemaname_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  start_time_ = GOOGLE_ULONGLONG(0);
  end_time_ = GOOGLE_ULONGLONG(0);
  query_digest_ = GOOGLE_ULONGLONG(0);
  query_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  server_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  client_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}

event::~event() {
  // @@protoc_insertion_point(destructor:mysql_logger.event)
  SharedDtor();
}

void event::SharedDtor() {
  if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete username_;
  }
  if (schemaname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete schemaname_;
  }
  if (query_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete query_;
  }
  if (server_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete server_;
  }
  if (client_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
    delete client_;
  }
  if (this != default_instance_) {
  }
}

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

const event& event::default_instance() {
  if (default_instance_ == NULL) protobuf_AddDesc_mysql_5flogger_2eproto();
  return *default_instance_;
}

event* event::default_instance_ = NULL;

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

void event::Clear() {
#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
  &reinterpret_cast<event*>(16)->f) - \
   reinterpret_cast<char*>(16))

#define ZR_(first, last) do {                              \
    size_t f = OFFSET_OF_FIELD_(first);                    \
    size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
    ::memset(&first, 0, n);                                \
  } while (0)

  if (_has_bits_[0 / 32] & 255) {
    ZR_(start_time_, query_digest_);
    thread_id_ = 0u;
    if (has_username()) {
      if (username_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
        username_->clear();
      }
    }
    if (has_schemaname()) {
      if (schemaname_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
        schemaname_->clear();
      }
    }
    if (has_query()) {
      if (query_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
        query_->clear();
      }
    }
    if (has_server()) {
      if (server_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
        server_->clear();
      }
    }
  }
  if (has_client()) {
    if (client_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
      client_->clear();
    }
  }

#undef OFFSET_OF_FIELD_
#undef ZR_

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

bool event::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:mysql_logger.event)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required uint32 thread_id = 1;
      case 1: {
        if (tag == 8) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &thread_id_)));
          set_has_thread_id();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_username;
        break;
      }

      // required string username = 2;
      case 2: {
        if (tag == 18) {
         parse_username:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_username()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->username().data(), this->username().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "username");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_schemaname;
        break;
      }

      // required string schemaname = 3;
      case 3: {
        if (tag == 26) {
         parse_schemaname:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_schemaname()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->schemaname().data(), this->schemaname().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "schemaname");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_start_time;
        break;
      }

      // required uint64 start_time = 4;
      case 4: {
        if (tag == 32) {
         parse_start_time:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &start_time_)));
          set_has_start_time();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_end_time;
        break;
      }

      // required uint64 end_time = 5;
      case 5: {
        if (tag == 40) {
         parse_end_time:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &end_time_)));
          set_has_end_time();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_query_digest;
        break;
      }

      // optional uint64 query_digest = 6;
      case 6: {
        if (tag == 48) {
         parse_query_digest:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
                 input, &query_digest_)));
          set_has_query_digest();
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(58)) goto parse_query;
        break;
      }

      // required string query = 7;
      case 7: {
        if (tag == 58) {
         parse_query:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_query()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->query().data(), this->query().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "query");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(66)) goto parse_server;
        break;
      }

      // optional string server = 8;
      case 8: {
        if (tag == 66) {
         parse_server:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_server()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->server().data(), this->server().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "server");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(74)) goto parse_client;
        break;
      }

      // optional string client = 9;
      case 9: {
        if (tag == 74) {
         parse_client:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_client()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->client().data(), this->client().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "client");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:mysql_logger.event)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:mysql_logger.event)
  return false;
#undef DO_
}

void event::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:mysql_logger.event)
  // required uint32 thread_id = 1;
  if (has_thread_id()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->thread_id(), output);
  }

  // required string username = 2;
  if (has_username()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->username().data(), this->username().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "username");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->username(), output);
  }

  // required string schemaname = 3;
  if (has_schemaname()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->schemaname().data(), this->schemaname().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "schemaname");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->schemaname(), output);
  }

  // required uint64 start_time = 4;
  if (has_start_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->start_time(), output);
  }

  // required uint64 end_time = 5;
  if (has_end_time()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(5, this->end_time(), output);
  }

  // optional uint64 query_digest = 6;
  if (has_query_digest()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->query_digest(), output);
  }

  // required string query = 7;
  if (has_query()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->query().data(), this->query().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "query");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      7, this->query(), output);
  }

  // optional string server = 8;
  if (has_server()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->server().data(), this->server().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "server");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      8, this->server(), output);
  }

  // optional string client = 9;
  if (has_client()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->client().data(), this->client().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "client");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      9, this->client(), output);
  }

  if (!unknown_fields().empty()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:mysql_logger.event)
}

::google::protobuf::uint8* event::SerializeWithCachedSizesToArray(
    ::google::protobuf::uint8* target) const {
  // @@protoc_insertion_point(serialize_to_array_start:mysql_logger.event)
  // required uint32 thread_id = 1;
  if (has_thread_id()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->thread_id(), target);
  }

  // required string username = 2;
  if (has_username()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->username().data(), this->username().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "username");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->username(), target);
  }

  // required string schemaname = 3;
  if (has_schemaname()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->schemaname().data(), this->schemaname().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "schemaname");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->schemaname(), target);
  }

  // required uint64 start_time = 4;
  if (has_start_time()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->start_time(), target);
  }

  // required uint64 end_time = 5;
  if (has_end_time()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(5, this->end_time(), target);
  }

  // optional uint64 query_digest = 6;
  if (has_query_digest()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->query_digest(), target);
  }

  // required string query = 7;
  if (has_query()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->query().data(), this->query().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "query");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        7, this->query(), target);
  }

  // optional string server = 8;
  if (has_server()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->server().data(), this->server().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "server");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        8, this->server(), target);
  }

  // optional string client = 9;
  if (has_client()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->client().data(), this->client().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "client");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        9, this->client(), target);
  }

  if (!unknown_fields().empty()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:mysql_logger.event)
  return target;
}

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

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required uint32 thread_id = 1;
    if (has_thread_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->thread_id());
    }

    // required string username = 2;
    if (has_username()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->username());
    }

    // required string schemaname = 3;
    if (has_schemaname()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->schemaname());
    }

    // required uint64 start_time = 4;
    if (has_start_time()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->start_time());
    }

    // required uint64 end_time = 5;
    if (has_end_time()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->end_time());
    }

    // optional uint64 query_digest = 6;
    if (has_query_digest()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
          this->query_digest());
    }

    // required string query = 7;
    if (has_query()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->query());
    }

    // optional string server = 8;
    if (has_server()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->server());
    }

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

  }
  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 event::MergeFrom(const ::google::protobuf::Message& from) {
  GOOGLE_CHECK_NE(&from, this);
  const event* source =
    ::google::protobuf::internal::dynamic_cast_if_available<const event*>(
      &from);
  if (source == NULL) {
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
    MergeFrom(*source);
  }
}

void event::MergeFrom(const event& from) {
  GOOGLE_CHECK_NE(&from, this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_thread_id()) {
      set_thread_id(from.thread_id());
    }
    if (from.has_username()) {
      set_username(from.username());
    }
    if (from.has_schemaname()) {
      set_schemaname(from.schemaname());
    }
    if (from.has_start_time()) {
      set_start_time(from.start_time());
    }
    if (from.has_end_time()) {
      set_end_time(from.end_time());
    }
    if (from.has_query_digest()) {
      set_query_digest(from.query_digest());
    }
    if (from.has_query()) {
      set_query(from.query());
    }
    if (from.has_server()) {
      set_server(from.server());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_client()) {
      set_client(from.client());
    }
  }
  mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}

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

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

bool event::IsInitialized() const {
  if ((_has_bits_[0] & 0x0000005f) != 0x0000005f) return false;

  return true;
}

void event::Swap(event* other) {
  if (other != this) {
    std::swap(thread_id_, other->thread_id_);
    std::swap(username_, other->username_);
    std::swap(schemaname_, other->schemaname_);
    std::swap(start_time_, other->start_time_);
    std::swap(end_time_, other->end_time_);
    std::swap(query_digest_, other->query_digest_);
    std::swap(query_, other->query_);
    std::swap(server_, other->server_);
    std::swap(client_, other->client_);
    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 event::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = event_descriptor_;
  metadata.reflection = event_reflection_;
  return metadata;
}


// @@protoc_insertion_point(namespace_scope)

}  // namespace mysql_logger

// @@protoc_insertion_point(global_scope)
