/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fbthrift/fbthrift/work/fbthrift-2024.08.26.00/thrift/lib/thrift/RocketUpgrade.thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated @nocommit
 */
#pragma once

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

#include "thrift/lib/thrift/gen-cpp2/RocketUpgradeAsyncClient.h"
#include "thrift/lib/thrift/gen-cpp2/RocketUpgrade_types.h"

namespace folly {
  class IOBuf;
  class IOBufQueue;
}
namespace apache { namespace thrift {
  class Cpp2RequestContext;
  class BinaryProtocolReader;
  class CompactProtocolReader;
  namespace transport { class THeader; }
}}

namespace apache::thrift {
class RocketUpgrade;
class RocketUpgradeAsyncProcessor;

class RocketUpgradeServiceInfoHolder : public apache::thrift::ServiceInfoHolder {
  public:
   apache::thrift::ServiceRequestInfoMap const& requestInfoMap() const override;
   static apache::thrift::ServiceRequestInfoMap staticRequestInfoMap();
};
} // namespace apache::thrift

namespace apache::thrift {
template <>
class ServiceHandler<::apache::thrift::RocketUpgrade> : public apache::thrift::ServerInterface {
 public:
  std::string_view getGeneratedName() const override { return "RocketUpgrade"; }

  typedef ::apache::thrift::RocketUpgradeAsyncProcessor ProcessorType;
  std::unique_ptr<apache::thrift::AsyncProcessor> getProcessor() override;
  CreateMethodMetadataResult createMethodMetadata() override;
  bool isThriftGenerated() const override final { return true; }
 private:
  std::optional<std::reference_wrapper<apache::thrift::ServiceRequestInfoMap const>> getServiceRequestInfoMap() const;
 public:

  virtual void sync_upgradeToRocket();
  [[deprecated("Use sync_upgradeToRocket instead")]] virtual void upgradeToRocket();
  virtual folly::Future<folly::Unit> future_upgradeToRocket();
  virtual folly::SemiFuture<folly::Unit> semifuture_upgradeToRocket();
#if FOLLY_HAS_COROUTINES
  virtual folly::coro::Task<void> co_upgradeToRocket();
  virtual folly::coro::Task<void> co_upgradeToRocket(apache::thrift::RequestParams params);
#endif
  virtual void async_tm_upgradeToRocket(apache::thrift::HandlerCallbackPtr<void> callback);
 private:
  static ::apache::thrift::RocketUpgradeServiceInfoHolder __fbthrift_serviceInfoHolder;
  std::atomic<apache::thrift::detail::si::InvocationType> __fbthrift_invocation_upgradeToRocket{apache::thrift::detail::si::InvocationType::AsyncTm};
};

} // namespace apache::thrift

namespace apache::thrift {
using RocketUpgradeSvIf [[deprecated("Use apache::thrift::ServiceHandler<RocketUpgrade> instead")]] = ::apache::thrift::ServiceHandler<RocketUpgrade>;
} // namespace apache::thrift
namespace apache::thrift {
class RocketUpgradeSvNull : public ::apache::thrift::ServiceHandler<RocketUpgrade> {
 public:
  void upgradeToRocket() override;
};

class RocketUpgradeAsyncProcessor : public ::apache::thrift::GeneratedAsyncProcessorBase {
 public:
  const char* getServiceName() override;
  void getServiceMetadata(apache::thrift::metadata::ThriftServiceMetadataResponse& response) override;
  using BaseAsyncProcessor = void;
 protected:
  ::apache::thrift::ServiceHandler<::apache::thrift::RocketUpgrade>* iface_;
 public:
  void processSerializedCompressedRequestWithMetadata(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, const apache::thrift::AsyncProcessorFactory::MethodMetadata& methodMetadata, apache::thrift::protocol::PROTOCOL_TYPES protType, apache::thrift::Cpp2RequestContext* context, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm) override;
  void executeRequest(apache::thrift::ServerRequest&& serverRequest, const apache::thrift::AsyncProcessorFactory::MethodMetadata& methodMetadata) override;
 public:
  using ProcessFuncs = GeneratedAsyncProcessorBase::ProcessFuncs<RocketUpgradeAsyncProcessor>;
  using ProcessMap = GeneratedAsyncProcessorBase::ProcessMap<ProcessFuncs>;
  static const RocketUpgradeAsyncProcessor::ProcessMap& getOwnProcessMap();
 private:
  static const RocketUpgradeAsyncProcessor::ProcessMap kOwnProcessMap_;
 private:
  template <typename ProtocolIn_, typename ProtocolOut_>
  void setUpAndProcess_upgradeToRocket(apache::thrift::ResponseChannelRequest::UniquePtr req, apache::thrift::SerializedCompressedRequest&& serializedRequest, apache::thrift::Cpp2RequestContext* ctx, folly::EventBase* eb, apache::thrift::concurrency::ThreadManager* tm);
  template <typename ProtocolIn_, typename ProtocolOut_>
  void executeRequest_upgradeToRocket(apache::thrift::ServerRequest&& serverRequest);
  template <class ProtocolIn_, class ProtocolOut_>
  static apache::thrift::SerializedResponse return_upgradeToRocket(apache::thrift::ContextStack* ctx);
  template <class ProtocolIn_, class ProtocolOut_>
  static void throw_wrapped_upgradeToRocket(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx);
 public:
  RocketUpgradeAsyncProcessor(::apache::thrift::ServiceHandler<::apache::thrift::RocketUpgrade>* iface) :
      iface_(iface) {}
  ~RocketUpgradeAsyncProcessor() override {}
};

} // namespace apache::thrift
