/**
 * Autogenerated by Thrift for /opt/local/var/macports/build/fbthrift-07c1dc61/work/fbthrift-2025.12.15.00/thrift/lib/thrift/schema.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/schema_metadata.h"

namespace apache {
namespace thrift {
namespace detail {

template <>
struct VisitByFieldId<::apache::thrift::type::Annotation> {
  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).fields_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Annotation");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::StructuredAnnotation> {
  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).type_ref());
    case 2:
      return f(1, static_cast<T&&>(t).fields_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::StructuredAnnotation");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::DecodedUri> {
  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).scheme_ref());
    case 2:
      return f(1, static_cast<T&&>(t).domain_ref());
    case 4:
      return f(2, static_cast<T&&>(t).path_ref());
    case 5:
      return f(3, static_cast<T&&>(t).query_ref());
    case 6:
      return f(4, static_cast<T&&>(t).fragment_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::DecodedUri");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::DefinitionAttrs> {
  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).uri_ref());
    case 3:
      return f(2, static_cast<T&&>(t).structuredAnnotations_ref());
    case 8:
      return f(3, static_cast<T&&>(t).annotations_ref());
    case 9:
      return f(4, static_cast<T&&>(t).annotationsByKey_ref());
    case 4:
      return f(5, static_cast<T&&>(t).unstructuredAnnotations_ref());
    case 6:
      return f(6, static_cast<T&&>(t).docs_ref());
    case 7:
      return f(7, static_cast<T&&>(t).sourceRange_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::DefinitionAttrs");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::SourceRange> {
  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).programId_ref());
    case 2:
      return f(1, static_cast<T&&>(t).beginLine_ref());
    case 3:
      return f(2, static_cast<T&&>(t).beginColumn_ref());
    case 4:
      return f(3, static_cast<T&&>(t).endLine_ref());
    case 5:
      return f(4, static_cast<T&&>(t).endColumn_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::SourceRange");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::DocBlock> {
  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).contents_ref());
    case 2:
      return f(1, static_cast<T&&>(t).sourceRange_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::DocBlock");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::InterfaceRef> {
  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).uri_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::InterfaceRef");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::EnumValue> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).value_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::EnumValue");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Enum> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).values_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Enum");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Field> {
  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).id_ref());
    case 2:
      return f(1, static_cast<T&&>(t).qualifier_ref());
    case 3:
      return f(2, static_cast<T&&>(t).type_ref());
    case 4:
      return f(3, static_cast<T&&>(t).attrs_ref());
    case 5:
      return f(4, static_cast<T&&>(t).customDefault_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Field");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Struct> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).fields_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Struct");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Union> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).fields_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Union");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Exception> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).fields_ref());
    case 3:
      return f(2, static_cast<T&&>(t).safety_ref());
    case 4:
      return f(3, static_cast<T&&>(t).kind_ref());
    case 5:
      return f(4, static_cast<T&&>(t).blame_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Exception");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Paramlist> {
  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).fields_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Paramlist");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Stream> {
  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).payload_ref());
    case 2:
      return f(1, static_cast<T&&>(t).exceptions_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Stream");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Sink> {
  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).payload_ref());
    case 2:
      return f(1, static_cast<T&&>(t).clientExceptions_ref());
    case 3:
      return f(2, static_cast<T&&>(t).finalResponse_ref());
    case 4:
      return f(3, static_cast<T&&>(t).serverExceptions_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Sink");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Interaction> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).functions_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Interaction");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::ReturnType> {
  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).thriftType_ref());
    case 2:
      return f(1, static_cast<T&&>(t).streamType_ref());
    case 3:
      return f(2, static_cast<T&&>(t).sinkType_ref());
    case 4:
      return f(3, static_cast<T&&>(t).interactionType_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::ReturnType");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Function> {
  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).qualifier_ref());
    case 2:
      return f(1, static_cast<T&&>(t).returnTypes_ref());
    case 3:
      return f(2, static_cast<T&&>(t).attrs_ref());
    case 4:
      return f(3, static_cast<T&&>(t).paramlist_ref());
    case 5:
      return f(4, static_cast<T&&>(t).exceptions_ref());
    case 6:
      return f(5, static_cast<T&&>(t).returnType_ref());
    case 7:
      return f(6, static_cast<T&&>(t).streamOrSink_ref());
    case 8:
      return f(7, static_cast<T&&>(t).interactionType_ref());
    case 9:
      return f(8, static_cast<T&&>(t).isPerforms_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Function");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Service> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).functions_ref());
    case 3:
      return f(2, static_cast<T&&>(t).baseService_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Service");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Const> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).type_ref());
    case 3:
      return f(2, static_cast<T&&>(t).value_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Const");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Typedef> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).type_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Typedef");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Definition> {
  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).structDef_ref());
    case 2:
      return f(1, static_cast<T&&>(t).unionDef_ref());
    case 3:
      return f(2, static_cast<T&&>(t).exceptionDef_ref());
    case 4:
      return f(3, static_cast<T&&>(t).enumDef_ref());
    case 5:
      return f(4, static_cast<T&&>(t).typedefDef_ref());
    case 6:
      return f(5, static_cast<T&&>(t).constDef_ref());
    case 7:
      return f(6, static_cast<T&&>(t).serviceDef_ref());
    case 8:
      return f(7, static_cast<T&&>(t).interactionDef_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Definition");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Program> {
  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).attrs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).id_ref());
    case 3:
      return f(2, static_cast<T&&>(t).includes_ref());
    case 4:
      return f(3, static_cast<T&&>(t).definitions_ref());
    case 8:
      return f(4, static_cast<T&&>(t).definitionKeys_ref());
    case 5:
      return f(5, static_cast<T&&>(t).path_ref());
    case 6:
      return f(6, static_cast<T&&>(t).languageIncludes_ref());
    case 7:
      return f(7, static_cast<T&&>(t).namespaces_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Program");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::Schema> {
  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).programs_ref());
    case 2:
      return f(1, static_cast<T&&>(t).values_ref());
    case 3:
      return f(2, static_cast<T&&>(t).valuesMap_ref());
    case 4:
      return f(3, static_cast<T&&>(t).definitions_ref());
    case 8:
      return f(4, static_cast<T&&>(t).definitionsMap_ref());
    case 5:
      return f(5, static_cast<T&&>(t).sources_ref());
    case 6:
      return f(6, static_cast<T&&>(t).identifierSourceRanges_ref());
    case 7:
      return f(7, static_cast<T&&>(t).includeSourceRanges_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::Schema");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::SourceInfo> {
  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).fileName_ref());
    case 2:
      return f(1, static_cast<T&&>(t).languageIncludes_ref());
    case 3:
      return f(2, static_cast<T&&>(t).namespaces_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::SourceInfo");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::IdentifierRef> {
  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).range_ref());
    case 2:
      return f(1, static_cast<T&&>(t).uri_ref());
    case 3:
      return f(2, static_cast<T&&>(t).enumValue_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::IdentifierRef");
    }
  }
};

template <>
struct VisitByFieldId<::apache::thrift::type::IncludeRef> {
  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).range_ref());
    case 2:
      return f(1, static_cast<T&&>(t).target_ref());
    default:
      throwInvalidThriftId(fieldId, "::apache::thrift::type::IncludeRef");
    }
  }
};
} // namespace detail
} // namespace thrift
} // namespace apache
