Skip to main content

proxmox_api/generated/nodes/node/
vzdump.rs

1pub mod defaults;
2pub mod extractconfig;
3#[derive(Debug, Clone)]
4pub struct VzdumpClient<T> {
5    client: T,
6    path: String,
7}
8impl<T> VzdumpClient<T>
9where
10    T: crate::client::Client,
11{
12    pub fn new(client: T, parent_path: &str) -> Self {
13        Self {
14            client,
15            path: format!("{}{}", parent_path, "/vzdump"),
16        }
17    }
18}
19impl<T> VzdumpClient<T>
20where
21    T: crate::client::Client,
22{
23    #[doc = "Create backup."]
24    #[doc = ""]
25    #[doc = "The user needs 'VM.Backup' permissions on any VM, and 'Datastore.AllocateSpace' on the backup storage (and fleecing storage when fleecing is used). The 'tmpdir', 'dumpdir', 'script' and 'job-id' parameters are restricted to the 'root@pam' user. The 'prune-backups' setting requires 'Datastore.Allocate' on the backup storage. The 'bwlimit', 'performance' and 'ionice' parameters require 'Sys.Modify' on '/'."]
26    pub async fn post(&self, params: PostParams) -> Result<String, T::Error> {
27        let path = self.path.to_string();
28        self.client.post(&path, &params).await
29    }
30}
31#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
32pub struct PostParams {
33    #[serde(
34        serialize_with = "crate::types::serialize_bool_optional",
35        deserialize_with = "crate::types::deserialize_bool_optional"
36    )]
37    #[serde(skip_serializing_if = "Option::is_none", default)]
38    #[doc = "Backup all known guest systems on this host."]
39    #[doc = ""]
40    pub all: Option<bool>,
41    #[serde(
42        serialize_with = "crate::types::serialize_unsigned_int_optional",
43        deserialize_with = "crate::types::deserialize_unsigned_int_optional"
44    )]
45    #[serde(skip_serializing_if = "Option::is_none", default)]
46    #[doc = "Limit I/O bandwidth (in KiB/s)."]
47    #[doc = ""]
48    pub bwlimit: Option<u64>,
49    #[serde(skip_serializing_if = "Option::is_none", default)]
50    #[doc = "Compress dump file."]
51    #[doc = ""]
52    pub compress: Option<Compress>,
53    #[serde(skip_serializing_if = "Option::is_none", default)]
54    #[doc = "Store resulting files to specified directory."]
55    #[doc = ""]
56    pub dumpdir: Option<String>,
57    #[serde(skip_serializing_if = "Option::is_none", default)]
58    #[doc = "Exclude specified guest systems (assumes --all)"]
59    #[doc = ""]
60    pub exclude: Option<String>,
61    #[serde(rename = "exclude-path")]
62    #[serde(skip_serializing_if = "::std::vec::Vec::is_empty", default)]
63    #[doc = "Exclude certain files/directories (shell globs). Paths starting with '/' are anchored to the container's root, other paths match relative to each subdirectory."]
64    #[doc = ""]
65    pub exclude_path: Vec<String>,
66    #[serde(skip_serializing_if = "Option::is_none", default)]
67    #[doc = "Options for backup fleecing (VM only)."]
68    #[doc = ""]
69    pub fleecing: Option<String>,
70    #[serde(skip_serializing_if = "Option::is_none", default)]
71    #[doc = "Set IO priority when using the BFQ scheduler. For snapshot and suspend mode backups of VMs, this only affects the compressor. A value of 8 means the idle priority is used, otherwise the best-effort priority is used with the specified value."]
72    #[doc = ""]
73    pub ionice: Option<IoniceInt>,
74    #[serde(rename = "job-id")]
75    #[serde(skip_serializing_if = "Option::is_none", default)]
76    #[doc = "The ID of the backup job. If set, the 'backup-job' metadata field of the backup notification will be set to this value. Only root@pam can set this parameter."]
77    #[doc = ""]
78    pub job_id: Option<JobIdStr>,
79    #[serde(skip_serializing_if = "Option::is_none", default)]
80    #[doc = "Maximal time to wait for the global lock (minutes)."]
81    #[doc = ""]
82    pub lockwait: Option<LockwaitInt>,
83    #[serde(skip_serializing_if = "Option::is_none", default)]
84    #[doc = "Deprecated: use notification targets/matchers instead. Specify when to send a notification mail"]
85    #[doc = ""]
86    pub mailnotification: Option<Mailnotification>,
87    #[serde(skip_serializing_if = "Option::is_none", default)]
88    #[doc = "Deprecated: Use notification targets/matchers instead. Comma-separated list of email addresses or users that should receive email notifications."]
89    #[doc = ""]
90    pub mailto: Option<String>,
91    #[serde(
92        serialize_with = "crate::types::serialize_non_zero_pos_int_optional",
93        deserialize_with = "crate::types::deserialize_non_zero_pos_int_optional"
94    )]
95    #[serde(skip_serializing_if = "Option::is_none", default)]
96    #[doc = "Deprecated: use 'prune-backups' instead. Maximal number of backup files per guest system."]
97    #[doc = ""]
98    pub maxfiles: Option<std::num::NonZeroU64>,
99    #[serde(skip_serializing_if = "Option::is_none", default)]
100    #[doc = "Backup mode."]
101    #[doc = ""]
102    pub mode: Option<Mode>,
103    #[serde(rename = "notes-template")]
104    #[serde(skip_serializing_if = "Option::is_none", default)]
105    #[doc = "Template string for generating notes for the backup(s). It can contain variables which will be replaced by their values. Currently supported are {{cluster}}, {{guestname}}, {{node}}, and {{vmid}}, but more might be added in the future. Needs to be a single line, newline and backslash need to be escaped as '\\n' and '\\\\' respectively."]
106    #[doc = ""]
107    pub notes_template: Option<NotesTemplateStr>,
108    #[serde(rename = "notification-mode")]
109    #[serde(skip_serializing_if = "Option::is_none", default)]
110    #[doc = "Determine which notification system to use. If set to 'legacy-sendmail', vzdump will consider the mailto/mailnotification parameters and send emails to the specified address(es) via the 'sendmail' command. If set to 'notification-system', a notification will be sent via PVE's notification system, and the mailto and mailnotification will be ignored. If set to 'auto' (default setting), an email will be sent if mailto is set, and the notification system will be used if not."]
111    #[doc = ""]
112    pub notification_mode: Option<NotificationMode>,
113    #[serde(rename = "pbs-change-detection-mode")]
114    #[serde(skip_serializing_if = "Option::is_none", default)]
115    #[doc = "PBS mode used to detect file changes and switch encoding format for container backups."]
116    #[doc = ""]
117    pub pbs_change_detection_mode: Option<PbsChangeDetectionMode>,
118    #[serde(skip_serializing_if = "Option::is_none", default)]
119    #[doc = "Other performance-related settings."]
120    #[doc = ""]
121    pub performance: Option<String>,
122    #[serde(
123        serialize_with = "crate::types::serialize_int_optional",
124        deserialize_with = "crate::types::deserialize_int_optional"
125    )]
126    #[serde(skip_serializing_if = "Option::is_none", default)]
127    #[doc = "Use pigz instead of gzip when N\\\\>0. N=1 uses half of cores, N\\\\>1 uses N as thread count."]
128    #[doc = ""]
129    pub pigz: Option<i64>,
130    #[serde(skip_serializing_if = "Option::is_none", default)]
131    #[doc = "Backup all known guest systems included in the specified pool."]
132    #[doc = ""]
133    pub pool: Option<String>,
134    #[serde(
135        serialize_with = "crate::types::serialize_bool_optional",
136        deserialize_with = "crate::types::deserialize_bool_optional"
137    )]
138    #[serde(skip_serializing_if = "Option::is_none", default)]
139    #[doc = "If true, mark backup(s) as protected."]
140    #[doc = ""]
141    pub protected: Option<bool>,
142    #[serde(rename = "prune-backups")]
143    #[serde(skip_serializing_if = "Option::is_none", default)]
144    #[doc = "Use these retention options instead of those from the storage configuration."]
145    #[doc = ""]
146    pub prune_backups: Option<String>,
147    #[serde(
148        serialize_with = "crate::types::serialize_bool_optional",
149        deserialize_with = "crate::types::deserialize_bool_optional"
150    )]
151    #[serde(skip_serializing_if = "Option::is_none", default)]
152    #[doc = "Be quiet."]
153    #[doc = ""]
154    pub quiet: Option<bool>,
155    #[serde(
156        serialize_with = "crate::types::serialize_bool_optional",
157        deserialize_with = "crate::types::deserialize_bool_optional"
158    )]
159    #[serde(skip_serializing_if = "Option::is_none", default)]
160    #[doc = "Prune older backups according to 'prune-backups'."]
161    #[doc = ""]
162    pub remove: Option<bool>,
163    #[serde(skip_serializing_if = "Option::is_none", default)]
164    #[doc = "Use specified hook script."]
165    #[doc = ""]
166    pub script: Option<String>,
167    #[serde(
168        serialize_with = "crate::types::serialize_bool_optional",
169        deserialize_with = "crate::types::deserialize_bool_optional"
170    )]
171    #[serde(skip_serializing_if = "Option::is_none", default)]
172    #[doc = "Exclude temporary files and logs."]
173    #[doc = ""]
174    pub stdexcludes: Option<bool>,
175    #[serde(
176        serialize_with = "crate::types::serialize_bool_optional",
177        deserialize_with = "crate::types::deserialize_bool_optional"
178    )]
179    #[serde(skip_serializing_if = "Option::is_none", default)]
180    #[doc = "Write tar to stdout, not to a file."]
181    #[doc = ""]
182    pub stdout: Option<bool>,
183    #[serde(
184        serialize_with = "crate::types::serialize_bool_optional",
185        deserialize_with = "crate::types::deserialize_bool_optional"
186    )]
187    #[serde(skip_serializing_if = "Option::is_none", default)]
188    #[doc = "Stop running backup jobs on this host."]
189    #[doc = ""]
190    pub stop: Option<bool>,
191    #[serde(skip_serializing_if = "Option::is_none", default)]
192    #[doc = "Maximal time to wait until a guest system is stopped (minutes)."]
193    #[doc = ""]
194    pub stopwait: Option<StopwaitInt>,
195    #[serde(skip_serializing_if = "Option::is_none", default)]
196    #[doc = "Store resulting file to this storage."]
197    #[doc = ""]
198    pub storage: Option<String>,
199    #[serde(skip_serializing_if = "Option::is_none", default)]
200    #[doc = "Store temporary files to specified directory."]
201    #[doc = ""]
202    pub tmpdir: Option<String>,
203    #[serde(skip_serializing_if = "Option::is_none", default)]
204    #[doc = "The ID of the guest system you want to backup."]
205    #[doc = ""]
206    pub vmid: Option<String>,
207    #[serde(skip_serializing_if = "Option::is_none", default)]
208    #[doc = "Zstd threads. N=0 uses half of the available cores, if N is set to a value bigger than 0, N is used as thread count."]
209    #[doc = ""]
210    pub zstd: Option<ZstdInt>,
211    #[serde(
212        flatten,
213        default,
214        skip_serializing_if = "::std::collections::HashMap::is_empty"
215    )]
216    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
217}
218#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Default)]
219#[doc = "Compress dump file."]
220#[doc = ""]
221pub enum Compress {
222    #[serde(rename = "0")]
223    #[default]
224    _0,
225    #[serde(rename = "1")]
226    _1,
227    #[serde(rename = "gzip")]
228    Gzip,
229    #[serde(rename = "lzo")]
230    Lzo,
231    #[serde(rename = "zstd")]
232    Zstd,
233}
234impl TryFrom<&str> for Compress {
235    type Error = String;
236    fn try_from(value: &str) -> Result<Self, <Self as TryFrom<&str>>::Error> {
237        match value {
238            "0" => Ok(Self::_0),
239            "1" => Ok(Self::_1),
240            "gzip" => Ok(Self::Gzip),
241            "lzo" => Ok(Self::Lzo),
242            "zstd" => Ok(Self::Zstd),
243            v => Err(format!("Unknown variant {v}")),
244        }
245    }
246}
247#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Default)]
248#[doc = "Deprecated: use notification targets/matchers instead. Specify when to send a notification mail"]
249#[doc = ""]
250pub enum Mailnotification {
251    #[serde(rename = "always")]
252    #[default]
253    Always,
254    #[serde(rename = "failure")]
255    Failure,
256}
257impl TryFrom<&str> for Mailnotification {
258    type Error = String;
259    fn try_from(value: &str) -> Result<Self, <Self as TryFrom<&str>>::Error> {
260        match value {
261            "always" => Ok(Self::Always),
262            "failure" => Ok(Self::Failure),
263            v => Err(format!("Unknown variant {v}")),
264        }
265    }
266}
267#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Default)]
268#[doc = "Backup mode."]
269#[doc = ""]
270pub enum Mode {
271    #[serde(rename = "snapshot")]
272    #[default]
273    Snapshot,
274    #[serde(rename = "stop")]
275    Stop,
276    #[serde(rename = "suspend")]
277    Suspend,
278}
279impl TryFrom<&str> for Mode {
280    type Error = String;
281    fn try_from(value: &str) -> Result<Self, <Self as TryFrom<&str>>::Error> {
282        match value {
283            "snapshot" => Ok(Self::Snapshot),
284            "stop" => Ok(Self::Stop),
285            "suspend" => Ok(Self::Suspend),
286            v => Err(format!("Unknown variant {v}")),
287        }
288    }
289}
290#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Default)]
291#[doc = "Determine which notification system to use. If set to 'legacy-sendmail', vzdump will consider the mailto/mailnotification parameters and send emails to the specified address(es) via the 'sendmail' command. If set to 'notification-system', a notification will be sent via PVE's notification system, and the mailto and mailnotification will be ignored. If set to 'auto' (default setting), an email will be sent if mailto is set, and the notification system will be used if not."]
292#[doc = ""]
293pub enum NotificationMode {
294    #[serde(rename = "auto")]
295    #[default]
296    Auto,
297    #[serde(rename = "legacy-sendmail")]
298    LegacySendmail,
299    #[serde(rename = "notification-system")]
300    NotificationSystem,
301}
302impl TryFrom<&str> for NotificationMode {
303    type Error = String;
304    fn try_from(value: &str) -> Result<Self, <Self as TryFrom<&str>>::Error> {
305        match value {
306            "auto" => Ok(Self::Auto),
307            "legacy-sendmail" => Ok(Self::LegacySendmail),
308            "notification-system" => Ok(Self::NotificationSystem),
309            v => Err(format!("Unknown variant {v}")),
310        }
311    }
312}
313#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, PartialEq)]
314#[doc = "PBS mode used to detect file changes and switch encoding format for container backups."]
315#[doc = ""]
316pub enum PbsChangeDetectionMode {
317    #[serde(rename = "data")]
318    Data,
319    #[serde(rename = "legacy")]
320    Legacy,
321    #[serde(rename = "metadata")]
322    Metadata,
323}
324impl TryFrom<&str> for PbsChangeDetectionMode {
325    type Error = String;
326    fn try_from(value: &str) -> Result<Self, <Self as TryFrom<&str>>::Error> {
327        match value {
328            "data" => Ok(Self::Data),
329            "legacy" => Ok(Self::Legacy),
330            "metadata" => Ok(Self::Metadata),
331            v => Err(format!("Unknown variant {v}")),
332        }
333    }
334}
335#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
336pub struct IoniceInt(i128);
337impl crate::types::bounded_integer::BoundedInteger for IoniceInt {
338    const MIN: Option<i128> = Some(0i128);
339    const MAX: Option<i128> = Some(8i128);
340    const DEFAULT: Option<i128> = Some(7i128);
341    const TYPE_DESCRIPTION: &'static str = "an integer between 0 and 8";
342    fn get(&self) -> i128 {
343        self.0
344    }
345    fn new(value: i128) -> Result<Self, crate::types::bounded_integer::BoundedIntegerError> {
346        Self::validate(value)?;
347        Ok(Self(value))
348    }
349}
350impl std::convert::TryFrom<i128> for IoniceInt {
351    type Error = crate::types::bounded_integer::BoundedIntegerError;
352    fn try_from(value: i128) -> Result<Self, Self::Error> {
353        crate::types::bounded_integer::BoundedInteger::new(value)
354    }
355}
356impl ::serde::Serialize for IoniceInt {
357    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
358    where
359        S: ::serde::Serializer,
360    {
361        crate::types::bounded_integer::serialize_bounded_integer(self, serializer)
362    }
363}
364impl<'de> ::serde::Deserialize<'de> for IoniceInt {
365    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
366    where
367        D: ::serde::Deserializer<'de>,
368    {
369        crate::types::bounded_integer::deserialize_bounded_integer(deserializer)
370    }
371}
372#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
373pub struct LockwaitInt(i128);
374impl crate::types::bounded_integer::BoundedInteger for LockwaitInt {
375    const MIN: Option<i128> = Some(0i128);
376    const MAX: Option<i128> = None::<i128>;
377    const DEFAULT: Option<i128> = Some(180i128);
378    const TYPE_DESCRIPTION: &'static str = "an integer greater than or equal to 0";
379    fn get(&self) -> i128 {
380        self.0
381    }
382    fn new(value: i128) -> Result<Self, crate::types::bounded_integer::BoundedIntegerError> {
383        Self::validate(value)?;
384        Ok(Self(value))
385    }
386}
387impl std::convert::TryFrom<i128> for LockwaitInt {
388    type Error = crate::types::bounded_integer::BoundedIntegerError;
389    fn try_from(value: i128) -> Result<Self, Self::Error> {
390        crate::types::bounded_integer::BoundedInteger::new(value)
391    }
392}
393impl ::serde::Serialize for LockwaitInt {
394    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
395    where
396        S: ::serde::Serializer,
397    {
398        crate::types::bounded_integer::serialize_bounded_integer(self, serializer)
399    }
400}
401impl<'de> ::serde::Deserialize<'de> for LockwaitInt {
402    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
403    where
404        D: ::serde::Deserializer<'de>,
405    {
406        crate::types::bounded_integer::deserialize_bounded_integer(deserializer)
407    }
408}
409#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
410pub struct StopwaitInt(i128);
411impl crate::types::bounded_integer::BoundedInteger for StopwaitInt {
412    const MIN: Option<i128> = Some(0i128);
413    const MAX: Option<i128> = None::<i128>;
414    const DEFAULT: Option<i128> = Some(10i128);
415    const TYPE_DESCRIPTION: &'static str = "an integer greater than or equal to 0";
416    fn get(&self) -> i128 {
417        self.0
418    }
419    fn new(value: i128) -> Result<Self, crate::types::bounded_integer::BoundedIntegerError> {
420        Self::validate(value)?;
421        Ok(Self(value))
422    }
423}
424impl std::convert::TryFrom<i128> for StopwaitInt {
425    type Error = crate::types::bounded_integer::BoundedIntegerError;
426    fn try_from(value: i128) -> Result<Self, Self::Error> {
427        crate::types::bounded_integer::BoundedInteger::new(value)
428    }
429}
430impl ::serde::Serialize for StopwaitInt {
431    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
432    where
433        S: ::serde::Serializer,
434    {
435        crate::types::bounded_integer::serialize_bounded_integer(self, serializer)
436    }
437}
438impl<'de> ::serde::Deserialize<'de> for StopwaitInt {
439    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
440    where
441        D: ::serde::Deserializer<'de>,
442    {
443        crate::types::bounded_integer::deserialize_bounded_integer(deserializer)
444    }
445}
446#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
447pub struct ZstdInt(i128);
448impl crate::types::bounded_integer::BoundedInteger for ZstdInt {
449    const MIN: Option<i128> = None::<i128>;
450    const MAX: Option<i128> = None::<i128>;
451    const DEFAULT: Option<i128> = Some(1i128);
452    const TYPE_DESCRIPTION: &'static str = "a valid integer";
453    fn get(&self) -> i128 {
454        self.0
455    }
456    fn new(value: i128) -> Result<Self, crate::types::bounded_integer::BoundedIntegerError> {
457        Self::validate(value)?;
458        Ok(Self(value))
459    }
460}
461impl std::convert::TryFrom<i128> for ZstdInt {
462    type Error = crate::types::bounded_integer::BoundedIntegerError;
463    fn try_from(value: i128) -> Result<Self, Self::Error> {
464        crate::types::bounded_integer::BoundedInteger::new(value)
465    }
466}
467impl ::serde::Serialize for ZstdInt {
468    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
469    where
470        S: ::serde::Serializer,
471    {
472        crate::types::bounded_integer::serialize_bounded_integer(self, serializer)
473    }
474}
475impl<'de> ::serde::Deserialize<'de> for ZstdInt {
476    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
477    where
478        D: ::serde::Deserializer<'de>,
479    {
480        crate::types::bounded_integer::deserialize_bounded_integer(deserializer)
481    }
482}
483#[derive(Debug, Clone, PartialEq, PartialOrd)]
484pub struct JobIdStr {
485    value: String,
486}
487impl crate::types::bounded_string::BoundedString for JobIdStr {
488    const MIN_LENGTH: Option<usize> = None::<usize>;
489    const MAX_LENGTH: Option<usize> = Some(50usize);
490    const DEFAULT: Option<&'static str> = None::<&'static str>;
491    const PATTERN: Option<&'static str> = Some("\\S+");
492    const TYPE_DESCRIPTION: &'static str = "a string with pattern r\"\\S+\" and length at most 50";
493    fn get_value(&self) -> &str {
494        &self.value
495    }
496    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
497        Self::validate(&value)?;
498        Ok(Self { value })
499    }
500}
501impl std::convert::TryFrom<String> for JobIdStr {
502    type Error = crate::types::bounded_string::BoundedStringError;
503    fn try_from(value: String) -> Result<Self, Self::Error> {
504        crate::types::bounded_string::BoundedString::new(value)
505    }
506}
507impl ::serde::Serialize for JobIdStr {
508    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
509    where
510        S: ::serde::Serializer,
511    {
512        crate::types::bounded_string::serialize_bounded_string(self, serializer)
513    }
514}
515impl<'de> ::serde::Deserialize<'de> for JobIdStr {
516    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
517    where
518        D: ::serde::Deserializer<'de>,
519    {
520        crate::types::bounded_string::deserialize_bounded_string(deserializer)
521    }
522}
523#[derive(Debug, Clone, PartialEq, PartialOrd)]
524pub struct NotesTemplateStr {
525    value: String,
526}
527impl crate::types::bounded_string::BoundedString for NotesTemplateStr {
528    const MIN_LENGTH: Option<usize> = None::<usize>;
529    const MAX_LENGTH: Option<usize> = Some(1024usize);
530    const DEFAULT: Option<&'static str> = None::<&'static str>;
531    const PATTERN: Option<&'static str> = None::<&'static str>;
532    const TYPE_DESCRIPTION: &'static str = "a string with length at most 1024";
533    fn get_value(&self) -> &str {
534        &self.value
535    }
536    fn new(value: String) -> Result<Self, crate::types::bounded_string::BoundedStringError> {
537        Self::validate(&value)?;
538        Ok(Self { value })
539    }
540}
541impl std::convert::TryFrom<String> for NotesTemplateStr {
542    type Error = crate::types::bounded_string::BoundedStringError;
543    fn try_from(value: String) -> Result<Self, Self::Error> {
544        crate::types::bounded_string::BoundedString::new(value)
545    }
546}
547impl ::serde::Serialize for NotesTemplateStr {
548    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
549    where
550        S: ::serde::Serializer,
551    {
552        crate::types::bounded_string::serialize_bounded_string(self, serializer)
553    }
554}
555impl<'de> ::serde::Deserialize<'de> for NotesTemplateStr {
556    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
557    where
558        D: ::serde::Deserializer<'de>,
559    {
560        crate::types::bounded_string::deserialize_bounded_string(deserializer)
561    }
562}
563impl<T> VzdumpClient<T>
564where
565    T: crate::client::Client,
566{
567    pub fn defaults(&self) -> defaults::DefaultsClient<T> {
568        defaults::DefaultsClient::<T>::new(self.client.clone(), &self.path)
569    }
570}
571impl<T> VzdumpClient<T>
572where
573    T: crate::client::Client,
574{
575    pub fn extractconfig(&self) -> extractconfig::ExtractconfigClient<T> {
576        extractconfig::ExtractconfigClient::<T>::new(self.client.clone(), &self.path)
577    }
578}