aws-sdk-bedrockagentruntime 1.126.0

AWS SDK for Agents for Amazon Bedrock Runtime
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 InvokeFlowInput {
    /// <p>The unique identifier of the flow.</p>
    pub flow_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the flow alias.</p>
    pub flow_alias_identifier: ::std::option::Option<::std::string::String>,
    /// <p>A list of objects, each containing information about an input into the flow.</p>
    pub inputs: ::std::option::Option<::std::vec::Vec<crate::types::FlowInput>>,
    /// <p>Specifies whether to return the trace for the flow or not. Traces track inputs and outputs for nodes in the flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>
    pub enable_trace: ::std::option::Option<bool>,
    /// <p>Model performance settings for the request.</p>
    pub model_performance_configuration: ::std::option::Option<crate::types::ModelPerformanceConfiguration>,
    /// <p>The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you.</p>
    pub execution_id: ::std::option::Option<::std::string::String>,
}
impl InvokeFlowInput {
    /// <p>The unique identifier of the flow.</p>
    pub fn flow_identifier(&self) -> ::std::option::Option<&str> {
        self.flow_identifier.as_deref()
    }
    /// <p>The unique identifier of the flow alias.</p>
    pub fn flow_alias_identifier(&self) -> ::std::option::Option<&str> {
        self.flow_alias_identifier.as_deref()
    }
    /// <p>A list of objects, each containing information about an input into the flow.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.inputs.is_none()`.
    pub fn inputs(&self) -> &[crate::types::FlowInput] {
        self.inputs.as_deref().unwrap_or_default()
    }
    /// <p>Specifies whether to return the trace for the flow or not. Traces track inputs and outputs for nodes in the flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>
    pub fn enable_trace(&self) -> ::std::option::Option<bool> {
        self.enable_trace
    }
    /// <p>Model performance settings for the request.</p>
    pub fn model_performance_configuration(&self) -> ::std::option::Option<&crate::types::ModelPerformanceConfiguration> {
        self.model_performance_configuration.as_ref()
    }
    /// <p>The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you.</p>
    pub fn execution_id(&self) -> ::std::option::Option<&str> {
        self.execution_id.as_deref()
    }
}
impl InvokeFlowInput {
    /// Creates a new builder-style object to manufacture [`InvokeFlowInput`](crate::operation::invoke_flow::InvokeFlowInput).
    pub fn builder() -> crate::operation::invoke_flow::builders::InvokeFlowInputBuilder {
        crate::operation::invoke_flow::builders::InvokeFlowInputBuilder::default()
    }
}

/// A builder for [`InvokeFlowInput`](crate::operation::invoke_flow::InvokeFlowInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct InvokeFlowInputBuilder {
    pub(crate) flow_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) flow_alias_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) inputs: ::std::option::Option<::std::vec::Vec<crate::types::FlowInput>>,
    pub(crate) enable_trace: ::std::option::Option<bool>,
    pub(crate) model_performance_configuration: ::std::option::Option<crate::types::ModelPerformanceConfiguration>,
    pub(crate) execution_id: ::std::option::Option<::std::string::String>,
}
impl InvokeFlowInputBuilder {
    /// <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
    }
    /// <p>The unique identifier of the flow alias.</p>
    /// This field is required.
    pub fn flow_alias_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_alias_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the flow alias.</p>
    pub fn set_flow_alias_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_alias_identifier = input;
        self
    }
    /// <p>The unique identifier of the flow alias.</p>
    pub fn get_flow_alias_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_alias_identifier
    }
    /// Appends an item to `inputs`.
    ///
    /// To override the contents of this collection use [`set_inputs`](Self::set_inputs).
    ///
    /// <p>A list of objects, each containing information about an input into the flow.</p>
    pub fn inputs(mut self, input: crate::types::FlowInput) -> Self {
        let mut v = self.inputs.unwrap_or_default();
        v.push(input);
        self.inputs = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of objects, each containing information about an input into the flow.</p>
    pub fn set_inputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FlowInput>>) -> Self {
        self.inputs = input;
        self
    }
    /// <p>A list of objects, each containing information about an input into the flow.</p>
    pub fn get_inputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowInput>> {
        &self.inputs
    }
    /// <p>Specifies whether to return the trace for the flow or not. Traces track inputs and outputs for nodes in the flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>
    pub fn enable_trace(mut self, input: bool) -> Self {
        self.enable_trace = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to return the trace for the flow or not. Traces track inputs and outputs for nodes in the flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>
    pub fn set_enable_trace(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enable_trace = input;
        self
    }
    /// <p>Specifies whether to return the trace for the flow or not. Traces track inputs and outputs for nodes in the flow. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>
    pub fn get_enable_trace(&self) -> &::std::option::Option<bool> {
        &self.enable_trace
    }
    /// <p>Model performance settings for the request.</p>
    pub fn model_performance_configuration(mut self, input: crate::types::ModelPerformanceConfiguration) -> Self {
        self.model_performance_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Model performance settings for the request.</p>
    pub fn set_model_performance_configuration(mut self, input: ::std::option::Option<crate::types::ModelPerformanceConfiguration>) -> Self {
        self.model_performance_configuration = input;
        self
    }
    /// <p>Model performance settings for the request.</p>
    pub fn get_model_performance_configuration(&self) -> &::std::option::Option<crate::types::ModelPerformanceConfiguration> {
        &self.model_performance_configuration
    }
    /// <p>The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you.</p>
    pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.execution_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you.</p>
    pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.execution_id = input;
        self
    }
    /// <p>The unique identifier for the current flow execution. If you don't provide a value, Amazon Bedrock creates the identifier for you.</p>
    pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.execution_id
    }
    /// Consumes the builder and constructs a [`InvokeFlowInput`](crate::operation::invoke_flow::InvokeFlowInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::invoke_flow::InvokeFlowInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::invoke_flow::InvokeFlowInput {
            flow_identifier: self.flow_identifier,
            flow_alias_identifier: self.flow_alias_identifier,
            inputs: self.inputs,
            enable_trace: self.enable_trace,
            model_performance_configuration: self.model_performance_configuration,
            execution_id: self.execution_id,
        })
    }
}