proxmox_api/generated/cluster/acme/account/
name.rs1pub struct NameClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> NameClient<T>
6where
7 T: crate::client::Client,
8{
9 pub fn new(client: T, parent_path: &str, name: &str) -> Self {
10 Self {
11 client,
12 path: format!("{}/{}", parent_path, name),
13 }
14 }
15}
16impl<T> NameClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Deactivate existing ACME account at CA."]
21 pub fn delete(&self) -> Result<String, T::Error> {
22 let path = self.path.to_string();
23 self.client.delete(&path, &())
24 }
25}
26impl<T> NameClient<T>
27where
28 T: crate::client::Client,
29{
30 #[doc = "Return existing ACME account information."]
31 pub fn get(&self) -> Result<GetOutput, T::Error> {
32 let path = self.path.to_string();
33 self.client.get(&path, &())
34 }
35}
36impl<T> NameClient<T>
37where
38 T: crate::client::Client,
39{
40 #[doc = "Update existing ACME account information with CA. Note: not specifying any new account information triggers a refresh."]
41 pub fn put(&self, params: PutParams) -> Result<String, T::Error> {
42 let path = self.path.to_string();
43 self.client.put(&path, ¶ms)
44 }
45}
46#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
47pub struct AccountGetOutputAccount {
48 #[serde(
49 flatten,
50 default,
51 skip_serializing_if = "::std::collections::HashMap::is_empty"
52 )]
53 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
54}
55#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
56pub struct GetOutput {
57 #[serde(skip_serializing_if = "Option::is_none", default)]
58 pub account: Option<AccountGetOutputAccount>,
59 #[serde(skip_serializing_if = "Option::is_none", default)]
60 #[doc = "URL of ACME CA directory endpoint."]
61 pub directory: Option<String>,
62 #[serde(skip_serializing_if = "Option::is_none", default)]
63 pub location: Option<String>,
64 #[serde(skip_serializing_if = "Option::is_none", default)]
65 pub tos: Option<String>,
66}
67#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
68pub struct PutParams {
69 #[serde(skip_serializing_if = "Option::is_none", default)]
70 #[doc = "Contact email addresses."]
71 pub contact: Option<String>,
72 #[serde(
73 flatten,
74 default,
75 skip_serializing_if = "::std::collections::HashMap::is_empty"
76 )]
77 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
78}