proxmox_api/generated/nodes/node/certificates/acme/
certificate.rs1pub struct CertificateClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> CertificateClient<T>
6where
7 T: crate::client::Client,
8{
9 pub fn new(client: T, parent_path: &str) -> Self {
10 Self {
11 client,
12 path: format!("{}{}", parent_path, "/certificate"),
13 }
14 }
15}
16impl<T> CertificateClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Revoke existing certificate from 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> CertificateClient<T>
27where
28 T: crate::client::Client,
29{
30 #[doc = "Order a new certificate from ACME-compatible CA."]
31 pub fn post(&self, params: PostParams) -> Result<String, T::Error> {
32 let path = self.path.to_string();
33 self.client.post(&path, ¶ms)
34 }
35}
36impl<T> CertificateClient<T>
37where
38 T: crate::client::Client,
39{
40 #[doc = "Renew existing certificate from CA."]
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 PostParams {
48 #[serde(
49 serialize_with = "crate::types::serialize_bool_optional",
50 deserialize_with = "crate::types::deserialize_bool_optional"
51 )]
52 #[serde(skip_serializing_if = "Option::is_none", default)]
53 #[doc = "Overwrite existing custom certificate."]
54 pub force: Option<bool>,
55 #[serde(
56 flatten,
57 default,
58 skip_serializing_if = "::std::collections::HashMap::is_empty"
59 )]
60 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
61}
62#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
63pub struct PutParams {
64 #[serde(
65 serialize_with = "crate::types::serialize_bool_optional",
66 deserialize_with = "crate::types::deserialize_bool_optional"
67 )]
68 #[serde(skip_serializing_if = "Option::is_none", default)]
69 #[doc = "Force renewal even if expiry is more than 30 days away."]
70 pub force: Option<bool>,
71 #[serde(
72 flatten,
73 default,
74 skip_serializing_if = "::std::collections::HashMap::is_empty"
75 )]
76 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
77}