aws_sdk_qconnect/operation/send_message/
_send_message_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SendMessageOutput {
6 pub request_message_id: ::std::string::String,
8 pub configuration: ::std::option::Option<crate::types::MessageConfiguration>,
10 pub next_message_token: ::std::string::String,
12 _request_id: Option<String>,
13}
14impl SendMessageOutput {
15 pub fn request_message_id(&self) -> &str {
17 use std::ops::Deref;
18 self.request_message_id.deref()
19 }
20 pub fn configuration(&self) -> ::std::option::Option<&crate::types::MessageConfiguration> {
22 self.configuration.as_ref()
23 }
24 pub fn next_message_token(&self) -> &str {
26 use std::ops::Deref;
27 self.next_message_token.deref()
28 }
29}
30impl ::aws_types::request_id::RequestId for SendMessageOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl SendMessageOutput {
36 pub fn builder() -> crate::operation::send_message::builders::SendMessageOutputBuilder {
38 crate::operation::send_message::builders::SendMessageOutputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct SendMessageOutputBuilder {
46 pub(crate) request_message_id: ::std::option::Option<::std::string::String>,
47 pub(crate) configuration: ::std::option::Option<crate::types::MessageConfiguration>,
48 pub(crate) next_message_token: ::std::option::Option<::std::string::String>,
49 _request_id: Option<String>,
50}
51impl SendMessageOutputBuilder {
52 pub fn request_message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.request_message_id = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_request_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.request_message_id = input;
61 self
62 }
63 pub fn get_request_message_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.request_message_id
66 }
67 pub fn configuration(mut self, input: crate::types::MessageConfiguration) -> Self {
69 self.configuration = ::std::option::Option::Some(input);
70 self
71 }
72 pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::MessageConfiguration>) -> Self {
74 self.configuration = input;
75 self
76 }
77 pub fn get_configuration(&self) -> &::std::option::Option<crate::types::MessageConfiguration> {
79 &self.configuration
80 }
81 pub fn next_message_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.next_message_token = ::std::option::Option::Some(input.into());
85 self
86 }
87 pub fn set_next_message_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.next_message_token = input;
90 self
91 }
92 pub fn get_next_message_token(&self) -> &::std::option::Option<::std::string::String> {
94 &self.next_message_token
95 }
96 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
97 self._request_id = Some(request_id.into());
98 self
99 }
100
101 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
102 self._request_id = request_id;
103 self
104 }
105 pub fn build(self) -> ::std::result::Result<crate::operation::send_message::SendMessageOutput, ::aws_smithy_types::error::operation::BuildError> {
110 ::std::result::Result::Ok(crate::operation::send_message::SendMessageOutput {
111 request_message_id: self.request_message_id.ok_or_else(|| {
112 ::aws_smithy_types::error::operation::BuildError::missing_field(
113 "request_message_id",
114 "request_message_id was not specified but it is required when building SendMessageOutput",
115 )
116 })?,
117 configuration: self.configuration,
118 next_message_token: self.next_message_token.ok_or_else(|| {
119 ::aws_smithy_types::error::operation::BuildError::missing_field(
120 "next_message_token",
121 "next_message_token was not specified but it is required when building SendMessageOutput",
122 )
123 })?,
124 _request_id: self._request_id,
125 })
126 }
127}