All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elasticsearch.model.ReservedElasticsearchInstance Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Elasticsearch Service module holds the client classes that are used for communicating with Amazon Elasticsearch Service

The newest version!
/*
 * Copyright 2019-2024 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 recurringCharges; /** *

* 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 getRecurringCharges() { return recurringCharges; } /** *

* 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 recurringCharges) { if (recurringCharges == null) { this.recurringCharges = null; return; } this.recurringCharges = new java.util.ArrayList(recurringCharges); } /** *

* 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(recurringCharges.length)); } for (RecurringCharge ele : recurringCharges) { this.recurringCharges.add(ele); } return this; } /** *

* 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 recurringCharges) { setRecurringCharges(recurringCharges); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getReservationName() != null) sb.append("ReservationName: ").append(getReservationName()).append(","); if (getReservedElasticsearchInstanceId() != null) sb.append("ReservedElasticsearchInstanceId: ").append(getReservedElasticsearchInstanceId()).append(","); if (getReservedElasticsearchInstanceOfferingId() != null) sb.append("ReservedElasticsearchInstanceOfferingId: ").append(getReservedElasticsearchInstanceOfferingId()).append(","); if (getElasticsearchInstanceType() != null) sb.append("ElasticsearchInstanceType: ").append(getElasticsearchInstanceType()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getDuration() != null) sb.append("Duration: ").append(getDuration()).append(","); if (getFixedPrice() != null) sb.append("FixedPrice: ").append(getFixedPrice()).append(","); if (getUsagePrice() != null) sb.append("UsagePrice: ").append(getUsagePrice()).append(","); if (getCurrencyCode() != null) sb.append("CurrencyCode: ").append(getCurrencyCode()).append(","); if (getElasticsearchInstanceCount() != null) sb.append("ElasticsearchInstanceCount: ").append(getElasticsearchInstanceCount()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getPaymentOption() != null) sb.append("PaymentOption: ").append(getPaymentOption()).append(","); if (getRecurringCharges() != null) sb.append("RecurringCharges: ").append(getRecurringCharges()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservedElasticsearchInstance == false) return false; ReservedElasticsearchInstance other = (ReservedElasticsearchInstance) obj; if (other.getReservationName() == null ^ this.getReservationName() == null) return false; if (other.getReservationName() != null && other.getReservationName().equals(this.getReservationName()) == false) return false; if (other.getReservedElasticsearchInstanceId() == null ^ this.getReservedElasticsearchInstanceId() == null) return false; if (other.getReservedElasticsearchInstanceId() != null && other.getReservedElasticsearchInstanceId().equals(this.getReservedElasticsearchInstanceId()) == false) return false; if (other.getReservedElasticsearchInstanceOfferingId() == null ^ this.getReservedElasticsearchInstanceOfferingId() == null) return false; if (other.getReservedElasticsearchInstanceOfferingId() != null && other.getReservedElasticsearchInstanceOfferingId().equals(this.getReservedElasticsearchInstanceOfferingId()) == false) return false; if (other.getElasticsearchInstanceType() == null ^ this.getElasticsearchInstanceType() == null) return false; if (other.getElasticsearchInstanceType() != null && other.getElasticsearchInstanceType().equals(this.getElasticsearchInstanceType()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getDuration() == null ^ this.getDuration() == null) return false; if (other.getDuration() != null && other.getDuration().equals(this.getDuration()) == false) return false; if (other.getFixedPrice() == null ^ this.getFixedPrice() == null) return false; if (other.getFixedPrice() != null && other.getFixedPrice().equals(this.getFixedPrice()) == false) return false; if (other.getUsagePrice() == null ^ this.getUsagePrice() == null) return false; if (other.getUsagePrice() != null && other.getUsagePrice().equals(this.getUsagePrice()) == false) return false; if (other.getCurrencyCode() == null ^ this.getCurrencyCode() == null) return false; if (other.getCurrencyCode() != null && other.getCurrencyCode().equals(this.getCurrencyCode()) == false) return false; if (other.getElasticsearchInstanceCount() == null ^ this.getElasticsearchInstanceCount() == null) return false; if (other.getElasticsearchInstanceCount() != null && other.getElasticsearchInstanceCount().equals(this.getElasticsearchInstanceCount()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getPaymentOption() == null ^ this.getPaymentOption() == null) return false; if (other.getPaymentOption() != null && other.getPaymentOption().equals(this.getPaymentOption()) == false) return false; if (other.getRecurringCharges() == null ^ this.getRecurringCharges() == null) return false; if (other.getRecurringCharges() != null && other.getRecurringCharges().equals(this.getRecurringCharges()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReservationName() == null) ? 0 : getReservationName().hashCode()); hashCode = prime * hashCode + ((getReservedElasticsearchInstanceId() == null) ? 0 : getReservedElasticsearchInstanceId().hashCode()); hashCode = prime * hashCode + ((getReservedElasticsearchInstanceOfferingId() == null) ? 0 : getReservedElasticsearchInstanceOfferingId().hashCode()); hashCode = prime * hashCode + ((getElasticsearchInstanceType() == null) ? 0 : getElasticsearchInstanceType().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getDuration() == null) ? 0 : getDuration().hashCode()); hashCode = prime * hashCode + ((getFixedPrice() == null) ? 0 : getFixedPrice().hashCode()); hashCode = prime * hashCode + ((getUsagePrice() == null) ? 0 : getUsagePrice().hashCode()); hashCode = prime * hashCode + ((getCurrencyCode() == null) ? 0 : getCurrencyCode().hashCode()); hashCode = prime * hashCode + ((getElasticsearchInstanceCount() == null) ? 0 : getElasticsearchInstanceCount().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getPaymentOption() == null) ? 0 : getPaymentOption().hashCode()); hashCode = prime * hashCode + ((getRecurringCharges() == null) ? 0 : getRecurringCharges().hashCode()); return hashCode; } @Override public ReservedElasticsearchInstance clone() { try { return (ReservedElasticsearchInstance) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.elasticsearch.model.transform.ReservedElasticsearchInstanceMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy