aws_sdk_bedrockagent/operation/create_flow/
_create_flow_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateFlowOutput {
6 pub name: ::std::string::String,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub execution_role_arn: ::std::string::String,
12 pub customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
14 pub id: ::std::string::String,
16 pub arn: ::std::string::String,
18 pub status: crate::types::FlowStatus,
20 pub created_at: ::aws_smithy_types::DateTime,
22 pub updated_at: ::aws_smithy_types::DateTime,
24 pub version: ::std::string::String,
26 pub definition: ::std::option::Option<crate::types::FlowDefinition>,
28 _request_id: Option<String>,
29}
30impl CreateFlowOutput {
31 pub fn name(&self) -> &str {
33 use std::ops::Deref;
34 self.name.deref()
35 }
36 pub fn description(&self) -> ::std::option::Option<&str> {
38 self.description.as_deref()
39 }
40 pub fn execution_role_arn(&self) -> &str {
42 use std::ops::Deref;
43 self.execution_role_arn.deref()
44 }
45 pub fn customer_encryption_key_arn(&self) -> ::std::option::Option<&str> {
47 self.customer_encryption_key_arn.as_deref()
48 }
49 pub fn id(&self) -> &str {
51 use std::ops::Deref;
52 self.id.deref()
53 }
54 pub fn arn(&self) -> &str {
56 use std::ops::Deref;
57 self.arn.deref()
58 }
59 pub fn status(&self) -> &crate::types::FlowStatus {
61 &self.status
62 }
63 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
65 &self.created_at
66 }
67 pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
69 &self.updated_at
70 }
71 pub fn version(&self) -> &str {
73 use std::ops::Deref;
74 self.version.deref()
75 }
76 pub fn definition(&self) -> ::std::option::Option<&crate::types::FlowDefinition> {
78 self.definition.as_ref()
79 }
80}
81impl ::std::fmt::Debug for CreateFlowOutput {
82 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
83 let mut formatter = f.debug_struct("CreateFlowOutput");
84 formatter.field("name", &self.name);
85 formatter.field("description", &self.description);
86 formatter.field("execution_role_arn", &self.execution_role_arn);
87 formatter.field("customer_encryption_key_arn", &self.customer_encryption_key_arn);
88 formatter.field("id", &self.id);
89 formatter.field("arn", &self.arn);
90 formatter.field("status", &self.status);
91 formatter.field("created_at", &self.created_at);
92 formatter.field("updated_at", &self.updated_at);
93 formatter.field("version", &self.version);
94 formatter.field("definition", &"*** Sensitive Data Redacted ***");
95 formatter.field("_request_id", &self._request_id);
96 formatter.finish()
97 }
98}
99impl ::aws_types::request_id::RequestId for CreateFlowOutput {
100 fn request_id(&self) -> Option<&str> {
101 self._request_id.as_deref()
102 }
103}
104impl CreateFlowOutput {
105 pub fn builder() -> crate::operation::create_flow::builders::CreateFlowOutputBuilder {
107 crate::operation::create_flow::builders::CreateFlowOutputBuilder::default()
108 }
109}
110
111#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
113#[non_exhaustive]
114pub struct CreateFlowOutputBuilder {
115 pub(crate) name: ::std::option::Option<::std::string::String>,
116 pub(crate) description: ::std::option::Option<::std::string::String>,
117 pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
118 pub(crate) customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
119 pub(crate) id: ::std::option::Option<::std::string::String>,
120 pub(crate) arn: ::std::option::Option<::std::string::String>,
121 pub(crate) status: ::std::option::Option<crate::types::FlowStatus>,
122 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
123 pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
124 pub(crate) version: ::std::option::Option<::std::string::String>,
125 pub(crate) definition: ::std::option::Option<crate::types::FlowDefinition>,
126 _request_id: Option<String>,
127}
128impl CreateFlowOutputBuilder {
129 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
132 self.name = ::std::option::Option::Some(input.into());
133 self
134 }
135 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
137 self.name = input;
138 self
139 }
140 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
142 &self.name
143 }
144 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.description = ::std::option::Option::Some(input.into());
147 self
148 }
149 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.description = input;
152 self
153 }
154 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
156 &self.description
157 }
158 pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.execution_role_arn = ::std::option::Option::Some(input.into());
162 self
163 }
164 pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.execution_role_arn = input;
167 self
168 }
169 pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
171 &self.execution_role_arn
172 }
173 pub fn customer_encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175 self.customer_encryption_key_arn = ::std::option::Option::Some(input.into());
176 self
177 }
178 pub fn set_customer_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180 self.customer_encryption_key_arn = input;
181 self
182 }
183 pub fn get_customer_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
185 &self.customer_encryption_key_arn
186 }
187 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
190 self.id = ::std::option::Option::Some(input.into());
191 self
192 }
193 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
195 self.id = input;
196 self
197 }
198 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
200 &self.id
201 }
202 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
205 self.arn = ::std::option::Option::Some(input.into());
206 self
207 }
208 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
210 self.arn = input;
211 self
212 }
213 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
215 &self.arn
216 }
217 pub fn status(mut self, input: crate::types::FlowStatus) -> Self {
220 self.status = ::std::option::Option::Some(input);
221 self
222 }
223 pub fn set_status(mut self, input: ::std::option::Option<crate::types::FlowStatus>) -> Self {
225 self.status = input;
226 self
227 }
228 pub fn get_status(&self) -> &::std::option::Option<crate::types::FlowStatus> {
230 &self.status
231 }
232 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
235 self.created_at = ::std::option::Option::Some(input);
236 self
237 }
238 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
240 self.created_at = input;
241 self
242 }
243 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
245 &self.created_at
246 }
247 pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
250 self.updated_at = ::std::option::Option::Some(input);
251 self
252 }
253 pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
255 self.updated_at = input;
256 self
257 }
258 pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
260 &self.updated_at
261 }
262 pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265 self.version = ::std::option::Option::Some(input.into());
266 self
267 }
268 pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
270 self.version = input;
271 self
272 }
273 pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
275 &self.version
276 }
277 pub fn definition(mut self, input: crate::types::FlowDefinition) -> Self {
279 self.definition = ::std::option::Option::Some(input);
280 self
281 }
282 pub fn set_definition(mut self, input: ::std::option::Option<crate::types::FlowDefinition>) -> Self {
284 self.definition = input;
285 self
286 }
287 pub fn get_definition(&self) -> &::std::option::Option<crate::types::FlowDefinition> {
289 &self.definition
290 }
291 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
292 self._request_id = Some(request_id.into());
293 self
294 }
295
296 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
297 self._request_id = request_id;
298 self
299 }
300 pub fn build(self) -> ::std::result::Result<crate::operation::create_flow::CreateFlowOutput, ::aws_smithy_types::error::operation::BuildError> {
311 ::std::result::Result::Ok(crate::operation::create_flow::CreateFlowOutput {
312 name: self.name.ok_or_else(|| {
313 ::aws_smithy_types::error::operation::BuildError::missing_field(
314 "name",
315 "name was not specified but it is required when building CreateFlowOutput",
316 )
317 })?,
318 description: self.description,
319 execution_role_arn: self.execution_role_arn.ok_or_else(|| {
320 ::aws_smithy_types::error::operation::BuildError::missing_field(
321 "execution_role_arn",
322 "execution_role_arn was not specified but it is required when building CreateFlowOutput",
323 )
324 })?,
325 customer_encryption_key_arn: self.customer_encryption_key_arn,
326 id: self.id.ok_or_else(|| {
327 ::aws_smithy_types::error::operation::BuildError::missing_field(
328 "id",
329 "id was not specified but it is required when building CreateFlowOutput",
330 )
331 })?,
332 arn: self.arn.ok_or_else(|| {
333 ::aws_smithy_types::error::operation::BuildError::missing_field(
334 "arn",
335 "arn was not specified but it is required when building CreateFlowOutput",
336 )
337 })?,
338 status: self.status.ok_or_else(|| {
339 ::aws_smithy_types::error::operation::BuildError::missing_field(
340 "status",
341 "status was not specified but it is required when building CreateFlowOutput",
342 )
343 })?,
344 created_at: self.created_at.ok_or_else(|| {
345 ::aws_smithy_types::error::operation::BuildError::missing_field(
346 "created_at",
347 "created_at was not specified but it is required when building CreateFlowOutput",
348 )
349 })?,
350 updated_at: self.updated_at.ok_or_else(|| {
351 ::aws_smithy_types::error::operation::BuildError::missing_field(
352 "updated_at",
353 "updated_at was not specified but it is required when building CreateFlowOutput",
354 )
355 })?,
356 version: self.version.ok_or_else(|| {
357 ::aws_smithy_types::error::operation::BuildError::missing_field(
358 "version",
359 "version was not specified but it is required when building CreateFlowOutput",
360 )
361 })?,
362 definition: self.definition,
363 _request_id: self._request_id,
364 })
365 }
366}
367impl ::std::fmt::Debug for CreateFlowOutputBuilder {
368 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
369 let mut formatter = f.debug_struct("CreateFlowOutputBuilder");
370 formatter.field("name", &self.name);
371 formatter.field("description", &self.description);
372 formatter.field("execution_role_arn", &self.execution_role_arn);
373 formatter.field("customer_encryption_key_arn", &self.customer_encryption_key_arn);
374 formatter.field("id", &self.id);
375 formatter.field("arn", &self.arn);
376 formatter.field("status", &self.status);
377 formatter.field("created_at", &self.created_at);
378 formatter.field("updated_at", &self.updated_at);
379 formatter.field("version", &self.version);
380 formatter.field("definition", &"*** Sensitive Data Redacted ***");
381 formatter.field("_request_id", &self._request_id);
382 formatter.finish()
383 }
384}