com.amazonaws.services.elasticsearch.model.PurchaseReservedElasticsearchInstanceOfferingResult Maven / Gradle / Ivy
/*
* 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;
/**
*
* Represents the output of a PurchaseReservedElasticsearchInstanceOffering
operation.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PurchaseReservedElasticsearchInstanceOfferingResult extends com.amazonaws.AmazonWebServiceResult implements
Serializable, Cloneable {
/**
*
* Details of the reserved Elasticsearch instance which was purchased.
*
*/
private String reservedElasticsearchInstanceId;
/**
*
* The customer-specified identifier used to track this reservation.
*
*/
private String reservationName;
/**
*
* Details of the reserved Elasticsearch instance which was purchased.
*
*
* @param reservedElasticsearchInstanceId
* Details of the reserved Elasticsearch instance which was purchased.
*/
public void setReservedElasticsearchInstanceId(String reservedElasticsearchInstanceId) {
this.reservedElasticsearchInstanceId = reservedElasticsearchInstanceId;
}
/**
*
* Details of the reserved Elasticsearch instance which was purchased.
*
*
* @return Details of the reserved Elasticsearch instance which was purchased.
*/
public String getReservedElasticsearchInstanceId() {
return this.reservedElasticsearchInstanceId;
}
/**
*
* Details of the reserved Elasticsearch instance which was purchased.
*
*
* @param reservedElasticsearchInstanceId
* Details of the reserved Elasticsearch instance which was purchased.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PurchaseReservedElasticsearchInstanceOfferingResult withReservedElasticsearchInstanceId(String reservedElasticsearchInstanceId) {
setReservedElasticsearchInstanceId(reservedElasticsearchInstanceId);
return this;
}
/**
*
* The customer-specified identifier used to track this reservation.
*
*
* @param reservationName
* The customer-specified identifier used to track this reservation.
*/
public void setReservationName(String reservationName) {
this.reservationName = reservationName;
}
/**
*
* The customer-specified identifier used to track this reservation.
*
*
* @return The customer-specified identifier used to track this reservation.
*/
public String getReservationName() {
return this.reservationName;
}
/**
*
* The customer-specified identifier used to track this reservation.
*
*
* @param reservationName
* The customer-specified identifier used to track this reservation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PurchaseReservedElasticsearchInstanceOfferingResult withReservationName(String reservationName) {
setReservationName(reservationName);
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 (getReservedElasticsearchInstanceId() != null)
sb.append("ReservedElasticsearchInstanceId: ").append(getReservedElasticsearchInstanceId()).append(",");
if (getReservationName() != null)
sb.append("ReservationName: ").append(getReservationName());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PurchaseReservedElasticsearchInstanceOfferingResult == false)
return false;
PurchaseReservedElasticsearchInstanceOfferingResult other = (PurchaseReservedElasticsearchInstanceOfferingResult) obj;
if (other.getReservedElasticsearchInstanceId() == null ^ this.getReservedElasticsearchInstanceId() == null)
return false;
if (other.getReservedElasticsearchInstanceId() != null
&& other.getReservedElasticsearchInstanceId().equals(this.getReservedElasticsearchInstanceId()) == false)
return false;
if (other.getReservationName() == null ^ this.getReservationName() == null)
return false;
if (other.getReservationName() != null && other.getReservationName().equals(this.getReservationName()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getReservedElasticsearchInstanceId() == null) ? 0 : getReservedElasticsearchInstanceId().hashCode());
hashCode = prime * hashCode + ((getReservationName() == null) ? 0 : getReservationName().hashCode());
return hashCode;
}
@Override
public PurchaseReservedElasticsearchInstanceOfferingResult clone() {
try {
return (PurchaseReservedElasticsearchInstanceOfferingResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy