Skip to main content

aws_sdk_securityagent/operation/update_pentest/
_update_pentest_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Input for updating an existing pentest.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdatePentestInput {
7    /// <p>The unique identifier of the pentest to update.</p>
8    pub pentest_id: ::std::option::Option<::std::string::String>,
9    /// <p>The unique identifier of the agent space that contains the pentest.</p>
10    pub agent_space_id: ::std::option::Option<::std::string::String>,
11    /// <p>The updated title of the pentest.</p>
12    pub title: ::std::option::Option<::std::string::String>,
13    /// <p>The updated assets for the pentest.</p>
14    pub assets: ::std::option::Option<crate::types::Assets>,
15    /// <p>The updated list of risk types to exclude from the pentest.</p>
16    pub exclude_risk_types: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>,
17    /// <p>The updated IAM service role for the pentest.</p>
18    pub service_role: ::std::option::Option<::std::string::String>,
19    /// <p>The updated CloudWatch Logs configuration for the pentest.</p>
20    pub log_config: ::std::option::Option<crate::types::CloudWatchLog>,
21    /// <p>The updated VPC configuration for the pentest.</p>
22    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
23    /// <p>The updated network traffic configuration for the pentest.</p>
24    pub network_traffic_config: ::std::option::Option<crate::types::NetworkTrafficConfig>,
25    /// <p>The updated code remediation strategy for the pentest.</p>
26    pub code_remediation_strategy: ::std::option::Option<crate::types::CodeRemediationStrategy>,
27    /// <p>The updated list of managed skills to disable for this pentest. Valid values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.</p>
28    pub disable_managed_skills: ::std::option::Option<::std::vec::Vec<crate::types::SkillType>>,
29}
30impl UpdatePentestInput {
31    /// <p>The unique identifier of the pentest to update.</p>
32    pub fn pentest_id(&self) -> ::std::option::Option<&str> {
33        self.pentest_id.as_deref()
34    }
35    /// <p>The unique identifier of the agent space that contains the pentest.</p>
36    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
37        self.agent_space_id.as_deref()
38    }
39    /// <p>The updated title of the pentest.</p>
40    pub fn title(&self) -> ::std::option::Option<&str> {
41        self.title.as_deref()
42    }
43    /// <p>The updated assets for the pentest.</p>
44    pub fn assets(&self) -> ::std::option::Option<&crate::types::Assets> {
45        self.assets.as_ref()
46    }
47    /// <p>The updated list of risk types to exclude from the pentest.</p>
48    ///
49    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.exclude_risk_types.is_none()`.
50    pub fn exclude_risk_types(&self) -> &[crate::types::RiskType] {
51        self.exclude_risk_types.as_deref().unwrap_or_default()
52    }
53    /// <p>The updated IAM service role for the pentest.</p>
54    pub fn service_role(&self) -> ::std::option::Option<&str> {
55        self.service_role.as_deref()
56    }
57    /// <p>The updated CloudWatch Logs configuration for the pentest.</p>
58    pub fn log_config(&self) -> ::std::option::Option<&crate::types::CloudWatchLog> {
59        self.log_config.as_ref()
60    }
61    /// <p>The updated VPC configuration for the pentest.</p>
62    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
63        self.vpc_config.as_ref()
64    }
65    /// <p>The updated network traffic configuration for the pentest.</p>
66    pub fn network_traffic_config(&self) -> ::std::option::Option<&crate::types::NetworkTrafficConfig> {
67        self.network_traffic_config.as_ref()
68    }
69    /// <p>The updated code remediation strategy for the pentest.</p>
70    pub fn code_remediation_strategy(&self) -> ::std::option::Option<&crate::types::CodeRemediationStrategy> {
71        self.code_remediation_strategy.as_ref()
72    }
73    /// <p>The updated list of managed skills to disable for this pentest. Valid values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.</p>
74    ///
75    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.disable_managed_skills.is_none()`.
76    pub fn disable_managed_skills(&self) -> &[crate::types::SkillType] {
77        self.disable_managed_skills.as_deref().unwrap_or_default()
78    }
79}
80impl UpdatePentestInput {
81    /// Creates a new builder-style object to manufacture [`UpdatePentestInput`](crate::operation::update_pentest::UpdatePentestInput).
82    pub fn builder() -> crate::operation::update_pentest::builders::UpdatePentestInputBuilder {
83        crate::operation::update_pentest::builders::UpdatePentestInputBuilder::default()
84    }
85}
86
87/// A builder for [`UpdatePentestInput`](crate::operation::update_pentest::UpdatePentestInput).
88#[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    /// <p>The unique identifier of the pentest to update.</p>
105    /// This field is required.
106    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    /// <p>The unique identifier of the pentest to update.</p>
111    pub fn set_pentest_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
112        self.pentest_id = input;
113        self
114    }
115    /// <p>The unique identifier of the pentest to update.</p>
116    pub fn get_pentest_id(&self) -> &::std::option::Option<::std::string::String> {
117        &self.pentest_id
118    }
119    /// <p>The unique identifier of the agent space that contains the pentest.</p>
120    /// This field is required.
121    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    /// <p>The unique identifier of the agent space that contains the pentest.</p>
126    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    /// <p>The unique identifier of the agent space that contains the pentest.</p>
131    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
132        &self.agent_space_id
133    }
134    /// <p>The updated title of the pentest.</p>
135    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    /// <p>The updated title of the pentest.</p>
140    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.title = input;
142        self
143    }
144    /// <p>The updated title of the pentest.</p>
145    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
146        &self.title
147    }
148    /// <p>The updated assets for the pentest.</p>
149    pub fn assets(mut self, input: crate::types::Assets) -> Self {
150        self.assets = ::std::option::Option::Some(input);
151        self
152    }
153    /// <p>The updated assets for the pentest.</p>
154    pub fn set_assets(mut self, input: ::std::option::Option<crate::types::Assets>) -> Self {
155        self.assets = input;
156        self
157    }
158    /// <p>The updated assets for the pentest.</p>
159    pub fn get_assets(&self) -> &::std::option::Option<crate::types::Assets> {
160        &self.assets
161    }
162    /// Appends an item to `exclude_risk_types`.
163    ///
164    /// To override the contents of this collection use [`set_exclude_risk_types`](Self::set_exclude_risk_types).
165    ///
166    /// <p>The updated list of risk types to exclude from the pentest.</p>
167    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    /// <p>The updated list of risk types to exclude from the pentest.</p>
174    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    /// <p>The updated list of risk types to exclude from the pentest.</p>
179    pub fn get_exclude_risk_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RiskType>> {
180        &self.exclude_risk_types
181    }
182    /// <p>The updated IAM service role for the pentest.</p>
183    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    /// <p>The updated IAM service role for the pentest.</p>
188    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
189        self.service_role = input;
190        self
191    }
192    /// <p>The updated IAM service role for the pentest.</p>
193    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
194        &self.service_role
195    }
196    /// <p>The updated CloudWatch Logs configuration for the pentest.</p>
197    pub fn log_config(mut self, input: crate::types::CloudWatchLog) -> Self {
198        self.log_config = ::std::option::Option::Some(input);
199        self
200    }
201    /// <p>The updated CloudWatch Logs configuration for the pentest.</p>
202    pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::CloudWatchLog>) -> Self {
203        self.log_config = input;
204        self
205    }
206    /// <p>The updated CloudWatch Logs configuration for the pentest.</p>
207    pub fn get_log_config(&self) -> &::std::option::Option<crate::types::CloudWatchLog> {
208        &self.log_config
209    }
210    /// <p>The updated VPC configuration for the pentest.</p>
211    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
212        self.vpc_config = ::std::option::Option::Some(input);
213        self
214    }
215    /// <p>The updated VPC configuration for the pentest.</p>
216    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
217        self.vpc_config = input;
218        self
219    }
220    /// <p>The updated VPC configuration for the pentest.</p>
221    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
222        &self.vpc_config
223    }
224    /// <p>The updated network traffic configuration for the pentest.</p>
225    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    /// <p>The updated network traffic configuration for the pentest.</p>
230    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    /// <p>The updated network traffic configuration for the pentest.</p>
235    pub fn get_network_traffic_config(&self) -> &::std::option::Option<crate::types::NetworkTrafficConfig> {
236        &self.network_traffic_config
237    }
238    /// <p>The updated code remediation strategy for the pentest.</p>
239    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    /// <p>The updated code remediation strategy for the pentest.</p>
244    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    /// <p>The updated code remediation strategy for the pentest.</p>
249    pub fn get_code_remediation_strategy(&self) -> &::std::option::Option<crate::types::CodeRemediationStrategy> {
250        &self.code_remediation_strategy
251    }
252    /// Appends an item to `disable_managed_skills`.
253    ///
254    /// To override the contents of this collection use [`set_disable_managed_skills`](Self::set_disable_managed_skills).
255    ///
256    /// <p>The updated list of managed skills to disable for this pentest. Valid values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.</p>
257    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    /// <p>The updated list of managed skills to disable for this pentest. Valid values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.</p>
264    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    /// <p>The updated list of managed skills to disable for this pentest. Valid values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.</p>
269    pub fn get_disable_managed_skills(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SkillType>> {
270        &self.disable_managed_skills
271    }
272    /// Consumes the builder and constructs a [`UpdatePentestInput`](crate::operation::update_pentest::UpdatePentestInput).
273    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}