incus_client/models/image_put.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/// ImagePut : ImagePut represents the modifiable fields of an image
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ImagePut {
17 /// Whether the image should auto-update when a new build is available
18 #[serde(rename = "auto_update", skip_serializing_if = "Option::is_none")]
19 pub auto_update: Option<bool>,
20 /// When the image becomes obsolete
21 #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
22 pub expires_at: Option<chrono::DateTime<chrono::FixedOffset>>,
23 /// List of profiles to use when creating from this image (if none provided by user)
24 #[serde(rename = "profiles", skip_serializing_if = "Option::is_none")]
25 pub profiles: Option<Vec<String>>,
26 /// Descriptive properties
27 #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
28 pub properties: Option<std::collections::HashMap<String, String>>,
29 /// Whether the image is available to unauthenticated users
30 #[serde(rename = "public", skip_serializing_if = "Option::is_none")]
31 pub public: Option<bool>,
32}
33
34impl ImagePut {
35 /// ImagePut represents the modifiable fields of an image
36 pub fn new() -> ImagePut {
37 ImagePut {
38 auto_update: None,
39 expires_at: None,
40 profiles: None,
41 properties: None,
42 public: None,
43 }
44 }
45}
46