clientapi-pve 2026.5.24

Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
Documentation
/*
 * Proxmox Virtual Environment API
 *
 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
 *
 * The version of the OpenAPI document: 9.x
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClusterMetricsCreateServerRequest {

    /// An API path prefix inserted between '<host>:<port>/' and '/api2/'. Can be useful if the InfluxDB service runs behind a reverse proxy.
    #[serde(rename = "api-path-prefix", skip_serializing_if = "Option::is_none")]
    pub api_path_prefix: Option<String>,

    /// The InfluxDB bucket/db. Only necessary when using the http v2 api.
    #[serde(rename = "bucket", skip_serializing_if = "Option::is_none")]
    pub bucket: Option<String>,

    /// Flag to disable the plugin.
    #[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
    pub disable: Option<models::PveBoolean>,

    #[serde(rename = "influxdbproto", skip_serializing_if = "Option::is_none")]
    pub influxdbproto: Option<models::PveInfluxdbprotoEnum>,

    /// InfluxDB max-body-size in bytes. Requests are batched up to this size.
    #[serde(rename = "max-body-size", skip_serializing_if = "Option::is_none")]
    pub max_body_size: Option<i64>,

    /// MTU for metrics transmission over UDP
    #[serde(rename = "mtu", skip_serializing_if = "Option::is_none")]
    pub mtu: Option<i32>,

    /// The InfluxDB organization. Only necessary when using the http v2 api. Has no meaning when using v2 compatibility api.
    #[serde(rename = "organization", skip_serializing_if = "Option::is_none")]
    pub organization: Option<String>,

    /// Compression algorithm for requests
    #[serde(rename = "otel-compression", skip_serializing_if = "Option::is_none")]
    pub otel_compression: Option<models::PveOtelCompressionEnum>,

    /// Custom HTTP headers (JSON format, base64 encoded)
    #[serde(rename = "otel-headers", skip_serializing_if = "Option::is_none")]
    pub otel_headers: Option<String>,

    /// Maximum request body size in bytes
    #[serde(rename = "otel-max-body-size", skip_serializing_if = "Option::is_none")]
    pub otel_max_body_size: Option<i64>,

    /// OTLP endpoint path
    #[serde(rename = "otel-path", skip_serializing_if = "Option::is_none")]
    pub otel_path: Option<String>,

    /// HTTP protocol
    #[serde(rename = "otel-protocol", skip_serializing_if = "Option::is_none")]
    pub otel_protocol: Option<models::PveOtelProtocolEnum>,

    /// Additional resource attributes as JSON, base64 encoded
    #[serde(rename = "otel-resource-attributes", skip_serializing_if = "Option::is_none")]
    pub otel_resource_attributes: Option<String>,

    /// HTTP request timeout in seconds
    #[serde(rename = "otel-timeout", skip_serializing_if = "Option::is_none")]
    pub otel_timeout: Option<i32>,

    /// Verify SSL certificates
    #[serde(rename = "otel-verify-ssl", skip_serializing_if = "Option::is_none")]
    pub otel_verify_ssl: Option<models::PveBoolean>,

    /// root graphite path (ex: proxmox.mycluster.mykey)
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,

    /// server network port
    #[serde(rename = "port")]
    pub port: i32,

    /// Protocol to send graphite data. TCP or UDP (default)
    #[serde(rename = "proto", skip_serializing_if = "Option::is_none")]
    pub proto: Option<models::PveProtoEnum>,

    /// server dns name or IP address
    #[serde(rename = "server")]
    pub server: String,

    /// graphite TCP socket timeout (default=1)
    #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
    pub timeout: Option<i64>,

    /// The InfluxDB access token. Only necessary when using the http v2 api. If the v2 compatibility api is used, use 'user:password' instead.
    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
    pub token: Option<String>,

    /// Plugin type.
    #[serde(rename = "type")]
    pub r#type: models::PveClusterMetricsTypeEnum2,

    /// Set to 0 to disable certificate verification for https endpoints.
    #[serde(rename = "verify-certificate", skip_serializing_if = "Option::is_none")]
    pub verify_certificate: Option<models::PveBoolean>,


}

impl ClusterMetricsCreateServerRequest {
    pub fn new(port: i32, server: String, r#type: models::PveClusterMetricsTypeEnum2) -> ClusterMetricsCreateServerRequest {
        ClusterMetricsCreateServerRequest {
            
            api_path_prefix: None,
            
            bucket: None,
            
            disable: None,
            
            influxdbproto: None,
            
            max_body_size: None,
            
            mtu: None,
            
            organization: None,
            
            otel_compression: None,
            
            otel_headers: None,
            
            otel_max_body_size: None,
            
            otel_path: None,
            
            otel_protocol: None,
            
            otel_resource_attributes: None,
            
            otel_timeout: None,
            
            otel_verify_ssl: None,
            
            path: None,
            
            port,
            
            proto: None,
            
            server,
            
            timeout: None,
            
            token: None,
            
            r#type,
            
            verify_certificate: None,
            
        }
    }
}