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

#pragma once

#include "../../blueprint/datatypes/time_range_query.hpp"
#include "../../collection.hpp"
#include "../../result.hpp"

#include <cstdint>
#include <memory>
#include <utility>

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

namespace rerun::blueprint::components {
    /// **Component**: Configuration for time range queries.
    ///
    /// Note: configuration as saved on a per-timeline basis.
    struct TimeRangeQueries {
        rerun::Collection<rerun::blueprint::datatypes::TimeRangeQuery> queries;

      public:
        TimeRangeQueries() = default;

        TimeRangeQueries(rerun::Collection<rerun::blueprint::datatypes::TimeRangeQuery> queries_)
            : queries(std::move(queries_)) {}

        TimeRangeQueries& operator=(
            rerun::Collection<rerun::blueprint::datatypes::TimeRangeQuery> queries_
        ) {
            queries = std::move(queries_);
            return *this;
        }
    };
} // namespace rerun::blueprint::components

namespace rerun {
    template <typename T>
    struct Loggable;

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

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

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

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