aws_sdk_bedrockagent/operation/create_flow/
_create_flow_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct CreateFlowInput {
6 pub name: ::std::option::Option<::std::string::String>,
8 pub description: ::std::option::Option<::std::string::String>,
10 pub execution_role_arn: ::std::option::Option<::std::string::String>,
12 pub customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
14 pub definition: ::std::option::Option<crate::types::FlowDefinition>,
16 pub client_token: ::std::option::Option<::std::string::String>,
18 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20}
21impl CreateFlowInput {
22 pub fn name(&self) -> ::std::option::Option<&str> {
24 self.name.as_deref()
25 }
26 pub fn description(&self) -> ::std::option::Option<&str> {
28 self.description.as_deref()
29 }
30 pub fn execution_role_arn(&self) -> ::std::option::Option<&str> {
32 self.execution_role_arn.as_deref()
33 }
34 pub fn customer_encryption_key_arn(&self) -> ::std::option::Option<&str> {
36 self.customer_encryption_key_arn.as_deref()
37 }
38 pub fn definition(&self) -> ::std::option::Option<&crate::types::FlowDefinition> {
40 self.definition.as_ref()
41 }
42 pub fn client_token(&self) -> ::std::option::Option<&str> {
44 self.client_token.as_deref()
45 }
46 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
48 self.tags.as_ref()
49 }
50}
51impl ::std::fmt::Debug for CreateFlowInput {
52 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
53 let mut formatter = f.debug_struct("CreateFlowInput");
54 formatter.field("name", &self.name);
55 formatter.field("description", &self.description);
56 formatter.field("execution_role_arn", &self.execution_role_arn);
57 formatter.field("customer_encryption_key_arn", &self.customer_encryption_key_arn);
58 formatter.field("definition", &"*** Sensitive Data Redacted ***");
59 formatter.field("client_token", &self.client_token);
60 formatter.field("tags", &self.tags);
61 formatter.finish()
62 }
63}
64impl CreateFlowInput {
65 pub fn builder() -> crate::operation::create_flow::builders::CreateFlowInputBuilder {
67 crate::operation::create_flow::builders::CreateFlowInputBuilder::default()
68 }
69}
70
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
73#[non_exhaustive]
74pub struct CreateFlowInputBuilder {
75 pub(crate) name: ::std::option::Option<::std::string::String>,
76 pub(crate) description: ::std::option::Option<::std::string::String>,
77 pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
78 pub(crate) customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
79 pub(crate) definition: ::std::option::Option<crate::types::FlowDefinition>,
80 pub(crate) client_token: ::std::option::Option<::std::string::String>,
81 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
82}
83impl CreateFlowInputBuilder {
84 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.name = ::std::option::Option::Some(input.into());
88 self
89 }
90 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.name = input;
93 self
94 }
95 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
97 &self.name
98 }
99 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101 self.description = ::std::option::Option::Some(input.into());
102 self
103 }
104 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106 self.description = input;
107 self
108 }
109 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
111 &self.description
112 }
113 pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.execution_role_arn = ::std::option::Option::Some(input.into());
117 self
118 }
119 pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.execution_role_arn = input;
122 self
123 }
124 pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
126 &self.execution_role_arn
127 }
128 pub fn customer_encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.customer_encryption_key_arn = ::std::option::Option::Some(input.into());
131 self
132 }
133 pub fn set_customer_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.customer_encryption_key_arn = input;
136 self
137 }
138 pub fn get_customer_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
140 &self.customer_encryption_key_arn
141 }
142 pub fn definition(mut self, input: crate::types::FlowDefinition) -> Self {
144 self.definition = ::std::option::Option::Some(input);
145 self
146 }
147 pub fn set_definition(mut self, input: ::std::option::Option<crate::types::FlowDefinition>) -> Self {
149 self.definition = input;
150 self
151 }
152 pub fn get_definition(&self) -> &::std::option::Option<crate::types::FlowDefinition> {
154 &self.definition
155 }
156 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158 self.client_token = ::std::option::Option::Some(input.into());
159 self
160 }
161 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163 self.client_token = input;
164 self
165 }
166 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
168 &self.client_token
169 }
170 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
176 let mut hash_map = self.tags.unwrap_or_default();
177 hash_map.insert(k.into(), v.into());
178 self.tags = ::std::option::Option::Some(hash_map);
179 self
180 }
181 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
183 self.tags = input;
184 self
185 }
186 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
188 &self.tags
189 }
190 pub fn build(self) -> ::std::result::Result<crate::operation::create_flow::CreateFlowInput, ::aws_smithy_types::error::operation::BuildError> {
192 ::std::result::Result::Ok(crate::operation::create_flow::CreateFlowInput {
193 name: self.name,
194 description: self.description,
195 execution_role_arn: self.execution_role_arn,
196 customer_encryption_key_arn: self.customer_encryption_key_arn,
197 definition: self.definition,
198 client_token: self.client_token,
199 tags: self.tags,
200 })
201 }
202}
203impl ::std::fmt::Debug for CreateFlowInputBuilder {
204 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
205 let mut formatter = f.debug_struct("CreateFlowInputBuilder");
206 formatter.field("name", &self.name);
207 formatter.field("description", &self.description);
208 formatter.field("execution_role_arn", &self.execution_role_arn);
209 formatter.field("customer_encryption_key_arn", &self.customer_encryption_key_arn);
210 formatter.field("definition", &"*** Sensitive Data Redacted ***");
211 formatter.field("client_token", &self.client_token);
212 formatter.field("tags", &self.tags);
213 formatter.finish()
214 }
215}