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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains settings for Image Builder image resource and container image scans.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImageScanningConfiguration {
    /// <p>A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.</p>
    pub image_scanning_enabled: ::std::option::Option<bool>,
    /// <p>Contains Amazon ECR settings for vulnerability scans.</p>
    pub ecr_configuration: ::std::option::Option<crate::types::EcrConfiguration>,
}
impl ImageScanningConfiguration {
    /// <p>A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.</p>
    pub fn image_scanning_enabled(&self) -> ::std::option::Option<bool> {
        self.image_scanning_enabled
    }
    /// <p>Contains Amazon ECR settings for vulnerability scans.</p>
    pub fn ecr_configuration(&self) -> ::std::option::Option<&crate::types::EcrConfiguration> {
        self.ecr_configuration.as_ref()
    }
}
impl ImageScanningConfiguration {
    /// Creates a new builder-style object to manufacture [`ImageScanningConfiguration`](crate::types::ImageScanningConfiguration).
    pub fn builder() -> crate::types::builders::ImageScanningConfigurationBuilder {
        crate::types::builders::ImageScanningConfigurationBuilder::default()
    }
}

/// A builder for [`ImageScanningConfiguration`](crate::types::ImageScanningConfiguration).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ImageScanningConfigurationBuilder {
    pub(crate) image_scanning_enabled: ::std::option::Option<bool>,
    pub(crate) ecr_configuration: ::std::option::Option<crate::types::EcrConfiguration>,
}
impl ImageScanningConfigurationBuilder {
    /// <p>A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.</p>
    pub fn image_scanning_enabled(mut self, input: bool) -> Self {
        self.image_scanning_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.</p>
    pub fn set_image_scanning_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.image_scanning_enabled = input;
        self
    }
    /// <p>A setting that indicates whether Image Builder keeps a snapshot of the vulnerability scans that Amazon Inspector runs against the build instance when you create a new image.</p>
    pub fn get_image_scanning_enabled(&self) -> &::std::option::Option<bool> {
        &self.image_scanning_enabled
    }
    /// <p>Contains Amazon ECR settings for vulnerability scans.</p>
    pub fn ecr_configuration(mut self, input: crate::types::EcrConfiguration) -> Self {
        self.ecr_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains Amazon ECR settings for vulnerability scans.</p>
    pub fn set_ecr_configuration(mut self, input: ::std::option::Option<crate::types::EcrConfiguration>) -> Self {
        self.ecr_configuration = input;
        self
    }
    /// <p>Contains Amazon ECR settings for vulnerability scans.</p>
    pub fn get_ecr_configuration(&self) -> &::std::option::Option<crate::types::EcrConfiguration> {
        &self.ecr_configuration
    }
    /// Consumes the builder and constructs a [`ImageScanningConfiguration`](crate::types::ImageScanningConfiguration).
    pub fn build(self) -> crate::types::ImageScanningConfiguration {
        crate::types::ImageScanningConfiguration {
            image_scanning_enabled: self.image_scanning_enabled,
            ecr_configuration: self.ecr_configuration,
        }
    }
}