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