incus_client/models/image_source.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/// ImageSource : ImageSource represents the source of an image
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ImageSource {
17 /// Source alias to download from
18 #[serde(rename = "alias", skip_serializing_if = "Option::is_none")]
19 pub alias: Option<String>,
20 /// Source server certificate (if not trusted by system CA)
21 #[serde(rename = "certificate", skip_serializing_if = "Option::is_none")]
22 pub certificate: Option<String>,
23 /// Type of image (container or virtual-machine)
24 #[serde(rename = "image_type", skip_serializing_if = "Option::is_none")]
25 pub image_type: Option<String>,
26 /// Source server protocol
27 #[serde(rename = "protocol", skip_serializing_if = "Option::is_none")]
28 pub protocol: Option<String>,
29 /// URL of the source server
30 #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
31 pub server: Option<String>,
32}
33
34impl ImageSource {
35 /// ImageSource represents the source of an image
36 pub fn new() -> ImageSource {
37 ImageSource {
38 alias: None,
39 certificate: None,
40 image_type: None,
41 protocol: None,
42 server: None,
43 }
44 }
45}
46