pub struct Builder { /* private fields */ }
Expand description
A builder for AutoScalingGroupRecommendation
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn account_id(self, input: impl Into<String>) -> Self
pub fn account_id(self, input: impl Into<String>) -> Self
The Amazon Web Services account ID of the Auto Scaling group.
sourcepub fn set_account_id(self, input: Option<String>) -> Self
pub fn set_account_id(self, input: Option<String>) -> Self
The Amazon Web Services account ID of the Auto Scaling group.
Examples found in repository?
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",
),
),
}
}
sourcepub fn auto_scaling_group_arn(self, input: impl Into<String>) -> Self
pub fn auto_scaling_group_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the Auto Scaling group.
sourcepub fn set_auto_scaling_group_arn(self, input: Option<String>) -> Self
pub fn set_auto_scaling_group_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the Auto Scaling group.
Examples found in repository?
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",
),
),
}
}
sourcepub fn auto_scaling_group_name(self, input: impl Into<String>) -> Self
pub fn auto_scaling_group_name(self, input: impl Into<String>) -> Self
The name of the Auto Scaling group.
sourcepub fn set_auto_scaling_group_name(self, input: Option<String>) -> Self
pub fn set_auto_scaling_group_name(self, input: Option<String>) -> Self
The name of the Auto Scaling group.
Examples found in repository?
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",
),
),
}
}
sourcepub fn finding(self, input: Finding) -> Self
pub fn finding(self, input: Finding) -> Self
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.
sourcepub fn set_finding(self, input: Option<Finding>) -> Self
pub fn set_finding(self, input: Option<Finding>) -> Self
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?
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",
),
),
}
}
sourcepub fn utilization_metrics(self, input: UtilizationMetric) -> Self
pub fn utilization_metrics(self, input: UtilizationMetric) -> Self
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.
sourcepub fn set_utilization_metrics(
self,
input: Option<Vec<UtilizationMetric>>
) -> Self
pub fn set_utilization_metrics(
self,
input: Option<Vec<UtilizationMetric>>
) -> Self
An array of objects that describe the utilization metrics of the Auto Scaling group.
Examples found in repository?
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",
),
),
}
}
sourcepub fn look_back_period_in_days(self, input: f64) -> Self
pub fn look_back_period_in_days(self, input: f64) -> Self
The number of days for which utilization metrics were analyzed for the Auto Scaling group.
sourcepub fn set_look_back_period_in_days(self, input: Option<f64>) -> Self
pub fn set_look_back_period_in_days(self, input: Option<f64>) -> Self
The number of days for which utilization metrics were analyzed for the Auto Scaling group.
Examples found in repository?
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",
),
),
}
}
sourcepub fn current_configuration(self, input: AutoScalingGroupConfiguration) -> Self
pub fn current_configuration(self, input: AutoScalingGroupConfiguration) -> Self
An array of objects that describe the current configuration of the Auto Scaling group.
sourcepub fn set_current_configuration(
self,
input: Option<AutoScalingGroupConfiguration>
) -> Self
pub fn set_current_configuration(
self,
input: Option<AutoScalingGroupConfiguration>
) -> Self
An array of objects that describe the current configuration of the Auto Scaling group.
Examples found in repository?
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",
),
),
}
}
sourcepub fn recommendation_options(
self,
input: AutoScalingGroupRecommendationOption
) -> Self
pub fn recommendation_options(
self,
input: AutoScalingGroupRecommendationOption
) -> Self
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.
sourcepub fn set_recommendation_options(
self,
input: Option<Vec<AutoScalingGroupRecommendationOption>>
) -> Self
pub fn set_recommendation_options(
self,
input: Option<Vec<AutoScalingGroupRecommendationOption>>
) -> Self
An array of objects that describe the recommendation options for the Auto Scaling group.
Examples found in repository?
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",
),
),
}
}
sourcepub fn last_refresh_timestamp(self, input: DateTime) -> Self
pub fn last_refresh_timestamp(self, input: DateTime) -> Self
The timestamp of when the Auto Scaling group recommendation was last generated.
sourcepub fn set_last_refresh_timestamp(self, input: Option<DateTime>) -> Self
pub fn set_last_refresh_timestamp(self, input: Option<DateTime>) -> Self
The timestamp of when the Auto Scaling group recommendation was last generated.
Examples found in repository?
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",
),
),
}
}
sourcepub fn current_performance_risk(self, input: CurrentPerformanceRisk) -> Self
pub fn current_performance_risk(self, input: CurrentPerformanceRisk) -> Self
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.
sourcepub fn set_current_performance_risk(
self,
input: Option<CurrentPerformanceRisk>
) -> Self
pub fn set_current_performance_risk(
self,
input: Option<CurrentPerformanceRisk>
) -> Self
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?
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",
),
),
}
}
sourcepub fn effective_recommendation_preferences(
self,
input: EffectiveRecommendationPreferences
) -> Self
pub fn effective_recommendation_preferences(
self,
input: EffectiveRecommendationPreferences
) -> Self
An object that describes the effective recommendation preferences for the Auto Scaling group.
sourcepub fn set_effective_recommendation_preferences(
self,
input: Option<EffectiveRecommendationPreferences>
) -> Self
pub fn set_effective_recommendation_preferences(
self,
input: Option<EffectiveRecommendationPreferences>
) -> Self
An object that describes the effective recommendation preferences for the Auto Scaling group.
Examples found in repository?
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",
),
),
}
}
sourcepub fn inferred_workload_types(self, input: InferredWorkloadType) -> Self
pub fn inferred_workload_types(self, input: InferredWorkloadType) -> Self
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.
sourcepub fn set_inferred_workload_types(
self,
input: Option<Vec<InferredWorkloadType>>
) -> Self
pub fn set_inferred_workload_types(
self,
input: Option<Vec<InferredWorkloadType>>
) -> Self
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?
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",
),
),
}
}
sourcepub fn build(self) -> AutoScalingGroupRecommendation
pub fn build(self) -> AutoScalingGroupRecommendation
Consumes the builder and constructs a AutoScalingGroupRecommendation
.
Examples found in repository?
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",
),
),
}
}