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

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

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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;

/**
 * 

* Specifies the configuration for the domain cluster, such as the type and * number of instances. *

*/ public class ElasticsearchClusterConfig implements Serializable, Cloneable { /** *

* The instance type for an Elasticsearch cluster. *

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

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

* The instance type for an Elasticsearch cluster. *

* * @param instanceType * The instance type for an Elasticsearch cluster. * @see ESPartitionInstanceType */ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** *

* The instance type for an Elasticsearch cluster. *

* * @return The instance type for an Elasticsearch cluster. * @see ESPartitionInstanceType */ public String getInstanceType() { return this.instanceType; } /** *

* The instance type for an Elasticsearch cluster. *

* * @param instanceType * The instance type for an Elasticsearch cluster. * @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. *

* * @param instanceType * The instance type for an Elasticsearch cluster. * @see ESPartitionInstanceType */ public void setInstanceType(ESPartitionInstanceType instanceType) { this.instanceType = instanceType.toString(); } /** *

* The instance type for an Elasticsearch cluster. *

* * @param instanceType * The instance type for an Elasticsearch cluster. * @return Returns a reference to this object so that method calls can be * chained together. * @see ESPartitionInstanceType */ public ElasticsearchClusterConfig withInstanceType( ESPartitionInstanceType instanceType) { setInstanceType(instanceType); 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; } /** *

* 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) { this.dedicatedMasterType = dedicatedMasterType.toString(); } /** *

* 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) { setDedicatedMasterType(dedicatedMasterType); 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; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @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: " + getInstanceType() + ","); if (getInstanceCount() != null) sb.append("InstanceCount: " + getInstanceCount() + ","); if (getDedicatedMasterEnabled() != null) sb.append("DedicatedMasterEnabled: " + getDedicatedMasterEnabled() + ","); if (getZoneAwarenessEnabled() != null) sb.append("ZoneAwarenessEnabled: " + getZoneAwarenessEnabled() + ","); if (getDedicatedMasterType() != null) sb.append("DedicatedMasterType: " + getDedicatedMasterType() + ","); if (getDedicatedMasterCount() != null) sb.append("DedicatedMasterCount: " + getDedicatedMasterCount()); 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.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; 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 + ((getDedicatedMasterType() == null) ? 0 : getDedicatedMasterType().hashCode()); hashCode = prime * hashCode + ((getDedicatedMasterCount() == null) ? 0 : getDedicatedMasterCount().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); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy