1use crate::CliOverridesPatch;
2
3#[derive(Clone, Debug, Eq, PartialEq)]
5pub struct DebugCommandRequest {
6 pub overrides: CliOverridesPatch,
8}
9
10impl DebugCommandRequest {
11 pub fn new() -> Self {
12 Self {
13 overrides: CliOverridesPatch::default(),
14 }
15 }
16
17 pub fn with_overrides(mut self, overrides: CliOverridesPatch) -> Self {
19 self.overrides = overrides;
20 self
21 }
22}
23
24impl Default for DebugCommandRequest {
25 fn default() -> Self {
26 Self::new()
27 }
28}
29
30#[derive(Clone, Debug, Eq, PartialEq)]
32pub struct DebugHelpRequest {
33 pub command: Vec<String>,
35 pub overrides: CliOverridesPatch,
37}
38
39impl DebugHelpRequest {
40 pub fn new() -> Self {
41 Self {
42 command: Vec::new(),
43 overrides: CliOverridesPatch::default(),
44 }
45 }
46
47 pub fn command(mut self, command: impl IntoIterator<Item = impl Into<String>>) -> Self {
49 self.command = command.into_iter().map(Into::into).collect();
50 self
51 }
52
53 pub fn with_overrides(mut self, overrides: CliOverridesPatch) -> Self {
55 self.overrides = overrides;
56 self
57 }
58}
59
60impl Default for DebugHelpRequest {
61 fn default() -> Self {
62 Self::new()
63 }
64}
65
66#[derive(Clone, Debug, Eq, PartialEq)]
68pub struct DebugAppServerRequest {
69 pub overrides: CliOverridesPatch,
71}
72
73impl DebugAppServerRequest {
74 pub fn new() -> Self {
75 Self {
76 overrides: CliOverridesPatch::default(),
77 }
78 }
79
80 pub fn with_overrides(mut self, overrides: CliOverridesPatch) -> Self {
82 self.overrides = overrides;
83 self
84 }
85}
86
87impl Default for DebugAppServerRequest {
88 fn default() -> Self {
89 Self::new()
90 }
91}
92
93#[derive(Clone, Debug, Eq, PartialEq)]
95pub struct DebugAppServerHelpRequest {
96 pub command: Vec<String>,
98 pub overrides: CliOverridesPatch,
100}
101
102impl DebugAppServerHelpRequest {
103 pub fn new() -> Self {
104 Self {
105 command: Vec::new(),
106 overrides: CliOverridesPatch::default(),
107 }
108 }
109
110 pub fn command(mut self, command: impl IntoIterator<Item = impl Into<String>>) -> Self {
112 self.command = command.into_iter().map(Into::into).collect();
113 self
114 }
115
116 pub fn with_overrides(mut self, overrides: CliOverridesPatch) -> Self {
118 self.overrides = overrides;
119 self
120 }
121}
122
123impl Default for DebugAppServerHelpRequest {
124 fn default() -> Self {
125 Self::new()
126 }
127}
128
129#[derive(Clone, Debug, Eq, PartialEq)]
131pub struct DebugAppServerSendMessageV2Request {
132 pub user_message: String,
134 pub overrides: CliOverridesPatch,
136}
137
138impl DebugAppServerSendMessageV2Request {
139 pub fn new(user_message: impl Into<String>) -> Self {
140 Self {
141 user_message: user_message.into(),
142 overrides: CliOverridesPatch::default(),
143 }
144 }
145
146 pub fn with_overrides(mut self, overrides: CliOverridesPatch) -> Self {
148 self.overrides = overrides;
149 self
150 }
151}