Skip to main content

clientapi_pve/models/
nodes_ceph_getpool_response_data.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 NodesCephGetpoolResponseData {
16
17    /// The application of the pool.
18    #[serde(rename = "application", skip_serializing_if = "Option::is_none")]
19    pub application: Option<models::PveApplicationEnum>,
20
21    /// Names of applications currently associated with the pool.
22    #[serde(rename = "application_list", skip_serializing_if = "Option::is_none")]
23    pub application_list: Option<Vec<String>>,
24
25    /// Raw pg_autoscaler status object for this pool; shape varies between Ceph releases.
26    #[serde(rename = "autoscale_status", skip_serializing_if = "Option::is_none")]
27    pub autoscale_status: Option<serde_json::Value>,
28
29    /// The rule to use for mapping object placement in the cluster.
30    #[serde(rename = "crush_rule", skip_serializing_if = "Option::is_none")]
31    pub crush_rule: Option<String>,
32
33    /// Set if the pool uses fast-read for erasure-coded reads.
34    #[serde(rename = "fast_read")]
35    pub fast_read: models::PveBoolean,
36
37    /// Set if the pool hashes pool id into its CRUSH placement-seed.
38    #[serde(rename = "hashpspool")]
39    pub hashpspool: models::PveBoolean,
40
41    /// Numeric pool id assigned by Ceph.
42    #[serde(rename = "id")]
43    pub id: i64,
44
45    /// Minimum number of replicas per object
46    #[serde(rename = "min_size", skip_serializing_if = "Option::is_none")]
47    pub min_size: Option<i32>,
48
49    /// The name of the pool. It must be unique.
50    #[serde(rename = "name")]
51    pub name: String,
52
53    /// Set if deep-scrubbing is disabled for this pool.
54    #[serde(rename = "nodeep-scrub")]
55    pub nodeep_scrub: models::PveBoolean,
56
57    /// Set if pool delete is blocked.
58    #[serde(rename = "nodelete")]
59    pub nodelete: models::PveBoolean,
60
61    /// Set if changing the placement-group count is blocked.
62    #[serde(rename = "nopgchange")]
63    pub nopgchange: models::PveBoolean,
64
65    /// Set if scrubbing is disabled for this pool.
66    #[serde(rename = "noscrub")]
67    pub noscrub: models::PveBoolean,
68
69    /// Set if changing the replication size is blocked.
70    #[serde(rename = "nosizechange")]
71    pub nosizechange: models::PveBoolean,
72
73    /// The automatic PG scaling mode of the pool.
74    #[serde(rename = "pg_autoscale_mode", skip_serializing_if = "Option::is_none")]
75    pub pg_autoscale_mode: Option<models::PvePgAutoscaleModeEnum>,
76
77    /// Number of placement groups.
78    #[serde(rename = "pg_num", skip_serializing_if = "Option::is_none")]
79    pub pg_num: Option<i32>,
80
81    /// Minimal number of placement groups.
82    #[serde(rename = "pg_num_min", skip_serializing_if = "Option::is_none")]
83    pub pg_num_min: Option<i32>,
84
85    /// Placement-group-for-placement count.
86    #[serde(rename = "pgp_num")]
87    pub pgp_num: i64,
88
89    /// Number of replicas per object
90    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
91    pub size: Option<i32>,
92
93    /// Optional pool usage and IO statistics (only present when verbose=1 is requested).
94    #[serde(rename = "statistics", skip_serializing_if = "Option::is_none")]
95    pub statistics: Option<serde_json::Value>,
96
97    /// The estimated target size of the pool for the PG autoscaler.
98    #[serde(rename = "target_size", skip_serializing_if = "Option::is_none")]
99    pub target_size: Option<String>,
100
101    /// The estimated target ratio of the pool for the PG autoscaler.
102    #[serde(rename = "target_size_ratio", skip_serializing_if = "Option::is_none")]
103    pub target_size_ratio: Option<f64>,
104
105    /// Set if hitsets use GMT timestamps (for cache-tier pools).
106    #[serde(rename = "use_gmt_hitset")]
107    pub use_gmt_hitset: models::PveBoolean,
108
109    /// Set if the pool sets the FADV_DONTNEED hint on writes.
110    #[serde(rename = "write_fadvise_dontneed")]
111    pub write_fadvise_dontneed: models::PveBoolean,
112
113
114}
115
116impl NodesCephGetpoolResponseData {
117    pub fn new(fast_read: models::PveBoolean, hashpspool: models::PveBoolean, id: i64, name: String, nodeep_scrub: models::PveBoolean, nodelete: models::PveBoolean, nopgchange: models::PveBoolean, noscrub: models::PveBoolean, nosizechange: models::PveBoolean, pgp_num: i64, use_gmt_hitset: models::PveBoolean, write_fadvise_dontneed: models::PveBoolean) -> NodesCephGetpoolResponseData {
118        NodesCephGetpoolResponseData {
119            
120            application: None,
121            
122            application_list: None,
123            
124            autoscale_status: None,
125            
126            crush_rule: None,
127            
128            fast_read,
129            
130            hashpspool,
131            
132            id,
133            
134            min_size: None,
135            
136            name,
137            
138            nodeep_scrub,
139            
140            nodelete,
141            
142            nopgchange,
143            
144            noscrub,
145            
146            nosizechange,
147            
148            pg_autoscale_mode: None,
149            
150            pg_num: None,
151            
152            pg_num_min: None,
153            
154            pgp_num,
155            
156            size: None,
157            
158            statistics: None,
159            
160            target_size: None,
161            
162            target_size_ratio: None,
163            
164            use_gmt_hitset,
165            
166            write_fadvise_dontneed,
167            
168        }
169    }
170}
171
172