/* * 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; /** *
* Specifies the configuration for the domain cluster, such as the type and number of instances. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ElasticsearchClusterConfig implements Serializable, Cloneable, StructuredPojo { /** ** The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data instances. *
*/ private String instanceType; /** ** The number of instances in the specified domain cluster. *
*/ private Integer instanceCount; /** ** A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. *
*/ private Boolean dedicatedMasterEnabled; /** ** A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. *
*/ private Boolean zoneAwarenessEnabled; /** ** Specifies the zone awareness configuration for a domain when zone awareness is enabled. *
*/ private ZoneAwarenessConfig zoneAwarenessConfig; /** ** The instance type for a dedicated master node. *
*/ private String dedicatedMasterType; /** ** Total number of dedicated master nodes, active and on standby, for the cluster. *
*/ private Integer dedicatedMasterCount; /** ** True to enable warm storage. *
*/ private Boolean warmEnabled; /** ** The instance type for the Elasticsearch cluster's warm nodes. *
*/ private String warmType; /** ** The number of warm nodes in the cluster. *
*/ private Integer warmCount; /** *
* Specifies the ColdStorageOptions
config for Elasticsearch Domain
*
* The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data instances. *
* * @param instanceType * The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data * instances. * @see ESPartitionInstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data instances. *
* * @return The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data * instances. * @see ESPartitionInstanceType */ public String getInstanceType() { return this.instanceType; } /** ** The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data instances. *
* * @param instanceType * The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data * instances. * @return Returns a reference to this object so that method calls can be chained together. * @see ESPartitionInstanceType */ public ElasticsearchClusterConfig withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** ** The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data instances. *
* * @param instanceType * The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data * instances. * @see ESPartitionInstanceType */ public void setInstanceType(ESPartitionInstanceType instanceType) { withInstanceType(instanceType); } /** ** The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data instances. *
* * @param instanceType * The instance type for an Elasticsearch cluster. UltraWarm instance types are not supported for data * instances. * @return Returns a reference to this object so that method calls can be chained together. * @see ESPartitionInstanceType */ public ElasticsearchClusterConfig withInstanceType(ESPartitionInstanceType instanceType) { this.instanceType = instanceType.toString(); return this; } /** ** The number of instances in the specified domain cluster. *
* * @param instanceCount * The number of instances in the specified domain cluster. */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** ** The number of instances in the specified domain cluster. *
* * @return The number of instances in the specified domain cluster. */ public Integer getInstanceCount() { return this.instanceCount; } /** ** The number of instances in the specified domain cluster. *
* * @param instanceCount * The number of instances in the specified domain cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchClusterConfig withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); return this; } /** ** A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. *
* * @param dedicatedMasterEnabled * A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. */ public void setDedicatedMasterEnabled(Boolean dedicatedMasterEnabled) { this.dedicatedMasterEnabled = dedicatedMasterEnabled; } /** ** A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. *
* * @return A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. */ public Boolean getDedicatedMasterEnabled() { return this.dedicatedMasterEnabled; } /** ** A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. *
* * @param dedicatedMasterEnabled * A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchClusterConfig withDedicatedMasterEnabled(Boolean dedicatedMasterEnabled) { setDedicatedMasterEnabled(dedicatedMasterEnabled); return this; } /** ** A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. *
* * @return A boolean value to indicate whether a dedicated master node is enabled. See About Dedicated Master Nodes for more information. */ public Boolean isDedicatedMasterEnabled() { return this.dedicatedMasterEnabled; } /** ** A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. *
* * @param zoneAwarenessEnabled * A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. */ public void setZoneAwarenessEnabled(Boolean zoneAwarenessEnabled) { this.zoneAwarenessEnabled = zoneAwarenessEnabled; } /** ** A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. *
* * @return A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. */ public Boolean getZoneAwarenessEnabled() { return this.zoneAwarenessEnabled; } /** ** A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. *
* * @param zoneAwarenessEnabled * A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchClusterConfig withZoneAwarenessEnabled(Boolean zoneAwarenessEnabled) { setZoneAwarenessEnabled(zoneAwarenessEnabled); return this; } /** ** A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. *
* * @return A boolean value to indicate whether zone awareness is enabled. See About Zone Awareness for more information. */ public Boolean isZoneAwarenessEnabled() { return this.zoneAwarenessEnabled; } /** ** Specifies the zone awareness configuration for a domain when zone awareness is enabled. *
* * @param zoneAwarenessConfig * Specifies the zone awareness configuration for a domain when zone awareness is enabled. */ public void setZoneAwarenessConfig(ZoneAwarenessConfig zoneAwarenessConfig) { this.zoneAwarenessConfig = zoneAwarenessConfig; } /** ** Specifies the zone awareness configuration for a domain when zone awareness is enabled. *
* * @return Specifies the zone awareness configuration for a domain when zone awareness is enabled. */ public ZoneAwarenessConfig getZoneAwarenessConfig() { return this.zoneAwarenessConfig; } /** ** Specifies the zone awareness configuration for a domain when zone awareness is enabled. *
* * @param zoneAwarenessConfig * Specifies the zone awareness configuration for a domain when zone awareness is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchClusterConfig withZoneAwarenessConfig(ZoneAwarenessConfig zoneAwarenessConfig) { setZoneAwarenessConfig(zoneAwarenessConfig); return this; } /** ** The instance type for a dedicated master node. *
* * @param dedicatedMasterType * The instance type for a dedicated master node. * @see ESPartitionInstanceType */ public void setDedicatedMasterType(String dedicatedMasterType) { this.dedicatedMasterType = dedicatedMasterType; } /** ** The instance type for a dedicated master node. *
* * @return The instance type for a dedicated master node. * @see ESPartitionInstanceType */ public String getDedicatedMasterType() { return this.dedicatedMasterType; } /** ** The instance type for a dedicated master node. *
* * @param dedicatedMasterType * The instance type for a dedicated master node. * @return Returns a reference to this object so that method calls can be chained together. * @see ESPartitionInstanceType */ public ElasticsearchClusterConfig withDedicatedMasterType(String dedicatedMasterType) { setDedicatedMasterType(dedicatedMasterType); return this; } /** ** The instance type for a dedicated master node. *
* * @param dedicatedMasterType * The instance type for a dedicated master node. * @see ESPartitionInstanceType */ public void setDedicatedMasterType(ESPartitionInstanceType dedicatedMasterType) { withDedicatedMasterType(dedicatedMasterType); } /** ** The instance type for a dedicated master node. *
* * @param dedicatedMasterType * The instance type for a dedicated master node. * @return Returns a reference to this object so that method calls can be chained together. * @see ESPartitionInstanceType */ public ElasticsearchClusterConfig withDedicatedMasterType(ESPartitionInstanceType dedicatedMasterType) { this.dedicatedMasterType = dedicatedMasterType.toString(); return this; } /** ** Total number of dedicated master nodes, active and on standby, for the cluster. *
* * @param dedicatedMasterCount * Total number of dedicated master nodes, active and on standby, for the cluster. */ public void setDedicatedMasterCount(Integer dedicatedMasterCount) { this.dedicatedMasterCount = dedicatedMasterCount; } /** ** Total number of dedicated master nodes, active and on standby, for the cluster. *
* * @return Total number of dedicated master nodes, active and on standby, for the cluster. */ public Integer getDedicatedMasterCount() { return this.dedicatedMasterCount; } /** ** Total number of dedicated master nodes, active and on standby, for the cluster. *
* * @param dedicatedMasterCount * Total number of dedicated master nodes, active and on standby, for the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchClusterConfig withDedicatedMasterCount(Integer dedicatedMasterCount) { setDedicatedMasterCount(dedicatedMasterCount); return this; } /** ** True to enable warm storage. *
* * @param warmEnabled * True to enable warm storage. */ public void setWarmEnabled(Boolean warmEnabled) { this.warmEnabled = warmEnabled; } /** ** True to enable warm storage. *
* * @return True to enable warm storage. */ public Boolean getWarmEnabled() { return this.warmEnabled; } /** ** True to enable warm storage. *
* * @param warmEnabled * True to enable warm storage. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchClusterConfig withWarmEnabled(Boolean warmEnabled) { setWarmEnabled(warmEnabled); return this; } /** ** True to enable warm storage. *
* * @return True to enable warm storage. */ public Boolean isWarmEnabled() { return this.warmEnabled; } /** ** The instance type for the Elasticsearch cluster's warm nodes. *
* * @param warmType * The instance type for the Elasticsearch cluster's warm nodes. * @see ESWarmPartitionInstanceType */ public void setWarmType(String warmType) { this.warmType = warmType; } /** ** The instance type for the Elasticsearch cluster's warm nodes. *
* * @return The instance type for the Elasticsearch cluster's warm nodes. * @see ESWarmPartitionInstanceType */ public String getWarmType() { return this.warmType; } /** ** The instance type for the Elasticsearch cluster's warm nodes. *
* * @param warmType * The instance type for the Elasticsearch cluster's warm nodes. * @return Returns a reference to this object so that method calls can be chained together. * @see ESWarmPartitionInstanceType */ public ElasticsearchClusterConfig withWarmType(String warmType) { setWarmType(warmType); return this; } /** ** The instance type for the Elasticsearch cluster's warm nodes. *
* * @param warmType * The instance type for the Elasticsearch cluster's warm nodes. * @see ESWarmPartitionInstanceType */ public void setWarmType(ESWarmPartitionInstanceType warmType) { withWarmType(warmType); } /** ** The instance type for the Elasticsearch cluster's warm nodes. *
* * @param warmType * The instance type for the Elasticsearch cluster's warm nodes. * @return Returns a reference to this object so that method calls can be chained together. * @see ESWarmPartitionInstanceType */ public ElasticsearchClusterConfig withWarmType(ESWarmPartitionInstanceType warmType) { this.warmType = warmType.toString(); return this; } /** ** The number of warm nodes in the cluster. *
* * @param warmCount * The number of warm nodes in the cluster. */ public void setWarmCount(Integer warmCount) { this.warmCount = warmCount; } /** ** The number of warm nodes in the cluster. *
* * @return The number of warm nodes in the cluster. */ public Integer getWarmCount() { return this.warmCount; } /** ** The number of warm nodes in the cluster. *
* * @param warmCount * The number of warm nodes in the cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public ElasticsearchClusterConfig withWarmCount(Integer warmCount) { setWarmCount(warmCount); return this; } /** *
* Specifies the ColdStorageOptions
config for Elasticsearch Domain
*
ColdStorageOptions
config for Elasticsearch Domain
*/
public void setColdStorageOptions(ColdStorageOptions coldStorageOptions) {
this.coldStorageOptions = coldStorageOptions;
}
/**
*
* Specifies the ColdStorageOptions
config for Elasticsearch Domain
*
ColdStorageOptions
config for Elasticsearch Domain
*/
public ColdStorageOptions getColdStorageOptions() {
return this.coldStorageOptions;
}
/**
*
* Specifies the ColdStorageOptions
config for Elasticsearch Domain
*
ColdStorageOptions
config for Elasticsearch Domain
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ElasticsearchClusterConfig withColdStorageOptions(ColdStorageOptions coldStorageOptions) {
setColdStorageOptions(coldStorageOptions);
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 (getInstanceType() != null)
sb.append("InstanceType: ").append(getInstanceType()).append(",");
if (getInstanceCount() != null)
sb.append("InstanceCount: ").append(getInstanceCount()).append(",");
if (getDedicatedMasterEnabled() != null)
sb.append("DedicatedMasterEnabled: ").append(getDedicatedMasterEnabled()).append(",");
if (getZoneAwarenessEnabled() != null)
sb.append("ZoneAwarenessEnabled: ").append(getZoneAwarenessEnabled()).append(",");
if (getZoneAwarenessConfig() != null)
sb.append("ZoneAwarenessConfig: ").append(getZoneAwarenessConfig()).append(",");
if (getDedicatedMasterType() != null)
sb.append("DedicatedMasterType: ").append(getDedicatedMasterType()).append(",");
if (getDedicatedMasterCount() != null)
sb.append("DedicatedMasterCount: ").append(getDedicatedMasterCount()).append(",");
if (getWarmEnabled() != null)
sb.append("WarmEnabled: ").append(getWarmEnabled()).append(",");
if (getWarmType() != null)
sb.append("WarmType: ").append(getWarmType()).append(",");
if (getWarmCount() != null)
sb.append("WarmCount: ").append(getWarmCount()).append(",");
if (getColdStorageOptions() != null)
sb.append("ColdStorageOptions: ").append(getColdStorageOptions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ElasticsearchClusterConfig == false)
return false;
ElasticsearchClusterConfig other = (ElasticsearchClusterConfig) obj;
if (other.getInstanceType() == null ^ this.getInstanceType() == null)
return false;
if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false)
return false;
if (other.getInstanceCount() == null ^ this.getInstanceCount() == null)
return false;
if (other.getInstanceCount() != null && other.getInstanceCount().equals(this.getInstanceCount()) == false)
return false;
if (other.getDedicatedMasterEnabled() == null ^ this.getDedicatedMasterEnabled() == null)
return false;
if (other.getDedicatedMasterEnabled() != null && other.getDedicatedMasterEnabled().equals(this.getDedicatedMasterEnabled()) == false)
return false;
if (other.getZoneAwarenessEnabled() == null ^ this.getZoneAwarenessEnabled() == null)
return false;
if (other.getZoneAwarenessEnabled() != null && other.getZoneAwarenessEnabled().equals(this.getZoneAwarenessEnabled()) == false)
return false;
if (other.getZoneAwarenessConfig() == null ^ this.getZoneAwarenessConfig() == null)
return false;
if (other.getZoneAwarenessConfig() != null && other.getZoneAwarenessConfig().equals(this.getZoneAwarenessConfig()) == false)
return false;
if (other.getDedicatedMasterType() == null ^ this.getDedicatedMasterType() == null)
return false;
if (other.getDedicatedMasterType() != null && other.getDedicatedMasterType().equals(this.getDedicatedMasterType()) == false)
return false;
if (other.getDedicatedMasterCount() == null ^ this.getDedicatedMasterCount() == null)
return false;
if (other.getDedicatedMasterCount() != null && other.getDedicatedMasterCount().equals(this.getDedicatedMasterCount()) == false)
return false;
if (other.getWarmEnabled() == null ^ this.getWarmEnabled() == null)
return false;
if (other.getWarmEnabled() != null && other.getWarmEnabled().equals(this.getWarmEnabled()) == false)
return false;
if (other.getWarmType() == null ^ this.getWarmType() == null)
return false;
if (other.getWarmType() != null && other.getWarmType().equals(this.getWarmType()) == false)
return false;
if (other.getWarmCount() == null ^ this.getWarmCount() == null)
return false;
if (other.getWarmCount() != null && other.getWarmCount().equals(this.getWarmCount()) == false)
return false;
if (other.getColdStorageOptions() == null ^ this.getColdStorageOptions() == null)
return false;
if (other.getColdStorageOptions() != null && other.getColdStorageOptions().equals(this.getColdStorageOptions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode());
hashCode = prime * hashCode + ((getInstanceCount() == null) ? 0 : getInstanceCount().hashCode());
hashCode = prime * hashCode + ((getDedicatedMasterEnabled() == null) ? 0 : getDedicatedMasterEnabled().hashCode());
hashCode = prime * hashCode + ((getZoneAwarenessEnabled() == null) ? 0 : getZoneAwarenessEnabled().hashCode());
hashCode = prime * hashCode + ((getZoneAwarenessConfig() == null) ? 0 : getZoneAwarenessConfig().hashCode());
hashCode = prime * hashCode + ((getDedicatedMasterType() == null) ? 0 : getDedicatedMasterType().hashCode());
hashCode = prime * hashCode + ((getDedicatedMasterCount() == null) ? 0 : getDedicatedMasterCount().hashCode());
hashCode = prime * hashCode + ((getWarmEnabled() == null) ? 0 : getWarmEnabled().hashCode());
hashCode = prime * hashCode + ((getWarmType() == null) ? 0 : getWarmType().hashCode());
hashCode = prime * hashCode + ((getWarmCount() == null) ? 0 : getWarmCount().hashCode());
hashCode = prime * hashCode + ((getColdStorageOptions() == null) ? 0 : getColdStorageOptions().hashCode());
return hashCode;
}
@Override
public ElasticsearchClusterConfig clone() {
try {
return (ElasticsearchClusterConfig) 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.ElasticsearchClusterConfigMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}