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

com.amazonaws.services.costexplorer.model.SavingsPlansCoverageData 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;

/**
 * 

* Specific coverage percentage, On-Demand costs, and spend covered by Savings Plans, and total Savings Plans costs for * an account. *

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

* The amount of your Amazon Web Services usage that's covered by a Savings Plans. *

*/ private String spendCoveredBySavingsPlans; /** *

* The cost of your Amazon Web Services usage at the public On-Demand rate. *

*/ private String onDemandCost; /** *

* The total cost of your Amazon Web Services usage, regardless of your purchase option. *

*/ private String totalCost; /** *

* The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings Plans usage * in an account (or set of accounts). *

*/ private String coveragePercentage; /** *

* The amount of your Amazon Web Services usage that's covered by a Savings Plans. *

* * @param spendCoveredBySavingsPlans * The amount of your Amazon Web Services usage that's covered by a Savings Plans. */ public void setSpendCoveredBySavingsPlans(String spendCoveredBySavingsPlans) { this.spendCoveredBySavingsPlans = spendCoveredBySavingsPlans; } /** *

* The amount of your Amazon Web Services usage that's covered by a Savings Plans. *

* * @return The amount of your Amazon Web Services usage that's covered by a Savings Plans. */ public String getSpendCoveredBySavingsPlans() { return this.spendCoveredBySavingsPlans; } /** *

* The amount of your Amazon Web Services usage that's covered by a Savings Plans. *

* * @param spendCoveredBySavingsPlans * The amount of your Amazon Web Services usage that's covered by a Savings Plans. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansCoverageData withSpendCoveredBySavingsPlans(String spendCoveredBySavingsPlans) { setSpendCoveredBySavingsPlans(spendCoveredBySavingsPlans); return this; } /** *

* The cost of your Amazon Web Services usage at the public On-Demand rate. *

* * @param onDemandCost * The cost of your Amazon Web Services usage at the public On-Demand rate. */ public void setOnDemandCost(String onDemandCost) { this.onDemandCost = onDemandCost; } /** *

* The cost of your Amazon Web Services usage at the public On-Demand rate. *

* * @return The cost of your Amazon Web Services usage at the public On-Demand rate. */ public String getOnDemandCost() { return this.onDemandCost; } /** *

* The cost of your Amazon Web Services usage at the public On-Demand rate. *

* * @param onDemandCost * The cost of your Amazon Web Services usage at the public On-Demand rate. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansCoverageData withOnDemandCost(String onDemandCost) { setOnDemandCost(onDemandCost); return this; } /** *

* The total cost of your Amazon Web Services usage, regardless of your purchase option. *

* * @param totalCost * The total cost of your Amazon Web Services usage, regardless of your purchase option. */ public void setTotalCost(String totalCost) { this.totalCost = totalCost; } /** *

* The total cost of your Amazon Web Services usage, regardless of your purchase option. *

* * @return The total cost of your Amazon Web Services usage, regardless of your purchase option. */ public String getTotalCost() { return this.totalCost; } /** *

* The total cost of your Amazon Web Services usage, regardless of your purchase option. *

* * @param totalCost * The total cost of your Amazon Web Services usage, regardless of your purchase option. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansCoverageData withTotalCost(String totalCost) { setTotalCost(totalCost); return this; } /** *

* The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings Plans usage * in an account (or set of accounts). *

* * @param coveragePercentage * The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings Plans * usage in an account (or set of accounts). */ public void setCoveragePercentage(String coveragePercentage) { this.coveragePercentage = coveragePercentage; } /** *

* The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings Plans usage * in an account (or set of accounts). *

* * @return The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings * Plans usage in an account (or set of accounts). */ public String getCoveragePercentage() { return this.coveragePercentage; } /** *

* The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings Plans usage * in an account (or set of accounts). *

* * @param coveragePercentage * The percentage of your existing Savings Plans covered usage, divided by all of your eligible Savings Plans * usage in an account (or set of accounts). * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlansCoverageData withCoveragePercentage(String coveragePercentage) { setCoveragePercentage(coveragePercentage); 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 (getSpendCoveredBySavingsPlans() != null) sb.append("SpendCoveredBySavingsPlans: ").append(getSpendCoveredBySavingsPlans()).append(","); if (getOnDemandCost() != null) sb.append("OnDemandCost: ").append(getOnDemandCost()).append(","); if (getTotalCost() != null) sb.append("TotalCost: ").append(getTotalCost()).append(","); if (getCoveragePercentage() != null) sb.append("CoveragePercentage: ").append(getCoveragePercentage()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SavingsPlansCoverageData == false) return false; SavingsPlansCoverageData other = (SavingsPlansCoverageData) obj; if (other.getSpendCoveredBySavingsPlans() == null ^ this.getSpendCoveredBySavingsPlans() == null) return false; if (other.getSpendCoveredBySavingsPlans() != null && other.getSpendCoveredBySavingsPlans().equals(this.getSpendCoveredBySavingsPlans()) == false) return false; if (other.getOnDemandCost() == null ^ this.getOnDemandCost() == null) return false; if (other.getOnDemandCost() != null && other.getOnDemandCost().equals(this.getOnDemandCost()) == false) return false; if (other.getTotalCost() == null ^ this.getTotalCost() == null) return false; if (other.getTotalCost() != null && other.getTotalCost().equals(this.getTotalCost()) == false) return false; if (other.getCoveragePercentage() == null ^ this.getCoveragePercentage() == null) return false; if (other.getCoveragePercentage() != null && other.getCoveragePercentage().equals(this.getCoveragePercentage()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSpendCoveredBySavingsPlans() == null) ? 0 : getSpendCoveredBySavingsPlans().hashCode()); hashCode = prime * hashCode + ((getOnDemandCost() == null) ? 0 : getOnDemandCost().hashCode()); hashCode = prime * hashCode + ((getTotalCost() == null) ? 0 : getTotalCost().hashCode()); hashCode = prime * hashCode + ((getCoveragePercentage() == null) ? 0 : getCoveragePercentage().hashCode()); return hashCode; } @Override public SavingsPlansCoverageData clone() { try { return (SavingsPlansCoverageData) 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.SavingsPlansCoverageDataMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy