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

#include "keyapis/access_control/v1/keyapis_access_control_building_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 access_control {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR Building::Building(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.city_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.street_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.number_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.part_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.prefix_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.created_at_)*/nullptr
  , /*decltype(_impl_.deleted_at_)*/nullptr
  , /*decltype(_impl_.fias_)*/nullptr
  , /*decltype(_impl_.district_)*/nullptr
  , /*decltype(_impl_.unom_)*/nullptr
  , /*decltype(_impl_.area_)*/nullptr
  , /*decltype(_impl_.area_orpon_)*/nullptr
  , /*decltype(_impl_.area_kladr_)*/nullptr
  , /*decltype(_impl_.capital_marker_)*/nullptr
  , /*decltype(_impl_.city_kladr_)*/nullptr
  , /*decltype(_impl_.kladr_)*/nullptr
  , /*decltype(_impl_.fias_level_)*/nullptr
  , /*decltype(_impl_.fias_actuality_state_)*/nullptr
  , /*decltype(_impl_.geo_lat_)*/nullptr
  , /*decltype(_impl_.geo_lon_)*/nullptr
  , /*decltype(_impl_.okato_)*/nullptr
  , /*decltype(_impl_.oktmo_)*/nullptr
  , /*decltype(_impl_.postal_code_)*/nullptr
  , /*decltype(_impl_.region_)*/nullptr
  , /*decltype(_impl_.region_kladr_)*/nullptr
  , /*decltype(_impl_.street_kladr_)*/nullptr
  , /*decltype(_impl_.street_orpon_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

  , /*decltype(_impl_.rf_id_)*/ 0

  , /*decltype(_impl_.orpon_)*/ ::int64_t{0}

  , /*decltype(_impl_.mrf_id_)*/ 0

  , /*decltype(_impl_.company_id_)*/ 0

  , /*decltype(_impl_.city_orpon_)*/ ::int64_t{0}

  , /*decltype(_impl_.flatgramm_id_)*/ 0

  , /*decltype(_impl_.utc_offset_)*/ 0

  , /*decltype(_impl_.region_orpon_)*/ ::int64_t{0}

  , /*decltype(_impl_.is_key_purchase_possible_in_sale_points_)*/ false

  , /*decltype(_impl_.is_key_purchase_possible_in_management_company_)*/ false

  , /*decltype(_impl_.is_key_purchase_possible_in_intercom_company_)*/ false

  , /*decltype(_impl_.is_rfid_mifare_supported_)*/ false
} {}
struct BuildingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BuildingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~BuildingDefaultTypeInternal() {}
  union {
    Building _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BuildingDefaultTypeInternal _Building_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingRequest::GetBuildingRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetBuildingRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingRequestDefaultTypeInternal() {}
  union {
    GetBuildingRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingRequestDefaultTypeInternal _GetBuildingRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingResponse_Error::GetBuildingResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingResponse_ErrorDefaultTypeInternal() {}
  union {
    GetBuildingResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingResponse_ErrorDefaultTypeInternal _GetBuildingResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingResponse::GetBuildingResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingResponseDefaultTypeInternal() {}
  union {
    GetBuildingResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingResponseDefaultTypeInternal _GetBuildingResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingListRequest::GetBuildingListRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr
  , /*decltype(_impl_.pagination_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingListRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingListRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingListRequestDefaultTypeInternal() {}
  union {
    GetBuildingListRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingListRequestDefaultTypeInternal _GetBuildingListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingListResponse_Error::GetBuildingListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetBuildingListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingListResponse_ErrorDefaultTypeInternal _GetBuildingListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingListResponse::GetBuildingListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingListResponseDefaultTypeInternal() {}
  union {
    GetBuildingListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingListResponseDefaultTypeInternal _GetBuildingListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingCountRequest::GetBuildingCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetBuildingCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingCountRequestDefaultTypeInternal() {}
  union {
    GetBuildingCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingCountRequestDefaultTypeInternal _GetBuildingCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingCountResponse::GetBuildingCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingCountResponseDefaultTypeInternal() {}
  union {
    GetBuildingCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingCountResponseDefaultTypeInternal _GetBuildingCountResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR BuildingFilter::BuildingFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.mrf_ids_)*/ {}
  ,/* _impl_._mrf_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.rf_ids_)*/ {}
  ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.device_ids_)*/ {}
  ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.flatgramm_ids_)*/ {}
  ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_.orpons_)*/ {}
  ,/* _impl_._orpons_cached_byte_size_ = */ { 0 }

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct BuildingFilterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BuildingFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~BuildingFilterDefaultTypeInternal() {}
  union {
    BuildingFilter _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BuildingFilterDefaultTypeInternal _BuildingFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR BuildingPaging::BuildingPaging(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.order_by_type_)*/ 0

  , /*decltype(_impl_.direction_type_)*/ 0

  , /*decltype(_impl_.limit_)*/ 0

  , /*decltype(_impl_.offset_)*/ 0

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct BuildingPagingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BuildingPagingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~BuildingPagingDefaultTypeInternal() {}
  union {
    BuildingPaging _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BuildingPagingDefaultTypeInternal _BuildingPaging_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR BuildingSubscriptionMode::BuildingSubscriptionMode(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.subscription_mode_type_)*/ 0

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct BuildingSubscriptionModeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BuildingSubscriptionModeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~BuildingSubscriptionModeDefaultTypeInternal() {}
  union {
    BuildingSubscriptionMode _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BuildingSubscriptionModeDefaultTypeInternal _BuildingSubscriptionMode_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingOrponSubscriptionModeRequest::GetBuildingOrponSubscriptionModeRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.orpon_)*/ ::int64_t{0}

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetBuildingOrponSubscriptionModeRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingOrponSubscriptionModeRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingOrponSubscriptionModeRequestDefaultTypeInternal() {}
  union {
    GetBuildingOrponSubscriptionModeRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingOrponSubscriptionModeRequestDefaultTypeInternal _GetBuildingOrponSubscriptionModeRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingOrponSubscriptionModeResponse_Error::GetBuildingOrponSubscriptionModeResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingOrponSubscriptionModeResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingOrponSubscriptionModeResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingOrponSubscriptionModeResponse_ErrorDefaultTypeInternal() {}
  union {
    GetBuildingOrponSubscriptionModeResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingOrponSubscriptionModeResponse_ErrorDefaultTypeInternal _GetBuildingOrponSubscriptionModeResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingOrponSubscriptionModeResponse::GetBuildingOrponSubscriptionModeResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingOrponSubscriptionModeResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingOrponSubscriptionModeResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingOrponSubscriptionModeResponseDefaultTypeInternal() {}
  union {
    GetBuildingOrponSubscriptionModeResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingOrponSubscriptionModeResponseDefaultTypeInternal _GetBuildingOrponSubscriptionModeResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingOrponExistsRequest::GetBuildingOrponExistsRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.orpon_)*/ ::int64_t{0}

  , /*decltype(_impl_._cached_size_)*/{}} {}
struct GetBuildingOrponExistsRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingOrponExistsRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingOrponExistsRequestDefaultTypeInternal() {}
  union {
    GetBuildingOrponExistsRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingOrponExistsRequestDefaultTypeInternal _GetBuildingOrponExistsRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingOrponExistsResponse_Error::GetBuildingOrponExistsResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingOrponExistsResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingOrponExistsResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingOrponExistsResponse_ErrorDefaultTypeInternal() {}
  union {
    GetBuildingOrponExistsResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingOrponExistsResponse_ErrorDefaultTypeInternal _GetBuildingOrponExistsResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetBuildingOrponExistsResponse::GetBuildingOrponExistsResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetBuildingOrponExistsResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetBuildingOrponExistsResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetBuildingOrponExistsResponseDefaultTypeInternal() {}
  union {
    GetBuildingOrponExistsResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetBuildingOrponExistsResponseDefaultTypeInternal _GetBuildingOrponExistsResponse_default_instance_;
}  // namespace v1
}  // namespace access_control
}  // namespace keyapis
namespace keyapis {
namespace access_control {
namespace v1 {
bool BuildingPaging_OrderByType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    BuildingPaging_OrderByType_strings[4] = {};

static const char BuildingPaging_OrderByType_names[] = {
    "CREATED_AT"
    "ID"
    "ORDER_BY_TYPE_UNKNOWN"
    "STREET_THEN_NUMBER_THEN_PART"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry BuildingPaging_OrderByType_entries[] =
    {
        {{&BuildingPaging_OrderByType_names[0], 10}, 2},
        {{&BuildingPaging_OrderByType_names[10], 2}, 1},
        {{&BuildingPaging_OrderByType_names[12], 21}, 0},
        {{&BuildingPaging_OrderByType_names[33], 28}, 3},
};

static const int BuildingPaging_OrderByType_entries_by_number[] = {
    2,  // 0 -> ORDER_BY_TYPE_UNKNOWN
    1,  // 1 -> ID
    0,  // 2 -> CREATED_AT
    3,  // 3 -> STREET_THEN_NUMBER_THEN_PART
};

const std::string& BuildingPaging_OrderByType_Name(BuildingPaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          BuildingPaging_OrderByType_entries, BuildingPaging_OrderByType_entries_by_number,
          4, BuildingPaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      BuildingPaging_OrderByType_entries, BuildingPaging_OrderByType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : BuildingPaging_OrderByType_strings[idx].get();
}

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

constexpr BuildingPaging_OrderByType BuildingPaging::ORDER_BY_TYPE_UNKNOWN;
constexpr BuildingPaging_OrderByType BuildingPaging::ID;
constexpr BuildingPaging_OrderByType BuildingPaging::CREATED_AT;
constexpr BuildingPaging_OrderByType BuildingPaging::STREET_THEN_NUMBER_THEN_PART;
constexpr BuildingPaging_OrderByType BuildingPaging::OrderByType_MIN;
constexpr BuildingPaging_OrderByType BuildingPaging::OrderByType_MAX;
constexpr int BuildingPaging::OrderByType_ARRAYSIZE;

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

static const char BuildingPaging_DirectionType_names[] = {
    "ASC"
    "DESC"
    "DIRECTION_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry BuildingPaging_DirectionType_entries[] =
    {
        {{&BuildingPaging_DirectionType_names[0], 3}, 2},
        {{&BuildingPaging_DirectionType_names[3], 4}, 1},
        {{&BuildingPaging_DirectionType_names[7], 22}, 0},
};

static const int BuildingPaging_DirectionType_entries_by_number[] = {
    2,  // 0 -> DIRECTION_TYPE_UNKNOWN
    1,  // 1 -> DESC
    0,  // 2 -> ASC
};

const std::string& BuildingPaging_DirectionType_Name(BuildingPaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          BuildingPaging_DirectionType_entries, BuildingPaging_DirectionType_entries_by_number,
          3, BuildingPaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      BuildingPaging_DirectionType_entries, BuildingPaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : BuildingPaging_DirectionType_strings[idx].get();
}

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

constexpr BuildingPaging_DirectionType BuildingPaging::DIRECTION_TYPE_UNKNOWN;
constexpr BuildingPaging_DirectionType BuildingPaging::DESC;
constexpr BuildingPaging_DirectionType BuildingPaging::ASC;
constexpr BuildingPaging_DirectionType BuildingPaging::DirectionType_MIN;
constexpr BuildingPaging_DirectionType BuildingPaging::DirectionType_MAX;
constexpr int BuildingPaging::DirectionType_ARRAYSIZE;

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

static const char BuildingSubscriptionMode_SubscriptionModeType_names[] = {
    "DISABLED"
    "ENABLED"
    "PARTIALLY_ENABLED"
    "SUBSCRIPTION_MODE_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry BuildingSubscriptionMode_SubscriptionModeType_entries[] =
    {
        {{&BuildingSubscriptionMode_SubscriptionModeType_names[0], 8}, 3},
        {{&BuildingSubscriptionMode_SubscriptionModeType_names[8], 7}, 1},
        {{&BuildingSubscriptionMode_SubscriptionModeType_names[15], 17}, 2},
        {{&BuildingSubscriptionMode_SubscriptionModeType_names[32], 30}, 0},
};

static const int BuildingSubscriptionMode_SubscriptionModeType_entries_by_number[] = {
    3,  // 0 -> SUBSCRIPTION_MODE_TYPE_UNKNOWN
    1,  // 1 -> ENABLED
    2,  // 2 -> PARTIALLY_ENABLED
    0,  // 3 -> DISABLED
};

const std::string& BuildingSubscriptionMode_SubscriptionModeType_Name(BuildingSubscriptionMode_SubscriptionModeType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          BuildingSubscriptionMode_SubscriptionModeType_entries, BuildingSubscriptionMode_SubscriptionModeType_entries_by_number,
          4, BuildingSubscriptionMode_SubscriptionModeType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      BuildingSubscriptionMode_SubscriptionModeType_entries, BuildingSubscriptionMode_SubscriptionModeType_entries_by_number, 4,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : BuildingSubscriptionMode_SubscriptionModeType_strings[idx].get();
}

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

constexpr BuildingSubscriptionMode_SubscriptionModeType BuildingSubscriptionMode::SUBSCRIPTION_MODE_TYPE_UNKNOWN;
constexpr BuildingSubscriptionMode_SubscriptionModeType BuildingSubscriptionMode::ENABLED;
constexpr BuildingSubscriptionMode_SubscriptionModeType BuildingSubscriptionMode::PARTIALLY_ENABLED;
constexpr BuildingSubscriptionMode_SubscriptionModeType BuildingSubscriptionMode::DISABLED;
constexpr BuildingSubscriptionMode_SubscriptionModeType BuildingSubscriptionMode::SubscriptionModeType_MIN;
constexpr BuildingSubscriptionMode_SubscriptionModeType BuildingSubscriptionMode::SubscriptionModeType_MAX;
constexpr int BuildingSubscriptionMode::SubscriptionModeType_ARRAYSIZE;

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

class Building::_Internal {
 public:
  using HasBits = decltype(std::declval<Building>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Building, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& created_at(const Building* msg);
  static void set_has_created_at(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& deleted_at(const Building* msg);
  static void set_has_deleted_at(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& fias(const Building* msg);
  static void set_has_fias(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& district(const Building* msg);
  static void set_has_district(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int64Value& unom(const Building* msg);
  static void set_has_unom(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& area(const Building* msg);
  static void set_has_area(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int64Value& area_orpon(const Building* msg);
  static void set_has_area_orpon(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& area_kladr(const Building* msg);
  static void set_has_area_kladr(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& capital_marker(const Building* msg);
  static void set_has_capital_marker(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& city_kladr(const Building* msg);
  static void set_has_city_kladr(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& kladr(const Building* msg);
  static void set_has_kladr(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& fias_level(const Building* msg);
  static void set_has_fias_level(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& fias_actuality_state(const Building* msg);
  static void set_has_fias_actuality_state(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::DoubleValue& geo_lat(const Building* msg);
  static void set_has_geo_lat(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::DoubleValue& geo_lon(const Building* msg);
  static void set_has_geo_lon(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& okato(const Building* msg);
  static void set_has_okato(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& oktmo(const Building* msg);
  static void set_has_oktmo(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int32Value& postal_code(const Building* msg);
  static void set_has_postal_code(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& region(const Building* msg);
  static void set_has_region(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& region_kladr(const Building* msg);
  static void set_has_region_kladr(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& street_kladr(const Building* msg);
  static void set_has_street_kladr(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Int64Value& street_orpon(const Building* msg);
  static void set_has_street_orpon(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Building::_Internal::created_at(const Building* msg) {
  return *msg->_impl_.created_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Building::_Internal::deleted_at(const Building* msg) {
  return *msg->_impl_.deleted_at_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::fias(const Building* msg) {
  return *msg->_impl_.fias_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::district(const Building* msg) {
  return *msg->_impl_.district_;
}
const ::PROTOBUF_NAMESPACE_ID::Int64Value&
Building::_Internal::unom(const Building* msg) {
  return *msg->_impl_.unom_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::area(const Building* msg) {
  return *msg->_impl_.area_;
}
const ::PROTOBUF_NAMESPACE_ID::Int64Value&
Building::_Internal::area_orpon(const Building* msg) {
  return *msg->_impl_.area_orpon_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::area_kladr(const Building* msg) {
  return *msg->_impl_.area_kladr_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Building::_Internal::capital_marker(const Building* msg) {
  return *msg->_impl_.capital_marker_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::city_kladr(const Building* msg) {
  return *msg->_impl_.city_kladr_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::kladr(const Building* msg) {
  return *msg->_impl_.kladr_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Building::_Internal::fias_level(const Building* msg) {
  return *msg->_impl_.fias_level_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Building::_Internal::fias_actuality_state(const Building* msg) {
  return *msg->_impl_.fias_actuality_state_;
}
const ::PROTOBUF_NAMESPACE_ID::DoubleValue&
Building::_Internal::geo_lat(const Building* msg) {
  return *msg->_impl_.geo_lat_;
}
const ::PROTOBUF_NAMESPACE_ID::DoubleValue&
Building::_Internal::geo_lon(const Building* msg) {
  return *msg->_impl_.geo_lon_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Building::_Internal::okato(const Building* msg) {
  return *msg->_impl_.okato_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Building::_Internal::oktmo(const Building* msg) {
  return *msg->_impl_.oktmo_;
}
const ::PROTOBUF_NAMESPACE_ID::Int32Value&
Building::_Internal::postal_code(const Building* msg) {
  return *msg->_impl_.postal_code_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::region(const Building* msg) {
  return *msg->_impl_.region_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::region_kladr(const Building* msg) {
  return *msg->_impl_.region_kladr_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
Building::_Internal::street_kladr(const Building* msg) {
  return *msg->_impl_.street_kladr_;
}
const ::PROTOBUF_NAMESPACE_ID::Int64Value&
Building::_Internal::street_orpon(const Building* msg) {
  return *msg->_impl_.street_orpon_;
}
void Building::clear_created_at() {
  if (_impl_.created_at_ != nullptr) _impl_.created_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Building::clear_deleted_at() {
  if (_impl_.deleted_at_ != nullptr) _impl_.deleted_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void Building::clear_fias() {
  if (_impl_.fias_ != nullptr) _impl_.fias_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
void Building::clear_district() {
  if (_impl_.district_ != nullptr) _impl_.district_->Clear();
  _impl_._has_bits_[0] &= ~0x00000008u;
}
void Building::clear_unom() {
  if (_impl_.unom_ != nullptr) _impl_.unom_->Clear();
  _impl_._has_bits_[0] &= ~0x00000010u;
}
void Building::clear_area() {
  if (_impl_.area_ != nullptr) _impl_.area_->Clear();
  _impl_._has_bits_[0] &= ~0x00000020u;
}
void Building::clear_area_orpon() {
  if (_impl_.area_orpon_ != nullptr) _impl_.area_orpon_->Clear();
  _impl_._has_bits_[0] &= ~0x00000040u;
}
void Building::clear_area_kladr() {
  if (_impl_.area_kladr_ != nullptr) _impl_.area_kladr_->Clear();
  _impl_._has_bits_[0] &= ~0x00000080u;
}
void Building::clear_capital_marker() {
  if (_impl_.capital_marker_ != nullptr) _impl_.capital_marker_->Clear();
  _impl_._has_bits_[0] &= ~0x00000100u;
}
void Building::clear_city_kladr() {
  if (_impl_.city_kladr_ != nullptr) _impl_.city_kladr_->Clear();
  _impl_._has_bits_[0] &= ~0x00000200u;
}
void Building::clear_kladr() {
  if (_impl_.kladr_ != nullptr) _impl_.kladr_->Clear();
  _impl_._has_bits_[0] &= ~0x00000400u;
}
void Building::clear_fias_level() {
  if (_impl_.fias_level_ != nullptr) _impl_.fias_level_->Clear();
  _impl_._has_bits_[0] &= ~0x00000800u;
}
void Building::clear_fias_actuality_state() {
  if (_impl_.fias_actuality_state_ != nullptr) _impl_.fias_actuality_state_->Clear();
  _impl_._has_bits_[0] &= ~0x00001000u;
}
void Building::clear_geo_lat() {
  if (_impl_.geo_lat_ != nullptr) _impl_.geo_lat_->Clear();
  _impl_._has_bits_[0] &= ~0x00002000u;
}
void Building::clear_geo_lon() {
  if (_impl_.geo_lon_ != nullptr) _impl_.geo_lon_->Clear();
  _impl_._has_bits_[0] &= ~0x00004000u;
}
void Building::clear_okato() {
  if (_impl_.okato_ != nullptr) _impl_.okato_->Clear();
  _impl_._has_bits_[0] &= ~0x00008000u;
}
void Building::clear_oktmo() {
  if (_impl_.oktmo_ != nullptr) _impl_.oktmo_->Clear();
  _impl_._has_bits_[0] &= ~0x00010000u;
}
void Building::clear_postal_code() {
  if (_impl_.postal_code_ != nullptr) _impl_.postal_code_->Clear();
  _impl_._has_bits_[0] &= ~0x00020000u;
}
void Building::clear_region() {
  if (_impl_.region_ != nullptr) _impl_.region_->Clear();
  _impl_._has_bits_[0] &= ~0x00040000u;
}
void Building::clear_region_kladr() {
  if (_impl_.region_kladr_ != nullptr) _impl_.region_kladr_->Clear();
  _impl_._has_bits_[0] &= ~0x00080000u;
}
void Building::clear_street_kladr() {
  if (_impl_.street_kladr_ != nullptr) _impl_.street_kladr_->Clear();
  _impl_._has_bits_[0] &= ~0x00100000u;
}
void Building::clear_street_orpon() {
  if (_impl_.street_orpon_ != nullptr) _impl_.street_orpon_->Clear();
  _impl_._has_bits_[0] &= ~0x00200000u;
}
Building::Building(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.Building)
}
Building::Building(const Building& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Building* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.city_) {}

    , decltype(_impl_.street_) {}

    , decltype(_impl_.number_) {}

    , decltype(_impl_.part_) {}

    , decltype(_impl_.prefix_) {}

    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.deleted_at_){nullptr}
    , decltype(_impl_.fias_){nullptr}
    , decltype(_impl_.district_){nullptr}
    , decltype(_impl_.unom_){nullptr}
    , decltype(_impl_.area_){nullptr}
    , decltype(_impl_.area_orpon_){nullptr}
    , decltype(_impl_.area_kladr_){nullptr}
    , decltype(_impl_.capital_marker_){nullptr}
    , decltype(_impl_.city_kladr_){nullptr}
    , decltype(_impl_.kladr_){nullptr}
    , decltype(_impl_.fias_level_){nullptr}
    , decltype(_impl_.fias_actuality_state_){nullptr}
    , decltype(_impl_.geo_lat_){nullptr}
    , decltype(_impl_.geo_lon_){nullptr}
    , decltype(_impl_.okato_){nullptr}
    , decltype(_impl_.oktmo_){nullptr}
    , decltype(_impl_.postal_code_){nullptr}
    , decltype(_impl_.region_){nullptr}
    , decltype(_impl_.region_kladr_){nullptr}
    , decltype(_impl_.street_kladr_){nullptr}
    , decltype(_impl_.street_orpon_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.rf_id_) {}

    , decltype(_impl_.orpon_) {}

    , decltype(_impl_.mrf_id_) {}

    , decltype(_impl_.company_id_) {}

    , decltype(_impl_.city_orpon_) {}

    , decltype(_impl_.flatgramm_id_) {}

    , decltype(_impl_.utc_offset_) {}

    , decltype(_impl_.region_orpon_) {}

    , decltype(_impl_.is_key_purchase_possible_in_sale_points_) {}

    , decltype(_impl_.is_key_purchase_possible_in_management_company_) {}

    , decltype(_impl_.is_key_purchase_possible_in_intercom_company_) {}

    , decltype(_impl_.is_rfid_mifare_supported_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.city_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.city_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_city().empty()) {
    _this->_impl_.city_.Set(from._internal_city(), _this->GetArenaForAllocation());
  }
  _impl_.street_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.street_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_street().empty()) {
    _this->_impl_.street_.Set(from._internal_street(), _this->GetArenaForAllocation());
  }
  _impl_.number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_number().empty()) {
    _this->_impl_.number_.Set(from._internal_number(), _this->GetArenaForAllocation());
  }
  _impl_.part_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.part_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_part().empty()) {
    _this->_impl_.part_.Set(from._internal_part(), _this->GetArenaForAllocation());
  }
  _impl_.prefix_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.prefix_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_prefix().empty()) {
    _this->_impl_.prefix_.Set(from._internal_prefix(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.created_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.created_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.deleted_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.deleted_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.fias_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.fias_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.district_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.district_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.unom_ = new ::PROTOBUF_NAMESPACE_ID::Int64Value(*from._impl_.unom_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.area_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.area_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000040u) != 0) {
    _this->_impl_.area_orpon_ = new ::PROTOBUF_NAMESPACE_ID::Int64Value(*from._impl_.area_orpon_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000080u) != 0) {
    _this->_impl_.area_kladr_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.area_kladr_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000100u) != 0) {
    _this->_impl_.capital_marker_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.capital_marker_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000200u) != 0) {
    _this->_impl_.city_kladr_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.city_kladr_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000400u) != 0) {
    _this->_impl_.kladr_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.kladr_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000800u) != 0) {
    _this->_impl_.fias_level_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.fias_level_);
  }
  if ((from._impl_._has_bits_[0] & 0x00001000u) != 0) {
    _this->_impl_.fias_actuality_state_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.fias_actuality_state_);
  }
  if ((from._impl_._has_bits_[0] & 0x00002000u) != 0) {
    _this->_impl_.geo_lat_ = new ::PROTOBUF_NAMESPACE_ID::DoubleValue(*from._impl_.geo_lat_);
  }
  if ((from._impl_._has_bits_[0] & 0x00004000u) != 0) {
    _this->_impl_.geo_lon_ = new ::PROTOBUF_NAMESPACE_ID::DoubleValue(*from._impl_.geo_lon_);
  }
  if ((from._impl_._has_bits_[0] & 0x00008000u) != 0) {
    _this->_impl_.okato_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.okato_);
  }
  if ((from._impl_._has_bits_[0] & 0x00010000u) != 0) {
    _this->_impl_.oktmo_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.oktmo_);
  }
  if ((from._impl_._has_bits_[0] & 0x00020000u) != 0) {
    _this->_impl_.postal_code_ = new ::PROTOBUF_NAMESPACE_ID::Int32Value(*from._impl_.postal_code_);
  }
  if ((from._impl_._has_bits_[0] & 0x00040000u) != 0) {
    _this->_impl_.region_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.region_);
  }
  if ((from._impl_._has_bits_[0] & 0x00080000u) != 0) {
    _this->_impl_.region_kladr_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.region_kladr_);
  }
  if ((from._impl_._has_bits_[0] & 0x00100000u) != 0) {
    _this->_impl_.street_kladr_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.street_kladr_);
  }
  if ((from._impl_._has_bits_[0] & 0x00200000u) != 0) {
    _this->_impl_.street_orpon_ = new ::PROTOBUF_NAMESPACE_ID::Int64Value(*from._impl_.street_orpon_);
  }
  ::memcpy(&_impl_.id_, &from._impl_.id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.is_rfid_mifare_supported_) -
    reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.is_rfid_mifare_supported_));
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.Building)
}

inline void Building::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.city_) {}

    , decltype(_impl_.street_) {}

    , decltype(_impl_.number_) {}

    , decltype(_impl_.part_) {}

    , decltype(_impl_.prefix_) {}

    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.deleted_at_){nullptr}
    , decltype(_impl_.fias_){nullptr}
    , decltype(_impl_.district_){nullptr}
    , decltype(_impl_.unom_){nullptr}
    , decltype(_impl_.area_){nullptr}
    , decltype(_impl_.area_orpon_){nullptr}
    , decltype(_impl_.area_kladr_){nullptr}
    , decltype(_impl_.capital_marker_){nullptr}
    , decltype(_impl_.city_kladr_){nullptr}
    , decltype(_impl_.kladr_){nullptr}
    , decltype(_impl_.fias_level_){nullptr}
    , decltype(_impl_.fias_actuality_state_){nullptr}
    , decltype(_impl_.geo_lat_){nullptr}
    , decltype(_impl_.geo_lon_){nullptr}
    , decltype(_impl_.okato_){nullptr}
    , decltype(_impl_.oktmo_){nullptr}
    , decltype(_impl_.postal_code_){nullptr}
    , decltype(_impl_.region_){nullptr}
    , decltype(_impl_.region_kladr_){nullptr}
    , decltype(_impl_.street_kladr_){nullptr}
    , decltype(_impl_.street_orpon_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.rf_id_) { 0 }

    , decltype(_impl_.orpon_) { ::int64_t{0} }

    , decltype(_impl_.mrf_id_) { 0 }

    , decltype(_impl_.company_id_) { 0 }

    , decltype(_impl_.city_orpon_) { ::int64_t{0} }

    , decltype(_impl_.flatgramm_id_) { 0 }

    , decltype(_impl_.utc_offset_) { 0 }

    , decltype(_impl_.region_orpon_) { ::int64_t{0} }

    , decltype(_impl_.is_key_purchase_possible_in_sale_points_) { false }

    , decltype(_impl_.is_key_purchase_possible_in_management_company_) { false }

    , decltype(_impl_.is_key_purchase_possible_in_intercom_company_) { false }

    , decltype(_impl_.is_rfid_mifare_supported_) { false }

  };
  _impl_.city_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.city_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.street_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.street_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.number_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.number_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.part_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.part_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.prefix_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.prefix_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Building::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.city_.Destroy();
  _impl_.street_.Destroy();
  _impl_.number_.Destroy();
  _impl_.part_.Destroy();
  _impl_.prefix_.Destroy();
  if (this != internal_default_instance()) delete _impl_.created_at_;
  if (this != internal_default_instance()) delete _impl_.deleted_at_;
  if (this != internal_default_instance()) delete _impl_.fias_;
  if (this != internal_default_instance()) delete _impl_.district_;
  if (this != internal_default_instance()) delete _impl_.unom_;
  if (this != internal_default_instance()) delete _impl_.area_;
  if (this != internal_default_instance()) delete _impl_.area_orpon_;
  if (this != internal_default_instance()) delete _impl_.area_kladr_;
  if (this != internal_default_instance()) delete _impl_.capital_marker_;
  if (this != internal_default_instance()) delete _impl_.city_kladr_;
  if (this != internal_default_instance()) delete _impl_.kladr_;
  if (this != internal_default_instance()) delete _impl_.fias_level_;
  if (this != internal_default_instance()) delete _impl_.fias_actuality_state_;
  if (this != internal_default_instance()) delete _impl_.geo_lat_;
  if (this != internal_default_instance()) delete _impl_.geo_lon_;
  if (this != internal_default_instance()) delete _impl_.okato_;
  if (this != internal_default_instance()) delete _impl_.oktmo_;
  if (this != internal_default_instance()) delete _impl_.postal_code_;
  if (this != internal_default_instance()) delete _impl_.region_;
  if (this != internal_default_instance()) delete _impl_.region_kladr_;
  if (this != internal_default_instance()) delete _impl_.street_kladr_;
  if (this != internal_default_instance()) delete _impl_.street_orpon_;
}

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

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

  _impl_.city_.ClearToEmpty();
  _impl_.street_.ClearToEmpty();
  _impl_.number_.ClearToEmpty();
  _impl_.part_.ClearToEmpty();
  _impl_.prefix_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.created_at_ != nullptr);
      _impl_.created_at_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.deleted_at_ != nullptr);
      _impl_.deleted_at_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.fias_ != nullptr);
      _impl_.fias_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.district_ != nullptr);
      _impl_.district_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.unom_ != nullptr);
      _impl_.unom_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.area_ != nullptr);
      _impl_.area_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      ABSL_DCHECK(_impl_.area_orpon_ != nullptr);
      _impl_.area_orpon_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      ABSL_DCHECK(_impl_.area_kladr_ != nullptr);
      _impl_.area_kladr_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      ABSL_DCHECK(_impl_.capital_marker_ != nullptr);
      _impl_.capital_marker_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      ABSL_DCHECK(_impl_.city_kladr_ != nullptr);
      _impl_.city_kladr_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      ABSL_DCHECK(_impl_.kladr_ != nullptr);
      _impl_.kladr_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      ABSL_DCHECK(_impl_.fias_level_ != nullptr);
      _impl_.fias_level_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      ABSL_DCHECK(_impl_.fias_actuality_state_ != nullptr);
      _impl_.fias_actuality_state_->Clear();
    }
    if (cached_has_bits & 0x00002000u) {
      ABSL_DCHECK(_impl_.geo_lat_ != nullptr);
      _impl_.geo_lat_->Clear();
    }
    if (cached_has_bits & 0x00004000u) {
      ABSL_DCHECK(_impl_.geo_lon_ != nullptr);
      _impl_.geo_lon_->Clear();
    }
    if (cached_has_bits & 0x00008000u) {
      ABSL_DCHECK(_impl_.okato_ != nullptr);
      _impl_.okato_->Clear();
    }
  }
  if (cached_has_bits & 0x003f0000u) {
    if (cached_has_bits & 0x00010000u) {
      ABSL_DCHECK(_impl_.oktmo_ != nullptr);
      _impl_.oktmo_->Clear();
    }
    if (cached_has_bits & 0x00020000u) {
      ABSL_DCHECK(_impl_.postal_code_ != nullptr);
      _impl_.postal_code_->Clear();
    }
    if (cached_has_bits & 0x00040000u) {
      ABSL_DCHECK(_impl_.region_ != nullptr);
      _impl_.region_->Clear();
    }
    if (cached_has_bits & 0x00080000u) {
      ABSL_DCHECK(_impl_.region_kladr_ != nullptr);
      _impl_.region_kladr_->Clear();
    }
    if (cached_has_bits & 0x00100000u) {
      ABSL_DCHECK(_impl_.street_kladr_ != nullptr);
      _impl_.street_kladr_->Clear();
    }
    if (cached_has_bits & 0x00200000u) {
      ABSL_DCHECK(_impl_.street_orpon_ != nullptr);
      _impl_.street_orpon_->Clear();
    }
  }
  ::memset(&_impl_.id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.is_rfid_mifare_supported_) -
      reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.is_rfid_mifare_supported_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Building::_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) {
      // int32 id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 rf_id = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.rf_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 mrf_id = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.mrf_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int64 orpon = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.orpon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string city = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_city();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string street = 6 [(.google.api.field_behavior) = REQUIRED];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_street();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string number = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          auto str = _internal_mutable_number();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string part = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_part();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 company_id = 9 [(.google.api.field_behavior) = REQUIRED];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
          _impl_.company_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string prefix = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          auto str = _internal_mutable_prefix();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp created_at = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_created_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp deleted_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_deleted_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 flatgramm_id = 13 [(.google.api.field_behavior) = REQUIRED];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
          _impl_.flatgramm_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int64 city_orpon = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
          _impl_.city_orpon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue fias = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_fias(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue district = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 130)) {
          ptr = ctx->ParseMessage(_internal_mutable_district(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int64Value unom = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_unom(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int64 region_orpon = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 144)) {
          _impl_.region_orpon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 utc_offset = 19;
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 152)) {
          _impl_.utc_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_key_purchase_possible_in_sale_points = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 160)) {
          _impl_.is_key_purchase_possible_in_sale_points_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_key_purchase_possible_in_management_company = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 168)) {
          _impl_.is_key_purchase_possible_in_management_company_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_key_purchase_possible_in_intercom_company = 22;
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 176)) {
          _impl_.is_key_purchase_possible_in_intercom_company_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // bool is_rfid_mifare_supported = 23;
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 184)) {
          _impl_.is_rfid_mifare_supported_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue area = 24;
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 194)) {
          ptr = ctx->ParseMessage(_internal_mutable_area(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int64Value area_orpon = 25;
      case 25:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 202)) {
          ptr = ctx->ParseMessage(_internal_mutable_area_orpon(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue area_kladr = 26;
      case 26:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 210)) {
          ptr = ctx->ParseMessage(_internal_mutable_area_kladr(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value capital_marker = 27;
      case 27:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 218)) {
          ptr = ctx->ParseMessage(_internal_mutable_capital_marker(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue city_kladr = 28;
      case 28:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 226)) {
          ptr = ctx->ParseMessage(_internal_mutable_city_kladr(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue kladr = 29;
      case 29:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 234)) {
          ptr = ctx->ParseMessage(_internal_mutable_kladr(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value fias_level = 30;
      case 30:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 242)) {
          ptr = ctx->ParseMessage(_internal_mutable_fias_level(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value fias_actuality_state = 31;
      case 31:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 250)) {
          ptr = ctx->ParseMessage(_internal_mutable_fias_actuality_state(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.DoubleValue geo_lat = 32;
      case 32:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 2)) {
          ptr = ctx->ParseMessage(_internal_mutable_geo_lat(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.DoubleValue geo_lon = 33;
      case 33:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_geo_lon(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value okato = 34;
      case 34:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_okato(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value oktmo = 35;
      case 35:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_oktmo(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int32Value postal_code = 36;
      case 36:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_postal_code(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue region = 37;
      case 37:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_region(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue region_kladr = 38;
      case 38:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_region_kladr(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue street_kladr = 39;
      case 39:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_street_kladr(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Int64Value street_orpon = 40;
      case 40:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_street_orpon(), 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* Building::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.Building)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 id = 1;
  if (this->_internal_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_id(), target);
  }

  // int32 rf_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_rf_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_rf_id(), target);
  }

  // int32 mrf_id = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_mrf_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        3, this->_internal_mrf_id(), target);
  }

  // int64 orpon = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_orpon() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(
        4, this->_internal_orpon(), target);
  }

  // string city = 5 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_city().empty()) {
    const std::string& _s = this->_internal_city();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.access_control.v1.Building.city");
    target = stream->WriteStringMaybeAliased(5, _s, target);
  }

  // string street = 6 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_street().empty()) {
    const std::string& _s = this->_internal_street();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.access_control.v1.Building.street");
    target = stream->WriteStringMaybeAliased(6, _s, target);
  }

  // string number = 7;
  if (!this->_internal_number().empty()) {
    const std::string& _s = this->_internal_number();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.access_control.v1.Building.number");
    target = stream->WriteStringMaybeAliased(7, _s, target);
  }

  // string part = 8;
  if (!this->_internal_part().empty()) {
    const std::string& _s = this->_internal_part();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.access_control.v1.Building.part");
    target = stream->WriteStringMaybeAliased(8, _s, target);
  }

  // int32 company_id = 9 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_company_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        9, this->_internal_company_id(), target);
  }

  // string prefix = 10;
  if (!this->_internal_prefix().empty()) {
    const std::string& _s = this->_internal_prefix();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.access_control.v1.Building.prefix");
    target = stream->WriteStringMaybeAliased(10, _s, target);
  }

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

  // .google.protobuf.Timestamp deleted_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, _Internal::deleted_at(this),
        _Internal::deleted_at(this).GetCachedSize(), target, stream);
  }

  // int32 flatgramm_id = 13 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_flatgramm_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        13, this->_internal_flatgramm_id(), target);
  }

  // int64 city_orpon = 14;
  if (this->_internal_city_orpon() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(
        14, this->_internal_city_orpon(), target);
  }

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

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

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

  // int64 region_orpon = 18;
  if (this->_internal_region_orpon() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(
        18, this->_internal_region_orpon(), target);
  }

  // int32 utc_offset = 19;
  if (this->_internal_utc_offset() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        19, this->_internal_utc_offset(), target);
  }

  // bool is_key_purchase_possible_in_sale_points = 20;
  if (this->_internal_is_key_purchase_possible_in_sale_points() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        20, this->_internal_is_key_purchase_possible_in_sale_points(), target);
  }

  // bool is_key_purchase_possible_in_management_company = 21;
  if (this->_internal_is_key_purchase_possible_in_management_company() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        21, this->_internal_is_key_purchase_possible_in_management_company(), target);
  }

  // bool is_key_purchase_possible_in_intercom_company = 22;
  if (this->_internal_is_key_purchase_possible_in_intercom_company() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        22, this->_internal_is_key_purchase_possible_in_intercom_company(), target);
  }

  // bool is_rfid_mifare_supported = 23;
  if (this->_internal_is_rfid_mifare_supported() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(
        23, this->_internal_is_rfid_mifare_supported(), target);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  // .google.protobuf.Int64Value street_orpon = 40;
  if (cached_has_bits & 0x00200000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(40, _Internal::street_orpon(this),
        _Internal::street_orpon(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.access_control.v1.Building)
  return target;
}

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

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

  // string city = 5 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_city().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_city());
  }

  // string street = 6 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_street().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_street());
  }

  // string number = 7;
  if (!this->_internal_number().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_number());
  }

  // string part = 8;
  if (!this->_internal_part().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_part());
  }

  // string prefix = 10;
  if (!this->_internal_prefix().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_prefix());
  }

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

    // .google.protobuf.Timestamp deleted_at = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.deleted_at_);
    }

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

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

    // .google.protobuf.Int64Value unom = 17;
    if (cached_has_bits & 0x00000010u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.unom_);
    }

    // .google.protobuf.StringValue area = 24;
    if (cached_has_bits & 0x00000020u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.area_);
    }

    // .google.protobuf.Int64Value area_orpon = 25;
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.area_orpon_);
    }

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

  }
  if (cached_has_bits & 0x0000ff00u) {
    // .google.protobuf.Int32Value capital_marker = 27;
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.capital_marker_);
    }

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

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

    // .google.protobuf.Int32Value fias_level = 30;
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.fias_level_);
    }

    // .google.protobuf.Int32Value fias_actuality_state = 31;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.fias_actuality_state_);
    }

    // .google.protobuf.DoubleValue geo_lat = 32;
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.geo_lat_);
    }

    // .google.protobuf.DoubleValue geo_lon = 33;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.geo_lon_);
    }

    // .google.protobuf.Int32Value okato = 34;
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.okato_);
    }

  }
  if (cached_has_bits & 0x003f0000u) {
    // .google.protobuf.Int32Value oktmo = 35;
    if (cached_has_bits & 0x00010000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.oktmo_);
    }

    // .google.protobuf.Int32Value postal_code = 36;
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.postal_code_);
    }

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

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

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

    // .google.protobuf.Int64Value street_orpon = 40;
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.street_orpon_);
    }

  }
  // int32 id = 1;
  if (this->_internal_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_id());
  }

  // int32 rf_id = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_rf_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_rf_id());
  }

  // int64 orpon = 4 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_orpon() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
        this->_internal_orpon());
  }

  // int32 mrf_id = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_mrf_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_mrf_id());
  }

  // int32 company_id = 9 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_company_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_company_id());
  }

  // int64 city_orpon = 14;
  if (this->_internal_city_orpon() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
        this->_internal_city_orpon());
  }

  // int32 flatgramm_id = 13 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_flatgramm_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_flatgramm_id());
  }

  // int32 utc_offset = 19;
  if (this->_internal_utc_offset() != 0) {
    total_size += 2 + ::_pbi::WireFormatLite::Int32Size(
                                    this->_internal_utc_offset());
  }

  // int64 region_orpon = 18;
  if (this->_internal_region_orpon() != 0) {
    total_size += 2 + ::_pbi::WireFormatLite::Int64Size(
                                    this->_internal_region_orpon());
  }

  // bool is_key_purchase_possible_in_sale_points = 20;
  if (this->_internal_is_key_purchase_possible_in_sale_points() != 0) {
    total_size += 3;
  }

  // bool is_key_purchase_possible_in_management_company = 21;
  if (this->_internal_is_key_purchase_possible_in_management_company() != 0) {
    total_size += 3;
  }

  // bool is_key_purchase_possible_in_intercom_company = 22;
  if (this->_internal_is_key_purchase_possible_in_intercom_company() != 0) {
    total_size += 3;
  }

  // bool is_rfid_mifare_supported = 23;
  if (this->_internal_is_rfid_mifare_supported() != 0) {
    total_size += 3;
  }

  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 Building::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Building*>(
      &from));
}

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

  if (!from._internal_city().empty()) {
    _this->_internal_set_city(from._internal_city());
  }
  if (!from._internal_street().empty()) {
    _this->_internal_set_street(from._internal_street());
  }
  if (!from._internal_number().empty()) {
    _this->_internal_set_number(from._internal_number());
  }
  if (!from._internal_part().empty()) {
    _this->_internal_set_part(from._internal_part());
  }
  if (!from._internal_prefix().empty()) {
    _this->_internal_set_prefix(from._internal_prefix());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_created_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_created_at());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_deleted_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_deleted_at());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_fias()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_fias());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_district()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_district());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_unom()->::PROTOBUF_NAMESPACE_ID::Int64Value::MergeFrom(
          from._internal_unom());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_area()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_area());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_area_orpon()->::PROTOBUF_NAMESPACE_ID::Int64Value::MergeFrom(
          from._internal_area_orpon());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_area_kladr()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_area_kladr());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_capital_marker()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_capital_marker());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_city_kladr()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_city_kladr());
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_internal_mutable_kladr()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_kladr());
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_internal_mutable_fias_level()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_fias_level());
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_internal_mutable_fias_actuality_state()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_fias_actuality_state());
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_internal_mutable_geo_lat()->::PROTOBUF_NAMESPACE_ID::DoubleValue::MergeFrom(
          from._internal_geo_lat());
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_internal_mutable_geo_lon()->::PROTOBUF_NAMESPACE_ID::DoubleValue::MergeFrom(
          from._internal_geo_lon());
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_internal_mutable_okato()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_okato());
    }
  }
  if (cached_has_bits & 0x003f0000u) {
    if (cached_has_bits & 0x00010000u) {
      _this->_internal_mutable_oktmo()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_oktmo());
    }
    if (cached_has_bits & 0x00020000u) {
      _this->_internal_mutable_postal_code()->::PROTOBUF_NAMESPACE_ID::Int32Value::MergeFrom(
          from._internal_postal_code());
    }
    if (cached_has_bits & 0x00040000u) {
      _this->_internal_mutable_region()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_region());
    }
    if (cached_has_bits & 0x00080000u) {
      _this->_internal_mutable_region_kladr()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_region_kladr());
    }
    if (cached_has_bits & 0x00100000u) {
      _this->_internal_mutable_street_kladr()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_street_kladr());
    }
    if (cached_has_bits & 0x00200000u) {
      _this->_internal_mutable_street_orpon()->::PROTOBUF_NAMESPACE_ID::Int64Value::MergeFrom(
          from._internal_street_orpon());
    }
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  if (from._internal_rf_id() != 0) {
    _this->_internal_set_rf_id(from._internal_rf_id());
  }
  if (from._internal_orpon() != 0) {
    _this->_internal_set_orpon(from._internal_orpon());
  }
  if (from._internal_mrf_id() != 0) {
    _this->_internal_set_mrf_id(from._internal_mrf_id());
  }
  if (from._internal_company_id() != 0) {
    _this->_internal_set_company_id(from._internal_company_id());
  }
  if (from._internal_city_orpon() != 0) {
    _this->_internal_set_city_orpon(from._internal_city_orpon());
  }
  if (from._internal_flatgramm_id() != 0) {
    _this->_internal_set_flatgramm_id(from._internal_flatgramm_id());
  }
  if (from._internal_utc_offset() != 0) {
    _this->_internal_set_utc_offset(from._internal_utc_offset());
  }
  if (from._internal_region_orpon() != 0) {
    _this->_internal_set_region_orpon(from._internal_region_orpon());
  }
  if (from._internal_is_key_purchase_possible_in_sale_points() != 0) {
    _this->_internal_set_is_key_purchase_possible_in_sale_points(from._internal_is_key_purchase_possible_in_sale_points());
  }
  if (from._internal_is_key_purchase_possible_in_management_company() != 0) {
    _this->_internal_set_is_key_purchase_possible_in_management_company(from._internal_is_key_purchase_possible_in_management_company());
  }
  if (from._internal_is_key_purchase_possible_in_intercom_company() != 0) {
    _this->_internal_set_is_key_purchase_possible_in_intercom_company(from._internal_is_key_purchase_possible_in_intercom_company());
  }
  if (from._internal_is_rfid_mifare_supported() != 0) {
    _this->_internal_set_is_rfid_mifare_supported(from._internal_is_rfid_mifare_supported());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Building::InternalSwap(Building* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.city_, lhs_arena,
                                       &other->_impl_.city_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.street_, lhs_arena,
                                       &other->_impl_.street_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.number_, lhs_arena,
                                       &other->_impl_.number_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.part_, lhs_arena,
                                       &other->_impl_.part_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.prefix_, lhs_arena,
                                       &other->_impl_.prefix_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Building, _impl_.is_rfid_mifare_supported_)
      + sizeof(Building::_impl_.is_rfid_mifare_supported_)
      - PROTOBUF_FIELD_OFFSET(Building, _impl_.created_at_)>(
          reinterpret_cast<char*>(&_impl_.created_at_),
          reinterpret_cast<char*>(&other->_impl_.created_at_));
}

std::string Building::GetTypeName() const {
  return "keyapis.access_control.v1.Building";
}

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

class GetBuildingRequest::_Internal {
 public:
};

GetBuildingRequest::GetBuildingRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingRequest)
}
GetBuildingRequest::GetBuildingRequest(const GetBuildingRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingRequest)
}

inline void GetBuildingRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.id_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void GetBuildingRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

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

  _impl_.id_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* GetBuildingRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // int32 id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_id(), target);
  }

  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.access_control.v1.GetBuildingRequest)
  return target;
}

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

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

  // int32 id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_id());
  }

  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 GetBuildingRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingRequest*>(
      &from));
}

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

  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

  swap(_impl_.id_, other->_impl_.id_);
}

std::string GetBuildingRequest::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingRequest";
}

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

class GetBuildingResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::ValidationError& validation(const GetBuildingResponse_Error* msg);
};

const ::keyapis::access_control::v1::ValidationError&
GetBuildingResponse_Error::_Internal::validation(const GetBuildingResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetBuildingResponse_Error::set_allocated_validation(::keyapis::access_control::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingResponse.Error.validation)
}
void GetBuildingResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
GetBuildingResponse_Error::GetBuildingResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingResponse.Error)
}
GetBuildingResponse_Error::GetBuildingResponse_Error(const GetBuildingResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::access_control::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingResponse.Error)
}

inline void GetBuildingResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

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

inline void GetBuildingResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void GetBuildingResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

const char* GetBuildingResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), 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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.access_control.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::validation(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.access_control.v1.GetBuildingResponse.Error)
  return target;
}

::size_t GetBuildingResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.GetBuildingResponse.Error)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .keyapis.access_control.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  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 GetBuildingResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingResponse_Error*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::access_control::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingResponse_Error::InternalSwap(GetBuildingResponse_Error* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingResponse_Error::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingResponse.Error";
}

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

class GetBuildingResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingResponse, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::Building& data(const GetBuildingResponse* msg);
  static const ::keyapis::access_control::v1::GetBuildingResponse_Error& error(const GetBuildingResponse* msg);
};

const ::keyapis::access_control::v1::Building&
GetBuildingResponse::_Internal::data(const GetBuildingResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::access_control::v1::GetBuildingResponse_Error&
GetBuildingResponse::_Internal::error(const GetBuildingResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetBuildingResponse::set_allocated_data(::keyapis::access_control::v1::Building* data) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (data) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data);
    if (message_arena != submessage_arena) {
      data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, data, submessage_arena);
    }
    set_has_data();
    _impl_.type_.data_ = data;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingResponse.data)
}
void GetBuildingResponse::set_allocated_error(::keyapis::access_control::v1::GetBuildingResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingResponse.error)
}
GetBuildingResponse::GetBuildingResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingResponse)
}
GetBuildingResponse::GetBuildingResponse(const GetBuildingResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::access_control::v1::Building::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::access_control::v1::GetBuildingResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingResponse)
}

inline void GetBuildingResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void GetBuildingResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void GetBuildingResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

const char* GetBuildingResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.Building data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.access_control.v1.GetBuildingResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), 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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  switch (type_case()) {
    case kData: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::data(this),
          _Internal::data(this).GetCachedSize(), target, stream);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  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.access_control.v1.GetBuildingResponse)
  return target;
}

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

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

  switch (type_case()) {
    // .keyapis.access_control.v1.Building data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.access_control.v1.GetBuildingResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  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 GetBuildingResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingResponse*>(
      &from));
}

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

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::access_control::v1::Building::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::access_control::v1::GetBuildingResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingResponse::InternalSwap(GetBuildingResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.type_, other->_impl_.type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingResponse::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingResponse";
}

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

class GetBuildingListRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetBuildingListRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetBuildingListRequest, _impl_._has_bits_);
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingListRequest, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::BuildingFilter& filter(const GetBuildingListRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::keyapis::access_control::v1::BuildingPaging& paging(const GetBuildingListRequest* msg);
};

const ::keyapis::access_control::v1::BuildingFilter&
GetBuildingListRequest::_Internal::filter(const GetBuildingListRequest* msg) {
  return *msg->_impl_.filter_;
}
const ::keyapis::access_control::v1::BuildingPaging&
GetBuildingListRequest::_Internal::paging(const GetBuildingListRequest* msg) {
  return *msg->_impl_.pagination_.paging_;
}
void GetBuildingListRequest::set_allocated_paging(::keyapis::access_control::v1::BuildingPaging* paging) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_pagination();
  if (paging) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(paging);
    if (message_arena != submessage_arena) {
      paging = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, paging, submessage_arena);
    }
    set_has_paging();
    _impl_.pagination_.paging_ = paging;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingListRequest.paging)
}
GetBuildingListRequest::GetBuildingListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingListRequest)
}
GetBuildingListRequest::GetBuildingListRequest(const GetBuildingListRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingListRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
    , decltype(_impl_.pagination_){}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.filter_ = new ::keyapis::access_control::v1::BuildingFilter(*from._impl_.filter_);
  }
  clear_has_pagination();
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::access_control::v1::BuildingPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingListRequest)
}

inline void GetBuildingListRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
    , decltype(_impl_.pagination_){}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_pagination();
}

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

inline void GetBuildingListRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
  if (has_pagination()) {
    clear_pagination();
  }
}

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

void GetBuildingListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingListRequest)
  switch (pagination_case()) {
    case kPaging: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.pagination_.paging_;
      }
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = PAGINATION_NOT_SET;
}


void GetBuildingListRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.GetBuildingListRequest)
  ::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 & 0x00000001u) {
    ABSL_DCHECK(_impl_.filter_ != nullptr);
    _impl_.filter_->Clear();
  }
  clear_pagination();
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* GetBuildingListRequest::_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.access_control.v1.BuildingFilter filter = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_filter(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.access_control.v1.BuildingPaging paging = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_paging(), 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* GetBuildingListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.GetBuildingListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.access_control.v1.BuildingFilter filter = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::filter(this),
        _Internal::filter(this).GetCachedSize(), target, stream);
  }

  // .keyapis.access_control.v1.BuildingPaging paging = 2;
  if (pagination_case() == kPaging) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::paging(this),
        _Internal::paging(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.access_control.v1.GetBuildingListRequest)
  return target;
}

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

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

  // .keyapis.access_control.v1.BuildingFilter filter = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.filter_);
  }

  switch (pagination_case()) {
    // .keyapis.access_control.v1.BuildingPaging paging = 2;
    case kPaging: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.pagination_.paging_);
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  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 GetBuildingListRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingListRequest*>(
      &from));
}

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

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_filter()->::keyapis::access_control::v1::BuildingFilter::MergeFrom(
        from._internal_filter());
  }
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::access_control::v1::BuildingPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingListRequest::InternalSwap(GetBuildingListRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.filter_, other->_impl_.filter_);
  swap(_impl_.pagination_, other->_impl_.pagination_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingListRequest::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingListRequest";
}

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

class GetBuildingListResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingListResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::ValidationError& validation(const GetBuildingListResponse_Error* msg);
};

const ::keyapis::access_control::v1::ValidationError&
GetBuildingListResponse_Error::_Internal::validation(const GetBuildingListResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetBuildingListResponse_Error::set_allocated_validation(::keyapis::access_control::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingListResponse.Error.validation)
}
void GetBuildingListResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
GetBuildingListResponse_Error::GetBuildingListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingListResponse.Error)
}
GetBuildingListResponse_Error::GetBuildingListResponse_Error(const GetBuildingListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingListResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::access_control::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingListResponse.Error)
}

inline void GetBuildingListResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

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

inline void GetBuildingListResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void GetBuildingListResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingListResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

const char* GetBuildingListResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), 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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.access_control.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::validation(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.access_control.v1.GetBuildingListResponse.Error)
  return target;
}

::size_t GetBuildingListResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.GetBuildingListResponse.Error)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .keyapis.access_control.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  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 GetBuildingListResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingListResponse_Error*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::access_control::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingListResponse_Error::InternalSwap(GetBuildingListResponse_Error* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingListResponse_Error::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingListResponse.Error";
}

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

class GetBuildingListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingListResponse, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::Building& data(const GetBuildingListResponse* msg);
  static const ::keyapis::access_control::v1::GetBuildingListResponse_Error& error(const GetBuildingListResponse* msg);
};

const ::keyapis::access_control::v1::Building&
GetBuildingListResponse::_Internal::data(const GetBuildingListResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::access_control::v1::GetBuildingListResponse_Error&
GetBuildingListResponse::_Internal::error(const GetBuildingListResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetBuildingListResponse::set_allocated_data(::keyapis::access_control::v1::Building* data) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (data) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data);
    if (message_arena != submessage_arena) {
      data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, data, submessage_arena);
    }
    set_has_data();
    _impl_.type_.data_ = data;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingListResponse.data)
}
void GetBuildingListResponse::set_allocated_error(::keyapis::access_control::v1::GetBuildingListResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingListResponse.error)
}
GetBuildingListResponse::GetBuildingListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingListResponse)
}
GetBuildingListResponse::GetBuildingListResponse(const GetBuildingListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingListResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::access_control::v1::Building::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::access_control::v1::GetBuildingListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingListResponse)
}

inline void GetBuildingListResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void GetBuildingListResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void GetBuildingListResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingListResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

const char* GetBuildingListResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.Building data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.access_control.v1.GetBuildingListResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), 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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  switch (type_case()) {
    case kData: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::data(this),
          _Internal::data(this).GetCachedSize(), target, stream);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  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.access_control.v1.GetBuildingListResponse)
  return target;
}

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

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

  switch (type_case()) {
    // .keyapis.access_control.v1.Building data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.access_control.v1.GetBuildingListResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  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 GetBuildingListResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingListResponse*>(
      &from));
}

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

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::access_control::v1::Building::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::access_control::v1::GetBuildingListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingListResponse::InternalSwap(GetBuildingListResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.type_, other->_impl_.type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingListResponse::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingListResponse";
}

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

class GetBuildingCountRequest::_Internal {
 public:
  using HasBits = decltype(std::declval<GetBuildingCountRequest>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(GetBuildingCountRequest, _impl_._has_bits_);
  static const ::keyapis::access_control::v1::BuildingFilter& filter(const GetBuildingCountRequest* msg);
  static void set_has_filter(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::keyapis::access_control::v1::BuildingFilter&
GetBuildingCountRequest::_Internal::filter(const GetBuildingCountRequest* msg) {
  return *msg->_impl_.filter_;
}
GetBuildingCountRequest::GetBuildingCountRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingCountRequest)
}
GetBuildingCountRequest::GetBuildingCountRequest(const GetBuildingCountRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingCountRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.filter_ = new ::keyapis::access_control::v1::BuildingFilter(*from._impl_.filter_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingCountRequest)
}

inline void GetBuildingCountRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filter_){nullptr}
  };
}

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

inline void GetBuildingCountRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filter_;
}

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

void GetBuildingCountRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.access_control.v1.GetBuildingCountRequest)
  ::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 & 0x00000001u) {
    ABSL_DCHECK(_impl_.filter_ != nullptr);
    _impl_.filter_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* GetBuildingCountRequest::_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.access_control.v1.BuildingFilter filter = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_filter(), 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* GetBuildingCountRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.access_control.v1.GetBuildingCountRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.access_control.v1.BuildingFilter filter = 1 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::filter(this),
        _Internal::filter(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.access_control.v1.GetBuildingCountRequest)
  return target;
}

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

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

  // .keyapis.access_control.v1.BuildingFilter filter = 1 [(.google.api.field_behavior) = REQUIRED];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.filter_);
  }

  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 GetBuildingCountRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingCountRequest*>(
      &from));
}

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

  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_internal_mutable_filter()->::keyapis::access_control::v1::BuildingFilter::MergeFrom(
        from._internal_filter());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingCountRequest::InternalSwap(GetBuildingCountRequest* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.filter_, other->_impl_.filter_);
}

std::string GetBuildingCountRequest::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingCountRequest";
}

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

class GetBuildingCountResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingCountResponse, _impl_._oneof_case_);
};

GetBuildingCountResponse::GetBuildingCountResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingCountResponse)
}
GetBuildingCountResponse::GetBuildingCountResponse(const GetBuildingCountResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingCountResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingCountResponse)
}

inline void GetBuildingCountResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void GetBuildingCountResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void GetBuildingCountResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingCountResponse)
  switch (type_case()) {
    case kData: {
      // No need to clear
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

const char* GetBuildingCountResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int32 data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // int32 data = 1;
  if (type_case() == kData) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_data(), target);
  }

  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.access_control.v1.GetBuildingCountResponse)
  return target;
}

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

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

  switch (type_case()) {
    // int32 data = 1;
    case kData: {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
          this->_internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  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 GetBuildingCountResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingCountResponse*>(
      &from));
}

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

  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingCountResponse::InternalSwap(GetBuildingCountResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.type_, other->_impl_.type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingCountResponse::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingCountResponse";
}

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

class BuildingFilter::_Internal {
 public:
};

BuildingFilter::BuildingFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.BuildingFilter)
}
BuildingFilter::BuildingFilter(const BuildingFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  BuildingFilter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.mrf_ids_) { from._impl_.mrf_ids_ }
    ,/* _impl_._mrf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.rf_ids_) { from._impl_.rf_ids_ }
    ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.device_ids_) { from._impl_.device_ids_ }
    ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.flatgramm_ids_) { from._impl_.flatgramm_ids_ }
    ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.orpons_) { from._impl_.orpons_ }
    ,/* _impl_._orpons_cached_byte_size_ = */ { 0 }

    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.BuildingFilter)
}

inline void BuildingFilter::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.mrf_ids_) { arena }
    ,/* _impl_._mrf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.rf_ids_) { arena }
    ,/* _impl_._rf_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.device_ids_) { arena }
    ,/* _impl_._device_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.flatgramm_ids_) { arena }
    ,/* _impl_._flatgramm_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.orpons_) { arena }
    ,/* _impl_._orpons_cached_byte_size_ = */ { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void BuildingFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.mrf_ids_.~RepeatedField();
  _impl_.rf_ids_.~RepeatedField();
  _impl_.device_ids_.~RepeatedField();
  _impl_.flatgramm_ids_.~RepeatedField();
  _impl_.orpons_.~RepeatedField();
}

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

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

  _internal_mutable_mrf_ids()->Clear();
  _internal_mutable_rf_ids()->Clear();
  _internal_mutable_device_ids()->Clear();
  _internal_mutable_flatgramm_ids()->Clear();
  _internal_mutable_orpons()->Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* BuildingFilter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated int32 mrf_ids = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_mrf_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 8) {
          _internal_add_mrf_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 rf_ids = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_rf_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 16) {
          _internal_add_rf_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 device_ids = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_device_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 24) {
          _internal_add_device_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 flatgramm_ids = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_flatgramm_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 32) {
          _internal_add_flatgramm_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int64 orpons = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_orpons(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 40) {
          _internal_add_orpons(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // repeated int32 mrf_ids = 1;
  {
    int byte_size = _impl_._mrf_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(1, _internal_mrf_ids(),
                                                 byte_size, target);
    }
  }

  // repeated int32 rf_ids = 2;
  {
    int byte_size = _impl_._rf_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(2, _internal_rf_ids(),
                                                 byte_size, target);
    }
  }

  // repeated int32 device_ids = 3;
  {
    int byte_size = _impl_._device_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(3, _internal_device_ids(),
                                                 byte_size, target);
    }
  }

  // repeated int32 flatgramm_ids = 4;
  {
    int byte_size = _impl_._flatgramm_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(4, _internal_flatgramm_ids(),
                                                 byte_size, target);
    }
  }

  // repeated int64 orpons = 5;
  {
    int byte_size = _impl_._orpons_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt64Packed(5, _internal_orpons(),
                                                 byte_size, target);
    }
  }

  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.access_control.v1.BuildingFilter)
  return target;
}

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

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

  // repeated int32 mrf_ids = 1;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_mrf_ids())
    ;
    _impl_._mrf_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated int32 rf_ids = 2;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_rf_ids())
    ;
    _impl_._rf_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated int32 device_ids = 3;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_device_ids())
    ;
    _impl_._device_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated int32 flatgramm_ids = 4;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_flatgramm_ids())
    ;
    _impl_._flatgramm_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  // repeated int64 orpons = 5;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int64Size(
        this->_internal_orpons())
    ;
    _impl_._orpons_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
    std::size_t tag_size = data_size == 0
        ? 0
        : 1 + ::_pbi::WireFormatLite::Int32Size(
                            static_cast<int32_t>(data_size))
    ;
    total_size += tag_size + data_size;
  }

  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 BuildingFilter::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const BuildingFilter*>(
      &from));
}

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

  _this->_impl_.mrf_ids_.MergeFrom(from._impl_.mrf_ids_);
  _this->_impl_.rf_ids_.MergeFrom(from._impl_.rf_ids_);
  _this->_impl_.device_ids_.MergeFrom(from._impl_.device_ids_);
  _this->_impl_.flatgramm_ids_.MergeFrom(from._impl_.flatgramm_ids_);
  _this->_impl_.orpons_.MergeFrom(from._impl_.orpons_);
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void BuildingFilter::InternalSwap(BuildingFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.mrf_ids_.InternalSwap(&other->_impl_.mrf_ids_);
  _impl_.rf_ids_.InternalSwap(&other->_impl_.rf_ids_);
  _impl_.device_ids_.InternalSwap(&other->_impl_.device_ids_);
  _impl_.flatgramm_ids_.InternalSwap(&other->_impl_.flatgramm_ids_);
  _impl_.orpons_.InternalSwap(&other->_impl_.orpons_);
}

std::string BuildingFilter::GetTypeName() const {
  return "keyapis.access_control.v1.BuildingFilter";
}

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

class BuildingPaging::_Internal {
 public:
};

BuildingPaging::BuildingPaging(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.BuildingPaging)
}
BuildingPaging::BuildingPaging(const BuildingPaging& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.BuildingPaging)
}

inline void BuildingPaging::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.order_by_type_) { 0 }

    , decltype(_impl_.direction_type_) { 0 }

    , decltype(_impl_.limit_) { 0 }

    , decltype(_impl_.offset_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void BuildingPaging::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

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

  ::memset(&_impl_.order_by_type_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.offset_) -
      reinterpret_cast<char*>(&_impl_.order_by_type_)) + sizeof(_impl_.offset_));
  _internal_metadata_.Clear<std::string>();
}

const char* BuildingPaging::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.BuildingPaging.OrderByType order_by_type = 1;
      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_order_by_type(static_cast<::keyapis::access_control::v1::BuildingPaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.access_control.v1.BuildingPaging.DirectionType direction_type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_direction_type(static_cast<::keyapis::access_control::v1::BuildingPaging_DirectionType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 limit = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          _impl_.limit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 offset = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.access_control.v1.BuildingPaging.OrderByType order_by_type = 1;
  if (this->_internal_order_by_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_order_by_type(), target);
  }

  // .keyapis.access_control.v1.BuildingPaging.DirectionType direction_type = 2;
  if (this->_internal_direction_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        2, this->_internal_direction_type(), target);
  }

  // int32 limit = 3;
  if (this->_internal_limit() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        3, this->_internal_limit(), target);
  }

  // int32 offset = 4;
  if (this->_internal_offset() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        4, this->_internal_offset(), target);
  }

  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.access_control.v1.BuildingPaging)
  return target;
}

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

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

  // .keyapis.access_control.v1.BuildingPaging.OrderByType order_by_type = 1;
  if (this->_internal_order_by_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_order_by_type());
  }

  // .keyapis.access_control.v1.BuildingPaging.DirectionType direction_type = 2;
  if (this->_internal_direction_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_direction_type());
  }

  // int32 limit = 3;
  if (this->_internal_limit() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_limit());
  }

  // int32 offset = 4;
  if (this->_internal_offset() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_offset());
  }

  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 BuildingPaging::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const BuildingPaging*>(
      &from));
}

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

  if (from._internal_order_by_type() != 0) {
    _this->_internal_set_order_by_type(from._internal_order_by_type());
  }
  if (from._internal_direction_type() != 0) {
    _this->_internal_set_direction_type(from._internal_direction_type());
  }
  if (from._internal_limit() != 0) {
    _this->_internal_set_limit(from._internal_limit());
  }
  if (from._internal_offset() != 0) {
    _this->_internal_set_offset(from._internal_offset());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void BuildingPaging::InternalSwap(BuildingPaging* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BuildingPaging, _impl_.offset_)
      + sizeof(BuildingPaging::_impl_.offset_)
      - PROTOBUF_FIELD_OFFSET(BuildingPaging, _impl_.order_by_type_)>(
          reinterpret_cast<char*>(&_impl_.order_by_type_),
          reinterpret_cast<char*>(&other->_impl_.order_by_type_));
}

std::string BuildingPaging::GetTypeName() const {
  return "keyapis.access_control.v1.BuildingPaging";
}

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

class BuildingSubscriptionMode::_Internal {
 public:
};

BuildingSubscriptionMode::BuildingSubscriptionMode(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.BuildingSubscriptionMode)
}
BuildingSubscriptionMode::BuildingSubscriptionMode(const BuildingSubscriptionMode& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.BuildingSubscriptionMode)
}

inline void BuildingSubscriptionMode::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.subscription_mode_type_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void BuildingSubscriptionMode::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

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

  _impl_.subscription_mode_type_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* BuildingSubscriptionMode::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.BuildingSubscriptionMode.SubscriptionModeType subscription_mode_type = 1;
      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_subscription_mode_type(static_cast<::keyapis::access_control::v1::BuildingSubscriptionMode_SubscriptionModeType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<std::string>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.access_control.v1.BuildingSubscriptionMode.SubscriptionModeType subscription_mode_type = 1;
  if (this->_internal_subscription_mode_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_subscription_mode_type(), target);
  }

  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.access_control.v1.BuildingSubscriptionMode)
  return target;
}

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

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

  // .keyapis.access_control.v1.BuildingSubscriptionMode.SubscriptionModeType subscription_mode_type = 1;
  if (this->_internal_subscription_mode_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_subscription_mode_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 BuildingSubscriptionMode::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const BuildingSubscriptionMode*>(
      &from));
}

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

  if (from._internal_subscription_mode_type() != 0) {
    _this->_internal_set_subscription_mode_type(from._internal_subscription_mode_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void BuildingSubscriptionMode::InternalSwap(BuildingSubscriptionMode* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.subscription_mode_type_, other->_impl_.subscription_mode_type_);
}

std::string BuildingSubscriptionMode::GetTypeName() const {
  return "keyapis.access_control.v1.BuildingSubscriptionMode";
}

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

class GetBuildingOrponSubscriptionModeRequest::_Internal {
 public:
};

GetBuildingOrponSubscriptionModeRequest::GetBuildingOrponSubscriptionModeRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeRequest)
}
GetBuildingOrponSubscriptionModeRequest::GetBuildingOrponSubscriptionModeRequest(const GetBuildingOrponSubscriptionModeRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeRequest)
}

inline void GetBuildingOrponSubscriptionModeRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.orpon_) { ::int64_t{0} }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void GetBuildingOrponSubscriptionModeRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

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

  _impl_.orpon_ = ::int64_t{0};
  _internal_metadata_.Clear<std::string>();
}

const char* GetBuildingOrponSubscriptionModeRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.orpon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_orpon() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(
        1, this->_internal_orpon(), target);
  }

  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.access_control.v1.GetBuildingOrponSubscriptionModeRequest)
  return target;
}

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

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

  // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_orpon() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
        this->_internal_orpon());
  }

  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 GetBuildingOrponSubscriptionModeRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingOrponSubscriptionModeRequest*>(
      &from));
}

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

  if (from._internal_orpon() != 0) {
    _this->_internal_set_orpon(from._internal_orpon());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

  swap(_impl_.orpon_, other->_impl_.orpon_);
}

std::string GetBuildingOrponSubscriptionModeRequest::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingOrponSubscriptionModeRequest";
}

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

class GetBuildingOrponSubscriptionModeResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::ValidationError& validation(const GetBuildingOrponSubscriptionModeResponse_Error* msg);
};

const ::keyapis::access_control::v1::ValidationError&
GetBuildingOrponSubscriptionModeResponse_Error::_Internal::validation(const GetBuildingOrponSubscriptionModeResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetBuildingOrponSubscriptionModeResponse_Error::set_allocated_validation(::keyapis::access_control::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error.validation)
}
void GetBuildingOrponSubscriptionModeResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
GetBuildingOrponSubscriptionModeResponse_Error::GetBuildingOrponSubscriptionModeResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error)
}
GetBuildingOrponSubscriptionModeResponse_Error::GetBuildingOrponSubscriptionModeResponse_Error(const GetBuildingOrponSubscriptionModeResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingOrponSubscriptionModeResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::access_control::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error)
}

inline void GetBuildingOrponSubscriptionModeResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

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

inline void GetBuildingOrponSubscriptionModeResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void GetBuildingOrponSubscriptionModeResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

const char* GetBuildingOrponSubscriptionModeResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), 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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.access_control.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::validation(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.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error)
  return target;
}

::size_t GetBuildingOrponSubscriptionModeResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .keyapis.access_control.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  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 GetBuildingOrponSubscriptionModeResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingOrponSubscriptionModeResponse_Error*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::access_control::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingOrponSubscriptionModeResponse_Error::InternalSwap(GetBuildingOrponSubscriptionModeResponse_Error* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingOrponSubscriptionModeResponse_Error::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error";
}

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

class GetBuildingOrponSubscriptionModeResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::BuildingSubscriptionMode& data(const GetBuildingOrponSubscriptionModeResponse* msg);
  static const ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error& error(const GetBuildingOrponSubscriptionModeResponse* msg);
};

const ::keyapis::access_control::v1::BuildingSubscriptionMode&
GetBuildingOrponSubscriptionModeResponse::_Internal::data(const GetBuildingOrponSubscriptionModeResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error&
GetBuildingOrponSubscriptionModeResponse::_Internal::error(const GetBuildingOrponSubscriptionModeResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetBuildingOrponSubscriptionModeResponse::set_allocated_data(::keyapis::access_control::v1::BuildingSubscriptionMode* data) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (data) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(data);
    if (message_arena != submessage_arena) {
      data = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, data, submessage_arena);
    }
    set_has_data();
    _impl_.type_.data_ = data;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.data)
}
void GetBuildingOrponSubscriptionModeResponse::set_allocated_error(::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.error)
}
GetBuildingOrponSubscriptionModeResponse::GetBuildingOrponSubscriptionModeResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse)
}
GetBuildingOrponSubscriptionModeResponse::GetBuildingOrponSubscriptionModeResponse(const GetBuildingOrponSubscriptionModeResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingOrponSubscriptionModeResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::access_control::v1::BuildingSubscriptionMode::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse)
}

inline void GetBuildingOrponSubscriptionModeResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void GetBuildingOrponSubscriptionModeResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void GetBuildingOrponSubscriptionModeResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse)
  switch (type_case()) {
    case kData: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.data_;
      }
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

const char* GetBuildingOrponSubscriptionModeResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.BuildingSubscriptionMode data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), 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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  switch (type_case()) {
    case kData: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::data(this),
          _Internal::data(this).GetCachedSize(), target, stream);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  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.access_control.v1.GetBuildingOrponSubscriptionModeResponse)
  return target;
}

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

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

  switch (type_case()) {
    // .keyapis.access_control.v1.BuildingSubscriptionMode data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  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 GetBuildingOrponSubscriptionModeResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingOrponSubscriptionModeResponse*>(
      &from));
}

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

  switch (from.type_case()) {
    case kData: {
      _this->_internal_mutable_data()->::keyapis::access_control::v1::BuildingSubscriptionMode::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingOrponSubscriptionModeResponse::InternalSwap(GetBuildingOrponSubscriptionModeResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.type_, other->_impl_.type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingOrponSubscriptionModeResponse::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingOrponSubscriptionModeResponse";
}

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

class GetBuildingOrponExistsRequest::_Internal {
 public:
};

GetBuildingOrponExistsRequest::GetBuildingOrponExistsRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingOrponExistsRequest)
}
GetBuildingOrponExistsRequest::GetBuildingOrponExistsRequest(const GetBuildingOrponExistsRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _impl_(from._impl_) {
  _internal_metadata_.MergeFrom<std::string>(
      from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingOrponExistsRequest)
}

inline void GetBuildingOrponExistsRequest::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.orpon_) { ::int64_t{0} }

    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void GetBuildingOrponExistsRequest::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
}

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

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

  _impl_.orpon_ = ::int64_t{0};
  _internal_metadata_.Clear<std::string>();
}

const char* GetBuildingOrponExistsRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.orpon_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_orpon() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(
        1, this->_internal_orpon(), target);
  }

  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.access_control.v1.GetBuildingOrponExistsRequest)
  return target;
}

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

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

  // int64 orpon = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_orpon() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
        this->_internal_orpon());
  }

  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 GetBuildingOrponExistsRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingOrponExistsRequest*>(
      &from));
}

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

  if (from._internal_orpon() != 0) {
    _this->_internal_set_orpon(from._internal_orpon());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

  swap(_impl_.orpon_, other->_impl_.orpon_);
}

std::string GetBuildingOrponExistsRequest::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingOrponExistsRequest";
}

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

class GetBuildingOrponExistsResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::ValidationError& validation(const GetBuildingOrponExistsResponse_Error* msg);
};

const ::keyapis::access_control::v1::ValidationError&
GetBuildingOrponExistsResponse_Error::_Internal::validation(const GetBuildingOrponExistsResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetBuildingOrponExistsResponse_Error::set_allocated_validation(::keyapis::access_control::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingOrponExistsResponse.Error.validation)
}
void GetBuildingOrponExistsResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
GetBuildingOrponExistsResponse_Error::GetBuildingOrponExistsResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingOrponExistsResponse.Error)
}
GetBuildingOrponExistsResponse_Error::GetBuildingOrponExistsResponse_Error(const GetBuildingOrponExistsResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingOrponExistsResponse_Error* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_reason();
  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::access_control::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingOrponExistsResponse.Error)
}

inline void GetBuildingOrponExistsResponse_Error::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.reason_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_reason();
}

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

inline void GetBuildingOrponExistsResponse_Error::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_reason()) {
    clear_reason();
  }
}

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

void GetBuildingOrponExistsResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingOrponExistsResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


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

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

const char* GetBuildingOrponExistsResponse_Error::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .keyapis.access_control.v1.ValidationError validation = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_validation(), 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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // .keyapis.access_control.v1.ValidationError validation = 1;
  if (reason_case() == kValidation) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::validation(this),
        _Internal::validation(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.access_control.v1.GetBuildingOrponExistsResponse.Error)
  return target;
}

::size_t GetBuildingOrponExistsResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.access_control.v1.GetBuildingOrponExistsResponse.Error)
  ::size_t total_size = 0;

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

  switch (reason_case()) {
    // .keyapis.access_control.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  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 GetBuildingOrponExistsResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingOrponExistsResponse_Error*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kValidation: {
      _this->_internal_mutable_validation()->::keyapis::access_control::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingOrponExistsResponse_Error::InternalSwap(GetBuildingOrponExistsResponse_Error* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.reason_, other->_impl_.reason_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingOrponExistsResponse_Error::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingOrponExistsResponse.Error";
}

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

class GetBuildingOrponExistsResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::access_control::v1::GetBuildingOrponExistsResponse, _impl_._oneof_case_);
  static const ::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error& error(const GetBuildingOrponExistsResponse* msg);
};

const ::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error&
GetBuildingOrponExistsResponse::_Internal::error(const GetBuildingOrponExistsResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetBuildingOrponExistsResponse::set_allocated_error(::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error* error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_type();
  if (error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error);
    if (message_arena != submessage_arena) {
      error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, error, submessage_arena);
    }
    set_has_error();
    _impl_.type_.error_ = error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.access_control.v1.GetBuildingOrponExistsResponse.error)
}
GetBuildingOrponExistsResponse::GetBuildingOrponExistsResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.access_control.v1.GetBuildingOrponExistsResponse)
}
GetBuildingOrponExistsResponse::GetBuildingOrponExistsResponse(const GetBuildingOrponExistsResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetBuildingOrponExistsResponse* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  clear_has_type();
  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.access_control.v1.GetBuildingOrponExistsResponse)
}

inline void GetBuildingOrponExistsResponse::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.type_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_type();
}

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

inline void GetBuildingOrponExistsResponse::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_type()) {
    clear_type();
  }
}

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

void GetBuildingOrponExistsResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.access_control.v1.GetBuildingOrponExistsResponse)
  switch (type_case()) {
    case kData: {
      // No need to clear
      break;
    }
    case kError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.type_.error_;
      }
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = TYPE_NOT_SET;
}


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

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

const char* GetBuildingOrponExistsResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // bool data = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _internal_set_data(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.access_control.v1.GetBuildingOrponExistsResponse.Error error = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_error(), 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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  switch (type_case()) {
    case kData: {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteBoolToArray(
          1, this->_internal_data(), target);
      break;
    }
    case kError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::error(this),
          _Internal::error(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  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.access_control.v1.GetBuildingOrponExistsResponse)
  return target;
}

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

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

  switch (type_case()) {
    // bool data = 1;
    case kData: {
      total_size += 2;
      break;
    }
    // .keyapis.access_control.v1.GetBuildingOrponExistsResponse.Error error = 2;
    case kError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.error_);
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  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 GetBuildingOrponExistsResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetBuildingOrponExistsResponse*>(
      &from));
}

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

  switch (from.type_case()) {
    case kData: {
      _this->_internal_set_data(from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetBuildingOrponExistsResponse::InternalSwap(GetBuildingOrponExistsResponse* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.type_, other->_impl_.type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

std::string GetBuildingOrponExistsResponse::GetTypeName() const {
  return "keyapis.access_control.v1.GetBuildingOrponExistsResponse";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace access_control
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::Building*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::Building >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::Building >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingListRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingListResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingCountRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingCountResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingCountResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::BuildingFilter*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::BuildingFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::BuildingFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::BuildingPaging*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::BuildingPaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::BuildingPaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::BuildingSubscriptionMode*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::BuildingSubscriptionMode >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::BuildingSubscriptionMode >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingOrponSubscriptionModeResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingOrponExistsRequest*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingOrponExistsRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingOrponExistsRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingOrponExistsResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::access_control::v1::GetBuildingOrponExistsResponse*
Arena::CreateMaybeMessage< ::keyapis::access_control::v1::GetBuildingOrponExistsResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::access_control::v1::GetBuildingOrponExistsResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
