aws_sdk_securityagent/operation/update_pentest/
_update_pentest_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdatePentestInput {
7 pub pentest_id: ::std::option::Option<::std::string::String>,
9 pub agent_space_id: ::std::option::Option<::std::string::String>,
11 pub title: ::std::option::Option<::std::string::String>,
13 pub assets: ::std::option::Option<crate::types::Assets>,
15 pub exclude_risk_types: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>,
17 pub service_role: ::std::option::Option<::std::string::String>,
19 pub log_config: ::std::option::Option<crate::types::CloudWatchLog>,
21 pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
23 pub network_traffic_config: ::std::option::Option<crate::types::NetworkTrafficConfig>,
25 pub code_remediation_strategy: ::std::option::Option<crate::types::CodeRemediationStrategy>,
27 pub disable_managed_skills: ::std::option::Option<::std::vec::Vec<crate::types::SkillType>>,
29}
30impl UpdatePentestInput {
31 pub fn pentest_id(&self) -> ::std::option::Option<&str> {
33 self.pentest_id.as_deref()
34 }
35 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
37 self.agent_space_id.as_deref()
38 }
39 pub fn title(&self) -> ::std::option::Option<&str> {
41 self.title.as_deref()
42 }
43 pub fn assets(&self) -> ::std::option::Option<&crate::types::Assets> {
45 self.assets.as_ref()
46 }
47 pub fn exclude_risk_types(&self) -> &[crate::types::RiskType] {
51 self.exclude_risk_types.as_deref().unwrap_or_default()
52 }
53 pub fn service_role(&self) -> ::std::option::Option<&str> {
55 self.service_role.as_deref()
56 }
57 pub fn log_config(&self) -> ::std::option::Option<&crate::types::CloudWatchLog> {
59 self.log_config.as_ref()
60 }
61 pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
63 self.vpc_config.as_ref()
64 }
65 pub fn network_traffic_config(&self) -> ::std::option::Option<&crate::types::NetworkTrafficConfig> {
67 self.network_traffic_config.as_ref()
68 }
69 pub fn code_remediation_strategy(&self) -> ::std::option::Option<&crate::types::CodeRemediationStrategy> {
71 self.code_remediation_strategy.as_ref()
72 }
73 pub fn disable_managed_skills(&self) -> &[crate::types::SkillType] {
77 self.disable_managed_skills.as_deref().unwrap_or_default()
78 }
79}
80impl UpdatePentestInput {
81 pub fn builder() -> crate::operation::update_pentest::builders::UpdatePentestInputBuilder {
83 crate::operation::update_pentest::builders::UpdatePentestInputBuilder::default()
84 }
85}
86
87#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
89#[non_exhaustive]
90pub struct UpdatePentestInputBuilder {
91 pub(crate) pentest_id: ::std::option::Option<::std::string::String>,
92 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
93 pub(crate) title: ::std::option::Option<::std::string::String>,
94 pub(crate) assets: ::std::option::Option<crate::types::Assets>,
95 pub(crate) exclude_risk_types: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>,
96 pub(crate) service_role: ::std::option::Option<::std::string::String>,
97 pub(crate) log_config: ::std::option::Option<crate::types::CloudWatchLog>,
98 pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
99 pub(crate) network_traffic_config: ::std::option::Option<crate::types::NetworkTrafficConfig>,
100 pub(crate) code_remediation_strategy: ::std::option::Option<crate::types::CodeRemediationStrategy>,
101 pub(crate) disable_managed_skills: ::std::option::Option<::std::vec::Vec<crate::types::SkillType>>,
102}
103impl UpdatePentestInputBuilder {
104 pub fn pentest_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107 self.pentest_id = ::std::option::Option::Some(input.into());
108 self
109 }
110 pub fn set_pentest_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112 self.pentest_id = input;
113 self
114 }
115 pub fn get_pentest_id(&self) -> &::std::option::Option<::std::string::String> {
117 &self.pentest_id
118 }
119 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.agent_space_id = ::std::option::Option::Some(input.into());
123 self
124 }
125 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.agent_space_id = input;
128 self
129 }
130 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
132 &self.agent_space_id
133 }
134 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136 self.title = ::std::option::Option::Some(input.into());
137 self
138 }
139 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141 self.title = input;
142 self
143 }
144 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
146 &self.title
147 }
148 pub fn assets(mut self, input: crate::types::Assets) -> Self {
150 self.assets = ::std::option::Option::Some(input);
151 self
152 }
153 pub fn set_assets(mut self, input: ::std::option::Option<crate::types::Assets>) -> Self {
155 self.assets = input;
156 self
157 }
158 pub fn get_assets(&self) -> &::std::option::Option<crate::types::Assets> {
160 &self.assets
161 }
162 pub fn exclude_risk_types(mut self, input: crate::types::RiskType) -> Self {
168 let mut v = self.exclude_risk_types.unwrap_or_default();
169 v.push(input);
170 self.exclude_risk_types = ::std::option::Option::Some(v);
171 self
172 }
173 pub fn set_exclude_risk_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>) -> Self {
175 self.exclude_risk_types = input;
176 self
177 }
178 pub fn get_exclude_risk_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RiskType>> {
180 &self.exclude_risk_types
181 }
182 pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184 self.service_role = ::std::option::Option::Some(input.into());
185 self
186 }
187 pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189 self.service_role = input;
190 self
191 }
192 pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
194 &self.service_role
195 }
196 pub fn log_config(mut self, input: crate::types::CloudWatchLog) -> Self {
198 self.log_config = ::std::option::Option::Some(input);
199 self
200 }
201 pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::CloudWatchLog>) -> Self {
203 self.log_config = input;
204 self
205 }
206 pub fn get_log_config(&self) -> &::std::option::Option<crate::types::CloudWatchLog> {
208 &self.log_config
209 }
210 pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
212 self.vpc_config = ::std::option::Option::Some(input);
213 self
214 }
215 pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
217 self.vpc_config = input;
218 self
219 }
220 pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
222 &self.vpc_config
223 }
224 pub fn network_traffic_config(mut self, input: crate::types::NetworkTrafficConfig) -> Self {
226 self.network_traffic_config = ::std::option::Option::Some(input);
227 self
228 }
229 pub fn set_network_traffic_config(mut self, input: ::std::option::Option<crate::types::NetworkTrafficConfig>) -> Self {
231 self.network_traffic_config = input;
232 self
233 }
234 pub fn get_network_traffic_config(&self) -> &::std::option::Option<crate::types::NetworkTrafficConfig> {
236 &self.network_traffic_config
237 }
238 pub fn code_remediation_strategy(mut self, input: crate::types::CodeRemediationStrategy) -> Self {
240 self.code_remediation_strategy = ::std::option::Option::Some(input);
241 self
242 }
243 pub fn set_code_remediation_strategy(mut self, input: ::std::option::Option<crate::types::CodeRemediationStrategy>) -> Self {
245 self.code_remediation_strategy = input;
246 self
247 }
248 pub fn get_code_remediation_strategy(&self) -> &::std::option::Option<crate::types::CodeRemediationStrategy> {
250 &self.code_remediation_strategy
251 }
252 pub fn disable_managed_skills(mut self, input: crate::types::SkillType) -> Self {
258 let mut v = self.disable_managed_skills.unwrap_or_default();
259 v.push(input);
260 self.disable_managed_skills = ::std::option::Option::Some(v);
261 self
262 }
263 pub fn set_disable_managed_skills(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SkillType>>) -> Self {
265 self.disable_managed_skills = input;
266 self
267 }
268 pub fn get_disable_managed_skills(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SkillType>> {
270 &self.disable_managed_skills
271 }
272 pub fn build(
274 self,
275 ) -> ::std::result::Result<crate::operation::update_pentest::UpdatePentestInput, ::aws_smithy_types::error::operation::BuildError> {
276 ::std::result::Result::Ok(crate::operation::update_pentest::UpdatePentestInput {
277 pentest_id: self.pentest_id,
278 agent_space_id: self.agent_space_id,
279 title: self.title,
280 assets: self.assets,
281 exclude_risk_types: self.exclude_risk_types,
282 service_role: self.service_role,
283 log_config: self.log_config,
284 vpc_config: self.vpc_config,
285 network_traffic_config: self.network_traffic_config,
286 code_remediation_strategy: self.code_remediation_strategy,
287 disable_managed_skills: self.disable_managed_skills,
288 })
289 }
290}