@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEvaluationPeriods() == null) ? 0 : getEvaluationPeriods().hashCode()); hashCode = prime * hashCode + ((getThreshold() == null) ? 0 : getThreshold().hashCode()); hashCode = prime * hashCode + ((getComparisonOperator() == null) ? 0 : getComparisonOperator().hashCode()); hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getStatistic() == null) ? 0 : getStatistic().hashCode()); hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode()); return hashCode; }
public CloudWatchAlarmConfiguration unmarshall(StaxUnmarshallerContext context) throws Exception { CloudWatchAlarmConfiguration cloudWatchAlarmConfiguration = new CloudWatchAlarmConfiguration(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; cloudWatchAlarmConfiguration.setEvaluationPeriods(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; cloudWatchAlarmConfiguration.setThreshold(DoubleStaxUnmarshaller.getInstance().unmarshall(context)); continue; cloudWatchAlarmConfiguration.setComparisonOperator(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; cloudWatchAlarmConfiguration.setPeriod(IntegerStaxUnmarshaller.getInstance().unmarshall(context)); continue; cloudWatchAlarmConfiguration.setMetricName(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; cloudWatchAlarmConfiguration.setNamespace(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; cloudWatchAlarmConfiguration.setStatistic(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; cloudWatchAlarmConfiguration.withDimensions(new ArrayList<Dimension>()); continue; cloudWatchAlarmConfiguration.withDimensions(DimensionStaxUnmarshaller.getInstance().unmarshall(context));
if (other.getCloudWatchAlarmConfiguration() == null ^ this.getCloudWatchAlarmConfiguration() == null) return false; if (other.getCloudWatchAlarmConfiguration() != null && other.getCloudWatchAlarmConfiguration().equals(this.getCloudWatchAlarmConfiguration()) == false) return false; return true;
return false; CloudWatchAlarmConfiguration other = (CloudWatchAlarmConfiguration) obj; if (other.getEvaluationPeriods() == null ^ this.getEvaluationPeriods() == null) return false; if (other.getEvaluationPeriods() != null && other.getEvaluationPeriods().equals(this.getEvaluationPeriods()) == false) return false; if (other.getThreshold() == null ^ this.getThreshold() == null) return false; if (other.getThreshold() != null && other.getThreshold().equals(this.getThreshold()) == false) return false; if (other.getComparisonOperator() == null ^ this.getComparisonOperator() == null) return false; if (other.getComparisonOperator() != null && other.getComparisonOperator().equals(this.getComparisonOperator()) == false) return false; if (other.getPeriod() == null ^ this.getPeriod() == null) return false; if (other.getPeriod() != null && other.getPeriod().equals(this.getPeriod()) == false) return false; if (other.getMetricName() == null ^ this.getMetricName() == null) return false; if (other.getMetricName() != null && other.getMetricName().equals(this.getMetricName()) == false) return false; if (other.getNamespace() == null ^ this.getNamespace() == null) return false; if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false) return false; if (other.getStatistic() == null ^ this.getStatistic() == null) return false; if (other.getStatistic() != null && other.getStatistic().equals(this.getStatistic()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getEvaluationPeriods() != null) sb.append("EvaluationPeriods: ").append(getEvaluationPeriods()).append(","); if (getThreshold() != null) sb.append("Threshold: ").append(getThreshold()).append(","); if (getComparisonOperator() != null) sb.append("ComparisonOperator: ").append(getComparisonOperator()).append(","); if (getPeriod() != null) sb.append("Period: ").append(getPeriod()).append(","); if (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); if (getStatistic() != null) sb.append("Statistic: ").append(getStatistic()).append(","); if (getDimensions() != null) sb.append("Dimensions: ").append(getDimensions()); sb.append("}"); return sb.toString();