incus_client/models/instance_state_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct InstanceStatePut {
16 /// State change action (start, stop, restart, freeze, unfreeze)
17 #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
18 pub action: Option<String>,
19 /// Whether to force the action (for stop and restart)
20 #[serde(rename = "force", skip_serializing_if = "Option::is_none")]
21 pub force: Option<bool>,
22 /// Whether to store the runtime state (for stop)
23 #[serde(rename = "stateful", skip_serializing_if = "Option::is_none")]
24 pub stateful: Option<bool>,
25 /// How long to wait (in s) before giving up (when force isn't set)
26 #[serde(rename = "timeout", skip_serializing_if = "Option::is_none")]
27 pub timeout: Option<i64>,
28}
29
30impl InstanceStatePut {
31 pub fn new() -> InstanceStatePut {
32 InstanceStatePut {
33 action: None,
34 force: None,
35 stateful: None,
36 timeout: None,
37 }
38 }
39}
40