/* * 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. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class SavingsPlan implements Serializable, Cloneable, StructuredPojo { /** ** The ID of the offering. *
*/ private String offeringId; /** ** The ID of the Savings Plan. *
*/ private String savingsPlanId; /** ** The Amazon Resource Name (ARN) of the Savings Plan. *
*/ private String savingsPlanArn; /** ** The description. *
*/ private String description; /** ** The start time. *
*/ private String start; /** ** The end time. *
*/ private String end; /** ** The state. *
*/ private String state; /** ** The AWS Region. *
*/ private String region; /** ** The EC2 instance family. *
*/ private String ec2InstanceFamily; /** ** The plan type. *
*/ private String savingsPlanType; /** ** The payment option. *
*/ private String paymentOption; /** ** The product types. *
*/ private java.util.List* The currency. *
*/ private String currency; /** ** The hourly commitment, in USD. *
*/ private String commitment; /** ** The up-front payment amount. *
*/ private String upfrontPaymentAmount; /** ** The recurring payment amount. *
*/ private String recurringPaymentAmount; /** ** The duration of the term, in seconds. *
*/ private Long termDurationInSeconds; /** ** One or more tags. *
*/ private java.util.Map* The ID of the offering. *
* * @param offeringId * The ID of the offering. */ public void setOfferingId(String offeringId) { this.offeringId = offeringId; } /** ** The ID of the offering. *
* * @return The ID of the offering. */ public String getOfferingId() { return this.offeringId; } /** ** The ID of the offering. *
* * @param offeringId * The ID of the offering. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withOfferingId(String offeringId) { setOfferingId(offeringId); return this; } /** ** The ID of the Savings Plan. *
* * @param savingsPlanId * The ID of the Savings Plan. */ public void setSavingsPlanId(String savingsPlanId) { this.savingsPlanId = savingsPlanId; } /** ** The ID of the Savings Plan. *
* * @return The ID of the Savings Plan. */ public String getSavingsPlanId() { return this.savingsPlanId; } /** ** The ID of the Savings Plan. *
* * @param savingsPlanId * The ID of the Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withSavingsPlanId(String savingsPlanId) { setSavingsPlanId(savingsPlanId); return this; } /** ** The Amazon Resource Name (ARN) of the Savings Plan. *
* * @param savingsPlanArn * The Amazon Resource Name (ARN) of the Savings Plan. */ public void setSavingsPlanArn(String savingsPlanArn) { this.savingsPlanArn = savingsPlanArn; } /** ** The Amazon Resource Name (ARN) of the Savings Plan. *
* * @return The Amazon Resource Name (ARN) of the Savings Plan. */ public String getSavingsPlanArn() { return this.savingsPlanArn; } /** ** The Amazon Resource Name (ARN) of the Savings Plan. *
* * @param savingsPlanArn * The Amazon Resource Name (ARN) of the Savings Plan. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withSavingsPlanArn(String savingsPlanArn) { setSavingsPlanArn(savingsPlanArn); return this; } /** ** The description. *
* * @param description * The description. */ public void setDescription(String description) { this.description = description; } /** ** The description. *
* * @return The description. */ public String getDescription() { return this.description; } /** ** The description. *
* * @param description * The description. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withDescription(String description) { setDescription(description); return this; } /** ** The start time. *
* * @param start * The start time. */ public void setStart(String start) { this.start = start; } /** ** The start time. *
* * @return The start time. */ public String getStart() { return this.start; } /** ** The start time. *
* * @param start * The start time. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withStart(String start) { setStart(start); return this; } /** ** The end time. *
* * @param end * The end time. */ public void setEnd(String end) { this.end = end; } /** ** The end time. *
* * @return The end time. */ public String getEnd() { return this.end; } /** ** The end time. *
* * @param end * The end time. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withEnd(String end) { setEnd(end); return this; } /** ** The state. *
* * @param state * The state. * @see SavingsPlanState */ public void setState(String state) { this.state = state; } /** ** The state. *
* * @return The state. * @see SavingsPlanState */ public String getState() { return this.state; } /** ** The state. *
* * @param state * The state. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanState */ public SavingsPlan withState(String state) { setState(state); return this; } /** ** The state. *
* * @param state * The state. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanState */ public SavingsPlan withState(SavingsPlanState state) { this.state = state.toString(); return this; } /** ** The AWS Region. *
* * @param region * The AWS Region. */ public void setRegion(String region) { this.region = region; } /** ** The AWS Region. *
* * @return The AWS Region. */ public String getRegion() { return this.region; } /** ** The AWS Region. *
* * @param region * The AWS Region. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withRegion(String region) { setRegion(region); return this; } /** ** The EC2 instance family. *
* * @param ec2InstanceFamily * The EC2 instance family. */ public void setEc2InstanceFamily(String ec2InstanceFamily) { this.ec2InstanceFamily = ec2InstanceFamily; } /** ** The EC2 instance family. *
* * @return The EC2 instance family. */ public String getEc2InstanceFamily() { return this.ec2InstanceFamily; } /** ** The EC2 instance family. *
* * @param ec2InstanceFamily * The EC2 instance family. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withEc2InstanceFamily(String ec2InstanceFamily) { setEc2InstanceFamily(ec2InstanceFamily); return this; } /** ** The plan type. *
* * @param savingsPlanType * The plan type. * @see SavingsPlanType */ public void setSavingsPlanType(String savingsPlanType) { this.savingsPlanType = savingsPlanType; } /** ** The plan type. *
* * @return The plan type. * @see SavingsPlanType */ public String getSavingsPlanType() { return this.savingsPlanType; } /** ** The plan type. *
* * @param savingsPlanType * The plan type. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanType */ public SavingsPlan withSavingsPlanType(String savingsPlanType) { setSavingsPlanType(savingsPlanType); return this; } /** ** The plan type. *
* * @param savingsPlanType * The plan type. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanType */ public SavingsPlan withSavingsPlanType(SavingsPlanType savingsPlanType) { this.savingsPlanType = savingsPlanType.toString(); return this; } /** ** The payment option. *
* * @param paymentOption * The payment option. * @see SavingsPlanPaymentOption */ public void setPaymentOption(String paymentOption) { this.paymentOption = paymentOption; } /** ** The payment option. *
* * @return The payment option. * @see SavingsPlanPaymentOption */ public String getPaymentOption() { return this.paymentOption; } /** ** The payment option. *
* * @param paymentOption * The payment option. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanPaymentOption */ public SavingsPlan withPaymentOption(String paymentOption) { setPaymentOption(paymentOption); return this; } /** ** The payment option. *
* * @param paymentOption * The payment option. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanPaymentOption */ public SavingsPlan withPaymentOption(SavingsPlanPaymentOption paymentOption) { this.paymentOption = paymentOption.toString(); return this; } /** ** The product types. *
* * @return The product types. * @see SavingsPlanProductType */ public java.util.List* The product types. *
* * @param productTypes * The product types. * @see SavingsPlanProductType */ public void setProductTypes(java.util.Collection* The product types. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setProductTypes(java.util.Collection)} or {@link #withProductTypes(java.util.Collection)} if you want to * override the existing values. *
* * @param productTypes * The product types. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanProductType */ public SavingsPlan withProductTypes(String... productTypes) { if (this.productTypes == null) { setProductTypes(new java.util.ArrayList* The product types. *
* * @param productTypes * The product types. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanProductType */ public SavingsPlan withProductTypes(java.util.Collection* The product types. *
* * @param productTypes * The product types. * @return Returns a reference to this object so that method calls can be chained together. * @see SavingsPlanProductType */ public SavingsPlan withProductTypes(SavingsPlanProductType... productTypes) { java.util.ArrayList* 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 SavingsPlan 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 SavingsPlan withCurrency(CurrencyCode currency) { this.currency = currency.toString(); return this; } /** ** The hourly commitment, in USD. *
* * @param commitment * The hourly commitment, in USD. */ public void setCommitment(String commitment) { this.commitment = commitment; } /** ** The hourly commitment, in USD. *
* * @return The hourly commitment, in USD. */ public String getCommitment() { return this.commitment; } /** ** The hourly commitment, in USD. *
* * @param commitment * The hourly commitment, in USD. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withCommitment(String commitment) { setCommitment(commitment); return this; } /** ** The up-front payment amount. *
* * @param upfrontPaymentAmount * The up-front payment amount. */ public void setUpfrontPaymentAmount(String upfrontPaymentAmount) { this.upfrontPaymentAmount = upfrontPaymentAmount; } /** ** The up-front payment amount. *
* * @return The up-front payment amount. */ public String getUpfrontPaymentAmount() { return this.upfrontPaymentAmount; } /** ** The up-front payment amount. *
* * @param upfrontPaymentAmount * The up-front payment amount. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withUpfrontPaymentAmount(String upfrontPaymentAmount) { setUpfrontPaymentAmount(upfrontPaymentAmount); return this; } /** ** The recurring payment amount. *
* * @param recurringPaymentAmount * The recurring payment amount. */ public void setRecurringPaymentAmount(String recurringPaymentAmount) { this.recurringPaymentAmount = recurringPaymentAmount; } /** ** The recurring payment amount. *
* * @return The recurring payment amount. */ public String getRecurringPaymentAmount() { return this.recurringPaymentAmount; } /** ** The recurring payment amount. *
* * @param recurringPaymentAmount * The recurring payment amount. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withRecurringPaymentAmount(String recurringPaymentAmount) { setRecurringPaymentAmount(recurringPaymentAmount); return this; } /** ** The duration of the term, in seconds. *
* * @param termDurationInSeconds * The duration of the term, in seconds. */ public void setTermDurationInSeconds(Long termDurationInSeconds) { this.termDurationInSeconds = termDurationInSeconds; } /** ** The duration of the term, in seconds. *
* * @return The duration of the term, in seconds. */ public Long getTermDurationInSeconds() { return this.termDurationInSeconds; } /** ** The duration of the term, in seconds. *
* * @param termDurationInSeconds * The duration of the term, in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withTermDurationInSeconds(Long termDurationInSeconds) { setTermDurationInSeconds(termDurationInSeconds); return this; } /** ** One or more tags. *
* * @return One or more tags. */ public java.util.Map* One or more tags. *
* * @param tags * One or more tags. */ public void setTags(java.util.Map* One or more tags. *
* * @param tags * One or more tags. * @return Returns a reference to this object so that method calls can be chained together. */ public SavingsPlan withTags(java.util.Map