Skip to main content

clientapi_pve/models/
cluster_notifications_create_webhook_endpoint_request.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ClusterNotificationsCreateWebhookEndpointRequest {
16
17    /// HTTP body, base64 encoded
18    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
19    pub body: Option<String>,
20
21    /// Comment
22    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
23    pub comment: Option<String>,
24
25    /// Disable this target
26    #[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
27    pub disable: Option<models::PveBoolean>,
28
29    /// HTTP headers to set. These have to be formatted as a property string in the format name=<name>,value=<base64 of value>
30    #[serde(rename = "header", skip_serializing_if = "Option::is_none")]
31    pub header: Option<Vec<String>>,
32
33    /// HTTP method
34    #[serde(rename = "method")]
35    pub method: models::PveMethodEnum,
36
37    /// The name of the endpoint.
38    #[serde(rename = "name")]
39    pub name: String,
40
41    /// Secrets to set. These have to be formatted as a property string in the format name=<name>,value=<base64 of value>
42    #[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
43    pub secret: Option<Vec<String>>,
44
45    /// Server URL
46    #[serde(rename = "url")]
47    pub url: String,
48
49
50}
51
52impl ClusterNotificationsCreateWebhookEndpointRequest {
53    pub fn new(method: models::PveMethodEnum, name: String, url: String) -> ClusterNotificationsCreateWebhookEndpointRequest {
54        ClusterNotificationsCreateWebhookEndpointRequest {
55            
56            body: None,
57            
58            comment: None,
59            
60            disable: None,
61            
62            header: None,
63            
64            method,
65            
66            name,
67            
68            secret: None,
69            
70            url,
71            
72        }
73    }
74}
75
76