github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/action_run.rs (about) 1 /* 2 * lakeFS API 3 * 4 * lakeFS HTTP API 5 * 6 * The version of the OpenAPI document: 1.0.0 7 * Contact: services@treeverse.io 8 * Generated by: https://openapi-generator.tech 9 */ 10 11 use crate::models; 12 13 #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 14 pub struct ActionRun { 15 #[serde(rename = "run_id")] 16 pub run_id: String, 17 #[serde(rename = "branch")] 18 pub branch: String, 19 #[serde(rename = "start_time")] 20 pub start_time: String, 21 #[serde(rename = "end_time", skip_serializing_if = "Option::is_none")] 22 pub end_time: Option<String>, 23 #[serde(rename = "event_type")] 24 pub event_type: String, 25 #[serde(rename = "status")] 26 pub status: Status, 27 #[serde(rename = "commit_id")] 28 pub commit_id: String, 29 } 30 31 impl ActionRun { 32 pub fn new(run_id: String, branch: String, start_time: String, event_type: String, status: Status, commit_id: String) -> ActionRun { 33 ActionRun { 34 run_id, 35 branch, 36 start_time, 37 end_time: None, 38 event_type, 39 status, 40 commit_id, 41 } 42 } 43 } 44 /// 45 #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] 46 pub enum Status { 47 #[serde(rename = "failed")] 48 Failed, 49 #[serde(rename = "completed")] 50 Completed, 51 } 52 53 impl Default for Status { 54 fn default() -> Status { 55 Self::Failed 56 } 57 } 58