com.amazonaws.services.elasticsearch.model.AdditionalLimit Maven / Gradle / Ivy
Show all versions of aws-java-sdk-elasticsearch Show documentation
/*
* 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;
/**
*
* List of limits that are specific to a given InstanceType and for each of it's InstanceRole
.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AdditionalLimit implements Serializable, Cloneable, StructuredPojo {
/**
*
* Name of Additional Limit is specific to a given InstanceType and for each of it's
* InstanceRole
etc.
* Attributes and their details:
*
* - MaximumNumberOfDataNodesSupported
This attribute will be present in Master node only to specify how much
* data nodes upto which given ESPartitionInstanceType
can support as master node.
* - MaximumNumberOfDataNodesWithoutMasterNode
This attribute will be present in Data node only to specify
* how much data nodes of given ESPartitionInstanceType
upto which you don't need any master
* nodes to govern them.
*
*
*/
private String limitName;
/**
*
* Value for given AdditionalLimit$LimitName
.
*
*/
private java.util.List limitValues;
/**
*
* Name of Additional Limit is specific to a given InstanceType and for each of it's
* InstanceRole
etc.
* Attributes and their details:
*
* - MaximumNumberOfDataNodesSupported
This attribute will be present in Master node only to specify how much
* data nodes upto which given ESPartitionInstanceType
can support as master node.
* - MaximumNumberOfDataNodesWithoutMasterNode
This attribute will be present in Data node only to specify
* how much data nodes of given ESPartitionInstanceType
upto which you don't need any master
* nodes to govern them.
*
*
*
* @param limitName
* Name of Additional Limit is specific to a given InstanceType and for each of it's
* InstanceRole
etc.
* Attributes and their details:
*
* - MaximumNumberOfDataNodesSupported
This attribute will be present in Master node only to specify
* how much data nodes upto which given ESPartitionInstanceType
can support as master
* node.
* - MaximumNumberOfDataNodesWithoutMasterNode
This attribute will be present in Data node only to
* specify how much data nodes of given ESPartitionInstanceType
upto which you don't
* need any master nodes to govern them.
*
*/
public void setLimitName(String limitName) {
this.limitName = limitName;
}
/**
*
* Name of Additional Limit is specific to a given InstanceType and for each of it's
* InstanceRole
etc.
* Attributes and their details:
*
* - MaximumNumberOfDataNodesSupported
This attribute will be present in Master node only to specify how much
* data nodes upto which given ESPartitionInstanceType
can support as master node.
* - MaximumNumberOfDataNodesWithoutMasterNode
This attribute will be present in Data node only to specify
* how much data nodes of given ESPartitionInstanceType
upto which you don't need any master
* nodes to govern them.
*
*
*
* @return Name of Additional Limit is specific to a given InstanceType and for each of it's
* InstanceRole
etc.
* Attributes and their details:
*
* - MaximumNumberOfDataNodesSupported
This attribute will be present in Master node only to specify
* how much data nodes upto which given ESPartitionInstanceType
can support as master
* node.
* - MaximumNumberOfDataNodesWithoutMasterNode
This attribute will be present in Data node only to
* specify how much data nodes of given ESPartitionInstanceType
upto which you don't
* need any master nodes to govern them.
*
*/
public String getLimitName() {
return this.limitName;
}
/**
*
* Name of Additional Limit is specific to a given InstanceType and for each of it's
* InstanceRole
etc.
* Attributes and their details:
*
* - MaximumNumberOfDataNodesSupported
This attribute will be present in Master node only to specify how much
* data nodes upto which given ESPartitionInstanceType
can support as master node.
* - MaximumNumberOfDataNodesWithoutMasterNode
This attribute will be present in Data node only to specify
* how much data nodes of given ESPartitionInstanceType
upto which you don't need any master
* nodes to govern them.
*
*
*
* @param limitName
* Name of Additional Limit is specific to a given InstanceType and for each of it's
* InstanceRole
etc.
* Attributes and their details:
*
* - MaximumNumberOfDataNodesSupported
This attribute will be present in Master node only to specify
* how much data nodes upto which given ESPartitionInstanceType
can support as master
* node.
* - MaximumNumberOfDataNodesWithoutMasterNode
This attribute will be present in Data node only to
* specify how much data nodes of given ESPartitionInstanceType
upto which you don't
* need any master nodes to govern them.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalLimit withLimitName(String limitName) {
setLimitName(limitName);
return this;
}
/**
*
* Value for given AdditionalLimit$LimitName
.
*
*
* @return Value for given AdditionalLimit$LimitName
.
*/
public java.util.List getLimitValues() {
return limitValues;
}
/**
*
* Value for given AdditionalLimit$LimitName
.
*
*
* @param limitValues
* Value for given AdditionalLimit$LimitName
.
*/
public void setLimitValues(java.util.Collection limitValues) {
if (limitValues == null) {
this.limitValues = null;
return;
}
this.limitValues = new java.util.ArrayList(limitValues);
}
/**
*
* Value for given AdditionalLimit$LimitName
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLimitValues(java.util.Collection)} or {@link #withLimitValues(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param limitValues
* Value for given AdditionalLimit$LimitName
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalLimit withLimitValues(String... limitValues) {
if (this.limitValues == null) {
setLimitValues(new java.util.ArrayList(limitValues.length));
}
for (String ele : limitValues) {
this.limitValues.add(ele);
}
return this;
}
/**
*
* Value for given AdditionalLimit$LimitName
.
*
*
* @param limitValues
* Value for given AdditionalLimit$LimitName
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AdditionalLimit withLimitValues(java.util.Collection limitValues) {
setLimitValues(limitValues);
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 (getLimitName() != null)
sb.append("LimitName: ").append(getLimitName()).append(",");
if (getLimitValues() != null)
sb.append("LimitValues: ").append(getLimitValues());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AdditionalLimit == false)
return false;
AdditionalLimit other = (AdditionalLimit) obj;
if (other.getLimitName() == null ^ this.getLimitName() == null)
return false;
if (other.getLimitName() != null && other.getLimitName().equals(this.getLimitName()) == false)
return false;
if (other.getLimitValues() == null ^ this.getLimitValues() == null)
return false;
if (other.getLimitValues() != null && other.getLimitValues().equals(this.getLimitValues()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getLimitName() == null) ? 0 : getLimitName().hashCode());
hashCode = prime * hashCode + ((getLimitValues() == null) ? 0 : getLimitValues().hashCode());
return hashCode;
}
@Override
public AdditionalLimit clone() {
try {
return (AdditionalLimit) 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.AdditionalLimitMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}