clientapi-pve 2026.5.24

Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
Documentation
/*
 * Proxmox Virtual Environment API
 *
 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
 *
 * The version of the OpenAPI document: 9.x
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NodesCephCreatepoolRequest {

    /// Configure VM and CT storage using the new pool. Defaults to false for replicated pools and to true for erasure-coded pools (since EC pools are typically only useful when wired up to storage).
    #[serde(rename = "add_storages", skip_serializing_if = "Option::is_none")]
    pub add_storages: Option<models::PveBoolean>,

    /// The application of the pool.
    #[serde(rename = "application", skip_serializing_if = "Option::is_none")]
    pub application: Option<models::PveApplicationEnum>,

    /// The rule to use for mapping object placement in the cluster.
    #[serde(rename = "crush_rule", skip_serializing_if = "Option::is_none")]
    pub crush_rule: Option<String>,

    /// Create an erasure coded pool for RBD with an accompaning replicated pool for metadata storage. With EC, the common ceph options 'size', 'min_size' and 'crush_rule' parameters will be applied to the metadata pool.
    #[serde(rename = "erasure-coding", skip_serializing_if = "Option::is_none")]
    pub erasure_coding: Option<Box<models::PveErasureCodingField>>,

    /// Minimum number of replicas per object
    #[serde(rename = "min_size", skip_serializing_if = "Option::is_none")]
    pub min_size: Option<i32>,

    /// The name of the pool. It must be unique.
    #[serde(rename = "name")]
    pub name: String,

    /// The automatic PG scaling mode of the pool.
    #[serde(rename = "pg_autoscale_mode", skip_serializing_if = "Option::is_none")]
    pub pg_autoscale_mode: Option<models::PvePgAutoscaleModeEnum>,

    /// Number of placement groups.
    #[serde(rename = "pg_num", skip_serializing_if = "Option::is_none")]
    pub pg_num: Option<i32>,

    /// Minimal number of placement groups.
    #[serde(rename = "pg_num_min", skip_serializing_if = "Option::is_none")]
    pub pg_num_min: Option<i32>,

    /// Number of replicas per object
    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
    pub size: Option<i32>,

    /// The estimated target size of the pool for the PG autoscaler.
    #[serde(rename = "target_size", skip_serializing_if = "Option::is_none")]
    pub target_size: Option<String>,

    /// The estimated target ratio of the pool for the PG autoscaler.
    #[serde(rename = "target_size_ratio", skip_serializing_if = "Option::is_none")]
    pub target_size_ratio: Option<f64>,


}

impl NodesCephCreatepoolRequest {
    pub fn new(name: String) -> NodesCephCreatepoolRequest {
        NodesCephCreatepoolRequest {
            
            add_storages: None,
            
            application: None,
            
            crush_rule: None,
            
            erasure_coding: None,
            
            min_size: None,
            
            name,
            
            pg_autoscale_mode: None,
            
            pg_num: None,
            
            pg_num_min: None,
            
            size: None,
            
            target_size: None,
            
            target_size_ratio: None,
            
        }
    }
}