netbox_openapi/models/
patched_script_input_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct PatchedScriptInputRequest {
13 #[serde(
14 rename = "data",
15 default,
16 with = "::serde_with::rust::double_option",
17 skip_serializing_if = "Option::is_none"
18 )]
19 pub data: Option<Option<serde_json::Value>>,
20 #[serde(rename = "commit", skip_serializing_if = "Option::is_none")]
21 pub commit: Option<bool>,
22 #[serde(
23 rename = "schedule_at",
24 default,
25 with = "::serde_with::rust::double_option",
26 skip_serializing_if = "Option::is_none"
27 )]
28 pub schedule_at: Option<Option<String>>,
29 #[serde(
30 rename = "interval",
31 default,
32 with = "::serde_with::rust::double_option",
33 skip_serializing_if = "Option::is_none"
34 )]
35 pub interval: Option<Option<i32>>,
36 #[serde(rename = "notifications", skip_serializing_if = "Option::is_none")]
38 pub notifications: Option<Notifications>,
39}
40
41impl PatchedScriptInputRequest {
42 pub fn new() -> PatchedScriptInputRequest {
43 PatchedScriptInputRequest {
44 data: None,
45 commit: None,
46 schedule_at: None,
47 interval: None,
48 notifications: None,
49 }
50 }
51}
52
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
55pub enum Notifications {
56 #[serde(rename = "always")]
57 Always,
58 #[serde(rename = "on_failure")]
59 OnFailure,
60 #[serde(rename = "never")]
61 Never,
62}
63
64impl Default for Notifications {
65 fn default() -> Notifications {
66 Self::Always
67 }
68}