// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: keyapis/event/v1/keyapis_event_event_v1.proto

#include "keyapis/event/v1/keyapis_event_event_v1.pb.h"

#include <algorithm>
#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)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = ::PROTOBUF_NAMESPACE_ID::internal;
namespace keyapis {
namespace event {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR Event::Event(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.raised_at_)*/nullptr
  , /*decltype(_impl_.device_id_)*/nullptr
  , /*decltype(_impl_.company_id_)*/nullptr
  , /*decltype(_impl_.room_id_)*/nullptr
  , /*decltype(_impl_.relay_)*/nullptr
  , /*decltype(_impl_.user_id_)*/nullptr
  , /*decltype(_impl_.user_agent_)*/nullptr
  , /*decltype(_impl_.building_id_)*/nullptr
  , /*decltype(_impl_.orpon_id_)*/nullptr
  , /*decltype(_impl_.room_number_)*/nullptr
  , /*decltype(_impl_.ivr_phone_number_)*/nullptr
  , /*decltype(_impl_.guest_phone_number_)*/nullptr
  , /*decltype(_impl_.code_)*/nullptr
  , /*decltype(_impl_.rfid_)*/nullptr
  , /*decltype(_impl_.request_id_)*/nullptr
  , /*decltype(_impl_.dtmf_phone_number_)*/nullptr
  , /*decltype(_impl_.user_kind_)*/nullptr
  , /*decltype(_impl_.login_)*/nullptr
  , /*decltype(_impl_.password_)*/nullptr
  , /*decltype(_impl_.host_)*/nullptr
  , /*decltype(_impl_.device_model_)*/nullptr
  , /*decltype(_impl_.rfid_id_)*/nullptr
  , /*decltype(_impl_.code_id_)*/nullptr
  , /*decltype(_impl_.car_number_)*/nullptr
  , /*decltype(_impl_.os_)*/nullptr
  , /*decltype(_impl_.push_token_)*/nullptr
  , /*decltype(_impl_.camera_uid_)*/nullptr
  , /*decltype(_impl_.screenshot_url_)*/nullptr
  , /*decltype(_impl_.vehicle_)*/nullptr
  , /*decltype(_impl_.courier_company_name_)*/nullptr
  , /*decltype(_impl_.order_number_)*/nullptr
  , /*decltype(_impl_.courier_id_)*/nullptr
  , /*decltype(_impl_.type_)*/ 0

  , /*decltype(_impl_.device_type_)*/ 0
} {}
struct EventDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EventDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~EventDefaultTypeInternal() {}
  union {
    Event _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EventDefaultTypeInternal _Event_default_instance_;
}  // namespace v1
}  // namespace event
}  // namespace keyapis
namespace keyapis {
namespace event {
namespace v1 {
bool Event_Type_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:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Event_Type_strings[20] = {};

static const char Event_Type_names[] = {
    "API_OPEN_REMOTE"
    "CAR_NUMBER_OPEN_REMOTE"
    "CHANGE_PASSWORD"
    "CODE_OPEN_LOCAL"
    "DISPATCHER_DENIED_OPEN"
    "DISPATCHER_OPEN"
    "DTMF_OPEN_LOCAL"
    "DTMF_OPEN_REMOTE"
    "EMERGENCY_ALARM_OFF_REMOTE"
    "EMERGENCY_ALARM_ON_REMOTE"
    "EMERGENCY_ALARM_REMOTE"
    "EMERGENCY_MODE_OFF_REMOTE"
    "EMERGENCY_MODE_ON_REMOTE"
    "FACE_OPEN_REMOTE"
    "GET_CREDENTIALS"
    "PIN_CODE_OPEN_REMOTE"
    "RFID_OPEN_LOCAL"
    "TYPE_UNKNOWN"
    "USER_ENTRY"
    "VEHICLE_TYPE_OPEN_REMOTE"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Event_Type_entries[] =
    {
        {{&Event_Type_names[0], 15}, 1},
        {{&Event_Type_names[15], 22}, 14},
        {{&Event_Type_names[37], 15}, 11},
        {{&Event_Type_names[52], 15}, 7},
        {{&Event_Type_names[67], 22}, 18},
        {{&Event_Type_names[89], 15}, 17},
        {{&Event_Type_names[104], 15}, 13},
        {{&Event_Type_names[119], 16}, 4},
        {{&Event_Type_names[135], 26}, 15},
        {{&Event_Type_names[161], 25}, 16},
        {{&Event_Type_names[186], 22}, 9},
        {{&Event_Type_names[208], 25}, 6},
        {{&Event_Type_names[233], 24}, 5},
        {{&Event_Type_names[257], 16}, 2},
        {{&Event_Type_names[273], 15}, 10},
        {{&Event_Type_names[288], 20}, 3},
        {{&Event_Type_names[308], 15}, 8},
        {{&Event_Type_names[323], 12}, 0},
        {{&Event_Type_names[335], 10}, 12},
        {{&Event_Type_names[345], 24}, 19},
};

static const int Event_Type_entries_by_number[] = {
    17,  // 0 -> TYPE_UNKNOWN
    0,  // 1 -> API_OPEN_REMOTE
    13,  // 2 -> FACE_OPEN_REMOTE
    15,  // 3 -> PIN_CODE_OPEN_REMOTE
    7,  // 4 -> DTMF_OPEN_REMOTE
    12,  // 5 -> EMERGENCY_MODE_ON_REMOTE
    11,  // 6 -> EMERGENCY_MODE_OFF_REMOTE
    3,  // 7 -> CODE_OPEN_LOCAL
    16,  // 8 -> RFID_OPEN_LOCAL
    10,  // 9 -> EMERGENCY_ALARM_REMOTE
    14,  // 10 -> GET_CREDENTIALS
    2,  // 11 -> CHANGE_PASSWORD
    18,  // 12 -> USER_ENTRY
    6,  // 13 -> DTMF_OPEN_LOCAL
    1,  // 14 -> CAR_NUMBER_OPEN_REMOTE
    8,  // 15 -> EMERGENCY_ALARM_OFF_REMOTE
    9,  // 16 -> EMERGENCY_ALARM_ON_REMOTE
    5,  // 17 -> DISPATCHER_OPEN
    4,  // 18 -> DISPATCHER_DENIED_OPEN
    19,  // 19 -> VEHICLE_TYPE_OPEN_REMOTE
};

const std::string& Event_Type_Name(Event_Type value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Event_Type_entries, Event_Type_entries_by_number,
          20, Event_Type_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Event_Type_entries, Event_Type_entries_by_number, 20,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Event_Type_strings[idx].get();
}

bool Event_Type_Parse(absl::string_view name, Event_Type* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Event_Type_entries, 20, name, &int_value);
  if (success) {
    *value = static_cast<Event_Type>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr Event_Type Event::TYPE_UNKNOWN;
constexpr Event_Type Event::API_OPEN_REMOTE;
constexpr Event_Type Event::FACE_OPEN_REMOTE;
constexpr Event_Type Event::PIN_CODE_OPEN_REMOTE;
constexpr Event_Type Event::DTMF_OPEN_REMOTE;
constexpr Event_Type Event::EMERGENCY_MODE_ON_REMOTE;
constexpr Event_Type Event::EMERGENCY_MODE_OFF_REMOTE;
constexpr Event_Type Event::CODE_OPEN_LOCAL;
constexpr Event_Type Event::RFID_OPEN_LOCAL;
constexpr Event_Type Event::EMERGENCY_ALARM_REMOTE;
constexpr Event_Type Event::GET_CREDENTIALS;
constexpr Event_Type Event::CHANGE_PASSWORD;
constexpr Event_Type Event::USER_ENTRY;
constexpr Event_Type Event::DTMF_OPEN_LOCAL;
constexpr Event_Type Event::CAR_NUMBER_OPEN_REMOTE;
constexpr Event_Type Event::EMERGENCY_ALARM_OFF_REMOTE;
constexpr Event_Type Event::EMERGENCY_ALARM_ON_REMOTE;
constexpr Event_Type Event::DISPATCHER_OPEN;
constexpr Event_Type Event::DISPATCHER_DENIED_OPEN;
constexpr Event_Type Event::VEHICLE_TYPE_OPEN_REMOTE;
constexpr Event_Type Event::Type_MIN;
constexpr Event_Type Event::Type_MAX;
constexpr int Event::Type_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool Event_DeviceType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Event_DeviceType_strings[6] = {};

static const char Event_DeviceType_names[] = {
    "ACCESS_CONTROL_PANEL"
    "BARRIER"
    "DEVICE_TYPE_UNKNOWN"
    "GATE"
    "INTERCOM"
    "VIDEOCAMERA"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Event_DeviceType_entries[] =
    {
        {{&Event_DeviceType_names[0], 20}, 4},
        {{&Event_DeviceType_names[20], 7}, 2},
        {{&Event_DeviceType_names[27], 19}, 0},
        {{&Event_DeviceType_names[46], 4}, 3},
        {{&Event_DeviceType_names[50], 8}, 1},
        {{&Event_DeviceType_names[58], 11}, 5},
};

static const int Event_DeviceType_entries_by_number[] = {
    2,  // 0 -> DEVICE_TYPE_UNKNOWN
    4,  // 1 -> INTERCOM
    1,  // 2 -> BARRIER
    3,  // 3 -> GATE
    0,  // 4 -> ACCESS_CONTROL_PANEL
    5,  // 5 -> VIDEOCAMERA
};

const std::string& Event_DeviceType_Name(Event_DeviceType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Event_DeviceType_entries, Event_DeviceType_entries_by_number,
          6, Event_DeviceType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Event_DeviceType_entries, Event_DeviceType_entries_by_number, 6,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Event_DeviceType_strings[idx].get();
}

bool Event_DeviceType_Parse(absl::string_view name, Event_DeviceType* value) {
  int int_value;
  bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
      Event_DeviceType_entries, 6, name, &int_value);
  if (success) {
    *value = static_cast<Event_DeviceType>(int_value);
  }
  return success;
}
#if (__cplusplus < 201703) && \
  (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

constexpr Event_DeviceType Event::DEVICE_TYPE_UNKNOWN;
constexpr Event_DeviceType Event::INTERCOM;
constexpr Event_DeviceType Event::BARRIER;
constexpr Event_DeviceType Event::GATE;
constexpr Event_DeviceType Event::ACCESS_CONTROL_PANEL;
constexpr Event_DeviceType Event::VIDEOCAMERA;
constexpr Event_DeviceType Event::DeviceType_MIN;
constexpr Event_DeviceType Event::DeviceType_MAX;
constexpr int Event::DeviceType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
// ===================================================================

class Event::_Internal {
 public:
  using HasBits = decltype(std::declval<Event>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Event, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& raised_at(const Event* msg);
  static void set_has_raised_at(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& device_id(const Event* msg);
  static void set_has_device_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& company_id(const Event* msg);
  static void set_has_company_id(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& room_id(const Event* msg);
  static void set_has_room_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& relay(const Event* msg);
  static void set_has_relay(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& user_id(const Event* msg);
  static void set_has_user_id(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& user_agent(const Event* msg);
  static void set_has_user_agent(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& building_id(const Event* msg);
  static void set_has_building_id(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int64Value& orpon_id(const Event* msg);
  static void set_has_orpon_id(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& room_number(const Event* msg);
  static void set_has_room_number(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& ivr_phone_number(const Event* msg);
  static void set_has_ivr_phone_number(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& guest_phone_number(const Event* msg);
  static void set_has_guest_phone_number(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& code(const Event* msg);
  static void set_has_code(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& rfid(const Event* msg);
  static void set_has_rfid(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& request_id(const Event* msg);
  static void set_has_request_id(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& dtmf_phone_number(const Event* msg);
  static void set_has_dtmf_phone_number(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& user_kind(const Event* msg);
  static void set_has_user_kind(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& login(const Event* msg);
  static void set_has_login(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& password(const Event* msg);
  static void set_has_password(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& host(const Event* msg);
  static void set_has_host(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& device_model(const Event* msg);
  static void set_has_device_model(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& rfid_id(const Event* msg);
  static void set_has_rfid_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& code_id(const Event* msg);
  static void set_has_code_id(HasBits* has_bits) {
    (*has_bits)[0] |= 4194304u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& car_number(const Event* msg);
  static void set_has_car_number(HasBits* has_bits) {
    (*has_bits)[0] |= 8388608u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& os(const Event* msg);
  static void set_has_os(HasBits* has_bits) {
    (*has_bits)[0] |= 16777216u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& push_token(const Event* msg);
  static void set_has_push_token(HasBits* has_bits) {
    (*has_bits)[0] |= 33554432u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& camera_uid(const Event* msg);
  static void set_has_camera_uid(HasBits* has_bits) {
    (*has_bits)[0] |= 67108864u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& screenshot_url(const Event* msg);
  static void set_has_screenshot_url(HasBits* has_bits) {
    (*has_bits)[0] |= 134217728u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& vehicle(const Event* msg);
  static void set_has_vehicle(HasBits* has_bits) {
    (*has_bits)[0] |= 268435456u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& courier_company_name(const Event* msg);
  static void set_has_courier_company_name(HasBits* has_bits) {
    (*has_bits)[0] |= 536870912u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& order_number(const Event* msg);
  static void set_has_order_number(HasBits* has_bits) {
    (*has_bits)[0] |= 1073741824u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& courier_id(const Event* msg);
  static void set_has_courier_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2147483648u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Event::_Internal::raised_at(const Event* msg) {
  return *msg->_impl_.raised_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Event::_Internal::device_id(const Event* msg) {
  return *msg->_impl_.device_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Event::_Internal::company_id(const Event* msg) {
  return *msg->_impl_.company_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Event::_Internal::room_id(const Event* msg) {
  return *msg->_impl_.room_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Event::_Internal::relay(const Event* msg) {
  return *msg->_impl_.relay_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Event::_Internal::user_id(const Event* msg) {
  return *msg->_impl_.user_id_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::user_agent(const Event* msg) {
  return *msg->_impl_.user_agent_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Event::_Internal::building_id(const Event* msg) {
  return *msg->_impl_.building_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Int64Value&
Event::_Internal::orpon_id(const Event* msg) {
  return *msg->_impl_.orpon_id_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::room_number(const Event* msg) {
  return *msg->_impl_.room_number_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::ivr_phone_number(const Event* msg) {
  return *msg->_impl_.ivr_phone_number_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::guest_phone_number(const Event* msg) {
  return *msg->_impl_.guest_phone_number_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::code(const Event* msg) {
  return *msg->_impl_.code_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::rfid(const Event* msg) {
  return *msg->_impl_.rfid_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::request_id(const Event* msg) {
  return *msg->_impl_.request_id_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::dtmf_phone_number(const Event* msg) {
  return *msg->_impl_.dtmf_phone_number_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::user_kind(const Event* msg) {
  return *msg->_impl_.user_kind_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::login(const Event* msg) {
  return *msg->_impl_.login_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::password(const Event* msg) {
  return *msg->_impl_.password_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::host(const Event* msg) {
  return *msg->_impl_.host_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::device_model(const Event* msg) {
  return *msg->_impl_.device_model_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Event::_Internal::rfid_id(const Event* msg) {
  return *msg->_impl_.rfid_id_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Event::_Internal::code_id(const Event* msg) {
  return *msg->_impl_.code_id_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::car_number(const Event* msg) {
  return *msg->_impl_.car_number_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::os(const Event* msg) {
  return *msg->_impl_.os_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::push_token(const Event* msg) {
  return *msg->_impl_.push_token_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::camera_uid(const Event* msg) {
  return *msg->_impl_.camera_uid_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::screenshot_url(const Event* msg) {
  return *msg->_impl_.screenshot_url_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::vehicle(const Event* msg) {
  return *msg->_impl_.vehicle_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::courier_company_name(const Event* msg) {
  return *msg->_impl_.courier_company_name_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::order_number(const Event* msg) {
  return *msg->_impl_.order_number_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Event::_Internal::courier_id(const Event* msg) {
  return *msg->_impl_.courier_id_;
}
void Event::clear_raised_at() {
  if (_impl_.raised_at_ != nullptr) _impl_.raised_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Event::clear_device_id() {
  if (_impl_.device_id_ != nullptr) _impl_.device_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void Event::clear_company_id() {
  if (_impl_.company_id_ != nullptr) _impl_.company_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
void Event::clear_room_id() {
  if (_impl_.room_id_ != nullptr) _impl_.room_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
void Event::clear_relay() {
  if (_impl_.relay_ != nullptr) _impl_.relay_->Clear();
  _impl_._has_bits_[0] &= ~0x00000010u;
}
void Event::clear_user_id() {
  if (_impl_.user_id_ != nullptr) _impl_.user_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000020u;
}
void Event::clear_user_agent() {
  if (_impl_.user_agent_ != nullptr) _impl_.user_agent_->Clear();
  _impl_._has_bits_[0] &= ~0x00000040u;
}
void Event::clear_building_id() {
  if (_impl_.building_id_ != nullptr) _impl_.building_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000080u;
}
void Event::clear_orpon_id() {
  if (_impl_.orpon_id_ != nullptr) _impl_.orpon_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00000100u;
}
void Event::clear_room_number() {
  if (_impl_.room_number_ != nullptr) _impl_.room_number_->Clear();
  _impl_._has_bits_[0] &= ~0x00000200u;
}
void Event::clear_ivr_phone_number() {
  if (_impl_.ivr_phone_number_ != nullptr) _impl_.ivr_phone_number_->Clear();
  _impl_._has_bits_[0] &= ~0x00000400u;
}
void Event::clear_guest_phone_number() {
  if (_impl_.guest_phone_number_ != nullptr) _impl_.guest_phone_number_->Clear();
  _impl_._has_bits_[0] &= ~0x00000800u;
}
void Event::clear_code() {
  if (_impl_.code_ != nullptr) _impl_.code_->Clear();
  _impl_._has_bits_[0] &= ~0x00001000u;
}
void Event::clear_rfid() {
  if (_impl_.rfid_ != nullptr) _impl_.rfid_->Clear();
  _impl_._has_bits_[0] &= ~0x00002000u;
}
void Event::clear_request_id() {
  if (_impl_.request_id_ != nullptr) _impl_.request_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00004000u;
}
void Event::clear_dtmf_phone_number() {
  if (_impl_.dtmf_phone_number_ != nullptr) _impl_.dtmf_phone_number_->Clear();
  _impl_._has_bits_[0] &= ~0x00008000u;
}
void Event::clear_user_kind() {
  if (_impl_.user_kind_ != nullptr) _impl_.user_kind_->Clear();
  _impl_._has_bits_[0] &= ~0x00010000u;
}
void Event::clear_login() {
  if (_impl_.login_ != nullptr) _impl_.login_->Clear();
  _impl_._has_bits_[0] &= ~0x00020000u;
}
void Event::clear_password() {
  if (_impl_.password_ != nullptr) _impl_.password_->Clear();
  _impl_._has_bits_[0] &= ~0x00040000u;
}
void Event::clear_host() {
  if (_impl_.host_ != nullptr) _impl_.host_->Clear();
  _impl_._has_bits_[0] &= ~0x00080000u;
}
void Event::clear_device_model() {
  if (_impl_.device_model_ != nullptr) _impl_.device_model_->Clear();
  _impl_._has_bits_[0] &= ~0x00100000u;
}
void Event::clear_rfid_id() {
  if (_impl_.rfid_id_ != nullptr) _impl_.rfid_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00200000u;
}
void Event::clear_code_id() {
  if (_impl_.code_id_ != nullptr) _impl_.code_id_->Clear();
  _impl_._has_bits_[0] &= ~0x00400000u;
}
void Event::clear_car_number() {
  if (_impl_.car_number_ != nullptr) _impl_.car_number_->Clear();
  _impl_._has_bits_[0] &= ~0x00800000u;
}
void Event::clear_os() {
  if (_impl_.os_ != nullptr) _impl_.os_->Clear();
  _impl_._has_bits_[0] &= ~0x01000000u;
}
void Event::clear_push_token() {
  if (_impl_.push_token_ != nullptr) _impl_.push_token_->Clear();
  _impl_._has_bits_[0] &= ~0x02000000u;
}
void Event::clear_camera_uid() {
  if (_impl_.camera_uid_ != nullptr) _impl_.camera_uid_->Clear();
  _impl_._has_bits_[0] &= ~0x04000000u;
}
void Event::clear_screenshot_url() {
  if (_impl_.screenshot_url_ != nullptr) _impl_.screenshot_url_->Clear();
  _impl_._has_bits_[0] &= ~0x08000000u;
}
void Event::clear_vehicle() {
  if (_impl_.vehicle_ != nullptr) _impl_.vehicle_->Clear();
  _impl_._has_bits_[0] &= ~0x10000000u;
}
void Event::clear_courier_company_name() {
  if (_impl_.courier_company_name_ != nullptr) _impl_.courier_company_name_->Clear();
  _impl_._has_bits_[0] &= ~0x20000000u;
}
void Event::clear_order_number() {
  if (_impl_.order_number_ != nullptr) _impl_.order_number_->Clear();
  _impl_._has_bits_[0] &= ~0x40000000u;
}
void Event::clear_courier_id() {
  if (_impl_.courier_id_ != nullptr) _impl_.courier_id_->Clear();
  _impl_._has_bits_[0] &= ~0x80000000u;
}
Event::Event(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.event.v1.Event)
}
Event::Event(const Event& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Event* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.raised_at_){nullptr}
    , decltype(_impl_.device_id_){nullptr}
    , decltype(_impl_.company_id_){nullptr}
    , decltype(_impl_.room_id_){nullptr}
    , decltype(_impl_.relay_){nullptr}
    , decltype(_impl_.user_id_){nullptr}
    , decltype(_impl_.user_agent_){nullptr}
    , decltype(_impl_.building_id_){nullptr}
    , decltype(_impl_.orpon_id_){nullptr}
    , decltype(_impl_.room_number_){nullptr}
    , decltype(_impl_.ivr_phone_number_){nullptr}
    , decltype(_impl_.guest_phone_number_){nullptr}
    , decltype(_impl_.code_){nullptr}
    , decltype(_impl_.rfid_){nullptr}
    , decltype(_impl_.request_id_){nullptr}
    , decltype(_impl_.dtmf_phone_number_){nullptr}
    , decltype(_impl_.user_kind_){nullptr}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.password_){nullptr}
    , decltype(_impl_.host_){nullptr}
    , decltype(_impl_.device_model_){nullptr}
    , decltype(_impl_.rfid_id_){nullptr}
    , decltype(_impl_.code_id_){nullptr}
    , decltype(_impl_.car_number_){nullptr}
    , decltype(_impl_.os_){nullptr}
    , decltype(_impl_.push_token_){nullptr}
    , decltype(_impl_.camera_uid_){nullptr}
    , decltype(_impl_.screenshot_url_){nullptr}
    , decltype(_impl_.vehicle_){nullptr}
    , decltype(_impl_.courier_company_name_){nullptr}
    , decltype(_impl_.order_number_){nullptr}
    , decltype(_impl_.courier_id_){nullptr}
    , decltype(_impl_.type_) {}

    , decltype(_impl_.device_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.raised_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.raised_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.device_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.device_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.company_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.company_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.room_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.room_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.relay_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.relay_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.user_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.user_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000040u) != 0) {
    _this->_impl_.user_agent_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.user_agent_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000080u) != 0) {
    _this->_impl_.building_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.building_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000100u) != 0) {
    _this->_impl_.orpon_id_ = new ::PROTOBUF_NAMESPACE_ID::Int64Value(*from._impl_.orpon_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000200u) != 0) {
    _this->_impl_.room_number_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.room_number_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000400u) != 0) {
    _this->_impl_.ivr_phone_number_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.ivr_phone_number_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000800u) != 0) {
    _this->_impl_.guest_phone_number_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.guest_phone_number_);
  }
  if ((from._impl_._has_bits_[0] & 0x00001000u) != 0) {
    _this->_impl_.code_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.code_);
  }
  if ((from._impl_._has_bits_[0] & 0x00002000u) != 0) {
    _this->_impl_.rfid_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.rfid_);
  }
  if ((from._impl_._has_bits_[0] & 0x00004000u) != 0) {
    _this->_impl_.request_id_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.request_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00008000u) != 0) {
    _this->_impl_.dtmf_phone_number_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.dtmf_phone_number_);
  }
  if ((from._impl_._has_bits_[0] & 0x00010000u) != 0) {
    _this->_impl_.user_kind_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.user_kind_);
  }
  if ((from._impl_._has_bits_[0] & 0x00020000u) != 0) {
    _this->_impl_.login_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.login_);
  }
  if ((from._impl_._has_bits_[0] & 0x00040000u) != 0) {
    _this->_impl_.password_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.password_);
  }
  if ((from._impl_._has_bits_[0] & 0x00080000u) != 0) {
    _this->_impl_.host_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.host_);
  }
  if ((from._impl_._has_bits_[0] & 0x00100000u) != 0) {
    _this->_impl_.device_model_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.device_model_);
  }
  if ((from._impl_._has_bits_[0] & 0x00200000u) != 0) {
    _this->_impl_.rfid_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.rfid_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00400000u) != 0) {
    _this->_impl_.code_id_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.code_id_);
  }
  if ((from._impl_._has_bits_[0] & 0x00800000u) != 0) {
    _this->_impl_.car_number_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.car_number_);
  }
  if ((from._impl_._has_bits_[0] & 0x01000000u) != 0) {
    _this->_impl_.os_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.os_);
  }
  if ((from._impl_._has_bits_[0] & 0x02000000u) != 0) {
    _this->_impl_.push_token_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.push_token_);
  }
  if ((from._impl_._has_bits_[0] & 0x04000000u) != 0) {
    _this->_impl_.camera_uid_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.camera_uid_);
  }
  if ((from._impl_._has_bits_[0] & 0x08000000u) != 0) {
    _this->_impl_.screenshot_url_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.screenshot_url_);
  }
  if ((from._impl_._has_bits_[0] & 0x10000000u) != 0) {
    _this->_impl_.vehicle_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.vehicle_);
  }
  if ((from._impl_._has_bits_[0] & 0x20000000u) != 0) {
    _this->_impl_.courier_company_name_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.courier_company_name_);
  }
  if ((from._impl_._has_bits_[0] & 0x40000000u) != 0) {
    _this->_impl_.order_number_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.order_number_);
  }
  if ((from._impl_._has_bits_[0] & 0x80000000u) != 0) {
    _this->_impl_.courier_id_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.courier_id_);
  }
  ::memcpy(&_impl_.type_, &from._impl_.type_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.device_type_) -
    reinterpret_cast<char*>(&_impl_.type_)) + sizeof(_impl_.device_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.event.v1.Event)
}

inline void Event::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.raised_at_){nullptr}
    , decltype(_impl_.device_id_){nullptr}
    , decltype(_impl_.company_id_){nullptr}
    , decltype(_impl_.room_id_){nullptr}
    , decltype(_impl_.relay_){nullptr}
    , decltype(_impl_.user_id_){nullptr}
    , decltype(_impl_.user_agent_){nullptr}
    , decltype(_impl_.building_id_){nullptr}
    , decltype(_impl_.orpon_id_){nullptr}
    , decltype(_impl_.room_number_){nullptr}
    , decltype(_impl_.ivr_phone_number_){nullptr}
    , decltype(_impl_.guest_phone_number_){nullptr}
    , decltype(_impl_.code_){nullptr}
    , decltype(_impl_.rfid_){nullptr}
    , decltype(_impl_.request_id_){nullptr}
    , decltype(_impl_.dtmf_phone_number_){nullptr}
    , decltype(_impl_.user_kind_){nullptr}
    , decltype(_impl_.login_){nullptr}
    , decltype(_impl_.password_){nullptr}
    , decltype(_impl_.host_){nullptr}
    , decltype(_impl_.device_model_){nullptr}
    , decltype(_impl_.rfid_id_){nullptr}
    , decltype(_impl_.code_id_){nullptr}
    , decltype(_impl_.car_number_){nullptr}
    , decltype(_impl_.os_){nullptr}
    , decltype(_impl_.push_token_){nullptr}
    , decltype(_impl_.camera_uid_){nullptr}
    , decltype(_impl_.screenshot_url_){nullptr}
    , decltype(_impl_.vehicle_){nullptr}
    , decltype(_impl_.courier_company_name_){nullptr}
    , decltype(_impl_.order_number_){nullptr}
    , decltype(_impl_.courier_id_){nullptr}
    , decltype(_impl_.type_) { 0 }

    , decltype(_impl_.device_type_) { 0 }

  };
}

Event::~Event() {
  // @@protoc_insertion_point(destructor:keyapis.event.v1.Event)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Event::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.raised_at_;
  if (this != internal_default_instance()) delete _impl_.device_id_;
  if (this != internal_default_instance()) delete _impl_.company_id_;
  if (this != internal_default_instance()) delete _impl_.room_id_;
  if (this != internal_default_instance()) delete _impl_.relay_;
  if (this != internal_default_instance()) delete _impl_.user_id_;
  if (this != internal_default_instance()) delete _impl_.user_agent_;
  if (this != internal_default_instance()) delete _impl_.building_id_;
  if (this != internal_default_instance()) delete _impl_.orpon_id_;
  if (this != internal_default_instance()) delete _impl_.room_number_;
  if (this != internal_default_instance()) delete _impl_.ivr_phone_number_;
  if (this != internal_default_instance()) delete _impl_.guest_phone_number_;
  if (this != internal_default_instance()) delete _impl_.code_;
  if (this != internal_default_instance()) delete _impl_.rfid_;
  if (this != internal_default_instance()) delete _impl_.request_id_;
  if (this != internal_default_instance()) delete _impl_.dtmf_phone_number_;
  if (this != internal_default_instance()) delete _impl_.user_kind_;
  if (this != internal_default_instance()) delete _impl_.login_;
  if (this != internal_default_instance()) delete _impl_.password_;
  if (this != internal_default_instance()) delete _impl_.host_;
  if (this != internal_default_instance()) delete _impl_.device_model_;
  if (this != internal_default_instance()) delete _impl_.rfid_id_;
  if (this != internal_default_instance()) delete _impl_.code_id_;
  if (this != internal_default_instance()) delete _impl_.car_number_;
  if (this != internal_default_instance()) delete _impl_.os_;
  if (this != internal_default_instance()) delete _impl_.push_token_;
  if (this != internal_default_instance()) delete _impl_.camera_uid_;
  if (this != internal_default_instance()) delete _impl_.screenshot_url_;
  if (this != internal_default_instance()) delete _impl_.vehicle_;
  if (this != internal_default_instance()) delete _impl_.courier_company_name_;
  if (this != internal_default_instance()) delete _impl_.order_number_;
  if (this != internal_default_instance()) delete _impl_.courier_id_;
}

void Event::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Event::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.event.v1.Event)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.raised_at_ != nullptr);
      _impl_.raised_at_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.device_id_ != nullptr);
      _impl_.device_id_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.company_id_ != nullptr);
      _impl_.company_id_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.room_id_ != nullptr);
      _impl_.room_id_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.relay_ != nullptr);
      _impl_.relay_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.user_id_ != nullptr);
      _impl_.user_id_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      ABSL_DCHECK(_impl_.user_agent_ != nullptr);
      _impl_.user_agent_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      ABSL_DCHECK(_impl_.building_id_ != nullptr);
      _impl_.building_id_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      ABSL_DCHECK(_impl_.orpon_id_ != nullptr);
      _impl_.orpon_id_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      ABSL_DCHECK(_impl_.room_number_ != nullptr);
      _impl_.room_number_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      ABSL_DCHECK(_impl_.ivr_phone_number_ != nullptr);
      _impl_.ivr_phone_number_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      ABSL_DCHECK(_impl_.guest_phone_number_ != nullptr);
      _impl_.guest_phone_number_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      ABSL_DCHECK(_impl_.code_ != nullptr);
      _impl_.code_->Clear();
    }
    if (cached_has_bits & 0x00002000u) {
      ABSL_DCHECK(_impl_.rfid_ != nullptr);
      _impl_.rfid_->Clear();
    }
    if (cached_has_bits & 0x00004000u) {
      ABSL_DCHECK(_impl_.request_id_ != nullptr);
      _impl_.request_id_->Clear();
    }
    if (cached_has_bits & 0x00008000u) {
      ABSL_DCHECK(_impl_.dtmf_phone_number_ != nullptr);
      _impl_.dtmf_phone_number_->Clear();
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      ABSL_DCHECK(_impl_.user_kind_ != nullptr);
      _impl_.user_kind_->Clear();
    }
    if (cached_has_bits & 0x00020000u) {
      ABSL_DCHECK(_impl_.login_ != nullptr);
      _impl_.login_->Clear();
    }
    if (cached_has_bits & 0x00040000u) {
      ABSL_DCHECK(_impl_.password_ != nullptr);
      _impl_.password_->Clear();
    }
    if (cached_has_bits & 0x00080000u) {
      ABSL_DCHECK(_impl_.host_ != nullptr);
      _impl_.host_->Clear();
    }
    if (cached_has_bits & 0x00100000u) {
      ABSL_DCHECK(_impl_.device_model_ != nullptr);
      _impl_.device_model_->Clear();
    }
    if (cached_has_bits & 0x00200000u) {
      ABSL_DCHECK(_impl_.rfid_id_ != nullptr);
      _impl_.rfid_id_->Clear();
    }
    if (cached_has_bits & 0x00400000u) {
      ABSL_DCHECK(_impl_.code_id_ != nullptr);
      _impl_.code_id_->Clear();
    }
    if (cached_has_bits & 0x00800000u) {
      ABSL_DCHECK(_impl_.car_number_ != nullptr);
      _impl_.car_number_->Clear();
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      ABSL_DCHECK(_impl_.os_ != nullptr);
      _impl_.os_->Clear();
    }
    if (cached_has_bits & 0x02000000u) {
      ABSL_DCHECK(_impl_.push_token_ != nullptr);
      _impl_.push_token_->Clear();
    }
    if (cached_has_bits & 0x04000000u) {
      ABSL_DCHECK(_impl_.camera_uid_ != nullptr);
      _impl_.camera_uid_->Clear();
    }
    if (cached_has_bits & 0x08000000u) {
      ABSL_DCHECK(_impl_.screenshot_url_ != nullptr);
      _impl_.screenshot_url_->Clear();
    }
    if (cached_has_bits & 0x10000000u) {
      ABSL_DCHECK(_impl_.vehicle_ != nullptr);
      _impl_.vehicle_->Clear();
    }
    if (cached_has_bits & 0x20000000u) {
      ABSL_DCHECK(_impl_.courier_company_name_ != nullptr);
      _impl_.courier_company_name_->Clear();
    }
    if (cached_has_bits & 0x40000000u) {
      ABSL_DCHECK(_impl_.order_number_ != nullptr);
      _impl_.order_number_->Clear();
    }
    if (cached_has_bits & 0x80000000u) {
      ABSL_DCHECK(_impl_.courier_id_ != nullptr);
      _impl_.courier_id_->Clear();
    }
  }
  ::memset(&_impl_.type_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.device_type_) -
      reinterpret_cast<char*>(&_impl_.type_)) + sizeof(_impl_.device_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Event::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.event.v1.Event.Type type = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_type(static_cast<::keyapis::event::v1::Event_Type>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp raised_at = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_raised_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value device_id = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_device_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.event.v1.Event.DeviceType device_type = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_device_type(static_cast<::keyapis::event::v1::Event_DeviceType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value company_id = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_company_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value room_id = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_room_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value relay = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_relay(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value user_id = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_user_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue user_agent = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_user_agent(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value building_id = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_building_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int64Value orpon_id = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_orpon_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue room_number = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_room_number(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue ivr_phone_number = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_ivr_phone_number(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue guest_phone_number = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_guest_phone_number(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue code = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_code(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue rfid = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
          ptr = ctx->ParseMessage(_internal_mutable_rfid(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue request_id = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_request_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue dtmf_phone_number = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_dtmf_phone_number(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue user_kind = 19;
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_user_kind(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue login = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_login(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue password = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 170)) {
          ptr = ctx->ParseMessage(_internal_mutable_password(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue host = 22;
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 178)) {
          ptr = ctx->ParseMessage(_internal_mutable_host(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue device_model = 23;
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 186)) {
          ptr = ctx->ParseMessage(_internal_mutable_device_model(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value rfid_id = 24;
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 194)) {
          ptr = ctx->ParseMessage(_internal_mutable_rfid_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value code_id = 25;
      case 25:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 202)) {
          ptr = ctx->ParseMessage(_internal_mutable_code_id(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue car_number = 26;
      case 26:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 210)) {
          ptr = ctx->ParseMessage(_internal_mutable_car_number(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue os = 27;
      case 27:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 218)) {
          ptr = ctx->ParseMessage(_internal_mutable_os(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue push_token = 28;
      case 28:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 226)) {
          ptr = ctx->ParseMessage(_internal_mutable_push_token(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue camera_uid = 29;
      case 29:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 234)) {
          ptr = ctx->ParseMessage(_internal_mutable_camera_uid(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue screenshot_url = 30;
      case 30:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 242)) {
          ptr = ctx->ParseMessage(_internal_mutable_screenshot_url(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue vehicle = 31;
      case 31:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 250)) {
          ptr = ctx->ParseMessage(_internal_mutable_vehicle(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue courier_company_name = 32;
      case 32:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 2)) {
          ptr = ctx->ParseMessage(_internal_mutable_courier_company_name(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue order_number = 33;
      case 33:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_order_number(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue courier_id = 34;
      case 34:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_courier_id(), ptr);
          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:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* Event::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.event.v1.Event)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.event.v1.Event.Type type = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_type(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .google.protobuf.Timestamp raised_at = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::raised_at(this),
        _Internal::raised_at(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value device_id = 3;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::device_id(this),
        _Internal::device_id(this).GetCachedSize(), target, stream);
  }

  // .keyapis.event.v1.Event.DeviceType device_type = 4;
  if (this->_internal_device_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        4, this->_internal_device_type(), target);
  }

  // .google.protobuf.Int32Value company_id = 5;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::company_id(this),
        _Internal::company_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value room_id = 6;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::room_id(this),
        _Internal::room_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value relay = 7;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::relay(this),
        _Internal::relay(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value user_id = 8;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, _Internal::user_id(this),
        _Internal::user_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue user_agent = 9;
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::user_agent(this),
        _Internal::user_agent(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value building_id = 10;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, _Internal::building_id(this),
        _Internal::building_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int64Value orpon_id = 11;
  if (cached_has_bits & 0x00000100u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, _Internal::orpon_id(this),
        _Internal::orpon_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue room_number = 12;
  if (cached_has_bits & 0x00000200u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, _Internal::room_number(this),
        _Internal::room_number(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue ivr_phone_number = 13;
  if (cached_has_bits & 0x00000400u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(13, _Internal::ivr_phone_number(this),
        _Internal::ivr_phone_number(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue guest_phone_number = 14;
  if (cached_has_bits & 0x00000800u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(14, _Internal::guest_phone_number(this),
        _Internal::guest_phone_number(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue code = 15;
  if (cached_has_bits & 0x00001000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(15, _Internal::code(this),
        _Internal::code(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue rfid = 16;
  if (cached_has_bits & 0x00002000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(16, _Internal::rfid(this),
        _Internal::rfid(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue request_id = 17;
  if (cached_has_bits & 0x00004000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(17, _Internal::request_id(this),
        _Internal::request_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue dtmf_phone_number = 18;
  if (cached_has_bits & 0x00008000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(18, _Internal::dtmf_phone_number(this),
        _Internal::dtmf_phone_number(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue user_kind = 19;
  if (cached_has_bits & 0x00010000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(19, _Internal::user_kind(this),
        _Internal::user_kind(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue login = 20;
  if (cached_has_bits & 0x00020000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(20, _Internal::login(this),
        _Internal::login(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue password = 21;
  if (cached_has_bits & 0x00040000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(21, _Internal::password(this),
        _Internal::password(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue host = 22;
  if (cached_has_bits & 0x00080000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(22, _Internal::host(this),
        _Internal::host(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue device_model = 23;
  if (cached_has_bits & 0x00100000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(23, _Internal::device_model(this),
        _Internal::device_model(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value rfid_id = 24;
  if (cached_has_bits & 0x00200000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(24, _Internal::rfid_id(this),
        _Internal::rfid_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.Int32Value code_id = 25;
  if (cached_has_bits & 0x00400000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(25, _Internal::code_id(this),
        _Internal::code_id(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue car_number = 26;
  if (cached_has_bits & 0x00800000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(26, _Internal::car_number(this),
        _Internal::car_number(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue os = 27;
  if (cached_has_bits & 0x01000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(27, _Internal::os(this),
        _Internal::os(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue push_token = 28;
  if (cached_has_bits & 0x02000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(28, _Internal::push_token(this),
        _Internal::push_token(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue camera_uid = 29;
  if (cached_has_bits & 0x04000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(29, _Internal::camera_uid(this),
        _Internal::camera_uid(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue screenshot_url = 30;
  if (cached_has_bits & 0x08000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(30, _Internal::screenshot_url(this),
        _Internal::screenshot_url(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue vehicle = 31;
  if (cached_has_bits & 0x10000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(31, _Internal::vehicle(this),
        _Internal::vehicle(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue courier_company_name = 32;
  if (cached_has_bits & 0x20000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(32, _Internal::courier_company_name(this),
        _Internal::courier_company_name(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue order_number = 33;
  if (cached_has_bits & 0x40000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(33, _Internal::order_number(this),
        _Internal::order_number(this).GetCachedSize(), target, stream);
  }

  // .google.protobuf.StringValue courier_id = 34;
  if (cached_has_bits & 0x80000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(34, _Internal::courier_id(this),
        _Internal::courier_id(this).GetCachedSize(), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
        static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:keyapis.event.v1.Event)
  return target;
}

::size_t Event::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.event.v1.Event)
  ::size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // .google.protobuf.Timestamp raised_at = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.raised_at_);
    }

    // .google.protobuf.Int32Value device_id = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.device_id_);
    }

    // .google.protobuf.Int32Value company_id = 5;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.company_id_);
    }

    // .google.protobuf.Int32Value room_id = 6;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.room_id_);
    }

    // .google.protobuf.Int32Value relay = 7;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.relay_);
    }

    // .google.protobuf.Int32Value user_id = 8;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.user_id_);
    }

    // .google.protobuf.StringValue user_agent = 9;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.user_agent_);
    }

    // .google.protobuf.Int32Value building_id = 10;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.building_id_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // .google.protobuf.Int64Value orpon_id = 11;
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.orpon_id_);
    }

    // .google.protobuf.StringValue room_number = 12;
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.room_number_);
    }

    // .google.protobuf.StringValue ivr_phone_number = 13;
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.ivr_phone_number_);
    }

    // .google.protobuf.StringValue guest_phone_number = 14;
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.guest_phone_number_);
    }

    // .google.protobuf.StringValue code = 15;
    if (cached_has_bits & 0x00001000u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.code_);
    }

    // .google.protobuf.StringValue rfid = 16;
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.rfid_);
    }

    // .google.protobuf.StringValue request_id = 17;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.request_id_);
    }

    // .google.protobuf.StringValue dtmf_phone_number = 18;
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.dtmf_phone_number_);
    }

  }
  if (cached_has_bits & 0x00ff0000u) {
    // .google.protobuf.StringValue user_kind = 19;
    if (cached_has_bits & 0x00010000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.user_kind_);
    }

    // .google.protobuf.StringValue login = 20;
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.login_);
    }

    // .google.protobuf.StringValue password = 21;
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.password_);
    }

    // .google.protobuf.StringValue host = 22;
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.host_);
    }

    // .google.protobuf.StringValue device_model = 23;
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.device_model_);
    }

    // .google.protobuf.Int32Value rfid_id = 24;
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.rfid_id_);
    }

    // .google.protobuf.Int32Value code_id = 25;
    if (cached_has_bits & 0x00400000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.code_id_);
    }

    // .google.protobuf.StringValue car_number = 26;
    if (cached_has_bits & 0x00800000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.car_number_);
    }

  }
  if (cached_has_bits & 0xff000000u) {
    // .google.protobuf.StringValue os = 27;
    if (cached_has_bits & 0x01000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.os_);
    }

    // .google.protobuf.StringValue push_token = 28;
    if (cached_has_bits & 0x02000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.push_token_);
    }

    // .google.protobuf.StringValue camera_uid = 29;
    if (cached_has_bits & 0x04000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.camera_uid_);
    }

    // .google.protobuf.StringValue screenshot_url = 30;
    if (cached_has_bits & 0x08000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.screenshot_url_);
    }

    // .google.protobuf.StringValue vehicle = 31;
    if (cached_has_bits & 0x10000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.vehicle_);
    }

    // .google.protobuf.StringValue courier_company_name = 32;
    if (cached_has_bits & 0x20000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.courier_company_name_);
    }

    // .google.protobuf.StringValue order_number = 33;
    if (cached_has_bits & 0x40000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.order_number_);
    }

    // .google.protobuf.StringValue courier_id = 34;
    if (cached_has_bits & 0x80000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.courier_id_);
    }

  }
  // .keyapis.event.v1.Event.Type type = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  // .keyapis.event.v1.Event.DeviceType device_type = 4;
  if (this->_internal_device_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_device_type());
  }

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

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

void Event::MergeFrom(const Event& from) {
  Event* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.event.v1.Event)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_raised_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_raised_at());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_device_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_device_id());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_company_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_company_id());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_room_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_room_id());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_relay()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_relay());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_user_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_user_id());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_user_agent()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_user_agent());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_building_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_building_id());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_orpon_id()->::PROTOBUF_NAMESPACE_ID::Int64Value::MergeFrom(
          from._internal_orpon_id());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_room_number()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_room_number());
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_internal_mutable_ivr_phone_number()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_ivr_phone_number());
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_internal_mutable_guest_phone_number()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_guest_phone_number());
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_internal_mutable_code()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_code());
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_internal_mutable_rfid()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_rfid());
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_internal_mutable_request_id()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_request_id());
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_internal_mutable_dtmf_phone_number()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_dtmf_phone_number());
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _this->_internal_mutable_user_kind()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_user_kind());
    }
    if (cached_has_bits & 0x00020000u) {
      _this->_internal_mutable_login()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_login());
    }
    if (cached_has_bits & 0x00040000u) {
      _this->_internal_mutable_password()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_password());
    }
    if (cached_has_bits & 0x00080000u) {
      _this->_internal_mutable_host()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_host());
    }
    if (cached_has_bits & 0x00100000u) {
      _this->_internal_mutable_device_model()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_device_model());
    }
    if (cached_has_bits & 0x00200000u) {
      _this->_internal_mutable_rfid_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_rfid_id());
    }
    if (cached_has_bits & 0x00400000u) {
      _this->_internal_mutable_code_id()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_code_id());
    }
    if (cached_has_bits & 0x00800000u) {
      _this->_internal_mutable_car_number()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_car_number());
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      _this->_internal_mutable_os()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_os());
    }
    if (cached_has_bits & 0x02000000u) {
      _this->_internal_mutable_push_token()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_push_token());
    }
    if (cached_has_bits & 0x04000000u) {
      _this->_internal_mutable_camera_uid()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_camera_uid());
    }
    if (cached_has_bits & 0x08000000u) {
      _this->_internal_mutable_screenshot_url()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_screenshot_url());
    }
    if (cached_has_bits & 0x10000000u) {
      _this->_internal_mutable_vehicle()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_vehicle());
    }
    if (cached_has_bits & 0x20000000u) {
      _this->_internal_mutable_courier_company_name()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_courier_company_name());
    }
    if (cached_has_bits & 0x40000000u) {
      _this->_internal_mutable_order_number()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_order_number());
    }
    if (cached_has_bits & 0x80000000u) {
      _this->_internal_mutable_courier_id()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_courier_id());
    }
  }
  if (from._internal_type() != 0) {
    _this->_internal_set_type(from._internal_type());
  }
  if (from._internal_device_type() != 0) {
    _this->_internal_set_device_type(from._internal_device_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Event::CopyFrom(const Event& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.event.v1.Event)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Event::InternalSwap(Event* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Event, _impl_.device_type_)
      + sizeof(Event::_impl_.device_type_)
      - PROTOBUF_FIELD_OFFSET(Event, _impl_.raised_at_)>(
          reinterpret_cast<char*>(&_impl_.raised_at_),
          reinterpret_cast<char*>(&other->_impl_.raised_at_));
}

std::string Event::GetTypeName() const {
  return "keyapis.event.v1.Event";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace event
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::event::v1::Event*
Arena::CreateMaybeMessage< ::keyapis::event::v1::Event >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::event::v1::Event >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
