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

#pragma once

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

#include <cstdint>
#include <memory>

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

namespace rerun::components {
    /// **Component**: A geospatial line string expressed in [EPSG:4326](https://epsg.io/4326) latitude and longitude (North/East-positive degrees).
    struct GeoLineString {
        rerun::Collection<rerun::datatypes::DVec2D> lat_lon;

      public: // START of extensions from geo_line_string_ext.cpp:
        /// Creates a new GeoLineString object based on [EPSG:4326](https://epsg.io/4326) latitude and longitude (North/East-positive degrees).
        static GeoLineString from_lat_lon(Collection<datatypes::DVec2D> lat_lon_) {
            GeoLineString line_string;
            line_string.lat_lon = std::move(lat_lon_);
            return line_string;
        }

        // END of extensions from geo_line_string_ext.cpp, start of generated code:

      public:
        GeoLineString() = default;
    };
} // namespace rerun::components

namespace rerun {
    template <typename T>
    struct Loggable;

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

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

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