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: _cloudwatch_logs_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 that sends data to CloudWatch Logs.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CloudwatchLogsAction {
    /// <p>The IAM role that allows access to the CloudWatch log.</p>
    pub role_arn: ::std::string::String,
    /// <p>The CloudWatch log group to which the action sends data.</p>
    pub log_group_name: ::std::string::String,
    /// <p>Indicates whether batches of log records will be extracted and uploaded into CloudWatch. Values include <code>true</code> or <code>false</code> <i>(default)</i>.</p>
    pub batch_mode: ::std::option::Option<bool>,
}
impl CloudwatchLogsAction {
    /// <p>The IAM role that allows access t
    
    pub fn build(self) -> ::std::result::Result<crate::types::CloudwatchLogsAction, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::CloudwatchLogsAction {
            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 CloudwatchLogsAction",
                )
            })?,
            log_group_name: self.log_group_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "log_group_name",
                    "log_group_name was not specified but it is required when building CloudwatchLogsAction",
                )
            })?,
            batch_mode: self.batch_mode,
        })
    }