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

#include <thrift/lib/cpp2/visitation/visit_by_thrift_field_metadata.h>
#include "thrift/lib/thrift/gen-cpp2/serverdbginfo_metadata.h"

namespace apache {
namespace thrift {
namespace detail {

template <>
struct VisitByFieldId<::apache::thrift::serverdbginfo::RequestPileDbgInfo> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    case 2:
      return f(1, static_cast<T&&>(t).prioritiesCount_ref());
    case 3:
      return f(2, static_cast<T&&>(t).bucketsPerPriority_ref());
    case 4:
      return f(3, static_cast<T&&>(t).perBucketRequestLimit_ref());
    case 5:
      return f(4, static_cast<T&&>(t).totalRequestsLimit_ref());
    case 6:
      return f(5, static_cast<T&&>(t).queuedRequestsCount_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::serverdbginfo::RequestPileDbgInfo");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::serverdbginfo::ConcurrencyControllerDbgInfo> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    case 2:
      return f(1, static_cast<T&&>(t).concurrencyLimit_ref());
    case 3:
      return f(2, static_cast<T&&>(t).qpsLimit_ref());
    case 4:
      return f(3, static_cast<T&&>(t).totalProcessedRequests_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::serverdbginfo::ConcurrencyControllerDbgInfo");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::serverdbginfo::ExecutorDbgInfo> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    case 2:
      return f(1, static_cast<T&&>(t).threadsCount_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::serverdbginfo::ExecutorDbgInfo");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::serverdbginfo::ResourcePoolDbgInfo> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).name_ref());
    case 2:
      return f(1, static_cast<T&&>(t).requestPileDbgInfo_ref());
    case 3:
      return f(2, static_cast<T&&>(t).concurrencyControllerDbgInfo_ref());
    case 4:
      return f(3, static_cast<T&&>(t).executorDbgInfo_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::serverdbginfo::ResourcePoolDbgInfo");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::serverdbginfo::CPUConcurrencyControllerDbgInfo> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).mode_ref());
    case 2:
      return f(1, static_cast<T&&>(t).method_ref());
    case 3:
      return f(2, static_cast<T&&>(t).cpuTarget_ref());
    case 4:
      return f(3, static_cast<T&&>(t).cpuLoadSource_ref());
    case 5:
      return f(4, static_cast<T&&>(t).refreshPeriodMs_ref());
    case 6:
      return f(5, static_cast<T&&>(t).additiveMultiplier_ref());
    case 7:
      return f(6, static_cast<T&&>(t).decreaseMultiplier_ref());
    case 8:
      return f(7, static_cast<T&&>(t).increaseDistanceRatio_ref());
    case 9:
      return f(8, static_cast<T&&>(t).bumpOnError_ref());
    case 10:
      return f(9, static_cast<T&&>(t).refractoryPeriodMs_ref());
    case 11:
      return f(10, static_cast<T&&>(t).initialEstimateFactor_ref());
    case 12:
      return f(11, static_cast<T&&>(t).initialEstimatePercentile_ref());
    case 13:
      return f(12, static_cast<T&&>(t).collectionSampleSize_ref());
    case 14:
      return f(13, static_cast<T&&>(t).concurrencyUpperBound_ref());
    case 15:
      return f(14, static_cast<T&&>(t).concurrencyLowerBound_ref());
    case 16:
      return f(15, static_cast<T&&>(t).cpuLoad_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::serverdbginfo::CPUConcurrencyControllerDbgInfo");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::serverdbginfo::ResourcePoolsDbgInfo> {
  template <typename F, typename T>
  void operator()([[maybe_unused]] F&& f, int32_t fieldId, [[maybe_unused]] T&& t) const {
    switch (fieldId) {
    case 1:
      return f(0, static_cast<T&&>(t).enabled_ref());
    case 2:
      return f(1, static_cast<T&&>(t).resourcePools_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::serverdbginfo::ResourcePoolsDbgInfo");
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
