// 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/filter_by_range.fbs".

#pragma once

#include "../../datatypes/time_int.hpp"
#include "../../result.hpp"

#include <cstdint>
#include <memory>

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

namespace rerun::blueprint::datatypes {
    /// **Datatype**: Configuration for the filter-by-range feature of the dataframe view.
    ///
    /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
    ///
    struct FilterByRange {
        /// Beginning of the time range.
        rerun::datatypes::TimeInt start;

        /// End of the time range (inclusive).
        rerun::datatypes::TimeInt end;

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

namespace rerun {
    template <typename T>
    struct Loggable;

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

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