
com.amazonaws.services.costexplorer.model.SavingsPlansPurchaseRecommendationSummary 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;
/**
*
* Summary metrics for your Savings Plans Purchase Recommendations.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SavingsPlansPurchaseRecommendationSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The estimated return on investment that's based on the recommended Savings Plans and estimated savings.
*
*/
private String estimatedROI;
/**
*
* The currency code that Amazon Web Services used to generate the recommendations and present potential savings.
*
*/
private String currencyCode;
/**
*
* The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the cost
* of Savings Plans during this term, and the remaining On-Demand usage.
*
*/
private String estimatedTotalCost;
/**
*
* The current total on demand spend of the applicable usage types over the lookback period.
*
*/
private String currentOnDemandSpend;
/**
*
* The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.
*
*/
private String estimatedSavingsAmount;
/**
*
* The aggregate number of Savings Plans recommendations that exist for your account.
*
*/
private String totalRecommendationCount;
/**
*
* The recommended Savings Plans cost on a daily (24 hourly) basis.
*
*/
private String dailyCommitmentToPurchase;
/**
*
* The recommended hourly commitment that's based on the recommendation parameters.
*
*/
private String hourlyCommitmentToPurchase;
/**
*
* The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated
* as estimatedSavingsAmount
/ CurrentOnDemandSpend
*100.
*
*/
private String estimatedSavingsPercentage;
/**
*
* The estimated monthly savings amount that's based on the recommended Savings Plans purchase.
*
*/
private String estimatedMonthlySavingsAmount;
/**
*
* The estimated On-Demand costs you expect with no additional commitment. It's based on your usage of the selected
* time period and the Savings Plans you own.
*
*/
private String estimatedOnDemandCostWithCurrentCommitment;
/**
*
* The estimated return on investment that's based on the recommended Savings Plans and estimated savings.
*
*
* @param estimatedROI
* The estimated return on investment that's based on the recommended Savings Plans and estimated savings.
*/
public void setEstimatedROI(String estimatedROI) {
this.estimatedROI = estimatedROI;
}
/**
*
* The estimated return on investment that's based on the recommended Savings Plans and estimated savings.
*
*
* @return The estimated return on investment that's based on the recommended Savings Plans and estimated savings.
*/
public String getEstimatedROI() {
return this.estimatedROI;
}
/**
*
* The estimated return on investment that's based on the recommended Savings Plans and estimated savings.
*
*
* @param estimatedROI
* The estimated return on investment that's based on the recommended Savings Plans and estimated savings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withEstimatedROI(String estimatedROI) {
setEstimatedROI(estimatedROI);
return this;
}
/**
*
* The currency code that Amazon Web Services used to generate the recommendations and present potential savings.
*
*
* @param currencyCode
* The currency code that Amazon Web Services used to generate the recommendations and present potential
* savings.
*/
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
/**
*
* The currency code that Amazon Web Services used to generate the recommendations and present potential savings.
*
*
* @return The currency code that Amazon Web Services used to generate the recommendations and present potential
* savings.
*/
public String getCurrencyCode() {
return this.currencyCode;
}
/**
*
* The currency code that Amazon Web Services used to generate the recommendations and present potential savings.
*
*
* @param currencyCode
* The currency code that Amazon Web Services used to generate the recommendations and present potential
* savings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withCurrencyCode(String currencyCode) {
setCurrencyCode(currencyCode);
return this;
}
/**
*
* The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the cost
* of Savings Plans during this term, and the remaining On-Demand usage.
*
*
* @param estimatedTotalCost
* The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the
* cost of Savings Plans during this term, and the remaining On-Demand usage.
*/
public void setEstimatedTotalCost(String estimatedTotalCost) {
this.estimatedTotalCost = estimatedTotalCost;
}
/**
*
* The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the cost
* of Savings Plans during this term, and the remaining On-Demand usage.
*
*
* @return The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of
* the cost of Savings Plans during this term, and the remaining On-Demand usage.
*/
public String getEstimatedTotalCost() {
return this.estimatedTotalCost;
}
/**
*
* The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the cost
* of Savings Plans during this term, and the remaining On-Demand usage.
*
*
* @param estimatedTotalCost
* The estimated total cost of the usage after purchasing the recommended Savings Plans. This is a sum of the
* cost of Savings Plans during this term, and the remaining On-Demand usage.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withEstimatedTotalCost(String estimatedTotalCost) {
setEstimatedTotalCost(estimatedTotalCost);
return this;
}
/**
*
* The current total on demand spend of the applicable usage types over the lookback period.
*
*
* @param currentOnDemandSpend
* The current total on demand spend of the applicable usage types over the lookback period.
*/
public void setCurrentOnDemandSpend(String currentOnDemandSpend) {
this.currentOnDemandSpend = currentOnDemandSpend;
}
/**
*
* The current total on demand spend of the applicable usage types over the lookback period.
*
*
* @return The current total on demand spend of the applicable usage types over the lookback period.
*/
public String getCurrentOnDemandSpend() {
return this.currentOnDemandSpend;
}
/**
*
* The current total on demand spend of the applicable usage types over the lookback period.
*
*
* @param currentOnDemandSpend
* The current total on demand spend of the applicable usage types over the lookback period.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withCurrentOnDemandSpend(String currentOnDemandSpend) {
setCurrentOnDemandSpend(currentOnDemandSpend);
return this;
}
/**
*
* The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.
*
*
* @param estimatedSavingsAmount
* The estimated total savings over the lookback period, based on the purchase of the recommended Savings
* Plans.
*/
public void setEstimatedSavingsAmount(String estimatedSavingsAmount) {
this.estimatedSavingsAmount = estimatedSavingsAmount;
}
/**
*
* The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.
*
*
* @return The estimated total savings over the lookback period, based on the purchase of the recommended Savings
* Plans.
*/
public String getEstimatedSavingsAmount() {
return this.estimatedSavingsAmount;
}
/**
*
* The estimated total savings over the lookback period, based on the purchase of the recommended Savings Plans.
*
*
* @param estimatedSavingsAmount
* The estimated total savings over the lookback period, based on the purchase of the recommended Savings
* Plans.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withEstimatedSavingsAmount(String estimatedSavingsAmount) {
setEstimatedSavingsAmount(estimatedSavingsAmount);
return this;
}
/**
*
* The aggregate number of Savings Plans recommendations that exist for your account.
*
*
* @param totalRecommendationCount
* The aggregate number of Savings Plans recommendations that exist for your account.
*/
public void setTotalRecommendationCount(String totalRecommendationCount) {
this.totalRecommendationCount = totalRecommendationCount;
}
/**
*
* The aggregate number of Savings Plans recommendations that exist for your account.
*
*
* @return The aggregate number of Savings Plans recommendations that exist for your account.
*/
public String getTotalRecommendationCount() {
return this.totalRecommendationCount;
}
/**
*
* The aggregate number of Savings Plans recommendations that exist for your account.
*
*
* @param totalRecommendationCount
* The aggregate number of Savings Plans recommendations that exist for your account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withTotalRecommendationCount(String totalRecommendationCount) {
setTotalRecommendationCount(totalRecommendationCount);
return this;
}
/**
*
* The recommended Savings Plans cost on a daily (24 hourly) basis.
*
*
* @param dailyCommitmentToPurchase
* The recommended Savings Plans cost on a daily (24 hourly) basis.
*/
public void setDailyCommitmentToPurchase(String dailyCommitmentToPurchase) {
this.dailyCommitmentToPurchase = dailyCommitmentToPurchase;
}
/**
*
* The recommended Savings Plans cost on a daily (24 hourly) basis.
*
*
* @return The recommended Savings Plans cost on a daily (24 hourly) basis.
*/
public String getDailyCommitmentToPurchase() {
return this.dailyCommitmentToPurchase;
}
/**
*
* The recommended Savings Plans cost on a daily (24 hourly) basis.
*
*
* @param dailyCommitmentToPurchase
* The recommended Savings Plans cost on a daily (24 hourly) basis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withDailyCommitmentToPurchase(String dailyCommitmentToPurchase) {
setDailyCommitmentToPurchase(dailyCommitmentToPurchase);
return this;
}
/**
*
* The recommended hourly commitment that's based on the recommendation parameters.
*
*
* @param hourlyCommitmentToPurchase
* The recommended hourly commitment that's based on the recommendation parameters.
*/
public void setHourlyCommitmentToPurchase(String hourlyCommitmentToPurchase) {
this.hourlyCommitmentToPurchase = hourlyCommitmentToPurchase;
}
/**
*
* The recommended hourly commitment that's based on the recommendation parameters.
*
*
* @return The recommended hourly commitment that's based on the recommendation parameters.
*/
public String getHourlyCommitmentToPurchase() {
return this.hourlyCommitmentToPurchase;
}
/**
*
* The recommended hourly commitment that's based on the recommendation parameters.
*
*
* @param hourlyCommitmentToPurchase
* The recommended hourly commitment that's based on the recommendation parameters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withHourlyCommitmentToPurchase(String hourlyCommitmentToPurchase) {
setHourlyCommitmentToPurchase(hourlyCommitmentToPurchase);
return this;
}
/**
*
* The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated
* as estimatedSavingsAmount
/ CurrentOnDemandSpend
*100.
*
*
* @param estimatedSavingsPercentage
* The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is
* calculated as estimatedSavingsAmount
/ CurrentOnDemandSpend
100.
*/
public void setEstimatedSavingsPercentage(String estimatedSavingsPercentage) {
this.estimatedSavingsPercentage = estimatedSavingsPercentage;
}
/**
*
* The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated
* as estimatedSavingsAmount
/ CurrentOnDemandSpend
*100.
*
*
* @return The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is
* calculated as estimatedSavingsAmount
/ CurrentOnDemandSpend
100.
*/
public String getEstimatedSavingsPercentage() {
return this.estimatedSavingsPercentage;
}
/**
*
* The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is calculated
* as estimatedSavingsAmount
/ CurrentOnDemandSpend
*100.
*
*
* @param estimatedSavingsPercentage
* The estimated savings relative to the total cost of On-Demand usage, over the lookback period. This is
* calculated as estimatedSavingsAmount
/ CurrentOnDemandSpend
100.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withEstimatedSavingsPercentage(String estimatedSavingsPercentage) {
setEstimatedSavingsPercentage(estimatedSavingsPercentage);
return this;
}
/**
*
* The estimated monthly savings amount that's based on the recommended Savings Plans purchase.
*
*
* @param estimatedMonthlySavingsAmount
* The estimated monthly savings amount that's based on the recommended Savings Plans purchase.
*/
public void setEstimatedMonthlySavingsAmount(String estimatedMonthlySavingsAmount) {
this.estimatedMonthlySavingsAmount = estimatedMonthlySavingsAmount;
}
/**
*
* The estimated monthly savings amount that's based on the recommended Savings Plans purchase.
*
*
* @return The estimated monthly savings amount that's based on the recommended Savings Plans purchase.
*/
public String getEstimatedMonthlySavingsAmount() {
return this.estimatedMonthlySavingsAmount;
}
/**
*
* The estimated monthly savings amount that's based on the recommended Savings Plans purchase.
*
*
* @param estimatedMonthlySavingsAmount
* The estimated monthly savings amount that's based on the recommended Savings Plans purchase.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withEstimatedMonthlySavingsAmount(String estimatedMonthlySavingsAmount) {
setEstimatedMonthlySavingsAmount(estimatedMonthlySavingsAmount);
return this;
}
/**
*
* The estimated On-Demand costs you expect with no additional commitment. It's based on your usage of the selected
* time period and the Savings Plans you own.
*
*
* @param estimatedOnDemandCostWithCurrentCommitment
* The estimated On-Demand costs you expect with no additional commitment. It's based on your usage of the
* selected time period and the Savings Plans you own.
*/
public void setEstimatedOnDemandCostWithCurrentCommitment(String estimatedOnDemandCostWithCurrentCommitment) {
this.estimatedOnDemandCostWithCurrentCommitment = estimatedOnDemandCostWithCurrentCommitment;
}
/**
*
* The estimated On-Demand costs you expect with no additional commitment. It's based on your usage of the selected
* time period and the Savings Plans you own.
*
*
* @return The estimated On-Demand costs you expect with no additional commitment. It's based on your usage of the
* selected time period and the Savings Plans you own.
*/
public String getEstimatedOnDemandCostWithCurrentCommitment() {
return this.estimatedOnDemandCostWithCurrentCommitment;
}
/**
*
* The estimated On-Demand costs you expect with no additional commitment. It's based on your usage of the selected
* time period and the Savings Plans you own.
*
*
* @param estimatedOnDemandCostWithCurrentCommitment
* The estimated On-Demand costs you expect with no additional commitment. It's based on your usage of the
* selected time period and the Savings Plans you own.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SavingsPlansPurchaseRecommendationSummary withEstimatedOnDemandCostWithCurrentCommitment(String estimatedOnDemandCostWithCurrentCommitment) {
setEstimatedOnDemandCostWithCurrentCommitment(estimatedOnDemandCostWithCurrentCommitment);
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 (getEstimatedROI() != null)
sb.append("EstimatedROI: ").append(getEstimatedROI()).append(",");
if (getCurrencyCode() != null)
sb.append("CurrencyCode: ").append(getCurrencyCode()).append(",");
if (getEstimatedTotalCost() != null)
sb.append("EstimatedTotalCost: ").append(getEstimatedTotalCost()).append(",");
if (getCurrentOnDemandSpend() != null)
sb.append("CurrentOnDemandSpend: ").append(getCurrentOnDemandSpend()).append(",");
if (getEstimatedSavingsAmount() != null)
sb.append("EstimatedSavingsAmount: ").append(getEstimatedSavingsAmount()).append(",");
if (getTotalRecommendationCount() != null)
sb.append("TotalRecommendationCount: ").append(getTotalRecommendationCount()).append(",");
if (getDailyCommitmentToPurchase() != null)
sb.append("DailyCommitmentToPurchase: ").append(getDailyCommitmentToPurchase()).append(",");
if (getHourlyCommitmentToPurchase() != null)
sb.append("HourlyCommitmentToPurchase: ").append(getHourlyCommitmentToPurchase()).append(",");
if (getEstimatedSavingsPercentage() != null)
sb.append("EstimatedSavingsPercentage: ").append(getEstimatedSavingsPercentage()).append(",");
if (getEstimatedMonthlySavingsAmount() != null)
sb.append("EstimatedMonthlySavingsAmount: ").append(getEstimatedMonthlySavingsAmount()).append(",");
if (getEstimatedOnDemandCostWithCurrentCommitment() != null)
sb.append("EstimatedOnDemandCostWithCurrentCommitment: ").append(getEstimatedOnDemandCostWithCurrentCommitment());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SavingsPlansPurchaseRecommendationSummary == false)
return false;
SavingsPlansPurchaseRecommendationSummary other = (SavingsPlansPurchaseRecommendationSummary) obj;
if (other.getEstimatedROI() == null ^ this.getEstimatedROI() == null)
return false;
if (other.getEstimatedROI() != null && other.getEstimatedROI().equals(this.getEstimatedROI()) == false)
return false;
if (other.getCurrencyCode() == null ^ this.getCurrencyCode() == null)
return false;
if (other.getCurrencyCode() != null && other.getCurrencyCode().equals(this.getCurrencyCode()) == false)
return false;
if (other.getEstimatedTotalCost() == null ^ this.getEstimatedTotalCost() == null)
return false;
if (other.getEstimatedTotalCost() != null && other.getEstimatedTotalCost().equals(this.getEstimatedTotalCost()) == false)
return false;
if (other.getCurrentOnDemandSpend() == null ^ this.getCurrentOnDemandSpend() == null)
return false;
if (other.getCurrentOnDemandSpend() != null && other.getCurrentOnDemandSpend().equals(this.getCurrentOnDemandSpend()) == false)
return false;
if (other.getEstimatedSavingsAmount() == null ^ this.getEstimatedSavingsAmount() == null)
return false;
if (other.getEstimatedSavingsAmount() != null && other.getEstimatedSavingsAmount().equals(this.getEstimatedSavingsAmount()) == false)
return false;
if (other.getTotalRecommendationCount() == null ^ this.getTotalRecommendationCount() == null)
return false;
if (other.getTotalRecommendationCount() != null && other.getTotalRecommendationCount().equals(this.getTotalRecommendationCount()) == false)
return false;
if (other.getDailyCommitmentToPurchase() == null ^ this.getDailyCommitmentToPurchase() == null)
return false;
if (other.getDailyCommitmentToPurchase() != null && other.getDailyCommitmentToPurchase().equals(this.getDailyCommitmentToPurchase()) == false)
return false;
if (other.getHourlyCommitmentToPurchase() == null ^ this.getHourlyCommitmentToPurchase() == null)
return false;
if (other.getHourlyCommitmentToPurchase() != null && other.getHourlyCommitmentToPurchase().equals(this.getHourlyCommitmentToPurchase()) == false)
return false;
if (other.getEstimatedSavingsPercentage() == null ^ this.getEstimatedSavingsPercentage() == null)
return false;
if (other.getEstimatedSavingsPercentage() != null && other.getEstimatedSavingsPercentage().equals(this.getEstimatedSavingsPercentage()) == false)
return false;
if (other.getEstimatedMonthlySavingsAmount() == null ^ this.getEstimatedMonthlySavingsAmount() == null)
return false;
if (other.getEstimatedMonthlySavingsAmount() != null
&& other.getEstimatedMonthlySavingsAmount().equals(this.getEstimatedMonthlySavingsAmount()) == false)
return false;
if (other.getEstimatedOnDemandCostWithCurrentCommitment() == null ^ this.getEstimatedOnDemandCostWithCurrentCommitment() == null)
return false;
if (other.getEstimatedOnDemandCostWithCurrentCommitment() != null
&& other.getEstimatedOnDemandCostWithCurrentCommitment().equals(this.getEstimatedOnDemandCostWithCurrentCommitment()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEstimatedROI() == null) ? 0 : getEstimatedROI().hashCode());
hashCode = prime * hashCode + ((getCurrencyCode() == null) ? 0 : getCurrencyCode().hashCode());
hashCode = prime * hashCode + ((getEstimatedTotalCost() == null) ? 0 : getEstimatedTotalCost().hashCode());
hashCode = prime * hashCode + ((getCurrentOnDemandSpend() == null) ? 0 : getCurrentOnDemandSpend().hashCode());
hashCode = prime * hashCode + ((getEstimatedSavingsAmount() == null) ? 0 : getEstimatedSavingsAmount().hashCode());
hashCode = prime * hashCode + ((getTotalRecommendationCount() == null) ? 0 : getTotalRecommendationCount().hashCode());
hashCode = prime * hashCode + ((getDailyCommitmentToPurchase() == null) ? 0 : getDailyCommitmentToPurchase().hashCode());
hashCode = prime * hashCode + ((getHourlyCommitmentToPurchase() == null) ? 0 : getHourlyCommitmentToPurchase().hashCode());
hashCode = prime * hashCode + ((getEstimatedSavingsPercentage() == null) ? 0 : getEstimatedSavingsPercentage().hashCode());
hashCode = prime * hashCode + ((getEstimatedMonthlySavingsAmount() == null) ? 0 : getEstimatedMonthlySavingsAmount().hashCode());
hashCode = prime * hashCode
+ ((getEstimatedOnDemandCostWithCurrentCommitment() == null) ? 0 : getEstimatedOnDemandCostWithCurrentCommitment().hashCode());
return hashCode;
}
@Override
public SavingsPlansPurchaseRecommendationSummary clone() {
try {
return (SavingsPlansPurchaseRecommendationSummary) 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.SavingsPlansPurchaseRecommendationSummaryMarshaller.getInstance()
.marshall(this, protocolMarshaller);
}
}