#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ActivateMessageTemplateOutput {
pub message_template_arn: ::std::string::String,
pub message_template_id: ::std::string::String,
pub version_number: i64,
_request_id: Option<String>,
}
impl ActivateMessageTemplateOutput {
pub fn message_template_arn(&self) -> &str {
use std::ops::Deref;
self.message_template_arn.deref()
}
pub fn message_template_id(&self) -> &str {
use std::ops::Deref;
self.message_template_id.deref()
}
pub fn version_number(&self) -> i64 {
self.version_number
}
}
impl ::aws_types::request_id::RequestId for ActivateMessageTemplateOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ActivateMessageTemplateOutput {
pub fn builder() -> crate::operation::activate_message_template::builders::ActivateMessageTemplateOutputBuilder {
crate::operation::activate_message_template::builders::ActivateMessageTemplateOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ActivateMessageTemplateOutputBuilder {
pub(crate) message_template_arn: ::std::option::Option<::std::string::String>,
pub(crate) message_template_id: ::std::option::Option<::std::string::String>,
pub(crate) version_number: ::std::option::Option<i64>,
_request_id: Option<String>,
}
impl ActivateMessageTemplateOutputBuilder {
pub fn message_template_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message_template_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_message_template_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message_template_arn = input;
self
}
pub fn get_message_template_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.message_template_arn
}
pub fn message_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message_template_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_message_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message_template_id = input;
self
}
pub fn get_message_template_id(&self) -> &::std::option::Option<::std::string::String> {
&self.message_template_id
}
pub fn version_number(mut self, input: i64) -> Self {
self.version_number = ::std::option::Option::Some(input);
self
}
pub fn set_version_number(mut self, input: ::std::option::Option<i64>) -> Self {
self.version_number = input;
self
}
pub fn get_version_number(&self) -> &::std::option::Option<i64> {
&self.version_number
}
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::activate_message_template::ActivateMessageTemplateOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::activate_message_template::ActivateMessageTemplateOutput {
message_template_arn: self.message_template_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"message_template_arn",
"message_template_arn was not specified but it is required when building ActivateMessageTemplateOutput",
)
})?,
message_template_id: self.message_template_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"message_template_id",
"message_template_id was not specified but it is required when building ActivateMessageTemplateOutput",
)
})?,
version_number: self.version_number.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"version_number",
"version_number was not specified but it is required when building ActivateMessageTemplateOutput",
)
})?,
_request_id: self._request_id,
})
}
}