@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; }
public CloudWatchAlarmDefinition unmarshall(JsonUnmarshallerContext context) throws Exception { CloudWatchAlarmDefinition cloudWatchAlarmDefinition = new CloudWatchAlarmDefinition(); if (context.testExpression("ComparisonOperator", targetDepth)) { context.nextToken(); cloudWatchAlarmDefinition.setComparisonOperator(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setEvaluationPeriods(context.getUnmarshaller(Integer.class).unmarshall(context)); cloudWatchAlarmDefinition.setMetricName(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setNamespace(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setPeriod(context.getUnmarshaller(Integer.class).unmarshall(context)); cloudWatchAlarmDefinition.setStatistic(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setThreshold(context.getUnmarshaller(Double.class).unmarshall(context)); cloudWatchAlarmDefinition.setUnit(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setDimensions(new ListUnmarshaller<MetricDimension>(MetricDimensionJsonUnmarshaller.getInstance()) .unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ScalingTrigger == false) return false; ScalingTrigger other = (ScalingTrigger) obj; if (other.getCloudWatchAlarmDefinition() == null ^ this.getCloudWatchAlarmDefinition() == null) return false; if (other.getCloudWatchAlarmDefinition() != null && other.getCloudWatchAlarmDefinition().equals(this.getCloudWatchAlarmDefinition()) == false) return false; return true; }
public CloudWatchAlarmDefinition unmarshall(JsonUnmarshallerContext context) throws Exception { CloudWatchAlarmDefinition cloudWatchAlarmDefinition = new CloudWatchAlarmDefinition(); if (context.testExpression("ComparisonOperator", targetDepth)) { context.nextToken(); cloudWatchAlarmDefinition.setComparisonOperator(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setEvaluationPeriods(context.getUnmarshaller(Integer.class).unmarshall(context)); cloudWatchAlarmDefinition.setMetricName(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setNamespace(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setPeriod(context.getUnmarshaller(Integer.class).unmarshall(context)); cloudWatchAlarmDefinition.setStatistic(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setThreshold(context.getUnmarshaller(Double.class).unmarshall(context)); cloudWatchAlarmDefinition.setUnit(context.getUnmarshaller(String.class).unmarshall(context)); cloudWatchAlarmDefinition.setDimensions(new ListUnmarshaller<MetricDimension>(MetricDimensionJsonUnmarshaller.getInstance()) .unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ScalingTrigger == false) return false; ScalingTrigger other = (ScalingTrigger) obj; if (other.getCloudWatchAlarmDefinition() == null ^ this.getCloudWatchAlarmDefinition() == null) return false; if (other.getCloudWatchAlarmDefinition() != null && other.getCloudWatchAlarmDefinition().equals(this.getCloudWatchAlarmDefinition()) == false) return false; return true; }
return false; CloudWatchAlarmDefinition other = (CloudWatchAlarmDefinition) obj; if (other.getComparisonOperator() == null ^ this.getComparisonOperator() == null) return false; if (other.getComparisonOperator() != null && other.getComparisonOperator().equals(this.getComparisonOperator()) == false) return false; if (other.getEvaluationPeriods() == null ^ this.getEvaluationPeriods() == null) return false; if (other.getEvaluationPeriods() != null && other.getEvaluationPeriods().equals(this.getEvaluationPeriods()) == 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.getPeriod() == null ^ this.getPeriod() == null) return false; 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) return false; if (other.getThreshold() != null && other.getThreshold().equals(this.getThreshold()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getComparisonOperator() != null) sb.append("ComparisonOperator: ").append(getComparisonOperator()).append(","); if (getEvaluationPeriods() != null) sb.append("EvaluationPeriods: ").append(getEvaluationPeriods()).append(","); if (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); 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(","); if (getUnit() != null) sb.append("Unit: ").append(getUnit()).append(","); if (getDimensions() != null) sb.append("Dimensions: ").append(getDimensions()); sb.append("}"); return sb.toString();
/** * 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); } }
@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; }
return false; CloudWatchAlarmDefinition other = (CloudWatchAlarmDefinition) obj; if (other.getComparisonOperator() == null ^ this.getComparisonOperator() == null) return false; if (other.getComparisonOperator() != null && other.getComparisonOperator().equals(this.getComparisonOperator()) == false) return false; if (other.getEvaluationPeriods() == null ^ this.getEvaluationPeriods() == null) return false; if (other.getEvaluationPeriods() != null && other.getEvaluationPeriods().equals(this.getEvaluationPeriods()) == 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.getPeriod() == null ^ this.getPeriod() == null) return false; 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) return false; if (other.getThreshold() != null && other.getThreshold().equals(this.getThreshold()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getComparisonOperator() != null) sb.append("ComparisonOperator: ").append(getComparisonOperator()).append(","); if (getEvaluationPeriods() != null) sb.append("EvaluationPeriods: ").append(getEvaluationPeriods()).append(","); if (getMetricName() != null) sb.append("MetricName: ").append(getMetricName()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); 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(","); if (getUnit() != null) sb.append("Unit: ").append(getUnit()).append(","); if (getDimensions() != null) sb.append("Dimensions: ").append(getDimensions()); sb.append("}"); return sb.toString();
/** * 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); } }