Skip to main content

clientapi_pbs/models/
config_remote_create_remote_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 ConfigRemoteCreateRemoteRequest {
16
17    /// Authentication ID
18    #[serde(rename = "auth-id")]
19    pub auth_id: String,
20
21    /// Comment.
22    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
23    pub comment: Option<String>,
24
25    /// X509 certificate fingerprint (sha256).
26    #[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")]
27    pub fingerprint: Option<String>,
28
29    /// DNS name or IP address.
30    #[serde(rename = "host")]
31    pub host: String,
32
33    /// Remote ID.
34    #[serde(rename = "name")]
35    pub name: String,
36
37    /// Password or auth token for remote host.
38    #[serde(rename = "password")]
39    pub password: String,
40
41    /// The (optional) port
42    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
43    pub port: Option<i64>,
44
45    /// Use the http proxy configuration of the node for remote connections.
46    #[serde(rename = "use-node-proxy", skip_serializing_if = "Option::is_none")]
47    pub use_node_proxy: Option<bool>,
48
49
50}
51
52impl ConfigRemoteCreateRemoteRequest {
53    pub fn new(auth_id: String, host: String, name: String, password: String) -> ConfigRemoteCreateRemoteRequest {
54        ConfigRemoteCreateRemoteRequest {
55            
56            auth_id,
57            
58            comment: None,
59            
60            fingerprint: None,
61            
62            host,
63            
64            name,
65            
66            password,
67            
68            port: None,
69            
70            use_node_proxy: None,
71            
72        }
73    }
74}
75
76