aws_sdk_securityagent/operation/create_pentest/
_create_pentest_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreatePentestOutput {
7 pub pentest_id: ::std::option::Option<::std::string::String>,
9 pub title: ::std::option::Option<::std::string::String>,
11 pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
13 pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
15 pub assets: ::std::option::Option<crate::types::Assets>,
17 pub exclude_risk_types: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>,
19 pub service_role: ::std::option::Option<::std::string::String>,
21 pub log_config: ::std::option::Option<crate::types::CloudWatchLog>,
23 pub agent_space_id: ::std::option::Option<::std::string::String>,
25 _request_id: Option<String>,
26}
27impl CreatePentestOutput {
28 pub fn pentest_id(&self) -> ::std::option::Option<&str> {
30 self.pentest_id.as_deref()
31 }
32 pub fn title(&self) -> ::std::option::Option<&str> {
34 self.title.as_deref()
35 }
36 pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
38 self.created_at.as_ref()
39 }
40 pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
42 self.updated_at.as_ref()
43 }
44 pub fn assets(&self) -> ::std::option::Option<&crate::types::Assets> {
46 self.assets.as_ref()
47 }
48 pub fn exclude_risk_types(&self) -> &[crate::types::RiskType] {
52 self.exclude_risk_types.as_deref().unwrap_or_default()
53 }
54 pub fn service_role(&self) -> ::std::option::Option<&str> {
56 self.service_role.as_deref()
57 }
58 pub fn log_config(&self) -> ::std::option::Option<&crate::types::CloudWatchLog> {
60 self.log_config.as_ref()
61 }
62 pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
64 self.agent_space_id.as_deref()
65 }
66}
67impl ::aws_types::request_id::RequestId for CreatePentestOutput {
68 fn request_id(&self) -> Option<&str> {
69 self._request_id.as_deref()
70 }
71}
72impl CreatePentestOutput {
73 pub fn builder() -> crate::operation::create_pentest::builders::CreatePentestOutputBuilder {
75 crate::operation::create_pentest::builders::CreatePentestOutputBuilder::default()
76 }
77}
78
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
81#[non_exhaustive]
82pub struct CreatePentestOutputBuilder {
83 pub(crate) pentest_id: ::std::option::Option<::std::string::String>,
84 pub(crate) title: ::std::option::Option<::std::string::String>,
85 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
86 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
87 pub(crate) assets: ::std::option::Option<crate::types::Assets>,
88 pub(crate) exclude_risk_types: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>,
89 pub(crate) service_role: ::std::option::Option<::std::string::String>,
90 pub(crate) log_config: ::std::option::Option<crate::types::CloudWatchLog>,
91 pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
92 _request_id: Option<String>,
93}
94impl CreatePentestOutputBuilder {
95 pub fn pentest_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97 self.pentest_id = ::std::option::Option::Some(input.into());
98 self
99 }
100 pub fn set_pentest_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102 self.pentest_id = input;
103 self
104 }
105 pub fn get_pentest_id(&self) -> &::std::option::Option<::std::string::String> {
107 &self.pentest_id
108 }
109 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111 self.title = ::std::option::Option::Some(input.into());
112 self
113 }
114 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116 self.title = input;
117 self
118 }
119 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
121 &self.title
122 }
123 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
125 self.created_at = ::std::option::Option::Some(input);
126 self
127 }
128 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
130 self.created_at = input;
131 self
132 }
133 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
135 &self.created_at
136 }
137 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
139 self.updated_at = ::std::option::Option::Some(input);
140 self
141 }
142 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
144 self.updated_at = input;
145 self
146 }
147 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
149 &self.updated_at
150 }
151 pub fn assets(mut self, input: crate::types::Assets) -> Self {
153 self.assets = ::std::option::Option::Some(input);
154 self
155 }
156 pub fn set_assets(mut self, input: ::std::option::Option<crate::types::Assets>) -> Self {
158 self.assets = input;
159 self
160 }
161 pub fn get_assets(&self) -> &::std::option::Option<crate::types::Assets> {
163 &self.assets
164 }
165 pub fn exclude_risk_types(mut self, input: crate::types::RiskType) -> Self {
171 let mut v = self.exclude_risk_types.unwrap_or_default();
172 v.push(input);
173 self.exclude_risk_types = ::std::option::Option::Some(v);
174 self
175 }
176 pub fn set_exclude_risk_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::RiskType>>) -> Self {
178 self.exclude_risk_types = input;
179 self
180 }
181 pub fn get_exclude_risk_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::RiskType>> {
183 &self.exclude_risk_types
184 }
185 pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187 self.service_role = ::std::option::Option::Some(input.into());
188 self
189 }
190 pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192 self.service_role = input;
193 self
194 }
195 pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
197 &self.service_role
198 }
199 pub fn log_config(mut self, input: crate::types::CloudWatchLog) -> Self {
201 self.log_config = ::std::option::Option::Some(input);
202 self
203 }
204 pub fn set_log_config(mut self, input: ::std::option::Option<crate::types::CloudWatchLog>) -> Self {
206 self.log_config = input;
207 self
208 }
209 pub fn get_log_config(&self) -> &::std::option::Option<crate::types::CloudWatchLog> {
211 &self.log_config
212 }
213 pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215 self.agent_space_id = ::std::option::Option::Some(input.into());
216 self
217 }
218 pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220 self.agent_space_id = input;
221 self
222 }
223 pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
225 &self.agent_space_id
226 }
227 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
228 self._request_id = Some(request_id.into());
229 self
230 }
231
232 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
233 self._request_id = request_id;
234 self
235 }
236 pub fn build(self) -> crate::operation::create_pentest::CreatePentestOutput {
238 crate::operation::create_pentest::CreatePentestOutput {
239 pentest_id: self.pentest_id,
240 title: self.title,
241 created_at: self.created_at,
242 updated_at: self.updated_at,
243 assets: self.assets,
244 exclude_risk_types: self.exclude_risk_types,
245 service_role: self.service_role,
246 log_config: self.log_config,
247 agent_space_id: self.agent_space_id,
248 _request_id: self._request_id,
249 }
250 }
251}