proxmox_api/generated/nodes/node/
apt.rs1pub mod changelog;
2pub mod repositories;
3pub mod update;
4pub mod versions;
5pub struct AptClient<T> {
6 client: T,
7 path: String,
8}
9impl<T> AptClient<T>
10where
11 T: crate::client::Client,
12{
13 pub fn new(client: T, parent_path: &str) -> Self {
14 Self {
15 client,
16 path: format!("{}{}", parent_path, "/apt"),
17 }
18 }
19}
20impl<T> AptClient<T>
21where
22 T: crate::client::Client,
23{
24 #[doc = "Directory index for apt (Advanced Package Tool)."]
25 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
26 let path = self.path.to_string();
27 self.client.get(&path, &())
28 }
29}
30impl GetOutputItems {
31 pub fn new(id: String) -> Self {
32 Self {
33 id,
34 additional_properties: Default::default(),
35 }
36 }
37}
38#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
39pub struct GetOutputItems {
40 pub id: String,
41 #[serde(
42 flatten,
43 default,
44 skip_serializing_if = "::std::collections::HashMap::is_empty"
45 )]
46 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
47}
48impl<T> AptClient<T>
49where
50 T: crate::client::Client,
51{
52 pub fn update(&self) -> update::UpdateClient<T> {
53 update::UpdateClient::<T>::new(self.client.clone(), &self.path)
54 }
55}
56impl<T> AptClient<T>
57where
58 T: crate::client::Client,
59{
60 pub fn changelog(&self) -> changelog::ChangelogClient<T> {
61 changelog::ChangelogClient::<T>::new(self.client.clone(), &self.path)
62 }
63}
64impl<T> AptClient<T>
65where
66 T: crate::client::Client,
67{
68 pub fn repositories(&self) -> repositories::RepositoriesClient<T> {
69 repositories::RepositoriesClient::<T>::new(self.client.clone(), &self.path)
70 }
71}
72impl<T> AptClient<T>
73where
74 T: crate::client::Client,
75{
76 pub fn versions(&self) -> versions::VersionsClient<T> {
77 versions::VersionsClient::<T>::new(self.client.clone(), &self.path)
78 }
79}