1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#[cfg(feature = "api")]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct WatchOptional<'a> {
pub allow_watch_bookmarks: Option<bool>,
pub field_selector: Option<&'a str>,
pub label_selector: Option<&'a str>,
pub pretty: Option<&'a str>,
pub resource_version: Option<&'a str>,
pub timeout_seconds: Option<i64>,
}
#[cfg(feature = "api")]
impl<'a> WatchOptional<'a> {
#[doc(hidden)]
pub fn __serialize<T>(
self,
__query_pairs: &mut crate::url::form_urlencoded::Serializer<'_, T>,
) where T: crate::url::form_urlencoded::Target {
if let Some(value) = &self.allow_watch_bookmarks {
__query_pairs.append_pair("allowWatchBookmarks", &value.to_string());
}
if let Some(value) = &self.field_selector {
__query_pairs.append_pair("fieldSelector", value);
}
if let Some(value) = &self.label_selector {
__query_pairs.append_pair("labelSelector", value);
}
if let Some(value) = &self.pretty {
__query_pairs.append_pair("pretty", value);
}
if let Some(value) = &self.resource_version {
__query_pairs.append_pair("resourceVersion", value);
}
if let Some(value) = &self.timeout_seconds {
__query_pairs.append_pair("timeoutSeconds", &value.to_string());
}
__query_pairs.append_pair("watch", "true");
}
}