/* * Copyright 2018-2023 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.savingsplans.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about a Savings Plan rate. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SavingsPlanRate implements Serializable, Cloneable, StructuredPojo { /** ** The rate. *
*/ private String rate; /** ** The currency. *
*/ private String currency; /** ** The unit. *
*/ private String unit; /** ** The product type. *
*/ private String productType; /** ** The service. *
*/ private String serviceCode; /** ** The usage details of the line item in the billing report. *
*/ private String usageType; /** ** The specific AWS operation for the line item in the billing report. *
*/ private String operation; /** ** The properties. *
*/ private java.util.List* The rate. *
* * @param rate * The rate. */ public void setRate(String rate) { this.rate = rate; } /** ** The rate. *
* * @return The rate. */ public String getRate() { return this.rate; } /** ** The rate. *
* * @param rate * The rate. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanRate withRate(String rate) { setRate(rate); return this; } /** ** The currency. *
* * @param currency * The currency. * @see CurrencyCode */ public void setCurrency(String currency) { this.currency = currency; } /** ** The currency. *
* * @return The currency. * @see CurrencyCode */ public String getCurrency() { return this.currency; } /** ** The currency. *
* * @param currency * The currency. * @return Returns a reference to this object so that method calls can be chained together. * @see CurrencyCode */ public SavingsPlanRate withCurrency(String currency) { setCurrency(currency); return this; } /** ** The currency. *
* * @param currency * The currency. * @return Returns a reference to this object so that method calls can be chained together. * @see CurrencyCode */ public SavingsPlanRate withCurrency(CurrencyCode currency) { this.currency = currency.toString(); return this; } /** ** The unit. *
* * @param unit * The unit. * @see SavingsPlanRateUnit */ public void setUnit(String unit) { this.unit = unit; } /** ** The unit. *
* * @return The unit. * @see SavingsPlanRateUnit */ public String getUnit() { return this.unit; } /** ** The unit. *
* * @param unit * The unit. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanRateUnit */ public SavingsPlanRate withUnit(String unit) { setUnit(unit); return this; } /** ** The unit. *
* * @param unit * The unit. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanRateUnit */ public SavingsPlanRate withUnit(SavingsPlanRateUnit unit) { this.unit = unit.toString(); return this; } /** ** The product type. *
* * @param productType * The product type. * @see SavingsPlanProductType */ public void setProductType(String productType) { this.productType = productType; } /** ** The product type. *
* * @return The product type. * @see SavingsPlanProductType */ public String getProductType() { return this.productType; } /** ** The product type. *
* * @param productType * The product type. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanProductType */ public SavingsPlanRate withProductType(String productType) { setProductType(productType); return this; } /** ** The product type. *
* * @param productType * The product type. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanProductType */ public SavingsPlanRate withProductType(SavingsPlanProductType productType) { this.productType = productType.toString(); return this; } /** ** The service. *
* * @param serviceCode * The service. * @see SavingsPlanRateServiceCode */ public void setServiceCode(String serviceCode) { this.serviceCode = serviceCode; } /** ** The service. *
* * @return The service. * @see SavingsPlanRateServiceCode */ public String getServiceCode() { return this.serviceCode; } /** ** The service. *
* * @param serviceCode * The service. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanRateServiceCode */ public SavingsPlanRate withServiceCode(String serviceCode) { setServiceCode(serviceCode); return this; } /** ** The service. *
* * @param serviceCode * The service. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanRateServiceCode */ public SavingsPlanRate withServiceCode(SavingsPlanRateServiceCode serviceCode) { this.serviceCode = serviceCode.toString(); return this; } /** ** The usage details of the line item in the billing report. *
* * @param usageType * The usage details of the line item in the billing report. */ public void setUsageType(String usageType) { this.usageType = usageType; } /** ** The usage details of the line item in the billing report. *
* * @return The usage details of the line item in the billing report. */ public String getUsageType() { return this.usageType; } /** ** The usage details of the line item in the billing report. *
* * @param usageType * The usage details of the line item in the billing report. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanRate withUsageType(String usageType) { setUsageType(usageType); return this; } /** ** The specific AWS operation for the line item in the billing report. *
* * @param operation * The specific AWS operation for the line item in the billing report. */ public void setOperation(String operation) { this.operation = operation; } /** ** The specific AWS operation for the line item in the billing report. *
* * @return The specific AWS operation for the line item in the billing report. */ public String getOperation() { return this.operation; } /** ** The specific AWS operation for the line item in the billing report. *
* * @param operation * The specific AWS operation for the line item in the billing report. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanRate withOperation(String operation) { setOperation(operation); return this; } /** ** The properties. *
* * @return The properties. */ public java.util.List* The properties. *
* * @param properties * The properties. */ public void setProperties(java.util.Collection* The properties. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setProperties(java.util.Collection)} or {@link #withProperties(java.util.Collection)} if you want to * override the existing values. *
* * @param properties * The properties. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanRate withProperties(SavingsPlanRateProperty... properties) { if (this.properties == null) { setProperties(new java.util.ArrayList* The properties. *
* * @param properties * The properties. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlanRate withProperties(java.util.Collection