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

#include "CesiumGltf/Library.h"

#include <CesiumUtility/ExtensibleObject.h>
#include <CesiumUtility/JsonValue.h>

#include <cstdint>
#include <optional>
#include <string>

namespace CesiumGltf {
/**
 * @brief A class property.
 */
struct CESIUMGLTF_API ClassProperty final
    : public CesiumUtility::ExtensibleObject {
  static inline constexpr const char* TypeName = "ClassProperty";

  /**
   * @brief Known values for The property type. If `ENUM` is used, then
   * `enumType` must also be specified. If `ARRAY` is used, then `componentType`
   * must also be specified. `ARRAY` is a fixed-length array when
   * `componentCount` is defined, and variable-length otherwise.
   */
  struct Type {
    inline static const std::string INT8 = "INT8";

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

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * @brief Known values for When `type` is `ARRAY` this indicates the type of
   * each component of the array. If `ENUM` is used, then `enumType` must also
   * be specified.
   */
  struct ComponentType {
    inline static const std::string INT8 = "INT8";

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

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

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

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

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

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

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

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

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

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

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

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

  /**
   * @brief The name of the property, e.g. for display purposes.
   */
  std::optional<std::string> name;

  /**
   * @brief The description of the property.
   */
  std::optional<std::string> description;

  /**
   * @brief The property type. If `ENUM` is used, then `enumType` must also be
   * specified. If `ARRAY` is used, then `componentType` must also be specified.
   * `ARRAY` is a fixed-length array when `componentCount` is defined, and
   * variable-length otherwise.
   *
   * Known values are defined in {@link Type}.
   *
   */
  std::string type = Type::INT8;

  /**
   * @brief An enum ID as declared in the `enums` dictionary. This value must be
   * specified when `type` or `componentType` is `ENUM`.
   */
  std::optional<std::string> enumType;

  /**
   * @brief When `type` is `ARRAY` this indicates the type of each component of
   * the array. If `ENUM` is used, then `enumType` must also be specified.
   *
   * Known values are defined in {@link ComponentType}.
   *
   */
  std::optional<std::string> componentType;

  /**
   * @brief The number of components per element for `ARRAY` elements.
   */
  std::optional<int64_t> componentCount;

  /**
   * @brief Specifies whether integer values are normalized. This applies both
   * when `type` is an integer type, or when `type` is `ARRAY` with a
   * `componentType` that is an integer type. For unsigned integer types, values
   * are normalized between `[0.0, 1.0]`. For signed integer types, values are
   * normalized between `[-1.0, 1.0]`. For all other types, this property is
   * ignored.
   */
  bool normalized = false;

  /**
   * @brief Maximum allowed values for property values. Only applicable for
   * numeric types and fixed-length arrays of numeric types. For numeric types
   * this is a single number. For fixed-length arrays this is an array with
   * `componentCount` number of elements. The `normalized` property has no
   * effect on these values: they always correspond to the integer values.
   */
  std::optional<CesiumUtility::JsonValue> max;

  /**
   * @brief Minimum allowed values for property values. Only applicable for
   * numeric types and fixed-length arrays of numeric types. For numeric types
   * this is a single number. For fixed-length arrays this is an array with
   * `componentCount` number of elements. The `normalized` property has no
   * effect on these values: they always correspond to the integer values.
   */
  std::optional<CesiumUtility::JsonValue> min;

  /**
   * @brief A default value to use when the property value is not defined. If
   * used, `optional` must be set to true. The type of the default value must
   * match the property definition: For `BOOLEAN` use `true` or `false`. For
   * `STRING` use a JSON string. For a numeric type use a JSON number. For
   * `ENUM` use the enum `name`, not the integer value. For `ARRAY` use a JSON
   * array containing values matching the `componentType`.
   */
  std::optional<CesiumUtility::JsonValue> defaultProperty;

  /**
   * @brief If true, this property is optional.
   */
  bool optional = false;

  /**
   * @brief An identifier that describes how this property should be
   * interpreted. The semantic cannot be used by other properties in the class.
   */
  std::optional<std::string> semantic;
};
} // namespace CesiumGltf
