aws_sdk_qconnect/operation/send_message/
_send_message_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SendMessageOutput {
pub request_message_id: ::std::string::String,
pub next_message_token: ::std::string::String,
_request_id: Option<String>,
}
impl SendMessageOutput {
pub fn request_message_id(&self) -> &str {
use std::ops::Deref;
self.request_message_id.deref()
}
pub fn next_message_token(&self) -> &str {
use std::ops::Deref;
self.next_message_token.deref()
}
}
impl ::aws_types::request_id::RequestId for SendMessageOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl SendMessageOutput {
pub fn builder() -> crate::operation::send_message::builders::SendMessageOutputBuilder {
crate::operation::send_message::builders::SendMessageOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SendMessageOutputBuilder {
pub(crate) request_message_id: ::std::option::Option<::std::string::String>,
pub(crate) next_message_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl SendMessageOutputBuilder {
pub fn request_message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.request_message_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_request_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.request_message_id = input;
self
}
pub fn get_request_message_id(&self) -> &::std::option::Option<::std::string::String> {
&self.request_message_id
}
pub fn next_message_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_message_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_next_message_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_message_token = input;
self
}
pub fn get_next_message_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_message_token
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> ::std::result::Result<crate::operation::send_message::SendMessageOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::send_message::SendMessageOutput {
request_message_id: self.request_message_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"request_message_id",
"request_message_id was not specified but it is required when building SendMessageOutput",
)
})?,
next_message_token: self.next_message_token.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"next_message_token",
"next_message_token was not specified but it is required when building SendMessageOutput",
)
})?,
_request_id: self._request_id,
})
}
}