/** * 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(); }
@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; }
@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; }
/** * 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(); }
@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; }
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
PredefinedMetricSpecification predefinedMetricSpecification = targetTrackingConfiguration.getPredefinedMetricSpecification(); if (predefinedMetricSpecification != null) {
public void marshall(TargetTrackingConfiguration _targetTrackingConfiguration, Request<?> request, String _prefix) { String prefix; if (_targetTrackingConfiguration.getPredefinedMetricSpecification() != null) { prefix = _prefix + "PredefinedMetricSpecification"; PredefinedMetricSpecification predefinedMetricSpecification = _targetTrackingConfiguration .getPredefinedMetricSpecification(); PredefinedMetricSpecificationStaxMarshaller.getInstance().marshall( predefinedMetricSpecification, request, prefix + "."); } if (_targetTrackingConfiguration.getCustomizedMetricSpecification() != null) { prefix = _prefix + "CustomizedMetricSpecification"; CustomizedMetricSpecification customizedMetricSpecification = _targetTrackingConfiguration .getCustomizedMetricSpecification(); CustomizedMetricSpecificationStaxMarshaller.getInstance().marshall( customizedMetricSpecification, request, prefix + "."); } if (_targetTrackingConfiguration.getTargetValue() != null) { prefix = _prefix + "TargetValue"; Double targetValue = _targetTrackingConfiguration.getTargetValue(); request.addParameter(prefix, StringUtils.fromDouble(targetValue)); } if (_targetTrackingConfiguration.getDisableScaleIn() != null) { prefix = _prefix + "DisableScaleIn"; Boolean disableScaleIn = _targetTrackingConfiguration.getDisableScaleIn(); request.addParameter(prefix, StringUtils.fromBoolean(disableScaleIn)); } }