All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.costoptimizationhub.model.SavingsPlansPricing Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 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.costoptimizationhub.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Pricing information about a Savings Plan. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SavingsPlansPricing implements Serializable, Cloneable, StructuredPojo { /** *

* The cost of paying for the recommended Savings Plan monthly. *

*/ private Double monthlySavingsPlansEligibleCost; /** *

* Estimated monthly commitment for the Savings Plan. *

*/ private Double estimatedMonthlyCommitment; /** *

* Estimated savings as a percentage of your overall costs after buying the Savings Plan. *

*/ private Double savingsPercentage; /** *

* Estimated On-Demand cost you will pay after buying the Savings Plan. *

*/ private Double estimatedOnDemandCost; /** *

* The cost of paying for the recommended Savings Plan monthly. *

* * @param monthlySavingsPlansEligibleCost * The cost of paying for the recommended Savings Plan monthly. */ public void setMonthlySavingsPlansEligibleCost(Double monthlySavingsPlansEligibleCost) { this.monthlySavingsPlansEligibleCost = monthlySavingsPlansEligibleCost; } /** *

* The cost of paying for the recommended Savings Plan monthly. *

* * @return The cost of paying for the recommended Savings Plan monthly. */ public Double getMonthlySavingsPlansEligibleCost() { return this.monthlySavingsPlansEligibleCost; } /** *

* The cost of paying for the recommended Savings Plan monthly. *

* * @param monthlySavingsPlansEligibleCost * The cost of paying for the recommended Savings Plan monthly. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansPricing withMonthlySavingsPlansEligibleCost(Double monthlySavingsPlansEligibleCost) { setMonthlySavingsPlansEligibleCost(monthlySavingsPlansEligibleCost); return this; } /** *

* Estimated monthly commitment for the Savings Plan. *

* * @param estimatedMonthlyCommitment * Estimated monthly commitment for the Savings Plan. */ public void setEstimatedMonthlyCommitment(Double estimatedMonthlyCommitment) { this.estimatedMonthlyCommitment = estimatedMonthlyCommitment; } /** *

* Estimated monthly commitment for the Savings Plan. *

* * @return Estimated monthly commitment for the Savings Plan. */ public Double getEstimatedMonthlyCommitment() { return this.estimatedMonthlyCommitment; } /** *

* Estimated monthly commitment for the Savings Plan. *

* * @param estimatedMonthlyCommitment * Estimated monthly commitment for the Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansPricing withEstimatedMonthlyCommitment(Double estimatedMonthlyCommitment) { setEstimatedMonthlyCommitment(estimatedMonthlyCommitment); return this; } /** *

* Estimated savings as a percentage of your overall costs after buying the Savings Plan. *

* * @param savingsPercentage * Estimated savings as a percentage of your overall costs after buying the Savings Plan. */ public void setSavingsPercentage(Double savingsPercentage) { this.savingsPercentage = savingsPercentage; } /** *

* Estimated savings as a percentage of your overall costs after buying the Savings Plan. *

* * @return Estimated savings as a percentage of your overall costs after buying the Savings Plan. */ public Double getSavingsPercentage() { return this.savingsPercentage; } /** *

* Estimated savings as a percentage of your overall costs after buying the Savings Plan. *

* * @param savingsPercentage * Estimated savings as a percentage of your overall costs after buying the Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansPricing withSavingsPercentage(Double savingsPercentage) { setSavingsPercentage(savingsPercentage); return this; } /** *

* Estimated On-Demand cost you will pay after buying the Savings Plan. *

* * @param estimatedOnDemandCost * Estimated On-Demand cost you will pay after buying the Savings Plan. */ public void setEstimatedOnDemandCost(Double estimatedOnDemandCost) { this.estimatedOnDemandCost = estimatedOnDemandCost; } /** *

* Estimated On-Demand cost you will pay after buying the Savings Plan. *

* * @return Estimated On-Demand cost you will pay after buying the Savings Plan. */ public Double getEstimatedOnDemandCost() { return this.estimatedOnDemandCost; } /** *

* Estimated On-Demand cost you will pay after buying the Savings Plan. *

* * @param estimatedOnDemandCost * Estimated On-Demand cost you will pay after buying the Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansPricing withEstimatedOnDemandCost(Double estimatedOnDemandCost) { setEstimatedOnDemandCost(estimatedOnDemandCost); 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 (getMonthlySavingsPlansEligibleCost() != null) sb.append("MonthlySavingsPlansEligibleCost: ").append(getMonthlySavingsPlansEligibleCost()).append(","); if (getEstimatedMonthlyCommitment() != null) sb.append("EstimatedMonthlyCommitment: ").append(getEstimatedMonthlyCommitment()).append(","); if (getSavingsPercentage() != null) sb.append("SavingsPercentage: ").append(getSavingsPercentage()).append(","); if (getEstimatedOnDemandCost() != null) sb.append("EstimatedOnDemandCost: ").append(getEstimatedOnDemandCost()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SavingsPlansPricing == false) return false; SavingsPlansPricing other = (SavingsPlansPricing) obj; if (other.getMonthlySavingsPlansEligibleCost() == null ^ this.getMonthlySavingsPlansEligibleCost() == null) return false; if (other.getMonthlySavingsPlansEligibleCost() != null && other.getMonthlySavingsPlansEligibleCost().equals(this.getMonthlySavingsPlansEligibleCost()) == false) return false; if (other.getEstimatedMonthlyCommitment() == null ^ this.getEstimatedMonthlyCommitment() == null) return false; if (other.getEstimatedMonthlyCommitment() != null && other.getEstimatedMonthlyCommitment().equals(this.getEstimatedMonthlyCommitment()) == false) return false; if (other.getSavingsPercentage() == null ^ this.getSavingsPercentage() == null) return false; if (other.getSavingsPercentage() != null && other.getSavingsPercentage().equals(this.getSavingsPercentage()) == false) return false; if (other.getEstimatedOnDemandCost() == null ^ this.getEstimatedOnDemandCost() == null) return false; if (other.getEstimatedOnDemandCost() != null && other.getEstimatedOnDemandCost().equals(this.getEstimatedOnDemandCost()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMonthlySavingsPlansEligibleCost() == null) ? 0 : getMonthlySavingsPlansEligibleCost().hashCode()); hashCode = prime * hashCode + ((getEstimatedMonthlyCommitment() == null) ? 0 : getEstimatedMonthlyCommitment().hashCode()); hashCode = prime * hashCode + ((getSavingsPercentage() == null) ? 0 : getSavingsPercentage().hashCode()); hashCode = prime * hashCode + ((getEstimatedOnDemandCost() == null) ? 0 : getEstimatedOnDemandCost().hashCode()); return hashCode; } @Override public SavingsPlansPricing clone() { try { return (SavingsPlansPricing) 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.costoptimizationhub.model.transform.SavingsPlansPricingMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy