aws_sdk_bedrockagentruntime/operation/invoke_flow/
_invoke_flow_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub struct InvokeFlowOutput {
6 pub response_stream: crate::event_receiver::EventReceiver<crate::types::FlowResponseStream, crate::types::error::FlowResponseStreamError>,
8 pub execution_id: ::std::option::Option<::std::string::String>,
10 _request_id: Option<String>,
11}
12impl InvokeFlowOutput {
13 pub fn response_stream(
15 &self,
16 ) -> &crate::event_receiver::EventReceiver<crate::types::FlowResponseStream, crate::types::error::FlowResponseStreamError> {
17 &self.response_stream
18 }
19 pub fn execution_id(&self) -> ::std::option::Option<&str> {
21 self.execution_id.as_deref()
22 }
23}
24impl ::aws_types::request_id::RequestId for InvokeFlowOutput {
25 fn request_id(&self) -> Option<&str> {
26 self._request_id.as_deref()
27 }
28}
29impl InvokeFlowOutput {
30 pub fn builder() -> crate::operation::invoke_flow::builders::InvokeFlowOutputBuilder {
32 crate::operation::invoke_flow::builders::InvokeFlowOutputBuilder::default()
33 }
34}
35
36#[derive(::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct InvokeFlowOutputBuilder {
40 pub(crate) response_stream:
41 ::std::option::Option<crate::event_receiver::EventReceiver<crate::types::FlowResponseStream, crate::types::error::FlowResponseStreamError>>,
42 pub(crate) execution_id: ::std::option::Option<::std::string::String>,
43 _request_id: Option<String>,
44}
45impl InvokeFlowOutputBuilder {
46 pub fn response_stream(
49 mut self,
50 input: crate::event_receiver::EventReceiver<crate::types::FlowResponseStream, crate::types::error::FlowResponseStreamError>,
51 ) -> Self {
52 self.response_stream = ::std::option::Option::Some(input);
53 self
54 }
55 pub fn set_response_stream(
57 mut self,
58 input: ::std::option::Option<
59 crate::event_receiver::EventReceiver<crate::types::FlowResponseStream, crate::types::error::FlowResponseStreamError>,
60 >,
61 ) -> Self {
62 self.response_stream = input;
63 self
64 }
65 pub fn get_response_stream(
67 &self,
68 ) -> &::std::option::Option<crate::event_receiver::EventReceiver<crate::types::FlowResponseStream, crate::types::error::FlowResponseStreamError>>
69 {
70 &self.response_stream
71 }
72 pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.execution_id = ::std::option::Option::Some(input.into());
75 self
76 }
77 pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.execution_id = input;
80 self
81 }
82 pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
84 &self.execution_id
85 }
86 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
87 self._request_id = Some(request_id.into());
88 self
89 }
90
91 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
92 self._request_id = request_id;
93 self
94 }
95 pub fn build(self) -> ::std::result::Result<crate::operation::invoke_flow::InvokeFlowOutput, ::aws_smithy_types::error::operation::BuildError> {
99 ::std::result::Result::Ok(crate::operation::invoke_flow::InvokeFlowOutput {
100 response_stream: self.response_stream.ok_or_else(|| {
101 ::aws_smithy_types::error::operation::BuildError::missing_field(
102 "response_stream",
103 "response_stream was not specified but it is required when building InvokeFlowOutput",
104 )
105 })?,
106 execution_id: self.execution_id,
107 _request_id: self._request_id,
108 })
109 }
110}