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: _capacity_provider_strategy_item.rs
    path of file: ./repos/aws-sdk-rust/sdk/ecs/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 details of a capacity provider strategy. A capacity provider strategy can be set when using the <code>RunTask</code> or <code>CreateCluster</code> APIs or as the default capacity provider strategy for
    
    pub fn build(self) -> ::std::result::Result<crate::types::CapacityProviderStrategyItem, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::CapacityProviderStrategyItem {
            capacity_provider: self.capacity_provider.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "capacity_provider",
                    "capacity_provider was not specified but it is required when building CapacityProviderStrategyItem",
                )
            })?,
            weight: self.weight.unwrap_or_default(),
            base: self.base.unwrap_or_default(),
        })
    }