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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>An answer of the question.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Answer {
/// <p>The ID of the question.</p>
pub question_id: ::std::option::Option<::std::string::String>,
/// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
/// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
pub pillar_id: ::std::option::Option<::std::string::String>,
/// <p>The title of the question.</p>
pub question_title: ::std::option::Option<::std::string::String>,
/// <p>The description of the question.</p>
pub question_description: ::std::option::Option<::std::string::String>,
/// <p>The improvement plan URL for a question in an Amazon Web Services official lenses.</p>
/// <p>This value is only available if the question has been answered.</p>
/// <p>This value does not apply to custom lenses.</p>
pub improvement_plan_url: ::std::option::Option<::std::string::String>,
/// <p>The helpful resource URL.</p>
/// <p>For Amazon Web Services official lenses, this is the helpful resource URL for a question or choice.</p>
/// <p>For custom lenses, this is the helpful resource URL for a question and is only provided if <code>HelpfulResourceDisplayText</code> was specified for the question.</p>
pub helpful_resource_url: ::std::option::Option<::std::string::String>,
/// <p>The helpful resource text to be displayed for a custom lens.</p>
/// <p>This field does not apply to Amazon Web Services official lenses.</p>
pub helpful_resource_display_text: ::std::option::Option<::std::string::String>,
/// <p>List of choices available for a question.</p>
pub choices: ::std::option::Option<::std::vec::Vec<crate::types::Choice>>,
/// <p>List of selected choice IDs in a question answer.</p>
/// <p>The values entered replace the previously selected choices.</p>
pub selected_choices: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>A list of selected choices to a question in your workload.</p>
pub choice_answers: ::std::option::Option<::std::vec::Vec<crate::types::ChoiceAnswer>>,
/// <p>Defines whether this question is applicable to a lens review.</p>
pub is_applicable: ::std::option::Option<bool>,
/// <p>The risk for a given workload, lens review, pillar, or question.</p>
pub risk: ::std::option::Option<crate::types::Risk>,
/// <p>The notes associated with the workload.</p>
/// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
pub notes: ::std::option::Option<::std::string::String>,
/// <p>The reason why the question is not applicable to your workload.</p>
pub reason: ::std::option::Option<crate::types::AnswerReason>,
/// <p>Configuration of the Jira integration.</p>
pub jira_configuration: ::std::option::Option<crate::types::JiraConfiguration>,
}
impl Answer {
/// <p>The ID of the question.</p>
pub fn question_id(&self) -> ::std::option::Option<&str> {
self.question_id.as_deref()
}
/// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
/// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
pub fn pillar_id(&self) -> ::std::option::Option<&str> {
self.pillar_id.as_deref()
}
/// <p>The title of the question.</p>
pub fn question_title(&self) -> ::std::option::Option<&str> {
self.question_title.as_deref()
}
/// <p>The description of the question.</p>
pub fn question_description(&self) -> ::std::option::Option<&str> {
self.question_description.as_deref()
}
/// <p>The improvement plan URL for a question in an Amazon Web Services official lenses.</p>
/// <p>This value is only available if the question has been answered.</p>
/// <p>This value does not apply to custom lenses.</p>
pub fn improvement_plan_url(&self) -> ::std::option::Option<&str> {
self.improvement_plan_url.as_deref()
}
/// <p>The helpful resource URL.</p>
/// <p>For Amazon Web Services official lenses, this is the helpful resource URL for a question or choice.</p>
/// <p>For custom lenses, this is the helpful resource URL for a question and is only provided if <code>HelpfulResourceDisplayText</code> was specified for the question.</p>
pub fn helpful_resource_url(&self) -> ::std::option::Option<&str> {
self.helpful_resource_url.as_deref()
}
/// <p>The helpful resource text to be displayed for a custom lens.</p>
/// <p>This field does not apply to Amazon Web Services official lenses.</p>
pub fn helpful_resource_display_text(&self) -> ::std::option::Option<&str> {
self.helpful_resource_display_text.as_deref()
}
/// <p>List of choices available for a question.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.choices.is_none()`.
pub fn choices(&self) -> &[crate::types::Choice] {
self.choices.as_deref().unwrap_or_default()
}
/// <p>List of selected choice IDs in a question answer.</p>
/// <p>The values entered replace the previously selected choices.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.selected_choices.is_none()`.
pub fn selected_choices(&self) -> &[::std::string::String] {
self.selected_choices.as_deref().unwrap_or_default()
}
/// <p>A list of selected choices to a question in your workload.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.choice_answers.is_none()`.
pub fn choice_answers(&self) -> &[crate::types::ChoiceAnswer] {
self.choice_answers.as_deref().unwrap_or_default()
}
/// <p>Defines whether this question is applicable to a lens review.</p>
pub fn is_applicable(&self) -> ::std::option::Option<bool> {
self.is_applicable
}
/// <p>The risk for a given workload, lens review, pillar, or question.</p>
pub fn risk(&self) -> ::std::option::Option<&crate::types::Risk> {
self.risk.as_ref()
}
/// <p>The notes associated with the workload.</p>
/// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
pub fn notes(&self) -> ::std::option::Option<&str> {
self.notes.as_deref()
}
/// <p>The reason why the question is not applicable to your workload.</p>
pub fn reason(&self) -> ::std::option::Option<&crate::types::AnswerReason> {
self.reason.as_ref()
}
/// <p>Configuration of the Jira integration.</p>
pub fn jira_configuration(&self) -> ::std::option::Option<&crate::types::JiraConfiguration> {
self.jira_configuration.as_ref()
}
}
impl Answer {
/// Creates a new builder-style object to manufacture [`Answer`](crate::types::Answer).
pub fn builder() -> crate::types::builders::AnswerBuilder {
crate::types::builders::AnswerBuilder::default()
}
}
/// A builder for [`Answer`](crate::types::Answer).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AnswerBuilder {
pub(crate) question_id: ::std::option::Option<::std::string::String>,
pub(crate) pillar_id: ::std::option::Option<::std::string::String>,
pub(crate) question_title: ::std::option::Option<::std::string::String>,
pub(crate) question_description: ::std::option::Option<::std::string::String>,
pub(crate) improvement_plan_url: ::std::option::Option<::std::string::String>,
pub(crate) helpful_resource_url: ::std::option::Option<::std::string::String>,
pub(crate) helpful_resource_display_text: ::std::option::Option<::std::string::String>,
pub(crate) choices: ::std::option::Option<::std::vec::Vec<crate::types::Choice>>,
pub(crate) selected_choices: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) choice_answers: ::std::option::Option<::std::vec::Vec<crate::types::ChoiceAnswer>>,
pub(crate) is_applicable: ::std::option::Option<bool>,
pub(crate) risk: ::std::option::Option<crate::types::Risk>,
pub(crate) notes: ::std::option::Option<::std::string::String>,
pub(crate) reason: ::std::option::Option<crate::types::AnswerReason>,
pub(crate) jira_configuration: ::std::option::Option<crate::types::JiraConfiguration>,
}
impl AnswerBuilder {
/// <p>The ID of the question.</p>
pub fn question_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.question_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the question.</p>
pub fn set_question_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.question_id = input;
self
}
/// <p>The ID of the question.</p>
pub fn get_question_id(&self) -> &::std::option::Option<::std::string::String> {
&self.question_id
}
/// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
/// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
pub fn pillar_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.pillar_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
/// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
pub fn set_pillar_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.pillar_id = input;
self
}
/// <p>The ID used to identify a pillar, for example, <code>security</code>.</p>
/// <p>A pillar is identified by its <code>PillarReviewSummary$PillarId</code>.</p>
pub fn get_pillar_id(&self) -> &::std::option::Option<::std::string::String> {
&self.pillar_id
}
/// <p>The title of the question.</p>
pub fn question_title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.question_title = ::std::option::Option::Some(input.into());
self
}
/// <p>The title of the question.</p>
pub fn set_question_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.question_title = input;
self
}
/// <p>The title of the question.</p>
pub fn get_question_title(&self) -> &::std::option::Option<::std::string::String> {
&self.question_title
}
/// <p>The description of the question.</p>
pub fn question_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.question_description = ::std::option::Option::Some(input.into());
self
}
/// <p>The description of the question.</p>
pub fn set_question_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.question_description = input;
self
}
/// <p>The description of the question.</p>
pub fn get_question_description(&self) -> &::std::option::Option<::std::string::String> {
&self.question_description
}
/// <p>The improvement plan URL for a question in an Amazon Web Services official lenses.</p>
/// <p>This value is only available if the question has been answered.</p>
/// <p>This value does not apply to custom lenses.</p>
pub fn improvement_plan_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.improvement_plan_url = ::std::option::Option::Some(input.into());
self
}
/// <p>The improvement plan URL for a question in an Amazon Web Services official lenses.</p>
/// <p>This value is only available if the question has been answered.</p>
/// <p>This value does not apply to custom lenses.</p>
pub fn set_improvement_plan_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.improvement_plan_url = input;
self
}
/// <p>The improvement plan URL for a question in an Amazon Web Services official lenses.</p>
/// <p>This value is only available if the question has been answered.</p>
/// <p>This value does not apply to custom lenses.</p>
pub fn get_improvement_plan_url(&self) -> &::std::option::Option<::std::string::String> {
&self.improvement_plan_url
}
/// <p>The helpful resource URL.</p>
/// <p>For Amazon Web Services official lenses, this is the helpful resource URL for a question or choice.</p>
/// <p>For custom lenses, this is the helpful resource URL for a question and is only provided if <code>HelpfulResourceDisplayText</code> was specified for the question.</p>
pub fn helpful_resource_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.helpful_resource_url = ::std::option::Option::Some(input.into());
self
}
/// <p>The helpful resource URL.</p>
/// <p>For Amazon Web Services official lenses, this is the helpful resource URL for a question or choice.</p>
/// <p>For custom lenses, this is the helpful resource URL for a question and is only provided if <code>HelpfulResourceDisplayText</code> was specified for the question.</p>
pub fn set_helpful_resource_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.helpful_resource_url = input;
self
}
/// <p>The helpful resource URL.</p>
/// <p>For Amazon Web Services official lenses, this is the helpful resource URL for a question or choice.</p>
/// <p>For custom lenses, this is the helpful resource URL for a question and is only provided if <code>HelpfulResourceDisplayText</code> was specified for the question.</p>
pub fn get_helpful_resource_url(&self) -> &::std::option::Option<::std::string::String> {
&self.helpful_resource_url
}
/// <p>The helpful resource text to be displayed for a custom lens.</p>
/// <p>This field does not apply to Amazon Web Services official lenses.</p>
pub fn helpful_resource_display_text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.helpful_resource_display_text = ::std::option::Option::Some(input.into());
self
}
/// <p>The helpful resource text to be displayed for a custom lens.</p>
/// <p>This field does not apply to Amazon Web Services official lenses.</p>
pub fn set_helpful_resource_display_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.helpful_resource_display_text = input;
self
}
/// <p>The helpful resource text to be displayed for a custom lens.</p>
/// <p>This field does not apply to Amazon Web Services official lenses.</p>
pub fn get_helpful_resource_display_text(&self) -> &::std::option::Option<::std::string::String> {
&self.helpful_resource_display_text
}
/// Appends an item to `choices`.
///
/// To override the contents of this collection use [`set_choices`](Self::set_choices).
///
/// <p>List of choices available for a question.</p>
pub fn choices(mut self, input: crate::types::Choice) -> Self {
let mut v = self.choices.unwrap_or_default();
v.push(input);
self.choices = ::std::option::Option::Some(v);
self
}
/// <p>List of choices available for a question.</p>
pub fn set_choices(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Choice>>) -> Self {
self.choices = input;
self
}
/// <p>List of choices available for a question.</p>
pub fn get_choices(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Choice>> {
&self.choices
}
/// Appends an item to `selected_choices`.
///
/// To override the contents of this collection use [`set_selected_choices`](Self::set_selected_choices).
///
/// <p>List of selected choice IDs in a question answer.</p>
/// <p>The values entered replace the previously selected choices.</p>
pub fn selected_choices(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.selected_choices.unwrap_or_default();
v.push(input.into());
self.selected_choices = ::std::option::Option::Some(v);
self
}
/// <p>List of selected choice IDs in a question answer.</p>
/// <p>The values entered replace the previously selected choices.</p>
pub fn set_selected_choices(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.selected_choices = input;
self
}
/// <p>List of selected choice IDs in a question answer.</p>
/// <p>The values entered replace the previously selected choices.</p>
pub fn get_selected_choices(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.selected_choices
}
/// Appends an item to `choice_answers`.
///
/// To override the contents of this collection use [`set_choice_answers`](Self::set_choice_answers).
///
/// <p>A list of selected choices to a question in your workload.</p>
pub fn choice_answers(mut self, input: crate::types::ChoiceAnswer) -> Self {
let mut v = self.choice_answers.unwrap_or_default();
v.push(input);
self.choice_answers = ::std::option::Option::Some(v);
self
}
/// <p>A list of selected choices to a question in your workload.</p>
pub fn set_choice_answers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ChoiceAnswer>>) -> Self {
self.choice_answers = input;
self
}
/// <p>A list of selected choices to a question in your workload.</p>
pub fn get_choice_answers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ChoiceAnswer>> {
&self.choice_answers
}
/// <p>Defines whether this question is applicable to a lens review.</p>
pub fn is_applicable(mut self, input: bool) -> Self {
self.is_applicable = ::std::option::Option::Some(input);
self
}
/// <p>Defines whether this question is applicable to a lens review.</p>
pub fn set_is_applicable(mut self, input: ::std::option::Option<bool>) -> Self {
self.is_applicable = input;
self
}
/// <p>Defines whether this question is applicable to a lens review.</p>
pub fn get_is_applicable(&self) -> &::std::option::Option<bool> {
&self.is_applicable
}
/// <p>The risk for a given workload, lens review, pillar, or question.</p>
pub fn risk(mut self, input: crate::types::Risk) -> Self {
self.risk = ::std::option::Option::Some(input);
self
}
/// <p>The risk for a given workload, lens review, pillar, or question.</p>
pub fn set_risk(mut self, input: ::std::option::Option<crate::types::Risk>) -> Self {
self.risk = input;
self
}
/// <p>The risk for a given workload, lens review, pillar, or question.</p>
pub fn get_risk(&self) -> &::std::option::Option<crate::types::Risk> {
&self.risk
}
/// <p>The notes associated with the workload.</p>
/// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
pub fn notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.notes = ::std::option::Option::Some(input.into());
self
}
/// <p>The notes associated with the workload.</p>
/// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
pub fn set_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.notes = input;
self
}
/// <p>The notes associated with the workload.</p>
/// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
pub fn get_notes(&self) -> &::std::option::Option<::std::string::String> {
&self.notes
}
/// <p>The reason why the question is not applicable to your workload.</p>
pub fn reason(mut self, input: crate::types::AnswerReason) -> Self {
self.reason = ::std::option::Option::Some(input);
self
}
/// <p>The reason why the question is not applicable to your workload.</p>
pub fn set_reason(mut self, input: ::std::option::Option<crate::types::AnswerReason>) -> Self {
self.reason = input;
self
}
/// <p>The reason why the question is not applicable to your workload.</p>
pub fn get_reason(&self) -> &::std::option::Option<crate::types::AnswerReason> {
&self.reason
}
/// <p>Configuration of the Jira integration.</p>
pub fn jira_configuration(mut self, input: crate::types::JiraConfiguration) -> Self {
self.jira_configuration = ::std::option::Option::Some(input);
self
}
/// <p>Configuration of the Jira integration.</p>
pub fn set_jira_configuration(mut self, input: ::std::option::Option<crate::types::JiraConfiguration>) -> Self {
self.jira_configuration = input;
self
}
/// <p>Configuration of the Jira integration.</p>
pub fn get_jira_configuration(&self) -> &::std::option::Option<crate::types::JiraConfiguration> {
&self.jira_configuration
}
/// Consumes the builder and constructs a [`Answer`](crate::types::Answer).
pub fn build(self) -> crate::types::Answer {
crate::types::Answer {
question_id: self.question_id,
pillar_id: self.pillar_id,
question_title: self.question_title,
question_description: self.question_description,
improvement_plan_url: self.improvement_plan_url,
helpful_resource_url: self.helpful_resource_url,
helpful_resource_display_text: self.helpful_resource_display_text,
choices: self.choices,
selected_choices: self.selected_choices,
choice_answers: self.choice_answers,
is_applicable: self.is_applicable,
risk: self.risk,
notes: self.notes,
reason: self.reason,
jira_configuration: self.jira_configuration,
}
}
}