lance-namespace-reqwest-client 0.7.6

This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lancedb.github.io/lance-namespace/spec/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lancedb.github.io/lance-namespace/spec/impls/rest for more details.
Documentation
/*
 * Lance Namespace Specification
 *
 * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts:  The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details.  The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AddVirtualColumnEntry {
    /// List of input column names for the virtual column
    #[serde(rename = "input_columns")]
    pub input_columns: Vec<String>,
    /// Data type of the virtual column using JSON representation
    #[serde(rename = "data_type")]
    pub data_type: serde_json::Value,
    /// Docker image to use for the UDF
    #[serde(rename = "image")]
    pub image: String,
    /// Base64 encoded pickled UDF
    #[serde(rename = "udf")]
    pub udf: String,
    /// Name of the UDF
    #[serde(rename = "udf_name")]
    pub udf_name: String,
    /// Version of the UDF
    #[serde(rename = "udf_version")]
    pub udf_version: String,
    /// UDF backend type (e.g. DockerUDFSpecV1)
    #[serde(rename = "udf_backend", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub udf_backend: Option<Option<String>>,
    /// Whether to automatically backfill the column after creation
    #[serde(rename = "auto_backfill", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub auto_backfill: Option<Option<bool>>,
    /// JSON-serialized manifest for the UDF environment
    #[serde(rename = "manifest", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub manifest: Option<Option<String>>,
    /// SHA-256 checksum of the manifest content
    #[serde(rename = "manifest_checksum", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub manifest_checksum: Option<Option<String>>,
    /// User-supplied field metadata (string key-value pairs)
    #[serde(rename = "field_metadata", skip_serializing_if = "Option::is_none")]
    pub field_metadata: Option<std::collections::HashMap<String, String>>,
}

impl AddVirtualColumnEntry {
    pub fn new(input_columns: Vec<String>, data_type: serde_json::Value, image: String, udf: String, udf_name: String, udf_version: String) -> AddVirtualColumnEntry {
        AddVirtualColumnEntry {
            input_columns,
            data_type,
            image,
            udf,
            udf_name,
            udf_version,
            udf_backend: None,
            auto_backfill: None,
            manifest: None,
            manifest_checksum: None,
            field_metadata: None,
        }
    }
}