@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPredefinedMetricSpecification() == null) ? 0 : getPredefinedMetricSpecification().hashCode()); hashCode = prime * hashCode + ((getCustomizedMetricSpecification() == null) ? 0 : getCustomizedMetricSpecification().hashCode()); hashCode = prime * hashCode + ((getTargetValue() == null) ? 0 : getTargetValue().hashCode()); hashCode = prime * hashCode + ((getDisableScaleIn() == null) ? 0 : getDisableScaleIn().hashCode()); return hashCode; }
/** * <p> * A customized metric. * </p> * * @param customizedMetricSpecification * A customized metric. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetTrackingConfiguration withCustomizedMetricSpecification(CustomizedMetricSpecification customizedMetricSpecification) { setCustomizedMetricSpecification(customizedMetricSpecification); return this; }
/** * <p> * Indicates whether scaling in by the target tracking policy is disabled. If scaling in is disabled, the target * tracking policy doesn't remove instances from the Auto Scaling group. Otherwise, the target tracking policy can * remove instances from the Auto Scaling group. The default is disabled. * </p> * * @param disableScaleIn * Indicates whether scaling in by the target tracking policy is disabled. If scaling in is disabled, the * target tracking policy doesn't remove instances from the Auto Scaling group. Otherwise, the target * tracking policy can remove instances from the Auto Scaling group. The default is disabled. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetTrackingConfiguration withDisableScaleIn(Boolean disableScaleIn) { setDisableScaleIn(disableScaleIn); return this; }
public TargetTrackingConfiguration unmarshall(StaxUnmarshallerContext context) throws Exception { TargetTrackingConfiguration targetTrackingConfiguration = new TargetTrackingConfiguration(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; targetTrackingConfiguration.setPredefinedMetricSpecification(PredefinedMetricSpecificationStaxUnmarshaller.getInstance() .unmarshall(context)); continue; targetTrackingConfiguration.setCustomizedMetricSpecification(CustomizedMetricSpecificationStaxUnmarshaller.getInstance() .unmarshall(context)); continue; targetTrackingConfiguration.setTargetValue(DoubleStaxUnmarshaller.getInstance().unmarshall(context)); continue; targetTrackingConfiguration.setDisableScaleIn(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyType() == null) ? 0 : getPolicyType().hashCode()); hashCode = prime * hashCode + ((getAdjustmentType() == null) ? 0 : getAdjustmentType().hashCode()); hashCode = prime * hashCode + ((getMinAdjustmentStep() == null) ? 0 : getMinAdjustmentStep().hashCode()); hashCode = prime * hashCode + ((getMinAdjustmentMagnitude() == null) ? 0 : getMinAdjustmentMagnitude().hashCode()); hashCode = prime * hashCode + ((getScalingAdjustment() == null) ? 0 : getScalingAdjustment().hashCode()); hashCode = prime * hashCode + ((getCooldown() == null) ? 0 : getCooldown().hashCode()); hashCode = prime * hashCode + ((getMetricAggregationType() == null) ? 0 : getMetricAggregationType().hashCode()); hashCode = prime * hashCode + ((getStepAdjustments() == null) ? 0 : getStepAdjustments().hashCode()); hashCode = prime * hashCode + ((getEstimatedInstanceWarmup() == null) ? 0 : getEstimatedInstanceWarmup().hashCode()); hashCode = prime * hashCode + ((getTargetTrackingConfiguration() == null) ? 0 : getTargetTrackingConfiguration().hashCode()); return hashCode; }
if (other.getTargetTrackingConfiguration() == null ^ this.getTargetTrackingConfiguration() == null) return false; if (other.getTargetTrackingConfiguration() != null && other.getTargetTrackingConfiguration().equals(this.getTargetTrackingConfiguration()) == false) return false; return true;
/** * <p> * A predefined metric. You can specify either a predefined metric or a customized metric. * </p> * * @param predefinedMetricSpecification * A predefined metric. You can specify either a predefined metric or a customized metric. * @return Returns a reference to this object so that method calls can be chained together. */ public TargetTrackingConfiguration withPredefinedMetricSpecification(PredefinedMetricSpecification predefinedMetricSpecification) { setPredefinedMetricSpecification(predefinedMetricSpecification); return this; }
public TargetTrackingConfiguration unmarshall(StaxUnmarshallerContext context) throws Exception { TargetTrackingConfiguration targetTrackingConfiguration = new TargetTrackingConfiguration(); if (context.testExpression("PredefinedMetricSpecification", targetDepth)) { targetTrackingConfiguration .setPredefinedMetricSpecification(PredefinedMetricSpecificationStaxUnmarshaller .getInstance().unmarshall(context)); continue; .setCustomizedMetricSpecification(CustomizedMetricSpecificationStaxUnmarshaller .getInstance().unmarshall(context)); continue; targetTrackingConfiguration.setTargetValue(DoubleStaxUnmarshaller.getInstance() .unmarshall(context)); continue; targetTrackingConfiguration.setDisableScaleIn(BooleanStaxUnmarshaller .getInstance().unmarshall(context)); continue;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getPolicyName() == null) ? 0 : getPolicyName().hashCode()); hashCode = prime * hashCode + ((getPolicyARN() == null) ? 0 : getPolicyARN().hashCode()); hashCode = prime * hashCode + ((getPolicyType() == null) ? 0 : getPolicyType().hashCode()); hashCode = prime * hashCode + ((getAdjustmentType() == null) ? 0 : getAdjustmentType().hashCode()); hashCode = prime * hashCode + ((getMinAdjustmentStep() == null) ? 0 : getMinAdjustmentStep().hashCode()); hashCode = prime * hashCode + ((getMinAdjustmentMagnitude() == null) ? 0 : getMinAdjustmentMagnitude().hashCode()); hashCode = prime * hashCode + ((getScalingAdjustment() == null) ? 0 : getScalingAdjustment().hashCode()); hashCode = prime * hashCode + ((getCooldown() == null) ? 0 : getCooldown().hashCode()); hashCode = prime * hashCode + ((getStepAdjustments() == null) ? 0 : getStepAdjustments().hashCode()); hashCode = prime * hashCode + ((getMetricAggregationType() == null) ? 0 : getMetricAggregationType().hashCode()); hashCode = prime * hashCode + ((getEstimatedInstanceWarmup() == null) ? 0 : getEstimatedInstanceWarmup().hashCode()); hashCode = prime * hashCode + ((getAlarms() == null) ? 0 : getAlarms().hashCode()); hashCode = prime * hashCode + ((getTargetTrackingConfiguration() == null) ? 0 : getTargetTrackingConfiguration().hashCode()); return hashCode; }
if (other.getTargetTrackingConfiguration() == null ^ this.getTargetTrackingConfiguration() == null) return false; if (other.getTargetTrackingConfiguration() != null && other.getTargetTrackingConfiguration().equals(this.getTargetTrackingConfiguration()) == false) return false; return true;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TargetTrackingConfiguration == false) return false; TargetTrackingConfiguration other = (TargetTrackingConfiguration) obj; if (other.getPredefinedMetricSpecification() == null ^ this.getPredefinedMetricSpecification() == null) return false; if (other.getPredefinedMetricSpecification() != null && other.getPredefinedMetricSpecification().equals(this.getPredefinedMetricSpecification()) == false) return false; if (other.getCustomizedMetricSpecification() == null ^ this.getCustomizedMetricSpecification() == null) return false; if (other.getCustomizedMetricSpecification() != null && other.getCustomizedMetricSpecification().equals(this.getCustomizedMetricSpecification()) == false) return false; if (other.getTargetValue() == null ^ this.getTargetValue() == null) return false; if (other.getTargetValue() != null && other.getTargetValue().equals(this.getTargetValue()) == false) return false; if (other.getDisableScaleIn() == null ^ this.getDisableScaleIn() == null) return false; if (other.getDisableScaleIn() != null && other.getDisableScaleIn().equals(this.getDisableScaleIn()) == false) return false; return true; }
: getTargetTrackingConfiguration().hashCode()); return hashCode;
return false; if (other.getTargetTrackingConfiguration() != null && other.getTargetTrackingConfiguration().equals( this.getTargetTrackingConfiguration()) == false) return false;
/** * 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 (getPredefinedMetricSpecification() != null) sb.append("PredefinedMetricSpecification: ").append(getPredefinedMetricSpecification()).append(","); if (getCustomizedMetricSpecification() != null) sb.append("CustomizedMetricSpecification: ").append(getCustomizedMetricSpecification()).append(","); if (getTargetValue() != null) sb.append("TargetValue: ").append(getTargetValue()).append(","); if (getDisableScaleIn() != null) sb.append("DisableScaleIn: ").append(getDisableScaleIn()); sb.append("}"); return sb.toString(); }
: getTargetTrackingConfiguration().hashCode()); return hashCode;
return false; if (other.getTargetTrackingConfiguration() != null && other.getTargetTrackingConfiguration().equals( this.getTargetTrackingConfiguration()) == false) return false;
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPredefinedMetricSpecification() == null) ? 0 : getPredefinedMetricSpecification().hashCode()); hashCode = prime * hashCode + ((getCustomizedMetricSpecification() == null) ? 0 : getCustomizedMetricSpecification().hashCode()); hashCode = prime * hashCode + ((getTargetValue() == null) ? 0 : getTargetValue().hashCode()); hashCode = prime * hashCode + ((getDisableScaleIn() == null) ? 0 : getDisableScaleIn().hashCode()); return hashCode; }
/** * 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 (getPredefinedMetricSpecification() != null) sb.append("PredefinedMetricSpecification: " + getPredefinedMetricSpecification() + ","); if (getCustomizedMetricSpecification() != null) sb.append("CustomizedMetricSpecification: " + getCustomizedMetricSpecification() + ","); if (getTargetValue() != null) sb.append("TargetValue: " + getTargetValue() + ","); if (getDisableScaleIn() != null) sb.append("DisableScaleIn: " + getDisableScaleIn()); sb.append("}"); return sb.toString(); }
TargetTrackingConfiguration other = (TargetTrackingConfiguration) obj; if (other.getPredefinedMetricSpecification() == null ^ this.getPredefinedMetricSpecification() == null) return false; if (other.getPredefinedMetricSpecification() != null && other.getPredefinedMetricSpecification().equals( this.getPredefinedMetricSpecification()) == false) return false; if (other.getCustomizedMetricSpecification() == null ^ this.getCustomizedMetricSpecification() == null) return false; if (other.getCustomizedMetricSpecification() != null && other.getCustomizedMetricSpecification().equals( this.getCustomizedMetricSpecification()) == false) return false; if (other.getTargetValue() == null ^ this.getTargetValue() == null) return false; if (other.getTargetValue() != null && other.getTargetValue().equals(this.getTargetValue()) == false) return false; if (other.getDisableScaleIn() == null ^ this.getDisableScaleIn() == null) return false; if (other.getDisableScaleIn() != null && other.getDisableScaleIn().equals(this.getDisableScaleIn()) == false) return false; return true;
PredefinedMetricSpecification predefinedMetricSpecification = targetTrackingConfiguration.getPredefinedMetricSpecification(); if (predefinedMetricSpecification != null) { CustomizedMetricSpecification customizedMetricSpecification = targetTrackingConfiguration.getCustomizedMetricSpecification(); if (customizedMetricSpecification != null) { if (targetTrackingConfiguration.getTargetValue() != null) { request.addParameter("TargetTrackingConfiguration.TargetValue", StringUtils.fromDouble(targetTrackingConfiguration.getTargetValue())); if (targetTrackingConfiguration.getDisableScaleIn() != null) { request.addParameter("TargetTrackingConfiguration.DisableScaleIn", StringUtils.fromBoolean(targetTrackingConfiguration.getDisableScaleIn()));