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

#pragma once

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

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

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

namespace rerun::blueprint {
    /// **Blueprint**: A view of a space.
    ///
    /// Unstable. Used for the ongoing blueprint experimentations.
    struct SpaceViewComponent {
        rerun::Collection<uint8_t> space_view;

      public:
        SpaceViewComponent() = default;

        SpaceViewComponent(rerun::Collection<uint8_t> space_view_)
            : space_view(std::move(space_view_)) {}

        SpaceViewComponent& operator=(rerun::Collection<uint8_t> space_view_) {
            space_view = std::move(space_view_);
            return *this;
        }
    };
} // namespace rerun::blueprint

namespace rerun {
    template <typename T>
    struct Loggable;

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

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

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

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