aws-sdk-qconnect 1.109.0

AWS SDK for Amazon Q Connect
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeactivateMessageTemplateOutput {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    pub message_template_arn: ::std::string::String,
    /// <p>The identifier of the message template.</p>
    pub message_template_id: ::std::string::String,
    /// <p>The version number of the message template version that has been deactivated.</p>
    pub version_number: i64,
    _request_id: Option<String>,
}
impl DeactivateMessageTemplateOutput {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    pub fn message_template_arn(&self) -> &str {
        use std::ops::Deref;
        self.message_template_arn.deref()
    }
    /// <p>The identifier of the message template.</p>
    pub fn message_template_id(&self) -> &str {
        use std::ops::Deref;
        self.message_template_id.deref()
    }
    /// <p>The version number of the message template version that has been deactivated.</p>
    pub fn version_number(&self) -> i64 {
        self.version_number
    }
}
impl ::aws_types::request_id::RequestId for DeactivateMessageTemplateOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DeactivateMessageTemplateOutput {
    /// Creates a new builder-style object to manufacture [`DeactivateMessageTemplateOutput`](crate::operation::deactivate_message_template::DeactivateMessageTemplateOutput).
    pub fn builder() -> crate::operation::deactivate_message_template::builders::DeactivateMessageTemplateOutputBuilder {
        crate::operation::deactivate_message_template::builders::DeactivateMessageTemplateOutputBuilder::default()
    }
}

/// A builder for [`DeactivateMessageTemplateOutput`](crate::operation::deactivate_message_template::DeactivateMessageTemplateOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeactivateMessageTemplateOutputBuilder {
    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 DeactivateMessageTemplateOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    /// This field is required.
    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
    }
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    pub fn set_message_template_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message_template_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the message template.</p>
    pub fn get_message_template_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.message_template_arn
    }
    /// <p>The identifier of the message template.</p>
    /// This field is required.
    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
    }
    /// <p>The identifier of the message template.</p>
    pub fn set_message_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message_template_id = input;
        self
    }
    /// <p>The identifier of the message template.</p>
    pub fn get_message_template_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.message_template_id
    }
    /// <p>The version number of the message template version that has been deactivated.</p>
    /// This field is required.
    pub fn version_number(mut self, input: i64) -> Self {
        self.version_number = ::std::option::Option::Some(input);
        self
    }
    /// <p>The version number of the message template version that has been deactivated.</p>
    pub fn set_version_number(mut self, input: ::std::option::Option<i64>) -> Self {
        self.version_number = input;
        self
    }
    /// <p>The version number of the message template version that has been deactivated.</p>
    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
    }
    /// Consumes the builder and constructs a [`DeactivateMessageTemplateOutput`](crate::operation::deactivate_message_template::DeactivateMessageTemplateOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`message_template_arn`](crate::operation::deactivate_message_template::builders::DeactivateMessageTemplateOutputBuilder::message_template_arn)
    /// - [`message_template_id`](crate::operation::deactivate_message_template::builders::DeactivateMessageTemplateOutputBuilder::message_template_id)
    /// - [`version_number`](crate::operation::deactivate_message_template::builders::DeactivateMessageTemplateOutputBuilder::version_number)
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::deactivate_message_template::DeactivateMessageTemplateOutput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::deactivate_message_template::DeactivateMessageTemplateOutput {
            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 DeactivateMessageTemplateOutput",
                )
            })?,
            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 DeactivateMessageTemplateOutput",
                )
            })?,
            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 DeactivateMessageTemplateOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}