Skip to main content

iceberg_rest_catalog/models/
create_namespace_request.rs

1/*
2 * Apache Iceberg REST Catalog API
3 *
4 * Defines the specification for the first version of the REST Catalog API. Implementations should ideally support both Iceberg table specs v1 and v2, with priority given to v2.
5 *
6 * The version of the OpenAPI document: 0.0.1
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 CreateNamespaceRequest {
16    /// Reference to one or more levels of a namespace
17    #[serde(rename = "namespace")]
18    pub namespace: Vec<String>,
19    /// Configured string to string map of properties for the namespace
20    #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
21    pub properties: Option<std::collections::HashMap<String, String>>,
22}
23
24impl CreateNamespaceRequest {
25    pub fn new(namespace: Vec<String>) -> CreateNamespaceRequest {
26        CreateNamespaceRequest {
27            namespace,
28            properties: None,
29        }
30    }
31}