/* * 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.opensearch.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Details of an OpenSearch Reserved Instance offering. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ReservedInstanceOffering implements Serializable, Cloneable, StructuredPojo { /** ** The unique identifier of the Reserved Instance offering. *
*/ private String reservedInstanceOfferingId; /** ** The OpenSearch instance type offered by the Reserved Instance offering. *
*/ private String instanceType; /** ** The duration, in seconds, for which the offering will reserve the OpenSearch instance. *
*/ private Integer duration; /** ** The upfront fixed charge you will pay to purchase the specific Reserved Instance offering. *
*/ private Double fixedPrice; /** ** The hourly rate at which you're charged for the domain using this Reserved Instance. *
*/ private Double usagePrice; /** ** The currency code for the Reserved Instance offering. *
*/ private String currencyCode; /** ** Payment option for the Reserved Instance offering *
*/ private String paymentOption; /** ** The recurring charge to your account, regardless of whether you creates any domains using the offering. *
*/ private java.util.List* The unique identifier of the Reserved Instance offering. *
* * @param reservedInstanceOfferingId * The unique identifier of the Reserved Instance offering. */ public void setReservedInstanceOfferingId(String reservedInstanceOfferingId) { this.reservedInstanceOfferingId = reservedInstanceOfferingId; } /** ** The unique identifier of the Reserved Instance offering. *
* * @return The unique identifier of the Reserved Instance offering. */ public String getReservedInstanceOfferingId() { return this.reservedInstanceOfferingId; } /** ** The unique identifier of the Reserved Instance offering. *
* * @param reservedInstanceOfferingId * The unique identifier of the Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstanceOffering withReservedInstanceOfferingId(String reservedInstanceOfferingId) { setReservedInstanceOfferingId(reservedInstanceOfferingId); return this; } /** ** The OpenSearch instance type offered by the Reserved Instance offering. *
* * @param instanceType * The OpenSearch instance type offered by the Reserved Instance offering. * @see OpenSearchPartitionInstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The OpenSearch instance type offered by the Reserved Instance offering. *
* * @return The OpenSearch instance type offered by the Reserved Instance offering. * @see OpenSearchPartitionInstanceType */ public String getInstanceType() { return this.instanceType; } /** ** The OpenSearch instance type offered by the Reserved Instance offering. *
* * @param instanceType * The OpenSearch instance type offered by the Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see OpenSearchPartitionInstanceType */ public ReservedInstanceOffering withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** ** The OpenSearch instance type offered by the Reserved Instance offering. *
* * @param instanceType * The OpenSearch instance type offered by the Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see OpenSearchPartitionInstanceType */ public ReservedInstanceOffering withInstanceType(OpenSearchPartitionInstanceType instanceType) { this.instanceType = instanceType.toString(); return this; } /** ** The duration, in seconds, for which the offering will reserve the OpenSearch instance. *
* * @param duration * The duration, in seconds, for which the offering will reserve the OpenSearch instance. */ public void setDuration(Integer duration) { this.duration = duration; } /** ** The duration, in seconds, for which the offering will reserve the OpenSearch instance. *
* * @return The duration, in seconds, for which the offering will reserve the OpenSearch instance. */ public Integer getDuration() { return this.duration; } /** ** The duration, in seconds, for which the offering will reserve the OpenSearch instance. *
* * @param duration * The duration, in seconds, for which the offering will reserve the OpenSearch instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstanceOffering withDuration(Integer duration) { setDuration(duration); return this; } /** ** The upfront fixed charge you will pay to purchase the specific Reserved Instance offering. *
* * @param fixedPrice * The upfront fixed charge you will pay to purchase the specific Reserved Instance offering. */ public void setFixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; } /** ** The upfront fixed charge you will pay to purchase the specific Reserved Instance offering. *
* * @return The upfront fixed charge you will pay to purchase the specific Reserved Instance offering. */ public Double getFixedPrice() { return this.fixedPrice; } /** ** The upfront fixed charge you will pay to purchase the specific Reserved Instance offering. *
* * @param fixedPrice * The upfront fixed charge you will pay to purchase the specific Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstanceOffering withFixedPrice(Double fixedPrice) { setFixedPrice(fixedPrice); return this; } /** ** The hourly rate at which you're charged for the domain using this Reserved Instance. *
* * @param usagePrice * The hourly rate at which you're charged for the domain using this Reserved Instance. */ public void setUsagePrice(Double usagePrice) { this.usagePrice = usagePrice; } /** ** The hourly rate at which you're charged for the domain using this Reserved Instance. *
* * @return The hourly rate at which you're charged for the domain using this Reserved Instance. */ public Double getUsagePrice() { return this.usagePrice; } /** ** The hourly rate at which you're charged for the domain using this Reserved Instance. *
* * @param usagePrice * The hourly rate at which you're charged for the domain using this Reserved Instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstanceOffering withUsagePrice(Double usagePrice) { setUsagePrice(usagePrice); return this; } /** ** The currency code for the Reserved Instance offering. *
* * @param currencyCode * The currency code for the Reserved Instance offering. */ public void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } /** ** The currency code for the Reserved Instance offering. *
* * @return The currency code for the Reserved Instance offering. */ public String getCurrencyCode() { return this.currencyCode; } /** ** The currency code for the Reserved Instance offering. *
* * @param currencyCode * The currency code for the Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstanceOffering withCurrencyCode(String currencyCode) { setCurrencyCode(currencyCode); return this; } /** ** Payment option for the Reserved Instance offering *
* * @param paymentOption * Payment option for the Reserved Instance offering * @see ReservedInstancePaymentOption */ public void setPaymentOption(String paymentOption) { this.paymentOption = paymentOption; } /** ** Payment option for the Reserved Instance offering *
* * @return Payment option for the Reserved Instance offering * @see ReservedInstancePaymentOption */ public String getPaymentOption() { return this.paymentOption; } /** ** Payment option for the Reserved Instance offering *
* * @param paymentOption * Payment option for the Reserved Instance offering * @return Returns a reference to this object so that method calls can be chained together. * @see ReservedInstancePaymentOption */ public ReservedInstanceOffering withPaymentOption(String paymentOption) { setPaymentOption(paymentOption); return this; } /** ** Payment option for the Reserved Instance offering *
* * @param paymentOption * Payment option for the Reserved Instance offering * @return Returns a reference to this object so that method calls can be chained together. * @see ReservedInstancePaymentOption */ public ReservedInstanceOffering withPaymentOption(ReservedInstancePaymentOption paymentOption) { this.paymentOption = paymentOption.toString(); return this; } /** ** The recurring charge to your account, regardless of whether you creates any domains using the offering. *
* * @return The recurring charge to your account, regardless of whether you creates any domains using the offering. */ public java.util.List* The recurring charge to your account, regardless of whether you creates any domains using the offering. *
* * @param recurringCharges * The recurring charge to your account, regardless of whether you creates any domains using the offering. */ public void setRecurringCharges(java.util.Collection* The recurring charge to your account, regardless of whether you creates any domains using the offering. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRecurringCharges(java.util.Collection)} or {@link #withRecurringCharges(java.util.Collection)} if you * want to override the existing values. *
* * @param recurringCharges * The recurring charge to your account, regardless of whether you creates any domains using the offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstanceOffering withRecurringCharges(RecurringCharge... recurringCharges) { if (this.recurringCharges == null) { setRecurringCharges(new java.util.ArrayList* The recurring charge to your account, regardless of whether you creates any domains using the offering. *
* * @param recurringCharges * The recurring charge to your account, regardless of whether you creates any domains using the offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstanceOffering withRecurringCharges(java.util.Collection