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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Diagnostic information about executable scripts that are part of a deployment.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Diagnostics {
/// <p>The associated error code:</p>
/// <ul>
/// <li>
/// <p>Success: The specified script ran.</p></li>
/// <li>
/// <p>ScriptMissing: The specified script was not found in the specified location.</p></li>
/// <li>
/// <p>ScriptNotExecutable: The specified script is not a recognized executable file type.</p></li>
/// <li>
/// <p>ScriptTimedOut: The specified script did not finish running in the specified time period.</p></li>
/// <li>
/// <p>ScriptFailed: The specified script failed to run as expected.</p></li>
/// <li>
/// <p>UnknownError: The specified script did not run for an unknown reason.</p></li>
/// </ul>
pub error_code: ::std::option::Option<crate::types::LifecycleErrorCode>,
/// <p>The name of the script.</p>
pub script_name: ::std::option::Option<::std::string::String>,
/// <p>The message associated with the error.</p>
pub message: ::std::option::Option<::std::string::String>,
/// <p>The last portion of the diagnostic log.</p>
/// <p>If available, CodeDeploy returns up to the last 4 KB of the diagnostic log.</p>
pub log_tail: ::std::option::Option<::std::string::String>,
}
impl Diagnostics {
/// <p>The associated error code:</p>
/// <ul>
/// <li>
/// <p>Success: The specified script ran.</p></li>
/// <li>
/// <p>ScriptMissing: The specified script was not found in the specified location.</p></li>
/// <li>
/// <p>ScriptNotExecutable: The specified script is not a recognized executable file type.</p></li>
/// <li>
/// <p>ScriptTimedOut: The specified script did not finish running in the specified time period.</p></li>
/// <li>
/// <p>ScriptFailed: The specified script failed to run as expected.</p></li>
/// <li>
/// <p>UnknownError: The specified script did not run for an unknown reason.</p></li>
/// </ul>
pub fn error_code(&self) -> ::std::option::Option<&crate::types::LifecycleErrorCode> {
self.error_code.as_ref()
}
/// <p>The name of the script.</p>
pub fn script_name(&self) -> ::std::option::Option<&str> {
self.script_name.as_deref()
}
/// <p>The message associated with the error.</p>
pub fn message(&self) -> ::std::option::Option<&str> {
self.message.as_deref()
}
/// <p>The last portion of the diagnostic log.</p>
/// <p>If available, CodeDeploy returns up to the last 4 KB of the diagnostic log.</p>
pub fn log_tail(&self) -> ::std::option::Option<&str> {
self.log_tail.as_deref()
}
}
impl Diagnostics {
/// Creates a new builder-style object to manufacture [`Diagnostics`](crate::types::Diagnostics).
pub fn builder() -> crate::types::builders::DiagnosticsBuilder {
crate::types::builders::DiagnosticsBuilder::default()
}
}
/// A builder for [`Diagnostics`](crate::types::Diagnostics).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DiagnosticsBuilder {
pub(crate) error_code: ::std::option::Option<crate::types::LifecycleErrorCode>,
pub(crate) script_name: ::std::option::Option<::std::string::String>,
pub(crate) message: ::std::option::Option<::std::string::String>,
pub(crate) log_tail: ::std::option::Option<::std::string::String>,
}
impl DiagnosticsBuilder {
/// <p>The associated error code:</p>
/// <ul>
/// <li>
/// <p>Success: The specified script ran.</p></li>
/// <li>
/// <p>ScriptMissing: The specified script was not found in the specified location.</p></li>
/// <li>
/// <p>ScriptNotExecutable: The specified script is not a recognized executable file type.</p></li>
/// <li>
/// <p>ScriptTimedOut: The specified script did not finish running in the specified time period.</p></li>
/// <li>
/// <p>ScriptFailed: The specified script failed to run as expected.</p></li>
/// <li>
/// <p>UnknownError: The specified script did not run for an unknown reason.</p></li>
/// </ul>
pub fn error_code(mut self, input: crate::types::LifecycleErrorCode) -> Self {
self.error_code = ::std::option::Option::Some(input);
self
}
/// <p>The associated error code:</p>
/// <ul>
/// <li>
/// <p>Success: The specified script ran.</p></li>
/// <li>
/// <p>ScriptMissing: The specified script was not found in the specified location.</p></li>
/// <li>
/// <p>ScriptNotExecutable: The specified script is not a recognized executable file type.</p></li>
/// <li>
/// <p>ScriptTimedOut: The specified script did not finish running in the specified time period.</p></li>
/// <li>
/// <p>ScriptFailed: The specified script failed to run as expected.</p></li>
/// <li>
/// <p>UnknownError: The specified script did not run for an unknown reason.</p></li>
/// </ul>
pub fn set_error_code(mut self, input: ::std::option::Option<crate::types::LifecycleErrorCode>) -> Self {
self.error_code = input;
self
}
/// <p>The associated error code:</p>
/// <ul>
/// <li>
/// <p>Success: The specified script ran.</p></li>
/// <li>
/// <p>ScriptMissing: The specified script was not found in the specified location.</p></li>
/// <li>
/// <p>ScriptNotExecutable: The specified script is not a recognized executable file type.</p></li>
/// <li>
/// <p>ScriptTimedOut: The specified script did not finish running in the specified time period.</p></li>
/// <li>
/// <p>ScriptFailed: The specified script failed to run as expected.</p></li>
/// <li>
/// <p>UnknownError: The specified script did not run for an unknown reason.</p></li>
/// </ul>
pub fn get_error_code(&self) -> &::std::option::Option<crate::types::LifecycleErrorCode> {
&self.error_code
}
/// <p>The name of the script.</p>
pub fn script_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.script_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the script.</p>
pub fn set_script_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.script_name = input;
self
}
/// <p>The name of the script.</p>
pub fn get_script_name(&self) -> &::std::option::Option<::std::string::String> {
&self.script_name
}
/// <p>The message associated with the error.</p>
pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message = ::std::option::Option::Some(input.into());
self
}
/// <p>The message associated with the error.</p>
pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message = input;
self
}
/// <p>The message associated with the error.</p>
pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
&self.message
}
/// <p>The last portion of the diagnostic log.</p>
/// <p>If available, CodeDeploy returns up to the last 4 KB of the diagnostic log.</p>
pub fn log_tail(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.log_tail = ::std::option::Option::Some(input.into());
self
}
/// <p>The last portion of the diagnostic log.</p>
/// <p>If available, CodeDeploy returns up to the last 4 KB of the diagnostic log.</p>
pub fn set_log_tail(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.log_tail = input;
self
}
/// <p>The last portion of the diagnostic log.</p>
/// <p>If available, CodeDeploy returns up to the last 4 KB of the diagnostic log.</p>
pub fn get_log_tail(&self) -> &::std::option::Option<::std::string::String> {
&self.log_tail
}
/// Consumes the builder and constructs a [`Diagnostics`](crate::types::Diagnostics).
pub fn build(self) -> crate::types::Diagnostics {
crate::types::Diagnostics {
error_code: self.error_code,
script_name: self.script_name,
message: self.message,
log_tail: self.log_tail,
}
}
}