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

#pragma once

#include "../../datatypes/bool.hpp"
#include "../../datatypes/utf8.hpp"
#include "../../result.hpp"

#include <cstdint>
#include <memory>

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

namespace rerun::blueprint::datatypes {
    /// **Datatype**: A timeline column in a table.
    ///
    /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
    ///
    struct TimelineColumn {
        /// Is this column visible?
        ///
        /// Defaults to true.
        rerun::datatypes::Bool visible;

        /// Which timeline is this?
        rerun::datatypes::Utf8 timeline;

      public:
        TimelineColumn() = default;
    };
} // namespace rerun::blueprint::datatypes

namespace rerun {
    template <typename T>
    struct Loggable;

    /// \private
    template <>
    struct Loggable<blueprint::datatypes::TimelineColumn> {
        static constexpr std::string_view ComponentType =
            "rerun.blueprint.datatypes.TimelineColumn";

        /// 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::TimelineColumn` into an arrow array.
        static Result<std::shared_ptr<arrow::Array>> to_arrow(
            const blueprint::datatypes::TimelineColumn* 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::TimelineColumn* elements,
            size_t num_elements
        );
    };
} // namespace rerun
