gitbundle_sdk/models/
commit_files_input.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CommitFilesInput {
17 #[serde(rename = "actions")]
18 pub actions: Vec<models::RepoCommitFileAction>,
19 #[serde(rename = "branch")]
20 pub branch: String,
21 #[serde(rename = "bypass_rules", skip_serializing_if = "Option::is_none")]
22 pub bypass_rules: Option<bool>,
23 #[serde(rename = "dry_run_rules", skip_serializing_if = "Option::is_none")]
24 pub dry_run_rules: Option<bool>,
25 #[serde(rename = "message")]
26 pub message: String,
27 #[serde(rename = "new_branch")]
28 pub new_branch: String,
29 #[serde(rename = "title")]
30 pub title: String,
31}
32
33impl CommitFilesInput {
34 pub fn new(
35 actions: Vec<models::RepoCommitFileAction>,
36 branch: String,
37 message: String,
38 new_branch: String,
39 title: String,
40 ) -> CommitFilesInput {
41 CommitFilesInput {
42 actions,
43 branch,
44 bypass_rules: None,
45 dry_run_rules: None,
46 message,
47 new_branch,
48 title,
49 }
50 }
51}