Skip to main content

clientapi_pbs/models/
config_metrics_create_influxdb_http_request.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/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 ConfigMetricsCreateInfluxdbHttpRequest {
16
17    /// InfluxDB Bucket.
18    #[serde(rename = "bucket", skip_serializing_if = "Option::is_none")]
19    pub bucket: Option<String>,
20
21    /// Comment.
22    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
23    pub comment: Option<String>,
24
25    /// Enables or disables the metrics server
26    #[serde(rename = "enable", skip_serializing_if = "Option::is_none")]
27    pub enable: Option<bool>,
28
29    /// The (optional) maximum body size
30    #[serde(rename = "max-body-size", skip_serializing_if = "Option::is_none")]
31    pub max_body_size: Option<i64>,
32
33    /// Metrics Server ID.
34    #[serde(rename = "name")]
35    pub name: String,
36
37    /// InfluxDB Organization.
38    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
39    pub organization: Option<String>,
40
41    /// The (optional) API token
42    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
43    pub token: Option<String>,
44
45    /// HTTP(s) url with optional port.
46    #[serde(rename = "url")]
47    pub url: String,
48
49    /// If true, the certificate will be validated.
50    #[serde(rename = "verify-tls", skip_serializing_if = "Option::is_none")]
51    pub verify_tls: Option<bool>,
52
53
54}
55
56impl ConfigMetricsCreateInfluxdbHttpRequest {
57    pub fn new(name: String, url: String) -> ConfigMetricsCreateInfluxdbHttpRequest {
58        ConfigMetricsCreateInfluxdbHttpRequest {
59            
60            bucket: None,
61            
62            comment: None,
63            
64            enable: None,
65            
66            max_body_size: None,
67            
68            name,
69            
70            organization: None,
71            
72            token: None,
73            
74            url,
75            
76            verify_tls: None,
77            
78        }
79    }
80}
81
82