1use std::process::ExitStatus;
2
3use super::CliOverridesPatch;
4
5#[derive(Clone, Debug)]
8pub struct ApplyDiffArtifacts {
9 pub status: ExitStatus,
11 pub stdout: String,
13 pub stderr: String,
15}
16
17#[derive(Clone, Debug, Eq, PartialEq)]
19pub struct CloudDiffRequest {
20 pub task_id: String,
21 pub attempt: Option<u32>,
22 pub overrides: CliOverridesPatch,
23}
24
25impl CloudDiffRequest {
26 pub fn new(task_id: impl Into<String>) -> Self {
27 Self {
28 task_id: task_id.into(),
29 attempt: None,
30 overrides: CliOverridesPatch::default(),
31 }
32 }
33
34 pub fn attempt(mut self, attempt: u32) -> Self {
35 self.attempt = Some(attempt);
36 self
37 }
38
39 pub fn with_overrides(mut self, overrides: CliOverridesPatch) -> Self {
40 self.overrides = overrides;
41 self
42 }
43}
44
45#[derive(Clone, Debug, Eq, PartialEq)]
47pub struct CloudApplyRequest {
48 pub task_id: String,
49 pub attempt: Option<u32>,
50 pub overrides: CliOverridesPatch,
51}
52
53impl CloudApplyRequest {
54 pub fn new(task_id: impl Into<String>) -> Self {
55 Self {
56 task_id: task_id.into(),
57 attempt: None,
58 overrides: CliOverridesPatch::default(),
59 }
60 }
61
62 pub fn attempt(mut self, attempt: u32) -> Self {
63 self.attempt = Some(attempt);
64 self
65 }
66
67 pub fn with_overrides(mut self, overrides: CliOverridesPatch) -> Self {
68 self.overrides = overrides;
69 self
70 }
71}