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 NodesCephLspoolsResponseDataInner {

    /// Application tags attached to the pool (mapping of application name to its metadata object).
    #[serde(rename = "application_metadata", skip_serializing_if = "Option::is_none")]
    pub application_metadata: Option<serde_json::Value>,

    /// Raw pg_autoscaler status object for this pool; shape varies between Ceph releases.
    #[serde(rename = "autoscale_status", skip_serializing_if = "Option::is_none")]
    pub autoscale_status: Option<serde_json::Value>,

    /// Bytes currently used in the pool; absent if no usage statistics are reported.
    #[serde(rename = "bytes_used", skip_serializing_if = "Option::is_none")]
    pub bytes_used: Option<i64>,

    /// Numeric id of the CRUSH rule used by this pool.
    #[serde(rename = "crush_rule")]
    pub crush_rule: i64,

    /// Human-readable name of the CRUSH rule used by this pool; absent if the rule id is not in the current CRUSH map.
    #[serde(rename = "crush_rule_name", skip_serializing_if = "Option::is_none")]
    pub crush_rule_name: Option<String>,

    /// Minimum number of replicas required to accept writes.
    #[serde(rename = "min_size")]
    pub min_size: i64,

    /// Percentage of pool capacity currently used; absent if no usage statistics are reported.
    #[serde(rename = "percent_used", skip_serializing_if = "Option::is_none")]
    pub percent_used: Option<f64>,

    /// Placement-group autoscaler mode ('on', 'warn' or 'off').
    #[serde(rename = "pg_autoscale_mode", skip_serializing_if = "Option::is_none")]
    pub pg_autoscale_mode: Option<String>,

    /// Current placement-group count.
    #[serde(rename = "pg_num")]
    pub pg_num: i64,

    /// Optimal placement-group count computed by pg_autoscaler.
    #[serde(rename = "pg_num_final", skip_serializing_if = "Option::is_none")]
    pub pg_num_final: Option<i64>,

    /// Minimum placement-group count the pg_autoscaler may choose.
    #[serde(rename = "pg_num_min", skip_serializing_if = "Option::is_none")]
    pub pg_num_min: Option<i64>,

    /// Numeric pool id assigned by Ceph.
    #[serde(rename = "pool")]
    pub pool: i64,

    /// Operator-visible name of the pool.
    #[serde(rename = "pool_name")]
    pub pool_name: String,

    /// Replication factor (target number of object replicas).
    #[serde(rename = "size")]
    pub size: i64,

    /// Operator-supplied target size in bytes; hints the pg_autoscaler.
    #[serde(rename = "target_size", skip_serializing_if = "Option::is_none")]
    pub target_size: Option<i64>,

    /// Operator-supplied target ratio of total pool capacity; hints the pg_autoscaler.
    #[serde(rename = "target_size_ratio", skip_serializing_if = "Option::is_none")]
    pub target_size_ratio: Option<f64>,

    /// Pool type: 'replicated' for n-way replication, 'erasure' for an erasure-coded pool, 'unknown' for types PVE does not yet map.
    #[serde(rename = "type")]
    pub r#type: models::PveNodesCephTypeEnum,


}

impl NodesCephLspoolsResponseDataInner {
    pub fn new(crush_rule: i64, min_size: i64, pg_num: i64, pool: i64, pool_name: String, size: i64, r#type: models::PveNodesCephTypeEnum) -> NodesCephLspoolsResponseDataInner {
        NodesCephLspoolsResponseDataInner {
            
            application_metadata: None,
            
            autoscale_status: None,
            
            bytes_used: None,
            
            crush_rule,
            
            crush_rule_name: None,
            
            min_size,
            
            percent_used: None,
            
            pg_autoscale_mode: None,
            
            pg_num,
            
            pg_num_final: None,
            
            pg_num_min: None,
            
            pool,
            
            pool_name,
            
            size,
            
            target_size: None,
            
            target_size_ratio: None,
            
            r#type,
            
        }
    }
}