aws_sdk_bedrockagentruntime/operation/invoke_flow/_invoke_flow_input.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
// 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,
})
}
}