/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.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"
#include "thrift/lib/thrift/detail/MetadataAdapter.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 {
  static_assert(!folly::is_detected_v<::apache::thrift::detail::st::detect_complete, ::apache::thrift::metadata::ThriftMetadataService>, "Definition collision with service tag. Either rename the Thrift service using @cpp.Name annotation or rename the conflicting C++ type.");

 public:
  std::string_view getGeneratedName() const override { return "ThriftMetadataService"; }

  static constexpr folly::cstring_view __fbthrift_thrift_uri = "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};
 public:

  virtual void fbthrift_execute_decorators_before_getThriftServiceMetadata(apache::thrift::Cpp2RequestContext& /*requestCtx*/) {}
  virtual void fbthrift_execute_decorators_after_getThriftServiceMetadata(apache::thrift::Cpp2RequestContext& /*requestCtx*/, apache::thrift::detail::DecoratorReturnType<::apache::thrift::metadata::ThriftServiceMetadataResponse>::type /*result*/) {}
  static void fbthrift_invoke_decorator_after_getThriftServiceMetadata(void* iface, apache::thrift::Cpp2RequestContext* ctx, apache::thrift::detail::DecoratorReturnType<::apache::thrift::metadata::ThriftServiceMetadataResponse>::type result) {
    static_cast<ServiceHandler<::apache::thrift::metadata::ThriftMetadataService>*>(iface)->fbthrift_execute_decorators_after_getThriftServiceMetadata(*ctx, result);
  }
};

namespace detail {
template <> struct TSchemaAssociation<::apache::thrift::metadata::ThriftMetadataService, false> {
  static constexpr ::folly::Range<const ::std::string_view*>(*bundle)() = nullptr;
  static constexpr int64_t programId = -7687672011742937909;
  static constexpr ::std::string_view definitionKey = {"\x3f\x9b\x9f\x9d\x4a\xf9\x4d\x3c\x37\xdd\x8a\xdd\x73\x8e\x85\x23", 16};
};
}
} // 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:
  std::string_view 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:
  //
  // Service Methods
  //

  //
  // Method 'getThriftServiceMetadata'
  //
  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);
  //
  // End of Method 'getThriftServiceMetadata'
  //

  //
  // End of Service Methods
  //
 public:
  ThriftMetadataServiceAsyncProcessor(::apache::thrift::ServiceHandler<::apache::thrift::metadata::ThriftMetadataService>* iface) :
      iface_(iface) {}
  ~ThriftMetadataServiceAsyncProcessor() override {}
};

} // namespace apache::thrift::metadata
