pub struct Builder { /* private fields */ }
Expand description

Implementations§

The Amazon Web Services account ID of the Auto Scaling group.

The Amazon Web Services account ID of the Auto Scaling group.

Examples found in repository?
src/json_deser.rs (lines 2029-2035)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

The Amazon Resource Name (ARN) of the Auto Scaling group.

The Amazon Resource Name (ARN) of the Auto Scaling group.

Examples found in repository?
src/json_deser.rs (lines 2038-2044)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

The name of the Auto Scaling group.

The name of the Auto Scaling group.

Examples found in repository?
src/json_deser.rs (lines 2047-2053)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

The finding classification of the Auto Scaling group.

Findings for Auto Scaling groups include:

  • NotOptimized —An Auto Scaling group is considered not optimized when Compute Optimizer identifies a recommendation that can provide better performance for your workload.

  • Optimized —An Auto Scaling group is considered optimized when Compute Optimizer determines that the group is correctly provisioned to run your workload based on the chosen instance type. For optimized resources, Compute Optimizer might recommend a new generation instance type.

The finding classification of the Auto Scaling group.

Findings for Auto Scaling groups include:

  • NotOptimized —An Auto Scaling group is considered not optimized when Compute Optimizer identifies a recommendation that can provide better performance for your workload.

  • Optimized —An Auto Scaling group is considered optimized when Compute Optimizer determines that the group is correctly provisioned to run your workload based on the chosen instance type. For optimized resources, Compute Optimizer might recommend a new generation instance type.

Examples found in repository?
src/json_deser.rs (lines 2056-2065)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to utilization_metrics.

To override the contents of this collection use set_utilization_metrics.

An array of objects that describe the utilization metrics of the Auto Scaling group.

An array of objects that describe the utilization metrics of the Auto Scaling group.

Examples found in repository?
src/json_deser.rs (lines 2068-2070)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

The number of days for which utilization metrics were analyzed for the Auto Scaling group.

The number of days for which utilization metrics were analyzed for the Auto Scaling group.

Examples found in repository?
src/json_deser.rs (lines 2073-2078)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

An array of objects that describe the current configuration of the Auto Scaling group.

An array of objects that describe the current configuration of the Auto Scaling group.

Examples found in repository?
src/json_deser.rs (lines 2081-2083)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to recommendation_options.

To override the contents of this collection use set_recommendation_options.

An array of objects that describe the recommendation options for the Auto Scaling group.

An array of objects that describe the recommendation options for the Auto Scaling group.

Examples found in repository?
src/json_deser.rs (lines 2086-2088)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

The timestamp of when the Auto Scaling group recommendation was last generated.

The timestamp of when the Auto Scaling group recommendation was last generated.

Examples found in repository?
src/json_deser.rs (lines 2091-2096)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

The risk of the current Auto Scaling group not meeting the performance needs of its workloads. The higher the risk, the more likely the current Auto Scaling group configuration has insufficient capacity and cannot meet workload requirements.

The risk of the current Auto Scaling group not meeting the performance needs of its workloads. The higher the risk, the more likely the current Auto Scaling group configuration has insufficient capacity and cannot meet workload requirements.

Examples found in repository?
src/json_deser.rs (lines 2099-2109)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

An object that describes the effective recommendation preferences for the Auto Scaling group.

An object that describes the effective recommendation preferences for the Auto Scaling group.

Examples found in repository?
src/json_deser.rs (lines 2112-2114)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to inferred_workload_types.

To override the contents of this collection use set_inferred_workload_types.

The applications that might be running on the instances in the Auto Scaling group as inferred by Compute Optimizer.

Compute Optimizer can infer if one of the following applications might be running on the instances:

  • AmazonEmr - Infers that Amazon EMR might be running on the instances.

  • ApacheCassandra - Infers that Apache Cassandra might be running on the instances.

  • ApacheHadoop - Infers that Apache Hadoop might be running on the instances.

  • Memcached - Infers that Memcached might be running on the instances.

  • NGINX - Infers that NGINX might be running on the instances.

  • PostgreSql - Infers that PostgreSQL might be running on the instances.

  • Redis - Infers that Redis might be running on the instances.

The applications that might be running on the instances in the Auto Scaling group as inferred by Compute Optimizer.

Compute Optimizer can infer if one of the following applications might be running on the instances:

  • AmazonEmr - Infers that Amazon EMR might be running on the instances.

  • ApacheCassandra - Infers that Apache Cassandra might be running on the instances.

  • ApacheHadoop - Infers that Apache Hadoop might be running on the instances.

  • Memcached - Infers that Memcached might be running on the instances.

  • NGINX - Infers that NGINX might be running on the instances.

  • PostgreSql - Infers that PostgreSQL might be running on the instances.

  • Redis - Infers that Redis might be running on the instances.

Examples found in repository?
src/json_deser.rs (lines 2117-2119)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Consumes the builder and constructs a AutoScalingGroupRecommendation.

Examples found in repository?
src/json_deser.rs (line 2134)
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
pub(crate) fn deser_structure_crate_model_auto_scaling_group_recommendation<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::AutoScalingGroupRecommendation>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::auto_scaling_group_recommendation::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "accountId" => {
                                builder = builder.set_account_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupArn" => {
                                builder = builder.set_auto_scaling_group_arn(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "autoScalingGroupName" => {
                                builder = builder.set_auto_scaling_group_name(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "finding" => {
                                builder = builder.set_finding(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped()
                                            .map(|u| crate::model::Finding::from(u.as_ref()))
                                    })
                                    .transpose()?,
                                );
                            }
                            "utilizationMetrics" => {
                                builder = builder.set_utilization_metrics(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_utilization_metrics(tokens)?
                                );
                            }
                            "lookBackPeriodInDays" => {
                                builder = builder.set_look_back_period_in_days(
                                    aws_smithy_json::deserialize::token::expect_number_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|v| v.to_f64_lossy()),
                                );
                            }
                            "currentConfiguration" => {
                                builder = builder.set_current_configuration(
                                    crate::json_deser::deser_structure_crate_model_auto_scaling_group_configuration(tokens)?
                                );
                            }
                            "recommendationOptions" => {
                                builder = builder.set_recommendation_options(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_auto_scaling_group_recommendation_options(tokens)?
                                );
                            }
                            "lastRefreshTimestamp" => {
                                builder = builder.set_last_refresh_timestamp(
                                    aws_smithy_json::deserialize::token::expect_timestamp_or_null(
                                        tokens.next(),
                                        aws_smithy_types::date_time::Format::EpochSeconds,
                                    )?,
                                );
                            }
                            "currentPerformanceRisk" => {
                                builder = builder.set_current_performance_risk(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::CurrentPerformanceRisk::from(u.as_ref())
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            "effectiveRecommendationPreferences" => {
                                builder = builder.set_effective_recommendation_preferences(
                                    crate::json_deser::deser_structure_crate_model_effective_recommendation_preferences(tokens)?
                                );
                            }
                            "inferredWorkloadTypes" => {
                                builder = builder.set_inferred_workload_types(
                                    crate::json_deser::deser_list_com_amazonaws_computeoptimizer_inferred_workload_types(tokens)?
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more