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

#include "keyapis/preset/v1/keyapis_preset_preset_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 preset {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR Preset_Sip::Preset_Sip(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.host_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SipDefaultTypeInternal _Preset_Sip_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Ntp::Preset_Ntp(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.host_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_NtpDefaultTypeInternal _Preset_Ntp_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Syslog::Preset_Syslog(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.host_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SyslogDefaultTypeInternal _Preset_Syslog_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Room::Preset_Room(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.phone_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_RoomDefaultTypeInternal _Preset_Room_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_VideoConfig_RtspUser::Preset_VideoConfig_RtspUser(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.username_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_VideoConfig_RtspUserDefaultTypeInternal _Preset_VideoConfig_RtspUser_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_VideoConfig::Preset_VideoConfig(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.rtsp_user_)*/nullptr
  , /*decltype(_impl_.quality_type_)*/ 0
} {}
struct Preset_VideoConfigDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Preset_VideoConfigDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Preset_VideoConfigDefaultTypeInternal() {}
  union {
    Preset_VideoConfig _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_VideoConfigDefaultTypeInternal _Preset_VideoConfig_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_Dtmf::Preset_Dtmf(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.code_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_DtmfDefaultTypeInternal _Preset_Dtmf_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_FaceRecognition::Preset_FaceRecognition(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.group_ids_)*/ {}
  ,/* _impl_._group_ids_cached_byte_size_ = */ { 0 }

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

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

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

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

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

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_FaceRecognitionDefaultTypeInternal _Preset_FaceRecognition_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_SavingError_Conflict::Preset_SavingError_Conflict(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Preset_SavingError_ConflictDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Preset_SavingError_ConflictDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Preset_SavingError_ConflictDefaultTypeInternal() {}
  union {
    Preset_SavingError_Conflict _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SavingError_ConflictDefaultTypeInternal _Preset_SavingError_Conflict_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_SavingError_NotAllowedForDefault::Preset_SavingError_NotAllowedForDefault(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct Preset_SavingError_NotAllowedForDefaultDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Preset_SavingError_NotAllowedForDefaultDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Preset_SavingError_NotAllowedForDefaultDefaultTypeInternal() {}
  union {
    Preset_SavingError_NotAllowedForDefault _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SavingError_NotAllowedForDefaultDefaultTypeInternal _Preset_SavingError_NotAllowedForDefault_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset_SavingError::Preset_SavingError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct Preset_SavingErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Preset_SavingErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~Preset_SavingErrorDefaultTypeInternal() {}
  union {
    Preset_SavingError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Preset_SavingErrorDefaultTypeInternal _Preset_SavingError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR Preset::Preset(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.mrf_ids_)*/ {}
  ,/* _impl_._mrf_ids_cached_byte_size_ = */ { 0 }

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

  , /*decltype(_impl_.rooms_)*/{}
  , /*decltype(_impl_.dtmf_)*/{}
  , /*decltype(_impl_.title_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

  , /*decltype(_impl_.description_)*/nullptr
  , /*decltype(_impl_.created_at_)*/nullptr
  , /*decltype(_impl_.changed_at_)*/nullptr
  , /*decltype(_impl_.sip_)*/nullptr
  , /*decltype(_impl_.ntp_)*/nullptr
  , /*decltype(_impl_.syslog_)*/nullptr
  , /*decltype(_impl_.video_config_)*/nullptr
  , /*decltype(_impl_.face_recognition_)*/nullptr
  , /*decltype(_impl_.id_)*/ 0

  , /*decltype(_impl_.status_type_)*/ 0
} {}
struct PresetDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PresetDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PresetDefaultTypeInternal() {}
  union {
    Preset _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PresetDefaultTypeInternal _Preset_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPresetRequest::PostPresetRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/nullptr} {}
struct PostPresetRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPresetRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPresetRequestDefaultTypeInternal() {}
  union {
    PostPresetRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPresetRequestDefaultTypeInternal _PostPresetRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPresetResponse_Error::PostPresetResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostPresetResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPresetResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPresetResponse_ErrorDefaultTypeInternal() {}
  union {
    PostPresetResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostPresetResponse_ErrorDefaultTypeInternal _PostPresetResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostPresetResponse::PostPresetResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostPresetResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostPresetResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostPresetResponseDefaultTypeInternal() {}
  union {
    PostPresetResponse _instance;
  };
};

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetListRequestDefaultTypeInternal _GetPresetListRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetRequest::GetPresetRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetRequestDefaultTypeInternal _GetPresetRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetResponse::GetPresetResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPresetResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPresetResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPresetResponseDefaultTypeInternal() {}
  union {
    GetPresetResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetResponseDefaultTypeInternal _GetPresetResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetDefaultRequest::GetPresetDefaultRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct GetPresetDefaultRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPresetDefaultRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPresetDefaultRequestDefaultTypeInternal() {}
  union {
    GetPresetDefaultRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetDefaultRequestDefaultTypeInternal _GetPresetDefaultRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetDefaultResponse::GetPresetDefaultResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPresetDefaultResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPresetDefaultResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPresetDefaultResponseDefaultTypeInternal() {}
  union {
    GetPresetDefaultResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetDefaultResponseDefaultTypeInternal _GetPresetDefaultResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetListResponse_Error::GetPresetListResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPresetListResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPresetListResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPresetListResponse_ErrorDefaultTypeInternal() {}
  union {
    GetPresetListResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetListResponse_ErrorDefaultTypeInternal _GetPresetListResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetListResponse::GetPresetListResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPresetListResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPresetListResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPresetListResponseDefaultTypeInternal() {}
  union {
    GetPresetListResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetListResponseDefaultTypeInternal _GetPresetListResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetCountRequest::GetPresetCountRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filter_)*/nullptr} {}
struct GetPresetCountRequestDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPresetCountRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPresetCountRequestDefaultTypeInternal() {}
  union {
    GetPresetCountRequest _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetCountRequestDefaultTypeInternal _GetPresetCountRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetCountResponse_Error::GetPresetCountResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPresetCountResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPresetCountResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPresetCountResponse_ErrorDefaultTypeInternal() {}
  union {
    GetPresetCountResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetCountResponse_ErrorDefaultTypeInternal _GetPresetCountResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR GetPresetCountResponse::GetPresetCountResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct GetPresetCountResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR GetPresetCountResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~GetPresetCountResponseDefaultTypeInternal() {}
  union {
    GetPresetCountResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetPresetCountResponseDefaultTypeInternal _GetPresetCountResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeletePresetRequest::DeletePresetRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeletePresetRequestDefaultTypeInternal _DeletePresetRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeletePresetResponse_Error_NotAllowedForDefault::DeletePresetResponse_Error_NotAllowedForDefault(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct DeletePresetResponse_Error_NotAllowedForDefaultDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeletePresetResponse_Error_NotAllowedForDefaultDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeletePresetResponse_Error_NotAllowedForDefaultDefaultTypeInternal() {}
  union {
    DeletePresetResponse_Error_NotAllowedForDefault _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeletePresetResponse_Error_NotAllowedForDefaultDefaultTypeInternal _DeletePresetResponse_Error_NotAllowedForDefault_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeletePresetResponse_Error::DeletePresetResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeletePresetResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeletePresetResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeletePresetResponse_ErrorDefaultTypeInternal() {}
  union {
    DeletePresetResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeletePresetResponse_ErrorDefaultTypeInternal _DeletePresetResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR DeletePresetResponse::DeletePresetResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct DeletePresetResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DeletePresetResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~DeletePresetResponseDefaultTypeInternal() {}
  union {
    DeletePresetResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeletePresetResponseDefaultTypeInternal _DeletePresetResponse_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PresetFilter::PresetFilter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.mrf_ids_)*/ {}
  ,/* _impl_._mrf_ids_cached_byte_size_ = */ { 0 }

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

  , /*decltype(_impl_.status_types_)*/ {}
  , /*decltype(_impl_._status_types_cached_byte_size_)*/ { 0 }

  , /*decltype(_impl_.text_)*/nullptr
  , /*decltype(_impl_.title_)*/nullptr} {}
struct PresetFilterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PresetFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PresetFilterDefaultTypeInternal() {}
  union {
    PresetFilter _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PresetFilterDefaultTypeInternal _PresetFilter_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PresetPaging::PresetPaging(
    ::_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 PresetPagingDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PresetPagingDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PresetPagingDefaultTypeInternal() {}
  union {
    PresetPaging _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PresetPagingDefaultTypeInternal _PresetPaging_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR ValidationError::ValidationError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.path_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValidationErrorDefaultTypeInternal _ValidationError_default_instance_;
}  // namespace v1
}  // namespace preset
}  // namespace keyapis
namespace keyapis {
namespace preset {
namespace v1 {
bool Preset_Syslog_ProtocolType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}
static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string>
    Preset_Syslog_ProtocolType_strings[3] = {};

static const char Preset_Syslog_ProtocolType_names[] = {
    "PROTOCOL_TYPE_UNKNOWN"
    "TCP"
    "UDP"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Preset_Syslog_ProtocolType_entries[] =
    {
        {{&Preset_Syslog_ProtocolType_names[0], 21}, 0},
        {{&Preset_Syslog_ProtocolType_names[21], 3}, 2},
        {{&Preset_Syslog_ProtocolType_names[24], 3}, 1},
};

static const int Preset_Syslog_ProtocolType_entries_by_number[] = {
    0,  // 0 -> PROTOCOL_TYPE_UNKNOWN
    2,  // 1 -> UDP
    1,  // 2 -> TCP
};

const std::string& Preset_Syslog_ProtocolType_Name(Preset_Syslog_ProtocolType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Preset_Syslog_ProtocolType_entries, Preset_Syslog_ProtocolType_entries_by_number,
          3, Preset_Syslog_ProtocolType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Preset_Syslog_ProtocolType_entries, Preset_Syslog_ProtocolType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Preset_Syslog_ProtocolType_strings[idx].get();
}

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

constexpr Preset_Syslog_ProtocolType Preset_Syslog::PROTOCOL_TYPE_UNKNOWN;
constexpr Preset_Syslog_ProtocolType Preset_Syslog::UDP;
constexpr Preset_Syslog_ProtocolType Preset_Syslog::TCP;
constexpr Preset_Syslog_ProtocolType Preset_Syslog::ProtocolType_MIN;
constexpr Preset_Syslog_ProtocolType Preset_Syslog::ProtocolType_MAX;
constexpr int Preset_Syslog::ProtocolType_ARRAYSIZE;

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

static const char Preset_VideoConfig_QualityType_names[] = {
    "HIGH"
    "MEDIUM"
    "QUALITY_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Preset_VideoConfig_QualityType_entries[] =
    {
        {{&Preset_VideoConfig_QualityType_names[0], 4}, 1},
        {{&Preset_VideoConfig_QualityType_names[4], 6}, 2},
        {{&Preset_VideoConfig_QualityType_names[10], 20}, 0},
};

static const int Preset_VideoConfig_QualityType_entries_by_number[] = {
    2,  // 0 -> QUALITY_TYPE_UNKNOWN
    0,  // 1 -> HIGH
    1,  // 2 -> MEDIUM
};

const std::string& Preset_VideoConfig_QualityType_Name(Preset_VideoConfig_QualityType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Preset_VideoConfig_QualityType_entries, Preset_VideoConfig_QualityType_entries_by_number,
          3, Preset_VideoConfig_QualityType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Preset_VideoConfig_QualityType_entries, Preset_VideoConfig_QualityType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Preset_VideoConfig_QualityType_strings[idx].get();
}

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

constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::QUALITY_TYPE_UNKNOWN;
constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::HIGH;
constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::MEDIUM;
constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::QualityType_MIN;
constexpr Preset_VideoConfig_QualityType Preset_VideoConfig::QualityType_MAX;
constexpr int Preset_VideoConfig::QualityType_ARRAYSIZE;

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

static const char Preset_FaceRecognition_ConfigurationType_names[] = {
    "CONFIGURATION_TYPE_UNKNOWN"
    "DEFAULT"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Preset_FaceRecognition_ConfigurationType_entries[] =
    {
        {{&Preset_FaceRecognition_ConfigurationType_names[0], 26}, 0},
        {{&Preset_FaceRecognition_ConfigurationType_names[26], 7}, 1},
};

static const int Preset_FaceRecognition_ConfigurationType_entries_by_number[] = {
    0,  // 0 -> CONFIGURATION_TYPE_UNKNOWN
    1,  // 1 -> DEFAULT
};

const std::string& Preset_FaceRecognition_ConfigurationType_Name(Preset_FaceRecognition_ConfigurationType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Preset_FaceRecognition_ConfigurationType_entries, Preset_FaceRecognition_ConfigurationType_entries_by_number,
          2, Preset_FaceRecognition_ConfigurationType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Preset_FaceRecognition_ConfigurationType_entries, Preset_FaceRecognition_ConfigurationType_entries_by_number, 2,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Preset_FaceRecognition_ConfigurationType_strings[idx].get();
}

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

constexpr Preset_FaceRecognition_ConfigurationType Preset_FaceRecognition::CONFIGURATION_TYPE_UNKNOWN;
constexpr Preset_FaceRecognition_ConfigurationType Preset_FaceRecognition::DEFAULT;
constexpr Preset_FaceRecognition_ConfigurationType Preset_FaceRecognition::ConfigurationType_MIN;
constexpr Preset_FaceRecognition_ConfigurationType Preset_FaceRecognition::ConfigurationType_MAX;
constexpr int Preset_FaceRecognition::ConfigurationType_ARRAYSIZE;

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

static const char Preset_StatusType_names[] = {
    "ACTIVE"
    "ARCHIVE"
    "STATUS_TYPE_UNKNOWN"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Preset_StatusType_entries[] =
    {
        {{&Preset_StatusType_names[0], 6}, 1},
        {{&Preset_StatusType_names[6], 7}, 2},
        {{&Preset_StatusType_names[13], 19}, 0},
};

static const int Preset_StatusType_entries_by_number[] = {
    2,  // 0 -> STATUS_TYPE_UNKNOWN
    0,  // 1 -> ACTIVE
    1,  // 2 -> ARCHIVE
};

const std::string& Preset_StatusType_Name(Preset_StatusType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          Preset_StatusType_entries, Preset_StatusType_entries_by_number,
          3, Preset_StatusType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      Preset_StatusType_entries, Preset_StatusType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : Preset_StatusType_strings[idx].get();
}

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

constexpr Preset_StatusType Preset::STATUS_TYPE_UNKNOWN;
constexpr Preset_StatusType Preset::ACTIVE;
constexpr Preset_StatusType Preset::ARCHIVE;
constexpr Preset_StatusType Preset::StatusType_MIN;
constexpr Preset_StatusType Preset::StatusType_MAX;
constexpr int Preset::StatusType_ARRAYSIZE;

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

static const char PresetPaging_OrderByType_names[] = {
    "CHANGED_AT"
    "CREATED_AT"
    "ID"
    "ORDER_BY_TYPE_UNKNOWN"
    "RANK"
};

static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry PresetPaging_OrderByType_entries[] =
    {
        {{&PresetPaging_OrderByType_names[0], 10}, 3},
        {{&PresetPaging_OrderByType_names[10], 10}, 2},
        {{&PresetPaging_OrderByType_names[20], 2}, 1},
        {{&PresetPaging_OrderByType_names[22], 21}, 0},
        {{&PresetPaging_OrderByType_names[43], 4}, 4},
};

static const int PresetPaging_OrderByType_entries_by_number[] = {
    3,  // 0 -> ORDER_BY_TYPE_UNKNOWN
    2,  // 1 -> ID
    1,  // 2 -> CREATED_AT
    0,  // 3 -> CHANGED_AT
    4,  // 4 -> RANK
};

const std::string& PresetPaging_OrderByType_Name(PresetPaging_OrderByType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PresetPaging_OrderByType_entries, PresetPaging_OrderByType_entries_by_number,
          5, PresetPaging_OrderByType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PresetPaging_OrderByType_entries, PresetPaging_OrderByType_entries_by_number, 5,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PresetPaging_OrderByType_strings[idx].get();
}

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

constexpr PresetPaging_OrderByType PresetPaging::ORDER_BY_TYPE_UNKNOWN;
constexpr PresetPaging_OrderByType PresetPaging::ID;
constexpr PresetPaging_OrderByType PresetPaging::CREATED_AT;
constexpr PresetPaging_OrderByType PresetPaging::CHANGED_AT;
constexpr PresetPaging_OrderByType PresetPaging::RANK;
constexpr PresetPaging_OrderByType PresetPaging::OrderByType_MIN;
constexpr PresetPaging_OrderByType PresetPaging::OrderByType_MAX;
constexpr int PresetPaging::OrderByType_ARRAYSIZE;

#endif  // (__cplusplus < 201703) &&
        // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
bool PresetPaging_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>
    PresetPaging_DirectionType_strings[3] = {};

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

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

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

const std::string& PresetPaging_DirectionType_Name(PresetPaging_DirectionType value) {
  static const bool kDummy =
      ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
          PresetPaging_DirectionType_entries, PresetPaging_DirectionType_entries_by_number,
          3, PresetPaging_DirectionType_strings);
  (void)kDummy;

  int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
      PresetPaging_DirectionType_entries, PresetPaging_DirectionType_entries_by_number, 3,
      value);
  return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString()
                   : PresetPaging_DirectionType_strings[idx].get();
}

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

constexpr PresetPaging_DirectionType PresetPaging::DIRECTION_TYPE_UNKNOWN;
constexpr PresetPaging_DirectionType PresetPaging::DESC;
constexpr PresetPaging_DirectionType PresetPaging::ASC;
constexpr PresetPaging_DirectionType PresetPaging::DirectionType_MIN;
constexpr PresetPaging_DirectionType PresetPaging::DirectionType_MAX;
constexpr int PresetPaging::DirectionType_ARRAYSIZE;

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

class Preset_Sip::_Internal {
 public:
};

Preset_Sip::Preset_Sip(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.Sip)
}
Preset_Sip::Preset_Sip(const Preset_Sip& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Sip* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.reg_host_) {}

    , decltype(_impl_.proxy_host_) {}

    , decltype(_impl_.port_) {}

    , decltype(_impl_.reg_port_) {}

    , decltype(_impl_.proxy_port_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  _impl_.reg_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.reg_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_reg_host().empty()) {
    _this->_impl_.reg_host_.Set(from._internal_reg_host(), _this->GetArenaForAllocation());
  }
  _impl_.proxy_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.proxy_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_proxy_host().empty()) {
    _this->_impl_.proxy_host_.Set(from._internal_proxy_host(), _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.port_, &from._impl_.port_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.proxy_port_) -
    reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.proxy_port_));
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.Sip)
}

inline void Preset_Sip::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.reg_host_) {}

    , decltype(_impl_.proxy_host_) {}

    , decltype(_impl_.port_) { 0 }

    , decltype(_impl_.reg_port_) { 0 }

    , decltype(_impl_.proxy_port_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.reg_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.reg_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.proxy_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.proxy_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Preset_Sip::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.host_.Destroy();
  _impl_.reg_host_.Destroy();
  _impl_.proxy_host_.Destroy();
}

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

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

  _impl_.host_.ClearToEmpty();
  _impl_.reg_host_.ClearToEmpty();
  _impl_.proxy_host_.ClearToEmpty();
  ::memset(&_impl_.port_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.proxy_port_) -
      reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.proxy_port_));
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Sip::_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) {
      // string host = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string reg_host = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_reg_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 reg_port = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
          _impl_.reg_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // string proxy_host = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_proxy_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 proxy_port = 6 [(.google.api.field_behavior) = REQUIRED];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
          _impl_.proxy_port_ = ::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* Preset_Sip::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.Sip)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.Sip.host");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

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

  // string reg_host = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_reg_host().empty()) {
    const std::string& _s = this->_internal_reg_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.Sip.reg_host");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

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

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

  // int32 proxy_port = 6 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_proxy_port() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        6, this->_internal_proxy_port(), 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.preset.v1.Preset.Sip)
  return target;
}

::size_t Preset_Sip::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.Sip)
  ::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 host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_host());
  }

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

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

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

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

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

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

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

  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (!from._internal_reg_host().empty()) {
    _this->_internal_set_reg_host(from._internal_reg_host());
  }
  if (!from._internal_proxy_host().empty()) {
    _this->_internal_set_proxy_host(from._internal_proxy_host());
  }
  if (from._internal_port() != 0) {
    _this->_internal_set_port(from._internal_port());
  }
  if (from._internal_reg_port() != 0) {
    _this->_internal_set_reg_port(from._internal_reg_port());
  }
  if (from._internal_proxy_port() != 0) {
    _this->_internal_set_proxy_port(from._internal_proxy_port());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Preset_Sip::InternalSwap(Preset_Sip* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.reg_host_, lhs_arena,
                                       &other->_impl_.reg_host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.proxy_host_, lhs_arena,
                                       &other->_impl_.proxy_host_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Preset_Sip, _impl_.proxy_port_)
      + sizeof(Preset_Sip::_impl_.proxy_port_)
      - PROTOBUF_FIELD_OFFSET(Preset_Sip, _impl_.port_)>(
          reinterpret_cast<char*>(&_impl_.port_),
          reinterpret_cast<char*>(&other->_impl_.port_));
}

std::string Preset_Sip::GetTypeName() const {
  return "keyapis.preset.v1.Preset.Sip";
}

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

class Preset_Ntp::_Internal {
 public:
};

Preset_Ntp::Preset_Ntp(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.Ntp)
}
Preset_Ntp::Preset_Ntp(const Preset_Ntp& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Ntp* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.port_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  _this->_impl_.port_ = from._impl_.port_;
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.Ntp)
}

inline void Preset_Ntp::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.port_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Preset_Ntp::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.host_.Destroy();
}

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

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

  _impl_.host_.ClearToEmpty();
  _impl_.port_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Ntp::_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) {
      // string host = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.port_ = ::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* Preset_Ntp::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.Ntp)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.Ntp.host");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_port() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_port(), 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.preset.v1.Preset.Ntp)
  return target;
}

::size_t Preset_Ntp::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.Ntp)
  ::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 host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_host());
  }

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

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

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

  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (from._internal_port() != 0) {
    _this->_internal_set_port(from._internal_port());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Preset_Ntp::InternalSwap(Preset_Ntp* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);

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

std::string Preset_Ntp::GetTypeName() const {
  return "keyapis.preset.v1.Preset.Ntp";
}

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

class Preset_Syslog::_Internal {
 public:
};

Preset_Syslog::Preset_Syslog(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.Syslog)
}
Preset_Syslog::Preset_Syslog(const Preset_Syslog& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Syslog* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.port_) {}

    , decltype(_impl_.protocol_type_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.port_, &from._impl_.port_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.protocol_type_) -
    reinterpret_cast<char*>(&_impl_.port_)) + sizeof(_impl_.protocol_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.Syslog)
}

inline void Preset_Syslog::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.host_) {}

    , decltype(_impl_.port_) { 0 }

    , decltype(_impl_.protocol_type_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Preset_Syslog::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.host_.Destroy();
}

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

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

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

const char* Preset_Syslog::_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) {
      // string host = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 port = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.Syslog.ProtocolType protocol_type = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_protocol_type(static_cast<::keyapis::preset::v1::Preset_Syslog_ProtocolType>(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* Preset_Syslog::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.Syslog)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.Syslog.host");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

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

  // .keyapis.preset.v1.Preset.Syslog.ProtocolType protocol_type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_protocol_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        3, this->_internal_protocol_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.preset.v1.Preset.Syslog)
  return target;
}

::size_t Preset_Syslog::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.Syslog)
  ::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 host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_host());
  }

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

  // .keyapis.preset.v1.Preset.Syslog.ProtocolType protocol_type = 3 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_protocol_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_protocol_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 Preset_Syslog::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_Syslog*>(
      &from));
}

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

  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (from._internal_port() != 0) {
    _this->_internal_set_port(from._internal_port());
  }
  if (from._internal_protocol_type() != 0) {
    _this->_internal_set_protocol_type(from._internal_protocol_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Preset_Syslog::InternalSwap(Preset_Syslog* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Preset_Syslog, _impl_.protocol_type_)
      + sizeof(Preset_Syslog::_impl_.protocol_type_)
      - PROTOBUF_FIELD_OFFSET(Preset_Syslog, _impl_.port_)>(
          reinterpret_cast<char*>(&_impl_.port_),
          reinterpret_cast<char*>(&other->_impl_.port_));
}

std::string Preset_Syslog::GetTypeName() const {
  return "keyapis.preset.v1.Preset.Syslog";
}

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

class Preset_Room::_Internal {
 public:
};

Preset_Room::Preset_Room(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.Room)
}
Preset_Room::Preset_Room(const Preset_Room& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Room* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.phone_) {}

    , decltype(_impl_.num_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.phone_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.phone_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_phone().empty()) {
    _this->_impl_.phone_.Set(from._internal_phone(), _this->GetArenaForAllocation());
  }
  _this->_impl_.num_ = from._impl_.num_;
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.Room)
}

inline void Preset_Room::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.phone_) {}

    , decltype(_impl_.num_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.phone_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.phone_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Preset_Room::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.phone_.Destroy();
}

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

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

  _impl_.phone_.ClearToEmpty();
  _impl_.num_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Room::_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) {
      // string phone = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_phone();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 num = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.num_ = ::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* Preset_Room::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.Room)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string phone = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_phone().empty()) {
    const std::string& _s = this->_internal_phone();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.Room.phone");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 num = 2 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_num() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_num(), 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.preset.v1.Preset.Room)
  return target;
}

::size_t Preset_Room::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.Room)
  ::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 phone = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_phone().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_phone());
  }

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

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

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

  if (!from._internal_phone().empty()) {
    _this->_internal_set_phone(from._internal_phone());
  }
  if (from._internal_num() != 0) {
    _this->_internal_set_num(from._internal_num());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Preset_Room::InternalSwap(Preset_Room* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.phone_, lhs_arena,
                                       &other->_impl_.phone_, rhs_arena);

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

std::string Preset_Room::GetTypeName() const {
  return "keyapis.preset.v1.Preset.Room";
}

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

class Preset_VideoConfig_RtspUser::_Internal {
 public:
};

Preset_VideoConfig_RtspUser::Preset_VideoConfig_RtspUser(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.VideoConfig.RtspUser)
}
Preset_VideoConfig_RtspUser::Preset_VideoConfig_RtspUser(const Preset_VideoConfig_RtspUser& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_VideoConfig_RtspUser* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.username_) {}

    , decltype(_impl_.password_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.username_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.username_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_username().empty()) {
    _this->_impl_.username_.Set(from._internal_username(), _this->GetArenaForAllocation());
  }
  _impl_.password_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.password_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_password().empty()) {
    _this->_impl_.password_.Set(from._internal_password(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.VideoConfig.RtspUser)
}

inline void Preset_VideoConfig_RtspUser::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.username_) {}

    , decltype(_impl_.password_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.username_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.username_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.password_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.password_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Preset_VideoConfig_RtspUser::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.username_.Destroy();
  _impl_.password_.Destroy();
}

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

void Preset_VideoConfig_RtspUser::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.Preset.VideoConfig.RtspUser)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.username_.ClearToEmpty();
  _impl_.password_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_VideoConfig_RtspUser::_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) {
      // string username = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_username();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string password = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_password();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* Preset_VideoConfig_RtspUser::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.VideoConfig.RtspUser)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string username = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_username().empty()) {
    const std::string& _s = this->_internal_username();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.VideoConfig.RtspUser.username");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string password = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_password().empty()) {
    const std::string& _s = this->_internal_password();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.VideoConfig.RtspUser.password");
    target = stream->WriteStringMaybeAliased(2, _s, 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.preset.v1.Preset.VideoConfig.RtspUser)
  return target;
}

::size_t Preset_VideoConfig_RtspUser::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.VideoConfig.RtspUser)
  ::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 username = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_username().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_username());
  }

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

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

void Preset_VideoConfig_RtspUser::MergeFrom(const Preset_VideoConfig_RtspUser& from) {
  Preset_VideoConfig_RtspUser* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.Preset.VideoConfig.RtspUser)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_username().empty()) {
    _this->_internal_set_username(from._internal_username());
  }
  if (!from._internal_password().empty()) {
    _this->_internal_set_password(from._internal_password());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

void Preset_VideoConfig_RtspUser::CopyFrom(const Preset_VideoConfig_RtspUser& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.preset.v1.Preset.VideoConfig.RtspUser)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void Preset_VideoConfig_RtspUser::InternalSwap(Preset_VideoConfig_RtspUser* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.username_, lhs_arena,
                                       &other->_impl_.username_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.password_, lhs_arena,
                                       &other->_impl_.password_, rhs_arena);
}

std::string Preset_VideoConfig_RtspUser::GetTypeName() const {
  return "keyapis.preset.v1.Preset.VideoConfig.RtspUser";
}

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

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

const ::keyapis::preset::v1::Preset_VideoConfig_RtspUser&
Preset_VideoConfig::_Internal::rtsp_user(const Preset_VideoConfig* msg) {
  return *msg->_impl_.rtsp_user_;
}
Preset_VideoConfig::Preset_VideoConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.VideoConfig)
}
Preset_VideoConfig::Preset_VideoConfig(const Preset_VideoConfig& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_VideoConfig* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.rtsp_user_){nullptr}
    , decltype(_impl_.quality_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.rtsp_user_ = new ::keyapis::preset::v1::Preset_VideoConfig_RtspUser(*from._impl_.rtsp_user_);
  }
  _this->_impl_.quality_type_ = from._impl_.quality_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.VideoConfig)
}

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

  };
}

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

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

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

void Preset_VideoConfig::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.Preset.VideoConfig)
  ::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_.rtsp_user_ != nullptr);
    _impl_.rtsp_user_->Clear();
  }
  _impl_.quality_type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_VideoConfig::_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.preset.v1.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_quality_type(static_cast<::keyapis::preset::v1::Preset_VideoConfig_QualityType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_rtsp_user(), 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* Preset_VideoConfig::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.VideoConfig)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.preset.v1.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_quality_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1, this->_internal_quality_type(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.preset.v1.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::rtsp_user(this),
        _Internal::rtsp_user(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.preset.v1.Preset.VideoConfig)
  return target;
}

::size_t Preset_VideoConfig::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.VideoConfig)
  ::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.preset.v1.Preset.VideoConfig.RtspUser rtsp_user = 2 [(.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_.rtsp_user_);
  }

  // .keyapis.preset.v1.Preset.VideoConfig.QualityType quality_type = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_quality_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_quality_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 Preset_VideoConfig::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_VideoConfig*>(
      &from));
}

void Preset_VideoConfig::MergeFrom(const Preset_VideoConfig& from) {
  Preset_VideoConfig* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.Preset.VideoConfig)
  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_rtsp_user()->::keyapis::preset::v1::Preset_VideoConfig_RtspUser::MergeFrom(
        from._internal_rtsp_user());
  }
  if (from._internal_quality_type() != 0) {
    _this->_internal_set_quality_type(from._internal_quality_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string Preset_VideoConfig::GetTypeName() const {
  return "keyapis.preset.v1.Preset.VideoConfig";
}

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

class Preset_Dtmf::_Internal {
 public:
};

Preset_Dtmf::Preset_Dtmf(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.Dtmf)
}
Preset_Dtmf::Preset_Dtmf(const Preset_Dtmf& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_Dtmf* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.code_) {}

    , decltype(_impl_.relay_index_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.code_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.code_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_code().empty()) {
    _this->_impl_.code_.Set(from._internal_code(), _this->GetArenaForAllocation());
  }
  _this->_impl_.relay_index_ = from._impl_.relay_index_;
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.Dtmf)
}

inline void Preset_Dtmf::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.code_) {}

    , decltype(_impl_.relay_index_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.code_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.code_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Preset_Dtmf::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.code_.Destroy();
}

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

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

  _impl_.code_.ClearToEmpty();
  _impl_.relay_index_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_Dtmf::_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) {
      // string code = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_code();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // int32 relay_index = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
          _impl_.relay_index_ = ::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* Preset_Dtmf::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.Dtmf)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string code = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_code().empty()) {
    const std::string& _s = this->_internal_code();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.Dtmf.code");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // int32 relay_index = 2;
  if (this->_internal_relay_index() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        2, this->_internal_relay_index(), 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.preset.v1.Preset.Dtmf)
  return target;
}

::size_t Preset_Dtmf::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.Dtmf)
  ::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 code = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_code().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_code());
  }

  // int32 relay_index = 2;
  if (this->_internal_relay_index() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_relay_index());
  }

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

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

  if (!from._internal_code().empty()) {
    _this->_internal_set_code(from._internal_code());
  }
  if (from._internal_relay_index() != 0) {
    _this->_internal_set_relay_index(from._internal_relay_index());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Preset_Dtmf::InternalSwap(Preset_Dtmf* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.code_, lhs_arena,
                                       &other->_impl_.code_, rhs_arena);

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

std::string Preset_Dtmf::GetTypeName() const {
  return "keyapis.preset.v1.Preset.Dtmf";
}

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

class Preset_FaceRecognition::_Internal {
 public:
};

Preset_FaceRecognition::Preset_FaceRecognition(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.FaceRecognition)
}
Preset_FaceRecognition::Preset_FaceRecognition(const Preset_FaceRecognition& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_FaceRecognition* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.group_ids_) { from._impl_.group_ids_ }
    ,/* _impl_._group_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.host_) {}

    , decltype(_impl_.alt_host_) {}

    , decltype(_impl_.endpoint_) {}

    , decltype(_impl_.auth_token_) {}

    , decltype(_impl_.origin_id_) {}

    , decltype(_impl_.configuration_type_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_host().empty()) {
    _this->_impl_.host_.Set(from._internal_host(), _this->GetArenaForAllocation());
  }
  _impl_.alt_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.alt_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_alt_host().empty()) {
    _this->_impl_.alt_host_.Set(from._internal_alt_host(), _this->GetArenaForAllocation());
  }
  _impl_.endpoint_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.endpoint_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_endpoint().empty()) {
    _this->_impl_.endpoint_.Set(from._internal_endpoint(), _this->GetArenaForAllocation());
  }
  _impl_.auth_token_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.auth_token_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_auth_token().empty()) {
    _this->_impl_.auth_token_.Set(from._internal_auth_token(), _this->GetArenaForAllocation());
  }
  _impl_.origin_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.origin_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_origin_id().empty()) {
    _this->_impl_.origin_id_.Set(from._internal_origin_id(), _this->GetArenaForAllocation());
  }
  _this->_impl_.configuration_type_ = from._impl_.configuration_type_;
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.FaceRecognition)
}

inline void Preset_FaceRecognition::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.group_ids_) { arena }
    ,/* _impl_._group_ids_cached_byte_size_ = */ { 0 }

    , decltype(_impl_.host_) {}

    , decltype(_impl_.alt_host_) {}

    , decltype(_impl_.endpoint_) {}

    , decltype(_impl_.auth_token_) {}

    , decltype(_impl_.origin_id_) {}

    , decltype(_impl_.configuration_type_) { 0 }

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.alt_host_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.alt_host_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.endpoint_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.endpoint_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.auth_token_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.auth_token_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.origin_id_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.origin_id_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Preset_FaceRecognition::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.group_ids_.~RepeatedField();
  _impl_.host_.Destroy();
  _impl_.alt_host_.Destroy();
  _impl_.endpoint_.Destroy();
  _impl_.auth_token_.Destroy();
  _impl_.origin_id_.Destroy();
}

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

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

  _internal_mutable_group_ids()->Clear();
  _impl_.host_.ClearToEmpty();
  _impl_.alt_host_.ClearToEmpty();
  _impl_.endpoint_.ClearToEmpty();
  _impl_.auth_token_.ClearToEmpty();
  _impl_.origin_id_.ClearToEmpty();
  _impl_.configuration_type_ = 0;
  _internal_metadata_.Clear<std::string>();
}

const char* Preset_FaceRecognition::_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) {
      // string host = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string alt_host = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_alt_host();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_endpoint();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string auth_token = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_auth_token();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.FaceRecognition.ConfigurationType configuration_type = 5 [(.google.api.field_behavior) = REQUIRED];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_configuration_type(static_cast<::keyapis::preset::v1::Preset_FaceRecognition_ConfigurationType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // string origin_id = 6 [(.google.api.field_behavior) = REQUIRED];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_origin_id();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 group_ids = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_group_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 56) {
          _internal_add_group_ids(::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* Preset_FaceRecognition::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.FaceRecognition)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // string host = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_host().empty()) {
    const std::string& _s = this->_internal_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.FaceRecognition.host");
    target = stream->WriteStringMaybeAliased(1, _s, target);
  }

  // string alt_host = 2;
  if (!this->_internal_alt_host().empty()) {
    const std::string& _s = this->_internal_alt_host();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.FaceRecognition.alt_host");
    target = stream->WriteStringMaybeAliased(2, _s, target);
  }

  // string endpoint = 3 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_endpoint().empty()) {
    const std::string& _s = this->_internal_endpoint();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.FaceRecognition.endpoint");
    target = stream->WriteStringMaybeAliased(3, _s, target);
  }

  // string auth_token = 4 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_auth_token().empty()) {
    const std::string& _s = this->_internal_auth_token();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.Preset.FaceRecognition.auth_token");
    target = stream->WriteStringMaybeAliased(4, _s, target);
  }

  // .keyapis.preset.v1.Preset.FaceRecognition.ConfigurationType configuration_type = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_configuration_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        5, this->_internal_configuration_type(), target);
  }

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

  // repeated int32 group_ids = 7;
  {
    int byte_size = _impl_._group_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(7, _internal_group_ids(),
                                                 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.preset.v1.Preset.FaceRecognition)
  return target;
}

::size_t Preset_FaceRecognition::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.FaceRecognition)
  ::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 group_ids = 7;
  {
    std::size_t data_size = ::_pbi::WireFormatLite::Int32Size(
        this->_internal_group_ids())
    ;
    _impl_._group_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;
  }

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

  // string alt_host = 2;
  if (!this->_internal_alt_host().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_alt_host());
  }

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

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

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

  // .keyapis.preset.v1.Preset.FaceRecognition.ConfigurationType configuration_type = 5 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_configuration_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_configuration_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 Preset_FaceRecognition::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_FaceRecognition*>(
      &from));
}

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

  _this->_impl_.group_ids_.MergeFrom(from._impl_.group_ids_);
  if (!from._internal_host().empty()) {
    _this->_internal_set_host(from._internal_host());
  }
  if (!from._internal_alt_host().empty()) {
    _this->_internal_set_alt_host(from._internal_alt_host());
  }
  if (!from._internal_endpoint().empty()) {
    _this->_internal_set_endpoint(from._internal_endpoint());
  }
  if (!from._internal_auth_token().empty()) {
    _this->_internal_set_auth_token(from._internal_auth_token());
  }
  if (!from._internal_origin_id().empty()) {
    _this->_internal_set_origin_id(from._internal_origin_id());
  }
  if (from._internal_configuration_type() != 0) {
    _this->_internal_set_configuration_type(from._internal_configuration_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Preset_FaceRecognition::InternalSwap(Preset_FaceRecognition* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.group_ids_.InternalSwap(&other->_impl_.group_ids_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.host_, lhs_arena,
                                       &other->_impl_.host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.alt_host_, lhs_arena,
                                       &other->_impl_.alt_host_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.endpoint_, lhs_arena,
                                       &other->_impl_.endpoint_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.auth_token_, lhs_arena,
                                       &other->_impl_.auth_token_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.origin_id_, lhs_arena,
                                       &other->_impl_.origin_id_, rhs_arena);
  swap(_impl_.configuration_type_, other->_impl_.configuration_type_);
}

std::string Preset_FaceRecognition::GetTypeName() const {
  return "keyapis.preset.v1.Preset.FaceRecognition";
}

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

class Preset_SavingError_Conflict::_Internal {
 public:
};

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

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

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

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

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

void Preset_SavingError_Conflict::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.Preset.SavingError.Conflict)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* Preset_SavingError_Conflict::_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);
    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* Preset_SavingError_Conflict::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.SavingError.Conflict)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::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.preset.v1.Preset.SavingError.Conflict)
  return target;
}

::size_t Preset_SavingError_Conflict::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.SavingError.Conflict)
  ::size_t total_size = 0;

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

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

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

void Preset_SavingError_Conflict::MergeFrom(const Preset_SavingError_Conflict& from) {
  Preset_SavingError_Conflict* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.Preset.SavingError.Conflict)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void Preset_SavingError_Conflict::CopyFrom(const Preset_SavingError_Conflict& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.preset.v1.Preset.SavingError.Conflict)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string Preset_SavingError_Conflict::GetTypeName() const {
  return "keyapis.preset.v1.Preset.SavingError.Conflict";
}

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

class Preset_SavingError_NotAllowedForDefault::_Internal {
 public:
};

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

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

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

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

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

void Preset_SavingError_NotAllowedForDefault::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.Preset.SavingError.NotAllowedForDefault)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* Preset_SavingError_NotAllowedForDefault::_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);
    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* Preset_SavingError_NotAllowedForDefault::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.SavingError.NotAllowedForDefault)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::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.preset.v1.Preset.SavingError.NotAllowedForDefault)
  return target;
}

::size_t Preset_SavingError_NotAllowedForDefault::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.SavingError.NotAllowedForDefault)
  ::size_t total_size = 0;

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

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

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

void Preset_SavingError_NotAllowedForDefault::MergeFrom(const Preset_SavingError_NotAllowedForDefault& from) {
  Preset_SavingError_NotAllowedForDefault* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.Preset.SavingError.NotAllowedForDefault)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void Preset_SavingError_NotAllowedForDefault::CopyFrom(const Preset_SavingError_NotAllowedForDefault& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.preset.v1.Preset.SavingError.NotAllowedForDefault)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string Preset_SavingError_NotAllowedForDefault::GetTypeName() const {
  return "keyapis.preset.v1.Preset.SavingError.NotAllowedForDefault";
}

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

class Preset_SavingError::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::preset::v1::Preset_SavingError, _impl_._oneof_case_);
  static const ::keyapis::preset::v1::Preset_SavingError_Conflict& conflict(const Preset_SavingError* msg);
  static const ::keyapis::preset::v1::Preset_SavingError_NotAllowedForDefault& not_allowed_for_default(const Preset_SavingError* msg);
};

const ::keyapis::preset::v1::Preset_SavingError_Conflict&
Preset_SavingError::_Internal::conflict(const Preset_SavingError* msg) {
  return *msg->_impl_.reason_.conflict_;
}
const ::keyapis::preset::v1::Preset_SavingError_NotAllowedForDefault&
Preset_SavingError::_Internal::not_allowed_for_default(const Preset_SavingError* msg) {
  return *msg->_impl_.reason_.not_allowed_for_default_;
}
void Preset_SavingError::set_allocated_conflict(::keyapis::preset::v1::Preset_SavingError_Conflict* conflict) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (conflict) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(conflict);
    if (message_arena != submessage_arena) {
      conflict = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, conflict, submessage_arena);
    }
    set_has_conflict();
    _impl_.reason_.conflict_ = conflict;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.preset.v1.Preset.SavingError.conflict)
}
void Preset_SavingError::set_allocated_not_allowed_for_default(::keyapis::preset::v1::Preset_SavingError_NotAllowedForDefault* not_allowed_for_default) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (not_allowed_for_default) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(not_allowed_for_default);
    if (message_arena != submessage_arena) {
      not_allowed_for_default = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, not_allowed_for_default, submessage_arena);
    }
    set_has_not_allowed_for_default();
    _impl_.reason_.not_allowed_for_default_ = not_allowed_for_default;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.preset.v1.Preset.SavingError.not_allowed_for_default)
}
Preset_SavingError::Preset_SavingError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset.SavingError)
}
Preset_SavingError::Preset_SavingError(const Preset_SavingError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset_SavingError* 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 kConflict: {
      _this->_internal_mutable_conflict()->::keyapis::preset::v1::Preset_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case kNotAllowedForDefault: {
      _this->_internal_mutable_not_allowed_for_default()->::keyapis::preset::v1::Preset_SavingError_NotAllowedForDefault::MergeFrom(
          from._internal_not_allowed_for_default());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset.SavingError)
}

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

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

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

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

void Preset_SavingError::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.preset.v1.Preset.SavingError)
  switch (reason_case()) {
    case kConflict: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.conflict_;
      }
      break;
    }
    case kNotAllowedForDefault: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.not_allowed_for_default_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void Preset_SavingError::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.Preset.SavingError)
  ::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* Preset_SavingError::_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.preset.v1.Preset.SavingError.Conflict conflict = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_conflict(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.SavingError.NotAllowedForDefault not_allowed_for_default = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_not_allowed_for_default(), 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* Preset_SavingError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset.SavingError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kConflict: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::conflict(this),
          _Internal::conflict(this).GetCachedSize(), target, stream);
      break;
    }
    case kNotAllowedForDefault: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::not_allowed_for_default(this),
          _Internal::not_allowed_for_default(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.preset.v1.Preset.SavingError)
  return target;
}

::size_t Preset_SavingError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset.SavingError)
  ::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.preset.v1.Preset.SavingError.Conflict conflict = 1;
    case kConflict: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.conflict_);
      break;
    }
    // .keyapis.preset.v1.Preset.SavingError.NotAllowedForDefault not_allowed_for_default = 2;
    case kNotAllowedForDefault: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.not_allowed_for_default_);
      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 Preset_SavingError::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset_SavingError*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kConflict: {
      _this->_internal_mutable_conflict()->::keyapis::preset::v1::Preset_SavingError_Conflict::MergeFrom(
          from._internal_conflict());
      break;
    }
    case kNotAllowedForDefault: {
      _this->_internal_mutable_not_allowed_for_default()->::keyapis::preset::v1::Preset_SavingError_NotAllowedForDefault::MergeFrom(
          from._internal_not_allowed_for_default());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Preset_SavingError::InternalSwap(Preset_SavingError* 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 Preset_SavingError::GetTypeName() const {
  return "keyapis.preset.v1.Preset.SavingError";
}

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

class Preset::_Internal {
 public:
  using HasBits = decltype(std::declval<Preset>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(Preset, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& description(const Preset* msg);
  static void set_has_description(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& created_at(const Preset* msg);
  static void set_has_created_at(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::Timestamp& changed_at(const Preset* msg);
  static void set_has_changed_at(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::keyapis::preset::v1::Preset_Sip& sip(const Preset* msg);
  static void set_has_sip(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::keyapis::preset::v1::Preset_Ntp& ntp(const Preset* msg);
  static void set_has_ntp(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::keyapis::preset::v1::Preset_Syslog& syslog(const Preset* msg);
  static void set_has_syslog(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::keyapis::preset::v1::Preset_VideoConfig& video_config(const Preset* msg);
  static void set_has_video_config(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::keyapis::preset::v1::Preset_FaceRecognition& face_recognition(const Preset* msg);
  static void set_has_face_recognition(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
Preset::_Internal::description(const Preset* msg) {
  return *msg->_impl_.description_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Preset::_Internal::created_at(const Preset* msg) {
  return *msg->_impl_.created_at_;
}
const ::PROTOBUF_NAMESPACE_ID::Timestamp&
Preset::_Internal::changed_at(const Preset* msg) {
  return *msg->_impl_.changed_at_;
}
const ::keyapis::preset::v1::Preset_Sip&
Preset::_Internal::sip(const Preset* msg) {
  return *msg->_impl_.sip_;
}
const ::keyapis::preset::v1::Preset_Ntp&
Preset::_Internal::ntp(const Preset* msg) {
  return *msg->_impl_.ntp_;
}
const ::keyapis::preset::v1::Preset_Syslog&
Preset::_Internal::syslog(const Preset* msg) {
  return *msg->_impl_.syslog_;
}
const ::keyapis::preset::v1::Preset_VideoConfig&
Preset::_Internal::video_config(const Preset* msg) {
  return *msg->_impl_.video_config_;
}
const ::keyapis::preset::v1::Preset_FaceRecognition&
Preset::_Internal::face_recognition(const Preset* msg) {
  return *msg->_impl_.face_recognition_;
}
void Preset::clear_description() {
  if (_impl_.description_ != nullptr) _impl_.description_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void Preset::clear_created_at() {
  if (_impl_.created_at_ != nullptr) _impl_.created_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
void Preset::clear_changed_at() {
  if (_impl_.changed_at_ != nullptr) _impl_.changed_at_->Clear();
  _impl_._has_bits_[0] &= ~0x00000004u;
}
Preset::Preset(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.Preset)
}
Preset::Preset(const Preset& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  Preset* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , 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_.rooms_){from._impl_.rooms_}
    , decltype(_impl_.dtmf_){from._impl_.dtmf_}
    , decltype(_impl_.title_) {}

    , decltype(_impl_.description_){nullptr}
    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.sip_){nullptr}
    , decltype(_impl_.ntp_){nullptr}
    , decltype(_impl_.syslog_){nullptr}
    , decltype(_impl_.video_config_){nullptr}
    , decltype(_impl_.face_recognition_){nullptr}
    , decltype(_impl_.id_) {}

    , decltype(_impl_.status_type_) {}
  };

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_title().empty()) {
    _this->_impl_.title_.Set(from._internal_title(), _this->GetArenaForAllocation());
  }
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.description_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.description_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.created_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.created_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000004u) != 0) {
    _this->_impl_.changed_at_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.changed_at_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000008u) != 0) {
    _this->_impl_.sip_ = new ::keyapis::preset::v1::Preset_Sip(*from._impl_.sip_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000010u) != 0) {
    _this->_impl_.ntp_ = new ::keyapis::preset::v1::Preset_Ntp(*from._impl_.ntp_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000020u) != 0) {
    _this->_impl_.syslog_ = new ::keyapis::preset::v1::Preset_Syslog(*from._impl_.syslog_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000040u) != 0) {
    _this->_impl_.video_config_ = new ::keyapis::preset::v1::Preset_VideoConfig(*from._impl_.video_config_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000080u) != 0) {
    _this->_impl_.face_recognition_ = new ::keyapis::preset::v1::Preset_FaceRecognition(*from._impl_.face_recognition_);
  }
  ::memcpy(&_impl_.id_, &from._impl_.id_,
    static_cast<::size_t>(reinterpret_cast<char*>(&_impl_.status_type_) -
    reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.status_type_));
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.Preset)
}

inline void Preset::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , 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_.rooms_){arena}
    , decltype(_impl_.dtmf_){arena}
    , decltype(_impl_.title_) {}

    , decltype(_impl_.description_){nullptr}
    , decltype(_impl_.created_at_){nullptr}
    , decltype(_impl_.changed_at_){nullptr}
    , decltype(_impl_.sip_){nullptr}
    , decltype(_impl_.ntp_){nullptr}
    , decltype(_impl_.syslog_){nullptr}
    , decltype(_impl_.video_config_){nullptr}
    , decltype(_impl_.face_recognition_){nullptr}
    , decltype(_impl_.id_) { 0 }

    , decltype(_impl_.status_type_) { 0 }

  };
  _impl_.title_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.title_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Preset::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.mrf_ids_.~RepeatedField();
  _impl_.rf_ids_.~RepeatedField();
  _internal_mutable_rooms()->~RepeatedPtrField();
  _internal_mutable_dtmf()->~RepeatedPtrField();
  _impl_.title_.Destroy();
  if (this != internal_default_instance()) delete _impl_.description_;
  if (this != internal_default_instance()) delete _impl_.created_at_;
  if (this != internal_default_instance()) delete _impl_.changed_at_;
  if (this != internal_default_instance()) delete _impl_.sip_;
  if (this != internal_default_instance()) delete _impl_.ntp_;
  if (this != internal_default_instance()) delete _impl_.syslog_;
  if (this != internal_default_instance()) delete _impl_.video_config_;
  if (this != internal_default_instance()) delete _impl_.face_recognition_;
}

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

void Preset::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.Preset)
  ::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_rooms()->Clear();
  _internal_mutable_dtmf()->Clear();
  _impl_.title_.ClearToEmpty();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.description_ != nullptr);
      _impl_.description_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.created_at_ != nullptr);
      _impl_.created_at_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      ABSL_DCHECK(_impl_.changed_at_ != nullptr);
      _impl_.changed_at_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      ABSL_DCHECK(_impl_.sip_ != nullptr);
      _impl_.sip_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      ABSL_DCHECK(_impl_.ntp_ != nullptr);
      _impl_.ntp_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      ABSL_DCHECK(_impl_.syslog_ != nullptr);
      _impl_.syslog_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      ABSL_DCHECK(_impl_.video_config_ != nullptr);
      _impl_.video_config_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      ABSL_DCHECK(_impl_.face_recognition_ != nullptr);
      _impl_.face_recognition_->Clear();
    }
  }
  ::memset(&_impl_.id_, 0, static_cast<::size_t>(
      reinterpret_cast<char*>(&_impl_.status_type_) -
      reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.status_type_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* Preset::_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;
      // string title = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_title();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 mrf_ids = 3 [(.google.api.field_behavior) = REQUIRED];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_mrf_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 24) {
          _internal_add_mrf_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated int32 rf_ids = 4 [(.google.api.field_behavior) = REQUIRED];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_rf_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 32) {
          _internal_add_rf_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_description(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp created_at = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_created_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.Timestamp changed_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_changed_at(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.StatusType status_type = 8 [(.google.api.field_behavior) = REQUIRED];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_set_status_type(static_cast<::keyapis::preset::v1::Preset_StatusType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_sip(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_ntp(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_syslog(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.preset.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_rooms(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_video_config(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.preset.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_dtmf(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.Preset.FaceRecognition face_recognition = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_face_recognition(), 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* Preset::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.Preset)
  ::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);
  }

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

  // repeated int32 mrf_ids = 3 [(.google.api.field_behavior) = REQUIRED];
  {
    int byte_size = _impl_._mrf_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(3, _internal_mrf_ids(),
                                                 byte_size, target);
    }
  }

  // repeated int32 rf_ids = 4 [(.google.api.field_behavior) = REQUIRED];
  {
    int byte_size = _impl_._rf_ids_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(4, _internal_rf_ids(),
                                                 byte_size, target);
    }
  }

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

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

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

  // .keyapis.preset.v1.Preset.StatusType status_type = 8 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_status_type() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        8, this->_internal_status_type(), target);
  }

  // .keyapis.preset.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::sip(this),
        _Internal::sip(this).GetCachedSize(), target, stream);
  }

  // .keyapis.preset.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, _Internal::ntp(this),
        _Internal::ntp(this).GetCachedSize(), target, stream);
  }

  // .keyapis.preset.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, _Internal::syslog(this),
        _Internal::syslog(this).GetCachedSize(), target, stream);
  }

  // repeated .keyapis.preset.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_rooms_size()); i < n; i++) {
    const auto& repfield = this->_internal_rooms(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(12, repfield, repfield.GetCachedSize(), target, stream);
  }

  // .keyapis.preset.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(13, _Internal::video_config(this),
        _Internal::video_config(this).GetCachedSize(), target, stream);
  }

  // repeated .keyapis.preset.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_dtmf_size()); i < n; i++) {
    const auto& repfield = this->_internal_dtmf(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(14, repfield, repfield.GetCachedSize(), target, stream);
  }

  // .keyapis.preset.v1.Preset.FaceRecognition face_recognition = 15;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(15, _Internal::face_recognition(this),
        _Internal::face_recognition(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.preset.v1.Preset)
  return target;
}

::size_t Preset::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.Preset)
  ::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 = 3 [(.google.api.field_behavior) = REQUIRED];
  {
    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 = 4 [(.google.api.field_behavior) = REQUIRED];
  {
    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 .keyapis.preset.v1.Preset.Room rooms = 12 [(.google.api.field_behavior) = REQUIRED];
  total_size += 1UL * this->_internal_rooms_size();
  for (const auto& msg : this->_internal_rooms()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .keyapis.preset.v1.Preset.Dtmf dtmf = 14 [(.google.api.field_behavior) = REQUIRED];
  total_size += 1UL * this->_internal_dtmf_size();
  for (const auto& msg : this->_internal_dtmf()) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // .google.protobuf.StringValue description = 5 [(.google.api.field_behavior) = OPTIONAL];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.description_);
    }

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

    // .google.protobuf.Timestamp changed_at = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.changed_at_);
    }

    // .keyapis.preset.v1.Preset.Sip sip = 9 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sip_);
    }

    // .keyapis.preset.v1.Preset.Ntp ntp = 10 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.ntp_);
    }

    // .keyapis.preset.v1.Preset.Syslog syslog = 11 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.syslog_);
    }

    // .keyapis.preset.v1.Preset.VideoConfig video_config = 13 [(.google.api.field_behavior) = REQUIRED];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.video_config_);
    }

    // .keyapis.preset.v1.Preset.FaceRecognition face_recognition = 15;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.face_recognition_);
    }

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

  // .keyapis.preset.v1.Preset.StatusType status_type = 8 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_status_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_status_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 Preset::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const Preset*>(
      &from));
}

void Preset::MergeFrom(const Preset& from) {
  Preset* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.Preset)
  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->_internal_mutable_rooms()->MergeFrom(from._internal_rooms());
  _this->_internal_mutable_dtmf()->MergeFrom(from._internal_dtmf());
  if (!from._internal_title().empty()) {
    _this->_internal_set_title(from._internal_title());
  }
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_description()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_description());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_created_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_created_at());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_changed_at()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
          from._internal_changed_at());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_sip()->::keyapis::preset::v1::Preset_Sip::MergeFrom(
          from._internal_sip());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_ntp()->::keyapis::preset::v1::Preset_Ntp::MergeFrom(
          from._internal_ntp());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_syslog()->::keyapis::preset::v1::Preset_Syslog::MergeFrom(
          from._internal_syslog());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_video_config()->::keyapis::preset::v1::Preset_VideoConfig::MergeFrom(
          from._internal_video_config());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_face_recognition()->::keyapis::preset::v1::Preset_FaceRecognition::MergeFrom(
          from._internal_face_recognition());
    }
  }
  if (from._internal_id() != 0) {
    _this->_internal_set_id(from._internal_id());
  }
  if (from._internal_status_type() != 0) {
    _this->_internal_set_status_type(from._internal_status_type());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void Preset::InternalSwap(Preset* 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]);
  _impl_.mrf_ids_.InternalSwap(&other->_impl_.mrf_ids_);
  _impl_.rf_ids_.InternalSwap(&other->_impl_.rf_ids_);
  _internal_mutable_rooms()->InternalSwap(other->_internal_mutable_rooms());
  _internal_mutable_dtmf()->InternalSwap(other->_internal_mutable_dtmf());
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.title_, lhs_arena,
                                       &other->_impl_.title_, rhs_arena);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Preset, _impl_.status_type_)
      + sizeof(Preset::_impl_.status_type_)
      - PROTOBUF_FIELD_OFFSET(Preset, _impl_.description_)>(
          reinterpret_cast<char*>(&_impl_.description_),
          reinterpret_cast<char*>(&other->_impl_.description_));
}

std::string Preset::GetTypeName() const {
  return "keyapis.preset.v1.Preset";
}

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

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

const ::keyapis::preset::v1::Preset&
PostPresetRequest::_Internal::data(const PostPresetRequest* msg) {
  return *msg->_impl_.data_;
}
PostPresetRequest::PostPresetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.PostPresetRequest)
}
PostPresetRequest::PostPresetRequest(const PostPresetRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPresetRequest* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){nullptr}};

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

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

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

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

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

void PostPresetRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.PostPresetRequest)
  ::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_.data_ != nullptr);
    _impl_.data_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PostPresetRequest::_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.preset.v1.Preset data = 1 [(.google.api.field_behavior) = REQUIRED];
      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;
      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* PostPresetRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.PostPresetRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

::size_t PostPresetRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.PostPresetRequest)
  ::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.preset.v1.Preset data = 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_.data_);
  }

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

void PostPresetRequest::MergeFrom(const PostPresetRequest& from) {
  PostPresetRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.PostPresetRequest)
  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_data()->::keyapis::preset::v1::Preset::MergeFrom(
        from._internal_data());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string PostPresetRequest::GetTypeName() const {
  return "keyapis.preset.v1.PostPresetRequest";
}

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

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

const ::keyapis::preset::v1::ValidationError&
PostPresetResponse_Error::_Internal::validation(const PostPresetResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
const ::keyapis::preset::v1::Preset_SavingError&
PostPresetResponse_Error::_Internal::saving(const PostPresetResponse_Error* msg) {
  return *msg->_impl_.reason_.saving_;
}
void PostPresetResponse_Error::set_allocated_validation(::keyapis::preset::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(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.preset.v1.PostPresetResponse.Error.validation)
}
void PostPresetResponse_Error::set_allocated_saving(::keyapis::preset::v1::Preset_SavingError* saving) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (saving) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(saving);
    if (message_arena != submessage_arena) {
      saving = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, saving, submessage_arena);
    }
    set_has_saving();
    _impl_.reason_.saving_ = saving;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.preset.v1.PostPresetResponse.Error.saving)
}
PostPresetResponse_Error::PostPresetResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.PostPresetResponse.Error)
}
PostPresetResponse_Error::PostPresetResponse_Error(const PostPresetResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPresetResponse_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::preset::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::keyapis::preset::v1::Preset_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.PostPresetResponse.Error)
}

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

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

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

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

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


void PostPresetResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.PostPresetResponse.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* PostPresetResponse_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.preset.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;
      // .keyapis.preset.v1.Preset.SavingError saving = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_saving(), 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* PostPresetResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.PostPresetResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (reason_case()) {
    case kValidation: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::validation(this),
          _Internal::validation(this).GetCachedSize(), target, stream);
      break;
    }
    case kSaving: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::saving(this),
          _Internal::saving(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.preset.v1.PostPresetResponse.Error)
  return target;
}

::size_t PostPresetResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.PostPresetResponse.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.preset.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    // .keyapis.preset.v1.Preset.SavingError saving = 2;
    case kSaving: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.saving_);
      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 PostPresetResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPresetResponse_Error*>(
      &from));
}

void PostPresetResponse_Error::MergeFrom(const PostPresetResponse_Error& from) {
  PostPresetResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.PostPresetResponse.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::preset::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kSaving: {
      _this->_internal_mutable_saving()->::keyapis::preset::v1::Preset_SavingError::MergeFrom(
          from._internal_saving());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPresetResponse_Error::InternalSwap(PostPresetResponse_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 PostPresetResponse_Error::GetTypeName() const {
  return "keyapis.preset.v1.PostPresetResponse.Error";
}

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

class PostPresetResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::preset::v1::PostPresetResponse, _impl_._oneof_case_);
  static const ::keyapis::preset::v1::Preset& data(const PostPresetResponse* msg);
  static const ::keyapis::preset::v1::PostPresetResponse_Error& error(const PostPresetResponse* msg);
};

const ::keyapis::preset::v1::Preset&
PostPresetResponse::_Internal::data(const PostPresetResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::preset::v1::PostPresetResponse_Error&
PostPresetResponse::_Internal::error(const PostPresetResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void PostPresetResponse::set_allocated_data(::keyapis::preset::v1::Preset* 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.preset.v1.PostPresetResponse.data)
}
void PostPresetResponse::set_allocated_error(::keyapis::preset::v1::PostPresetResponse_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.preset.v1.PostPresetResponse.error)
}
PostPresetResponse::PostPresetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.PostPresetResponse)
}
PostPresetResponse::PostPresetResponse(const PostPresetResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostPresetResponse* 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::preset::v1::Preset::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::preset::v1::PostPresetResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.PostPresetResponse)
}

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

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

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

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

void PostPresetResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.preset.v1.PostPresetResponse)
  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 PostPresetResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.PostPresetResponse)
  ::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* PostPresetResponse::_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.preset.v1.Preset 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.preset.v1.PostPresetResponse.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* PostPresetResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.PostPresetResponse)
  ::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.preset.v1.PostPresetResponse)
  return target;
}

::size_t PostPresetResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.PostPresetResponse)
  ::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.preset.v1.Preset data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.preset.v1.PostPresetResponse.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 PostPresetResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostPresetResponse*>(
      &from));
}

void PostPresetResponse::MergeFrom(const PostPresetResponse& from) {
  PostPresetResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.PostPresetResponse)
  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::preset::v1::Preset::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::preset::v1::PostPresetResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostPresetResponse::InternalSwap(PostPresetResponse* 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 PostPresetResponse::GetTypeName() const {
  return "keyapis.preset.v1.PostPresetResponse";
}

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

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

const ::keyapis::preset::v1::PresetFilter&
GetPresetListRequest::_Internal::filter(const GetPresetListRequest* msg) {
  return *msg->_impl_.filter_;
}
const ::keyapis::preset::v1::PresetPaging&
GetPresetListRequest::_Internal::paging(const GetPresetListRequest* msg) {
  return *msg->_impl_.pagination_.paging_;
}
void GetPresetListRequest::set_allocated_paging(::keyapis::preset::v1::PresetPaging* 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.preset.v1.GetPresetListRequest.paging)
}
GetPresetListRequest::GetPresetListRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.GetPresetListRequest)
}
GetPresetListRequest::GetPresetListRequest(const GetPresetListRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPresetListRequest* 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::preset::v1::PresetFilter(*from._impl_.filter_);
  }
  clear_has_pagination();
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::preset::v1::PresetPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.GetPresetListRequest)
}

inline void GetPresetListRequest::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();
}

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

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

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

void GetPresetListRequest::clear_pagination() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.preset.v1.GetPresetListRequest)
  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 GetPresetListRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetListRequest)
  ::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* GetPresetListRequest::_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.preset.v1.PresetFilter 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.preset.v1.PresetPaging 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* GetPresetListRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetListRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.preset.v1.PresetFilter 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.preset.v1.PresetPaging 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.preset.v1.GetPresetListRequest)
  return target;
}

::size_t GetPresetListRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetListRequest)
  ::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.preset.v1.PresetFilter 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.preset.v1.PresetPaging 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 GetPresetListRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPresetListRequest*>(
      &from));
}

void GetPresetListRequest::MergeFrom(const GetPresetListRequest& from) {
  GetPresetListRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetListRequest)
  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::preset::v1::PresetFilter::MergeFrom(
        from._internal_filter());
  }
  switch (from.pagination_case()) {
    case kPaging: {
      _this->_internal_mutable_paging()->::keyapis::preset::v1::PresetPaging::MergeFrom(
          from._internal_paging());
      break;
    }
    case PAGINATION_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetPresetListRequest::InternalSwap(GetPresetListRequest* 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 GetPresetListRequest::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetListRequest";
}

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

class GetPresetRequest::_Internal {
 public:
};

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

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

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

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

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

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

void GetPresetRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetRequest)
  ::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* GetPresetRequest::_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* GetPresetRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetRequest)
  ::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.preset.v1.GetPresetRequest)
  return target;
}

::size_t GetPresetRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetRequest)
  ::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 GetPresetRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPresetRequest*>(
      &from));
}

void GetPresetRequest::MergeFrom(const GetPresetRequest& from) {
  GetPresetRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetRequest)
  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 GetPresetRequest::CopyFrom(const GetPresetRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.preset.v1.GetPresetRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

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

std::string GetPresetRequest::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetRequest";
}

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

class GetPresetResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::preset::v1::GetPresetResponse, _impl_._oneof_case_);
  static const ::keyapis::preset::v1::Preset& data(const GetPresetResponse* msg);
};

const ::keyapis::preset::v1::Preset&
GetPresetResponse::_Internal::data(const GetPresetResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void GetPresetResponse::set_allocated_data(::keyapis::preset::v1::Preset* 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.preset.v1.GetPresetResponse.data)
}
GetPresetResponse::GetPresetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.GetPresetResponse)
}
GetPresetResponse::GetPresetResponse(const GetPresetResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPresetResponse* 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::preset::v1::Preset::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.GetPresetResponse)
}

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

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

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

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

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


void GetPresetResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetResponse)
  ::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* GetPresetResponse::_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.preset.v1.Preset 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;
      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* GetPresetResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.preset.v1.Preset data = 1;
  if (type_case() == kData) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(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.preset.v1.GetPresetResponse)
  return target;
}

::size_t GetPresetResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetResponse)
  ::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.preset.v1.Preset data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.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 GetPresetResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPresetResponse*>(
      &from));
}

void GetPresetResponse::MergeFrom(const GetPresetResponse& from) {
  GetPresetResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetResponse)
  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::preset::v1::Preset::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetPresetResponse::InternalSwap(GetPresetResponse* 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 GetPresetResponse::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetResponse";
}

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

class GetPresetDefaultRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

const char* GetPresetDefaultRequest::_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);
    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* GetPresetDefaultRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetDefaultRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::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.preset.v1.GetPresetDefaultRequest)
  return target;
}

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

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

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

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

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

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

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

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

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

std::string GetPresetDefaultRequest::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetDefaultRequest";
}

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

class GetPresetDefaultResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::preset::v1::GetPresetDefaultResponse, _impl_._oneof_case_);
  static const ::keyapis::preset::v1::Preset& data(const GetPresetDefaultResponse* msg);
};

const ::keyapis::preset::v1::Preset&
GetPresetDefaultResponse::_Internal::data(const GetPresetDefaultResponse* msg) {
  return *msg->_impl_.type_.data_;
}
void GetPresetDefaultResponse::set_allocated_data(::keyapis::preset::v1::Preset* 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.preset.v1.GetPresetDefaultResponse.data)
}
GetPresetDefaultResponse::GetPresetDefaultResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.GetPresetDefaultResponse)
}
GetPresetDefaultResponse::GetPresetDefaultResponse(const GetPresetDefaultResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPresetDefaultResponse* 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::preset::v1::Preset::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.GetPresetDefaultResponse)
}

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

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

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

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

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


void GetPresetDefaultResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetDefaultResponse)
  ::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* GetPresetDefaultResponse::_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.preset.v1.Preset 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;
      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* GetPresetDefaultResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetDefaultResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.preset.v1.Preset data = 1;
  if (type_case() == kData) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::data(this),
        _Internal::data(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.preset.v1.GetPresetDefaultResponse)
  return target;
}

::size_t GetPresetDefaultResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetDefaultResponse)
  ::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.preset.v1.Preset data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.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 GetPresetDefaultResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPresetDefaultResponse*>(
      &from));
}

void GetPresetDefaultResponse::MergeFrom(const GetPresetDefaultResponse& from) {
  GetPresetDefaultResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetDefaultResponse)
  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::preset::v1::Preset::MergeFrom(
          from._internal_data());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetPresetDefaultResponse::InternalSwap(GetPresetDefaultResponse* 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 GetPresetDefaultResponse::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetDefaultResponse";
}

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

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

const ::keyapis::preset::v1::ValidationError&
GetPresetListResponse_Error::_Internal::validation(const GetPresetListResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetPresetListResponse_Error::set_allocated_validation(::keyapis::preset::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(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.preset.v1.GetPresetListResponse.Error.validation)
}
GetPresetListResponse_Error::GetPresetListResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.GetPresetListResponse.Error)
}
GetPresetListResponse_Error::GetPresetListResponse_Error(const GetPresetListResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPresetListResponse_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::preset::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.GetPresetListResponse.Error)
}

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

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

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

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

void GetPresetListResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.preset.v1.GetPresetListResponse.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 GetPresetListResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetListResponse.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* GetPresetListResponse_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.preset.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* GetPresetListResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetListResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.preset.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.preset.v1.GetPresetListResponse.Error)
  return target;
}

::size_t GetPresetListResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetListResponse.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.preset.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 GetPresetListResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPresetListResponse_Error*>(
      &from));
}

void GetPresetListResponse_Error::MergeFrom(const GetPresetListResponse_Error& from) {
  GetPresetListResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetListResponse.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::preset::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetPresetListResponse_Error::InternalSwap(GetPresetListResponse_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 GetPresetListResponse_Error::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetListResponse.Error";
}

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

class GetPresetListResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::preset::v1::GetPresetListResponse, _impl_._oneof_case_);
  static const ::keyapis::preset::v1::Preset& data(const GetPresetListResponse* msg);
  static const ::keyapis::preset::v1::GetPresetListResponse_Error& error(const GetPresetListResponse* msg);
};

const ::keyapis::preset::v1::Preset&
GetPresetListResponse::_Internal::data(const GetPresetListResponse* msg) {
  return *msg->_impl_.type_.data_;
}
const ::keyapis::preset::v1::GetPresetListResponse_Error&
GetPresetListResponse::_Internal::error(const GetPresetListResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetPresetListResponse::set_allocated_data(::keyapis::preset::v1::Preset* 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.preset.v1.GetPresetListResponse.data)
}
void GetPresetListResponse::set_allocated_error(::keyapis::preset::v1::GetPresetListResponse_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.preset.v1.GetPresetListResponse.error)
}
GetPresetListResponse::GetPresetListResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.GetPresetListResponse)
}
GetPresetListResponse::GetPresetListResponse(const GetPresetListResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPresetListResponse* 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::preset::v1::Preset::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::preset::v1::GetPresetListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.GetPresetListResponse)
}

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

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

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

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

void GetPresetListResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.preset.v1.GetPresetListResponse)
  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 GetPresetListResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetListResponse)
  ::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* GetPresetListResponse::_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.preset.v1.Preset 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.preset.v1.GetPresetListResponse.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* GetPresetListResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetListResponse)
  ::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.preset.v1.GetPresetListResponse)
  return target;
}

::size_t GetPresetListResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetListResponse)
  ::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.preset.v1.Preset data = 1;
    case kData: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.type_.data_);
      break;
    }
    // .keyapis.preset.v1.GetPresetListResponse.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 GetPresetListResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPresetListResponse*>(
      &from));
}

void GetPresetListResponse::MergeFrom(const GetPresetListResponse& from) {
  GetPresetListResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetListResponse)
  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::preset::v1::Preset::MergeFrom(
          from._internal_data());
      break;
    }
    case kError: {
      _this->_internal_mutable_error()->::keyapis::preset::v1::GetPresetListResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetPresetListResponse::InternalSwap(GetPresetListResponse* 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 GetPresetListResponse::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetListResponse";
}

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

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

const ::keyapis::preset::v1::PresetFilter&
GetPresetCountRequest::_Internal::filter(const GetPresetCountRequest* msg) {
  return *msg->_impl_.filter_;
}
GetPresetCountRequest::GetPresetCountRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.GetPresetCountRequest)
}
GetPresetCountRequest::GetPresetCountRequest(const GetPresetCountRequest& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPresetCountRequest* 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::preset::v1::PresetFilter(*from._impl_.filter_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.GetPresetCountRequest)
}

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

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

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

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

void GetPresetCountRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetCountRequest)
  ::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* GetPresetCountRequest::_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.preset.v1.PresetFilter 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;
      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* GetPresetCountRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetCountRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // .keyapis.preset.v1.PresetFilter filter = 1;
  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.preset.v1.GetPresetCountRequest)
  return target;
}

::size_t GetPresetCountRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetCountRequest)
  ::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.preset.v1.PresetFilter 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_);
  }

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

void GetPresetCountRequest::MergeFrom(const GetPresetCountRequest& from) {
  GetPresetCountRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetCountRequest)
  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::preset::v1::PresetFilter::MergeFrom(
        from._internal_filter());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetPresetCountRequest::InternalSwap(GetPresetCountRequest* 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 GetPresetCountRequest::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetCountRequest";
}

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

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

const ::keyapis::preset::v1::ValidationError&
GetPresetCountResponse_Error::_Internal::validation(const GetPresetCountResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
void GetPresetCountResponse_Error::set_allocated_validation(::keyapis::preset::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(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.preset.v1.GetPresetCountResponse.Error.validation)
}
GetPresetCountResponse_Error::GetPresetCountResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.GetPresetCountResponse.Error)
}
GetPresetCountResponse_Error::GetPresetCountResponse_Error(const GetPresetCountResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPresetCountResponse_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::preset::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.GetPresetCountResponse.Error)
}

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

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

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

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

void GetPresetCountResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.preset.v1.GetPresetCountResponse.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 GetPresetCountResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetCountResponse.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* GetPresetCountResponse_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.preset.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* GetPresetCountResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetCountResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.preset.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.preset.v1.GetPresetCountResponse.Error)
  return target;
}

::size_t GetPresetCountResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetCountResponse.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.preset.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 GetPresetCountResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPresetCountResponse_Error*>(
      &from));
}

void GetPresetCountResponse_Error::MergeFrom(const GetPresetCountResponse_Error& from) {
  GetPresetCountResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetCountResponse.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::preset::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetPresetCountResponse_Error::InternalSwap(GetPresetCountResponse_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 GetPresetCountResponse_Error::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetCountResponse.Error";
}

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

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

const ::keyapis::preset::v1::GetPresetCountResponse_Error&
GetPresetCountResponse::_Internal::error(const GetPresetCountResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void GetPresetCountResponse::set_allocated_error(::keyapis::preset::v1::GetPresetCountResponse_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.preset.v1.GetPresetCountResponse.error)
}
GetPresetCountResponse::GetPresetCountResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.GetPresetCountResponse)
}
GetPresetCountResponse::GetPresetCountResponse(const GetPresetCountResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  GetPresetCountResponse* 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::preset::v1::GetPresetCountResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.GetPresetCountResponse)
}

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

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

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

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

void GetPresetCountResponse::clear_type() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.preset.v1.GetPresetCountResponse)
  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 GetPresetCountResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.GetPresetCountResponse)
  ::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* GetPresetCountResponse::_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;
      // .keyapis.preset.v1.GetPresetCountResponse.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* GetPresetCountResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.GetPresetCountResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (type_case()) {
    case kData: {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteInt32ToArray(
          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.preset.v1.GetPresetCountResponse)
  return target;
}

::size_t GetPresetCountResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.GetPresetCountResponse)
  ::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;
    }
    // .keyapis.preset.v1.GetPresetCountResponse.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 GetPresetCountResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const GetPresetCountResponse*>(
      &from));
}

void GetPresetCountResponse::MergeFrom(const GetPresetCountResponse& from) {
  GetPresetCountResponse* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.GetPresetCountResponse)
  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::preset::v1::GetPresetCountResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void GetPresetCountResponse::InternalSwap(GetPresetCountResponse* 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 GetPresetCountResponse::GetTypeName() const {
  return "keyapis.preset.v1.GetPresetCountResponse";
}

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

class DeletePresetRequest::_Internal {
 public:
};

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

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

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

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

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

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

void DeletePresetRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.DeletePresetRequest)
  ::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* DeletePresetRequest::_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* DeletePresetRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.DeletePresetRequest)
  ::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.preset.v1.DeletePresetRequest)
  return target;
}

::size_t DeletePresetRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.DeletePresetRequest)
  ::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 DeletePresetRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeletePresetRequest*>(
      &from));
}

void DeletePresetRequest::MergeFrom(const DeletePresetRequest& from) {
  DeletePresetRequest* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.DeletePresetRequest)
  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 DeletePresetRequest::CopyFrom(const DeletePresetRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.preset.v1.DeletePresetRequest)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

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

std::string DeletePresetRequest::GetTypeName() const {
  return "keyapis.preset.v1.DeletePresetRequest";
}

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

class DeletePresetResponse_Error_NotAllowedForDefault::_Internal {
 public:
};

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

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

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

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

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

void DeletePresetResponse_Error_NotAllowedForDefault::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault)
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

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

const char* DeletePresetResponse_Error_NotAllowedForDefault::_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);
    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* DeletePresetResponse_Error_NotAllowedForDefault::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::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.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault)
  return target;
}

::size_t DeletePresetResponse_Error_NotAllowedForDefault::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault)
  ::size_t total_size = 0;

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

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

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

void DeletePresetResponse_Error_NotAllowedForDefault::MergeFrom(const DeletePresetResponse_Error_NotAllowedForDefault& from) {
  DeletePresetResponse_Error_NotAllowedForDefault* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void DeletePresetResponse_Error_NotAllowedForDefault::CopyFrom(const DeletePresetResponse_Error_NotAllowedForDefault& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string DeletePresetResponse_Error_NotAllowedForDefault::GetTypeName() const {
  return "keyapis.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault";
}

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

class DeletePresetResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::preset::v1::DeletePresetResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::preset::v1::DeletePresetResponse_Error_NotAllowedForDefault& not_allowed_for_default(const DeletePresetResponse_Error* msg);
};

const ::keyapis::preset::v1::DeletePresetResponse_Error_NotAllowedForDefault&
DeletePresetResponse_Error::_Internal::not_allowed_for_default(const DeletePresetResponse_Error* msg) {
  return *msg->_impl_.reason_.not_allowed_for_default_;
}
void DeletePresetResponse_Error::set_allocated_not_allowed_for_default(::keyapis::preset::v1::DeletePresetResponse_Error_NotAllowedForDefault* not_allowed_for_default) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (not_allowed_for_default) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(not_allowed_for_default);
    if (message_arena != submessage_arena) {
      not_allowed_for_default = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, not_allowed_for_default, submessage_arena);
    }
    set_has_not_allowed_for_default();
    _impl_.reason_.not_allowed_for_default_ = not_allowed_for_default;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.preset.v1.DeletePresetResponse.Error.not_allowed_for_default)
}
DeletePresetResponse_Error::DeletePresetResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.DeletePresetResponse.Error)
}
DeletePresetResponse_Error::DeletePresetResponse_Error(const DeletePresetResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeletePresetResponse_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 kNotAllowedForDefault: {
      _this->_internal_mutable_not_allowed_for_default()->::keyapis::preset::v1::DeletePresetResponse_Error_NotAllowedForDefault::MergeFrom(
          from._internal_not_allowed_for_default());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.DeletePresetResponse.Error)
}

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

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

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

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

void DeletePresetResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.preset.v1.DeletePresetResponse.Error)
  switch (reason_case()) {
    case kNotAllowedForDefault: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.not_allowed_for_default_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void DeletePresetResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.DeletePresetResponse.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* DeletePresetResponse_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.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault not_allowed_for_default = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_not_allowed_for_default(), 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* DeletePresetResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.DeletePresetResponse.Error)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault not_allowed_for_default = 1;
  if (reason_case() == kNotAllowedForDefault) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::not_allowed_for_default(this),
        _Internal::not_allowed_for_default(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.preset.v1.DeletePresetResponse.Error)
  return target;
}

::size_t DeletePresetResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.DeletePresetResponse.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.preset.v1.DeletePresetResponse.Error.NotAllowedForDefault not_allowed_for_default = 1;
    case kNotAllowedForDefault: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.not_allowed_for_default_);
      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 DeletePresetResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeletePresetResponse_Error*>(
      &from));
}

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

  switch (from.reason_case()) {
    case kNotAllowedForDefault: {
      _this->_internal_mutable_not_allowed_for_default()->::keyapis::preset::v1::DeletePresetResponse_Error_NotAllowedForDefault::MergeFrom(
          from._internal_not_allowed_for_default());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void DeletePresetResponse_Error::InternalSwap(DeletePresetResponse_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 DeletePresetResponse_Error::GetTypeName() const {
  return "keyapis.preset.v1.DeletePresetResponse.Error";
}

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

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

const ::keyapis::preset::v1::DeletePresetResponse_Error&
DeletePresetResponse::_Internal::error(const DeletePresetResponse* msg) {
  return *msg->_impl_.type_.error_;
}
void DeletePresetResponse::set_allocated_error(::keyapis::preset::v1::DeletePresetResponse_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.preset.v1.DeletePresetResponse.error)
}
DeletePresetResponse::DeletePresetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.DeletePresetResponse)
}
DeletePresetResponse::DeletePresetResponse(const DeletePresetResponse& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  DeletePresetResponse* 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 kError: {
      _this->_internal_mutable_error()->::keyapis::preset::v1::DeletePresetResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.DeletePresetResponse)
}

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

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

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

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

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


void DeletePresetResponse::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.DeletePresetResponse)
  ::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* DeletePresetResponse::_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.preset.v1.DeletePresetResponse.Error error = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          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* DeletePresetResponse::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.DeletePresetResponse)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.preset.v1.DeletePresetResponse.Error error = 1;
  if (type_case() == kError) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::error(this),
        _Internal::error(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.preset.v1.DeletePresetResponse)
  return target;
}

::size_t DeletePresetResponse::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.DeletePresetResponse)
  ::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.preset.v1.DeletePresetResponse.Error error = 1;
    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 DeletePresetResponse::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const DeletePresetResponse*>(
      &from));
}

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

  switch (from.type_case()) {
    case kError: {
      _this->_internal_mutable_error()->::keyapis::preset::v1::DeletePresetResponse_Error::MergeFrom(
          from._internal_error());
      break;
    }
    case TYPE_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void DeletePresetResponse::InternalSwap(DeletePresetResponse* 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 DeletePresetResponse::GetTypeName() const {
  return "keyapis.preset.v1.DeletePresetResponse";
}

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

class PresetFilter::_Internal {
 public:
  using HasBits = decltype(std::declval<PresetFilter>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
    8 * PROTOBUF_FIELD_OFFSET(PresetFilter, _impl_._has_bits_);
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& text(const PresetFilter* msg);
  static void set_has_text(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::PROTOBUF_NAMESPACE_ID::StringValue& title(const PresetFilter* msg);
  static void set_has_title(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::StringValue&
PresetFilter::_Internal::text(const PresetFilter* msg) {
  return *msg->_impl_.text_;
}
const ::PROTOBUF_NAMESPACE_ID::StringValue&
PresetFilter::_Internal::title(const PresetFilter* msg) {
  return *msg->_impl_.title_;
}
void PresetFilter::clear_text() {
  if (_impl_.text_ != nullptr) _impl_.text_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void PresetFilter::clear_title() {
  if (_impl_.title_ != nullptr) _impl_.title_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
PresetFilter::PresetFilter(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.PresetFilter)
}
PresetFilter::PresetFilter(const PresetFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PresetFilter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , 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_.status_types_) { from._internal_status_types() }
    , /*decltype(_impl_._status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.text_){nullptr}
    , decltype(_impl_.title_){nullptr}};

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  if ((from._impl_._has_bits_[0] & 0x00000001u) != 0) {
    _this->_impl_.text_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.text_);
  }
  if ((from._impl_._has_bits_[0] & 0x00000002u) != 0) {
    _this->_impl_.title_ = new ::PROTOBUF_NAMESPACE_ID::StringValue(*from._impl_.title_);
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.PresetFilter)
}

inline void PresetFilter::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , 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_.status_types_) { arena }
    , /*decltype(_impl_._status_types_cached_byte_size_)*/ { 0 }

    , decltype(_impl_.text_){nullptr}
    , decltype(_impl_.title_){nullptr}
  };
}

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

inline void PresetFilter::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.mrf_ids_.~RepeatedField();
  _impl_.rf_ids_.~RepeatedField();
  _internal_mutable_status_types()->~RepeatedField();
  if (this != internal_default_instance()) delete _impl_.text_;
  if (this != internal_default_instance()) delete _impl_.title_;
}

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

void PresetFilter::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.PresetFilter)
  ::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_status_types()->Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      ABSL_DCHECK(_impl_.text_ != nullptr);
      _impl_.text_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      ABSL_DCHECK(_impl_.title_ != nullptr);
      _impl_.title_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<std::string>();
}

const char* PresetFilter::_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) {
      // 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;
      // .google.protobuf.StringValue text = 3 [(.google.api.field_behavior) = OPTIONAL];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_text(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .google.protobuf.StringValue title = 4 [(.google.api.field_behavior) = OPTIONAL];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_title(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // repeated .keyapis.preset.v1.Preset.StatusType status_types = 5 [(.google.api.field_behavior) = OPTIONAL];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_status_types(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::uint8_t>(tag) == 40) {
          ::int32_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
          _internal_add_status_types(static_cast<::keyapis::preset::v1::Preset_StatusType>(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:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

::uint8_t* PresetFilter::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.PresetFilter)
  ::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);
    }
  }

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

  // .google.protobuf.StringValue title = 4 [(.google.api.field_behavior) = OPTIONAL];
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::title(this),
        _Internal::title(this).GetCachedSize(), target, stream);
  }

  // repeated .keyapis.preset.v1.Preset.StatusType status_types = 5 [(.google.api.field_behavior) = OPTIONAL];
  {
    int byte_size = _impl_._status_types_cached_byte_size_.Get();
    if (byte_size > 0) {
      target = stream->WriteEnumPacked(5, _internal_status_types(),
                                       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.preset.v1.PresetFilter)
  return target;
}

::size_t PresetFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.PresetFilter)
  ::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 .keyapis.preset.v1.Preset.StatusType status_types = 5 [(.google.api.field_behavior) = OPTIONAL];
  {
    std::size_t data_size = 0;
    auto count = static_cast<std::size_t>(this->_internal_status_types_size());

    for (std::size_t i = 0; i < count; ++i) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
          this->_internal_status_types(static_cast<int>(i)));
    }
    total_size += data_size;
    if (data_size > 0) {
      total_size += 1;
      total_size += ::_pbi::WireFormatLite::Int32Size(
          static_cast<int32_t>(data_size));
    }
    _impl_._status_types_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size));
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // .google.protobuf.StringValue text = 3 [(.google.api.field_behavior) = OPTIONAL];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.text_);
    }

    // .google.protobuf.StringValue title = 4 [(.google.api.field_behavior) = OPTIONAL];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.title_);
    }

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

void PresetFilter::MergeFrom(const PresetFilter& from) {
  PresetFilter* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.PresetFilter)
  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->_internal_mutable_status_types()->MergeFrom(from._internal_status_types());
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_text()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_text());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_title()->::PROTOBUF_NAMESPACE_ID::StringValue::MergeFrom(
          from._internal_title());
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PresetFilter::InternalSwap(PresetFilter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.mrf_ids_.InternalSwap(&other->_impl_.mrf_ids_);
  _impl_.rf_ids_.InternalSwap(&other->_impl_.rf_ids_);
  _internal_mutable_status_types()->InternalSwap(
      other->_internal_mutable_status_types());
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PresetFilter, _impl_.title_)
      + sizeof(PresetFilter::_impl_.title_)
      - PROTOBUF_FIELD_OFFSET(PresetFilter, _impl_.text_)>(
          reinterpret_cast<char*>(&_impl_.text_),
          reinterpret_cast<char*>(&other->_impl_.text_));
}

std::string PresetFilter::GetTypeName() const {
  return "keyapis.preset.v1.PresetFilter";
}

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

class PresetPaging::_Internal {
 public:
};

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

inline void PresetPaging::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_)*/{}
  };
}

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

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

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

void PresetPaging::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.preset.v1.PresetPaging)
  ::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* PresetPaging::_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.preset.v1.PresetPaging.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::preset::v1::PresetPaging_OrderByType>(val));
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.preset.v1.PresetPaging.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::preset::v1::PresetPaging_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* PresetPaging::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.PresetPaging)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // .keyapis.preset.v1.PresetPaging.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.preset.v1.PresetPaging.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.preset.v1.PresetPaging)
  return target;
}

::size_t PresetPaging::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.PresetPaging)
  ::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.preset.v1.PresetPaging.OrderByType order_by_type = 1;
  if (this->_internal_order_by_type() != 0) {
    total_size += 1 +
                  ::_pbi::WireFormatLite::EnumSize(this->_internal_order_by_type());
  }

  // .keyapis.preset.v1.PresetPaging.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 PresetPaging::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PresetPaging*>(
      &from));
}

void PresetPaging::MergeFrom(const PresetPaging& from) {
  PresetPaging* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.preset.v1.PresetPaging)
  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 PresetPaging::CopyFrom(const PresetPaging& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:keyapis.preset.v1.PresetPaging)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

std::string PresetPaging::GetTypeName() const {
  return "keyapis.preset.v1.PresetPaging";
}

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

class ValidationError::_Internal {
 public:
};

ValidationError::ValidationError(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.preset.v1.ValidationError)
}
ValidationError::ValidationError(const ValidationError& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  ValidationError* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.path_) {}

    , decltype(_impl_.message_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_path().empty()) {
    _this->_impl_.path_.Set(from._internal_path(), _this->GetArenaForAllocation());
  }
  _impl_.message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_message().empty()) {
    _this->_impl_.message_.Set(from._internal_message(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.preset.v1.ValidationError)
}

inline void ValidationError::SharedCtor(::_pb::Arena* arena) {
  (void)arena;
  new (&_impl_) Impl_{
      decltype(_impl_.path_) {}

    , decltype(_impl_.message_) {}

    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.path_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.path_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.message_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.message_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void ValidationError::SharedDtor() {
  ABSL_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.path_.Destroy();
  _impl_.message_.Destroy();
}

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

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

  _impl_.path_.ClearToEmpty();
  _impl_.message_.ClearToEmpty();
  _internal_metadata_.Clear<std::string>();
}

const char* ValidationError::_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) {
      // string path = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_path();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } else {
          goto handle_unusual;
        }
        continue;
      // string message = 2 [(.google.api.field_behavior) = REQUIRED];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_message();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, nullptr));
        } 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* ValidationError::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.preset.v1.ValidationError)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // string message = 2 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_message().empty()) {
    const std::string& _s = this->_internal_message();
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
        _s.data(), static_cast<int>(_s.length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "keyapis.preset.v1.ValidationError.message");
    target = stream->WriteStringMaybeAliased(2, _s, 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.preset.v1.ValidationError)
  return target;
}

::size_t ValidationError::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.preset.v1.ValidationError)
  ::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 path = 1 [(.google.api.field_behavior) = REQUIRED];
  if (!this->_internal_path().empty()) {
    total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
                                    this->_internal_path());
  }

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

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

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

  if (!from._internal_path().empty()) {
    _this->_internal_set_path(from._internal_path());
  }
  if (!from._internal_message().empty()) {
    _this->_internal_set_message(from._internal_message());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void ValidationError::InternalSwap(ValidationError* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.path_, lhs_arena,
                                       &other->_impl_.path_, rhs_arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, lhs_arena,
                                       &other->_impl_.message_, rhs_arena);
}

std::string ValidationError::GetTypeName() const {
  return "keyapis.preset.v1.ValidationError";
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace preset
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_Sip*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_Sip >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_Sip >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_Ntp*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_Ntp >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_Ntp >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_Syslog*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_Syslog >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_Syslog >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_Room*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_Room >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_Room >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_VideoConfig_RtspUser*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_VideoConfig_RtspUser >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_VideoConfig_RtspUser >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_VideoConfig*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_VideoConfig >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_VideoConfig >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_Dtmf*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_Dtmf >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_Dtmf >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_FaceRecognition*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_FaceRecognition >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_FaceRecognition >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_SavingError_Conflict*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_SavingError_Conflict >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_SavingError_Conflict >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_SavingError_NotAllowedForDefault*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_SavingError_NotAllowedForDefault >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_SavingError_NotAllowedForDefault >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset_SavingError*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset_SavingError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset_SavingError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::Preset*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::Preset >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::Preset >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::PostPresetRequest*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::PostPresetRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::PostPresetRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::PostPresetResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::PostPresetResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::PostPresetResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::PostPresetResponse*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::PostPresetResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::PostPresetResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetListRequest*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetListRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetListRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetRequest*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetResponse*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetDefaultRequest*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetDefaultRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetDefaultRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetDefaultResponse*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetDefaultResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetDefaultResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetListResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetListResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetListResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetListResponse*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetListResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetListResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetCountRequest*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetCountRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetCountRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetCountResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetCountResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetCountResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::GetPresetCountResponse*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::GetPresetCountResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::GetPresetCountResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::DeletePresetRequest*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::DeletePresetRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::DeletePresetRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::DeletePresetResponse_Error_NotAllowedForDefault*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::DeletePresetResponse_Error_NotAllowedForDefault >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::DeletePresetResponse_Error_NotAllowedForDefault >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::DeletePresetResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::DeletePresetResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::DeletePresetResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::DeletePresetResponse*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::DeletePresetResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::DeletePresetResponse >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::PresetFilter*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::PresetFilter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::PresetFilter >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::PresetPaging*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::PresetPaging >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::PresetPaging >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::preset::v1::ValidationError*
Arena::CreateMaybeMessage< ::keyapis::preset::v1::ValidationError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::preset::v1::ValidationError >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
