1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use serde::{Deserialize, Serialize};
use std::borrow::Cow;
use typed_builder::TypedBuilder;
#[derive(Debug, Clone, Serialize, Deserialize, TypedBuilder)]
#[serde(rename_all = "camelCase")]
#[builder(doc, field_defaults(setter(into)))]
pub struct OpenCreatedItem {
key: Cow<'static, str>,
value: Cow<'static, str>,
#[builder(default, setter(strip_option))]
comment: Option<Cow<'static, str>>,
data_change_created_by: Cow<'static, str>,
}
#[derive(Debug, Clone, Serialize, Deserialize, TypedBuilder)]
#[serde(rename_all = "camelCase")]
#[builder(doc, field_defaults(setter(into)))]
pub struct OpenUpdateItem {
key: Cow<'static, str>,
value: Cow<'static, str>,
#[builder(default, setter(strip_option))]
comment: Option<Cow<'static, str>>,
#[builder(default, setter(strip_option))]
data_change_created_by: Option<Cow<'static, str>>,
data_change_last_modified_by: Cow<'static, str>,
}
impl OpenUpdateItem {
pub(crate) fn key(&self) -> &str {
&self.key
}
}
#[derive(Debug, Clone, Serialize, Deserialize, TypedBuilder)]
#[serde(rename_all = "camelCase")]
#[builder(doc, field_defaults(setter(into)))]
pub struct OpenRelease {
release_title: Cow<'static, str>,
#[builder(default, setter(strip_option))]
release_comment: Option<Cow<'static, str>>,
released_by: Cow<'static, str>,
}