@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getConstraints() == null) ? 0 : getConstraints().hashCode()); hashCode = prime * hashCode + ((getRules() == null) ? 0 : getRules().hashCode()); return hashCode; }
/** * <p> * The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not * cause an instance group to grow above or below these limits. * </p> * * @param constraints * The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will * not cause an instance group to grow above or below these limits. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingPolicyDescription withConstraints(ScalingConstraints constraints) { setConstraints(constraints); return this; }
/** * <p> * The scale-in and scale-out rules that comprise the automatic scaling policy. * </p> * * @param rules * The scale-in and scale-out rules that comprise the automatic scaling policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingPolicyDescription withRules(java.util.Collection<ScalingRule> rules) { setRules(rules); return this; }
public AutoScalingPolicyDescription unmarshall(JsonUnmarshallerContext context) throws Exception { AutoScalingPolicyDescription autoScalingPolicyDescription = new AutoScalingPolicyDescription(); if (context.testExpression("Status", targetDepth)) { context.nextToken(); autoScalingPolicyDescription.setStatus(AutoScalingPolicyStatusJsonUnmarshaller.getInstance().unmarshall(context)); autoScalingPolicyDescription.setConstraints(ScalingConstraintsJsonUnmarshaller.getInstance().unmarshall(context)); autoScalingPolicyDescription.setRules(new ListUnmarshaller<ScalingRule>(ScalingRuleJsonUnmarshaller.getInstance()).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterId() == null) ? 0 : getClusterId().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupId() == null) ? 0 : getInstanceGroupId().hashCode()); hashCode = prime * hashCode + ((getAutoScalingPolicy() == null) ? 0 : getAutoScalingPolicy().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutAutoScalingPolicyResult == false) return false; PutAutoScalingPolicyResult other = (PutAutoScalingPolicyResult) obj; if (other.getClusterId() == null ^ this.getClusterId() == null) return false; if (other.getClusterId() != null && other.getClusterId().equals(this.getClusterId()) == false) return false; if (other.getInstanceGroupId() == null ^ this.getInstanceGroupId() == null) return false; if (other.getInstanceGroupId() != null && other.getInstanceGroupId().equals(this.getInstanceGroupId()) == false) return false; if (other.getAutoScalingPolicy() == null ^ this.getAutoScalingPolicy() == null) return false; if (other.getAutoScalingPolicy() != null && other.getAutoScalingPolicy().equals(this.getAutoScalingPolicy()) == false) return false; return true; }
/** * <p> * The status of an automatic scaling policy. * </p> * * @param status * The status of an automatic scaling policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingPolicyDescription withStatus(AutoScalingPolicyStatus status) { setStatus(status); return this; }
public AutoScalingPolicyDescription unmarshall(JsonUnmarshallerContext context) throws Exception { AutoScalingPolicyDescription autoScalingPolicyDescription = new AutoScalingPolicyDescription(); if (context.testExpression("Status", targetDepth)) { context.nextToken(); autoScalingPolicyDescription.setStatus(AutoScalingPolicyStatusJsonUnmarshaller.getInstance().unmarshall(context)); autoScalingPolicyDescription.setConstraints(ScalingConstraintsJsonUnmarshaller.getInstance().unmarshall(context)); autoScalingPolicyDescription.setRules(new ListUnmarshaller<ScalingRule>(ScalingRuleJsonUnmarshaller.getInstance()).unmarshall(context));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getMarket() == null) ? 0 : getMarket().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupType() == null) ? 0 : getInstanceGroupType().hashCode()); hashCode = prime * hashCode + ((getBidPrice() == null) ? 0 : getBidPrice().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getRequestedInstanceCount() == null) ? 0 : getRequestedInstanceCount().hashCode()); hashCode = prime * hashCode + ((getRunningInstanceCount() == null) ? 0 : getRunningInstanceCount().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getEbsBlockDevices() == null) ? 0 : getEbsBlockDevices().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); hashCode = prime * hashCode + ((getShrinkPolicy() == null) ? 0 : getShrinkPolicy().hashCode()); hashCode = prime * hashCode + ((getAutoScalingPolicy() == null) ? 0 : getAutoScalingPolicy().hashCode()); return hashCode; }
if (other.getAutoScalingPolicy() == null ^ this.getAutoScalingPolicy() == null) return false; if (other.getAutoScalingPolicy() != null && other.getAutoScalingPolicy().equals(this.getAutoScalingPolicy()) == false) return false; return true;
/** * <p> * The status of an automatic scaling policy. * </p> * * @param status * The status of an automatic scaling policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingPolicyDescription withStatus(AutoScalingPolicyStatus status) { setStatus(status); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AutoScalingPolicyDescription == false) return false; AutoScalingPolicyDescription other = (AutoScalingPolicyDescription) obj; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getConstraints() == null ^ this.getConstraints() == null) return false; if (other.getConstraints() != null && other.getConstraints().equals(this.getConstraints()) == false) return false; if (other.getRules() == null ^ this.getRules() == null) return false; if (other.getRules() != null && other.getRules().equals(this.getRules()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterId() == null) ? 0 : getClusterId().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupId() == null) ? 0 : getInstanceGroupId().hashCode()); hashCode = prime * hashCode + ((getAutoScalingPolicy() == null) ? 0 : getAutoScalingPolicy().hashCode()); return hashCode; }
/** * <p> * The scale-in and scale-out rules that comprise the automatic scaling policy. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setRules(java.util.Collection)} or {@link #withRules(java.util.Collection)} if you want to override the * existing values. * </p> * * @param rules * The scale-in and scale-out rules that comprise the automatic scaling policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingPolicyDescription withRules(ScalingRule... rules) { if (this.rules == null) { setRules(new com.amazonaws.internal.SdkInternalList<ScalingRule>(rules.length)); } for (ScalingRule ele : rules) { this.rules.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutAutoScalingPolicyResult == false) return false; PutAutoScalingPolicyResult other = (PutAutoScalingPolicyResult) obj; if (other.getClusterId() == null ^ this.getClusterId() == null) return false; if (other.getClusterId() != null && other.getClusterId().equals(this.getClusterId()) == false) return false; if (other.getInstanceGroupId() == null ^ this.getInstanceGroupId() == null) return false; if (other.getInstanceGroupId() != null && other.getInstanceGroupId().equals(this.getInstanceGroupId()) == false) return false; if (other.getAutoScalingPolicy() == null ^ this.getAutoScalingPolicy() == null) return false; if (other.getAutoScalingPolicy() != null && other.getAutoScalingPolicy().equals(this.getAutoScalingPolicy()) == false) return false; return true; }
/** * <p> * The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will not * cause an instance group to grow above or below these limits. * </p> * * @param constraints * The upper and lower EC2 instance limits for an automatic scaling policy. Automatic scaling activity will * not cause an instance group to grow above or below these limits. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingPolicyDescription withConstraints(ScalingConstraints constraints) { setConstraints(constraints); 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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getConstraints() != null) sb.append("Constraints: ").append(getConstraints()).append(","); if (getRules() != null) sb.append("Rules: ").append(getRules()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getMarket() == null) ? 0 : getMarket().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupType() == null) ? 0 : getInstanceGroupType().hashCode()); hashCode = prime * hashCode + ((getBidPrice() == null) ? 0 : getBidPrice().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getRequestedInstanceCount() == null) ? 0 : getRequestedInstanceCount().hashCode()); hashCode = prime * hashCode + ((getRunningInstanceCount() == null) ? 0 : getRunningInstanceCount().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getEbsBlockDevices() == null) ? 0 : getEbsBlockDevices().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); hashCode = prime * hashCode + ((getShrinkPolicy() == null) ? 0 : getShrinkPolicy().hashCode()); hashCode = prime * hashCode + ((getAutoScalingPolicy() == null) ? 0 : getAutoScalingPolicy().hashCode()); return hashCode; }
/** * <p> * The scale-in and scale-out rules that comprise the automatic scaling policy. * </p> * * @param rules * The scale-in and scale-out rules that comprise the automatic scaling policy. * @return Returns a reference to this object so that method calls can be chained together. */ public AutoScalingPolicyDescription withRules(java.util.Collection<ScalingRule> rules) { setRules(rules); return this; }
if (other.getAutoScalingPolicy() == null ^ this.getAutoScalingPolicy() == null) return false; if (other.getAutoScalingPolicy() != null && other.getAutoScalingPolicy().equals(this.getAutoScalingPolicy()) == false) return false; return true;