@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 + ((getHonorCooldown() == null) ? 0 : getHonorCooldown().hashCode()); hashCode = prime * hashCode + ((getMetricValue() == null) ? 0 : getMetricValue().hashCode()); hashCode = prime * hashCode + ((getBreachThreshold() == null) ? 0 : getBreachThreshold().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 (getPolicyName() != null) sb.append("PolicyName: ").append(getPolicyName()).append(","); if (getHonorCooldown() != null) sb.append("HonorCooldown: ").append(getHonorCooldown()).append(","); if (getMetricValue() != null) sb.append("MetricValue: ").append(getMetricValue()).append(","); if (getBreachThreshold() != null) sb.append("BreachThreshold: ").append(getBreachThreshold()); sb.append("}"); return sb.toString(); }
return false; ExecutePolicyRequest other = (ExecutePolicyRequest) obj; if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false; if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false; if (other.getPolicyName() == null ^ this.getPolicyName() == null)
public Request<ExecutePolicyRequest> marshall(ExecutePolicyRequest executePolicyRequest) { if (executePolicyRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<ExecutePolicyRequest> request = new DefaultRequest<ExecutePolicyRequest>(executePolicyRequest, "AmazonAutoScaling"); request.addParameter("Action", "ExecutePolicy"); request.addParameter("Version", "2011-01-01"); request.setHttpMethod(HttpMethodName.POST); if (executePolicyRequest.getAutoScalingGroupName() != null) { request.addParameter("AutoScalingGroupName", StringUtils.fromString(executePolicyRequest.getAutoScalingGroupName())); } if (executePolicyRequest.getPolicyName() != null) { request.addParameter("PolicyName", StringUtils.fromString(executePolicyRequest.getPolicyName())); } if (executePolicyRequest.getHonorCooldown() != null) { request.addParameter("HonorCooldown", StringUtils.fromBoolean(executePolicyRequest.getHonorCooldown())); } if (executePolicyRequest.getMetricValue() != null) { request.addParameter("MetricValue", StringUtils.fromDouble(executePolicyRequest.getMetricValue())); } if (executePolicyRequest.getBreachThreshold() != null) { request.addParameter("BreachThreshold", StringUtils.fromDouble(executePolicyRequest.getBreachThreshold())); } return request; }
@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 + ((getHonorCooldown() == null) ? 0 : getHonorCooldown().hashCode()); hashCode = prime * hashCode + ((getMetricValue() == null) ? 0 : getMetricValue().hashCode()); hashCode = prime * hashCode + ((getBreachThreshold() == null) ? 0 : getBreachThreshold().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 (getPolicyName() != null) sb.append("PolicyName: " + getPolicyName() + ","); if (getHonorCooldown() != null) sb.append("HonorCooldown: " + getHonorCooldown() + ","); if (getMetricValue() != null) sb.append("MetricValue: " + getMetricValue() + ","); if (getBreachThreshold() != null) sb.append("BreachThreshold: " + getBreachThreshold()); sb.append("}"); return sb.toString(); }
ExecutePolicyRequest other = (ExecutePolicyRequest) obj; if (other.getAutoScalingGroupName() == null ^ this.getAutoScalingGroupName() == null) return false; if (other.getAutoScalingGroupName() != null && other.getAutoScalingGroupName().equals(this.getAutoScalingGroupName()) == false) return false; if (other.getPolicyName() == null ^ this.getPolicyName() == null)
if (executePolicyRequest.getAutoScalingGroupName() != null) { prefix = "AutoScalingGroupName"; String autoScalingGroupName = executePolicyRequest.getAutoScalingGroupName(); request.addParameter(prefix, StringUtils.fromString(autoScalingGroupName));