@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getDesiredCapacity() == null) ? 0 : getDesiredCapacity().hashCode()); hashCode = prime * hashCode + ((getHonorCooldown() == null) ? 0 : getHonorCooldown().hashCode()); return hashCode; }
/** * 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 (getAutoScalingGroupName() != null) sb.append("AutoScalingGroupName: ").append(getAutoScalingGroupName()).append(","); if (getDesiredCapacity() != null) sb.append("DesiredCapacity: ").append(getDesiredCapacity()).append(","); if (getHonorCooldown() != null) sb.append("HonorCooldown: ").append(getHonorCooldown()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SetDesiredCapacityRequest == false) return false; SetDesiredCapacityRequest other = (SetDesiredCapacityRequest) obj; if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false; if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false; if (other.getDesiredCapacity() == null ^ this.getDesiredCapacity() == null) return false; if (other.getDesiredCapacity() != null && other.getDesiredCapacity().equals(this.getDesiredCapacity()) == false) return false; if (other.getHonorCooldown() == null ^ this.getHonorCooldown() == null) return false; if (other.getHonorCooldown() != null && other.getHonorCooldown().equals(this.getHonorCooldown()) == false) return false; return true; }
public Request<SetDesiredCapacityRequest> marshall(SetDesiredCapacityRequest setDesiredCapacityRequest) { if (setDesiredCapacityRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<SetDesiredCapacityRequest> request = new DefaultRequest<SetDesiredCapacityRequest>(setDesiredCapacityRequest, "AmazonAutoScaling"); request.addParameter("Action", "SetDesiredCapacity"); request.addParameter("Version", "2011-01-01"); request.setHttpMethod(HttpMethodName.POST); if (setDesiredCapacityRequest.getAutoScalingGroupName() != null) { request.addParameter("AutoScalingGroupName", StringUtils.fromString(setDesiredCapacityRequest.getAutoScalingGroupName())); } if (setDesiredCapacityRequest.getDesiredCapacity() != null) { request.addParameter("DesiredCapacity", StringUtils.fromInteger(setDesiredCapacityRequest.getDesiredCapacity())); } if (setDesiredCapacityRequest.getHonorCooldown() != null) { request.addParameter("HonorCooldown", StringUtils.fromBoolean(setDesiredCapacityRequest.getHonorCooldown())); } return request; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAutoScalingGroupName() == null) ? 0 : getAutoScalingGroupName().hashCode()); hashCode = prime * hashCode + ((getDesiredCapacity() == null) ? 0 : getDesiredCapacity().hashCode()); hashCode = prime * hashCode + ((getHonorCooldown() == null) ? 0 : getHonorCooldown().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 (getAutoScalingGroupName() != null) sb.append("AutoScalingGroupName: " + getAutoScalingGroupName() + ","); if (getDesiredCapacity() != null) sb.append("DesiredCapacity: " + getDesiredCapacity() + ","); if (getHonorCooldown() != null) sb.append("HonorCooldown: " + getHonorCooldown()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SetDesiredCapacityRequest == false) return false; SetDesiredCapacityRequest other = (SetDesiredCapacityRequest) obj; if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false; if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false; if (other.getDesiredCapacity() == null ^ this.getDesiredCapacity() == null) return false; if (other.getDesiredCapacity() != null && other.getDesiredCapacity().equals(this.getDesiredCapacity()) == false) return false; if (other.getHonorCooldown() == null ^ this.getHonorCooldown() == null) return false; if (other.getHonorCooldown() != null && other.getHonorCooldown().equals(this.getHonorCooldown()) == false) return false; return true; } }
request.addParameter(prefix, StringUtils.fromString(autoScalingGroupName)); if (setDesiredCapacityRequest.getDesiredCapacity() != null) { prefix = "DesiredCapacity"; Integer desiredCapacity = setDesiredCapacityRequest.getDesiredCapacity(); request.addParameter(prefix, StringUtils.fromInteger(desiredCapacity));