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

#include "CesiumGltf/Library.h"

#include <CesiumUtility/ExtensibleObject.h>

#include <cstdint>

namespace CesiumGltf {
/**
 * @brief An array of binary property values.
 */
struct CESIUMGLTF_API FeatureTableProperty final
    : public CesiumUtility::ExtensibleObject {
  static inline constexpr const char* TypeName = "FeatureTableProperty";

  /**
   * @brief Known values for The type of values in `arrayOffsetBufferView` and
   * `stringOffsetBufferView`.
   */
  struct OffsetType {
    inline static const std::string UINT8 = "UINT8";

    inline static const std::string UINT16 = "UINT16";

    inline static const std::string UINT32 = "UINT32";

    inline static const std::string UINT64 = "UINT64";
  };

  /**
   * @brief The index of the buffer view containing property values. The data
   * type of property values is determined by the property definition: When
   * `type` is `BOOLEAN` values are packed into a bitfield. When `type` is
   * `STRING` values are stored as byte sequences and decoded as UTF-8 strings.
   * When `type` is a numeric type values are stored as the provided `type`.
   * When `type` is `ENUM` values are stored as the enum's `valueType`. Each
   * enum value in the buffer must match one of the allowed values in the enum
   * definition. When `type` is `ARRAY` elements are packed tightly together and
   * the data type is based on the `componentType` following the same rules as
   * above. `arrayOffsetBufferView` is required for variable-size arrays and
   * `stringOffsetBufferView` is required for strings (for variable-length
   * arrays of strings, both are required). The buffer view `byteOffset` must be
   * aligned to a multiple of 8 bytes. If the buffer view's `buffer` is the
   * GLB-stored `BIN` chunk, the byte offset is measured relative to the
   * beginning of the GLB. Otherwise, it is measured relative to the beginning
   * of the buffer.
   */
  int32_t bufferView = -1;

  /**
   * @brief The type of values in `arrayOffsetBufferView` and
   * `stringOffsetBufferView`.
   *
   * Known values are defined in {@link OffsetType}.
   *
   */
  std::string offsetType = OffsetType::UINT32;

  /**
   * @brief The index of the buffer view containing offsets for variable-length
   * arrays. The number of offsets is equal to the feature table `count` plus
   * one. The offsets represent the start positions of each array, with the last
   * offset representing the position after the last array. The array length is
   * computed using the difference between the current offset and the subsequent
   * offset. If `componentType` is `STRING` the offsets index into the string
   * offsets array (stored in `stringOffsetBufferView`), otherwise they index
   * into the property array (stored in `bufferView`). The data type of these
   * offsets is determined by `offsetType`. The buffer view `byteOffset` must be
   * aligned to a multiple of 8 bytes in the same manner as the main
   * `bufferView`
   */
  int32_t arrayOffsetBufferView = -1;

  /**
   * @brief The index of the buffer view containing offsets for strings. The
   * number of offsets is equal to the number of string components plus one. The
   * offsets represent the byte offsets of each string in the main `bufferView`,
   * with the last offset representing the byte offset after the last string.
   * The string byte length is computed using the difference between the current
   * offset and the subsequent offset. The data type of these offsets is
   * determined by `offsetType`. The buffer view `byteOffset` must be aligned to
   * a multiple of 8 bytes in the same manner as the main `bufferView`.
   */
  int32_t stringOffsetBufferView = -1;
};
} // namespace CesiumGltf
