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 StartFlowExecutionInput {
    /// <p>The unique identifier of the flow to execute.</p>
    pub flow_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the flow alias to use for the flow execution.</p>
    pub flow_alias_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The unique name for the flow execution. If you don't provide one, a system-generated name is used.</p>
    pub flow_execution_name: ::std::option::Option<::std::string::String>,
    /// <p>The input data required for the flow execution. This must match the input schema defined in the flow.</p>
    pub inputs: ::std::option::Option<::std::vec::Vec<crate::types::FlowInput>>,
    /// <p>The performance settings for the foundation model used in the flow execution.</p>
    pub model_performance_configuration: ::std::option::Option<crate::types::ModelPerformanceConfiguration>,
}
impl StartFlowExecutionInput {
    /// <p>The unique identifier of the flow to execute.</p>
    pub fn flow_identifier(&self) -> ::std::option::Option<&str> {
        self.flow_identifier.as_deref()
    }
    /// <p>The unique identifier of the flow alias to use for the flow execution.</p>
    pub fn flow_alias_identifier(&self) -> ::std::option::Option<&str> {
        self.flow_alias_identifier.as_deref()
    }
    /// <p>The unique name for the flow execution. If you don't provide one, a system-generated name is used.</p>
    pub fn flow_execution_name(&self) -> ::std::option::Option<&str> {
        self.flow_execution_name.as_deref()
    }
    /// <p>The input data required for the flow execution. This must match the input schema defined in 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>The performance settings for the foundation model used in the flow execution.</p>
    pub fn model_performance_configuration(&self) -> ::std::option::Option<&crate::types::ModelPerformanceConfiguration> {
        self.model_performance_configuration.as_ref()
    }
}
impl StartFlowExecutionInput {
    /// Creates a new builder-style object to manufacture [`StartFlowExecutionInput`](crate::operation::start_flow_execution::StartFlowExecutionInput).
    pub fn builder() -> crate::operation::start_flow_execution::builders::StartFlowExecutionInputBuilder {
        crate::operation::start_flow_execution::builders::StartFlowExecutionInputBuilder::default()
    }
}

/// A builder for [`StartFlowExecutionInput`](crate::operation::start_flow_execution::StartFlowExecutionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartFlowExecutionInputBuilder {
    pub(crate) flow_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) flow_alias_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) flow_execution_name: ::std::option::Option<::std::string::String>,
    pub(crate) inputs: ::std::option::Option<::std::vec::Vec<crate::types::FlowInput>>,
    pub(crate) model_performance_configuration: ::std::option::Option<crate::types::ModelPerformanceConfiguration>,
}
impl StartFlowExecutionInputBuilder {
    /// <p>The unique identifier of the flow to execute.</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 to execute.</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 to execute.</p>
    pub fn get_flow_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_identifier
    }
    /// <p>The unique identifier of the flow alias to use for the flow execution.</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 to use for the flow execution.</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 to use for the flow execution.</p>
    pub fn get_flow_alias_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_alias_identifier
    }
    /// <p>The unique name for the flow execution. If you don't provide one, a system-generated name is used.</p>
    pub fn flow_execution_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.flow_execution_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name for the flow execution. If you don't provide one, a system-generated name is used.</p>
    pub fn set_flow_execution_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.flow_execution_name = input;
        self
    }
    /// <p>The unique name for the flow execution. If you don't provide one, a system-generated name is used.</p>
    pub fn get_flow_execution_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.flow_execution_name
    }
    /// Appends an item to `inputs`.
    ///
    /// To override the contents of this collection use [`set_inputs`](Self::set_inputs).
    ///
    /// <p>The input data required for the flow execution. This must match the input schema defined in 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>The input data required for the flow execution. This must match the input schema defined in 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>The input data required for the flow execution. This must match the input schema defined in the flow.</p>
    pub fn get_inputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowInput>> {
        &self.inputs
    }
    /// <p>The performance settings for the foundation model used in the flow execution.</p>
    pub fn model_performance_configuration(mut self, input: crate::types::ModelPerformanceConfiguration) -> Self {
        self.model_performance_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The performance settings for the foundation model used in the flow execution.</p>
    pub fn set_model_performance_configuration(mut self, input: ::std::option::Option<crate::types::ModelPerformanceConfiguration>) -> Self {
        self.model_performance_configuration = input;
        self
    }
    /// <p>The performance settings for the foundation model used in the flow execution.</p>
    pub fn get_model_performance_configuration(&self) -> &::std::option::Option<crate::types::ModelPerformanceConfiguration> {
        &self.model_performance_configuration
    }
    /// Consumes the builder and constructs a [`StartFlowExecutionInput`](crate::operation::start_flow_execution::StartFlowExecutionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_flow_execution::StartFlowExecutionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_flow_execution::StartFlowExecutionInput {
            flow_identifier: self.flow_identifier,
            flow_alias_identifier: self.flow_alias_identifier,
            flow_execution_name: self.flow_execution_name,
            inputs: self.inputs,
            model_performance_configuration: self.model_performance_configuration,
        })
    }
}