tembo_api_client/models/
volume_mount.rs1use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct VolumeMount {
15 #[serde(rename = "mount_path")]
16 pub mount_path: Option<String>,
17 #[serde(
18 rename = "mount_propagation",
19 default,
20 with = "::serde_with::rust::double_option",
21 skip_serializing_if = "Option::is_none"
22 )]
23 pub mount_propagation: Option<Option<String>>,
24 #[serde(rename = "name")]
25 pub name: String,
26 #[serde(
27 rename = "read_only",
28 default,
29 with = "::serde_with::rust::double_option",
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub read_only: Option<Option<bool>>,
33 #[serde(
34 rename = "sub_path",
35 default,
36 with = "::serde_with::rust::double_option",
37 skip_serializing_if = "Option::is_none"
38 )]
39 pub sub_path: Option<Option<String>>,
40 #[serde(
41 rename = "sub_path_expr",
42 default,
43 with = "::serde_with::rust::double_option",
44 skip_serializing_if = "Option::is_none"
45 )]
46 pub sub_path_expr: Option<Option<String>>,
47}
48
49impl VolumeMount {
50 pub fn new(mount_path: String, name: String) -> VolumeMount {
51 VolumeMount {
52 mount_path: Some(mount_path),
53 mount_propagation: None,
54 name,
55 read_only: None,
56 sub_path: None,
57 sub_path_expr: None,
58 }
59 }
60}