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

com.amazonaws.services.elasticsearch.model.ReservedElasticsearchInstanceOffering 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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2015-2020 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 offering. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ReservedElasticsearchInstanceOffering implements Serializable, Cloneable, StructuredPojo { /** *

* The Elasticsearch reserved instance offering identifier. *

*/ private String reservedElasticsearchInstanceOfferingId; /** *

* The Elasticsearch instance type offered by the reserved instance offering. *

*/ private String elasticsearchInstanceType; /** *

* The duration, in seconds, for which the offering will reserve the Elasticsearch instance. *

*/ private Integer duration; /** *

* The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch instance offering. *

*/ private Double fixedPrice; /** *

* The rate you are charged for each hour the domain that is using the offering is running. *

*/ private Double usagePrice; /** *

* The currency code for the reserved Elasticsearch instance offering. *

*/ private String currencyCode; /** *

* Payment option for 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 Elasticsearch reserved instance offering identifier. *

* * @param reservedElasticsearchInstanceOfferingId * The Elasticsearch reserved instance offering identifier. */ public void setReservedElasticsearchInstanceOfferingId(String reservedElasticsearchInstanceOfferingId) { this.reservedElasticsearchInstanceOfferingId = reservedElasticsearchInstanceOfferingId; } /** *

* The Elasticsearch reserved instance offering identifier. *

* * @return The Elasticsearch reserved instance offering identifier. */ public String getReservedElasticsearchInstanceOfferingId() { return this.reservedElasticsearchInstanceOfferingId; } /** *

* The Elasticsearch reserved instance offering identifier. *

* * @param reservedElasticsearchInstanceOfferingId * The Elasticsearch reserved instance offering identifier. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstanceOffering 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 ReservedElasticsearchInstanceOffering 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 ReservedElasticsearchInstanceOffering withElasticsearchInstanceType(ESPartitionInstanceType elasticsearchInstanceType) { this.elasticsearchInstanceType = elasticsearchInstanceType.toString(); return this; } /** *

* The duration, in seconds, for which the offering will reserve the Elasticsearch instance. *

* * @param duration * The duration, in seconds, for which the offering will reserve the Elasticsearch instance. */ public void setDuration(Integer duration) { this.duration = duration; } /** *

* The duration, in seconds, for which the offering will reserve the Elasticsearch instance. *

* * @return The duration, in seconds, for which the offering will reserve the Elasticsearch instance. */ public Integer getDuration() { return this.duration; } /** *

* The duration, in seconds, for which the offering will reserve the Elasticsearch instance. *

* * @param duration * The duration, in seconds, for which the offering will reserve the Elasticsearch instance. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstanceOffering withDuration(Integer duration) { setDuration(duration); return this; } /** *

* The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch instance offering. *

* * @param fixedPrice * The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch instance offering. */ public void setFixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; } /** *

* The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch instance offering. *

* * @return The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch instance offering. */ public Double getFixedPrice() { return this.fixedPrice; } /** *

* The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch instance offering. *

* * @param fixedPrice * The upfront fixed charge you will pay to purchase the specific reserved Elasticsearch instance offering. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstanceOffering withFixedPrice(Double fixedPrice) { setFixedPrice(fixedPrice); return this; } /** *

* The rate you are charged for each hour the domain that is using the offering is running. *

* * @param usagePrice * The rate you are charged for each hour the domain that is using the offering is running. */ public void setUsagePrice(Double usagePrice) { this.usagePrice = usagePrice; } /** *

* The rate you are charged for each hour the domain that is using the offering is running. *

* * @return The rate you are charged for each hour the domain that is using the offering is running. */ public Double getUsagePrice() { return this.usagePrice; } /** *

* The rate you are charged for each hour the domain that is using the offering is running. *

* * @param usagePrice * The rate you are charged for each hour the domain that is using the offering is running. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedElasticsearchInstanceOffering 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 ReservedElasticsearchInstanceOffering withCurrencyCode(String currencyCode) { setCurrencyCode(currencyCode); return this; } /** *

* Payment option for the reserved Elasticsearch instance offering *

* * @param paymentOption * Payment option for the reserved Elasticsearch instance offering * @see ReservedElasticsearchInstancePaymentOption */ public void setPaymentOption(String paymentOption) { this.paymentOption = paymentOption; } /** *

* Payment option for the reserved Elasticsearch instance offering *

* * @return Payment option for the reserved Elasticsearch instance offering * @see ReservedElasticsearchInstancePaymentOption */ public String getPaymentOption() { return this.paymentOption; } /** *

* Payment option for the reserved Elasticsearch instance offering *

* * @param paymentOption * Payment option for the reserved Elasticsearch instance offering * @return Returns a reference to this object so that method calls can be chained together. * @see ReservedElasticsearchInstancePaymentOption */ public ReservedElasticsearchInstanceOffering withPaymentOption(String paymentOption) { setPaymentOption(paymentOption); return this; } /** *

* Payment option for the reserved Elasticsearch instance offering *

* * @param paymentOption * Payment option for the reserved Elasticsearch instance offering * @return Returns a reference to this object so that method calls can be chained together. * @see ReservedElasticsearchInstancePaymentOption */ public ReservedElasticsearchInstanceOffering 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 ReservedElasticsearchInstanceOffering 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 ReservedElasticsearchInstanceOffering 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 (getReservedElasticsearchInstanceOfferingId() != null) sb.append("ReservedElasticsearchInstanceOfferingId: ").append(getReservedElasticsearchInstanceOfferingId()).append(","); if (getElasticsearchInstanceType() != null) sb.append("ElasticsearchInstanceType: ").append(getElasticsearchInstanceType()).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 (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 ReservedElasticsearchInstanceOffering == false) return false; ReservedElasticsearchInstanceOffering other = (ReservedElasticsearchInstanceOffering) obj; 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.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.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 + ((getReservedElasticsearchInstanceOfferingId() == null) ? 0 : getReservedElasticsearchInstanceOfferingId().hashCode()); hashCode = prime * hashCode + ((getElasticsearchInstanceType() == null) ? 0 : getElasticsearchInstanceType().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 + ((getPaymentOption() == null) ? 0 : getPaymentOption().hashCode()); hashCode = prime * hashCode + ((getRecurringCharges() == null) ? 0 : getRecurringCharges().hashCode()); return hashCode; } @Override public ReservedElasticsearchInstanceOffering clone() { try { return (ReservedElasticsearchInstanceOffering) 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.ReservedElasticsearchInstanceOfferingMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy