Skip to main content

lance_namespace_reqwest_client/models/
add_virtual_column_entry.rs

1/*
2 * Lance Namespace Specification
3 *
4 * 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. 
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AddVirtualColumnEntry {
16    /// List of input column names for the virtual column
17    #[serde(rename = "input_columns")]
18    pub input_columns: Vec<String>,
19    /// Data type of the virtual column using JSON representation
20    #[serde(rename = "data_type")]
21    pub data_type: serde_json::Value,
22    /// Docker image to use for the UDF
23    #[serde(rename = "image")]
24    pub image: String,
25    /// Base64 encoded pickled UDF
26    #[serde(rename = "udf")]
27    pub udf: String,
28    /// Name of the UDF
29    #[serde(rename = "udf_name")]
30    pub udf_name: String,
31    /// Version of the UDF
32    #[serde(rename = "udf_version")]
33    pub udf_version: String,
34    /// UDF backend type (e.g. DockerUDFSpecV1)
35    #[serde(rename = "udf_backend", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub udf_backend: Option<Option<String>>,
37    /// Whether to automatically backfill the column after creation
38    #[serde(rename = "auto_backfill", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
39    pub auto_backfill: Option<Option<bool>>,
40    /// JSON-serialized manifest for the UDF environment
41    #[serde(rename = "manifest", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
42    pub manifest: Option<Option<String>>,
43    /// SHA-256 checksum of the manifest content
44    #[serde(rename = "manifest_checksum", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
45    pub manifest_checksum: Option<Option<String>>,
46    /// User-supplied field metadata (string key-value pairs)
47    #[serde(rename = "field_metadata", skip_serializing_if = "Option::is_none")]
48    pub field_metadata: Option<std::collections::HashMap<String, String>>,
49}
50
51impl AddVirtualColumnEntry {
52    pub fn new(input_columns: Vec<String>, data_type: serde_json::Value, image: String, udf: String, udf_name: String, udf_version: String) -> AddVirtualColumnEntry {
53        AddVirtualColumnEntry {
54            input_columns,
55            data_type,
56            image,
57            udf,
58            udf_name,
59            udf_version,
60            udf_backend: None,
61            auto_backfill: None,
62            manifest: None,
63            manifest_checksum: None,
64            field_metadata: None,
65        }
66    }
67}
68