lance_namespace_reqwest_client/models/update_field_metadata_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 UpdateFieldMetadataEntry {
16 /// Lance field path whose metadata to update. Nested fields use dot-separated segments; use backtick-quoted segments for literal dots and double backticks inside quoted segments. Use canonical full paths for display and errors; leaf names alone only identify top-level fields; invalid or unresolved paths should return InvalidInput or TableColumnNotFound.
17 #[serde(rename = "path")]
18 pub path: String,
19 /// Metadata key-value pairs to apply to the field. A null value deletes that key.
20 #[serde(rename = "metadata")]
21 pub metadata: std::collections::HashMap<String, String>,
22 /// If true, replace the field's existing metadata entirely; otherwise merge into it (optional, defaults to false).
23 #[serde(rename = "replace", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24 pub replace: Option<Option<bool>>,
25}
26
27impl UpdateFieldMetadataEntry {
28 pub fn new(path: String, metadata: std::collections::HashMap<String, String>) -> UpdateFieldMetadataEntry {
29 UpdateFieldMetadataEntry {
30 path,
31 metadata,
32 replace: None,
33 }
34 }
35}
36