/* * 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.elasticsearch.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Details of a reserved Elasticsearch instance. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ReservedElasticsearchInstance implements Serializable, Cloneable, StructuredPojo { /** ** The customer-specified identifier to track this reservation. *
*/ private String reservationName; /** ** The unique identifier for the reservation. *
*/ private String reservedElasticsearchInstanceId; /** ** The offering identifier. *
*/ private String reservedElasticsearchInstanceOfferingId; /** ** The Elasticsearch instance type offered by the reserved instance offering. *
*/ private String elasticsearchInstanceType; /** ** The time the reservation started. *
*/ private java.util.Date startTime; /** ** The duration, in seconds, for which the Elasticsearch instance is reserved. *
*/ private Integer duration; /** ** The upfront fixed charge you will paid to purchase the specific reserved Elasticsearch instance offering. *
*/ private Double fixedPrice; /** ** The rate you are charged for each hour for the domain that is using this reserved instance. *
*/ private Double usagePrice; /** ** The currency code for the reserved Elasticsearch instance offering. *
*/ private String currencyCode; /** ** The number of Elasticsearch instances that have been reserved. *
*/ private Integer elasticsearchInstanceCount; /** ** The state of the reserved Elasticsearch instance. *
*/ private String state; /** ** The payment option as defined in the reserved Elasticsearch instance offering. *
*/ private String paymentOption; /** ** The charge to your account regardless of whether you are creating any domains using the 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 ReservedElasticsearchInstance withReservationName(String reservationName) { setReservationName(reservationName); return this; } /** ** The unique identifier for the reservation. *
* * @param reservedElasticsearchInstanceId * The unique identifier for the reservation. */ public void setReservedElasticsearchInstanceId(String reservedElasticsearchInstanceId) { this.reservedElasticsearchInstanceId = reservedElasticsearchInstanceId; } /** ** The unique identifier for the reservation. *
* * @return The unique identifier for the reservation. */ public String getReservedElasticsearchInstanceId() { return this.reservedElasticsearchInstanceId; } /** ** The unique identifier for the reservation. *
* * @param reservedElasticsearchInstanceId * The unique identifier for the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withReservedElasticsearchInstanceId(String reservedElasticsearchInstanceId) { setReservedElasticsearchInstanceId(reservedElasticsearchInstanceId); return this; } /** ** The offering identifier. *
* * @param reservedElasticsearchInstanceOfferingId * The offering identifier. */ public void setReservedElasticsearchInstanceOfferingId(String reservedElasticsearchInstanceOfferingId) { this.reservedElasticsearchInstanceOfferingId = reservedElasticsearchInstanceOfferingId; } /** ** The offering identifier. *
* * @return The offering identifier. */ public String getReservedElasticsearchInstanceOfferingId() { return this.reservedElasticsearchInstanceOfferingId; } /** ** The offering identifier. *
* * @param reservedElasticsearchInstanceOfferingId * The offering identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withReservedElasticsearchInstanceOfferingId(String reservedElasticsearchInstanceOfferingId) { setReservedElasticsearchInstanceOfferingId(reservedElasticsearchInstanceOfferingId); return this; } /** ** The Elasticsearch instance type offered by the reserved instance offering. *
* * @param elasticsearchInstanceType * The Elasticsearch instance type offered by the reserved instance offering. * @see ESPartitionInstanceType */ public void setElasticsearchInstanceType(String elasticsearchInstanceType) { this.elasticsearchInstanceType = elasticsearchInstanceType; } /** ** The Elasticsearch instance type offered by the reserved instance offering. *
* * @return The Elasticsearch instance type offered by the reserved instance offering. * @see ESPartitionInstanceType */ public String getElasticsearchInstanceType() { return this.elasticsearchInstanceType; } /** ** The Elasticsearch instance type offered by the reserved instance offering. *
* * @param elasticsearchInstanceType * The Elasticsearch instance type offered by the reserved instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see ESPartitionInstanceType */ public ReservedElasticsearchInstance withElasticsearchInstanceType(String elasticsearchInstanceType) { setElasticsearchInstanceType(elasticsearchInstanceType); return this; } /** ** The Elasticsearch instance type offered by the reserved instance offering. *
* * @param elasticsearchInstanceType * The Elasticsearch instance type offered by the reserved instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see ESPartitionInstanceType */ public ReservedElasticsearchInstance withElasticsearchInstanceType(ESPartitionInstanceType elasticsearchInstanceType) { this.elasticsearchInstanceType = elasticsearchInstanceType.toString(); return this; } /** ** The time the reservation started. *
* * @param startTime * The time the reservation started. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** The time the reservation started. *
* * @return The time the reservation started. */ public java.util.Date getStartTime() { return this.startTime; } /** ** The time the reservation started. *
* * @param startTime * The time the reservation started. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** The duration, in seconds, for which the Elasticsearch instance is reserved. *
* * @param duration * The duration, in seconds, for which the Elasticsearch instance is reserved. */ public void setDuration(Integer duration) { this.duration = duration; } /** ** The duration, in seconds, for which the Elasticsearch instance is reserved. *
* * @return The duration, in seconds, for which the Elasticsearch instance is reserved. */ public Integer getDuration() { return this.duration; } /** ** The duration, in seconds, for which the Elasticsearch instance is reserved. *
* * @param duration * The duration, in seconds, for which the Elasticsearch instance is reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withDuration(Integer duration) { setDuration(duration); return this; } /** ** The upfront fixed charge you will paid to purchase the specific reserved Elasticsearch instance offering. *
* * @param fixedPrice * The upfront fixed charge you will paid to purchase the specific reserved Elasticsearch instance offering. */ public void setFixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; } /** ** The upfront fixed charge you will paid to purchase the specific reserved Elasticsearch instance offering. *
* * @return The upfront fixed charge you will paid to purchase the specific reserved Elasticsearch instance offering. */ public Double getFixedPrice() { return this.fixedPrice; } /** ** The upfront fixed charge you will paid to purchase the specific reserved Elasticsearch instance offering. *
* * @param fixedPrice * The upfront fixed charge you will paid to purchase the specific reserved Elasticsearch instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withFixedPrice(Double fixedPrice) { setFixedPrice(fixedPrice); return this; } /** ** The rate you are charged for each hour for the domain that is using this reserved instance. *
* * @param usagePrice * The rate you are charged for each hour for the domain that is using this reserved instance. */ public void setUsagePrice(Double usagePrice) { this.usagePrice = usagePrice; } /** ** The rate you are charged for each hour for the domain that is using this reserved instance. *
* * @return The rate you are charged for each hour for the domain that is using this reserved instance. */ public Double getUsagePrice() { return this.usagePrice; } /** ** The rate you are charged for each hour for the domain that is using this reserved instance. *
* * @param usagePrice * The rate you are charged for each hour for the domain that is using this reserved instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withUsagePrice(Double usagePrice) { setUsagePrice(usagePrice); return this; } /** ** The currency code for the reserved Elasticsearch instance offering. *
* * @param currencyCode * The currency code for the reserved Elasticsearch instance offering. */ public void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } /** ** The currency code for the reserved Elasticsearch instance offering. *
* * @return The currency code for the reserved Elasticsearch instance offering. */ public String getCurrencyCode() { return this.currencyCode; } /** ** The currency code for the reserved Elasticsearch instance offering. *
* * @param currencyCode * The currency code for the reserved Elasticsearch instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withCurrencyCode(String currencyCode) { setCurrencyCode(currencyCode); return this; } /** ** The number of Elasticsearch instances that have been reserved. *
* * @param elasticsearchInstanceCount * The number of Elasticsearch instances that have been reserved. */ public void setElasticsearchInstanceCount(Integer elasticsearchInstanceCount) { this.elasticsearchInstanceCount = elasticsearchInstanceCount; } /** ** The number of Elasticsearch instances that have been reserved. *
* * @return The number of Elasticsearch instances that have been reserved. */ public Integer getElasticsearchInstanceCount() { return this.elasticsearchInstanceCount; } /** ** The number of Elasticsearch instances that have been reserved. *
* * @param elasticsearchInstanceCount * The number of Elasticsearch instances that have been reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withElasticsearchInstanceCount(Integer elasticsearchInstanceCount) { setElasticsearchInstanceCount(elasticsearchInstanceCount); return this; } /** ** The state of the reserved Elasticsearch instance. *
* * @param state * The state of the reserved Elasticsearch instance. */ public void setState(String state) { this.state = state; } /** ** The state of the reserved Elasticsearch instance. *
* * @return The state of the reserved Elasticsearch instance. */ public String getState() { return this.state; } /** ** The state of the reserved Elasticsearch instance. *
* * @param state * The state of the reserved Elasticsearch instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withState(String state) { setState(state); return this; } /** ** The payment option as defined in the reserved Elasticsearch instance offering. *
* * @param paymentOption * The payment option as defined in the reserved Elasticsearch instance offering. * @see ReservedElasticsearchInstancePaymentOption */ public void setPaymentOption(String paymentOption) { this.paymentOption = paymentOption; } /** ** The payment option as defined in the reserved Elasticsearch instance offering. *
* * @return The payment option as defined in the reserved Elasticsearch instance offering. * @see ReservedElasticsearchInstancePaymentOption */ public String getPaymentOption() { return this.paymentOption; } /** ** The payment option as defined in the reserved Elasticsearch instance offering. *
* * @param paymentOption * The payment option as defined in the reserved Elasticsearch instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see ReservedElasticsearchInstancePaymentOption */ public ReservedElasticsearchInstance withPaymentOption(String paymentOption) { setPaymentOption(paymentOption); return this; } /** ** The payment option as defined in the reserved Elasticsearch instance offering. *
* * @param paymentOption * The payment option as defined in the reserved Elasticsearch instance offering. * @return Returns a reference to this object so that method calls can be chained together. * @see ReservedElasticsearchInstancePaymentOption */ public ReservedElasticsearchInstance withPaymentOption(ReservedElasticsearchInstancePaymentOption paymentOption) { this.paymentOption = paymentOption.toString(); return this; } /** ** The charge to your account regardless of whether you are creating any domains using the instance offering. *
* * @return The charge to your account regardless of whether you are creating any domains using the instance * offering. */ public java.util.List* The charge to your account regardless of whether you are creating any domains using the instance offering. *
* * @param recurringCharges * The charge to your account regardless of whether you are creating any domains using the instance offering. */ public void setRecurringCharges(java.util.Collection* The charge to your account regardless of whether you are creating any domains using the 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 charge to your account regardless of whether you are creating any domains using the instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withRecurringCharges(RecurringCharge... recurringCharges) { if (this.recurringCharges == null) { setRecurringCharges(new java.util.ArrayList* The charge to your account regardless of whether you are creating any domains using the instance offering. *
* * @param recurringCharges * The charge to your account regardless of whether you are creating any domains using the instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstance withRecurringCharges(java.util.Collection