// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
// Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/tensor_dimension_index_slider.fbs".

#pragma once

#include "../../result.hpp"

#include <cstdint>
#include <memory>

namespace arrow {
    class Array;
    class DataType;
    class StructBuilder;
} // namespace arrow

namespace rerun::blueprint::datatypes {
    /// **Datatype**: Defines a slider for the index of some dimension.
    struct TensorDimensionIndexSlider {
        /// The dimension number.
        uint32_t dimension;

      public:
        TensorDimensionIndexSlider() = default;

        TensorDimensionIndexSlider(uint32_t dimension_) : dimension(dimension_) {}

        TensorDimensionIndexSlider& operator=(uint32_t dimension_) {
            dimension = dimension_;
            return *this;
        }
    };
} // namespace rerun::blueprint::datatypes

namespace rerun {
    template <typename T>
    struct Loggable;

    /// \private
    template <>
    struct Loggable<blueprint::datatypes::TensorDimensionIndexSlider> {
        static constexpr const char Name[] = "rerun.blueprint.datatypes.TensorDimensionIndexSlider";

        /// Returns the arrow data type this type corresponds to.
        static const std::shared_ptr<arrow::DataType>& arrow_datatype();

        /// Serializes an array of `rerun::blueprint:: datatypes::TensorDimensionIndexSlider` into an arrow array.
        static Result<std::shared_ptr<arrow::Array>> to_arrow(
            const blueprint::datatypes::TensorDimensionIndexSlider* instances, size_t num_instances
        );

        /// Fills an arrow array builder with an array of this type.
        static rerun::Error fill_arrow_array_builder(
            arrow::StructBuilder* builder,
            const blueprint::datatypes::TensorDimensionIndexSlider* elements, size_t num_elements
        );
    };
} // namespace rerun
