aws-sdk-bedrockagent 1.40.0

AWS SDK for Agents for Amazon Bedrock
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateFlowInput {
    /// <p>A name for the flow.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description for the flow.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <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>
    pub execution_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
    pub customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
    pub definition: ::std::option::Option<crate::types::FlowDefinition>,
    /// <p>The unique identifier of the flow.</p>
    pub flow_identifier: ::std::option::Option<::std::string::String>,
}
impl UpdateFlowInput {
    /// <p>A name for the flow.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description for the flow.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <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>
    pub fn execution_role_arn(&self) -> ::std::option::Option<&str> {
        self.execution_role_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
    pub fn customer_encryption_key_arn(&self) -> ::std::option::Option<&str> {
        self.customer_encryption_key_arn.as_deref()
    }
    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
    pub fn definition(&self) -> ::std::option::Option<&crate::types::FlowDefinition> {
        self.definition.as_ref()
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn flow_identifier(&self) -> ::std::option::Option<&str> {
        self.flow_identifier.as_deref()
    }
}
impl UpdateFlowInput {
    /// Creates a new builder-style object to manufacture [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
    pub fn builder() -> crate::operation::update_flow::builders::UpdateFlowInputBuilder {
        crate::operation::update_flow::builders::UpdateFlowInputBuilder::default()
    }
}

/// A builder for [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFlowInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) customer_encryption_key_arn: ::std::option::Option<::std::string::String>,
    pub(crate) definition: ::std::option::Option<crate::types::FlowDefinition>,
    pub(crate) flow_identifier: ::std::option::Option<::std::string::String>,
}
impl UpdateFlowInputBuilder {
    /// <p>A name for the flow.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A name for the flow.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A name for the flow.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description for the flow.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description for the flow.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description for the flow.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <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>
    /// This field is required.
    pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.execution_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.execution_role_arn = input;
        self
    }
    /// <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>
    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.execution_role_arn
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
    pub fn customer_encryption_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.customer_encryption_key_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
    pub fn set_customer_encryption_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.customer_encryption_key_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.</p>
    pub fn get_customer_encryption_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.customer_encryption_key_arn
    }
    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
    pub fn definition(mut self, input: crate::types::FlowDefinition) -> Self {
        self.definition = ::std::option::Option::Some(input);
        self
    }
    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
    pub fn set_definition(mut self, input: ::std::option::Option<crate::types::FlowDefinition>) -> Self {
        self.definition = input;
        self
    }
    /// <p>A definition of the nodes and the connections between the nodes in the flow.</p>
    pub fn get_definition(&self) -> &::std::option::Option<crate::types::FlowDefinition> {
        &self.definition
    }
    /// <p>The unique identifier of the flow.</p>
    /// This field is required.
    pub fn flow_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn set_flow_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_identifier = input;
        self
    }
    /// <p>The unique identifier of the flow.</p>
    pub fn get_flow_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_identifier
    }
    /// Consumes the builder and constructs a [`UpdateFlowInput`](crate::operation::update_flow::UpdateFlowInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::update_flow::UpdateFlowInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_flow::UpdateFlowInput {
            name: self.name,
            description: self.description,
            execution_role_arn: self.execution_role_arn,
            customer_encryption_key_arn: self.customer_encryption_key_arn,
            definition: self.definition,
            flow_identifier: self.flow_identifier,
        })
    }
}