aws_sdk_bedrockagent/operation/update_flow/
_update_flow_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateFlowInput {
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 flow_identifier: ::std::option::Option<::std::string::String>,
18}
19impl UpdateFlowInput {
20 pub fn name(&self) -> ::std::option::Option<&str> {
22 self.name.as_deref()
23 }
24 pub fn description(&self) -> ::std::option::Option<&str> {
26 self.description.as_deref()
27 }
28 pub fn execution_role_arn(&self) -> ::std::option::Option<&str> {
30 self.execution_role_arn.as_deref()
31 }
32 pub fn customer_encryption_key_arn(&self) -> ::std::option::Option<&str> {
34 self.customer_encryption_key_arn.as_deref()
35 }
36 pub fn definition(&self) -> ::std::option::Option<&crate::types::FlowDefinition> {
38 self.definition.as_ref()
39 }
40 pub fn flow_identifier(&self) -> ::std::option::Option<&str> {
42 self.flow_identifier.as_deref()
43 }
44}
45impl ::std::fmt::Debug for UpdateFlowInput {
46 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
47 let mut formatter = f.debug_struct("UpdateFlowInput");
48 formatter.field("name", &self.name);
49 formatter.field("description", &self.description);
50 formatter.field("execution_role_arn", &self.execution_role_arn);
51 formatter.field("customer_encryption_key_arn", &self.customer_encryption_key_arn);
52 formatter.field("definition", &"*** Sensitive Data Redacted ***");
53 formatter.field("flow_identifier", &self.flow_identifier);
54 formatter.finish()
55 }
56}
57impl UpdateFlowInput {
58 pub fn builder() -> crate::operation::update_flow::builders::UpdateFlowInputBuilder {
60 crate::operation::update_flow::builders::UpdateFlowInputBuilder::default()
61 }
62}
63
64#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
66#[non_exhaustive]
67pub struct UpdateFlowInputBuilder {
68 pub(crate) name: ::std::option::Option<::std::string::String>,
69 pub(crate) description: ::std::option::Option<::std::string::String>,
70 pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
71 pub(crate) customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
72 pub(crate) definition: ::std::option::Option<crate::types::FlowDefinition>,
73 pub(crate) flow_identifier: ::std::option::Option<::std::string::String>,
74}
75impl UpdateFlowInputBuilder {
76 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.name = ::std::option::Option::Some(input.into());
80 self
81 }
82 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.name = input;
85 self
86 }
87 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
89 &self.name
90 }
91 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93 self.description = ::std::option::Option::Some(input.into());
94 self
95 }
96 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.description = input;
99 self
100 }
101 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
103 &self.description
104 }
105 pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.execution_role_arn = ::std::option::Option::Some(input.into());
109 self
110 }
111 pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.execution_role_arn = input;
114 self
115 }
116 pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
118 &self.execution_role_arn
119 }
120 pub fn customer_encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.customer_encryption_key_arn = ::std::option::Option::Some(input.into());
123 self
124 }
125 pub fn set_customer_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.customer_encryption_key_arn = input;
128 self
129 }
130 pub fn get_customer_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
132 &self.customer_encryption_key_arn
133 }
134 pub fn definition(mut self, input: crate::types::FlowDefinition) -> Self {
136 self.definition = ::std::option::Option::Some(input);
137 self
138 }
139 pub fn set_definition(mut self, input: ::std::option::Option<crate::types::FlowDefinition>) -> Self {
141 self.definition = input;
142 self
143 }
144 pub fn get_definition(&self) -> &::std::option::Option<crate::types::FlowDefinition> {
146 &self.definition
147 }
148 pub fn flow_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151 self.flow_identifier = ::std::option::Option::Some(input.into());
152 self
153 }
154 pub fn set_flow_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156 self.flow_identifier = input;
157 self
158 }
159 pub fn get_flow_identifier(&self) -> &::std::option::Option<::std::string::String> {
161 &self.flow_identifier
162 }
163 pub fn build(self) -> ::std::result::Result<crate::operation::update_flow::UpdateFlowInput, ::aws_smithy_types::error::operation::BuildError> {
165 ::std::result::Result::Ok(crate::operation::update_flow::UpdateFlowInput {
166 name: self.name,
167 description: self.description,
168 execution_role_arn: self.execution_role_arn,
169 customer_encryption_key_arn: self.customer_encryption_key_arn,
170 definition: self.definition,
171 flow_identifier: self.flow_identifier,
172 })
173 }
174}
175impl ::std::fmt::Debug for UpdateFlowInputBuilder {
176 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
177 let mut formatter = f.debug_struct("UpdateFlowInputBuilder");
178 formatter.field("name", &self.name);
179 formatter.field("description", &self.description);
180 formatter.field("execution_role_arn", &self.execution_role_arn);
181 formatter.field("customer_encryption_key_arn", &self.customer_encryption_key_arn);
182 formatter.field("definition", &"*** Sensitive Data Redacted ***");
183 formatter.field("flow_identifier", &self.flow_identifier);
184 formatter.finish()
185 }
186}