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: _task_start_failed_event_details.rs
    path of file: ./repos/aws-sdk-rust/sdk/sfn/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>Contains details about a task that failed to start during an execution.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct TaskStartFailedEventDetails {
    /// <p>The service name of the resource in a task state.</p>
    pub resource_type: ::std::string::String,
    /// <p>The action of the resource called by a task state.</p>
    pub resource: ::std::string::String,
    /// <p>The error code of the failure.</p>
    pub error: ::std::option::Option<::std::string::String>,
    /// <p>A more detailed explanation of the cause of the failure.</p>
    pub cause: ::std::option::Option<::std
    
    pub fn build(self) -> ::std::result::Result<crate::types::TaskStartFailedEventDetails, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::TaskStartFailedEventDetails {
            resource_type: self.resource_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "resource_type",
                    "resource_type was not specified but it is required when building TaskStartFailedEventDetails",
                )
            })?,
            resource: self.resource.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "resource",
                    "resource was not specified but it is required when building TaskStartFailedEventDetails",
                )
            })?,
            error: self.error,
            cause: self.cause,
        })
    }