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

#include "ReaderLibrary.h"

#include <Cesium3DTiles/Tileset.h>

#include <CesiumJsonReader/ArrayJsonHandler.h>
#include <CesiumJsonReader/DictionaryJsonHandler.h>
#include <CesiumJsonReader/DoubleJsonHandler.h>
#include <CesiumJsonReader/ExtensibleObjectJsonHandler.h>
#include <CesiumJsonReader/StringJsonHandler.h>

#define CODEGEN_API CESIUM3DTILESREADER_API

namespace Cesium3DTiles {

class CODEGEN_API AssetJsonHandler
    : public CesiumJsonReader::ExtensibleObjectJsonHandler {
public:
  using ValueType = Asset;

  AssetJsonHandler(CesiumJsonReader::ExtensionContext& context);

  void reset(IJsonHandler* pParentHandler, Asset* pObject);

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

protected:
  IJsonHandler* readObjectKeyAsset(
      const std::string& objectType,
      const std::string_view& str,
      Asset& o);

private:
  Asset* _pObject = nullptr;

  CesiumJsonReader::StringJsonHandler _version;
  CesiumJsonReader::StringJsonHandler _tilesetVersion;
};

class CODEGEN_API BoundingVolumeJsonHandler
    : public CesiumJsonReader::ExtensibleObjectJsonHandler {
public:
  using ValueType = BoundingVolume;

  BoundingVolumeJsonHandler(CesiumJsonReader::ExtensionContext& context);

  void reset(IJsonHandler* pParentHandler, BoundingVolume* pObject);

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

protected:
  IJsonHandler* readObjectKeyBoundingVolume(
      const std::string& objectType,
      const std::string_view& str,
      BoundingVolume& o);

private:
  BoundingVolume* _pObject = nullptr;

  CesiumJsonReader::
      ArrayJsonHandler<double, CesiumJsonReader::DoubleJsonHandler>
          _box;
  CesiumJsonReader::
      ArrayJsonHandler<double, CesiumJsonReader::DoubleJsonHandler>
          _region;
  CesiumJsonReader::
      ArrayJsonHandler<double, CesiumJsonReader::DoubleJsonHandler>
          _sphere;
};

class CODEGEN_API ContentJsonHandler
    : public CesiumJsonReader::ExtensibleObjectJsonHandler {
public:
  using ValueType = Content;

  ContentJsonHandler(CesiumJsonReader::ExtensionContext& context);

  void reset(IJsonHandler* pParentHandler, Content* pObject);

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

protected:
  IJsonHandler* readObjectKeyContent(
      const std::string& objectType,
      const std::string_view& str,
      Content& o);

private:
  Content* _pObject = nullptr;

  BoundingVolumeJsonHandler _boundingVolume;
  CesiumJsonReader::StringJsonHandler _uri;
};

class CODEGEN_API TileJsonHandler
    : public CesiumJsonReader::ExtensibleObjectJsonHandler {
public:
  using ValueType = Tile;

  class RefineJsonHandler : public CesiumJsonReader::JsonHandler {
  public:
    void reset(CesiumJsonReader::IJsonHandler* pParent, Tile::Refine* pEnum);
    virtual CesiumJsonReader::IJsonHandler*
    readString(const std::string_view& str) override;

  private:
    Tile::Refine* _pEnum = nullptr;
  };

  TileJsonHandler(CesiumJsonReader::ExtensionContext& context);

  void reset(IJsonHandler* pParentHandler, Tile* pObject);

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

protected:
  IJsonHandler* readObjectKeyTile(
      const std::string& objectType,
      const std::string_view& str,
      Tile& o);

private:
  Tile* _pObject = nullptr;

  BoundingVolumeJsonHandler _boundingVolume;
  BoundingVolumeJsonHandler _viewerRequestVolume;
  CesiumJsonReader::DoubleJsonHandler _geometricError;
  RefineJsonHandler _refine;
  CesiumJsonReader::
      ArrayJsonHandler<double, CesiumJsonReader::DoubleJsonHandler>
          _transform;
  ContentJsonHandler _content;
  CesiumJsonReader::ArrayJsonHandler<Tile, TileJsonHandler> _children;
};

class CODEGEN_API TilesetPropertiesJsonHandler
    : public CesiumJsonReader::ExtensibleObjectJsonHandler {
public:
  using ValueType = TilesetProperties;

  TilesetPropertiesJsonHandler(CesiumJsonReader::ExtensionContext& context);

  void reset(IJsonHandler* pParentHandler, TilesetProperties* pObject);

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

protected:
  IJsonHandler* readObjectKeyTilesetProperties(
      const std::string& objectType,
      const std::string_view& str,
      TilesetProperties& o);

private:
  TilesetProperties* _pObject = nullptr;

  CesiumJsonReader::DoubleJsonHandler _maximum;
  CesiumJsonReader::DoubleJsonHandler _minimum;
};

class CODEGEN_API TilesetJsonHandler
    : public CesiumJsonReader::ExtensibleObjectJsonHandler {
public:
  using ValueType = Tileset;

  class CODEGEN_API PropertiesJsonHandler
      : public CesiumJsonReader::ExtensibleObjectJsonHandler {
  public:
    using ValueType = Tileset::Properties;

    PropertiesJsonHandler(CesiumJsonReader::ExtensionContext& context);

    void reset(IJsonHandler* pParentHandler, Tileset::Properties* pObject);

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

  protected:
    IJsonHandler* readObjectKeyProperties(
        const std::string& objectType,
        const std::string_view& str,
        Tileset::Properties& o);

  private:
    Tileset::Properties* _pObject = nullptr;

    CesiumJsonReader::
        DictionaryJsonHandler<TilesetProperties, TilesetPropertiesJsonHandler>
            _additionalProperties;
  };

  TilesetJsonHandler(CesiumJsonReader::ExtensionContext& context);

  void reset(IJsonHandler* pParentHandler, Tileset* pObject);

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

protected:
  IJsonHandler* readObjectKeyTileset(
      const std::string& objectType,
      const std::string_view& str,
      Tileset& o);

private:
  Tileset* _pObject = nullptr;

  AssetJsonHandler _asset;
  PropertiesJsonHandler _properties;
  CesiumJsonReader::DoubleJsonHandler _geometricError;
  TileJsonHandler _root;
  CesiumJsonReader::
      ArrayJsonHandler<std::string, CesiumJsonReader::StringJsonHandler>
          _extensionsUsed;
  CesiumJsonReader::
      ArrayJsonHandler<std::string, CesiumJsonReader::StringJsonHandler>
          _extensionsRequired;
};

} // namespace Cesium3DTiles

#undef CODEGEN_API
