aws_sdk_lexruntimev2/operation/start_conversation/
_start_conversation_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::fmt::Debug)]
5pub struct StartConversationOutput {
6 pub response_event_stream: crate::event_receiver::EventReceiver<
8 crate::types::StartConversationResponseEventStream,
9 crate::types::error::StartConversationResponseEventStreamError,
10 >,
11 _request_id: Option<String>,
12}
13impl StartConversationOutput {
14 pub fn response_event_stream(
16 &self,
17 ) -> &crate::event_receiver::EventReceiver<
18 crate::types::StartConversationResponseEventStream,
19 crate::types::error::StartConversationResponseEventStreamError,
20 > {
21 &self.response_event_stream
22 }
23}
24impl ::aws_types::request_id::RequestId for StartConversationOutput {
25 fn request_id(&self) -> Option<&str> {
26 self._request_id.as_deref()
27 }
28}
29impl StartConversationOutput {
30 pub fn builder() -> crate::operation::start_conversation::builders::StartConversationOutputBuilder {
32 crate::operation::start_conversation::builders::StartConversationOutputBuilder::default()
33 }
34}
35
36#[derive(::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct StartConversationOutputBuilder {
40 pub(crate) response_event_stream: ::std::option::Option<
41 crate::event_receiver::EventReceiver<
42 crate::types::StartConversationResponseEventStream,
43 crate::types::error::StartConversationResponseEventStreamError,
44 >,
45 >,
46 _request_id: Option<String>,
47}
48impl StartConversationOutputBuilder {
49 pub fn response_event_stream(
51 mut self,
52 input: crate::event_receiver::EventReceiver<
53 crate::types::StartConversationResponseEventStream,
54 crate::types::error::StartConversationResponseEventStreamError,
55 >,
56 ) -> Self {
57 self.response_event_stream = ::std::option::Option::Some(input);
58 self
59 }
60 pub fn set_response_event_stream(
62 mut self,
63 input: ::std::option::Option<
64 crate::event_receiver::EventReceiver<
65 crate::types::StartConversationResponseEventStream,
66 crate::types::error::StartConversationResponseEventStreamError,
67 >,
68 >,
69 ) -> Self {
70 self.response_event_stream = input;
71 self
72 }
73 pub fn get_response_event_stream(
75 &self,
76 ) -> &::std::option::Option<
77 crate::event_receiver::EventReceiver<
78 crate::types::StartConversationResponseEventStream,
79 crate::types::error::StartConversationResponseEventStreamError,
80 >,
81 > {
82 &self.response_event_stream
83 }
84 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
85 self._request_id = Some(request_id.into());
86 self
87 }
88
89 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
90 self._request_id = request_id;
91 self
92 }
93 pub fn build(
97 self,
98 ) -> ::std::result::Result<crate::operation::start_conversation::StartConversationOutput, ::aws_smithy_types::error::operation::BuildError> {
99 ::std::result::Result::Ok(crate::operation::start_conversation::StartConversationOutput {
100 response_event_stream: self.response_event_stream.ok_or_else(|| {
101 ::aws_smithy_types::error::operation::BuildError::missing_field(
102 "response_event_stream",
103 "response_event_stream was not specified but it is required when building StartConversationOutput",
104 )
105 })?,
106 _request_id: self._request_id,
107 })
108 }
109}