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

com.amazonaws.services.costexplorer.model.SavingsPlansUtilizationAggregates Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Cost Explorer module holds the client classes that are used for communicating with AWS Cost Explorer Service

The newest version!
/*
 * 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;

/**
 * 

* The aggregated utilization metrics for your Savings Plans usage. *

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

* A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans * eligible. *

*/ private SavingsPlansUtilization utilization; /** *

* The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings Plans and * also the onDemandCostEquivalent of the Savings Plans when considering the utilization rate. *

*/ private SavingsPlansSavings savings; /** *

* The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings * Plans fees. *

*/ private SavingsPlansAmortizedCommitment amortizedCommitment; /** *

* A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans * eligible. *

* * @param utilization * A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans * eligible. */ public void setUtilization(SavingsPlansUtilization utilization) { this.utilization = utilization; } /** *

* A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans * eligible. *

* * @return A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings * Plans eligible. */ public SavingsPlansUtilization getUtilization() { return this.utilization; } /** *

* A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans * eligible. *

* * @param utilization * A ratio of your effectiveness of using existing Savings Plans to apply to workloads that are Savings Plans * eligible. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansUtilizationAggregates withUtilization(SavingsPlansUtilization utilization) { setUtilization(utilization); return this; } /** *

* The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings Plans and * also the onDemandCostEquivalent of the Savings Plans when considering the utilization rate. *

* * @param savings * The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings * Plans and also the onDemandCostEquivalent of the Savings Plans when considering the * utilization rate. */ public void setSavings(SavingsPlansSavings savings) { this.savings = savings; } /** *

* The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings Plans and * also the onDemandCostEquivalent of the Savings Plans when considering the utilization rate. *

* * @return The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings * Plans and also the onDemandCostEquivalent of the Savings Plans when considering the * utilization rate. */ public SavingsPlansSavings getSavings() { return this.savings; } /** *

* The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings Plans and * also the onDemandCostEquivalent of the Savings Plans when considering the utilization rate. *

* * @param savings * The amount that's saved by using existing Savings Plans. Savings returns both net savings from Savings * Plans and also the onDemandCostEquivalent of the Savings Plans when considering the * utilization rate. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansUtilizationAggregates withSavings(SavingsPlansSavings savings) { setSavings(savings); return this; } /** *

* The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings * Plans fees. *

* * @param amortizedCommitment * The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring * Savings Plans fees. */ public void setAmortizedCommitment(SavingsPlansAmortizedCommitment amortizedCommitment) { this.amortizedCommitment = amortizedCommitment; } /** *

* The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings * Plans fees. *

* * @return The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring * Savings Plans fees. */ public SavingsPlansAmortizedCommitment getAmortizedCommitment() { return this.amortizedCommitment; } /** *

* The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring Savings * Plans fees. *

* * @param amortizedCommitment * The total amortized commitment for a Savings Plans. This includes the sum of the upfront and recurring * Savings Plans fees. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansUtilizationAggregates withAmortizedCommitment(SavingsPlansAmortizedCommitment amortizedCommitment) { setAmortizedCommitment(amortizedCommitment); 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 (getUtilization() != null) sb.append("Utilization: ").append(getUtilization()).append(","); if (getSavings() != null) sb.append("Savings: ").append(getSavings()).append(","); if (getAmortizedCommitment() != null) sb.append("AmortizedCommitment: ").append(getAmortizedCommitment()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SavingsPlansUtilizationAggregates == false) return false; SavingsPlansUtilizationAggregates other = (SavingsPlansUtilizationAggregates) obj; if (other.getUtilization() == null ^ this.getUtilization() == null) return false; if (other.getUtilization() != null && other.getUtilization().equals(this.getUtilization()) == false) return false; if (other.getSavings() == null ^ this.getSavings() == null) return false; if (other.getSavings() != null && other.getSavings().equals(this.getSavings()) == false) return false; if (other.getAmortizedCommitment() == null ^ this.getAmortizedCommitment() == null) return false; if (other.getAmortizedCommitment() != null && other.getAmortizedCommitment().equals(this.getAmortizedCommitment()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUtilization() == null) ? 0 : getUtilization().hashCode()); hashCode = prime * hashCode + ((getSavings() == null) ? 0 : getSavings().hashCode()); hashCode = prime * hashCode + ((getAmortizedCommitment() == null) ? 0 : getAmortizedCommitment().hashCode()); return hashCode; } @Override public SavingsPlansUtilizationAggregates clone() { try { return (SavingsPlansUtilizationAggregates) 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.SavingsPlansUtilizationAggregatesMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy