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: _scaling_policy.rs
    path of file: ./repos/aws-sdk-rust/sdk/applicationautoscaling/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>Represents a scaling policy to use with Application Auto Scaling.</p>
/// <p>For more information about configuring scaling policies for a specific service, see <a href="https://docs.aws.amazon.com/autoscaling/application/userguide/integrated-services-list.html">Amazon Web Services services that you can use with Application Auto Scaling</a> in the <i>Application Auto Scaling User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ScalingPolicy {
    /// <p>The Amazon Resource Name (ARN) of the scaling policy.</p>
    pub policy_arn: ::std::string::String,
    /// <p>The name of the scaling policy.</p>
    pub policy_name: ::std::string::String,
    /// <p>The namespace of the Amazon Web Services service that provides the resource, or a <code>custom-resource</code>.</p>
    pub service_namespace: crate::types::ServiceNamespace,
    /
    
    pub fn build(self) -> ::std::result::Result<crate::types::ScalingPolicy, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::ScalingPolicy {
            policy_arn: self.policy_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "policy_arn",
                    "policy_arn was not specified but it is required when building ScalingPolicy",
                )
            })?,
            policy_name: self.policy_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "policy_name",
                    "policy_name was not specified but it is required when building ScalingPolicy",
                )
            })?,
            service_namespace: self.service_namespace.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "service_namespace",
                    "service_namespace was not specified but it is required when building ScalingPolicy",
                )
            })?,
            resource_id: self.resource_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "resource_id",
                    "resource_id was not specified but it is required when building ScalingPolicy",
                )
            })?,
            scalable_dimension: self.scalable_dimension.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "scalable_dimension",
                    "scalable_dimension was not specified but it is required when building ScalingPolicy",
                )
            })?,
            policy_type: self.policy_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "policy_type",
                    "policy_type was not specified but it is required when building ScalingPolicy",
                )
            })?,
            step_scaling_policy_configuration: self.step_scaling_policy_configuration,
            target_tracking_scaling_policy_configuration: self.target_tracking_scaling_policy_configuration,
            alarms: self.alarms,
            creation_time: self.creation_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "creation_time",
                    "creation_time was not specified but it is required when building ScalingPolicy",
                )
            })?,
        })
    }