shiver.me.timbers.aws.applicationautoscaling.ScalingPolicyPredefinedMetricSpecification Maven / Gradle / Ivy
Show all versions of smt-cloudformation-objects Show documentation
package shiver.me.timbers.aws.applicationautoscaling;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import shiver.me.timbers.aws.Property;
/**
* ScalingPolicyPredefinedMetricSpecification
*
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html
*
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonPropertyOrder({
"PredefinedMetricType",
"ResourceLabel"
})
public class ScalingPolicyPredefinedMetricSpecification implements Property
{
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-predefinedmetrictype
*
*/
@JsonProperty("PredefinedMetricType")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-predefinedmetrictype")
private CharSequence predefinedMetricType;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-resourcelabel
*
*/
@JsonProperty("ResourceLabel")
@JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-resourcelabel")
private CharSequence resourceLabel;
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-predefinedmetrictype
*
*/
@JsonIgnore
public CharSequence getPredefinedMetricType() {
return predefinedMetricType;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-predefinedmetrictype
*
*/
@JsonIgnore
public void setPredefinedMetricType(CharSequence predefinedMetricType) {
this.predefinedMetricType = predefinedMetricType;
}
public ScalingPolicyPredefinedMetricSpecification withPredefinedMetricType(CharSequence predefinedMetricType) {
this.predefinedMetricType = predefinedMetricType;
return this;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-resourcelabel
*
*/
@JsonIgnore
public CharSequence getResourceLabel() {
return resourceLabel;
}
/**
* http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-predefinedmetricspecification.html#cfn-applicationautoscaling-scalingpolicy-predefinedmetricspecification-resourcelabel
*
*/
@JsonIgnore
public void setResourceLabel(CharSequence resourceLabel) {
this.resourceLabel = resourceLabel;
}
public ScalingPolicyPredefinedMetricSpecification withResourceLabel(CharSequence resourceLabel) {
this.resourceLabel = resourceLabel;
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).append("predefinedMetricType", predefinedMetricType).append("resourceLabel", resourceLabel).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(predefinedMetricType).append(resourceLabel).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ScalingPolicyPredefinedMetricSpecification) == false) {
return false;
}
ScalingPolicyPredefinedMetricSpecification rhs = ((ScalingPolicyPredefinedMetricSpecification) other);
return new EqualsBuilder().append(predefinedMetricType, rhs.predefinedMetricType).append(resourceLabel, rhs.resourceLabel).isEquals();
}
}