aws_sdk_imagebuilder/types/
_vulnerable_package.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct VulnerablePackage {
7 pub name: ::std::option::Option<::std::string::String>,
9 pub version: ::std::option::Option<::std::string::String>,
11 pub source_layer_hash: ::std::option::Option<::std::string::String>,
13 pub epoch: ::std::option::Option<i32>,
15 pub release: ::std::option::Option<::std::string::String>,
17 pub arch: ::std::option::Option<::std::string::String>,
19 pub package_manager: ::std::option::Option<::std::string::String>,
21 pub file_path: ::std::option::Option<::std::string::String>,
23 pub fixed_in_version: ::std::option::Option<::std::string::String>,
25 pub remediation: ::std::option::Option<::std::string::String>,
27}
28impl VulnerablePackage {
29 pub fn name(&self) -> ::std::option::Option<&str> {
31 self.name.as_deref()
32 }
33 pub fn version(&self) -> ::std::option::Option<&str> {
35 self.version.as_deref()
36 }
37 pub fn source_layer_hash(&self) -> ::std::option::Option<&str> {
39 self.source_layer_hash.as_deref()
40 }
41 pub fn epoch(&self) -> ::std::option::Option<i32> {
43 self.epoch
44 }
45 pub fn release(&self) -> ::std::option::Option<&str> {
47 self.release.as_deref()
48 }
49 pub fn arch(&self) -> ::std::option::Option<&str> {
51 self.arch.as_deref()
52 }
53 pub fn package_manager(&self) -> ::std::option::Option<&str> {
55 self.package_manager.as_deref()
56 }
57 pub fn file_path(&self) -> ::std::option::Option<&str> {
59 self.file_path.as_deref()
60 }
61 pub fn fixed_in_version(&self) -> ::std::option::Option<&str> {
63 self.fixed_in_version.as_deref()
64 }
65 pub fn remediation(&self) -> ::std::option::Option<&str> {
67 self.remediation.as_deref()
68 }
69}
70impl VulnerablePackage {
71 pub fn builder() -> crate::types::builders::VulnerablePackageBuilder {
73 crate::types::builders::VulnerablePackageBuilder::default()
74 }
75}
76
77#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
79#[non_exhaustive]
80pub struct VulnerablePackageBuilder {
81 pub(crate) name: ::std::option::Option<::std::string::String>,
82 pub(crate) version: ::std::option::Option<::std::string::String>,
83 pub(crate) source_layer_hash: ::std::option::Option<::std::string::String>,
84 pub(crate) epoch: ::std::option::Option<i32>,
85 pub(crate) release: ::std::option::Option<::std::string::String>,
86 pub(crate) arch: ::std::option::Option<::std::string::String>,
87 pub(crate) package_manager: ::std::option::Option<::std::string::String>,
88 pub(crate) file_path: ::std::option::Option<::std::string::String>,
89 pub(crate) fixed_in_version: ::std::option::Option<::std::string::String>,
90 pub(crate) remediation: ::std::option::Option<::std::string::String>,
91}
92impl VulnerablePackageBuilder {
93 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.name = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.name = input;
101 self
102 }
103 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
105 &self.name
106 }
107 pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.version = ::std::option::Option::Some(input.into());
110 self
111 }
112 pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.version = input;
115 self
116 }
117 pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
119 &self.version
120 }
121 pub fn source_layer_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.source_layer_hash = ::std::option::Option::Some(input.into());
124 self
125 }
126 pub fn set_source_layer_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
128 self.source_layer_hash = input;
129 self
130 }
131 pub fn get_source_layer_hash(&self) -> &::std::option::Option<::std::string::String> {
133 &self.source_layer_hash
134 }
135 pub fn epoch(mut self, input: i32) -> Self {
137 self.epoch = ::std::option::Option::Some(input);
138 self
139 }
140 pub fn set_epoch(mut self, input: ::std::option::Option<i32>) -> Self {
142 self.epoch = input;
143 self
144 }
145 pub fn get_epoch(&self) -> &::std::option::Option<i32> {
147 &self.epoch
148 }
149 pub fn release(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.release = ::std::option::Option::Some(input.into());
152 self
153 }
154 pub fn set_release(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.release = input;
157 self
158 }
159 pub fn get_release(&self) -> &::std::option::Option<::std::string::String> {
161 &self.release
162 }
163 pub fn arch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165 self.arch = ::std::option::Option::Some(input.into());
166 self
167 }
168 pub fn set_arch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170 self.arch = input;
171 self
172 }
173 pub fn get_arch(&self) -> &::std::option::Option<::std::string::String> {
175 &self.arch
176 }
177 pub fn package_manager(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179 self.package_manager = ::std::option::Option::Some(input.into());
180 self
181 }
182 pub fn set_package_manager(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184 self.package_manager = input;
185 self
186 }
187 pub fn get_package_manager(&self) -> &::std::option::Option<::std::string::String> {
189 &self.package_manager
190 }
191 pub fn file_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
193 self.file_path = ::std::option::Option::Some(input.into());
194 self
195 }
196 pub fn set_file_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
198 self.file_path = input;
199 self
200 }
201 pub fn get_file_path(&self) -> &::std::option::Option<::std::string::String> {
203 &self.file_path
204 }
205 pub fn fixed_in_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207 self.fixed_in_version = ::std::option::Option::Some(input.into());
208 self
209 }
210 pub fn set_fixed_in_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212 self.fixed_in_version = input;
213 self
214 }
215 pub fn get_fixed_in_version(&self) -> &::std::option::Option<::std::string::String> {
217 &self.fixed_in_version
218 }
219 pub fn remediation(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221 self.remediation = ::std::option::Option::Some(input.into());
222 self
223 }
224 pub fn set_remediation(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226 self.remediation = input;
227 self
228 }
229 pub fn get_remediation(&self) -> &::std::option::Option<::std::string::String> {
231 &self.remediation
232 }
233 pub fn build(self) -> crate::types::VulnerablePackage {
235 crate::types::VulnerablePackage {
236 name: self.name,
237 version: self.version,
238 source_layer_hash: self.source_layer_hash,
239 epoch: self.epoch,
240 release: self.release,
241 arch: self.arch,
242 package_manager: self.package_manager,
243 file_path: self.file_path,
244 fixed_in_version: self.fixed_in_version,
245 remediation: self.remediation,
246 }
247 }
248}