CommonLibrary/SourceControlManagement/DTO/SourceControlUpdateDTO.rs
1//! # SourceControlUpdateDTO
2//!
3//! Defines a generic DTO for updating properties of an SourceControlManagement
4//! provider.
5
6use serde::{Deserialize, Serialize};
7
8/// A serializable struct used to send updates for a source control provider's
9/// top-level properties, such as the commit message in the input box or the
10/// badge count.
11#[derive(Serialize, Deserialize, Debug, Clone)]
12#[serde(rename_all = "camelCase")]
13pub struct SourceControlUpdateDTO {
14 /// The handle of the provider to update. Optional: callers that pass the
15 /// handle as a positional argument (SCM.rs effect) may omit this field.
16 #[serde(skip_serializing_if = "Option::is_none")]
17 pub ProviderHandle:Option<u32>,
18
19 /// The new value for the commit message input box.
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub InputBoxValue:Option<String>,
22
23 /// The new placeholder text for the commit message input box.
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub InputBoxPlaceholder:Option<String>,
26
27 /// The commit template string shown as placeholder when the input is empty.
28 #[serde(skip_serializing_if = "Option::is_none")]
29 pub CommitTemplate:Option<String>,
30
31 /// The command executed when the user accepts the input (e.g. presses
32 /// Enter).
33 #[serde(skip_serializing_if = "Option::is_none")]
34 pub AcceptInputCommand:Option<serde_json::Value>,
35
36 /// The new count to display as a badge on the SourceControlManagement icon.
37 #[serde(skip_serializing_if = "Option::is_none")]
38 pub Count:Option<u32>,
39}