You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: _sns_action.rs
    path of file: ./repos/aws-sdk-rust/sdk/iot/src/types
    
    the code of the file until where you have to start completion: // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes an action to publish to an Amazon SNS topic.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SnsAction {
    /// <p>The ARN of the SNS topic.</p>
    pub target_arn: ::std::string::String,
    /// <p>The ARN of the IAM role that grants access.</p>
    pub role_arn: ::std::string::String,
    /// <p>(Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload shou
    
    pub fn build(self) -> ::std::result::Result<crate::types::SnsAction, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::SnsAction {
            target_arn: self.target_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "target_arn",
                    "target_arn was not specified but it is required when building SnsAction",
                )
            })?,
            role_arn: self.role_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "role_arn",
                    "role_arn was not specified but it is required when building SnsAction",
                )
            })?,
            message_format: self.message_format,
        })
    }