netbox_openapi/models/
script_input_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct ScriptInputRequest {
13 #[serde(rename = "data", deserialize_with = "Option::deserialize")]
14 pub data: Option<serde_json::Value>,
15 #[serde(rename = "commit")]
16 pub commit: bool,
17 #[serde(
18 rename = "schedule_at",
19 default,
20 with = "::serde_with::rust::double_option",
21 skip_serializing_if = "Option::is_none"
22 )]
23 pub schedule_at: Option<Option<String>>,
24 #[serde(
25 rename = "interval",
26 default,
27 with = "::serde_with::rust::double_option",
28 skip_serializing_if = "Option::is_none"
29 )]
30 pub interval: Option<Option<i32>>,
31}
32
33impl ScriptInputRequest {
34 pub fn new(data: Option<serde_json::Value>, commit: bool) -> ScriptInputRequest {
35 ScriptInputRequest {
36 data,
37 commit,
38 schedule_at: None,
39 interval: None,
40 }
41 }
42}