/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.computeoptimizer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes a recommendation option for an Auto Scaling group. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AutoScalingGroupRecommendationOption implements Serializable, Cloneable, StructuredPojo { /** ** An array of objects that describe an Auto Scaling group configuration. *
*/ private AutoScalingGroupConfiguration configuration; /** ** An array of objects that describe the projected utilization metrics of the Auto Scaling group recommendation * option. *
*
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified CloudWatch
* agent installed on them. For more information, see Enabling Memory Utilization
* with the CloudWatch Agent.
*
* The performance risk of the Auto Scaling group configuration recommendation. *
** Performance risk indicates the likelihood of the recommended instance type not meeting the resource needs of your * workload. Compute Optimizer calculates an individual performance risk score for each specification of the * recommended instance, including CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, network * throughput, and network PPS. The performance risk of the recommended instance is calculated as the maximum * performance risk score across the analyzed resource specifications. *
*
* The value ranges from 0
- 4
, with 0
meaning that the recommended resource
* is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely
* you should validate whether the recommendation will meet the performance requirements of your workload before
* migrating your resource.
*
* The rank of the Auto Scaling group recommendation option. *
*
* The top recommendation option is ranked as 1
.
*
* An object that describes the savings opportunity for the Auto Scaling group recommendation option. Savings * opportunity includes the estimated monthly savings amount and percentage. *
*/ private SavingsOpportunity savingsOpportunity; /** ** The level of effort required to migrate from the current instance type to the recommended instance type. *
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an Amazon
* Web Services Graviton instance type is recommended. The migration effort is Medium
if a workload
* type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended. The migration effort
* is VeryLow
if both the current and recommended instance types are of the same CPU architecture.
*
* An array of objects that describe an Auto Scaling group configuration. *
* * @param configuration * An array of objects that describe an Auto Scaling group configuration. */ public void setConfiguration(AutoScalingGroupConfiguration configuration) { this.configuration = configuration; } /** ** An array of objects that describe an Auto Scaling group configuration. *
* * @return An array of objects that describe an Auto Scaling group configuration. */ public AutoScalingGroupConfiguration getConfiguration() { return this.configuration; } /** ** An array of objects that describe an Auto Scaling group configuration. *
* * @param configuration * An array of objects that describe an Auto Scaling group configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroupRecommendationOption withConfiguration(AutoScalingGroupConfiguration configuration) { setConfiguration(configuration); return this; } /** ** An array of objects that describe the projected utilization metrics of the Auto Scaling group recommendation * option. *
*
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified CloudWatch
* agent installed on them. For more information, see Enabling Memory Utilization
* with the CloudWatch Agent.
*
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified
* CloudWatch agent installed on them. For more information, see Enabling Memory
* Utilization with the CloudWatch Agent.
*
* An array of objects that describe the projected utilization metrics of the Auto Scaling group recommendation * option. *
*
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified CloudWatch
* agent installed on them. For more information, see Enabling Memory Utilization
* with the CloudWatch Agent.
*
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified
* CloudWatch agent installed on them. For more information, see Enabling Memory
* Utilization with the CloudWatch Agent.
*
* An array of objects that describe the projected utilization metrics of the Auto Scaling group recommendation * option. *
*
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified CloudWatch
* agent installed on them. For more information, see Enabling Memory Utilization
* with the CloudWatch Agent.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setProjectedUtilizationMetrics(java.util.Collection)} or * {@link #withProjectedUtilizationMetrics(java.util.Collection)} if you want to override the existing values. *
* * @param projectedUtilizationMetrics * An array of objects that describe the projected utilization metrics of the Auto Scaling group * recommendation option.
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified
* CloudWatch agent installed on them. For more information, see Enabling Memory
* Utilization with the CloudWatch Agent.
*
* An array of objects that describe the projected utilization metrics of the Auto Scaling group recommendation * option. *
*
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified CloudWatch
* agent installed on them. For more information, see Enabling Memory Utilization
* with the CloudWatch Agent.
*
* The Cpu
and Memory
metrics are the only projected utilization metrics returned.
* Additionally, the Memory
metric is returned only for resources that have the unified
* CloudWatch agent installed on them. For more information, see Enabling Memory
* Utilization with the CloudWatch Agent.
*
* The performance risk of the Auto Scaling group configuration recommendation. *
** Performance risk indicates the likelihood of the recommended instance type not meeting the resource needs of your * workload. Compute Optimizer calculates an individual performance risk score for each specification of the * recommended instance, including CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, network * throughput, and network PPS. The performance risk of the recommended instance is calculated as the maximum * performance risk score across the analyzed resource specifications. *
*
* The value ranges from 0
- 4
, with 0
meaning that the recommended resource
* is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely
* you should validate whether the recommendation will meet the performance requirements of your workload before
* migrating your resource.
*
* Performance risk indicates the likelihood of the recommended instance type not meeting the resource needs * of your workload. Compute Optimizer calculates an individual performance risk score for each specification * of the recommended instance, including CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, * network throughput, and network PPS. The performance risk of the recommended instance is calculated as the * maximum performance risk score across the analyzed resource specifications. *
*
* The value ranges from 0
- 4
, with 0
meaning that the recommended
* resource is predicted to always provide enough hardware capability. The higher the performance risk is,
* the more likely you should validate whether the recommendation will meet the performance requirements of
* your workload before migrating your resource.
*/
public void setPerformanceRisk(Double performanceRisk) {
this.performanceRisk = performanceRisk;
}
/**
*
* The performance risk of the Auto Scaling group configuration recommendation. *
** Performance risk indicates the likelihood of the recommended instance type not meeting the resource needs of your * workload. Compute Optimizer calculates an individual performance risk score for each specification of the * recommended instance, including CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, network * throughput, and network PPS. The performance risk of the recommended instance is calculated as the maximum * performance risk score across the analyzed resource specifications. *
*
* The value ranges from 0
- 4
, with 0
meaning that the recommended resource
* is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely
* you should validate whether the recommendation will meet the performance requirements of your workload before
* migrating your resource.
*
* Performance risk indicates the likelihood of the recommended instance type not meeting the resource needs * of your workload. Compute Optimizer calculates an individual performance risk score for each * specification of the recommended instance, including CPU, memory, EBS throughput, EBS IOPS, disk * throughput, disk IOPS, network throughput, and network PPS. The performance risk of the recommended * instance is calculated as the maximum performance risk score across the analyzed resource specifications. *
*
* The value ranges from 0
- 4
, with 0
meaning that the recommended
* resource is predicted to always provide enough hardware capability. The higher the performance risk is,
* the more likely you should validate whether the recommendation will meet the performance requirements of
* your workload before migrating your resource.
*/
public Double getPerformanceRisk() {
return this.performanceRisk;
}
/**
*
* The performance risk of the Auto Scaling group configuration recommendation. *
** Performance risk indicates the likelihood of the recommended instance type not meeting the resource needs of your * workload. Compute Optimizer calculates an individual performance risk score for each specification of the * recommended instance, including CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, network * throughput, and network PPS. The performance risk of the recommended instance is calculated as the maximum * performance risk score across the analyzed resource specifications. *
*
* The value ranges from 0
- 4
, with 0
meaning that the recommended resource
* is predicted to always provide enough hardware capability. The higher the performance risk is, the more likely
* you should validate whether the recommendation will meet the performance requirements of your workload before
* migrating your resource.
*
* Performance risk indicates the likelihood of the recommended instance type not meeting the resource needs * of your workload. Compute Optimizer calculates an individual performance risk score for each specification * of the recommended instance, including CPU, memory, EBS throughput, EBS IOPS, disk throughput, disk IOPS, * network throughput, and network PPS. The performance risk of the recommended instance is calculated as the * maximum performance risk score across the analyzed resource specifications. *
*
* The value ranges from 0
- 4
, with 0
meaning that the recommended
* resource is predicted to always provide enough hardware capability. The higher the performance risk is,
* the more likely you should validate whether the recommendation will meet the performance requirements of
* your workload before migrating your resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AutoScalingGroupRecommendationOption withPerformanceRisk(Double performanceRisk) {
setPerformanceRisk(performanceRisk);
return this;
}
/**
*
* The rank of the Auto Scaling group recommendation option. *
*
* The top recommendation option is ranked as 1
.
*
* The top recommendation option is ranked as 1
.
*/
public void setRank(Integer rank) {
this.rank = rank;
}
/**
*
* The rank of the Auto Scaling group recommendation option. *
*
* The top recommendation option is ranked as 1
.
*
* The top recommendation option is ranked as 1
.
*/
public Integer getRank() {
return this.rank;
}
/**
*
* The rank of the Auto Scaling group recommendation option. *
*
* The top recommendation option is ranked as 1
.
*
* The top recommendation option is ranked as 1
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AutoScalingGroupRecommendationOption withRank(Integer rank) {
setRank(rank);
return this;
}
/**
*
* An object that describes the savings opportunity for the Auto Scaling group recommendation option. Savings * opportunity includes the estimated monthly savings amount and percentage. *
* * @param savingsOpportunity * An object that describes the savings opportunity for the Auto Scaling group recommendation option. Savings * opportunity includes the estimated monthly savings amount and percentage. */ public void setSavingsOpportunity(SavingsOpportunity savingsOpportunity) { this.savingsOpportunity = savingsOpportunity; } /** ** An object that describes the savings opportunity for the Auto Scaling group recommendation option. Savings * opportunity includes the estimated monthly savings amount and percentage. *
* * @return An object that describes the savings opportunity for the Auto Scaling group recommendation option. * Savings opportunity includes the estimated monthly savings amount and percentage. */ public SavingsOpportunity getSavingsOpportunity() { return this.savingsOpportunity; } /** ** An object that describes the savings opportunity for the Auto Scaling group recommendation option. Savings * opportunity includes the estimated monthly savings amount and percentage. *
* * @param savingsOpportunity * An object that describes the savings opportunity for the Auto Scaling group recommendation option. Savings * opportunity includes the estimated monthly savings amount and percentage. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingGroupRecommendationOption withSavingsOpportunity(SavingsOpportunity savingsOpportunity) { setSavingsOpportunity(savingsOpportunity); return this; } /** ** The level of effort required to migrate from the current instance type to the recommended instance type. *
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an Amazon
* Web Services Graviton instance type is recommended. The migration effort is Medium
if a workload
* type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended. The migration effort
* is VeryLow
if both the current and recommended instance types are of the same CPU architecture.
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an
* Amazon Web Services Graviton instance type is recommended. The migration effort is Medium
if
* a workload type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended. The
* migration effort is VeryLow
if both the current and recommended instance types are of the
* same CPU architecture.
* @see MigrationEffort
*/
public void setMigrationEffort(String migrationEffort) {
this.migrationEffort = migrationEffort;
}
/**
*
* The level of effort required to migrate from the current instance type to the recommended instance type. *
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an Amazon
* Web Services Graviton instance type is recommended. The migration effort is Medium
if a workload
* type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended. The migration effort
* is VeryLow
if both the current and recommended instance types are of the same CPU architecture.
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an
* Amazon Web Services Graviton instance type is recommended. The migration effort is Medium
if
* a workload type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended.
* The migration effort is VeryLow
if both the current and recommended instance types are of
* the same CPU architecture.
* @see MigrationEffort
*/
public String getMigrationEffort() {
return this.migrationEffort;
}
/**
*
* The level of effort required to migrate from the current instance type to the recommended instance type. *
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an Amazon
* Web Services Graviton instance type is recommended. The migration effort is Medium
if a workload
* type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended. The migration effort
* is VeryLow
if both the current and recommended instance types are of the same CPU architecture.
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an
* Amazon Web Services Graviton instance type is recommended. The migration effort is Medium
if
* a workload type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended. The
* migration effort is VeryLow
if both the current and recommended instance types are of the
* same CPU architecture.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MigrationEffort
*/
public AutoScalingGroupRecommendationOption withMigrationEffort(String migrationEffort) {
setMigrationEffort(migrationEffort);
return this;
}
/**
*
* The level of effort required to migrate from the current instance type to the recommended instance type. *
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an Amazon
* Web Services Graviton instance type is recommended. The migration effort is Medium
if a workload
* type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended. The migration effort
* is VeryLow
if both the current and recommended instance types are of the same CPU architecture.
*
* For example, the migration effort is Low
if Amazon EMR is the inferred workload type and an
* Amazon Web Services Graviton instance type is recommended. The migration effort is Medium
if
* a workload type couldn't be inferred but an Amazon Web Services Graviton instance type is recommended. The
* migration effort is VeryLow
if both the current and recommended instance types are of the
* same CPU architecture.
* @return Returns a reference to this object so that method calls can be chained together.
* @see MigrationEffort
*/
public AutoScalingGroupRecommendationOption withMigrationEffort(MigrationEffort migrationEffort) {
this.migrationEffort = migrationEffort.toString();
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getConfiguration() != null)
sb.append("Configuration: ").append(getConfiguration()).append(",");
if (getProjectedUtilizationMetrics() != null)
sb.append("ProjectedUtilizationMetrics: ").append(getProjectedUtilizationMetrics()).append(",");
if (getPerformanceRisk() != null)
sb.append("PerformanceRisk: ").append(getPerformanceRisk()).append(",");
if (getRank() != null)
sb.append("Rank: ").append(getRank()).append(",");
if (getSavingsOpportunity() != null)
sb.append("SavingsOpportunity: ").append(getSavingsOpportunity()).append(",");
if (getMigrationEffort() != null)
sb.append("MigrationEffort: ").append(getMigrationEffort());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AutoScalingGroupRecommendationOption == false)
return false;
AutoScalingGroupRecommendationOption other = (AutoScalingGroupRecommendationOption) obj;
if (other.getConfiguration() == null ^ this.getConfiguration() == null)
return false;
if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == false)
return false;
if (other.getProjectedUtilizationMetrics() == null ^ this.getProjectedUtilizationMetrics() == null)
return false;
if (other.getProjectedUtilizationMetrics() != null && other.getProjectedUtilizationMetrics().equals(this.getProjectedUtilizationMetrics()) == false)
return false;
if (other.getPerformanceRisk() == null ^ this.getPerformanceRisk() == null)
return false;
if (other.getPerformanceRisk() != null && other.getPerformanceRisk().equals(this.getPerformanceRisk()) == false)
return false;
if (other.getRank() == null ^ this.getRank() == null)
return false;
if (other.getRank() != null && other.getRank().equals(this.getRank()) == false)
return false;
if (other.getSavingsOpportunity() == null ^ this.getSavingsOpportunity() == null)
return false;
if (other.getSavingsOpportunity() != null && other.getSavingsOpportunity().equals(this.getSavingsOpportunity()) == false)
return false;
if (other.getMigrationEffort() == null ^ this.getMigrationEffort() == null)
return false;
if (other.getMigrationEffort() != null && other.getMigrationEffort().equals(this.getMigrationEffort()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode());
hashCode = prime * hashCode + ((getProjectedUtilizationMetrics() == null) ? 0 : getProjectedUtilizationMetrics().hashCode());
hashCode = prime * hashCode + ((getPerformanceRisk() == null) ? 0 : getPerformanceRisk().hashCode());
hashCode = prime * hashCode + ((getRank() == null) ? 0 : getRank().hashCode());
hashCode = prime * hashCode + ((getSavingsOpportunity() == null) ? 0 : getSavingsOpportunity().hashCode());
hashCode = prime * hashCode + ((getMigrationEffort() == null) ? 0 : getMigrationEffort().hashCode());
return hashCode;
}
@Override
public AutoScalingGroupRecommendationOption clone() {
try {
return (AutoScalingGroupRecommendationOption) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.computeoptimizer.model.transform.AutoScalingGroupRecommendationOptionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}