Skip to main content

incus_client/models/
backup_target.rs

1/*
2 * Incus external REST API
3 *
4 * This is the REST API used by all Incus clients. Internal endpoints aren't included in this documentation.  The Incus API is available over both a local unix+http and remote https API. Authentication for local users relies on group membership and access to the unix socket. For remote users, the default authentication method is TLS client certificates.
5 *
6 * The version of the OpenAPI document: 1.0
7 * Contact: lxc-devel@lists.linuxcontainers.org
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 BackupTarget {
16    /// AccessKey is the S3 API access key
17    #[serde(rename = "access_key", skip_serializing_if = "Option::is_none")]
18    pub access_key: Option<String>,
19    /// BucketName is the name of the S3 bucket.
20    #[serde(rename = "bucket_name", skip_serializing_if = "Option::is_none")]
21    pub bucket_name: Option<String>,
22    /// Path is the target path.
23    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
24    pub path: Option<String>,
25    /// Protocol is the upload protocol.
26    #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")]
27    pub protocol: Option<String>,
28    /// SecretKey is the S3 API access key
29    #[serde(rename = "secret_key", skip_serializing_if = "Option::is_none")]
30    pub secret_key: Option<String>,
31    /// URL is the HTTPS URL for the backup
32    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
33    pub url: Option<String>,
34}
35
36impl BackupTarget {
37    pub fn new() -> BackupTarget {
38        BackupTarget {
39            access_key: None,
40            bucket_name: None,
41            path: None,
42            protocol: None,
43            secret_key: None,
44            url: None,
45        }
46    }
47}
48