1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Hetzner Cloud API
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 0.28.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// EnableSnapshotPlanRequest : Request for POST https://api.hetzner.com/v1/storage_boxes/{id}/actions/enable_snapshot_plan
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EnableSnapshotPlanRequest {
/// Day of the month when the Snapshot Plan is executed. Null means every day.
#[serde(
rename = "day_of_month",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub day_of_month: Option<Option<i32>>,
/// Day of the week when the Snapshot Plan is executed. Starts at 1 for Monday til 7 for Sunday. Null means every day.
#[serde(
rename = "day_of_week",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub day_of_week: Option<Option<i32>>,
/// Hour when the Snapshot Plan is executed (UTC).
#[serde(rename = "hour")]
pub hour: i32,
/// Maximum amount of Snapshots that will be created by this Snapshot Plan. Older Snapshots will be deleted.
#[serde(rename = "max_snapshots")]
pub max_snapshots: i32,
/// Minute when the Snapshot Plan is executed (UTC).
#[serde(rename = "minute")]
pub minute: i32,
}
impl EnableSnapshotPlanRequest {
/// Request for POST https://api.hetzner.com/v1/storage_boxes/{id}/actions/enable_snapshot_plan
pub fn new(hour: i32, max_snapshots: i32, minute: i32) -> EnableSnapshotPlanRequest {
EnableSnapshotPlanRequest {
day_of_month: None,
day_of_week: None,
hour,
max_snapshots,
minute,
}
}
}