Skip to main content

clientapi_pve/models/
nodes_ceph_lspools_response_data_inner.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-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 NodesCephLspoolsResponseDataInner {
16
17    /// Application tags attached to the pool (mapping of application name to its metadata object).
18    #[serde(rename = "application_metadata", skip_serializing_if = "Option::is_none")]
19    pub application_metadata: Option<serde_json::Value>,
20
21    /// Raw pg_autoscaler status object for this pool; shape varies between Ceph releases.
22    #[serde(rename = "autoscale_status", skip_serializing_if = "Option::is_none")]
23    pub autoscale_status: Option<serde_json::Value>,
24
25    /// Bytes currently used in the pool; absent if no usage statistics are reported.
26    #[serde(rename = "bytes_used", skip_serializing_if = "Option::is_none")]
27    pub bytes_used: Option<i64>,
28
29    /// Numeric id of the CRUSH rule used by this pool.
30    #[serde(rename = "crush_rule")]
31    pub crush_rule: i64,
32
33    /// Human-readable name of the CRUSH rule used by this pool; absent if the rule id is not in the current CRUSH map.
34    #[serde(rename = "crush_rule_name", skip_serializing_if = "Option::is_none")]
35    pub crush_rule_name: Option<String>,
36
37    /// Minimum number of replicas required to accept writes.
38    #[serde(rename = "min_size")]
39    pub min_size: i64,
40
41    /// Percentage of pool capacity currently used; absent if no usage statistics are reported.
42    #[serde(rename = "percent_used", skip_serializing_if = "Option::is_none")]
43    pub percent_used: Option<f64>,
44
45    /// Placement-group autoscaler mode ('on', 'warn' or 'off').
46    #[serde(rename = "pg_autoscale_mode", skip_serializing_if = "Option::is_none")]
47    pub pg_autoscale_mode: Option<String>,
48
49    /// Current placement-group count.
50    #[serde(rename = "pg_num")]
51    pub pg_num: i64,
52
53    /// Optimal placement-group count computed by pg_autoscaler.
54    #[serde(rename = "pg_num_final", skip_serializing_if = "Option::is_none")]
55    pub pg_num_final: Option<i64>,
56
57    /// Minimum placement-group count the pg_autoscaler may choose.
58    #[serde(rename = "pg_num_min", skip_serializing_if = "Option::is_none")]
59    pub pg_num_min: Option<i64>,
60
61    /// Numeric pool id assigned by Ceph.
62    #[serde(rename = "pool")]
63    pub pool: i64,
64
65    /// Operator-visible name of the pool.
66    #[serde(rename = "pool_name")]
67    pub pool_name: String,
68
69    /// Replication factor (target number of object replicas).
70    #[serde(rename = "size")]
71    pub size: i64,
72
73    /// Operator-supplied target size in bytes; hints the pg_autoscaler.
74    #[serde(rename = "target_size", skip_serializing_if = "Option::is_none")]
75    pub target_size: Option<i64>,
76
77    /// Operator-supplied target ratio of total pool capacity; hints the pg_autoscaler.
78    #[serde(rename = "target_size_ratio", skip_serializing_if = "Option::is_none")]
79    pub target_size_ratio: Option<f64>,
80
81    /// Pool type: 'replicated' for n-way replication, 'erasure' for an erasure-coded pool, 'unknown' for types PVE does not yet map.
82    #[serde(rename = "type")]
83    pub r#type: models::PveNodesCephTypeEnum,
84
85
86}
87
88impl NodesCephLspoolsResponseDataInner {
89    pub fn new(crush_rule: i64, min_size: i64, pg_num: i64, pool: i64, pool_name: String, size: i64, r#type: models::PveNodesCephTypeEnum) -> NodesCephLspoolsResponseDataInner {
90        NodesCephLspoolsResponseDataInner {
91            
92            application_metadata: None,
93            
94            autoscale_status: None,
95            
96            bytes_used: None,
97            
98            crush_rule,
99            
100            crush_rule_name: None,
101            
102            min_size,
103            
104            percent_used: None,
105            
106            pg_autoscale_mode: None,
107            
108            pg_num,
109            
110            pg_num_final: None,
111            
112            pg_num_min: None,
113            
114            pool,
115            
116            pool_name,
117            
118            size,
119            
120            target_size: None,
121            
122            target_size_ratio: None,
123            
124            r#type,
125            
126        }
127    }
128}
129
130