Skip to main content

clientapi_pbs/models/
config_s3_create_s3_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 ConfigS3CreateS3Request {
16
17    /// Access key for S3 object store.
18    #[serde(rename = "access-key")]
19    pub access_key: String,
20
21    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
22    #[serde(rename = "burst-in", skip_serializing_if = "Option::is_none")]
23    pub burst_in: Option<String>,
24
25    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
26    #[serde(rename = "burst-out", skip_serializing_if = "Option::is_none")]
27    pub burst_out: Option<String>,
28
29    /// Endpoint to access S3 object store.
30    #[serde(rename = "endpoint")]
31    pub endpoint: String,
32
33    /// X509 certificate fingerprint (sha256).
34    #[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")]
35    pub fingerprint: Option<String>,
36
37    /// ID to uniquely identify s3 client config.
38    #[serde(rename = "id")]
39    pub id: String,
40
41    /// Use path style bucket addressing over vhost style.
42    #[serde(rename = "path-style", skip_serializing_if = "Option::is_none")]
43    pub path_style: Option<bool>,
44
45    /// Port to access S3 object store.
46    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
47    pub port: Option<i64>,
48
49    /// List of provider specific feature implementation quirks.
50    #[serde(rename = "provider-quirks", skip_serializing_if = "Option::is_none")]
51    pub provider_quirks: Option<Vec<models::PbsProviderQuirksEnum>>,
52
53    /// Rate limit for put requests given as #request/s.
54    #[serde(rename = "put-rate-limit", skip_serializing_if = "Option::is_none")]
55    pub put_rate_limit: Option<i64>,
56
57    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
58    #[serde(rename = "rate-in", skip_serializing_if = "Option::is_none")]
59    pub rate_in: Option<String>,
60
61    /// Byte size with optional unit (B, KB (base 10), MB, GB, ..., KiB (base 2), MiB, Gib, ...).
62    #[serde(rename = "rate-out", skip_serializing_if = "Option::is_none")]
63    pub rate_out: Option<String>,
64
65    /// Region to access S3 object store.
66    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
67    pub region: Option<String>,
68
69    /// S3 secret key
70    #[serde(rename = "secret-key")]
71    pub secret_key: String,
72
73
74}
75
76impl ConfigS3CreateS3Request {
77    pub fn new(access_key: String, endpoint: String, id: String, secret_key: String) -> ConfigS3CreateS3Request {
78        ConfigS3CreateS3Request {
79            
80            access_key,
81            
82            burst_in: None,
83            
84            burst_out: None,
85            
86            endpoint,
87            
88            fingerprint: None,
89            
90            id,
91            
92            path_style: None,
93            
94            port: None,
95            
96            provider_quirks: None,
97            
98            put_rate_limit: None,
99            
100            rate_in: None,
101            
102            rate_out: None,
103            
104            region: None,
105            
106            secret_key,
107            
108        }
109    }
110}
111
112