lance_namespace_reqwest_client/models/add_virtual_column_output_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 AddVirtualColumnOutputEntry {
16 /// Physical output column name
17 #[serde(rename = "column")]
18 pub column: String,
19 /// Field name in the UDF output struct
20 #[serde(rename = "struct_field")]
21 pub struct_field: String,
22 /// Data type of the output column using JSON representation
23 #[serde(rename = "data_type")]
24 pub data_type: serde_json::Value,
25 /// Whether the output column is nullable
26 #[serde(rename = "nullable")]
27 pub nullable: bool,
28 /// User-supplied output field metadata (string key-value pairs)
29 #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
30 pub metadata: Option<std::collections::HashMap<String, String>>,
31}
32
33impl AddVirtualColumnOutputEntry {
34 pub fn new(column: String, struct_field: String, data_type: serde_json::Value, nullable: bool) -> AddVirtualColumnOutputEntry {
35 AddVirtualColumnOutputEntry {
36 column,
37 struct_field,
38 data_type,
39 nullable,
40 metadata: None,
41 }
42 }
43}
44