// This file was generated by generate-classes.
// DO NOT EDIT THIS FILE!
#pragma once

#include "ExtensionExtStructuralMetadataPropertyAttributeJsonHandler.h"
#include "ExtensionExtStructuralMetadataPropertyTableJsonHandler.h"
#include "ExtensionExtStructuralMetadataPropertyTextureJsonHandler.h"
#include "ExtensionExtStructuralMetadataSchemaJsonHandler.h"

#include <CesiumGltf/ExtensionModelExtStructuralMetadata.h>
#include <CesiumJsonReader/ArrayJsonHandler.h>
#include <CesiumJsonReader/ExtensibleObjectJsonHandler.h>
#include <CesiumJsonReader/StringJsonHandler.h>

namespace CesiumJsonReader {
class ExtensionReaderContext;
}

namespace CesiumGltfReader {
class ExtensionModelExtStructuralMetadataJsonHandler
    : public CesiumJsonReader::ExtensibleObjectJsonHandler,
      public CesiumJsonReader::IExtensionJsonHandler {
public:
  using ValueType = CesiumGltf::ExtensionModelExtStructuralMetadata;

  static inline constexpr const char* ExtensionName = "EXT_structural_metadata";

  ExtensionModelExtStructuralMetadataJsonHandler(
      const CesiumJsonReader::ExtensionReaderContext& context) noexcept;
  void reset(
      IJsonHandler* pParentHandler,
      CesiumGltf::ExtensionModelExtStructuralMetadata* pObject);

  virtual IJsonHandler* readObjectKey(const std::string_view& str) override;

  virtual void reset(
      IJsonHandler* pParentHandler,
      CesiumUtility::ExtensibleObject& o,
      const std::string_view& extensionName) override;

  virtual IJsonHandler* readNull() override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readNull();
  };
  virtual IJsonHandler* readBool(bool b) override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readBool(b);
  }
  virtual IJsonHandler* readInt32(int32_t i) override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readInt32(i);
  }
  virtual IJsonHandler* readUint32(uint32_t i) override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readUint32(i);
  }
  virtual IJsonHandler* readInt64(int64_t i) override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readInt64(i);
  }
  virtual IJsonHandler* readUint64(uint64_t i) override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readUint64(i);
  }
  virtual IJsonHandler* readDouble(double d) override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readDouble(d);
  }
  virtual IJsonHandler* readString(const std::string_view& str) override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readString(str);
  }
  virtual IJsonHandler* readObjectStart() override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readObjectStart();
  }
  virtual IJsonHandler* readObjectEnd() override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readObjectEnd();
  }
  virtual IJsonHandler* readArrayStart() override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readArrayStart();
  }
  virtual IJsonHandler* readArrayEnd() override {
    return CesiumJsonReader::ExtensibleObjectJsonHandler::readArrayEnd();
  }
  virtual void reportWarning(
      const std::string& warning,
      std::vector<std::string>&& context =
          std::vector<std::string>()) override {
    CesiumJsonReader::ExtensibleObjectJsonHandler::reportWarning(
        warning,
        std::move(context));
  }

protected:
  IJsonHandler* readObjectKeyExtensionModelExtStructuralMetadata(
      const std::string& objectType,
      const std::string_view& str,
      CesiumGltf::ExtensionModelExtStructuralMetadata& o);

private:
  CesiumGltf::ExtensionModelExtStructuralMetadata* _pObject = nullptr;
  ExtensionExtStructuralMetadataSchemaJsonHandler _schema;
  CesiumJsonReader::StringJsonHandler _schemaUri;
  CesiumJsonReader::ArrayJsonHandler<
      CesiumGltf::ExtensionExtStructuralMetadataPropertyTable,
      ExtensionExtStructuralMetadataPropertyTableJsonHandler>
      _propertyTables;
  CesiumJsonReader::ArrayJsonHandler<
      CesiumGltf::ExtensionExtStructuralMetadataPropertyTexture,
      ExtensionExtStructuralMetadataPropertyTextureJsonHandler>
      _propertyTextures;
  CesiumJsonReader::ArrayJsonHandler<
      CesiumGltf::ExtensionExtStructuralMetadataPropertyAttribute,
      ExtensionExtStructuralMetadataPropertyAttributeJsonHandler>
      _propertyAttributes;
};
} // namespace CesiumGltfReader
