/* * 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.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateSavingsPlanRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The ID of the offering. *
*/ private String savingsPlanOfferingId; /** ** The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than five * digits after the decimal point. *
*/ private String commitment; /** *
* The up-front payment amount. This is a whole number between 50 and 99 percent of the total value of the Savings
* Plan. This parameter is supported only if the payment option is Partial Upfront
.
*
* The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ). *
*/ private java.util.Date purchaseTime; /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
*/ private String clientToken; /** ** One or more tags. *
*/ private java.util.Map* The ID of the offering. *
* * @param savingsPlanOfferingId * The ID of the offering. */ public void setSavingsPlanOfferingId(String savingsPlanOfferingId) { this.savingsPlanOfferingId = savingsPlanOfferingId; } /** ** The ID of the offering. *
* * @return The ID of the offering. */ public String getSavingsPlanOfferingId() { return this.savingsPlanOfferingId; } /** ** The ID of the offering. *
* * @param savingsPlanOfferingId * The ID of the offering. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSavingsPlanRequest withSavingsPlanOfferingId(String savingsPlanOfferingId) { setSavingsPlanOfferingId(savingsPlanOfferingId); return this; } /** ** The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than five * digits after the decimal point. *
* * @param commitment * The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than * five digits after the decimal point. */ public void setCommitment(String commitment) { this.commitment = commitment; } /** ** The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than five * digits after the decimal point. *
* * @return The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than * five digits after the decimal point. */ public String getCommitment() { return this.commitment; } /** ** The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than five * digits after the decimal point. *
* * @param commitment * The hourly commitment, in USD. This is a value between 0.001 and 1 million. You cannot specify more than * five digits after the decimal point. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSavingsPlanRequest withCommitment(String commitment) { setCommitment(commitment); return this; } /** *
* The up-front payment amount. This is a whole number between 50 and 99 percent of the total value of the Savings
* Plan. This parameter is supported only if the payment option is Partial Upfront
.
*
Partial Upfront
.
*/
public void setUpfrontPaymentAmount(String upfrontPaymentAmount) {
this.upfrontPaymentAmount = upfrontPaymentAmount;
}
/**
*
* The up-front payment amount. This is a whole number between 50 and 99 percent of the total value of the Savings
* Plan. This parameter is supported only if the payment option is Partial Upfront
.
*
Partial Upfront
.
*/
public String getUpfrontPaymentAmount() {
return this.upfrontPaymentAmount;
}
/**
*
* The up-front payment amount. This is a whole number between 50 and 99 percent of the total value of the Savings
* Plan. This parameter is supported only if the payment option is Partial Upfront
.
*
Partial Upfront
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateSavingsPlanRequest withUpfrontPaymentAmount(String upfrontPaymentAmount) {
setUpfrontPaymentAmount(upfrontPaymentAmount);
return this;
}
/**
* * The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ). *
* * @param purchaseTime * The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ). */ public void setPurchaseTime(java.util.Date purchaseTime) { this.purchaseTime = purchaseTime; } /** ** The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ). *
* * @return The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ). */ public java.util.Date getPurchaseTime() { return this.purchaseTime; } /** ** The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ). *
* * @param purchaseTime * The time at which to purchase the Savings Plan, in UTC format (YYYY-MM-DDTHH:MM:SSZ). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSavingsPlanRequest withPurchaseTime(java.util.Date purchaseTime) { setPurchaseTime(purchaseTime); return this; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public String getClientToken() { return this.clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSavingsPlanRequest withClientToken(String clientToken) { setClientToken(clientToken); 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 CreateSavingsPlanRequest withTags(java.util.Map