if (getPeriod() != null) sb.append("Period: ").append(getPeriod()).append(","); if (getStatistic() != null) sb.append("Statistic: ").append(getStatistic()).append(","); if (getThreshold() != null) sb.append("Threshold: ").append(getThreshold()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getComparisonOperator() == null) ? 0 : getComparisonOperator().hashCode()); hashCode = prime * hashCode + ((getEvaluationPeriods() == null) ? 0 : getEvaluationPeriods().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode()); hashCode = prime * hashCode + ((getStatistic() == null) ? 0 : getStatistic().hashCode()); hashCode = prime * hashCode + ((getThreshold() == null) ? 0 : getThreshold().hashCode()); hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode()); hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode()); return hashCode; }
if (other.getPeriod() != null && other.getPeriod().equals(this.getPeriod()) == false) return false; if (other.getStatistic() == null ^ this.getStatistic() == null) return false; if (other.getStatistic() != null && other.getStatistic().equals(this.getStatistic()) == false) return false; if (other.getThreshold() == null ^ this.getThreshold() == null)
/** * Marshall the given parameter object. */ public void marshall(CloudWatchAlarmDefinition cloudWatchAlarmDefinition, ProtocolMarshaller protocolMarshaller) { if (cloudWatchAlarmDefinition == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(cloudWatchAlarmDefinition.getComparisonOperator(), COMPARISONOPERATOR_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getEvaluationPeriods(), EVALUATIONPERIODS_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getMetricName(), METRICNAME_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getNamespace(), NAMESPACE_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getPeriod(), PERIOD_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getStatistic(), STATISTIC_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getThreshold(), THRESHOLD_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getUnit(), UNIT_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getDimensions(), DIMENSIONS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (getPeriod() != null) sb.append("Period: ").append(getPeriod()).append(","); if (getStatistic() != null) sb.append("Statistic: ").append(getStatistic()).append(","); if (getThreshold() != null) sb.append("Threshold: ").append(getThreshold()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getComparisonOperator() == null) ? 0 : getComparisonOperator().hashCode()); hashCode = prime * hashCode + ((getEvaluationPeriods() == null) ? 0 : getEvaluationPeriods().hashCode()); hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode()); hashCode = prime * hashCode + ((getStatistic() == null) ? 0 : getStatistic().hashCode()); hashCode = prime * hashCode + ((getThreshold() == null) ? 0 : getThreshold().hashCode()); hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode()); hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode()); return hashCode; }
if (other.getPeriod() != null && other.getPeriod().equals(this.getPeriod()) == false) return false; if (other.getStatistic() == null ^ this.getStatistic() == null) return false; if (other.getStatistic() != null && other.getStatistic().equals(this.getStatistic()) == false) return false; if (other.getThreshold() == null ^ this.getThreshold() == null)
/** * Marshall the given parameter object. */ public void marshall(CloudWatchAlarmDefinition cloudWatchAlarmDefinition, ProtocolMarshaller protocolMarshaller) { if (cloudWatchAlarmDefinition == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(cloudWatchAlarmDefinition.getComparisonOperator(), COMPARISONOPERATOR_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getEvaluationPeriods(), EVALUATIONPERIODS_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getMetricName(), METRICNAME_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getNamespace(), NAMESPACE_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getPeriod(), PERIOD_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getStatistic(), STATISTIC_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getThreshold(), THRESHOLD_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getUnit(), UNIT_BINDING); protocolMarshaller.marshall(cloudWatchAlarmDefinition.getDimensions(), DIMENSIONS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }