aws_sdk_bedrockagent/operation/update_flow/
_update_flow_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateFlowInput {
6    /// <p>A name for the flow.</p>
7    pub name: ::std::option::Option<::std::string::String>,
8    /// <p>A description for the flow.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html">Create a service role for flows in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
11    pub execution_role_arn: ::std::option::Option<::std::string::String>,
12    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
13    pub customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
14    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
15    pub definition: ::std::option::Option<crate::types::FlowDefinition>,
16    /// <p>The unique identifier of the flow.</p>
17    pub flow_identifier: ::std::option::Option<::std::string::String>,
18}
19impl UpdateFlowInput {
20    /// <p>A name for the flow.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>A description for the flow.</p>
25    pub fn description(&self) -> ::std::option::Option<&str> {
26        self.description.as_deref()
27    }
28    /// <p>The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html">Create a service role for flows in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
29    pub fn execution_role_arn(&self) -> ::std::option::Option<&str> {
30        self.execution_role_arn.as_deref()
31    }
32    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
33    pub fn customer_encryption_key_arn(&self) -> ::std::option::Option<&str> {
34        self.customer_encryption_key_arn.as_deref()
35    }
36    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
37    pub fn definition(&self) -> ::std::option::Option<&crate::types::FlowDefinition> {
38        self.definition.as_ref()
39    }
40    /// <p>The unique identifier of the flow.</p>
41    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    /// Creates a new builder-style object to manufacture [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
59    pub fn builder() -> crate::operation::update_flow::builders::UpdateFlowInputBuilder {
60        crate::operation::update_flow::builders::UpdateFlowInputBuilder::default()
61    }
62}
63
64/// A builder for [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
65#[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    /// <p>A name for the flow.</p>
77    /// This field is required.
78    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    /// <p>A name for the flow.</p>
83    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84        self.name = input;
85        self
86    }
87    /// <p>A name for the flow.</p>
88    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
89        &self.name
90    }
91    /// <p>A description for the flow.</p>
92    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    /// <p>A description for the flow.</p>
97    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98        self.description = input;
99        self
100    }
101    /// <p>A description for the flow.</p>
102    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
103        &self.description
104    }
105    /// <p>The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html">Create a service role for flows in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
106    /// This field is required.
107    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    /// <p>The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html">Create a service role for flows in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
112    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    /// <p>The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-permissions.html">Create a service role for flows in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
117    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
118        &self.execution_role_arn
119    }
120    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
121    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    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
126    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    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
131    pub fn get_customer_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
132        &self.customer_encryption_key_arn
133    }
134    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
135    pub fn definition(mut self, input: crate::types::FlowDefinition) -> Self {
136        self.definition = ::std::option::Option::Some(input);
137        self
138    }
139    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
140    pub fn set_definition(mut self, input: ::std::option::Option<crate::types::FlowDefinition>) -> Self {
141        self.definition = input;
142        self
143    }
144    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
145    pub fn get_definition(&self) -> &::std::option::Option<crate::types::FlowDefinition> {
146        &self.definition
147    }
148    /// <p>The unique identifier of the flow.</p>
149    /// This field is required.
150    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    /// <p>The unique identifier of the flow.</p>
155    pub fn set_flow_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
156        self.flow_identifier = input;
157        self
158    }
159    /// <p>The unique identifier of the flow.</p>
160    pub fn get_flow_identifier(&self) -> &::std::option::Option<::std::string::String> {
161        &self.flow_identifier
162    }
163    /// Consumes the builder and constructs a [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
164    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}