gitbundle_sdk/models/
path_rename_details.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PathRenameDetails {
17 #[serde(rename = "commit_sha_after", skip_serializing_if = "Option::is_none")]
18 pub commit_sha_after: Option<String>,
19 #[serde(rename = "commit_sha_before", skip_serializing_if = "Option::is_none")]
20 pub commit_sha_before: Option<String>,
21 #[serde(rename = "old_path")]
22 pub old_path: String,
23 #[serde(rename = "path")]
24 pub path: String,
25}
26
27impl PathRenameDetails {
28 pub fn new(old_path: String, path: String) -> PathRenameDetails {
29 PathRenameDetails {
30 commit_sha_after: None,
31 commit_sha_before: None,
32 old_path,
33 path,
34 }
35 }
36}