/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fbthrift/fbthrift/work/fbthrift-2024.09.23.00/thrift/lib/thrift/metadata.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/ThriftMetadataServiceAsyncClient.h"
#include "thrift/lib/thrift/gen-cpp2/metadata_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::metadata {
class ThriftMetadataService;
class ThriftMetadataServiceAsyncProcessor;

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

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

  static const char* __fbthrift_thrift_uri() {
    return "facebook.com/thrift/metadata/ThriftMetadataService";
  }

  typedef ::apache::thrift::metadata::ThriftMetadataServiceAsyncProcessor 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_getThriftServiceMetadata(::apache::thrift::metadata::ThriftServiceMetadataResponse& /*_return*/);
  [[deprecated("Use sync_getThriftServiceMetadata instead")]] virtual void getThriftServiceMetadata(::apache::thrift::metadata::ThriftServiceMetadataResponse& /*_return*/);
  virtual folly::Future<std::unique_ptr<::apache::thrift::metadata::ThriftServiceMetadataResponse>> future_getThriftServiceMetadata();
  virtual folly::SemiFuture<std::unique_ptr<::apache::thrift::metadata::ThriftServiceMetadataResponse>> semifuture_getThriftServiceMetadata();
#if FOLLY_HAS_COROUTINES
  virtual folly::coro::Task<std::unique_ptr<::apache::thrift::metadata::ThriftServiceMetadataResponse>> co_getThriftServiceMetadata();
  virtual folly::coro::Task<std::unique_ptr<::apache::thrift::metadata::ThriftServiceMetadataResponse>> co_getThriftServiceMetadata(apache::thrift::RequestParams params);
#endif
  virtual void async_tm_getThriftServiceMetadata(apache::thrift::HandlerCallbackPtr<std::unique_ptr<::apache::thrift::metadata::ThriftServiceMetadataResponse>> callback);
 private:
  static ::apache::thrift::metadata::ThriftMetadataServiceServiceInfoHolder __fbthrift_serviceInfoHolder;
  std::atomic<apache::thrift::detail::si::InvocationType> __fbthrift_invocation_getThriftServiceMetadata{apache::thrift::detail::si::InvocationType::AsyncTm};
};

} // namespace apache::thrift

namespace apache::thrift::metadata {
using ThriftMetadataServiceSvIf [[deprecated("Use apache::thrift::ServiceHandler<ThriftMetadataService> instead")]] = ::apache::thrift::ServiceHandler<ThriftMetadataService>;
} // namespace apache::thrift::metadata

namespace apache::thrift::metadata {
class ThriftMetadataServiceSvNull : public ::apache::thrift::ServiceHandler<ThriftMetadataService> {
 public:
  void getThriftServiceMetadata(::apache::thrift::metadata::ThriftServiceMetadataResponse& /*_return*/) override;
};

class ThriftMetadataServiceAsyncProcessor : 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::metadata::ThriftMetadataService>* 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<ThriftMetadataServiceAsyncProcessor>;
  using ProcessMap = GeneratedAsyncProcessorBase::ProcessMap<ProcessFuncs>;
  static const ThriftMetadataServiceAsyncProcessor::ProcessMap& getOwnProcessMap();
 private:
  static const ThriftMetadataServiceAsyncProcessor::ProcessMap kOwnProcessMap_;
 private:
  template <typename ProtocolIn_, typename ProtocolOut_>
  void setUpAndProcess_getThriftServiceMetadata(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_getThriftServiceMetadata(apache::thrift::ServerRequest&& serverRequest);
  template <class ProtocolIn_, class ProtocolOut_>
  static apache::thrift::SerializedResponse return_getThriftServiceMetadata(apache::thrift::ContextStack* ctx, ::apache::thrift::metadata::ThriftServiceMetadataResponse const& _return);
  template <class ProtocolIn_, class ProtocolOut_>
  static void throw_wrapped_getThriftServiceMetadata(apache::thrift::ResponseChannelRequest::UniquePtr req,int32_t protoSeqId,apache::thrift::ContextStack* ctx,folly::exception_wrapper ew,apache::thrift::Cpp2RequestContext* reqCtx);
 public:
  ThriftMetadataServiceAsyncProcessor(::apache::thrift::ServiceHandler<::apache::thrift::metadata::ThriftMetadataService>* iface) :
      iface_(iface) {}
  ~ThriftMetadataServiceAsyncProcessor() override {}
};

} // namespace apache::thrift::metadata
