cloud_hypervisor_client/models/timeout_strategy.rs
1/*
2 * Cloud Hypervisor API
3 *
4 * Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine.
5 *
6 * The version of the OpenAPI document: 0.3.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TimeoutStrategy : The strategy to apply when the migration timeout is reached. Cancel will abort the migration and keep the VM running on the source. Ignore will proceed with the migration regardless of the downtime requirement.
15/// The strategy to apply when the migration timeout is reached. Cancel will abort the migration and keep the VM running on the source. Ignore will proceed with the migration regardless of the downtime requirement.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum TimeoutStrategy {
18 #[serde(rename = "Cancel")]
19 Cancel,
20 #[serde(rename = "Ignore")]
21 Ignore,
22}
23
24impl std::fmt::Display for TimeoutStrategy {
25 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
26 match self {
27 Self::Cancel => write!(f, "Cancel"),
28 Self::Ignore => write!(f, "Ignore"),
29 }
30 }
31}
32
33impl Default for TimeoutStrategy {
34 fn default() -> TimeoutStrategy {
35 Self::Cancel
36 }
37}