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

/// <p>An aggregation of information about Amazon ECR containers.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AwsEcrContainerAggregationResponse {
    /// <p>The resource ID of the container.</p>
    pub resource_id: ::std::option::Option<::std::string::String>,
    /// <p>The SHA value of the container image.</p>
    pub image_sha: ::std::option::Option<::std::string::String>,
    /// <p>The container repository.</p>
    pub repository: ::std::option::Option<::std::string::String>,
    /// <p>The architecture of the container.</p>
    pub architecture: ::std::option::Option<::std::string::String>,
    /// <p>The container image stags.</p>
    pub image_tags: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The Amazon Web Services account ID of the account that owns the container.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The number of finding by severity.</p>
    pub severity_counts: ::std::option::Option<crate::types::SeverityCounts>,
}
impl AwsEcrContainerAggregationResponse {
    /// <p>The resource ID of the container.</p>
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The SHA value of the container image.</p>
    pub fn image_sha(&self) -> ::std::option::Option<&str> {
        self.image_sha.as_deref()
    }
    /// <p>The container repository.</p>
    pub fn repository(&self) -> ::std::option::Option<&str> {
        self.repository.as_deref()
    }
    /// <p>The architecture of the container.</p>
    pub fn architecture(&self) -> ::std::option::Option<&str> {
        self.architecture.as_deref()
    }
    /// <p>The container image stags.</p>
    pub fn image_tags(&self) -> ::std::option::Option<&[::std::string::String]> {
        self.image_tags.as_deref()
    }
    /// <p>The Amazon Web Services account ID of the account that owns the container.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The number of finding by severity.</p>
    pub fn severity_counts(&self) -> ::std::option::Option<&crate::types::SeverityCounts> {
        self.severity_counts.as_ref()
    }
}
impl AwsEcrContainerAggregationResponse {
    /// Creates a new builder-style object to manufacture [`AwsEcrContainerAggregationResponse`](crate::types::AwsEcrContainerAggregationResponse).
    pub fn builder() -> crate::types::builders::AwsEcrContainerAggregationResponseBuilder {
        crate::types::builders::AwsEcrContainerAggregationResponseBuilder::default()
    }
}

/// A builder for [`AwsEcrContainerAggregationResponse`](crate::types::AwsEcrContainerAggregationResponse).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AwsEcrContainerAggregationResponseBuilder {
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
    pub(crate) image_sha: ::std::option::Option<::std::string::String>,
    pub(crate) repository: ::std::option::Option<::std::string::String>,
    pub(crate) architecture: ::std::option::Option<::std::string::String>,
    pub(crate) image_tags: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) severity_counts: ::std::option::Option<crate::types::SeverityCounts>,
}
impl AwsEcrContainerAggregationResponseBuilder {
    /// <p>The resource ID of the container.</p>
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The resource ID of the container.</p>
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_id = input;
        self
    }
    /// <p>The resource ID of the container.</p>
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_id
    }
    /// <p>The SHA value of the container image.</p>
    pub fn image_sha(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.image_sha = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SHA value of the container image.</p>
    pub fn set_image_sha(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.image_sha = input;
        self
    }
    /// <p>The SHA value of the container image.</p>
    pub fn get_image_sha(&self) -> &::std::option::Option<::std::string::String> {
        &self.image_sha
    }
    /// <p>The container repository.</p>
    pub fn repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The container repository.</p>
    pub fn set_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository = input;
        self
    }
    /// <p>The container repository.</p>
    pub fn get_repository(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository
    }
    /// <p>The architecture of the container.</p>
    pub fn architecture(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.architecture = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The architecture of the container.</p>
    pub fn set_architecture(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.architecture = input;
        self
    }
    /// <p>The architecture of the container.</p>
    pub fn get_architecture(&self) -> &::std::option::Option<::std::string::String> {
        &self.architecture
    }
    /// Appends an item to `image_tags`.
    ///
    /// To override the contents of this collection use [`set_image_tags`](Self::set_image_tags).
    ///
    /// <p>The container image stags.</p>
    pub fn image_tags(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.image_tags.unwrap_or_default();
        v.push(input.into());
        self.image_tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The container image stags.</p>
    pub fn set_image_tags(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.image_tags = input;
        self
    }
    /// <p>The container image stags.</p>
    pub fn get_image_tags(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.image_tags
    }
    /// <p>The Amazon Web Services account ID of the account that owns the container.</p>
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID of the account that owns the container.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID of the account that owns the container.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The number of finding by severity.</p>
    pub fn severity_counts(mut self, input: crate::types::SeverityCounts) -> Self {
        self.severity_counts = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of finding by severity.</p>
    pub fn set_severity_counts(mut self, input: ::std::option::Option<crate::types::SeverityCounts>) -> Self {
        self.severity_counts = input;
        self
    }
    /// <p>The number of finding by severity.</p>
    pub fn get_severity_counts(&self) -> &::std::option::Option<crate::types::SeverityCounts> {
        &self.severity_counts
    }
    /// Consumes the builder and constructs a [`AwsEcrContainerAggregationResponse`](crate::types::AwsEcrContainerAggregationResponse).
    pub fn build(self) -> crate::types::AwsEcrContainerAggregationResponse {
        crate::types::AwsEcrContainerAggregationResponse {
            resource_id: self.resource_id,
            image_sha: self.image_sha,
            repository: self.repository,
            architecture: self.architecture,
            image_tags: self.image_tags,
            account_id: self.account_id,
            severity_counts: self.severity_counts,
        }
    }
}