/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fb303/fb303/work/fb303-2024.01.22.00/fb303/thrift/fb303_core.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */
#pragma once

#include <thrift/lib/cpp2/gen/client_h.h>

#include "fb303/thrift/gen-cpp2/fb303_core_types.h"

namespace apache { namespace thrift {
  class Cpp2RequestContext;
  namespace detail { namespace ac { struct ClientRequestContext; }}
  namespace transport { class THeader; }
}}

namespace facebook { namespace fb303 { namespace cpp2 {
class BaseService;
}}} // facebook::fb303::cpp2
namespace apache::thrift {

template <>
class Client<::facebook::fb303::cpp2::BaseService> : public apache::thrift::GeneratedAsyncClient {
 public:
  using apache::thrift::GeneratedAsyncClient::GeneratedAsyncClient;

  char const* getServiceName() const noexcept override {
    return "BaseService";
  }


  virtual void getStatus(std::unique_ptr<apache::thrift::RequestCallback> callback);
  virtual void getStatus(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback);
 protected:
  void getStatusImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions = false);
 public:

  virtual ::facebook::fb303::cpp2::fb303_status sync_getStatus();
  virtual ::facebook::fb303::cpp2::fb303_status sync_getStatus(apache::thrift::RpcOptions& rpcOptions);

  virtual folly::Future<::facebook::fb303::cpp2::fb303_status> future_getStatus();
  virtual folly::SemiFuture<::facebook::fb303::cpp2::fb303_status> semifuture_getStatus();
  virtual folly::Future<::facebook::fb303::cpp2::fb303_status> future_getStatus(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<::facebook::fb303::cpp2::fb303_status> semifuture_getStatus(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::Future<std::pair<::facebook::fb303::cpp2::fb303_status, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getStatus(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<std::pair<::facebook::fb303::cpp2::fb303_status, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getStatus(apache::thrift::RpcOptions& rpcOptions);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::facebook::fb303::cpp2::fb303_status> co_getStatus() {
    return co_getStatus<false>(nullptr);
  }
  template <int = 0>
  folly::coro::Task<::facebook::fb303::cpp2::fb303_status> co_getStatus(apache::thrift::RpcOptions& rpcOptions) {
    return co_getStatus<true>(&rpcOptions);
  }
#else
  folly::coro::Task<::facebook::fb303::cpp2::fb303_status> co_getStatus() {
    co_return co_await folly::coro::detachOnCancel(semifuture_getStatus());
  }
  folly::coro::Task<::facebook::fb303::cpp2::fb303_status> co_getStatus(apache::thrift::RpcOptions& rpcOptions) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getStatus(rpcOptions));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::facebook::fb303::cpp2::fb303_status> co_getStatus(apache::thrift::RpcOptions* rpcOptions) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getStatusCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getStatusImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    } else {
      getStatusImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::facebook::fb303::cpp2::fb303_status _return;
    if (auto ew = recv_wrapped_getStatus(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getStatus(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback);


  static folly::exception_wrapper recv_wrapped_getStatus(::facebook::fb303::cpp2::fb303_status& _return, ::apache::thrift::ClientReceiveState& state);
  static ::facebook::fb303::cpp2::fb303_status recv_getStatus(::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual ::facebook::fb303::cpp2::fb303_status recv_instance_getStatus(::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getStatus(::facebook::fb303::cpp2::fb303_status& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getStatusT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getStatusCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getName(std::unique_ptr<apache::thrift::RequestCallback> callback);
  virtual void getName(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback);
 protected:
  void getNameImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions = false);
 public:

  virtual void sync_getName(::std::string& _return);
  virtual void sync_getName(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return);

  virtual folly::Future<::std::string> future_getName();
  virtual folly::SemiFuture<::std::string> semifuture_getName();
  virtual folly::Future<::std::string> future_getName(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<::std::string> semifuture_getName(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::Future<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getName(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getName(apache::thrift::RpcOptions& rpcOptions);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::string> co_getName() {
    return co_getName<false>(nullptr);
  }
  template <int = 0>
  folly::coro::Task<::std::string> co_getName(apache::thrift::RpcOptions& rpcOptions) {
    return co_getName<true>(&rpcOptions);
  }
#else
  folly::coro::Task<::std::string> co_getName() {
    co_return co_await folly::coro::detachOnCancel(semifuture_getName());
  }
  folly::coro::Task<::std::string> co_getName(apache::thrift::RpcOptions& rpcOptions) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getName(rpcOptions));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::string> co_getName(apache::thrift::RpcOptions* rpcOptions) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getNameCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getNameImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    } else {
      getNameImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::string _return;
    if (auto ew = recv_wrapped_getName(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getName(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback);


  static folly::exception_wrapper recv_wrapped_getName(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getName(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getName(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getName(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getNameT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getNameCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getVersion(std::unique_ptr<apache::thrift::RequestCallback> callback);
  virtual void getVersion(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback);
 protected:
  void getVersionImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions = false);
 public:

  virtual void sync_getVersion(::std::string& _return);
  virtual void sync_getVersion(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return);

  virtual folly::Future<::std::string> future_getVersion();
  virtual folly::SemiFuture<::std::string> semifuture_getVersion();
  virtual folly::Future<::std::string> future_getVersion(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<::std::string> semifuture_getVersion(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::Future<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getVersion(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getVersion(apache::thrift::RpcOptions& rpcOptions);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::string> co_getVersion() {
    return co_getVersion<false>(nullptr);
  }
  template <int = 0>
  folly::coro::Task<::std::string> co_getVersion(apache::thrift::RpcOptions& rpcOptions) {
    return co_getVersion<true>(&rpcOptions);
  }
#else
  folly::coro::Task<::std::string> co_getVersion() {
    co_return co_await folly::coro::detachOnCancel(semifuture_getVersion());
  }
  folly::coro::Task<::std::string> co_getVersion(apache::thrift::RpcOptions& rpcOptions) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getVersion(rpcOptions));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::string> co_getVersion(apache::thrift::RpcOptions* rpcOptions) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getVersionCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getVersionImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    } else {
      getVersionImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::string _return;
    if (auto ew = recv_wrapped_getVersion(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getVersion(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback);


  static folly::exception_wrapper recv_wrapped_getVersion(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getVersion(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getVersion(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getVersion(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getVersionT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getVersionCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getStatusDetails(std::unique_ptr<apache::thrift::RequestCallback> callback);
  virtual void getStatusDetails(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback);
 protected:
  void getStatusDetailsImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions = false);
 public:

  virtual void sync_getStatusDetails(::std::string& _return);
  virtual void sync_getStatusDetails(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return);

  virtual folly::Future<::std::string> future_getStatusDetails();
  virtual folly::SemiFuture<::std::string> semifuture_getStatusDetails();
  virtual folly::Future<::std::string> future_getStatusDetails(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<::std::string> semifuture_getStatusDetails(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::Future<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getStatusDetails(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getStatusDetails(apache::thrift::RpcOptions& rpcOptions);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::string> co_getStatusDetails() {
    return co_getStatusDetails<false>(nullptr);
  }
  template <int = 0>
  folly::coro::Task<::std::string> co_getStatusDetails(apache::thrift::RpcOptions& rpcOptions) {
    return co_getStatusDetails<true>(&rpcOptions);
  }
#else
  folly::coro::Task<::std::string> co_getStatusDetails() {
    co_return co_await folly::coro::detachOnCancel(semifuture_getStatusDetails());
  }
  folly::coro::Task<::std::string> co_getStatusDetails(apache::thrift::RpcOptions& rpcOptions) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getStatusDetails(rpcOptions));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::string> co_getStatusDetails(apache::thrift::RpcOptions* rpcOptions) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getStatusDetailsCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getStatusDetailsImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    } else {
      getStatusDetailsImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::string _return;
    if (auto ew = recv_wrapped_getStatusDetails(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getStatusDetails(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback);


  static folly::exception_wrapper recv_wrapped_getStatusDetails(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getStatusDetails(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getStatusDetails(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getStatusDetails(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getStatusDetailsT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getStatusDetailsCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getCounters(std::unique_ptr<apache::thrift::RequestCallback> callback);
  virtual void getCounters(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback);
 protected:
  void getCountersImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions = false);
 public:

  virtual void sync_getCounters(::std::map<::std::string, ::std::int64_t>& _return);
  virtual void sync_getCounters(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::int64_t>& _return);

  virtual folly::Future<::std::map<::std::string, ::std::int64_t>> future_getCounters();
  virtual folly::SemiFuture<::std::map<::std::string, ::std::int64_t>> semifuture_getCounters();
  virtual folly::Future<::std::map<::std::string, ::std::int64_t>> future_getCounters(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::int64_t>> semifuture_getCounters(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::Future<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getCounters(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getCounters(apache::thrift::RpcOptions& rpcOptions);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getCounters() {
    return co_getCounters<false>(nullptr);
  }
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getCounters(apache::thrift::RpcOptions& rpcOptions) {
    return co_getCounters<true>(&rpcOptions);
  }
#else
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getCounters() {
    co_return co_await folly::coro::detachOnCancel(semifuture_getCounters());
  }
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getCounters(apache::thrift::RpcOptions& rpcOptions) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getCounters(rpcOptions));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getCounters(apache::thrift::RpcOptions* rpcOptions) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getCountersCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getCountersImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    } else {
      getCountersImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::map<::std::string, ::std::int64_t> _return;
    if (auto ew = recv_wrapped_getCounters(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getCounters(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback);


  static folly::exception_wrapper recv_wrapped_getCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getCountersT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getCountersCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getRegexCounters(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_regex);
  virtual void getRegexCounters(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_regex);
 protected:
  void getRegexCountersImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_regex, bool stealRpcOptions = false);
 public:

  virtual void sync_getRegexCounters(::std::map<::std::string, ::std::int64_t>& _return, const ::std::string& p_regex);
  virtual void sync_getRegexCounters(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::int64_t>& _return, const ::std::string& p_regex);

  virtual folly::Future<::std::map<::std::string, ::std::int64_t>> future_getRegexCounters(const ::std::string& p_regex);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::int64_t>> semifuture_getRegexCounters(const ::std::string& p_regex);
  virtual folly::Future<::std::map<::std::string, ::std::int64_t>> future_getRegexCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::int64_t>> semifuture_getRegexCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex);
  virtual folly::Future<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getRegexCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex);
  virtual folly::SemiFuture<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getRegexCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getRegexCounters(const ::std::string& p_regex) {
    return co_getRegexCounters<false>(nullptr, p_regex);
  }
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getRegexCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex) {
    return co_getRegexCounters<true>(&rpcOptions, p_regex);
  }
#else
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getRegexCounters(const ::std::string& p_regex) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getRegexCounters(p_regex));
  }
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getRegexCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getRegexCounters(rpcOptions, p_regex));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getRegexCounters(apache::thrift::RpcOptions* rpcOptions, const ::std::string& p_regex) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getRegexCountersCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getRegexCountersImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_regex);
    } else {
      getRegexCountersImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_regex);
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::map<::std::string, ::std::int64_t> _return;
    if (auto ew = recv_wrapped_getRegexCounters(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getRegexCounters(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_regex);


  static folly::exception_wrapper recv_wrapped_getRegexCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getRegexCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getRegexCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getRegexCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getRegexCountersT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_regex);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getRegexCountersCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getSelectedCounters(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::vector<::std::string>& p_keys);
  virtual void getSelectedCounters(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::vector<::std::string>& p_keys);
 protected:
  void getSelectedCountersImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::string>& p_keys, bool stealRpcOptions = false);
 public:

  virtual void sync_getSelectedCounters(::std::map<::std::string, ::std::int64_t>& _return, const ::std::vector<::std::string>& p_keys);
  virtual void sync_getSelectedCounters(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::int64_t>& _return, const ::std::vector<::std::string>& p_keys);

  virtual folly::Future<::std::map<::std::string, ::std::int64_t>> future_getSelectedCounters(const ::std::vector<::std::string>& p_keys);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::int64_t>> semifuture_getSelectedCounters(const ::std::vector<::std::string>& p_keys);
  virtual folly::Future<::std::map<::std::string, ::std::int64_t>> future_getSelectedCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::int64_t>> semifuture_getSelectedCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys);
  virtual folly::Future<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getSelectedCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys);
  virtual folly::SemiFuture<std::pair<::std::map<::std::string, ::std::int64_t>, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getSelectedCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getSelectedCounters(const ::std::vector<::std::string>& p_keys) {
    return co_getSelectedCounters<false>(nullptr, p_keys);
  }
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getSelectedCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys) {
    return co_getSelectedCounters<true>(&rpcOptions, p_keys);
  }
#else
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getSelectedCounters(const ::std::vector<::std::string>& p_keys) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getSelectedCounters(p_keys));
  }
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getSelectedCounters(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getSelectedCounters(rpcOptions, p_keys));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::map<::std::string, ::std::int64_t>> co_getSelectedCounters(apache::thrift::RpcOptions* rpcOptions, const ::std::vector<::std::string>& p_keys) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getSelectedCountersCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getSelectedCountersImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_keys);
    } else {
      getSelectedCountersImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_keys);
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::map<::std::string, ::std::int64_t> _return;
    if (auto ew = recv_wrapped_getSelectedCounters(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getSelectedCounters(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::vector<::std::string>& p_keys);


  static folly::exception_wrapper recv_wrapped_getSelectedCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getSelectedCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getSelectedCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getSelectedCounters(::std::map<::std::string, ::std::int64_t>& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getSelectedCountersT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::string>& p_keys);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getSelectedCountersCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getCounter(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_key);
  virtual void getCounter(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_key);
 protected:
  void getCounterImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_key, bool stealRpcOptions = false);
 public:

  virtual ::std::int64_t sync_getCounter(const ::std::string& p_key);
  virtual ::std::int64_t sync_getCounter(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);

  virtual folly::Future<::std::int64_t> future_getCounter(const ::std::string& p_key);
  virtual folly::SemiFuture<::std::int64_t> semifuture_getCounter(const ::std::string& p_key);
  virtual folly::Future<::std::int64_t> future_getCounter(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::SemiFuture<::std::int64_t> semifuture_getCounter(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::Future<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getCounter(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::SemiFuture<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getCounter(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::int64_t> co_getCounter(const ::std::string& p_key) {
    return co_getCounter<false>(nullptr, p_key);
  }
  template <int = 0>
  folly::coro::Task<::std::int64_t> co_getCounter(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key) {
    return co_getCounter<true>(&rpcOptions, p_key);
  }
#else
  folly::coro::Task<::std::int64_t> co_getCounter(const ::std::string& p_key) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getCounter(p_key));
  }
  folly::coro::Task<::std::int64_t> co_getCounter(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getCounter(rpcOptions, p_key));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::int64_t> co_getCounter(apache::thrift::RpcOptions* rpcOptions, const ::std::string& p_key) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getCounterCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getCounterImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_key);
    } else {
      getCounterImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_key);
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::int64_t _return;
    if (auto ew = recv_wrapped_getCounter(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getCounter(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_key);


  static folly::exception_wrapper recv_wrapped_getCounter(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state);
  static ::std::int64_t recv_getCounter(::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual ::std::int64_t recv_instance_getCounter(::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getCounter(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getCounterT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_key);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getCounterCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getExportedValues(std::unique_ptr<apache::thrift::RequestCallback> callback);
  virtual void getExportedValues(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback);
 protected:
  void getExportedValuesImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions = false);
 public:

  virtual void sync_getExportedValues(::std::map<::std::string, ::std::string>& _return);
  virtual void sync_getExportedValues(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::string>& _return);

  virtual folly::Future<::std::map<::std::string, ::std::string>> future_getExportedValues();
  virtual folly::SemiFuture<::std::map<::std::string, ::std::string>> semifuture_getExportedValues();
  virtual folly::Future<::std::map<::std::string, ::std::string>> future_getExportedValues(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::string>> semifuture_getExportedValues(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::Future<std::pair<::std::map<::std::string, ::std::string>, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getExportedValues(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<std::pair<::std::map<::std::string, ::std::string>, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getExportedValues(apache::thrift::RpcOptions& rpcOptions);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getExportedValues() {
    return co_getExportedValues<false>(nullptr);
  }
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getExportedValues(apache::thrift::RpcOptions& rpcOptions) {
    return co_getExportedValues<true>(&rpcOptions);
  }
#else
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getExportedValues() {
    co_return co_await folly::coro::detachOnCancel(semifuture_getExportedValues());
  }
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getExportedValues(apache::thrift::RpcOptions& rpcOptions) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getExportedValues(rpcOptions));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getExportedValues(apache::thrift::RpcOptions* rpcOptions) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getExportedValuesCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getExportedValuesImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    } else {
      getExportedValuesImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::map<::std::string, ::std::string> _return;
    if (auto ew = recv_wrapped_getExportedValues(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getExportedValues(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback);


  static folly::exception_wrapper recv_wrapped_getExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getExportedValuesT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getExportedValuesCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getSelectedExportedValues(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::vector<::std::string>& p_keys);
  virtual void getSelectedExportedValues(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::vector<::std::string>& p_keys);
 protected:
  void getSelectedExportedValuesImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::string>& p_keys, bool stealRpcOptions = false);
 public:

  virtual void sync_getSelectedExportedValues(::std::map<::std::string, ::std::string>& _return, const ::std::vector<::std::string>& p_keys);
  virtual void sync_getSelectedExportedValues(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::string>& _return, const ::std::vector<::std::string>& p_keys);

  virtual folly::Future<::std::map<::std::string, ::std::string>> future_getSelectedExportedValues(const ::std::vector<::std::string>& p_keys);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::string>> semifuture_getSelectedExportedValues(const ::std::vector<::std::string>& p_keys);
  virtual folly::Future<::std::map<::std::string, ::std::string>> future_getSelectedExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::string>> semifuture_getSelectedExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys);
  virtual folly::Future<std::pair<::std::map<::std::string, ::std::string>, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getSelectedExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys);
  virtual folly::SemiFuture<std::pair<::std::map<::std::string, ::std::string>, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getSelectedExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getSelectedExportedValues(const ::std::vector<::std::string>& p_keys) {
    return co_getSelectedExportedValues<false>(nullptr, p_keys);
  }
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getSelectedExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys) {
    return co_getSelectedExportedValues<true>(&rpcOptions, p_keys);
  }
#else
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getSelectedExportedValues(const ::std::vector<::std::string>& p_keys) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getSelectedExportedValues(p_keys));
  }
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getSelectedExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::vector<::std::string>& p_keys) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getSelectedExportedValues(rpcOptions, p_keys));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getSelectedExportedValues(apache::thrift::RpcOptions* rpcOptions, const ::std::vector<::std::string>& p_keys) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getSelectedExportedValuesCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getSelectedExportedValuesImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_keys);
    } else {
      getSelectedExportedValuesImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_keys);
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::map<::std::string, ::std::string> _return;
    if (auto ew = recv_wrapped_getSelectedExportedValues(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getSelectedExportedValues(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::vector<::std::string>& p_keys);


  static folly::exception_wrapper recv_wrapped_getSelectedExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getSelectedExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getSelectedExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getSelectedExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getSelectedExportedValuesT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::vector<::std::string>& p_keys);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getSelectedExportedValuesCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getRegexExportedValues(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_regex);
  virtual void getRegexExportedValues(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_regex);
 protected:
  void getRegexExportedValuesImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_regex, bool stealRpcOptions = false);
 public:

  virtual void sync_getRegexExportedValues(::std::map<::std::string, ::std::string>& _return, const ::std::string& p_regex);
  virtual void sync_getRegexExportedValues(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::string>& _return, const ::std::string& p_regex);

  virtual folly::Future<::std::map<::std::string, ::std::string>> future_getRegexExportedValues(const ::std::string& p_regex);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::string>> semifuture_getRegexExportedValues(const ::std::string& p_regex);
  virtual folly::Future<::std::map<::std::string, ::std::string>> future_getRegexExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::string>> semifuture_getRegexExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex);
  virtual folly::Future<std::pair<::std::map<::std::string, ::std::string>, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getRegexExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex);
  virtual folly::SemiFuture<std::pair<::std::map<::std::string, ::std::string>, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getRegexExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getRegexExportedValues(const ::std::string& p_regex) {
    return co_getRegexExportedValues<false>(nullptr, p_regex);
  }
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getRegexExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex) {
    return co_getRegexExportedValues<true>(&rpcOptions, p_regex);
  }
#else
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getRegexExportedValues(const ::std::string& p_regex) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getRegexExportedValues(p_regex));
  }
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getRegexExportedValues(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_regex) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getRegexExportedValues(rpcOptions, p_regex));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getRegexExportedValues(apache::thrift::RpcOptions* rpcOptions, const ::std::string& p_regex) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getRegexExportedValuesCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getRegexExportedValuesImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_regex);
    } else {
      getRegexExportedValuesImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_regex);
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::map<::std::string, ::std::string> _return;
    if (auto ew = recv_wrapped_getRegexExportedValues(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getRegexExportedValues(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_regex);


  static folly::exception_wrapper recv_wrapped_getRegexExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getRegexExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getRegexExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getRegexExportedValues(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getRegexExportedValuesT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_regex);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getRegexExportedValuesCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getExportedValue(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_key);
  virtual void getExportedValue(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_key);
 protected:
  void getExportedValueImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_key, bool stealRpcOptions = false);
 public:

  virtual void sync_getExportedValue(::std::string& _return, const ::std::string& p_key);
  virtual void sync_getExportedValue(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::string& p_key);

  virtual folly::Future<::std::string> future_getExportedValue(const ::std::string& p_key);
  virtual folly::SemiFuture<::std::string> semifuture_getExportedValue(const ::std::string& p_key);
  virtual folly::Future<::std::string> future_getExportedValue(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::SemiFuture<::std::string> semifuture_getExportedValue(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::Future<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getExportedValue(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::SemiFuture<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getExportedValue(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::string> co_getExportedValue(const ::std::string& p_key) {
    return co_getExportedValue<false>(nullptr, p_key);
  }
  template <int = 0>
  folly::coro::Task<::std::string> co_getExportedValue(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key) {
    return co_getExportedValue<true>(&rpcOptions, p_key);
  }
#else
  folly::coro::Task<::std::string> co_getExportedValue(const ::std::string& p_key) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getExportedValue(p_key));
  }
  folly::coro::Task<::std::string> co_getExportedValue(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getExportedValue(rpcOptions, p_key));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::string> co_getExportedValue(apache::thrift::RpcOptions* rpcOptions, const ::std::string& p_key) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getExportedValueCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getExportedValueImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_key);
    } else {
      getExportedValueImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_key);
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::string _return;
    if (auto ew = recv_wrapped_getExportedValue(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getExportedValue(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_key);


  static folly::exception_wrapper recv_wrapped_getExportedValue(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getExportedValue(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getExportedValue(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getExportedValue(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getExportedValueT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_key);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getExportedValueCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void setOption(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_key, const ::std::string& p_value);
  virtual void setOption(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_key, const ::std::string& p_value);
 protected:
  void setOptionImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_key, const ::std::string& p_value, bool stealRpcOptions = false);
 public:

  virtual void sync_setOption(const ::std::string& p_key, const ::std::string& p_value);
  virtual void sync_setOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key, const ::std::string& p_value);

  virtual folly::Future<folly::Unit> future_setOption(const ::std::string& p_key, const ::std::string& p_value);
  virtual folly::SemiFuture<folly::Unit> semifuture_setOption(const ::std::string& p_key, const ::std::string& p_value);
  virtual folly::Future<folly::Unit> future_setOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key, const ::std::string& p_value);
  virtual folly::SemiFuture<folly::Unit> semifuture_setOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key, const ::std::string& p_value);
  virtual folly::Future<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_setOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key, const ::std::string& p_value);
  virtual folly::SemiFuture<std::pair<folly::Unit, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_setOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key, const ::std::string& p_value);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<void> co_setOption(const ::std::string& p_key, const ::std::string& p_value) {
    return co_setOption<false>(nullptr, p_key, p_value);
  }
  template <int = 0>
  folly::coro::Task<void> co_setOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key, const ::std::string& p_value) {
    return co_setOption<true>(&rpcOptions, p_key, p_value);
  }
#else
  folly::coro::Task<void> co_setOption(const ::std::string& p_key, const ::std::string& p_value) {
    co_await folly::coro::detachOnCancel(semifuture_setOption(p_key, p_value));
  }
  folly::coro::Task<void> co_setOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key, const ::std::string& p_value) {
    co_await folly::coro::detachOnCancel(semifuture_setOption(rpcOptions, p_key, p_value));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<void> co_setOption(apache::thrift::RpcOptions* rpcOptions, const ::std::string& p_key, const ::std::string& p_value) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = setOptionCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      setOptionImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_key, p_value);
    } else {
      setOptionImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_key, p_value);
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    if (auto ew = recv_wrapped_setOption(returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void setOption(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_key, const ::std::string& p_value);


  static folly::exception_wrapper recv_wrapped_setOption(::apache::thrift::ClientReceiveState& state);
  static void recv_setOption(::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_setOption(::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_setOption(::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void setOptionT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_key, const ::std::string& p_value);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> setOptionCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getOption(std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_key);
  virtual void getOption(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback, const ::std::string& p_key);
 protected:
  void getOptionImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_key, bool stealRpcOptions = false);
 public:

  virtual void sync_getOption(::std::string& _return, const ::std::string& p_key);
  virtual void sync_getOption(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, const ::std::string& p_key);

  virtual folly::Future<::std::string> future_getOption(const ::std::string& p_key);
  virtual folly::SemiFuture<::std::string> semifuture_getOption(const ::std::string& p_key);
  virtual folly::Future<::std::string> future_getOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::SemiFuture<::std::string> semifuture_getOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::Future<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);
  virtual folly::SemiFuture<std::pair<::std::string, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::string> co_getOption(const ::std::string& p_key) {
    return co_getOption<false>(nullptr, p_key);
  }
  template <int = 0>
  folly::coro::Task<::std::string> co_getOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key) {
    return co_getOption<true>(&rpcOptions, p_key);
  }
#else
  folly::coro::Task<::std::string> co_getOption(const ::std::string& p_key) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getOption(p_key));
  }
  folly::coro::Task<::std::string> co_getOption(apache::thrift::RpcOptions& rpcOptions, const ::std::string& p_key) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getOption(rpcOptions, p_key));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::string> co_getOption(apache::thrift::RpcOptions* rpcOptions, const ::std::string& p_key) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getOptionCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getOptionImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_key);
    } else {
      getOptionImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback), p_key);
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::string _return;
    if (auto ew = recv_wrapped_getOption(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getOption(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback, const ::std::string& p_key);


  static folly::exception_wrapper recv_wrapped_getOption(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getOption(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getOption(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getOption(::std::string& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getOptionT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, const ::std::string& p_key);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getOptionCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void getOptions(std::unique_ptr<apache::thrift::RequestCallback> callback);
  virtual void getOptions(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback);
 protected:
  void getOptionsImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions = false);
 public:

  virtual void sync_getOptions(::std::map<::std::string, ::std::string>& _return);
  virtual void sync_getOptions(apache::thrift::RpcOptions& rpcOptions, ::std::map<::std::string, ::std::string>& _return);

  virtual folly::Future<::std::map<::std::string, ::std::string>> future_getOptions();
  virtual folly::SemiFuture<::std::map<::std::string, ::std::string>> semifuture_getOptions();
  virtual folly::Future<::std::map<::std::string, ::std::string>> future_getOptions(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<::std::map<::std::string, ::std::string>> semifuture_getOptions(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::Future<std::pair<::std::map<::std::string, ::std::string>, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_getOptions(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<std::pair<::std::map<::std::string, ::std::string>, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_getOptions(apache::thrift::RpcOptions& rpcOptions);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getOptions() {
    return co_getOptions<false>(nullptr);
  }
  template <int = 0>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getOptions(apache::thrift::RpcOptions& rpcOptions) {
    return co_getOptions<true>(&rpcOptions);
  }
#else
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getOptions() {
    co_return co_await folly::coro::detachOnCancel(semifuture_getOptions());
  }
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getOptions(apache::thrift::RpcOptions& rpcOptions) {
    co_return co_await folly::coro::detachOnCancel(semifuture_getOptions(rpcOptions));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::map<::std::string, ::std::string>> co_getOptions(apache::thrift::RpcOptions* rpcOptions) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = getOptionsCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      getOptionsImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    } else {
      getOptionsImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::map<::std::string, ::std::string> _return;
    if (auto ew = recv_wrapped_getOptions(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void getOptions(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback);


  static folly::exception_wrapper recv_wrapped_getOptions(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  static void recv_getOptions(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual void recv_instance_getOptions(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_getOptions(::std::map<::std::string, ::std::string>& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void getOptionsT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> getOptionsCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
  virtual void aliveSince(std::unique_ptr<apache::thrift::RequestCallback> callback);
  virtual void aliveSince(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr<apache::thrift::RequestCallback> callback);
 protected:
  void aliveSinceImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions = false);
 public:

  virtual ::std::int64_t sync_aliveSince();
  virtual ::std::int64_t sync_aliveSince(apache::thrift::RpcOptions& rpcOptions);

  virtual folly::Future<::std::int64_t> future_aliveSince();
  virtual folly::SemiFuture<::std::int64_t> semifuture_aliveSince();
  virtual folly::Future<::std::int64_t> future_aliveSince(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<::std::int64_t> semifuture_aliveSince(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::Future<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> header_future_aliveSince(apache::thrift::RpcOptions& rpcOptions);
  virtual folly::SemiFuture<std::pair<::std::int64_t, std::unique_ptr<apache::thrift::transport::THeader>>> header_semifuture_aliveSince(apache::thrift::RpcOptions& rpcOptions);

#if FOLLY_HAS_COROUTINES
#if __clang__
  template <int = 0>
  folly::coro::Task<::std::int64_t> co_aliveSince() {
    return co_aliveSince<false>(nullptr);
  }
  template <int = 0>
  folly::coro::Task<::std::int64_t> co_aliveSince(apache::thrift::RpcOptions& rpcOptions) {
    return co_aliveSince<true>(&rpcOptions);
  }
#else
  folly::coro::Task<::std::int64_t> co_aliveSince() {
    co_return co_await folly::coro::detachOnCancel(semifuture_aliveSince());
  }
  folly::coro::Task<::std::int64_t> co_aliveSince(apache::thrift::RpcOptions& rpcOptions) {
    co_return co_await folly::coro::detachOnCancel(semifuture_aliveSince(rpcOptions));
  }
#endif
 private:
  template <bool hasRpcOptions>
  folly::coro::Task<::std::int64_t> co_aliveSince(apache::thrift::RpcOptions* rpcOptions) {
    const folly::CancellationToken& cancelToken =
        co_await folly::coro::co_current_cancellation_token;
    const bool cancellable = cancelToken.canBeCancelled();
    apache::thrift::ClientReceiveState returnState;
    apache::thrift::ClientCoroCallback<false> callback(&returnState, co_await folly::coro::co_current_executor);
    auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId();
    auto [ctx, header] = aliveSinceCtx(rpcOptions);
    using CancellableCallback = apache::thrift::CancellableRequestClientCallback<false>;
    auto cancellableCallback = cancellable ? CancellableCallback::create(&callback, channel_) : nullptr;
    static apache::thrift::RpcOptions* defaultRpcOptions = new apache::thrift::RpcOptions();
    auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(cancellableCallback ? (apache::thrift::RequestClientCallback*)cancellableCallback.get() : &callback);
    if constexpr (hasRpcOptions) {
      aliveSinceImpl(*rpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    } else {
      aliveSinceImpl(*defaultRpcOptions, std::move(header), ctx.get(), std::move(wrappedCallback));
    }
    if (cancellable) {
      folly::CancellationCallback cb(cancelToken, [&] { CancellableCallback::cancel(std::move(cancellableCallback)); });
      co_await callback.co_waitUntilDone();
    } else {
      co_await callback.co_waitUntilDone();
    }
    if (returnState.isException()) {
      co_yield folly::coro::co_error(std::move(returnState.exception()));
    }
    returnState.resetProtocolId(protocolId);
    returnState.resetCtx(std::move(ctx));
    SCOPE_EXIT {
      if (hasRpcOptions && returnState.header()) {
        auto* rheader = returnState.header();
        if (!rheader->getHeaders().empty()) {
          rpcOptions->setReadHeaders(rheader->releaseHeaders());
        }
        rpcOptions->setRoutingData(rheader->releaseRoutingData());
      }
    };
    ::std::int64_t _return;
    if (auto ew = recv_wrapped_aliveSince(_return, returnState)) {
      co_yield folly::coro::co_error(std::move(ew));
    }
    co_return _return;
  }
 public:
#endif // FOLLY_HAS_COROUTINES

  virtual void aliveSince(folly::Function<void (::apache::thrift::ClientReceiveState&&)> callback);


  static folly::exception_wrapper recv_wrapped_aliveSince(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state);
  static ::std::int64_t recv_aliveSince(::apache::thrift::ClientReceiveState& state);
  // Mock friendly virtual instance method
  virtual ::std::int64_t recv_instance_aliveSince(::apache::thrift::ClientReceiveState& state);
  virtual folly::exception_wrapper recv_instance_wrapped_aliveSince(::std::int64_t& _return, ::apache::thrift::ClientReceiveState& state);
 private:
  template <typename Protocol_, typename RpcOptions>
  void aliveSinceT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr<apache::thrift::transport::THeader> header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback);
  std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> aliveSinceCtx(apache::thrift::RpcOptions* rpcOptions);
 public:
};

} // namespace apache::thrift

namespace facebook { namespace fb303 { namespace cpp2 {
using BaseServiceAsyncClient [[deprecated("Use apache::thrift::Client<BaseService> instead")]] = ::apache::thrift::Client<BaseService>;
}}} // facebook::fb303::cpp2
