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

#include "keyapis/vc/v1/keyapis_vc_company_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 vc {
namespace v1 {
template <typename>
PROTOBUF_CONSTEXPR PostCompanyImpersonationRequest::PostCompanyImpersonationRequest(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.company_id_)*/ 0

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostCompanyImpersonationRequestDefaultTypeInternal _PostCompanyImpersonationRequest_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_Error_OwnerNotFound::PostCompanyImpersonationResponse_Error_OwnerNotFound(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostCompanyImpersonationResponse_Error_OwnerNotFoundDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_Error_OwnerNotFoundDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostCompanyImpersonationResponse_Error_OwnerNotFoundDefaultTypeInternal() {}
  union {
    PostCompanyImpersonationResponse_Error_OwnerNotFound _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostCompanyImpersonationResponse_Error_OwnerNotFoundDefaultTypeInternal _PostCompanyImpersonationResponse_Error_OwnerNotFound_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_Error_UserServiceError::PostCompanyImpersonationResponse_Error_UserServiceError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostCompanyImpersonationResponse_Error_UserServiceErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_Error_UserServiceErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostCompanyImpersonationResponse_Error_UserServiceErrorDefaultTypeInternal() {}
  union {
    PostCompanyImpersonationResponse_Error_UserServiceError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostCompanyImpersonationResponse_Error_UserServiceErrorDefaultTypeInternal _PostCompanyImpersonationResponse_Error_UserServiceError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_Error_VcfrontServiceError::PostCompanyImpersonationResponse_Error_VcfrontServiceError(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._cached_size_)*/{}} {}
struct PostCompanyImpersonationResponse_Error_VcfrontServiceErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_Error_VcfrontServiceErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostCompanyImpersonationResponse_Error_VcfrontServiceErrorDefaultTypeInternal() {}
  union {
    PostCompanyImpersonationResponse_Error_VcfrontServiceError _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostCompanyImpersonationResponse_Error_VcfrontServiceErrorDefaultTypeInternal _PostCompanyImpersonationResponse_Error_VcfrontServiceError_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_Error::PostCompanyImpersonationResponse_Error(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.reason_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostCompanyImpersonationResponse_ErrorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_ErrorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostCompanyImpersonationResponse_ErrorDefaultTypeInternal() {}
  union {
    PostCompanyImpersonationResponse_Error _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostCompanyImpersonationResponse_ErrorDefaultTypeInternal _PostCompanyImpersonationResponse_Error_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse_CompanyImpersonation::PostCompanyImpersonationResponse_CompanyImpersonation(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.url_)*/ {
    &::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized {}
  }

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

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostCompanyImpersonationResponse_CompanyImpersonationDefaultTypeInternal _PostCompanyImpersonationResponse_CompanyImpersonation_default_instance_;
template <typename>
PROTOBUF_CONSTEXPR PostCompanyImpersonationResponse::PostCompanyImpersonationResponse(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.type_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct PostCompanyImpersonationResponseDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PostCompanyImpersonationResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  ~PostCompanyImpersonationResponseDefaultTypeInternal() {}
  union {
    PostCompanyImpersonationResponse _instance;
  };
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PostCompanyImpersonationResponseDefaultTypeInternal _PostCompanyImpersonationResponse_default_instance_;
}  // namespace v1
}  // namespace vc
}  // namespace keyapis
namespace keyapis {
namespace vc {
namespace v1 {
// ===================================================================

class PostCompanyImpersonationRequest::_Internal {
 public:
};

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

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

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

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

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

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

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

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

const char* PostCompanyImpersonationRequest::_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 company_id = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
          _impl_.company_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* PostCompanyImpersonationRequest::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.vc.v1.PostCompanyImpersonationRequest)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 company_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_company_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(
        1, this->_internal_company_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.vc.v1.PostCompanyImpersonationRequest)
  return target;
}

::size_t PostCompanyImpersonationRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.vc.v1.PostCompanyImpersonationRequest)
  ::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 company_id = 1 [(.google.api.field_behavior) = REQUIRED];
  if (this->_internal_company_id() != 0) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
        this->_internal_company_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 PostCompanyImpersonationRequest::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostCompanyImpersonationRequest*>(
      &from));
}

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

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

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

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

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

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

std::string PostCompanyImpersonationRequest::GetTypeName() const {
  return "keyapis.vc.v1.PostCompanyImpersonationRequest";
}

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

class PostCompanyImpersonationResponse_Error_OwnerNotFound::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string PostCompanyImpersonationResponse_Error_OwnerNotFound::GetTypeName() const {
  return "keyapis.vc.v1.PostCompanyImpersonationResponse.Error.OwnerNotFound";
}

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

class PostCompanyImpersonationResponse_Error_UserServiceError::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string PostCompanyImpersonationResponse_Error_UserServiceError::GetTypeName() const {
  return "keyapis.vc.v1.PostCompanyImpersonationResponse.Error.UserServiceError";
}

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

class PostCompanyImpersonationResponse_Error_VcfrontServiceError::_Internal {
 public:
};

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

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

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

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

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

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

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

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

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

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

std::string PostCompanyImpersonationResponse_Error_VcfrontServiceError::GetTypeName() const {
  return "keyapis.vc.v1.PostCompanyImpersonationResponse.Error.VcfrontServiceError";
}

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

class PostCompanyImpersonationResponse_Error::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::vc::v1::PostCompanyImpersonationResponse_Error, _impl_._oneof_case_);
  static const ::keyapis::vc::v1::ValidationError& validation(const PostCompanyImpersonationResponse_Error* msg);
  static const ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_OwnerNotFound& owner_not_found(const PostCompanyImpersonationResponse_Error* msg);
  static const ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_UserServiceError& user_service_error(const PostCompanyImpersonationResponse_Error* msg);
  static const ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_VcfrontServiceError& vcfront_service_error(const PostCompanyImpersonationResponse_Error* msg);
};

const ::keyapis::vc::v1::ValidationError&
PostCompanyImpersonationResponse_Error::_Internal::validation(const PostCompanyImpersonationResponse_Error* msg) {
  return *msg->_impl_.reason_.validation_;
}
const ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_OwnerNotFound&
PostCompanyImpersonationResponse_Error::_Internal::owner_not_found(const PostCompanyImpersonationResponse_Error* msg) {
  return *msg->_impl_.reason_.owner_not_found_;
}
const ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_UserServiceError&
PostCompanyImpersonationResponse_Error::_Internal::user_service_error(const PostCompanyImpersonationResponse_Error* msg) {
  return *msg->_impl_.reason_.user_service_error_;
}
const ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_VcfrontServiceError&
PostCompanyImpersonationResponse_Error::_Internal::vcfront_service_error(const PostCompanyImpersonationResponse_Error* msg) {
  return *msg->_impl_.reason_.vcfront_service_error_;
}
void PostCompanyImpersonationResponse_Error::set_allocated_validation(::keyapis::vc::v1::ValidationError* validation) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (validation) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
        ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
                reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation));
    if (message_arena != submessage_arena) {
      validation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, validation, submessage_arena);
    }
    set_has_validation();
    _impl_.reason_.validation_ = validation;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.vc.v1.PostCompanyImpersonationResponse.Error.validation)
}
void PostCompanyImpersonationResponse_Error::clear_validation() {
  if (reason_case() == kValidation) {
    if (GetArenaForAllocation() == nullptr) {
      delete _impl_.reason_.validation_;
    }
    clear_has_reason();
  }
}
void PostCompanyImpersonationResponse_Error::set_allocated_owner_not_found(::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_OwnerNotFound* owner_not_found) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (owner_not_found) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(owner_not_found);
    if (message_arena != submessage_arena) {
      owner_not_found = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, owner_not_found, submessage_arena);
    }
    set_has_owner_not_found();
    _impl_.reason_.owner_not_found_ = owner_not_found;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.vc.v1.PostCompanyImpersonationResponse.Error.owner_not_found)
}
void PostCompanyImpersonationResponse_Error::set_allocated_user_service_error(::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_UserServiceError* user_service_error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (user_service_error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(user_service_error);
    if (message_arena != submessage_arena) {
      user_service_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, user_service_error, submessage_arena);
    }
    set_has_user_service_error();
    _impl_.reason_.user_service_error_ = user_service_error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.vc.v1.PostCompanyImpersonationResponse.Error.user_service_error)
}
void PostCompanyImpersonationResponse_Error::set_allocated_vcfront_service_error(::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_VcfrontServiceError* vcfront_service_error) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_reason();
  if (vcfront_service_error) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(vcfront_service_error);
    if (message_arena != submessage_arena) {
      vcfront_service_error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, vcfront_service_error, submessage_arena);
    }
    set_has_vcfront_service_error();
    _impl_.reason_.vcfront_service_error_ = vcfront_service_error;
  }
  // @@protoc_insertion_point(field_set_allocated:keyapis.vc.v1.PostCompanyImpersonationResponse.Error.vcfront_service_error)
}
PostCompanyImpersonationResponse_Error::PostCompanyImpersonationResponse_Error(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.vc.v1.PostCompanyImpersonationResponse.Error)
}
PostCompanyImpersonationResponse_Error::PostCompanyImpersonationResponse_Error(const PostCompanyImpersonationResponse_Error& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostCompanyImpersonationResponse_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::vc::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kOwnerNotFound: {
      _this->_internal_mutable_owner_not_found()->::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_OwnerNotFound::MergeFrom(
          from._internal_owner_not_found());
      break;
    }
    case kUserServiceError: {
      _this->_internal_mutable_user_service_error()->::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_UserServiceError::MergeFrom(
          from._internal_user_service_error());
      break;
    }
    case kVcfrontServiceError: {
      _this->_internal_mutable_vcfront_service_error()->::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_VcfrontServiceError::MergeFrom(
          from._internal_vcfront_service_error());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.vc.v1.PostCompanyImpersonationResponse.Error)
}

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

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

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

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

void PostCompanyImpersonationResponse_Error::clear_reason() {
// @@protoc_insertion_point(one_of_clear_start:keyapis.vc.v1.PostCompanyImpersonationResponse.Error)
  switch (reason_case()) {
    case kValidation: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.validation_;
      }
      break;
    }
    case kOwnerNotFound: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.owner_not_found_;
      }
      break;
    }
    case kUserServiceError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.user_service_error_;
      }
      break;
    }
    case kVcfrontServiceError: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.reason_.vcfront_service_error_;
      }
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REASON_NOT_SET;
}


void PostCompanyImpersonationResponse_Error::Clear() {
// @@protoc_insertion_point(message_clear_start:keyapis.vc.v1.PostCompanyImpersonationResponse.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* PostCompanyImpersonationResponse_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.vc.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.vc.v1.PostCompanyImpersonationResponse.Error.OwnerNotFound owner_not_found = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_owner_not_found(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.vc.v1.PostCompanyImpersonationResponse.Error.UserServiceError user_service_error = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_user_service_error(), ptr);
          CHK_(ptr);
        } else {
          goto handle_unusual;
        }
        continue;
      // .keyapis.vc.v1.PostCompanyImpersonationResponse.Error.VcfrontServiceError vcfront_service_error = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_vcfront_service_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* PostCompanyImpersonationResponse_Error::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.vc.v1.PostCompanyImpersonationResponse.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 kOwnerNotFound: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::owner_not_found(this),
          _Internal::owner_not_found(this).GetCachedSize(), target, stream);
      break;
    }
    case kUserServiceError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::user_service_error(this),
          _Internal::user_service_error(this).GetCachedSize(), target, stream);
      break;
    }
    case kVcfrontServiceError: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, _Internal::vcfront_service_error(this),
          _Internal::vcfront_service_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.vc.v1.PostCompanyImpersonationResponse.Error)
  return target;
}

::size_t PostCompanyImpersonationResponse_Error::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:keyapis.vc.v1.PostCompanyImpersonationResponse.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.vc.v1.ValidationError validation = 1;
    case kValidation: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.validation_);
      break;
    }
    // .keyapis.vc.v1.PostCompanyImpersonationResponse.Error.OwnerNotFound owner_not_found = 2;
    case kOwnerNotFound: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.owner_not_found_);
      break;
    }
    // .keyapis.vc.v1.PostCompanyImpersonationResponse.Error.UserServiceError user_service_error = 3;
    case kUserServiceError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.user_service_error_);
      break;
    }
    // .keyapis.vc.v1.PostCompanyImpersonationResponse.Error.VcfrontServiceError vcfront_service_error = 4;
    case kVcfrontServiceError: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reason_.vcfront_service_error_);
      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 PostCompanyImpersonationResponse_Error::CheckTypeAndMergeFrom(
    const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
  MergeFrom(*::_pbi::DownCast<const PostCompanyImpersonationResponse_Error*>(
      &from));
}

void PostCompanyImpersonationResponse_Error::MergeFrom(const PostCompanyImpersonationResponse_Error& from) {
  PostCompanyImpersonationResponse_Error* const _this = this;
  // @@protoc_insertion_point(class_specific_merge_from_start:keyapis.vc.v1.PostCompanyImpersonationResponse.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::vc::v1::ValidationError::MergeFrom(
          from._internal_validation());
      break;
    }
    case kOwnerNotFound: {
      _this->_internal_mutable_owner_not_found()->::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_OwnerNotFound::MergeFrom(
          from._internal_owner_not_found());
      break;
    }
    case kUserServiceError: {
      _this->_internal_mutable_user_service_error()->::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_UserServiceError::MergeFrom(
          from._internal_user_service_error());
      break;
    }
    case kVcfrontServiceError: {
      _this->_internal_mutable_vcfront_service_error()->::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_VcfrontServiceError::MergeFrom(
          from._internal_vcfront_service_error());
      break;
    }
    case REASON_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

void PostCompanyImpersonationResponse_Error::InternalSwap(PostCompanyImpersonationResponse_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 PostCompanyImpersonationResponse_Error::GetTypeName() const {
  return "keyapis.vc.v1.PostCompanyImpersonationResponse.Error";
}

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

class PostCompanyImpersonationResponse_CompanyImpersonation::_Internal {
 public:
};

PostCompanyImpersonationResponse_CompanyImpersonation::PostCompanyImpersonationResponse_CompanyImpersonation(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena) {
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:keyapis.vc.v1.PostCompanyImpersonationResponse.CompanyImpersonation)
}
PostCompanyImpersonationResponse_CompanyImpersonation::PostCompanyImpersonationResponse_CompanyImpersonation(const PostCompanyImpersonationResponse_CompanyImpersonation& from)
  : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
  PostCompanyImpersonationResponse_CompanyImpersonation* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.url_) {}

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

  _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
  _impl_.url_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
        _impl_.url_.Set("", GetArenaForAllocation());
  #endif  // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_url().empty()) {
    _this->_impl_.url_.Set(from._internal_url(), _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:keyapis.vc.v1.PostCompanyImpersonationResponse.CompanyImpersonation)
}

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

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

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

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

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

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

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

const char* PostCompanyImpersonationResponse_CompanyImpersonation::_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 url = 1 [(.google.api.field_behavior) = REQUIRED];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_url();
          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* PostCompanyImpersonationResponse_CompanyImpersonation::_InternalSerialize(
    ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:keyapis.vc.v1.PostCompanyImpersonationResponse.CompanyImpersonation)
  ::uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

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

  if (!from._internal_url().empty()) {
    _this->_internal_set_url(from._internal_url());
  }
  _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}

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

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

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

std::string PostCompanyImpersonationResponse_CompanyImpersonation::GetTypeName() const {
  return "keyapis.vc.v1.PostCompanyImpersonationResponse.CompanyImpersonation";
}

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

class PostCompanyImpersonationResponse::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
    PROTOBUF_FIELD_OFFSET(::keyapis::vc::v1::PostCompanyImpersonationResponse, _impl_._oneof_case_);
  static const ::keyapis::vc::v1::PostCompanyImpersonationResponse_CompanyImpersonation& data(const PostCompanyImpersonationResponse* msg);
  static const ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error& error(const PostCompanyImpersonationResponse* msg);
};

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

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

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

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

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

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

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

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

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

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

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

// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace vc
}  // namespace keyapis
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::keyapis::vc::v1::PostCompanyImpersonationRequest*
Arena::CreateMaybeMessage< ::keyapis::vc::v1::PostCompanyImpersonationRequest >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::vc::v1::PostCompanyImpersonationRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_OwnerNotFound*
Arena::CreateMaybeMessage< ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_OwnerNotFound >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_OwnerNotFound >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_UserServiceError*
Arena::CreateMaybeMessage< ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_UserServiceError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_UserServiceError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_VcfrontServiceError*
Arena::CreateMaybeMessage< ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_VcfrontServiceError >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error_VcfrontServiceError >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error*
Arena::CreateMaybeMessage< ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::vc::v1::PostCompanyImpersonationResponse_Error >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::vc::v1::PostCompanyImpersonationResponse_CompanyImpersonation*
Arena::CreateMaybeMessage< ::keyapis::vc::v1::PostCompanyImpersonationResponse_CompanyImpersonation >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::vc::v1::PostCompanyImpersonationResponse_CompanyImpersonation >(arena);
}
template<> PROTOBUF_NOINLINE ::keyapis::vc::v1::PostCompanyImpersonationResponse*
Arena::CreateMaybeMessage< ::keyapis::vc::v1::PostCompanyImpersonationResponse >(Arena* arena) {
  return Arena::CreateMessageInternal< ::keyapis::vc::v1::PostCompanyImpersonationResponse >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"
