/* * 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; /** *

* Container for the parameters required to enable EBS-based storage for an OpenSearch Service domain. *

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

* Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. *

*/ private Boolean eBSEnabled; /** *

* Specifies the type of EBS volumes attached to data nodes. *

*/ private String volumeType; /** *

* Specifies the size (in GiB) of EBS volumes attached to data nodes. *

*/ private Integer volumeSize; /** *

* Specifies the baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for * the gp3 and provisioned IOPS EBS volume types. *

*/ private Integer iops; /** *

* Specifies the throughput (in MiB/s) of the EBS volumes attached to data nodes. Applicable only for the * gp3 volume type. *

*/ private Integer throughput; /** *

* Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. *

* * @param eBSEnabled * Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. */ public void setEBSEnabled(Boolean eBSEnabled) { this.eBSEnabled = eBSEnabled; } /** *

* Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. *

* * @return Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. */ public Boolean getEBSEnabled() { return this.eBSEnabled; } /** *

* Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. *

* * @param eBSEnabled * Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. * @return Returns a reference to this object so that method calls can be chained together. */ public EBSOptions withEBSEnabled(Boolean eBSEnabled) { setEBSEnabled(eBSEnabled); return this; } /** *

* Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. *

* * @return Indicates whether EBS volumes are attached to data nodes in an OpenSearch Service domain. */ public Boolean isEBSEnabled() { return this.eBSEnabled; } /** *

* Specifies the type of EBS volumes attached to data nodes. *

* * @param volumeType * Specifies the type of EBS volumes attached to data nodes. * @see VolumeType */ public void setVolumeType(String volumeType) { this.volumeType = volumeType; } /** *

* Specifies the type of EBS volumes attached to data nodes. *

* * @return Specifies the type of EBS volumes attached to data nodes. * @see VolumeType */ public String getVolumeType() { return this.volumeType; } /** *

* Specifies the type of EBS volumes attached to data nodes. *

* * @param volumeType * Specifies the type of EBS volumes attached to data nodes. * @return Returns a reference to this object so that method calls can be chained together. * @see VolumeType */ public EBSOptions withVolumeType(String volumeType) { setVolumeType(volumeType); return this; } /** *

* Specifies the type of EBS volumes attached to data nodes. *

* * @param volumeType * Specifies the type of EBS volumes attached to data nodes. * @return Returns a reference to this object so that method calls can be chained together. * @see VolumeType */ public EBSOptions withVolumeType(VolumeType volumeType) { this.volumeType = volumeType.toString(); return this; } /** *

* Specifies the size (in GiB) of EBS volumes attached to data nodes. *

* * @param volumeSize * Specifies the size (in GiB) of EBS volumes attached to data nodes. */ public void setVolumeSize(Integer volumeSize) { this.volumeSize = volumeSize; } /** *

* Specifies the size (in GiB) of EBS volumes attached to data nodes. *

* * @return Specifies the size (in GiB) of EBS volumes attached to data nodes. */ public Integer getVolumeSize() { return this.volumeSize; } /** *

* Specifies the size (in GiB) of EBS volumes attached to data nodes. *

* * @param volumeSize * Specifies the size (in GiB) of EBS volumes attached to data nodes. * @return Returns a reference to this object so that method calls can be chained together. */ public EBSOptions withVolumeSize(Integer volumeSize) { setVolumeSize(volumeSize); return this; } /** *

* Specifies the baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for * the gp3 and provisioned IOPS EBS volume types. *

* * @param iops * Specifies the baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable * only for the gp3 and provisioned IOPS EBS volume types. */ public void setIops(Integer iops) { this.iops = iops; } /** *

* Specifies the baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for * the gp3 and provisioned IOPS EBS volume types. *

* * @return Specifies the baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable * only for the gp3 and provisioned IOPS EBS volume types. */ public Integer getIops() { return this.iops; } /** *

* Specifies the baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for * the gp3 and provisioned IOPS EBS volume types. *

* * @param iops * Specifies the baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable * only for the gp3 and provisioned IOPS EBS volume types. * @return Returns a reference to this object so that method calls can be chained together. */ public EBSOptions withIops(Integer iops) { setIops(iops); return this; } /** *

* Specifies the throughput (in MiB/s) of the EBS volumes attached to data nodes. Applicable only for the * gp3 volume type. *

* * @param throughput * Specifies the throughput (in MiB/s) of the EBS volumes attached to data nodes. Applicable only for the * gp3 volume type. */ public void setThroughput(Integer throughput) { this.throughput = throughput; } /** *

* Specifies the throughput (in MiB/s) of the EBS volumes attached to data nodes. Applicable only for the * gp3 volume type. *

* * @return Specifies the throughput (in MiB/s) of the EBS volumes attached to data nodes. Applicable only for the * gp3 volume type. */ public Integer getThroughput() { return this.throughput; } /** *

* Specifies the throughput (in MiB/s) of the EBS volumes attached to data nodes. Applicable only for the * gp3 volume type. *

* * @param throughput * Specifies the throughput (in MiB/s) of the EBS volumes attached to data nodes. Applicable only for the * gp3 volume type. * @return Returns a reference to this object so that method calls can be chained together. */ public EBSOptions withThroughput(Integer throughput) { setThroughput(throughput); 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 (getEBSEnabled() != null) sb.append("EBSEnabled: ").append(getEBSEnabled()).append(","); if (getVolumeType() != null) sb.append("VolumeType: ").append(getVolumeType()).append(","); if (getVolumeSize() != null) sb.append("VolumeSize: ").append(getVolumeSize()).append(","); if (getIops() != null) sb.append("Iops: ").append(getIops()).append(","); if (getThroughput() != null) sb.append("Throughput: ").append(getThroughput()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EBSOptions == false) return false; EBSOptions other = (EBSOptions) obj; if (other.getEBSEnabled() == null ^ this.getEBSEnabled() == null) return false; if (other.getEBSEnabled() != null && other.getEBSEnabled().equals(this.getEBSEnabled()) == false) return false; if (other.getVolumeType() == null ^ this.getVolumeType() == null) return false; if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == false) return false; if (other.getVolumeSize() == null ^ this.getVolumeSize() == null) return false; if (other.getVolumeSize() != null && other.getVolumeSize().equals(this.getVolumeSize()) == false) return false; if (other.getIops() == null ^ this.getIops() == null) return false; if (other.getIops() != null && other.getIops().equals(this.getIops()) == false) return false; if (other.getThroughput() == null ^ this.getThroughput() == null) return false; if (other.getThroughput() != null && other.getThroughput().equals(this.getThroughput()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEBSEnabled() == null) ? 0 : getEBSEnabled().hashCode()); hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode()); hashCode = prime * hashCode + ((getVolumeSize() == null) ? 0 : getVolumeSize().hashCode()); hashCode = prime * hashCode + ((getIops() == null) ? 0 : getIops().hashCode()); hashCode = prime * hashCode + ((getThroughput() == null) ? 0 : getThroughput().hashCode()); return hashCode; } @Override public EBSOptions clone() { try { return (EBSOptions) 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.opensearch.model.transform.EBSOptionsMarshaller.getInstance().marshall(this, protocolMarshaller); } }