Skip to main content

clientapi_pbs/models/
admin_datastore_create_move_namespace_request.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
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 AdminDatastoreCreateMoveNamespaceRequest {
16
17    /// Remove the source namespace after moving all contents. Defaults to true.
18    #[serde(rename = "delete-source", skip_serializing_if = "Option::is_none")]
19    pub delete_source: Option<bool>,
20
21    /// How many levels of namespaces should be operated on (0 == no recursion)
22    #[serde(rename = "max-depth", skip_serializing_if = "Option::is_none")]
23    pub max_depth: Option<i32>,
24
25    /// If a group with the same name already exists in the target namespace, merge snapshots into it. Requires matching ownership and non-overlapping snapshot times.
26    #[serde(rename = "merge-groups", skip_serializing_if = "Option::is_none")]
27    pub merge_groups: Option<bool>,
28
29    /// Namespace.
30    #[serde(rename = "ns")]
31    pub ns: String,
32
33    /// Namespace.
34    #[serde(rename = "target-ns")]
35    pub target_ns: String,
36
37
38}
39
40impl AdminDatastoreCreateMoveNamespaceRequest {
41    pub fn new(ns: String, target_ns: String) -> AdminDatastoreCreateMoveNamespaceRequest {
42        AdminDatastoreCreateMoveNamespaceRequest {
43            
44            delete_source: None,
45            
46            max_depth: None,
47            
48            merge_groups: None,
49            
50            ns,
51            
52            target_ns,
53            
54        }
55    }
56}
57
58