aws_sdk_bedrockagentruntime/operation/invoke_flow/
_invoke_flow_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct InvokeFlowInput {
6 pub flow_identifier: ::std::option::Option<::std::string::String>,
8 pub flow_alias_identifier: ::std::option::Option<::std::string::String>,
10 pub inputs: ::std::option::Option<::std::vec::Vec<crate::types::FlowInput>>,
12 pub enable_trace: ::std::option::Option<bool>,
14 pub model_performance_configuration: ::std::option::Option<crate::types::ModelPerformanceConfiguration>,
16 pub execution_id: ::std::option::Option<::std::string::String>,
18}
19impl InvokeFlowInput {
20 pub fn flow_identifier(&self) -> ::std::option::Option<&str> {
22 self.flow_identifier.as_deref()
23 }
24 pub fn flow_alias_identifier(&self) -> ::std::option::Option<&str> {
26 self.flow_alias_identifier.as_deref()
27 }
28 pub fn inputs(&self) -> &[crate::types::FlowInput] {
32 self.inputs.as_deref().unwrap_or_default()
33 }
34 pub fn enable_trace(&self) -> ::std::option::Option<bool> {
36 self.enable_trace
37 }
38 pub fn model_performance_configuration(&self) -> ::std::option::Option<&crate::types::ModelPerformanceConfiguration> {
40 self.model_performance_configuration.as_ref()
41 }
42 pub fn execution_id(&self) -> ::std::option::Option<&str> {
44 self.execution_id.as_deref()
45 }
46}
47impl InvokeFlowInput {
48 pub fn builder() -> crate::operation::invoke_flow::builders::InvokeFlowInputBuilder {
50 crate::operation::invoke_flow::builders::InvokeFlowInputBuilder::default()
51 }
52}
53
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct InvokeFlowInputBuilder {
58 pub(crate) flow_identifier: ::std::option::Option<::std::string::String>,
59 pub(crate) flow_alias_identifier: ::std::option::Option<::std::string::String>,
60 pub(crate) inputs: ::std::option::Option<::std::vec::Vec<crate::types::FlowInput>>,
61 pub(crate) enable_trace: ::std::option::Option<bool>,
62 pub(crate) model_performance_configuration: ::std::option::Option<crate::types::ModelPerformanceConfiguration>,
63 pub(crate) execution_id: ::std::option::Option<::std::string::String>,
64}
65impl InvokeFlowInputBuilder {
66 pub fn flow_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.flow_identifier = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_flow_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.flow_identifier = input;
75 self
76 }
77 pub fn get_flow_identifier(&self) -> &::std::option::Option<::std::string::String> {
79 &self.flow_identifier
80 }
81 pub fn flow_alias_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.flow_alias_identifier = ::std::option::Option::Some(input.into());
85 self
86 }
87 pub fn set_flow_alias_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.flow_alias_identifier = input;
90 self
91 }
92 pub fn get_flow_alias_identifier(&self) -> &::std::option::Option<::std::string::String> {
94 &self.flow_alias_identifier
95 }
96 pub fn inputs(mut self, input: crate::types::FlowInput) -> Self {
102 let mut v = self.inputs.unwrap_or_default();
103 v.push(input);
104 self.inputs = ::std::option::Option::Some(v);
105 self
106 }
107 pub fn set_inputs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FlowInput>>) -> Self {
109 self.inputs = input;
110 self
111 }
112 pub fn get_inputs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowInput>> {
114 &self.inputs
115 }
116 pub fn enable_trace(mut self, input: bool) -> Self {
118 self.enable_trace = ::std::option::Option::Some(input);
119 self
120 }
121 pub fn set_enable_trace(mut self, input: ::std::option::Option<bool>) -> Self {
123 self.enable_trace = input;
124 self
125 }
126 pub fn get_enable_trace(&self) -> &::std::option::Option<bool> {
128 &self.enable_trace
129 }
130 pub fn model_performance_configuration(mut self, input: crate::types::ModelPerformanceConfiguration) -> Self {
132 self.model_performance_configuration = ::std::option::Option::Some(input);
133 self
134 }
135 pub fn set_model_performance_configuration(mut self, input: ::std::option::Option<crate::types::ModelPerformanceConfiguration>) -> Self {
137 self.model_performance_configuration = input;
138 self
139 }
140 pub fn get_model_performance_configuration(&self) -> &::std::option::Option<crate::types::ModelPerformanceConfiguration> {
142 &self.model_performance_configuration
143 }
144 pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
146 self.execution_id = ::std::option::Option::Some(input.into());
147 self
148 }
149 pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
151 self.execution_id = input;
152 self
153 }
154 pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
156 &self.execution_id
157 }
158 pub fn build(self) -> ::std::result::Result<crate::operation::invoke_flow::InvokeFlowInput, ::aws_smithy_types::error::operation::BuildError> {
160 ::std::result::Result::Ok(crate::operation::invoke_flow::InvokeFlowInput {
161 flow_identifier: self.flow_identifier,
162 flow_alias_identifier: self.flow_alias_identifier,
163 inputs: self.inputs,
164 enable_trace: self.enable_trace,
165 model_performance_configuration: self.model_performance_configuration,
166 execution_id: self.execution_id,
167 })
168 }
169}