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: _ec2_config.rs
    path of file: ./repos/aws-sdk-rust/sdk/datasync/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>The subnet and security groups that DataSync uses to access your Amazon EFS file system.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Ec2Config {
    /// <p>Specifies the ARN of a subnet where DataSync creates the <a href="https://docs.aws.amazon.com/datasync/latest/userguide/datasync-network.html#re
    
    pub fn build(self) -> ::std::result::Result<crate::types::Ec2Config, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Ec2Config {
            subnet_arn: self.subnet_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "subnet_arn",
                    "subnet_arn was not specified but it is required when building Ec2Config",
                )
            })?,
            security_group_arns: self.security_group_arns.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "security_group_arns",
                    "security_group_arns was not specified but it is required when building Ec2Config",
                )
            })?,
        })
    }