Skip to main content

clientapi_pve/models/
cluster_notifications_get_webhook_endpoints_response_data_inner.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 ClusterNotificationsGetWebhookEndpointsResponseDataInner {
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    /// Show if this entry was created by a user or was built-in
42    #[serde(rename = "origin")]
43    pub origin: models::PveOriginEnum,
44
45    /// Secrets to set. These have to be formatted as a property string in the format name=<name>,value=<base64 of value>
46    #[serde(rename = "secret", skip_serializing_if = "Option::is_none")]
47    pub secret: Option<Vec<String>>,
48
49    /// Server URL
50    #[serde(rename = "url")]
51    pub url: String,
52
53
54}
55
56impl ClusterNotificationsGetWebhookEndpointsResponseDataInner {
57    pub fn new(method: models::PveMethodEnum, name: String, origin: models::PveOriginEnum, url: String) -> ClusterNotificationsGetWebhookEndpointsResponseDataInner {
58        ClusterNotificationsGetWebhookEndpointsResponseDataInner {
59            
60            body: None,
61            
62            comment: None,
63            
64            disable: None,
65            
66            header: None,
67            
68            method,
69            
70            name,
71            
72            origin,
73            
74            secret: None,
75            
76            url,
77            
78        }
79    }
80}
81
82