aws-sdk-assurance 1.0.0

AWS SDK for AWS Assurance
Documentation
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
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Input for <code>PutEvidence</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PutEvidenceInput {
    /// <p>The Amazon Resource Name (ARN) of this governance environment.</p>
    pub environment_arn: ::std::option::Option<::std::string::String>,
    /// <p>The file content. Required for a direct upload. You can't specify both <code>content</code> and <code>reference</code>.</p>
    pub content: ::std::option::Option<::aws_smithy_types::Blob>,
    /// <p>The title of the evidence. When you create new evidence, AWS Assurance derives the evidence ID from the title, in the form <code>assurance://{sanitized-title}</code>.</p>
    /// <p>Required when you specify <code>content</code>. Optional when you specify <code>reference</code>. If you omit it, AWS Assurance uses the name of the referenced document.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>The optional description of the evidence.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The ID of existing evidence. Specify it to add a new version of that evidence. Omit it to create new evidence.</p>
    pub evidence_id: ::std::option::Option<::std::string::String>,
    /// <p>The declared Multipurpose Internet Mail Extensions (MIME) type of the file, for example <code>application/pdf</code>. AWS Assurance checks the declared type against the actual file content. For the list of registered types, see <a href="https://www.iana.org/assignments/media-types/media-types.xhtml">Media Types</a> on the IANA website.</p>
    pub content_mime_type: ::std::option::Option<::std::string::String>,
    /// <p>Project scope for the evidence.</p>
    pub project: ::std::option::Option<::std::string::String>,
    /// <p>A link to the document. You can't specify both <code>reference</code> and <code>content</code>. Supported formats:</p>
    /// <ul>
    /// <li>
    /// <p>For a file in GitHub, a link in the form https://github.com/{owner}/{repo}/blob/{ref}/{path}.</p></li>
    /// <li>
    /// <p>For a document in SharePoint, any link to the document in the form https://{tenant}.sharepoint.com/{path}, including a sharing link.</p></li>
    /// <li>
    /// <p>For an object in Amazon S3, a URI in the form s3://{bucket}/{key}. The bucket must be the evidence bucket configured for the environment.</p></li>
    /// </ul>
    pub reference: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the connection to read <code>reference</code> through, as returned by <code>ListEnvironmentConnections</code>. Each new version of the document uses this connection too.</p>
    /// <p>Use this parameter only with <code>reference</code>.</p>
    /// <p>If you omit this parameter, the operation uses the single connection that can read the document. If the environment has more than one connection to the same provider, specify this parameter.</p>
    pub connection_id: ::std::option::Option<::std::string::String>,
    /// <p>The controls to link the evidence to when you add it. You can specify control links only when <code>purpose</code> is <code>CONTROL_EVIDENCE</code>.</p>
    pub control_references: ::std::option::Option<::std::vec::Vec<crate::types::ControlReference>>,
    /// <p>Specifies whether AWS Assurance analyzes the evidence and links it to relevant controls. A link shows that the evidence is relevant to a control, not that you meet the control. An assessment determines whether you meet the control. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>AUTO</code> – AWS Assurance analyzes the evidence and adds control links.</p></li>
    /// <li>
    /// <p><code>MANUAL</code> – AWS Assurance doesn't analyze the evidence. You add control links yourself.</p></li>
    /// </ul>
    /// <p>Automatic linking is available only to some accounts during the preview. If you omit this parameter, the default is <code>AUTO</code> for those accounts and <code>MANUAL</code> for all other accounts. Evidence whose <code>purpose</code> isn't <code>CONTROL_EVIDENCE</code> always has the mode <code>DISABLED</code>, which means that it can't be linked to controls. You can't specify <code>AUTO</code> for that evidence.</p>
    pub link_mode: ::std::option::Option<crate::types::LinkMode>,
    /// <p>What the evidence is for. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTROL_EVIDENCE</code> – Evidence that supports controls.</p></li>
    /// <li>
    /// <p><code>FRAMEWORK_SOURCE</code> – The document that you create a custom framework from. AWS Assurance never links this evidence to controls.</p></li>
    /// </ul>
    /// <p>You can't specify <code>SCAN_EVIDENCE</code>. If you omit this parameter, a new version keeps the purpose of the existing evidence, and new evidence uses <code>CONTROL_EVIDENCE</code>. You can't change the purpose in a new version.</p>
    pub purpose: ::std::option::Option<crate::types::EvidencePurpose>,
}
impl PutEvidenceInput {
    /// <p>The Amazon Resource Name (ARN) of this governance environment.</p>
    pub fn environment_arn(&self) -> ::std::option::Option<&str> {
        self.environment_arn.as_deref()
    }
    /// <p>The file content. Required for a direct upload. You can't specify both <code>content</code> and <code>reference</code>.</p>
    pub fn content(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.content.as_ref()
    }
    /// <p>The title of the evidence. When you create new evidence, AWS Assurance derives the evidence ID from the title, in the form <code>assurance://{sanitized-title}</code>.</p>
    /// <p>Required when you specify <code>content</code>. Optional when you specify <code>reference</code>. If you omit it, AWS Assurance uses the name of the referenced document.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The optional description of the evidence.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ID of existing evidence. Specify it to add a new version of that evidence. Omit it to create new evidence.</p>
    pub fn evidence_id(&self) -> ::std::option::Option<&str> {
        self.evidence_id.as_deref()
    }
    /// <p>The declared Multipurpose Internet Mail Extensions (MIME) type of the file, for example <code>application/pdf</code>. AWS Assurance checks the declared type against the actual file content. For the list of registered types, see <a href="https://www.iana.org/assignments/media-types/media-types.xhtml">Media Types</a> on the IANA website.</p>
    pub fn content_mime_type(&self) -> ::std::option::Option<&str> {
        self.content_mime_type.as_deref()
    }
    /// <p>Project scope for the evidence.</p>
    pub fn project(&self) -> ::std::option::Option<&str> {
        self.project.as_deref()
    }
    /// <p>A link to the document. You can't specify both <code>reference</code> and <code>content</code>. Supported formats:</p>
    /// <ul>
    /// <li>
    /// <p>For a file in GitHub, a link in the form https://github.com/{owner}/{repo}/blob/{ref}/{path}.</p></li>
    /// <li>
    /// <p>For a document in SharePoint, any link to the document in the form https://{tenant}.sharepoint.com/{path}, including a sharing link.</p></li>
    /// <li>
    /// <p>For an object in Amazon S3, a URI in the form s3://{bucket}/{key}. The bucket must be the evidence bucket configured for the environment.</p></li>
    /// </ul>
    pub fn reference(&self) -> ::std::option::Option<&str> {
        self.reference.as_deref()
    }
    /// <p>The ID of the connection to read <code>reference</code> through, as returned by <code>ListEnvironmentConnections</code>. Each new version of the document uses this connection too.</p>
    /// <p>Use this parameter only with <code>reference</code>.</p>
    /// <p>If you omit this parameter, the operation uses the single connection that can read the document. If the environment has more than one connection to the same provider, specify this parameter.</p>
    pub fn connection_id(&self) -> ::std::option::Option<&str> {
        self.connection_id.as_deref()
    }
    /// <p>The controls to link the evidence to when you add it. You can specify control links only when <code>purpose</code> is <code>CONTROL_EVIDENCE</code>.</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 `.control_references.is_none()`.
    pub fn control_references(&self) -> &[crate::types::ControlReference] {
        self.control_references.as_deref().unwrap_or_default()
    }
    /// <p>Specifies whether AWS Assurance analyzes the evidence and links it to relevant controls. A link shows that the evidence is relevant to a control, not that you meet the control. An assessment determines whether you meet the control. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>AUTO</code> – AWS Assurance analyzes the evidence and adds control links.</p></li>
    /// <li>
    /// <p><code>MANUAL</code> – AWS Assurance doesn't analyze the evidence. You add control links yourself.</p></li>
    /// </ul>
    /// <p>Automatic linking is available only to some accounts during the preview. If you omit this parameter, the default is <code>AUTO</code> for those accounts and <code>MANUAL</code> for all other accounts. Evidence whose <code>purpose</code> isn't <code>CONTROL_EVIDENCE</code> always has the mode <code>DISABLED</code>, which means that it can't be linked to controls. You can't specify <code>AUTO</code> for that evidence.</p>
    pub fn link_mode(&self) -> ::std::option::Option<&crate::types::LinkMode> {
        self.link_mode.as_ref()
    }
    /// <p>What the evidence is for. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTROL_EVIDENCE</code> – Evidence that supports controls.</p></li>
    /// <li>
    /// <p><code>FRAMEWORK_SOURCE</code> – The document that you create a custom framework from. AWS Assurance never links this evidence to controls.</p></li>
    /// </ul>
    /// <p>You can't specify <code>SCAN_EVIDENCE</code>. If you omit this parameter, a new version keeps the purpose of the existing evidence, and new evidence uses <code>CONTROL_EVIDENCE</code>. You can't change the purpose in a new version.</p>
    pub fn purpose(&self) -> ::std::option::Option<&crate::types::EvidencePurpose> {
        self.purpose.as_ref()
    }
}
impl ::std::fmt::Debug for PutEvidenceInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PutEvidenceInput");
        formatter.field("environment_arn", &self.environment_arn);
        formatter.field("content", &"*** Sensitive Data Redacted ***");
        formatter.field("title", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("evidence_id", &self.evidence_id);
        formatter.field("content_mime_type", &self.content_mime_type);
        formatter.field("project", &self.project);
        formatter.field("reference", &"*** Sensitive Data Redacted ***");
        formatter.field("connection_id", &self.connection_id);
        formatter.field("control_references", &self.control_references);
        formatter.field("link_mode", &self.link_mode);
        formatter.field("purpose", &self.purpose);
        formatter.finish()
    }
}
impl PutEvidenceInput {
    /// Creates a new builder-style object to manufacture [`PutEvidenceInput`](crate::operation::put_evidence::PutEvidenceInput).
    pub fn builder() -> crate::operation::put_evidence::builders::PutEvidenceInputBuilder {
        crate::operation::put_evidence::builders::PutEvidenceInputBuilder::default()
    }
}

/// A builder for [`PutEvidenceInput`](crate::operation::put_evidence::PutEvidenceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct PutEvidenceInputBuilder {
    pub(crate) environment_arn: ::std::option::Option<::std::string::String>,
    pub(crate) content: ::std::option::Option<::aws_smithy_types::Blob>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) evidence_id: ::std::option::Option<::std::string::String>,
    pub(crate) content_mime_type: ::std::option::Option<::std::string::String>,
    pub(crate) project: ::std::option::Option<::std::string::String>,
    pub(crate) reference: ::std::option::Option<::std::string::String>,
    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
    pub(crate) control_references: ::std::option::Option<::std::vec::Vec<crate::types::ControlReference>>,
    pub(crate) link_mode: ::std::option::Option<crate::types::LinkMode>,
    pub(crate) purpose: ::std::option::Option<crate::types::EvidencePurpose>,
}
impl PutEvidenceInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of this governance environment.</p>
    /// This field is required.
    pub fn environment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of this governance environment.</p>
    pub fn set_environment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of this governance environment.</p>
    pub fn get_environment_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_arn
    }
    /// <p>The file content. Required for a direct upload. You can't specify both <code>content</code> and <code>reference</code>.</p>
    pub fn content(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.content = ::std::option::Option::Some(input);
        self
    }
    /// <p>The file content. Required for a direct upload. You can't specify both <code>content</code> and <code>reference</code>.</p>
    pub fn set_content(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.content = input;
        self
    }
    /// <p>The file content. Required for a direct upload. You can't specify both <code>content</code> and <code>reference</code>.</p>
    pub fn get_content(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.content
    }
    /// <p>The title of the evidence. When you create new evidence, AWS Assurance derives the evidence ID from the title, in the form <code>assurance://{sanitized-title}</code>.</p>
    /// <p>Required when you specify <code>content</code>. Optional when you specify <code>reference</code>. If you omit it, AWS Assurance uses the name of the referenced document.</p>
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The title of the evidence. When you create new evidence, AWS Assurance derives the evidence ID from the title, in the form <code>assurance://{sanitized-title}</code>.</p>
    /// <p>Required when you specify <code>content</code>. Optional when you specify <code>reference</code>. If you omit it, AWS Assurance uses the name of the referenced document.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the evidence. When you create new evidence, AWS Assurance derives the evidence ID from the title, in the form <code>assurance://{sanitized-title}</code>.</p>
    /// <p>Required when you specify <code>content</code>. Optional when you specify <code>reference</code>. If you omit it, AWS Assurance uses the name of the referenced document.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>The optional description of the evidence.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The optional description of the evidence.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The optional description of the evidence.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The ID of existing evidence. Specify it to add a new version of that evidence. Omit it to create new evidence.</p>
    pub fn evidence_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.evidence_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of existing evidence. Specify it to add a new version of that evidence. Omit it to create new evidence.</p>
    pub fn set_evidence_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.evidence_id = input;
        self
    }
    /// <p>The ID of existing evidence. Specify it to add a new version of that evidence. Omit it to create new evidence.</p>
    pub fn get_evidence_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.evidence_id
    }
    /// <p>The declared Multipurpose Internet Mail Extensions (MIME) type of the file, for example <code>application/pdf</code>. AWS Assurance checks the declared type against the actual file content. For the list of registered types, see <a href="https://www.iana.org/assignments/media-types/media-types.xhtml">Media Types</a> on the IANA website.</p>
    pub fn content_mime_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content_mime_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The declared Multipurpose Internet Mail Extensions (MIME) type of the file, for example <code>application/pdf</code>. AWS Assurance checks the declared type against the actual file content. For the list of registered types, see <a href="https://www.iana.org/assignments/media-types/media-types.xhtml">Media Types</a> on the IANA website.</p>
    pub fn set_content_mime_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content_mime_type = input;
        self
    }
    /// <p>The declared Multipurpose Internet Mail Extensions (MIME) type of the file, for example <code>application/pdf</code>. AWS Assurance checks the declared type against the actual file content. For the list of registered types, see <a href="https://www.iana.org/assignments/media-types/media-types.xhtml">Media Types</a> on the IANA website.</p>
    pub fn get_content_mime_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.content_mime_type
    }
    /// <p>Project scope for the evidence.</p>
    /// This field is required.
    pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Project scope for the evidence.</p>
    pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project = input;
        self
    }
    /// <p>Project scope for the evidence.</p>
    pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
        &self.project
    }
    /// <p>A link to the document. You can't specify both <code>reference</code> and <code>content</code>. Supported formats:</p>
    /// <ul>
    /// <li>
    /// <p>For a file in GitHub, a link in the form https://github.com/{owner}/{repo}/blob/{ref}/{path}.</p></li>
    /// <li>
    /// <p>For a document in SharePoint, any link to the document in the form https://{tenant}.sharepoint.com/{path}, including a sharing link.</p></li>
    /// <li>
    /// <p>For an object in Amazon S3, a URI in the form s3://{bucket}/{key}. The bucket must be the evidence bucket configured for the environment.</p></li>
    /// </ul>
    pub fn reference(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reference = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A link to the document. You can't specify both <code>reference</code> and <code>content</code>. Supported formats:</p>
    /// <ul>
    /// <li>
    /// <p>For a file in GitHub, a link in the form https://github.com/{owner}/{repo}/blob/{ref}/{path}.</p></li>
    /// <li>
    /// <p>For a document in SharePoint, any link to the document in the form https://{tenant}.sharepoint.com/{path}, including a sharing link.</p></li>
    /// <li>
    /// <p>For an object in Amazon S3, a URI in the form s3://{bucket}/{key}. The bucket must be the evidence bucket configured for the environment.</p></li>
    /// </ul>
    pub fn set_reference(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reference = input;
        self
    }
    /// <p>A link to the document. You can't specify both <code>reference</code> and <code>content</code>. Supported formats:</p>
    /// <ul>
    /// <li>
    /// <p>For a file in GitHub, a link in the form https://github.com/{owner}/{repo}/blob/{ref}/{path}.</p></li>
    /// <li>
    /// <p>For a document in SharePoint, any link to the document in the form https://{tenant}.sharepoint.com/{path}, including a sharing link.</p></li>
    /// <li>
    /// <p>For an object in Amazon S3, a URI in the form s3://{bucket}/{key}. The bucket must be the evidence bucket configured for the environment.</p></li>
    /// </ul>
    pub fn get_reference(&self) -> &::std::option::Option<::std::string::String> {
        &self.reference
    }
    /// <p>The ID of the connection to read <code>reference</code> through, as returned by <code>ListEnvironmentConnections</code>. Each new version of the document uses this connection too.</p>
    /// <p>Use this parameter only with <code>reference</code>.</p>
    /// <p>If you omit this parameter, the operation uses the single connection that can read the document. If the environment has more than one connection to the same provider, specify this parameter.</p>
    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the connection to read <code>reference</code> through, as returned by <code>ListEnvironmentConnections</code>. Each new version of the document uses this connection too.</p>
    /// <p>Use this parameter only with <code>reference</code>.</p>
    /// <p>If you omit this parameter, the operation uses the single connection that can read the document. If the environment has more than one connection to the same provider, specify this parameter.</p>
    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_id = input;
        self
    }
    /// <p>The ID of the connection to read <code>reference</code> through, as returned by <code>ListEnvironmentConnections</code>. Each new version of the document uses this connection too.</p>
    /// <p>Use this parameter only with <code>reference</code>.</p>
    /// <p>If you omit this parameter, the operation uses the single connection that can read the document. If the environment has more than one connection to the same provider, specify this parameter.</p>
    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_id
    }
    /// Appends an item to `control_references`.
    ///
    /// To override the contents of this collection use [`set_control_references`](Self::set_control_references).
    ///
    /// <p>The controls to link the evidence to when you add it. You can specify control links only when <code>purpose</code> is <code>CONTROL_EVIDENCE</code>.</p>
    pub fn control_references(mut self, input: crate::types::ControlReference) -> Self {
        let mut v = self.control_references.unwrap_or_default();
        v.push(input);
        self.control_references = ::std::option::Option::Some(v);
        self
    }
    /// <p>The controls to link the evidence to when you add it. You can specify control links only when <code>purpose</code> is <code>CONTROL_EVIDENCE</code>.</p>
    pub fn set_control_references(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ControlReference>>) -> Self {
        self.control_references = input;
        self
    }
    /// <p>The controls to link the evidence to when you add it. You can specify control links only when <code>purpose</code> is <code>CONTROL_EVIDENCE</code>.</p>
    pub fn get_control_references(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ControlReference>> {
        &self.control_references
    }
    /// <p>Specifies whether AWS Assurance analyzes the evidence and links it to relevant controls. A link shows that the evidence is relevant to a control, not that you meet the control. An assessment determines whether you meet the control. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>AUTO</code> – AWS Assurance analyzes the evidence and adds control links.</p></li>
    /// <li>
    /// <p><code>MANUAL</code> – AWS Assurance doesn't analyze the evidence. You add control links yourself.</p></li>
    /// </ul>
    /// <p>Automatic linking is available only to some accounts during the preview. If you omit this parameter, the default is <code>AUTO</code> for those accounts and <code>MANUAL</code> for all other accounts. Evidence whose <code>purpose</code> isn't <code>CONTROL_EVIDENCE</code> always has the mode <code>DISABLED</code>, which means that it can't be linked to controls. You can't specify <code>AUTO</code> for that evidence.</p>
    pub fn link_mode(mut self, input: crate::types::LinkMode) -> Self {
        self.link_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether AWS Assurance analyzes the evidence and links it to relevant controls. A link shows that the evidence is relevant to a control, not that you meet the control. An assessment determines whether you meet the control. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>AUTO</code> – AWS Assurance analyzes the evidence and adds control links.</p></li>
    /// <li>
    /// <p><code>MANUAL</code> – AWS Assurance doesn't analyze the evidence. You add control links yourself.</p></li>
    /// </ul>
    /// <p>Automatic linking is available only to some accounts during the preview. If you omit this parameter, the default is <code>AUTO</code> for those accounts and <code>MANUAL</code> for all other accounts. Evidence whose <code>purpose</code> isn't <code>CONTROL_EVIDENCE</code> always has the mode <code>DISABLED</code>, which means that it can't be linked to controls. You can't specify <code>AUTO</code> for that evidence.</p>
    pub fn set_link_mode(mut self, input: ::std::option::Option<crate::types::LinkMode>) -> Self {
        self.link_mode = input;
        self
    }
    /// <p>Specifies whether AWS Assurance analyzes the evidence and links it to relevant controls. A link shows that the evidence is relevant to a control, not that you meet the control. An assessment determines whether you meet the control. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>AUTO</code> – AWS Assurance analyzes the evidence and adds control links.</p></li>
    /// <li>
    /// <p><code>MANUAL</code> – AWS Assurance doesn't analyze the evidence. You add control links yourself.</p></li>
    /// </ul>
    /// <p>Automatic linking is available only to some accounts during the preview. If you omit this parameter, the default is <code>AUTO</code> for those accounts and <code>MANUAL</code> for all other accounts. Evidence whose <code>purpose</code> isn't <code>CONTROL_EVIDENCE</code> always has the mode <code>DISABLED</code>, which means that it can't be linked to controls. You can't specify <code>AUTO</code> for that evidence.</p>
    pub fn get_link_mode(&self) -> &::std::option::Option<crate::types::LinkMode> {
        &self.link_mode
    }
    /// <p>What the evidence is for. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTROL_EVIDENCE</code> – Evidence that supports controls.</p></li>
    /// <li>
    /// <p><code>FRAMEWORK_SOURCE</code> – The document that you create a custom framework from. AWS Assurance never links this evidence to controls.</p></li>
    /// </ul>
    /// <p>You can't specify <code>SCAN_EVIDENCE</code>. If you omit this parameter, a new version keeps the purpose of the existing evidence, and new evidence uses <code>CONTROL_EVIDENCE</code>. You can't change the purpose in a new version.</p>
    pub fn purpose(mut self, input: crate::types::EvidencePurpose) -> Self {
        self.purpose = ::std::option::Option::Some(input);
        self
    }
    /// <p>What the evidence is for. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTROL_EVIDENCE</code> – Evidence that supports controls.</p></li>
    /// <li>
    /// <p><code>FRAMEWORK_SOURCE</code> – The document that you create a custom framework from. AWS Assurance never links this evidence to controls.</p></li>
    /// </ul>
    /// <p>You can't specify <code>SCAN_EVIDENCE</code>. If you omit this parameter, a new version keeps the purpose of the existing evidence, and new evidence uses <code>CONTROL_EVIDENCE</code>. You can't change the purpose in a new version.</p>
    pub fn set_purpose(mut self, input: ::std::option::Option<crate::types::EvidencePurpose>) -> Self {
        self.purpose = input;
        self
    }
    /// <p>What the evidence is for. Specify one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p><code>CONTROL_EVIDENCE</code> – Evidence that supports controls.</p></li>
    /// <li>
    /// <p><code>FRAMEWORK_SOURCE</code> – The document that you create a custom framework from. AWS Assurance never links this evidence to controls.</p></li>
    /// </ul>
    /// <p>You can't specify <code>SCAN_EVIDENCE</code>. If you omit this parameter, a new version keeps the purpose of the existing evidence, and new evidence uses <code>CONTROL_EVIDENCE</code>. You can't change the purpose in a new version.</p>
    pub fn get_purpose(&self) -> &::std::option::Option<crate::types::EvidencePurpose> {
        &self.purpose
    }
    /// Consumes the builder and constructs a [`PutEvidenceInput`](crate::operation::put_evidence::PutEvidenceInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::put_evidence::PutEvidenceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_evidence::PutEvidenceInput {
            environment_arn: self.environment_arn,
            content: self.content,
            title: self.title,
            description: self.description,
            evidence_id: self.evidence_id,
            content_mime_type: self.content_mime_type,
            project: self.project,
            reference: self.reference,
            connection_id: self.connection_id,
            control_references: self.control_references,
            link_mode: self.link_mode,
            purpose: self.purpose,
        })
    }
}
impl ::std::fmt::Debug for PutEvidenceInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PutEvidenceInputBuilder");
        formatter.field("environment_arn", &self.environment_arn);
        formatter.field("content", &"*** Sensitive Data Redacted ***");
        formatter.field("title", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.field("evidence_id", &self.evidence_id);
        formatter.field("content_mime_type", &self.content_mime_type);
        formatter.field("project", &self.project);
        formatter.field("reference", &"*** Sensitive Data Redacted ***");
        formatter.field("connection_id", &self.connection_id);
        formatter.field("control_references", &self.control_references);
        formatter.field("link_mode", &self.link_mode);
        formatter.field("purpose", &self.purpose);
        formatter.finish()
    }
}