Skip to main content

clientapi_pve/models/
cluster_metrics_create_server_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 ClusterMetricsCreateServerRequest {
16
17    /// An API path prefix inserted between '<host>:<port>/' and '/api2/'. Can be useful if the InfluxDB service runs behind a reverse proxy.
18    #[serde(rename = "api-path-prefix", skip_serializing_if = "Option::is_none")]
19    pub api_path_prefix: Option<String>,
20
21    /// The InfluxDB bucket/db. Only necessary when using the http v2 api.
22    #[serde(rename = "bucket", skip_serializing_if = "Option::is_none")]
23    pub bucket: Option<String>,
24
25    /// Flag to disable the plugin.
26    #[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
27    pub disable: Option<models::PveBoolean>,
28
29    #[serde(rename = "influxdbproto", skip_serializing_if = "Option::is_none")]
30    pub influxdbproto: Option<models::PveInfluxdbprotoEnum>,
31
32    /// InfluxDB max-body-size in bytes. Requests are batched up to this size.
33    #[serde(rename = "max-body-size", skip_serializing_if = "Option::is_none")]
34    pub max_body_size: Option<i64>,
35
36    /// MTU for metrics transmission over UDP
37    #[serde(rename = "mtu", skip_serializing_if = "Option::is_none")]
38    pub mtu: Option<i32>,
39
40    /// The InfluxDB organization. Only necessary when using the http v2 api. Has no meaning when using v2 compatibility api.
41    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
42    pub organization: Option<String>,
43
44    /// Compression algorithm for requests
45    #[serde(rename = "otel-compression", skip_serializing_if = "Option::is_none")]
46    pub otel_compression: Option<models::PveOtelCompressionEnum>,
47
48    /// Custom HTTP headers (JSON format, base64 encoded)
49    #[serde(rename = "otel-headers", skip_serializing_if = "Option::is_none")]
50    pub otel_headers: Option<String>,
51
52    /// Maximum request body size in bytes
53    #[serde(rename = "otel-max-body-size", skip_serializing_if = "Option::is_none")]
54    pub otel_max_body_size: Option<i64>,
55
56    /// OTLP endpoint path
57    #[serde(rename = "otel-path", skip_serializing_if = "Option::is_none")]
58    pub otel_path: Option<String>,
59
60    /// HTTP protocol
61    #[serde(rename = "otel-protocol", skip_serializing_if = "Option::is_none")]
62    pub otel_protocol: Option<models::PveOtelProtocolEnum>,
63
64    /// Additional resource attributes as JSON, base64 encoded
65    #[serde(rename = "otel-resource-attributes", skip_serializing_if = "Option::is_none")]
66    pub otel_resource_attributes: Option<String>,
67
68    /// HTTP request timeout in seconds
69    #[serde(rename = "otel-timeout", skip_serializing_if = "Option::is_none")]
70    pub otel_timeout: Option<i32>,
71
72    /// Verify SSL certificates
73    #[serde(rename = "otel-verify-ssl", skip_serializing_if = "Option::is_none")]
74    pub otel_verify_ssl: Option<models::PveBoolean>,
75
76    /// root graphite path (ex: proxmox.mycluster.mykey)
77    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
78    pub path: Option<String>,
79
80    /// server network port
81    #[serde(rename = "port")]
82    pub port: i32,
83
84    /// Protocol to send graphite data. TCP or UDP (default)
85    #[serde(rename = "proto", skip_serializing_if = "Option::is_none")]
86    pub proto: Option<models::PveProtoEnum>,
87
88    /// server dns name or IP address
89    #[serde(rename = "server")]
90    pub server: String,
91
92    /// graphite TCP socket timeout (default=1)
93    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
94    pub timeout: Option<i64>,
95
96    /// The InfluxDB access token. Only necessary when using the http v2 api. If the v2 compatibility api is used, use 'user:password' instead.
97    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
98    pub token: Option<String>,
99
100    /// Plugin type.
101    #[serde(rename = "type")]
102    pub r#type: models::PveClusterMetricsTypeEnum2,
103
104    /// Set to 0 to disable certificate verification for https endpoints.
105    #[serde(rename = "verify-certificate", skip_serializing_if = "Option::is_none")]
106    pub verify_certificate: Option<models::PveBoolean>,
107
108
109}
110
111impl ClusterMetricsCreateServerRequest {
112    pub fn new(port: i32, server: String, r#type: models::PveClusterMetricsTypeEnum2) -> ClusterMetricsCreateServerRequest {
113        ClusterMetricsCreateServerRequest {
114            
115            api_path_prefix: None,
116            
117            bucket: None,
118            
119            disable: None,
120            
121            influxdbproto: None,
122            
123            max_body_size: None,
124            
125            mtu: None,
126            
127            organization: None,
128            
129            otel_compression: None,
130            
131            otel_headers: None,
132            
133            otel_max_body_size: None,
134            
135            otel_path: None,
136            
137            otel_protocol: None,
138            
139            otel_resource_attributes: None,
140            
141            otel_timeout: None,
142            
143            otel_verify_ssl: None,
144            
145            path: None,
146            
147            port,
148            
149            proto: None,
150            
151            server,
152            
153            timeout: None,
154            
155            token: None,
156            
157            r#type,
158            
159            verify_certificate: None,
160            
161        }
162    }
163}
164
165