@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPredefinedMetricType() == null) ? 0 : getPredefinedMetricType().hashCode()); hashCode = prime * hashCode + ((getResourceLabel() == null) ? 0 : getResourceLabel().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PredefinedMetricSpecification == false) return false; PredefinedMetricSpecification other = (PredefinedMetricSpecification) obj; if (other.getPredefinedMetricType() == null ^ this.getPredefinedMetricType() == null) return false; if (other.getPredefinedMetricType() != null && other.getPredefinedMetricType().equals(this.getPredefinedMetricType()) == false) return false; if (other.getResourceLabel() == null ^ this.getResourceLabel() == null) return false; if (other.getResourceLabel() != null && other.getResourceLabel().equals(this.getResourceLabel()) == false) return false; return true; }
/** * 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 (getPredefinedMetricType() != null) sb.append("PredefinedMetricType: ").append(getPredefinedMetricType()).append(","); if (getResourceLabel() != null) sb.append("ResourceLabel: ").append(getResourceLabel()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPredefinedMetricType() == null) ? 0 : getPredefinedMetricType().hashCode()); hashCode = prime * hashCode + ((getResourceLabel() == null) ? 0 : getResourceLabel().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 (getPredefinedMetricType() != null) sb.append("PredefinedMetricType: " + getPredefinedMetricType() + ","); if (getResourceLabel() != null) sb.append("ResourceLabel: " + getResourceLabel()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PredefinedMetricSpecification == false) return false; PredefinedMetricSpecification other = (PredefinedMetricSpecification) obj; if (other.getPredefinedMetricType() == null ^ this.getPredefinedMetricType() == null) return false; if (other.getPredefinedMetricType() != null && other.getPredefinedMetricType().equals(this.getPredefinedMetricType()) == false) return false; if (other.getResourceLabel() == null ^ this.getResourceLabel() == null) return false; if (other.getResourceLabel() != null && other.getResourceLabel().equals(this.getResourceLabel()) == false) return false; return true; } }
public void marshall(PredefinedMetricSpecification _predefinedMetricSpecification, Request<?> request, String _prefix) { String prefix; if (_predefinedMetricSpecification.getPredefinedMetricType() != null) { prefix = _prefix + "PredefinedMetricType"; String predefinedMetricType = _predefinedMetricSpecification.getPredefinedMetricType(); request.addParameter(prefix, StringUtils.fromString(predefinedMetricType)); } if (_predefinedMetricSpecification.getResourceLabel() != null) { prefix = _prefix + "ResourceLabel"; String resourceLabel = _predefinedMetricSpecification.getResourceLabel(); request.addParameter(prefix, StringUtils.fromString(resourceLabel)); } }
if (predefinedMetricSpecification.getResourceLabel() != null) { request.addParameter("TargetTrackingConfiguration.PredefinedMetricSpecification.ResourceLabel", StringUtils.fromString(predefinedMetricSpecification.getResourceLabel()));