/* * 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. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ReservedInstance implements Serializable, Cloneable, StructuredPojo { /** ** The customer-specified identifier to track this reservation. *
*/ private String reservationName; /** ** The unique identifier for the reservation. *
*/ private String reservedInstanceId; /** ** The unique identifier of the billing subscription. *
*/ private Long billingSubscriptionId; /** ** The unique identifier of the Reserved Instance offering. *
*/ private String reservedInstanceOfferingId; /** ** The OpenSearch instance type offered by theReserved Instance offering. *
*/ private String instanceType; /** ** The date and time when the reservation was purchased. *
*/ private java.util.Date startTime; /** ** The duration, in seconds, for which the OpenSearch instance is reserved. *
*/ private Integer duration; /** ** The upfront fixed charge you will paid 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 offering. *
*/ private String currencyCode; /** ** The number of OpenSearch instances that have been reserved. *
*/ private Integer instanceCount; /** ** The state of the Reserved Instance. *
*/ private String state; /** ** The payment option as defined in the Reserved Instance offering. *
*/ private String paymentOption; /** ** The recurring charge to your account, regardless of whether you create any domains using the Reserved Instance * offering. *
*/ private java.util.List* The customer-specified identifier to track this reservation. *
* * @param reservationName * The customer-specified identifier to track this reservation. */ public void setReservationName(String reservationName) { this.reservationName = reservationName; } /** ** The customer-specified identifier to track this reservation. *
* * @return The customer-specified identifier to track this reservation. */ public String getReservationName() { return this.reservationName; } /** ** The customer-specified identifier to track this reservation. *
* * @param reservationName * The customer-specified identifier to track this reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withReservationName(String reservationName) { setReservationName(reservationName); return this; } /** ** The unique identifier for the reservation. *
* * @param reservedInstanceId * The unique identifier for the reservation. */ public void setReservedInstanceId(String reservedInstanceId) { this.reservedInstanceId = reservedInstanceId; } /** ** The unique identifier for the reservation. *
* * @return The unique identifier for the reservation. */ public String getReservedInstanceId() { return this.reservedInstanceId; } /** ** The unique identifier for the reservation. *
* * @param reservedInstanceId * The unique identifier for the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withReservedInstanceId(String reservedInstanceId) { setReservedInstanceId(reservedInstanceId); return this; } /** ** The unique identifier of the billing subscription. *
* * @param billingSubscriptionId * The unique identifier of the billing subscription. */ public void setBillingSubscriptionId(Long billingSubscriptionId) { this.billingSubscriptionId = billingSubscriptionId; } /** ** The unique identifier of the billing subscription. *
* * @return The unique identifier of the billing subscription. */ public Long getBillingSubscriptionId() { return this.billingSubscriptionId; } /** ** The unique identifier of the billing subscription. *
* * @param billingSubscriptionId * The unique identifier of the billing subscription. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withBillingSubscriptionId(Long billingSubscriptionId) { setBillingSubscriptionId(billingSubscriptionId); return this; } /** ** 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 ReservedInstance withReservedInstanceOfferingId(String reservedInstanceOfferingId) { setReservedInstanceOfferingId(reservedInstanceOfferingId); return this; } /** ** The OpenSearch instance type offered by theReserved Instance offering. *
* * @param instanceType * The OpenSearch instance type offered by theReserved Instance offering. * @see OpenSearchPartitionInstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The OpenSearch instance type offered by theReserved Instance offering. *
* * @return The OpenSearch instance type offered by theReserved Instance offering. * @see OpenSearchPartitionInstanceType */ public String getInstanceType() { return this.instanceType; } /** ** The OpenSearch instance type offered by theReserved Instance offering. *
* * @param instanceType * The OpenSearch instance type offered by theReserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see OpenSearchPartitionInstanceType */ public ReservedInstance withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** ** The OpenSearch instance type offered by theReserved Instance offering. *
* * @param instanceType * The OpenSearch instance type offered by theReserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see OpenSearchPartitionInstanceType */ public ReservedInstance withInstanceType(OpenSearchPartitionInstanceType instanceType) { this.instanceType = instanceType.toString(); return this; } /** ** The date and time when the reservation was purchased. *
* * @param startTime * The date and time when the reservation was purchased. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** The date and time when the reservation was purchased. *
* * @return The date and time when the reservation was purchased. */ public java.util.Date getStartTime() { return this.startTime; } /** ** The date and time when the reservation was purchased. *
* * @param startTime * The date and time when the reservation was purchased. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** The duration, in seconds, for which the OpenSearch instance is reserved. *
* * @param duration * The duration, in seconds, for which the OpenSearch instance is reserved. */ public void setDuration(Integer duration) { this.duration = duration; } /** ** The duration, in seconds, for which the OpenSearch instance is reserved. *
* * @return The duration, in seconds, for which the OpenSearch instance is reserved. */ public Integer getDuration() { return this.duration; } /** ** The duration, in seconds, for which the OpenSearch instance is reserved. *
* * @param duration * The duration, in seconds, for which the OpenSearch instance is reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withDuration(Integer duration) { setDuration(duration); return this; } /** ** The upfront fixed charge you will paid to purchase the specific Reserved Instance offering. *
* * @param fixedPrice * The upfront fixed charge you will paid to purchase the specific Reserved Instance offering. */ public void setFixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; } /** ** The upfront fixed charge you will paid to purchase the specific Reserved Instance offering. *
* * @return The upfront fixed charge you will paid to purchase the specific Reserved Instance offering. */ public Double getFixedPrice() { return this.fixedPrice; } /** ** The upfront fixed charge you will paid to purchase the specific Reserved Instance offering. *
* * @param fixedPrice * The upfront fixed charge you will paid to purchase the specific Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance 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 ReservedInstance withUsagePrice(Double usagePrice) { setUsagePrice(usagePrice); return this; } /** ** The currency code for the offering. *
* * @param currencyCode * The currency code for the offering. */ public void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } /** ** The currency code for the offering. *
* * @return The currency code for the offering. */ public String getCurrencyCode() { return this.currencyCode; } /** ** The currency code for the offering. *
* * @param currencyCode * The currency code for the offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withCurrencyCode(String currencyCode) { setCurrencyCode(currencyCode); return this; } /** ** The number of OpenSearch instances that have been reserved. *
* * @param instanceCount * The number of OpenSearch instances that have been reserved. */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** ** The number of OpenSearch instances that have been reserved. *
* * @return The number of OpenSearch instances that have been reserved. */ public Integer getInstanceCount() { return this.instanceCount; } /** ** The number of OpenSearch instances that have been reserved. *
* * @param instanceCount * The number of OpenSearch instances that have been reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); return this; } /** ** The state of the Reserved Instance. *
* * @param state * The state of the Reserved Instance. */ public void setState(String state) { this.state = state; } /** ** The state of the Reserved Instance. *
* * @return The state of the Reserved Instance. */ public String getState() { return this.state; } /** ** The state of the Reserved Instance. *
* * @param state * The state of the Reserved Instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withState(String state) { setState(state); return this; } /** ** The payment option as defined in the Reserved Instance offering. *
* * @param paymentOption * The payment option as defined in the Reserved Instance offering. * @see ReservedInstancePaymentOption */ public void setPaymentOption(String paymentOption) { this.paymentOption = paymentOption; } /** ** The payment option as defined in the Reserved Instance offering. *
* * @return The payment option as defined in the Reserved Instance offering. * @see ReservedInstancePaymentOption */ public String getPaymentOption() { return this.paymentOption; } /** ** The payment option as defined in the Reserved Instance offering. *
* * @param paymentOption * The payment option as defined in the Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see ReservedInstancePaymentOption */ public ReservedInstance withPaymentOption(String paymentOption) { setPaymentOption(paymentOption); return this; } /** ** The payment option as defined in the Reserved Instance offering. *
* * @param paymentOption * The payment option as defined in the Reserved Instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see ReservedInstancePaymentOption */ public ReservedInstance withPaymentOption(ReservedInstancePaymentOption paymentOption) { this.paymentOption = paymentOption.toString(); return this; } /** ** The recurring charge to your account, regardless of whether you create any domains using the Reserved Instance * offering. *
* * @return The recurring charge to your account, regardless of whether you create any domains using the Reserved * Instance offering. */ public java.util.List* The recurring charge to your account, regardless of whether you create any domains using the Reserved Instance * offering. *
* * @param recurringCharges * The recurring charge to your account, regardless of whether you create any domains using the Reserved * Instance offering. */ public void setRecurringCharges(java.util.Collection* The recurring charge to your account, regardless of whether you create any domains using the Reserved Instance * 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 create any domains using the Reserved * Instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withRecurringCharges(RecurringCharge... recurringCharges) { if (this.recurringCharges == null) { setRecurringCharges(new java.util.ArrayList* The recurring charge to your account, regardless of whether you create any domains using the Reserved Instance * offering. *
* * @param recurringCharges * The recurring charge to your account, regardless of whether you create any domains using the Reserved * Instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedInstance withRecurringCharges(java.util.Collection