// Generated by the gRPC C++ plugin.
// If you make any local change, they will be lost.
// source: greptime/v1/meta/heartbeat.proto
// Original file comments:
// Copyright 2023 Greptime Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef GRPC_greptime_2fv1_2fmeta_2fheartbeat_2eproto__INCLUDED
#define GRPC_greptime_2fv1_2fmeta_2fheartbeat_2eproto__INCLUDED

#include "greptime/v1/meta/heartbeat.pb.h"

#include <functional>
#include <grpcpp/generic/async_generic_service.h>
#include <grpcpp/support/async_stream.h>
#include <grpcpp/support/async_unary_call.h>
#include <grpcpp/support/client_callback.h>
#include <grpcpp/client_context.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/support/message_allocator.h>
#include <grpcpp/support/method_handler.h>
#include <grpcpp/impl/codegen/proto_utils.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/impl/codegen/server_callback_handlers.h>
#include <grpcpp/server_context.h>
#include <grpcpp/impl/service_type.h>
#include <grpcpp/impl/codegen/status.h>
#include <grpcpp/support/stub_options.h>
#include <grpcpp/support/sync_stream.h>

namespace greptime {
namespace v1 {
namespace meta {

class Heartbeat final {
 public:
  static constexpr char const* service_full_name() {
    return "greptime.v1.meta.Heartbeat";
  }
  class StubInterface {
   public:
    virtual ~StubInterface() {}
    // Heartbeat, there may be many contents of the heartbeat, such as:
    // 1. Metadata to be registered to meta server and discoverable by other
    //    nodes.
    // 2. Some performance metrics, such as Load, CPU usage, etc.
    // 3. The number of computing tasks being executed.
    std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>> Heartbeat(::grpc::ClientContext* context) {
      return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>>(HeartbeatRaw(context));
    }
    std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>> AsyncHeartbeat(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>>(AsyncHeartbeatRaw(context, cq, tag));
    }
    std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>> PrepareAsyncHeartbeat(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>>(PrepareAsyncHeartbeatRaw(context, cq));
    }
    // Ask leader's endpoint.
    virtual ::grpc::Status AskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::greptime::v1::meta::AskLeaderResponse* response) = 0;
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::AskLeaderResponse>> AsyncAskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::AskLeaderResponse>>(AsyncAskLeaderRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::AskLeaderResponse>> PrepareAsyncAskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::AskLeaderResponse>>(PrepareAsyncAskLeaderRaw(context, request, cq));
    }
    class async_interface {
     public:
      virtual ~async_interface() {}
      // Heartbeat, there may be many contents of the heartbeat, such as:
      // 1. Metadata to be registered to meta server and discoverable by other
      //    nodes.
      // 2. Some performance metrics, such as Load, CPU usage, etc.
      // 3. The number of computing tasks being executed.
      virtual void Heartbeat(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::greptime::v1::meta::HeartbeatRequest,::greptime::v1::meta::HeartbeatResponse>* reactor) = 0;
      // Ask leader's endpoint.
      virtual void AskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest* request, ::greptime::v1::meta::AskLeaderResponse* response, std::function<void(::grpc::Status)>) = 0;
      virtual void AskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest* request, ::greptime::v1::meta::AskLeaderResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
    };
    typedef class async_interface experimental_async_interface;
    virtual class async_interface* async() { return nullptr; }
    class async_interface* experimental_async() { return async(); }
   private:
    virtual ::grpc::ClientReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>* HeartbeatRaw(::grpc::ClientContext* context) = 0;
    virtual ::grpc::ClientAsyncReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>* AsyncHeartbeatRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
    virtual ::grpc::ClientAsyncReaderWriterInterface< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>* PrepareAsyncHeartbeatRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::AskLeaderResponse>* AsyncAskLeaderRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::grpc::CompletionQueue* cq) = 0;
    virtual ::grpc::ClientAsyncResponseReaderInterface< ::greptime::v1::meta::AskLeaderResponse>* PrepareAsyncAskLeaderRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::grpc::CompletionQueue* cq) = 0;
  };
  class Stub final : public StubInterface {
   public:
    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
    std::unique_ptr< ::grpc::ClientReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>> Heartbeat(::grpc::ClientContext* context) {
      return std::unique_ptr< ::grpc::ClientReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>>(HeartbeatRaw(context));
    }
    std::unique_ptr<  ::grpc::ClientAsyncReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>> AsyncHeartbeat(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>>(AsyncHeartbeatRaw(context, cq, tag));
    }
    std::unique_ptr<  ::grpc::ClientAsyncReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>> PrepareAsyncHeartbeat(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>>(PrepareAsyncHeartbeatRaw(context, cq));
    }
    ::grpc::Status AskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::greptime::v1::meta::AskLeaderResponse* response) override;
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::AskLeaderResponse>> AsyncAskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::AskLeaderResponse>>(AsyncAskLeaderRaw(context, request, cq));
    }
    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::AskLeaderResponse>> PrepareAsyncAskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::grpc::CompletionQueue* cq) {
      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::AskLeaderResponse>>(PrepareAsyncAskLeaderRaw(context, request, cq));
    }
    class async final :
      public StubInterface::async_interface {
     public:
      void Heartbeat(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::greptime::v1::meta::HeartbeatRequest,::greptime::v1::meta::HeartbeatResponse>* reactor) override;
      void AskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest* request, ::greptime::v1::meta::AskLeaderResponse* response, std::function<void(::grpc::Status)>) override;
      void AskLeader(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest* request, ::greptime::v1::meta::AskLeaderResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
     private:
      friend class Stub;
      explicit async(Stub* stub): stub_(stub) { }
      Stub* stub() { return stub_; }
      Stub* stub_;
    };
    class async* async() override { return &async_stub_; }

   private:
    std::shared_ptr< ::grpc::ChannelInterface> channel_;
    class async async_stub_{this};
    ::grpc::ClientReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>* HeartbeatRaw(::grpc::ClientContext* context) override;
    ::grpc::ClientAsyncReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>* AsyncHeartbeatRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
    ::grpc::ClientAsyncReaderWriter< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>* PrepareAsyncHeartbeatRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::AskLeaderResponse>* AsyncAskLeaderRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::grpc::CompletionQueue* cq) override;
    ::grpc::ClientAsyncResponseReader< ::greptime::v1::meta::AskLeaderResponse>* PrepareAsyncAskLeaderRaw(::grpc::ClientContext* context, const ::greptime::v1::meta::AskLeaderRequest& request, ::grpc::CompletionQueue* cq) override;
    const ::grpc::internal::RpcMethod rpcmethod_Heartbeat_;
    const ::grpc::internal::RpcMethod rpcmethod_AskLeader_;
  };
  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());

  class Service : public ::grpc::Service {
   public:
    Service();
    virtual ~Service();
    // Heartbeat, there may be many contents of the heartbeat, such as:
    // 1. Metadata to be registered to meta server and discoverable by other
    //    nodes.
    // 2. Some performance metrics, such as Load, CPU usage, etc.
    // 3. The number of computing tasks being executed.
    virtual ::grpc::Status Heartbeat(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::greptime::v1::meta::HeartbeatResponse, ::greptime::v1::meta::HeartbeatRequest>* stream);
    // Ask leader's endpoint.
    virtual ::grpc::Status AskLeader(::grpc::ServerContext* context, const ::greptime::v1::meta::AskLeaderRequest* request, ::greptime::v1::meta::AskLeaderResponse* response);
  };
  template <class BaseClass>
  class WithAsyncMethod_Heartbeat : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithAsyncMethod_Heartbeat() {
      ::grpc::Service::MarkMethodAsync(0);
    }
    ~WithAsyncMethod_Heartbeat() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::greptime::v1::meta::HeartbeatResponse, ::greptime::v1::meta::HeartbeatRequest>* /*stream*/)  override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestHeartbeat(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::greptime::v1::meta::HeartbeatResponse, ::greptime::v1::meta::HeartbeatRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
    }
  };
  template <class BaseClass>
  class WithAsyncMethod_AskLeader : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithAsyncMethod_AskLeader() {
      ::grpc::Service::MarkMethodAsync(1);
    }
    ~WithAsyncMethod_AskLeader() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status AskLeader(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::AskLeaderRequest* /*request*/, ::greptime::v1::meta::AskLeaderResponse* /*response*/) override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestAskLeader(::grpc::ServerContext* context, ::greptime::v1::meta::AskLeaderRequest* request, ::grpc::ServerAsyncResponseWriter< ::greptime::v1::meta::AskLeaderResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
    }
  };
  typedef WithAsyncMethod_Heartbeat<WithAsyncMethod_AskLeader<Service > > AsyncService;
  template <class BaseClass>
  class WithCallbackMethod_Heartbeat : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithCallbackMethod_Heartbeat() {
      ::grpc::Service::MarkMethodCallback(0,
          new ::grpc::internal::CallbackBidiHandler< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>(
            [this](
                   ::grpc::CallbackServerContext* context) { return this->Heartbeat(context); }));
    }
    ~WithCallbackMethod_Heartbeat() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::greptime::v1::meta::HeartbeatResponse, ::greptime::v1::meta::HeartbeatRequest>* /*stream*/)  override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    virtual ::grpc::ServerBidiReactor< ::greptime::v1::meta::HeartbeatRequest, ::greptime::v1::meta::HeartbeatResponse>* Heartbeat(
      ::grpc::CallbackServerContext* /*context*/)
      { return nullptr; }
  };
  template <class BaseClass>
  class WithCallbackMethod_AskLeader : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithCallbackMethod_AskLeader() {
      ::grpc::Service::MarkMethodCallback(1,
          new ::grpc::internal::CallbackUnaryHandler< ::greptime::v1::meta::AskLeaderRequest, ::greptime::v1::meta::AskLeaderResponse>(
            [this](
                   ::grpc::CallbackServerContext* context, const ::greptime::v1::meta::AskLeaderRequest* request, ::greptime::v1::meta::AskLeaderResponse* response) { return this->AskLeader(context, request, response); }));}
    void SetMessageAllocatorFor_AskLeader(
        ::grpc::MessageAllocator< ::greptime::v1::meta::AskLeaderRequest, ::greptime::v1::meta::AskLeaderResponse>* allocator) {
      ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1);
      static_cast<::grpc::internal::CallbackUnaryHandler< ::greptime::v1::meta::AskLeaderRequest, ::greptime::v1::meta::AskLeaderResponse>*>(handler)
              ->SetMessageAllocator(allocator);
    }
    ~WithCallbackMethod_AskLeader() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status AskLeader(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::AskLeaderRequest* /*request*/, ::greptime::v1::meta::AskLeaderResponse* /*response*/) override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    virtual ::grpc::ServerUnaryReactor* AskLeader(
      ::grpc::CallbackServerContext* /*context*/, const ::greptime::v1::meta::AskLeaderRequest* /*request*/, ::greptime::v1::meta::AskLeaderResponse* /*response*/)  { return nullptr; }
  };
  typedef WithCallbackMethod_Heartbeat<WithCallbackMethod_AskLeader<Service > > CallbackService;
  typedef CallbackService ExperimentalCallbackService;
  template <class BaseClass>
  class WithGenericMethod_Heartbeat : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithGenericMethod_Heartbeat() {
      ::grpc::Service::MarkMethodGeneric(0);
    }
    ~WithGenericMethod_Heartbeat() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::greptime::v1::meta::HeartbeatResponse, ::greptime::v1::meta::HeartbeatRequest>* /*stream*/)  override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithGenericMethod_AskLeader : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithGenericMethod_AskLeader() {
      ::grpc::Service::MarkMethodGeneric(1);
    }
    ~WithGenericMethod_AskLeader() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status AskLeader(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::AskLeaderRequest* /*request*/, ::greptime::v1::meta::AskLeaderResponse* /*response*/) override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
  };
  template <class BaseClass>
  class WithRawMethod_Heartbeat : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithRawMethod_Heartbeat() {
      ::grpc::Service::MarkMethodRaw(0);
    }
    ~WithRawMethod_Heartbeat() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::greptime::v1::meta::HeartbeatResponse, ::greptime::v1::meta::HeartbeatRequest>* /*stream*/)  override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestHeartbeat(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag);
    }
  };
  template <class BaseClass>
  class WithRawMethod_AskLeader : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithRawMethod_AskLeader() {
      ::grpc::Service::MarkMethodRaw(1);
    }
    ~WithRawMethod_AskLeader() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status AskLeader(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::AskLeaderRequest* /*request*/, ::greptime::v1::meta::AskLeaderResponse* /*response*/) override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    void RequestAskLeader(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
      ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
    }
  };
  template <class BaseClass>
  class WithRawCallbackMethod_Heartbeat : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithRawCallbackMethod_Heartbeat() {
      ::grpc::Service::MarkMethodRawCallback(0,
          new ::grpc::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
            [this](
                   ::grpc::CallbackServerContext* context) { return this->Heartbeat(context); }));
    }
    ~WithRawCallbackMethod_Heartbeat() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status Heartbeat(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::greptime::v1::meta::HeartbeatResponse, ::greptime::v1::meta::HeartbeatRequest>* /*stream*/)  override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* Heartbeat(
      ::grpc::CallbackServerContext* /*context*/)
      { return nullptr; }
  };
  template <class BaseClass>
  class WithRawCallbackMethod_AskLeader : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithRawCallbackMethod_AskLeader() {
      ::grpc::Service::MarkMethodRawCallback(1,
          new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
            [this](
                   ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->AskLeader(context, request, response); }));
    }
    ~WithRawCallbackMethod_AskLeader() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable synchronous version of this method
    ::grpc::Status AskLeader(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::AskLeaderRequest* /*request*/, ::greptime::v1::meta::AskLeaderResponse* /*response*/) override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    virtual ::grpc::ServerUnaryReactor* AskLeader(
      ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)  { return nullptr; }
  };
  template <class BaseClass>
  class WithStreamedUnaryMethod_AskLeader : public BaseClass {
   private:
    void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
   public:
    WithStreamedUnaryMethod_AskLeader() {
      ::grpc::Service::MarkMethodStreamed(1,
        new ::grpc::internal::StreamedUnaryHandler<
          ::greptime::v1::meta::AskLeaderRequest, ::greptime::v1::meta::AskLeaderResponse>(
            [this](::grpc::ServerContext* context,
                   ::grpc::ServerUnaryStreamer<
                     ::greptime::v1::meta::AskLeaderRequest, ::greptime::v1::meta::AskLeaderResponse>* streamer) {
                       return this->StreamedAskLeader(context,
                         streamer);
                  }));
    }
    ~WithStreamedUnaryMethod_AskLeader() override {
      BaseClassMustBeDerivedFromService(this);
    }
    // disable regular version of this method
    ::grpc::Status AskLeader(::grpc::ServerContext* /*context*/, const ::greptime::v1::meta::AskLeaderRequest* /*request*/, ::greptime::v1::meta::AskLeaderResponse* /*response*/) override {
      abort();
      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
    }
    // replace default version of method with streamed unary
    virtual ::grpc::Status StreamedAskLeader(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::greptime::v1::meta::AskLeaderRequest,::greptime::v1::meta::AskLeaderResponse>* server_unary_streamer) = 0;
  };
  typedef WithStreamedUnaryMethod_AskLeader<Service > StreamedUnaryService;
  typedef Service SplitStreamedService;
  typedef WithStreamedUnaryMethod_AskLeader<Service > StreamedService;
};

}  // namespace meta
}  // namespace v1
}  // namespace greptime


#endif  // GRPC_greptime_2fv1_2fmeta_2fheartbeat_2eproto__INCLUDED
