
com.amazonaws.services.costexplorer.model.RightsizingRecommendationConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-costexplorer Show documentation
/*
* Copyright 2020-2025 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.costexplorer.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* You can use RightsizingRecommendationConfiguration
to customize recommendations across two attributes.
* You can choose to view recommendations for instances within the same instance families or across different instance
* families. You can also choose to view your estimated savings that are associated with recommendations with
* consideration of existing Savings Plans or Reserved Instance (RI) benefits, or neither.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RightsizingRecommendationConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* The option to see recommendations within the same instance family or recommendations for instances across other
* families. The default value is SAME_INSTANCE_FAMILY
.
*
*/
private String recommendationTarget;
/**
*
* The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is
* TRUE
.
*
*/
private Boolean benefitsConsidered;
/**
*
* The option to see recommendations within the same instance family or recommendations for instances across other
* families. The default value is SAME_INSTANCE_FAMILY
.
*
*
* @param recommendationTarget
* The option to see recommendations within the same instance family or recommendations for instances across
* other families. The default value is SAME_INSTANCE_FAMILY
.
* @see RecommendationTarget
*/
public void setRecommendationTarget(String recommendationTarget) {
this.recommendationTarget = recommendationTarget;
}
/**
*
* The option to see recommendations within the same instance family or recommendations for instances across other
* families. The default value is SAME_INSTANCE_FAMILY
.
*
*
* @return The option to see recommendations within the same instance family or recommendations for instances across
* other families. The default value is SAME_INSTANCE_FAMILY
.
* @see RecommendationTarget
*/
public String getRecommendationTarget() {
return this.recommendationTarget;
}
/**
*
* The option to see recommendations within the same instance family or recommendations for instances across other
* families. The default value is SAME_INSTANCE_FAMILY
.
*
*
* @param recommendationTarget
* The option to see recommendations within the same instance family or recommendations for instances across
* other families. The default value is SAME_INSTANCE_FAMILY
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationTarget
*/
public RightsizingRecommendationConfiguration withRecommendationTarget(String recommendationTarget) {
setRecommendationTarget(recommendationTarget);
return this;
}
/**
*
* The option to see recommendations within the same instance family or recommendations for instances across other
* families. The default value is SAME_INSTANCE_FAMILY
.
*
*
* @param recommendationTarget
* The option to see recommendations within the same instance family or recommendations for instances across
* other families. The default value is SAME_INSTANCE_FAMILY
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationTarget
*/
public RightsizingRecommendationConfiguration withRecommendationTarget(RecommendationTarget recommendationTarget) {
this.recommendationTarget = recommendationTarget.toString();
return this;
}
/**
*
* The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is
* TRUE
.
*
*
* @param benefitsConsidered
* The option to consider RI or Savings Plans discount benefits in your savings calculation. The default
* value is TRUE
.
*/
public void setBenefitsConsidered(Boolean benefitsConsidered) {
this.benefitsConsidered = benefitsConsidered;
}
/**
*
* The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is
* TRUE
.
*
*
* @return The option to consider RI or Savings Plans discount benefits in your savings calculation. The default
* value is TRUE
.
*/
public Boolean getBenefitsConsidered() {
return this.benefitsConsidered;
}
/**
*
* The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is
* TRUE
.
*
*
* @param benefitsConsidered
* The option to consider RI or Savings Plans discount benefits in your savings calculation. The default
* value is TRUE
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RightsizingRecommendationConfiguration withBenefitsConsidered(Boolean benefitsConsidered) {
setBenefitsConsidered(benefitsConsidered);
return this;
}
/**
*
* The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is
* TRUE
.
*
*
* @return The option to consider RI or Savings Plans discount benefits in your savings calculation. The default
* value is TRUE
.
*/
public Boolean isBenefitsConsidered() {
return this.benefitsConsidered;
}
/**
* 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 (getRecommendationTarget() != null)
sb.append("RecommendationTarget: ").append(getRecommendationTarget()).append(",");
if (getBenefitsConsidered() != null)
sb.append("BenefitsConsidered: ").append(getBenefitsConsidered());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RightsizingRecommendationConfiguration == false)
return false;
RightsizingRecommendationConfiguration other = (RightsizingRecommendationConfiguration) obj;
if (other.getRecommendationTarget() == null ^ this.getRecommendationTarget() == null)
return false;
if (other.getRecommendationTarget() != null && other.getRecommendationTarget().equals(this.getRecommendationTarget()) == false)
return false;
if (other.getBenefitsConsidered() == null ^ this.getBenefitsConsidered() == null)
return false;
if (other.getBenefitsConsidered() != null && other.getBenefitsConsidered().equals(this.getBenefitsConsidered()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRecommendationTarget() == null) ? 0 : getRecommendationTarget().hashCode());
hashCode = prime * hashCode + ((getBenefitsConsidered() == null) ? 0 : getBenefitsConsidered().hashCode());
return hashCode;
}
@Override
public RightsizingRecommendationConfiguration clone() {
try {
return (RightsizingRecommendationConfiguration) 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.costexplorer.model.transform.RightsizingRecommendationConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}