gitea_rs/models/
add_time_option.rs

1/*
2 * Gitea API.
3 *
4 * This documentation describes the Gitea API.
5 *
6 * The version of the OpenAPI document: 1.19.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// AddTimeOption : AddTimeOption options for adding time to an issue
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct AddTimeOption {
17    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
18    pub created: Option<String>,
19    /// time in seconds
20    #[serde(rename = "time")]
21    pub time: i64,
22    /// User who spent the time (optional)
23    #[serde(rename = "user_name", skip_serializing_if = "Option::is_none")]
24    pub user_name: Option<String>,
25}
26
27impl AddTimeOption {
28    /// AddTimeOption options for adding time to an issue
29    pub fn new(time: i64) -> AddTimeOption {
30        AddTimeOption {
31            created: None,
32            time,
33            user_name: None,
34        }
35    }
36}
37
38